@lovrabet/lovrabet-cli 2.0.7 → 2.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/lib/cli.js +1 -1
  2. package/lib/commands/app/cache.js +1 -1
  3. package/lib/commands/app/definitions.js +1 -1
  4. package/lib/commands/app/mock-loader.js +1 -1
  5. package/lib/commands/app/remote-source.js +1 -1
  6. package/lib/commands/app/shared.js +1 -1
  7. package/lib/commands/auth/index.js +1 -1
  8. package/lib/commands/auth/prompt.js +1 -1
  9. package/lib/commands/bff/detail.js +1 -1
  10. package/lib/commands/bff/exec.js +1 -1
  11. package/lib/commands/bff/index.js +1 -1
  12. package/lib/commands/common/config-policy.js +1 -1
  13. package/lib/commands/common/constraints.js +1 -1
  14. package/lib/commands/common/flags.js +1 -1
  15. package/lib/commands/config/definitions.js +1 -1
  16. package/lib/commands/config/shared.js +1 -1
  17. package/lib/commands/data/index.js +1 -1
  18. package/lib/commands/dataset/detail.js +1 -1
  19. package/lib/commands/dataset/index.js +1 -1
  20. package/lib/commands/dataset/list.js +1 -1
  21. package/lib/commands/doctor.js +1 -1
  22. package/lib/commands/init.js +1 -1
  23. package/lib/commands/logs/index.js +1 -1
  24. package/lib/commands/registry.js +1 -1
  25. package/lib/commands/schema.js +1 -1
  26. package/lib/commands/skill/index.js +1 -1
  27. package/lib/commands/sql/detail.js +1 -1
  28. package/lib/commands/sql/exec.js +1 -1
  29. package/lib/commands/sql/index.js +1 -1
  30. package/lib/commands/update.js +1 -1
  31. package/lib/config/schema.js +1 -1
  32. package/lib/constant/auth-mode.js +1 -1
  33. package/lib/constant/cli.js +1 -1
  34. package/lib/constant/defaults.js +1 -1
  35. package/lib/constant/distribution.js +1 -1
  36. package/lib/constant/domain.js +1 -1
  37. package/lib/constant/env.js +1 -1
  38. package/lib/constant/output.js +1 -1
  39. package/lib/constant/product.js +1 -1
  40. package/lib/constant/risk.js +1 -1
  41. package/lib/constant/url.js +1 -1
  42. package/lib/context.js +1 -1
  43. package/lib/core/api-client.js +1 -1
  44. package/lib/core/db-resolver.js +1 -1
  45. package/lib/core/sdk-client.js +1 -1
  46. package/lib/errors.js +1 -1
  47. package/lib/framework/build-all-flags.js +1 -1
  48. package/lib/framework/dryrun.js +1 -1
  49. package/lib/framework/flags.js +1 -1
  50. package/lib/framework/help.js +1 -1
  51. package/lib/framework/index.js +1 -1
  52. package/lib/framework/output.js +1 -1
  53. package/lib/framework/preparse.js +1 -1
  54. package/lib/framework/response.js +1 -1
  55. package/lib/framework/runner-confirmation.js +1 -1
  56. package/lib/framework/runner-error.js +1 -1
  57. package/lib/framework/runner.js +1 -1
  58. package/lib/framework/schema-export.js +1 -1
  59. package/lib/framework/types.js +1 -1
  60. package/lib/help.js +1 -1
  61. package/lib/skills/npx-skills-add.js +1 -1
  62. package/lib/utils/apply-jq-filter.js +1 -1
  63. package/lib/utils/logger.js +1 -1
  64. package/lib/utils/params.js +1 -1
  65. package/lib/utils/platform.js +1 -1
  66. package/lib/utils/version.js +1 -1
  67. package/lib/utils/write-cli-side-channel.js +1 -1
  68. package/package.json +1 -1
package/lib/cli.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- const a0_0x231acc=a0_0x3a86;(function(_0x5ecf26,_0x50a38f){const _0x42f361=a0_0x3a86,_0x508d59=_0x5ecf26();while(!![]){try{const _0x1c82d2=parseInt(_0x42f361(0x11a))/0x1*(parseInt(_0x42f361(0x11d))/0x2)+-parseInt(_0x42f361(0x124))/0x3+-parseInt(_0x42f361(0x132))/0x4+-parseInt(_0x42f361(0x12d))/0x5+parseInt(_0x42f361(0x137))/0x6*(parseInt(_0x42f361(0x11b))/0x7)+-parseInt(_0x42f361(0x133))/0x8+parseInt(_0x42f361(0x134))/0x9;if(_0x1c82d2===_0x50a38f)break;else _0x508d59['push'](_0x508d59['shift']());}catch(_0x2f518e){_0x508d59['push'](_0x508d59['shift']());}}}(a0_0x178a,0xeeb5d));import{jsx as a0_0x97ed65}from'react/jsx-runtime';import a0_0x14bcdc from'meow';import{render}from'ink';import{Help}from'./help.js';import{CliError,CliErrors}from'./errors.js';import{buildConfigFromFlags,initGlobalEnvironment}from'./context.js';import{isKnownService,getServiceEntry,findDefinition,getAllDefinitions}from'./commands/registry.js';function a0_0x3a86(_0x42bece,_0x481105){_0x42bece=_0x42bece-0x11a;const _0x178aa3=a0_0x178a();let _0x3a865c=_0x178aa3[_0x42bece];return _0x3a865c;}import{runCommand,createPipelineEnv}from'./framework/runner.js';import{generateCommandHelp,generateServiceHelp,generateFullHelp}from'./framework/help.js';import{buildMeowFlags}from'./constant/cli.js';const helpText=generateFullHelp(),cli=a0_0x14bcdc(helpText,{'importMeta':import.meta,'flags':buildMeowFlags(),'autoVersion':!![]});void main()[a0_0x231acc(0x13f)](handleError);async function main(){try{await run();}catch(_0x1e216c){handleError(_0x1e216c);}}async function run(){const _0x31005f=a0_0x231acc;let _0xa1aa94=cli[_0x31005f(0x13b)][0x0],_0x5e0988=cli[_0x31005f(0x13b)][0x1];const _0x5763f6=cli[_0x31005f(0x11e)];try{const {correctFlags:_0x52561d}=await import('./framework/preparse.js'),_0x542d93=getAllDefinitions()[_0x31005f(0x120)](_0x4de35a=>_0x4de35a[_0x31005f(0x11e)]??[]),{flags:_0x4ec594,corrections:_0x5ec553}=_0x52561d(_0x5763f6,_0x542d93);if(_0x5ec553[_0x31005f(0x12b)]>0x0){for(const _0x2ba50a of _0x5ec553){process[_0x31005f(0x13d)][_0x31005f(0x129)](_0x31005f(0x138)+_0x2ba50a[_0x31005f(0x125)]+_0x31005f(0x12f)+_0x2ba50a[_0x31005f(0x12c)]+_0x31005f(0x126)+_0x2ba50a['corrected']+'\x0a');}Object['assign'](_0x5763f6,_0x4ec594);}}catch{}if(!_0xa1aa94||!isKnownService(_0xa1aa94)){const {waitUntilExit:_0x42807f}=render(a0_0x97ed65(Help,{}));await _0x42807f();return;}const _0x2b14de=getServiceEntry(_0xa1aa94);if(!_0x5e0988){if(_0x5763f6[_0x31005f(0x13e)]){console[_0x31005f(0x121)](generateServiceHelp(_0xa1aa94));return;}if(_0x2b14de[_0x31005f(0x122)])_0x5e0988=_0x2b14de[_0x31005f(0x122)];else{console[_0x31005f(0x121)](generateServiceHelp(_0xa1aa94));return;}}const _0x529d18=findDefinition(_0xa1aa94,_0x5e0988);!_0x529d18&&(console['log'](generateServiceHelp(_0xa1aa94)),handleError(CliErrors[_0x31005f(0x12a)](_0xa1aa94+'\x20'+_0x5e0988)));if(_0x5763f6[_0x31005f(0x13e)]){console[_0x31005f(0x121)](generateCommandHelp(_0x529d18));return;}const _0x4f7ba3=buildConfigFromFlags(_0x5763f6);await initGlobalEnvironment(_0x4f7ba3);const _0x4954d6=createPipelineEnv(_0x4f7ba3,_0x5763f6);_0x4954d6[_0x31005f(0x123)]=cli[_0x31005f(0x13b)][_0x31005f(0x139)](0x2),await runCommand(_0x529d18,_0x4954d6);}function handleError(_0x44d7ec){const _0x3f436f=a0_0x231acc;if(_0x44d7ec instanceof CliError){_0x44d7ec[_0x3f436f(0x128)]===_0x3f436f(0x130)&&(process['stderr'][_0x3f436f(0x129)](_0x3f436f(0x135)),process[_0x3f436f(0x11c)](0x0));console[_0x3f436f(0x127)](_0x3f436f(0x13a)+_0x44d7ec[_0x3f436f(0x140)]);if(_0x44d7ec[_0x3f436f(0x11f)])console[_0x3f436f(0x127)]('Hint:\x20'+_0x44d7ec[_0x3f436f(0x11f)]);process[_0x3f436f(0x11c)](_0x44d7ec[_0x3f436f(0x13c)]);}isUserCancellation(_0x44d7ec)&&(process[_0x3f436f(0x13d)]['write'](_0x3f436f(0x135)),process[_0x3f436f(0x11c)](0x0)),console[_0x3f436f(0x127)](_0x3f436f(0x12e),_0x44d7ec),process[_0x3f436f(0x11c)](0x1);}function a0_0x178a(){const _0x451887=['flags','hint','flatMap','log','defaultCommand','args','5848104RULmzU','handler','\x20->\x20--','error','code','write','unknownCommand','length','original','8558530kGVWyy','Unexpected\x20error:',':\x20--','cancelled','ERR_STREAM_DESTROYED','7441680BOvhKf','12477232Firutn','60946389gJsmVz','\x0aCancelled.\x0a','name','5696574MEQJky','[preparse]\x20','slice','Error:\x20','input','exitCode','stderr','help','catch','message','67531SiWXxu','7mHEeHY','exit','10goDjJE'];a0_0x178a=function(){return _0x451887;};return a0_0x178a();}function isUserCancellation(_0x2c86ee){const _0x2cf106=a0_0x231acc;if(!(_0x2c86ee instanceof Error))return![];if(_0x2c86ee[_0x2cf106(0x136)]==='ExitPromptError')return!![];if(_0x2c86ee[_0x2cf106(0x128)]==='ERR_USE_AFTER_CLOSE')return!![];if(_0x2c86ee[_0x2cf106(0x128)]===_0x2cf106(0x131))return!![];return![];}
2
+ const a0_0x4b29dc=a0_0x1a67;(function(_0x28c9e3,_0x20be6e){const _0x232eb3=a0_0x1a67,_0x5e1232=_0x28c9e3();while(!![]){try{const _0xb8855d=parseInt(_0x232eb3(0xdd))/0x1*(-parseInt(_0x232eb3(0xda))/0x2)+-parseInt(_0x232eb3(0xe2))/0x3*(parseInt(_0x232eb3(0xdb))/0x4)+parseInt(_0x232eb3(0xe5))/0x5*(-parseInt(_0x232eb3(0xef))/0x6)+-parseInt(_0x232eb3(0xce))/0x7*(parseInt(_0x232eb3(0xed))/0x8)+-parseInt(_0x232eb3(0xc5))/0x9*(parseInt(_0x232eb3(0xe9))/0xa)+-parseInt(_0x232eb3(0xc3))/0xb*(-parseInt(_0x232eb3(0xc6))/0xc)+parseInt(_0x232eb3(0xde))/0xd;if(_0xb8855d===_0x20be6e)break;else _0x5e1232['push'](_0x5e1232['shift']());}catch(_0x3ccc7e){_0x5e1232['push'](_0x5e1232['shift']());}}}(a0_0x140a,0x18c49));import{jsx as a0_0x106b03}from'react/jsx-runtime';import a0_0x51d9d8 from'meow';import{render}from'ink';function a0_0x140a(){const _0x7383fc=['defaultCommand','8JSgDjK','ExitPromptError','3570kIMNOa','catch','stderr',':\x20--','2596SYildm','hint','99reTsQb','4968vmYCrW','log','length','input','exit','flatMap','Error:\x20','code','430787kxZYwF','message','Hint:\x20','cancelled','error','assign','./framework/preparse.js','\x0aCancelled.\x0a','name','\x20->\x20--','[preparse]\x20','original','1186wvjExT','37292qiooKb','args','155hSwiVx','2981914QoVAZN','Unexpected\x20error:','handler','slice','3XHcsAi','write','help','385WEuDeD','ERR_STREAM_DESTROYED','ERR_USE_AFTER_CLOSE','exitCode','15490NAoUzV','unknownCommand','flags'];a0_0x140a=function(){return _0x7383fc;};return a0_0x140a();}import{Help}from'./help.js';import{CliError,CliErrors}from'./errors.js';import{buildConfigFromFlags,initGlobalEnvironment}from'./context.js';import{isKnownService,getServiceEntry,findDefinition,getAllDefinitions}from'./commands/registry.js';import{runCommand,createPipelineEnv}from'./framework/runner.js';import{generateCommandHelp,generateServiceHelp,generateFullHelp}from'./framework/help.js';function a0_0x1a67(_0x1102f1,_0x2fa911){_0x1102f1=_0x1102f1-0xc3;const _0x140ae1=a0_0x140a();let _0x1a676c=_0x140ae1[_0x1102f1];return _0x1a676c;}import{buildMeowFlags}from'./constant/cli.js';const helpText=generateFullHelp(),cli=a0_0x51d9d8(helpText,{'importMeta':import.meta,'flags':buildMeowFlags(),'autoVersion':!![]});void main()[a0_0x4b29dc(0xf0)](handleError);async function main(){try{await run();}catch(_0x5eed70){handleError(_0x5eed70);}}async function run(){const _0x37a3d5=a0_0x4b29dc;let _0x2544a5=cli[_0x37a3d5(0xc9)][0x0],_0x28bc55=cli[_0x37a3d5(0xc9)][0x1];const _0x1c6f3e=cli[_0x37a3d5(0xeb)];try{const {correctFlags:_0x5b0ce2}=await import(_0x37a3d5(0xd4)),_0x115866=getAllDefinitions()[_0x37a3d5(0xcb)](_0x1cdb73=>_0x1cdb73[_0x37a3d5(0xeb)]??[]),{flags:_0xc8941,corrections:_0x3d2ee1}=_0x5b0ce2(_0x1c6f3e,_0x115866);if(_0x3d2ee1[_0x37a3d5(0xc8)]>0x0){for(const _0x166a65 of _0x3d2ee1){process[_0x37a3d5(0xf1)]['write'](_0x37a3d5(0xd8)+_0x166a65[_0x37a3d5(0xe0)]+_0x37a3d5(0xf2)+_0x166a65[_0x37a3d5(0xd9)]+_0x37a3d5(0xd7)+_0x166a65['corrected']+'\x0a');}Object[_0x37a3d5(0xd3)](_0x1c6f3e,_0xc8941);}}catch{}if(!_0x2544a5||!isKnownService(_0x2544a5)){const {waitUntilExit:_0x49605a}=render(a0_0x106b03(Help,{}));await _0x49605a();return;}const _0xc31c74=getServiceEntry(_0x2544a5);if(!_0x28bc55){if(_0x1c6f3e[_0x37a3d5(0xe4)]){console[_0x37a3d5(0xc7)](generateServiceHelp(_0x2544a5));return;}if(_0xc31c74[_0x37a3d5(0xec)])_0x28bc55=_0xc31c74[_0x37a3d5(0xec)];else{console['log'](generateServiceHelp(_0x2544a5));return;}}const _0x1e24ab=findDefinition(_0x2544a5,_0x28bc55);!_0x1e24ab&&(console[_0x37a3d5(0xc7)](generateServiceHelp(_0x2544a5)),handleError(CliErrors[_0x37a3d5(0xea)](_0x2544a5+'\x20'+_0x28bc55)));if(_0x1c6f3e[_0x37a3d5(0xe4)]){console[_0x37a3d5(0xc7)](generateCommandHelp(_0x1e24ab));return;}const _0x3af511=buildConfigFromFlags(_0x1c6f3e);await initGlobalEnvironment(_0x3af511);const _0xd6f537=createPipelineEnv(_0x3af511,_0x1c6f3e);_0xd6f537[_0x37a3d5(0xdc)]=cli[_0x37a3d5(0xc9)][_0x37a3d5(0xe1)](0x2),await runCommand(_0x1e24ab,_0xd6f537);}function handleError(_0x329d25){const _0x200c4b=a0_0x4b29dc;if(_0x329d25 instanceof CliError){_0x329d25[_0x200c4b(0xcd)]===_0x200c4b(0xd1)&&(process[_0x200c4b(0xf1)][_0x200c4b(0xe3)](_0x200c4b(0xd5)),process['exit'](0x0));console[_0x200c4b(0xd2)](_0x200c4b(0xcc)+_0x329d25[_0x200c4b(0xcf)]);if(_0x329d25[_0x200c4b(0xc4)])console['error'](_0x200c4b(0xd0)+_0x329d25[_0x200c4b(0xc4)]);process[_0x200c4b(0xca)](_0x329d25[_0x200c4b(0xe8)]);}isUserCancellation(_0x329d25)&&(process[_0x200c4b(0xf1)][_0x200c4b(0xe3)](_0x200c4b(0xd5)),process[_0x200c4b(0xca)](0x0)),console[_0x200c4b(0xd2)](_0x200c4b(0xdf),_0x329d25),process[_0x200c4b(0xca)](0x1);}function isUserCancellation(_0xb8e7ae){const _0x434359=a0_0x4b29dc;if(!(_0xb8e7ae instanceof Error))return![];if(_0xb8e7ae[_0x434359(0xd6)]===_0x434359(0xee))return!![];if(_0xb8e7ae[_0x434359(0xcd)]===_0x434359(0xe7))return!![];if(_0xb8e7ae['code']===_0x434359(0xe6))return!![];return![];}
@@ -1 +1 @@
1
- (function(_0x480f74,_0x3d46bf){const _0x58db98=a1_0x117b,_0x3348e9=_0x480f74();while(!![]){try{const _0x502722=-parseInt(_0x58db98(0x10f))/0x1*(-parseInt(_0x58db98(0x106))/0x2)+-parseInt(_0x58db98(0x107))/0x3+parseInt(_0x58db98(0x105))/0x4+parseInt(_0x58db98(0x10e))/0x5+parseInt(_0x58db98(0x116))/0x6*(parseInt(_0x58db98(0x104))/0x7)+-parseInt(_0x58db98(0x10b))/0x8*(-parseInt(_0x58db98(0x10d))/0x9)+parseInt(_0x58db98(0x10a))/0xa*(-parseInt(_0x58db98(0x10c))/0xb);if(_0x502722===_0x3d46bf)break;else _0x3348e9['push'](_0x3348e9['shift']());}catch(_0x459279){_0x3348e9['push'](_0x3348e9['shift']());}}}(a1_0x5dc4,0xd9e84));import{createHash}from'node:crypto';import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{homedir}from'node:os';function a1_0x117b(_0x2a1101,_0x296c67){_0x2a1101=_0x2a1101-0xfa;const _0x5dc41c=a1_0x5dc4();let _0x117be1=_0x5dc41c[_0x2a1101];return _0x117be1;}function a1_0x5dc4(){const _0x5ee91c=['code','192qgsQPe','EPERM','sha256','appCode','trim','digest','slice','isArray','items','cache','parse','141862RPnkFw','2501272ePAnKm','228602NEqLWN','711603zLBgAf','update','hex','50myHOLR','4481952TAcwIp','4640801SpnsEI','9dZcdgg','2453610ORSNzj','8uUhEse','find','unknown','utf8','stringify','appName'];a1_0x5dc4=function(){return _0x5ee91c;};return a1_0x5dc4();}import{dirname,resolve}from'node:path';import{PRODUCT_CONFIG}from'../../constant/product.js';function fingerprintAccessKey(_0x4e420c){const _0x4b5d35=a1_0x117b,_0x1ee7d5=_0x4e420c[_0x4b5d35(0xfd)](),_0x57761c=_0x1ee7d5[_0x4b5d35(0xff)](-0x6)||_0x4b5d35(0x111),_0x14b98b=createHash(_0x4b5d35(0xfb))[_0x4b5d35(0x108)](_0x1ee7d5)[_0x4b5d35(0xfe)](_0x4b5d35(0x109))['slice'](0x0,0xc);return'ak_'+_0x57761c+'_'+_0x14b98b;}export function getAppCacheFilePath(_0x422065,_0x419404){const _0x171712=a1_0x117b;return resolve(homedir(),PRODUCT_CONFIG['homeDirName'],_0x171712(0x102),_0x422065,fingerprintAccessKey(_0x419404),'my-apps.json');}export function readCachedAppList(_0x4b527c,_0x5d71ce){const _0x4e5c59=a1_0x117b;if(!_0x5d71ce?.[_0x4e5c59(0xfd)]())return null;const _0x4ce9b4=getAppCacheFilePath(_0x4b527c,_0x5d71ce);if(!existsSync(_0x4ce9b4))return null;try{const _0x4a887b=readFileSync(_0x4ce9b4,'utf8');if(!_0x4a887b[_0x4e5c59(0xfd)]())return null;const _0xf0b633=JSON[_0x4e5c59(0x103)](_0x4a887b);if(!Array[_0x4e5c59(0x100)](_0xf0b633[_0x4e5c59(0x101)]))return null;return _0xf0b633;}catch{return null;}}export function writeCachedAppList(_0x3eaf30,_0x31f62b,_0x4407db){const _0x4d09f3=a1_0x117b,_0x32f7f3=getAppCacheFilePath(_0x3eaf30,_0x31f62b),_0x5bd93c=dirname(_0x32f7f3);!existsSync(_0x5bd93c)&&mkdirSync(_0x5bd93c,{'recursive':!![]});const _0x4e8af2=_0x32f7f3+'.tmp';try{writeFileSync(_0x4e8af2,JSON[_0x4d09f3(0x113)](_0x4407db,null,0x2)+'\x0a',{'encoding':_0x4d09f3(0x112),'mode':0x180});try{renameSync(_0x4e8af2,_0x32f7f3);}catch(_0xbc5657){if(_0xbc5657[_0x4d09f3(0x115)]===_0x4d09f3(0xfa)||_0xbc5657['code']==='EXDEV'||_0xbc5657[_0x4d09f3(0x115)]==='EACCES'){writeFileSync(_0x32f7f3,JSON[_0x4d09f3(0x113)](_0x4407db,null,0x2)+'\x0a',{'encoding':_0x4d09f3(0x112)});try{unlinkSync(_0x4e8af2);}catch{}}else throw _0xbc5657;}}catch(_0x28ba2a){try{unlinkSync(_0x4e8af2);}catch{}throw _0x28ba2a;}return _0x32f7f3;}export function resolveCachedAppCode(_0xae275b,_0x197bc8,_0x1e7173){const _0x161723=a1_0x117b;if(!_0xae275b)return undefined;const _0x3e942e=readCachedAppList(_0x197bc8,_0x1e7173),_0x16e9a0=_0x3e942e?.[_0x161723(0x101)][_0x161723(0x110)](_0x3ac18e=>_0x3ac18e[_0x161723(0x114)]===_0xae275b);return _0x16e9a0?.[_0x161723(0xfc)]?.[_0x161723(0xfd)]()||undefined;}
1
+ (function(_0x5eadf4,_0xa3b810){const _0x50bce4=a1_0x2143,_0x5e362e=_0x5eadf4();while(!![]){try{const _0x1ea21=parseInt(_0x50bce4(0x18d))/0x1*(parseInt(_0x50bce4(0x19b))/0x2)+-parseInt(_0x50bce4(0x17e))/0x3*(parseInt(_0x50bce4(0x18c))/0x4)+-parseInt(_0x50bce4(0x19a))/0x5+parseInt(_0x50bce4(0x192))/0x6+parseInt(_0x50bce4(0x180))/0x7+parseInt(_0x50bce4(0x191))/0x8+-parseInt(_0x50bce4(0x186))/0x9;if(_0x1ea21===_0xa3b810)break;else _0x5e362e['push'](_0x5e362e['shift']());}catch(_0x5a88f6){_0x5e362e['push'](_0x5e362e['shift']());}}}(a1_0x207e,0x2ff23));import{createHash}from'node:crypto';import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{homedir}from'node:os';function a1_0x2143(_0x110914,_0x47c240){_0x110914=_0x110914-0x17e;const _0x207e28=a1_0x207e();let _0x21436f=_0x207e28[_0x110914];return _0x21436f;}function a1_0x207e(){const _0x514752=['EACCES','EXDEV','appName','28NcjDID','1BZAybT','cache','stringify','find','2856552LpDjpv','1189386wkfAhm','parse','homeDirName','digest','code','slice','items','appCode','1413405MGCKNL','768932OnvVZh','trim','98403CnBloZ','my-apps.json','284536JRyUZD','.tmp','EPERM','sha256','utf8','ak_','2445651gfknOF','update','isArray'];a1_0x207e=function(){return _0x514752;};return a1_0x207e();}import{dirname,resolve}from'node:path';import{PRODUCT_CONFIG}from'../../constant/product.js';function fingerprintAccessKey(_0x270a7b){const _0x3f1b9e=a1_0x2143,_0x28f41d=_0x270a7b['trim'](),_0x2563ac=_0x28f41d[_0x3f1b9e(0x197)](-0x6)||'unknown',_0x37f620=createHash(_0x3f1b9e(0x183))[_0x3f1b9e(0x187)](_0x28f41d)[_0x3f1b9e(0x195)]('hex')[_0x3f1b9e(0x197)](0x0,0xc);return _0x3f1b9e(0x185)+_0x2563ac+'_'+_0x37f620;}export function getAppCacheFilePath(_0x248541,_0x4be290){const _0x150d0=a1_0x2143;return resolve(homedir(),PRODUCT_CONFIG[_0x150d0(0x194)],_0x150d0(0x18e),_0x248541,fingerprintAccessKey(_0x4be290),_0x150d0(0x17f));}export function readCachedAppList(_0x57605d,_0x5922e7){const _0x50c330=a1_0x2143;if(!_0x5922e7?.[_0x50c330(0x19c)]())return null;const _0xd7681e=getAppCacheFilePath(_0x57605d,_0x5922e7);if(!existsSync(_0xd7681e))return null;try{const _0x2546d3=readFileSync(_0xd7681e,_0x50c330(0x184));if(!_0x2546d3[_0x50c330(0x19c)]())return null;const _0x1ae1e3=JSON[_0x50c330(0x193)](_0x2546d3);if(!Array[_0x50c330(0x188)](_0x1ae1e3[_0x50c330(0x198)]))return null;return _0x1ae1e3;}catch{return null;}}export function writeCachedAppList(_0xacda7d,_0x5f2adc,_0x5be9c0){const _0x2f1af6=a1_0x2143,_0x2e782f=getAppCacheFilePath(_0xacda7d,_0x5f2adc),_0x3d2eab=dirname(_0x2e782f);!existsSync(_0x3d2eab)&&mkdirSync(_0x3d2eab,{'recursive':!![]});const _0x6f5bfe=_0x2e782f+_0x2f1af6(0x181);try{writeFileSync(_0x6f5bfe,JSON[_0x2f1af6(0x18f)](_0x5be9c0,null,0x2)+'\x0a',{'encoding':_0x2f1af6(0x184),'mode':0x180});try{renameSync(_0x6f5bfe,_0x2e782f);}catch(_0x2f58dc){if(_0x2f58dc[_0x2f1af6(0x196)]===_0x2f1af6(0x182)||_0x2f58dc['code']===_0x2f1af6(0x18a)||_0x2f58dc['code']===_0x2f1af6(0x189)){writeFileSync(_0x2e782f,JSON[_0x2f1af6(0x18f)](_0x5be9c0,null,0x2)+'\x0a',{'encoding':_0x2f1af6(0x184)});try{unlinkSync(_0x6f5bfe);}catch{}}else throw _0x2f58dc;}}catch(_0x3490b9){try{unlinkSync(_0x6f5bfe);}catch{}throw _0x3490b9;}return _0x2e782f;}export function resolveCachedAppCode(_0x587dc8,_0x2ed688,_0x440df3){const _0xccbe3a=a1_0x2143;if(!_0x587dc8)return undefined;const _0xa2ad37=readCachedAppList(_0x2ed688,_0x440df3),_0x3b88b0=_0xa2ad37?.[_0xccbe3a(0x198)][_0xccbe3a(0x190)](_0x49d505=>_0x49d505[_0xccbe3a(0x18b)]===_0x587dc8);return _0x3b88b0?.[_0xccbe3a(0x199)]?.[_0xccbe3a(0x19c)]()||undefined;}
@@ -1 +1 @@
1
- const a2_0x355b85=a2_0x38db;(function(_0x28360f,_0x16b82d){const _0x6ca4df=a2_0x38db,_0x107a4c=_0x28360f();while(!![]){try{const _0x586cc3=-parseInt(_0x6ca4df(0x10f))/0x1+parseInt(_0x6ca4df(0xfa))/0x2*(parseInt(_0x6ca4df(0xeb))/0x3)+-parseInt(_0x6ca4df(0xf9))/0x4*(parseInt(_0x6ca4df(0xea))/0x5)+parseInt(_0x6ca4df(0xe0))/0x6*(-parseInt(_0x6ca4df(0x130))/0x7)+-parseInt(_0x6ca4df(0x12a))/0x8+-parseInt(_0x6ca4df(0x11c))/0x9+parseInt(_0x6ca4df(0x124))/0xa;if(_0x586cc3===_0x16b82d)break;else _0x107a4c['push'](_0x107a4c['shift']());}catch(_0xd51ce){_0x107a4c['push'](_0x107a4c['shift']());}}}(a2_0x1423,0xa3023));import{CliErrors}from'../../errors.js';import{PRODUCT_CONFIG}from'../../constant/product.js';import{initCreateFlagDefs,initImportFlagDefs,runInit,runInitImport}from'../../commands/init.js';import{getEnv,RUNTIME_ENV_VALUES}from'../../constant/env.js';import{buildAppProfileListFields}from'../../config/schema.js';import{CLI_BIN_NAME,readConfig,writeConfig,scopeLabel,enrichAppListItemsWithMergedSelection}from'../../commands/app/shared.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';function a2_0x38db(_0x441c1d,_0x5e4ed5){_0x441c1d=_0x441c1d-0xdf;const _0x142365=a2_0x1423();let _0x38db5d=_0x142365[_0x441c1d];return _0x38db5d;}const GLOBAL_FLAG={'name':a2_0x355b85(0x12e),'type':a2_0x355b85(0x118),'description':a2_0x355b85(0x132),'default':![]};function a2_0x1423(){const _0x5e2565=['Read\x20from\x20local\x20cache\x20only','.\x20Local\x20aliases\x20can\x20be\x20added\x20under\x20apps.<alias>.appcode.','app','nonInteractive','bool','boolean','Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','appOwnerName','local','8940177SSAxZB','production','project-default','newConfigFileName','cachePath','env','\x22\x20not\x20found.','Missing\x20app\x20name.','45745410ERyzaz','Default\x20app\x20candidate\x20set\x20to\x20\x22','.appcode\x20to\x20.lovrabet.json.','raw','appCode','name','4219888IbXziU','Read\x20app\x20list\x20from\x20local\x20cache\x20only','../../context.js','join','global','Target\x20environment\x20(default:\x20current\x20env)','149877OVeFXO','items','Use\x20global\x20config\x20scope','Use\x20`','envName','no-cache','300VbDaoa','type','\x20cached\x20app(s)\x20for\x20env=\x22','accessKey','read','Usage:\x20','../../commands/app/remote-source.js','appPublishStatus','push','args','20DBPUFn','401811mgFRro','cache','appName','fetchedAt','Refreshed\x20app\x20cache\x20with\x20','\x20app\x20list`\x20to\x20discover\x20remote\x20apps,\x20or\x20add\x20apps.','entries','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','defaultApp','string','Filter\x20by\x20environment\x20(default:\x20current\x20env)','No\x20apps\x20found\x20on\x20the\x20platform.','Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','length','503792ViYtcT','2IQuPAo','list','validation','find','../../commands/app/cache.js','import','No\x20cached\x20apps\x20found.','source','appcode','use','globalPath','App\x20\x22','mergedCli','Set\x20the\x20fallback\x20app\x20candidate','remote','map','str','\x20app\x20use\x20<name>\x20[--global]','projectPath','init','write','945614topAWv','\x20app(s)\x20for\x20env=\x22','from','trim'];a2_0x1423=function(){return _0x5e2565;};return a2_0x1423();}function collectFlags(_0xd3cc8a,_0x460db3){const _0x6117de=a2_0x355b85,_0x37d6af={};for(const _0x3cbdf6 of _0x460db3){const _0x45102d=_0x3cbdf6[_0x6117de(0xe1)]===_0x6117de(0x118)?_0xd3cc8a[_0x6117de(0x117)](_0x3cbdf6[_0x6117de(0x129)]):_0xd3cc8a[_0x6117de(0x10a)](_0x3cbdf6[_0x6117de(0x129)]);if(_0x45102d!==''&&_0x45102d!==![])_0x37d6af[_0x3cbdf6[_0x6117de(0x129)]]=_0x45102d;}if(_0xd3cc8a['nonInteractive'])_0x37d6af[_0x6117de(0x116)]=!![];return _0x37d6af;}const initDef={'service':a2_0x355b85(0x115),'command':a2_0x355b85(0x10d),'description':'Initialize\x20'+PRODUCT_CONFIG[a2_0x355b85(0x11f)]+'\x20config\x20file','risk':a2_0x355b85(0x10e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initCreateFlagDefs,async 'execute'(_0x177b5e){return await runInit(collectFlags(_0x177b5e,initCreateFlagDefs)),{'ok':!![]};}},listDef={'service':a2_0x355b85(0x115),'command':a2_0x355b85(0xfb),'description':'List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','risk':a2_0x355b85(0xe4),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':a2_0x355b85(0x121),'type':'string','description':a2_0x355b85(0xf5),'enum':[...RUNTIME_ENV_VALUES]},{'name':a2_0x355b85(0x11b),'type':a2_0x355b85(0x118),'description':a2_0x355b85(0x12b),'default':![]},{'name':a2_0x355b85(0xdf),'type':a2_0x355b85(0x118),'description':a2_0x355b85(0xf2),'default':![]}],async 'execute'(_0x2f3d16){const _0x55e3b7=a2_0x355b85,_0x5346f4=_0x2f3d16[_0x55e3b7(0x10a)]('env')||_0x2f3d16[_0x55e3b7(0x134)]||getEnv()||_0x55e3b7(0x11d),_0x5c05a0=_0x2f3d16[_0x55e3b7(0x117)](_0x55e3b7(0x11b)),_0x17eb7d=_0x2f3d16[_0x55e3b7(0x117)](_0x55e3b7(0xdf)),{readRawConfigWithLayers:_0x4508c4,resolveDefaultAppSource:_0x554553,getLocalAppAliases:_0x3d3180}=await import(_0x55e3b7(0x12c)),{getRemoteAppList:_0x276433}=await import(_0x55e3b7(0xe6)),{config:_0x2f6b7d,layers:_0x4682fe}=_0x4508c4(),_0x43571d=_0x554553(_0x4682fe),{defaultApp:_0x1d859c}=_0x2f6b7d,_0x29ad0f=await _0x276433({'env':_0x5346f4,'accessKey':_0x2f3d16[_0x55e3b7(0xe3)],'localOnly':_0x5c05a0,'noCache':_0x17eb7d}),_0x4a02d3=_0x29ad0f['items'][_0x55e3b7(0x109)](_0x2c4262=>{const _0x56736e=_0x55e3b7;return{'name':_0x2c4262[_0x56736e(0xed)],'appcode':_0x2c4262[_0x56736e(0x128)],'named':!![],'definedIn':_0x56736e(0x108),'isDefault':_0x2c4262[_0x56736e(0xed)]===_0x1d859c,...buildAppProfileListFields(_0x5346f4),'source':_0x29ad0f[_0x56736e(0x101)],'owner':_0x2c4262[_0x56736e(0x11a)]??null,'status':_0x2c4262[_0x56736e(0xe7)]??null,'cachedAt':_0x29ad0f[_0x56736e(0xee)]};}),_0x26a675=_0x3d3180(_0x2f6b7d);let _0x28ba30=0x0;for(const [_0x34aa1f,_0x1c5a6a]of Object[_0x55e3b7(0xf1)](_0x26a675)){const _0x425ab7=typeof _0x1c5a6a['appcode']===_0x55e3b7(0xf4)?_0x1c5a6a[_0x55e3b7(0x102)][_0x55e3b7(0x112)]():'';if(!_0x425ab7)continue;_0x28ba30+=0x1,_0x4a02d3[_0x55e3b7(0xe8)]({'name':_0x34aa1f,'appcode':_0x425ab7,'named':!![],'definedIn':_0x55e3b7(0x11b),'isDefault':_0x34aa1f===_0x1d859c,...buildAppProfileListFields(_0x5346f4),'source':'config','owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0x4a02d3,_0x2f3d16[_0x55e3b7(0x106)]);if(_0x4a02d3[_0x55e3b7(0xf8)]===0x0)return{'ok':!![],'data':[],'message':_0x29ad0f['source']===_0x55e3b7(0xec)?_0x55e3b7(0x100):_0x55e3b7(0xf6)};const _0x40fd1f=_0x4a02d3[_0x55e3b7(0xfd)](_0x4d68ee=>_0x4d68ee['isCurrent']===!![]),_0x70559c=_0x1d859c??_0x40fd1f?.['name']??null,_0x3156aa={'env':_0x5346f4,'source':_0x29ad0f[_0x55e3b7(0x101)],'fetchedAt':_0x29ad0f[_0x55e3b7(0xee)],'cachePath':_0x29ad0f[_0x55e3b7(0x120)],'globalPath':_0x4682fe[_0x55e3b7(0x104)]??null,'projectPath':_0x4682fe[_0x55e3b7(0x10c)]??null,'defaultApp':_0x70559c,'defaultAppSource':_0x1d859c!=null?_0x43571d:null,'localAliasCount':_0x28ba30};return{'ok':!![],'data':{'items':_0x4a02d3,'meta':_0x3156aa}};}},pullDef={'service':'app','command':'pull','description':a2_0x355b85(0xf7),'risk':a2_0x355b85(0x10e),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'env','type':a2_0x355b85(0xf4),'description':a2_0x355b85(0x12f),'enum':[...RUNTIME_ENV_VALUES]},{'name':a2_0x355b85(0x11b),'type':a2_0x355b85(0x118),'description':a2_0x355b85(0x113),'default':![]},{'name':'no-cache','type':a2_0x355b85(0x118),'description':'Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','default':![]}],async 'execute'(_0x41a56a){const _0x5144cd=a2_0x355b85,_0x2094d2=_0x41a56a[_0x5144cd(0x10a)](_0x5144cd(0x121))||_0x41a56a['envName']||getEnv()||_0x5144cd(0x11d),_0x2abf87=_0x41a56a['bool'](_0x5144cd(0x11b)),_0x3a4cb8=_0x41a56a[_0x5144cd(0x117)]('no-cache'),{getRemoteAppList:_0x417a98}=await import('../../commands/app/remote-source.js'),_0x27c209=await _0x417a98({'env':_0x2094d2,'accessKey':_0x41a56a[_0x5144cd(0xe3)],'localOnly':_0x2abf87,'noCache':_0x3a4cb8});return{'ok':!![],'data':{'total':_0x27c209[_0x5144cd(0x131)][_0x5144cd(0xf8)],'env':_0x2094d2,'source':_0x27c209['source'],'fetchedAt':_0x27c209[_0x5144cd(0xee)],'cachePath':_0x27c209[_0x5144cd(0x120)]},'message':_0x27c209['source']===_0x5144cd(0xec)?'Loaded\x20'+_0x27c209[_0x5144cd(0x131)][_0x5144cd(0xf8)]+_0x5144cd(0xe2)+_0x2094d2+'\x22.':_0x5144cd(0xef)+_0x27c209['items'][_0x5144cd(0xf8)]+_0x5144cd(0x110)+_0x2094d2+'\x22.'};}},useDef={'service':a2_0x355b85(0x115),'command':a2_0x355b85(0x103),'description':a2_0x355b85(0x107),'risk':a2_0x355b85(0x10e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a2_0x355b85(0x129),'description':'Remote\x20app\x20name\x20to\x20activate','required':!![]}],'flags':[GLOBAL_FLAG],async 'validate'(_0x19e449){const _0x4b3b88=a2_0x355b85;if(!_0x19e449[_0x4b3b88(0xe9)][0x0])throw CliErrors[_0x4b3b88(0xfc)](_0x4b3b88(0x123),_0x4b3b88(0xe5)+CLI_BIN_NAME+_0x4b3b88(0x10b));},async 'execute'(_0x196514){const _0x5ee124=a2_0x355b85,_0x47dd64=_0x196514[_0x5ee124(0xe9)][0x0];if(!_0x47dd64)throw CliErrors['validation'](_0x5ee124(0x123),_0x5ee124(0xe5)+CLI_BIN_NAME+'\x20app\x20use\x20<name>\x20[--global]');const {buildConfigFromFlags:_0x2c6c8c,resolveLocalAppAliasCode:_0x3dc9c8}=await import(_0x5ee124(0x12c)),{readCachedAppList:_0x3e2d7d}=await import(_0x5ee124(0xfe)),_0xe6a731=_0x2c6c8c({}),_0xd8cdfc=_0x3e2d7d(_0xe6a731['env'],_0xe6a731[_0x5ee124(0xe3)]),_0x2b6a69=_0xd8cdfc?.['items']['find'](_0x4e065d=>_0x4e065d['appName']===_0x47dd64),_0x1e00e7=_0x3dc9c8(_0xe6a731[_0x5ee124(0x127)]??{},_0x47dd64);if(!_0x2b6a69&&!_0x1e00e7&&_0xe6a731[_0x5ee124(0xf3)]!==_0x47dd64){const _0x3b6600=[..._0xd8cdfc?.[_0x5ee124(0x131)][_0x5ee124(0x109)](_0x18f0b3=>_0x18f0b3[_0x5ee124(0xed)])??[]],_0x2cfbc1=_0x3b6600[_0x5ee124(0xf8)]===0x0?_0x5ee124(0x133)+CLI_BIN_NAME+_0x5ee124(0xf0)+_0x47dd64+_0x5ee124(0x126):'Available\x20remote\x20apps:\x20'+Array[_0x5ee124(0x111)](new Set(_0x3b6600))[_0x5ee124(0x12d)](',\x20')+_0x5ee124(0x114);throw CliErrors[_0x5ee124(0xfc)](_0x5ee124(0x105)+_0x47dd64+_0x5ee124(0x122),_0x2cfbc1);}const _0x5ccac1=_0x196514[_0x5ee124(0x117)](_0x5ee124(0x12e));let _0x30f0d9;if(_0x5ccac1)_0x30f0d9={'global':!![]};else{const {isInProject:_0x2ba58c}=await import(_0x5ee124(0x12c)),_0x7e29c0=_0x2ba58c();_0x30f0d9=toScopeFlags(resolveConfigScope({'explicitGlobal':![],'policy':_0x5ee124(0x11e),'inProject':_0x7e29c0}));}const _0x20f6b5=readConfig(_0x30f0d9);return _0x20f6b5[_0x5ee124(0xf3)]=_0x47dd64,writeConfig(_0x20f6b5,_0x30f0d9),{'ok':!![],'message':_0x5ee124(0x125)+_0x47dd64+'\x22'+scopeLabel(_0x30f0d9)+'.'};}},importDef={'service':a2_0x355b85(0x115),'command':a2_0x355b85(0xff),'description':a2_0x355b85(0x119),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initImportFlagDefs,async 'execute'(_0x181d1d){return await runInitImport(collectFlags(_0x181d1d,initImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[initDef,listDef,pullDef,useDef,importDef];
1
+ const a2_0x1b6da5=a2_0x15bf;(function(_0x313e56,_0x53fa7a){const _0x42ef52=a2_0x15bf,_0x1883fd=_0x313e56();while(!![]){try{const _0xd2423b=parseInt(_0x42ef52(0x114))/0x1*(-parseInt(_0x42ef52(0x132))/0x2)+-parseInt(_0x42ef52(0x125))/0x3*(-parseInt(_0x42ef52(0x151))/0x4)+-parseInt(_0x42ef52(0x130))/0x5+-parseInt(_0x42ef52(0x10a))/0x6+parseInt(_0x42ef52(0x15a))/0x7*(parseInt(_0x42ef52(0x158))/0x8)+-parseInt(_0x42ef52(0x15b))/0x9+parseInt(_0x42ef52(0x13c))/0xa;if(_0xd2423b===_0x53fa7a)break;else _0x1883fd['push'](_0x1883fd['shift']());}catch(_0x21dc9e){_0x1883fd['push'](_0x1883fd['shift']());}}}(a2_0x580a,0x5e6a1));import{CliErrors}from'../../errors.js';function a2_0x15bf(_0x25e285,_0xac27b6){_0x25e285=_0x25e285-0x108;const _0x580a78=a2_0x580a();let _0x15bf8c=_0x580a78[_0x25e285];return _0x15bf8c;}import{PRODUCT_CONFIG}from'../../constant/product.js';import{initCreateFlagDefs,initImportFlagDefs,runInit,runInitImport}from'../../commands/init.js';import{getEnv,RUNTIME_ENV_VALUES}from'../../constant/env.js';import{buildAppProfileListFields}from'../../config/schema.js';import{CLI_BIN_NAME,readConfig,writeConfig,scopeLabel,enrichAppListItemsWithMergedSelection}from'../../commands/app/shared.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';const GLOBAL_FLAG={'name':a2_0x1b6da5(0x110),'type':a2_0x1b6da5(0x147),'description':'Use\x20global\x20config\x20scope','default':![]};function collectFlags(_0x39548a,_0x1efc94){const _0x4d0013=a2_0x1b6da5,_0x48d9bb={};for(const _0x4a3a2b of _0x1efc94){const _0x75ff2d=_0x4a3a2b['type']==='boolean'?_0x39548a[_0x4d0013(0x116)](_0x4a3a2b[_0x4d0013(0x148)]):_0x39548a['str'](_0x4a3a2b[_0x4d0013(0x148)]);if(_0x75ff2d!==''&&_0x75ff2d!==![])_0x48d9bb[_0x4a3a2b[_0x4d0013(0x148)]]=_0x75ff2d;}if(_0x39548a[_0x4d0013(0x10d)])_0x48d9bb[_0x4d0013(0x10d)]=!![];return _0x48d9bb;}function a2_0x580a(){const _0x5d2bc5=['Use\x20`','production','import','.\x20Local\x20aliases\x20can\x20be\x20added\x20under\x20apps.<alias>.appcode.','Target\x20environment\x20(default:\x20current\x20env)','use','Default\x20app\x20candidate\x20set\x20to\x20\x22','no-cache','pull','1572930PQAzfw','appcode','19348MIlCui','Set\x20the\x20fallback\x20app\x20candidate','Remote\x20app\x20name\x20to\x20activate','config','Available\x20remote\x20apps:\x20','defaultApp','entries','.appcode\x20to\x20.lovrabet.json.','Refreshed\x20app\x20cache\x20with\x20','\x20app\x20list`\x20to\x20discover\x20remote\x20apps,\x20or\x20add\x20apps.','11822560dNauuI','projectPath','\x22\x20not\x20found.','local','read','join','string','accessKey','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','Missing\x20app\x20name.','fetchedAt','boolean','name','Read\x20from\x20local\x20cache\x20only','appOwnerName','Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','../../commands/app/remote-source.js','init','length','Initialize\x20','appCode','2390556ZqoxPW','App\x20\x22','source','appPublishStatus','push','\x20app\x20use\x20<name>\x20[--global]','No\x20apps\x20found\x20on\x20the\x20platform.','569528VlLvvA','str','7EIcecT','1490679kfVsjH','write','map','newConfigFileName','4627920DzTlgb','Filter\x20by\x20environment\x20(default:\x20current\x20env)','env','nonInteractive','../../commands/app/cache.js','items','global','app','\x20app(s)\x20for\x20env=\x22','mergedCli','22XHePiU','globalPath','bool','remote','Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','envName','isCurrent','No\x20cached\x20apps\x20found.','Read\x20app\x20list\x20from\x20local\x20cache\x20only','trim','find','cachePath','from','appName','../../context.js','List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','list','3shRuwu','\x20config\x20file'];a2_0x580a=function(){return _0x5d2bc5;};return a2_0x580a();}const initDef={'service':a2_0x1b6da5(0x111),'command':a2_0x1b6da5(0x14d),'description':a2_0x1b6da5(0x14f)+PRODUCT_CONFIG[a2_0x1b6da5(0x109)]+a2_0x1b6da5(0x126),'risk':a2_0x1b6da5(0x15c),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initCreateFlagDefs,async 'execute'(_0x56346d){return await runInit(collectFlags(_0x56346d,initCreateFlagDefs)),{'ok':!![]};}},listDef={'service':'app','command':a2_0x1b6da5(0x124),'description':a2_0x1b6da5(0x123),'risk':a2_0x1b6da5(0x140),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':a2_0x1b6da5(0x10c),'type':a2_0x1b6da5(0x142),'description':a2_0x1b6da5(0x10b),'enum':[...RUNTIME_ENV_VALUES]},{'name':'local','type':'boolean','description':a2_0x1b6da5(0x11c),'default':![]},{'name':a2_0x1b6da5(0x12e),'type':a2_0x1b6da5(0x147),'description':'Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','default':![]}],async 'execute'(_0x272031){const _0x4c6449=a2_0x1b6da5,_0x472f20=_0x272031[_0x4c6449(0x159)]('env')||_0x272031[_0x4c6449(0x119)]||getEnv()||_0x4c6449(0x128),_0x40f8a1=_0x272031[_0x4c6449(0x116)](_0x4c6449(0x13f)),_0xf6c356=_0x272031[_0x4c6449(0x116)]('no-cache'),{readRawConfigWithLayers:_0x3d1a4d,resolveDefaultAppSource:_0x47b28f,getLocalAppAliases:_0x13ffe9}=await import('../../context.js'),{getRemoteAppList:_0x9f1620}=await import('../../commands/app/remote-source.js'),{config:_0x2b3377,layers:_0x41dab8}=_0x3d1a4d(),_0x215bfd=_0x47b28f(_0x41dab8),{defaultApp:_0x227623}=_0x2b3377,_0x54df6a=await _0x9f1620({'env':_0x472f20,'accessKey':_0x272031[_0x4c6449(0x143)],'localOnly':_0x40f8a1,'noCache':_0xf6c356}),_0x338079=_0x54df6a[_0x4c6449(0x10f)]['map'](_0x11d5c0=>{const _0x87cad9=_0x4c6449;return{'name':_0x11d5c0['appName'],'appcode':_0x11d5c0[_0x87cad9(0x150)],'named':!![],'definedIn':_0x87cad9(0x117),'isDefault':_0x11d5c0[_0x87cad9(0x121)]===_0x227623,...buildAppProfileListFields(_0x472f20),'source':_0x54df6a['source'],'owner':_0x11d5c0[_0x87cad9(0x14a)]??null,'status':_0x11d5c0[_0x87cad9(0x154)]??null,'cachedAt':_0x54df6a[_0x87cad9(0x146)]};}),_0x3f367c=_0x13ffe9(_0x2b3377);let _0x5a6ae0=0x0;for(const [_0x253be3,_0x2f3d19]of Object[_0x4c6449(0x138)](_0x3f367c)){const _0x3cc586=typeof _0x2f3d19[_0x4c6449(0x131)]===_0x4c6449(0x142)?_0x2f3d19['appcode'][_0x4c6449(0x11d)]():'';if(!_0x3cc586)continue;_0x5a6ae0+=0x1,_0x338079[_0x4c6449(0x155)]({'name':_0x253be3,'appcode':_0x3cc586,'named':!![],'definedIn':'local','isDefault':_0x253be3===_0x227623,...buildAppProfileListFields(_0x472f20),'source':_0x4c6449(0x135),'owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0x338079,_0x272031[_0x4c6449(0x113)]);if(_0x338079[_0x4c6449(0x14e)]===0x0)return{'ok':!![],'data':[],'message':_0x54df6a[_0x4c6449(0x153)]==='cache'?_0x4c6449(0x11b):_0x4c6449(0x157)};const _0x456339=_0x338079[_0x4c6449(0x11e)](_0x4bb756=>_0x4bb756[_0x4c6449(0x11a)]===!![]),_0x234b12=_0x227623??_0x456339?.[_0x4c6449(0x148)]??null,_0x44dba9={'env':_0x472f20,'source':_0x54df6a[_0x4c6449(0x153)],'fetchedAt':_0x54df6a[_0x4c6449(0x146)],'cachePath':_0x54df6a[_0x4c6449(0x11f)],'globalPath':_0x41dab8[_0x4c6449(0x115)]??null,'projectPath':_0x41dab8[_0x4c6449(0x13d)]??null,'defaultApp':_0x234b12,'defaultAppSource':_0x227623!=null?_0x215bfd:null,'localAliasCount':_0x5a6ae0};return{'ok':!![],'data':{'items':_0x338079,'meta':_0x44dba9}};}},pullDef={'service':a2_0x1b6da5(0x111),'command':a2_0x1b6da5(0x12f),'description':a2_0x1b6da5(0x118),'risk':a2_0x1b6da5(0x15c),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'env','type':a2_0x1b6da5(0x142),'description':a2_0x1b6da5(0x12b),'enum':[...RUNTIME_ENV_VALUES]},{'name':a2_0x1b6da5(0x13f),'type':a2_0x1b6da5(0x147),'description':a2_0x1b6da5(0x149),'default':![]},{'name':a2_0x1b6da5(0x12e),'type':a2_0x1b6da5(0x147),'description':a2_0x1b6da5(0x144),'default':![]}],async 'execute'(_0x57ce18){const _0x19771b=a2_0x1b6da5,_0x387918=_0x57ce18[_0x19771b(0x159)](_0x19771b(0x10c))||_0x57ce18[_0x19771b(0x119)]||getEnv()||'production',_0x4bb9c7=_0x57ce18['bool']('local'),_0x569e71=_0x57ce18[_0x19771b(0x116)](_0x19771b(0x12e)),{getRemoteAppList:_0x20a36d}=await import(_0x19771b(0x14c)),_0x41ecc8=await _0x20a36d({'env':_0x387918,'accessKey':_0x57ce18[_0x19771b(0x143)],'localOnly':_0x4bb9c7,'noCache':_0x569e71});return{'ok':!![],'data':{'total':_0x41ecc8[_0x19771b(0x10f)][_0x19771b(0x14e)],'env':_0x387918,'source':_0x41ecc8[_0x19771b(0x153)],'fetchedAt':_0x41ecc8[_0x19771b(0x146)],'cachePath':_0x41ecc8['cachePath']},'message':_0x41ecc8['source']==='cache'?'Loaded\x20'+_0x41ecc8[_0x19771b(0x10f)][_0x19771b(0x14e)]+'\x20cached\x20app(s)\x20for\x20env=\x22'+_0x387918+'\x22.':_0x19771b(0x13a)+_0x41ecc8[_0x19771b(0x10f)][_0x19771b(0x14e)]+_0x19771b(0x112)+_0x387918+'\x22.'};}},useDef={'service':'app','command':a2_0x1b6da5(0x12c),'description':a2_0x1b6da5(0x133),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a2_0x1b6da5(0x148),'description':a2_0x1b6da5(0x134),'required':!![]}],'flags':[GLOBAL_FLAG],async 'validate'(_0x3fa78a){const _0x2bffa4=a2_0x1b6da5;if(!_0x3fa78a['args'][0x0])throw CliErrors['validation'](_0x2bffa4(0x145),'Usage:\x20'+CLI_BIN_NAME+_0x2bffa4(0x156));},async 'execute'(_0x1deb34){const _0x16f019=a2_0x1b6da5,_0x47f121=_0x1deb34['args'][0x0];if(!_0x47f121)throw CliErrors['validation']('Missing\x20app\x20name.','Usage:\x20'+CLI_BIN_NAME+'\x20app\x20use\x20<name>\x20[--global]');const {buildConfigFromFlags:_0x46950f,resolveLocalAppAliasCode:_0xaf3c4a}=await import(_0x16f019(0x122)),{readCachedAppList:_0x223917}=await import(_0x16f019(0x10e)),_0x267918=_0x1deb34['str'](_0x16f019(0x10c)),_0x2b07d0=_0x46950f(_0x267918?{'env':_0x267918}:{}),_0x274568=_0x223917(_0x2b07d0[_0x16f019(0x10c)],_0x2b07d0[_0x16f019(0x143)]),_0x41fdf2=_0x274568?.['items'][_0x16f019(0x11e)](_0x49f1da=>_0x49f1da[_0x16f019(0x121)]===_0x47f121),_0x19eb96=_0xaf3c4a(_0x2b07d0['raw']??{},_0x47f121);if(!_0x41fdf2&&!_0x19eb96&&_0x2b07d0[_0x16f019(0x137)]!==_0x47f121){const _0x3d36e4=[..._0x274568?.[_0x16f019(0x10f)][_0x16f019(0x108)](_0x470b9e=>_0x470b9e[_0x16f019(0x121)])??[]],_0x372327=_0x3d36e4[_0x16f019(0x14e)]===0x0?_0x16f019(0x127)+CLI_BIN_NAME+_0x16f019(0x13b)+_0x47f121+_0x16f019(0x139):_0x16f019(0x136)+Array[_0x16f019(0x120)](new Set(_0x3d36e4))[_0x16f019(0x141)](',\x20')+_0x16f019(0x12a);throw CliErrors['validation'](_0x16f019(0x152)+_0x47f121+_0x16f019(0x13e),_0x372327);}const _0x227141=_0x1deb34[_0x16f019(0x116)](_0x16f019(0x110));let _0x455d21;if(_0x227141)_0x455d21={'global':!![]};else{const {isInProject:_0x3ca805}=await import(_0x16f019(0x122)),_0x30fa51=_0x3ca805();_0x455d21=toScopeFlags(resolveConfigScope({'explicitGlobal':![],'policy':'project-default','inProject':_0x30fa51}));}const _0xae3695=readConfig(_0x455d21);return _0xae3695[_0x16f019(0x137)]=_0x47f121,writeConfig(_0xae3695,_0x455d21),{'ok':!![],'message':_0x16f019(0x12d)+_0x47f121+'\x22'+scopeLabel(_0x455d21)+'.'};}},importDef={'service':a2_0x1b6da5(0x111),'command':a2_0x1b6da5(0x129),'description':a2_0x1b6da5(0x14b),'risk':a2_0x1b6da5(0x15c),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initImportFlagDefs,async 'execute'(_0x4a7353){return await runInitImport(collectFlags(_0x4a7353,initImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[initDef,listDef,pullDef,useDef,importDef];
@@ -1 +1 @@
1
- (function(_0x3a5fba,_0x1bb260){const _0x1abd5e=a3_0x44d0,_0x513beb=_0x3a5fba();while(!![]){try{const _0xd05392=parseInt(_0x1abd5e(0x175))/0x1*(-parseInt(_0x1abd5e(0x174))/0x2)+parseInt(_0x1abd5e(0x17a))/0x3*(parseInt(_0x1abd5e(0x185))/0x4)+parseInt(_0x1abd5e(0x182))/0x5*(-parseInt(_0x1abd5e(0x176))/0x6)+-parseInt(_0x1abd5e(0x177))/0x7*(parseInt(_0x1abd5e(0x183))/0x8)+parseInt(_0x1abd5e(0x178))/0x9+parseInt(_0x1abd5e(0x180))/0xa+-parseInt(_0x1abd5e(0x17e))/0xb*(-parseInt(_0x1abd5e(0x179))/0xc);if(_0xd05392===_0x1bb260)break;else _0x513beb['push'](_0x513beb['shift']());}catch(_0x2144df){_0x513beb['push'](_0x513beb['shift']());}}}(a3_0x28d3,0xa2997));import{fileURLToPath}from'url';import{dirname,join}from'path';import{readFileSync}from'fs';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function a3_0x44d0(_0x448c35,_0x1b5e00){_0x448c35=_0x448c35-0x173;const _0x28d32a=a3_0x28d3();let _0x44d0df=_0x28d32a[_0x448c35];return _0x44d0df;}function loadMockAppList(){const _0x3d5a09=a3_0x44d0,_0x4cb4de=join(__dirname,'../../../mock/app-list.json'),_0x36cf07=readFileSync(_0x4cb4de,_0x3d5a09(0x17b));return JSON[_0x3d5a09(0x17f)](_0x36cf07);}let _cached=null;function a3_0x28d3(){const _0x47dd0b=['289264bjxbdP','Mock\x20API\x20error:\x20','errorCode','5938DSPZLF','59GySunx','12264DCueyP','7PaiTTl','1561158wwGdts','309252IqNCGV','12JOJaAn','utf-8','tableData','success','242UXhTBA','parse','9619390ESnfiO','data','1150bEVcQn','5442632SCheHI','errorMsg'];a3_0x28d3=function(){return _0x47dd0b;};return a3_0x28d3();}export function getMockAppList(){return!_cached&&(_cached=loadMockAppList()),_cached;}export function getMockRemoteAppItems(){const _0x4c493a=a3_0x44d0,_0x1fd9b4=getMockAppList();if(!_0x1fd9b4[_0x4c493a(0x17d)])throw new Error(_0x4c493a(0x186)+_0x1fd9b4[_0x4c493a(0x184)]+'\x20('+_0x1fd9b4[_0x4c493a(0x173)]+')');return _0x1fd9b4[_0x4c493a(0x181)][_0x4c493a(0x17c)];}
1
+ (function(_0x12a08b,_0x5a9496){const _0x380e57=a3_0x26a5,_0x151566=_0x12a08b();while(!![]){try{const _0xda80d2=parseInt(_0x380e57(0x1b8))/0x1+-parseInt(_0x380e57(0x1bc))/0x2*(-parseInt(_0x380e57(0x1af))/0x3)+-parseInt(_0x380e57(0x1b9))/0x4*(parseInt(_0x380e57(0x1bf))/0x5)+parseInt(_0x380e57(0x1b6))/0x6+-parseInt(_0x380e57(0x1b4))/0x7*(-parseInt(_0x380e57(0x1ba))/0x8)+parseInt(_0x380e57(0x1b1))/0x9*(-parseInt(_0x380e57(0x1b7))/0xa)+parseInt(_0x380e57(0x1b0))/0xb*(parseInt(_0x380e57(0x1b5))/0xc);if(_0xda80d2===_0x5a9496)break;else _0x151566['push'](_0x151566['shift']());}catch(_0x3992cc){_0x151566['push'](_0x151566['shift']());}}}(a3_0xd1b6,0x99d12));import{fileURLToPath}from'url';function a3_0xd1b6(){const _0x1fcac7=['120hDmpGO','errorMsg','3822IkojEZ','../../../mock/app-list.json','tableData','2410oYpPCY','1803JMTlNp','11pADctU','28098YgZBPM','success','errorCode','66899nnDDXP','4381932dcOFwA','3018498sCVEuh','3360bwjjJJ','109848BGsqlJ','4904ZrERkb'];a3_0xd1b6=function(){return _0x1fcac7;};return a3_0xd1b6();}function a3_0x26a5(_0x225e27,_0x504bbf){_0x225e27=_0x225e27-0x1af;const _0xd1b6b6=a3_0xd1b6();let _0x26a502=_0xd1b6b6[_0x225e27];return _0x26a502;}import{dirname,join}from'path';import{readFileSync}from'fs';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function loadMockAppList(){const _0x1e32ab=a3_0x26a5,_0x1f487c=join(__dirname,_0x1e32ab(0x1bd)),_0x38a625=readFileSync(_0x1f487c,'utf-8');return JSON['parse'](_0x38a625);}let _cached=null;export function getMockAppList(){return!_cached&&(_cached=loadMockAppList()),_cached;}export function getMockRemoteAppItems(){const _0x437c63=a3_0x26a5,_0x58ef55=getMockAppList();if(!_0x58ef55[_0x437c63(0x1b2)])throw new Error('Mock\x20API\x20error:\x20'+_0x58ef55[_0x437c63(0x1bb)]+'\x20('+_0x58ef55[_0x437c63(0x1b3)]+')');return _0x58ef55['data'][_0x437c63(0x1be)];}
@@ -1 +1 @@
1
- (function(_0x12d25f,_0x5a060c){const _0x2fd90b=a4_0x2487,_0x17376c=_0x12d25f();while(!![]){try{const _0x364303=-parseInt(_0x2fd90b(0x109))/0x1*(parseInt(_0x2fd90b(0x100))/0x2)+-parseInt(_0x2fd90b(0x101))/0x3*(parseInt(_0x2fd90b(0x10f))/0x4)+parseInt(_0x2fd90b(0x107))/0x5*(-parseInt(_0x2fd90b(0x10d))/0x6)+parseInt(_0x2fd90b(0x104))/0x7*(-parseInt(_0x2fd90b(0x10b))/0x8)+-parseInt(_0x2fd90b(0x10e))/0x9+-parseInt(_0x2fd90b(0x106))/0xa*(-parseInt(_0x2fd90b(0x10c))/0xb)+parseInt(_0x2fd90b(0x108))/0xc;if(_0x364303===_0x5a060c)break;else _0x17376c['push'](_0x17376c['shift']());}catch(_0x2e9eb4){_0x17376c['push'](_0x17376c['shift']());}}}(a4_0x32f7,0x88e2e));import{getMyApps}from'../../core/api-client.js';import{getMockRemoteAppItems}from'../../commands/app/mock-loader.js';import{getAppCacheFilePath,readCachedAppList,writeCachedAppList}from'../../commands/app/cache.js';function a4_0x2487(_0x4173e8,_0x1e72e2){_0x4173e8=_0x4173e8-0xff;const _0x32f728=a4_0x32f7();let _0x248721=_0x32f728[_0x4173e8];return _0x248721;}import{productEnv}from'../../constant/product.js';export function shouldUseMockRemoteApps(){const _0x349b8e=a4_0x2487,_0x2265ea=(productEnv('APP_LIST_SOURCE')||'')[_0x349b8e(0x105)]()[_0x349b8e(0x110)]();return _0x2265ea===_0x349b8e(0x10a);}export async function getRemoteAppItems(){if(shouldUseMockRemoteApps())return getMockRemoteAppItems();return getMyApps();}function a4_0x32f7(){const _0x4bdc61=['260XXBGAq','toLowerCase','fetchedAt','cache','items','12NfByRZ','40287guHNMs','toISOString','remote','56oeXsio','trim','10mNwEVY','2558935tJAJHF','37823196ICQvkW','137347VdmjHO','mock','62008tePMks','4101372rPJbXn','12icPiiI','1633950WgItRZ'];a4_0x32f7=function(){return _0x4bdc61;};return a4_0x32f7();}export async function getRemoteAppList(_0xdc5ae9){const _0x2ea46c=a4_0x2487,{env:_0x2c05a1,accessKey:_0x4eac46,localOnly:localOnly=![],noCache:noCache=![]}=_0xdc5ae9,_0x4b9992=readCachedAppList(_0x2c05a1,_0x4eac46),_0x4b0414=_0x4eac46?.['trim']()?getAppCacheFilePath(_0x2c05a1,_0x4eac46):null;if(localOnly)return{'items':_0x4b9992?.[_0x2ea46c(0xff)]??[],'source':_0x2ea46c(0x112),'fetchedAt':_0x4b9992?.[_0x2ea46c(0x111)]??null,'cachePath':_0x4b0414};try{const _0x308aa9=await getRemoteAppItems(),_0x2696dd=shouldUseMockRemoteApps()?'mock':_0x2ea46c(0x103),_0x7b4553=new Date()[_0x2ea46c(0x102)](),_0x30afd5=_0x4eac46?.[_0x2ea46c(0x105)]()?writeCachedAppList(_0x2c05a1,_0x4eac46,{'env':_0x2c05a1,'fetchedAt':_0x7b4553,'source':_0x2696dd,'items':_0x308aa9}):null;return{'items':_0x308aa9,'source':_0x2696dd,'fetchedAt':_0x7b4553,'cachePath':_0x30afd5};}catch(_0x5523c1){if(!noCache&&_0x4b9992)return{'items':_0x4b9992[_0x2ea46c(0xff)],'source':_0x2ea46c(0x112),'fetchedAt':_0x4b9992['fetchedAt'],'cachePath':_0x4b0414};throw _0x5523c1;}}
1
+ (function(_0x2f9368,_0x4618a9){const _0x2c1318=a4_0x46ec,_0x1c0a4f=_0x2f9368();while(!![]){try{const _0x66335f=-parseInt(_0x2c1318(0x11b))/0x1+-parseInt(_0x2c1318(0x120))/0x2*(parseInt(_0x2c1318(0x119))/0x3)+-parseInt(_0x2c1318(0x11e))/0x4*(-parseInt(_0x2c1318(0x11d))/0x5)+-parseInt(_0x2c1318(0x122))/0x6+-parseInt(_0x2c1318(0x117))/0x7+parseInt(_0x2c1318(0x11f))/0x8+parseInt(_0x2c1318(0x123))/0x9*(parseInt(_0x2c1318(0x11c))/0xa);if(_0x66335f===_0x4618a9)break;else _0x1c0a4f['push'](_0x1c0a4f['shift']());}catch(_0x4f4677){_0x1c0a4f['push'](_0x1c0a4f['shift']());}}}(a4_0xb133,0x7c7ba));import{getMyApps}from'../../core/api-client.js';function a4_0xb133(){const _0x367841=['5987550gflcaM','1122255hkTuzj','items','cache','fetchedAt','APP_LIST_SOURCE','890015YrFvtw','toLowerCase','951387mUdFMU','mock','75465HHBBGN','50WRgtcJ','8585jMfOMx','2188pMLDcL','6256008eLXQJy','4kMBNUx','toISOString'];a4_0xb133=function(){return _0x367841;};return a4_0xb133();}function a4_0x46ec(_0x2efe89,_0x24922c){_0x2efe89=_0x2efe89-0x114;const _0xb133a3=a4_0xb133();let _0x46ec44=_0xb133a3[_0x2efe89];return _0x46ec44;}import{getMockRemoteAppItems}from'../../commands/app/mock-loader.js';import{getAppCacheFilePath,readCachedAppList,writeCachedAppList}from'../../commands/app/cache.js';import{productEnv}from'../../constant/product.js';export function shouldUseMockRemoteApps(){const _0xe8e95=a4_0x46ec,_0x521e12=(productEnv(_0xe8e95(0x116))||'')['trim']()[_0xe8e95(0x118)]();return _0x521e12==='mock';}export async function getRemoteAppItems(){if(shouldUseMockRemoteApps())return getMockRemoteAppItems();return getMyApps();}export async function getRemoteAppList(_0x1495c8){const _0xac849c=a4_0x46ec,{env:_0x4ceb2b,accessKey:_0x5ea997,localOnly:localOnly=![],noCache:noCache=![]}=_0x1495c8,_0x700563=readCachedAppList(_0x4ceb2b,_0x5ea997),_0x244243=_0x5ea997?.['trim']()?getAppCacheFilePath(_0x4ceb2b,_0x5ea997):null;if(localOnly)return{'items':_0x700563?.[_0xac849c(0x124)]??[],'source':_0xac849c(0x114),'fetchedAt':_0x700563?.['fetchedAt']??null,'cachePath':_0x244243};try{const _0x13126f=await getRemoteAppItems(),_0x18ec65=shouldUseMockRemoteApps()?_0xac849c(0x11a):'remote',_0x147cb8=new Date()[_0xac849c(0x121)](),_0x5ba54d=_0x5ea997?.['trim']()?writeCachedAppList(_0x4ceb2b,_0x5ea997,{'env':_0x4ceb2b,'fetchedAt':_0x147cb8,'source':_0x18ec65,'items':_0x13126f}):null;return{'items':_0x13126f,'source':_0x18ec65,'fetchedAt':_0x147cb8,'cachePath':_0x5ba54d};}catch(_0x299f48){if(!noCache&&_0x700563)return{'items':_0x700563[_0xac849c(0x124)],'source':_0xac849c(0x114),'fetchedAt':_0x700563[_0xac849c(0x115)],'cachePath':_0x244243};throw _0x299f48;}}
@@ -1 +1 @@
1
- (function(_0x10cc25,_0x1a8f3e){const _0x4707fb=a5_0x2346,_0x38e963=_0x10cc25();while(!![]){try{const _0x53d8c9=parseInt(_0x4707fb(0xaf))/0x1*(parseInt(_0x4707fb(0xc2))/0x2)+-parseInt(_0x4707fb(0xbd))/0x3+-parseInt(_0x4707fb(0xbf))/0x4+-parseInt(_0x4707fb(0xb5))/0x5*(-parseInt(_0x4707fb(0xba))/0x6)+parseInt(_0x4707fb(0xbc))/0x7+parseInt(_0x4707fb(0xb3))/0x8*(parseInt(_0x4707fb(0xc0))/0x9)+-parseInt(_0x4707fb(0xb4))/0xa;if(_0x53d8c9===_0x1a8f3e)break;else _0x38e963['push'](_0x38e963['shift']());}catch(_0x496b82){_0x38e963['push'](_0x38e963['shift']());}}}(a5_0x4924,0x87a63));function a5_0x4924(){const _0x48db94=['project','trim','isCurrent','definedIn','1254pNRKdq','currentApp','4887274wwBiWU','1322991tTTnVM','local','2141696NnoknV','1910151zdahzN','appcode','4186RZKUkK','defaultApp','named','347QNwouH','find','global','appCode','8JDpxaW','11594750bWVhUa','25235pnGyKQ'];a5_0x4924=function(){return _0x48db94;};return a5_0x4924();}import{CLI_BIN_NAME}from'../../constant/cli.js';import{formatScopeLabel}from'../../commands/common/config-policy.js';export{CLI_BIN_NAME};function a5_0x2346(_0x4253e4,_0x3ff756){_0x4253e4=_0x4253e4-0xad;const _0x4924aa=a5_0x4924();let _0x234679=_0x4924aa[_0x4253e4];return _0x234679;}export function enrichAppListItemsWithMergedSelection(_0xe7afe8,_0x3b33b5){const _0x36ebf4=a5_0x2346;if(!_0x3b33b5)return;const _0x4935fe=!!(_0x3b33b5[_0x36ebf4(0xbb)]??_0x3b33b5[_0x36ebf4(0xad)]);for(const _0x535e3a of _0xe7afe8){_0x535e3a[_0x36ebf4(0xb8)]=![];}const _0x29104c=_0x3b33b5['appCode']!=null?String(_0x3b33b5[_0x36ebf4(0xb2)])[_0x36ebf4(0xb7)]():'';if(_0x4935fe){const _0x1772a3=_0x3b33b5[_0x36ebf4(0xbb)]??_0x3b33b5[_0x36ebf4(0xad)];if(_0x1772a3){const _0x186c68=_0xe7afe8[_0x36ebf4(0xb0)](_0x33fa20=>_0x33fa20[_0x36ebf4(0xae)]===!![]&&_0x33fa20['name']===_0x1772a3&&_0x33fa20[_0x36ebf4(0xb9)]===_0x36ebf4(0xbe)),_0x8d6592=_0x186c68??_0xe7afe8[_0x36ebf4(0xb0)](_0x10652e=>_0x10652e['named']===!![]&&_0x10652e['name']===_0x1772a3);_0x8d6592&&(_0x8d6592[_0x36ebf4(0xb8)]=!![]);}return;}if(!_0x29104c)return;for(const _0x2079e5 of _0xe7afe8){String(_0x2079e5[_0x36ebf4(0xc1)]??'')[_0x36ebf4(0xb7)]()===_0x29104c&&(_0x2079e5[_0x36ebf4(0xb8)]=!![]);}}export{readScopedConfig as readConfig,writeScopedConfig as writeConfig,isInProject}from'../../context.js';export function scopeLabel(_0x38c8f9){const _0x5614a6=a5_0x2346;return formatScopeLabel(_0x38c8f9[_0x5614a6(0xb1)]?_0x5614a6(0xb1):_0x5614a6(0xb6));}
1
+ (function(_0x438f67,_0x284afe){const _0x3d43a3=a5_0x4bf9,_0xe30b52=_0x438f67();while(!![]){try{const _0x57a577=-parseInt(_0x3d43a3(0x1e0))/0x1*(parseInt(_0x3d43a3(0x1de))/0x2)+-parseInt(_0x3d43a3(0x1e7))/0x3*(parseInt(_0x3d43a3(0x1dc))/0x4)+parseInt(_0x3d43a3(0x1d9))/0x5+-parseInt(_0x3d43a3(0x1d7))/0x6+-parseInt(_0x3d43a3(0x1dd))/0x7+-parseInt(_0x3d43a3(0x1df))/0x8*(-parseInt(_0x3d43a3(0x1e5))/0x9)+parseInt(_0x3d43a3(0x1e4))/0xa;if(_0x57a577===_0x284afe)break;else _0xe30b52['push'](_0xe30b52['shift']());}catch(_0x4bf717){_0xe30b52['push'](_0xe30b52['shift']());}}}(a5_0x2930,0xead4c));import{CLI_BIN_NAME}from'../../constant/cli.js';function a5_0x2930(){const _0x47eab1=['definedIn','appcode','named','local','4133778FYxgZy','name','2345490nBRTvW','find','global','4BuZLJw','5966303zJEjgH','2RYXxFW','8DKAWiw','958465fXNOOL','isCurrent','currentApp','defaultApp','29207830wVTzcI','1498437FsTslp','trim','284247JQhkzO','appCode'];a5_0x2930=function(){return _0x47eab1;};return a5_0x2930();}import{formatScopeLabel}from'../../commands/common/config-policy.js';function a5_0x4bf9(_0x3129b1,_0x66f3ce){_0x3129b1=_0x3129b1-0x1d2;const _0x2930a0=a5_0x2930();let _0x4bf9f0=_0x2930a0[_0x3129b1];return _0x4bf9f0;}export{CLI_BIN_NAME};export function enrichAppListItemsWithMergedSelection(_0x5e11b5,_0x17b7b6){const _0x3aab9c=a5_0x4bf9;if(!_0x17b7b6)return;const _0x417da2=!!(_0x17b7b6[_0x3aab9c(0x1e2)]??_0x17b7b6[_0x3aab9c(0x1e3)]);for(const _0xf3dedd of _0x5e11b5){_0xf3dedd[_0x3aab9c(0x1e1)]=![];}const _0x5b5635=_0x17b7b6[_0x3aab9c(0x1d2)]!=null?String(_0x17b7b6[_0x3aab9c(0x1d2)])[_0x3aab9c(0x1e6)]():'';if(_0x417da2){const _0x36e61e=_0x17b7b6[_0x3aab9c(0x1e2)]??_0x17b7b6[_0x3aab9c(0x1e3)];if(_0x36e61e){const _0x1dc519=_0x5e11b5[_0x3aab9c(0x1da)](_0x595ffa=>_0x595ffa[_0x3aab9c(0x1d5)]===!![]&&_0x595ffa['name']===_0x36e61e&&_0x595ffa[_0x3aab9c(0x1d3)]===_0x3aab9c(0x1d6)),_0x1d39bb=_0x1dc519??_0x5e11b5['find'](_0x463ecd=>_0x463ecd[_0x3aab9c(0x1d5)]===!![]&&_0x463ecd[_0x3aab9c(0x1d8)]===_0x36e61e);_0x1d39bb&&(_0x1d39bb['isCurrent']=!![]);}return;}if(!_0x5b5635)return;for(const _0xbb77d3 of _0x5e11b5){String(_0xbb77d3[_0x3aab9c(0x1d4)]??'')[_0x3aab9c(0x1e6)]()===_0x5b5635&&(_0xbb77d3[_0x3aab9c(0x1e1)]=!![]);}}export{readScopedConfig as readConfig,writeScopedConfig as writeConfig,isInProject}from'../../context.js';export function scopeLabel(_0x5a6304){const _0x121474=a5_0x4bf9;return formatScopeLabel(_0x5a6304['global']?_0x121474(0x1db):'project');}
@@ -1 +1 @@
1
- const a6_0x110091=a6_0x2c21;(function(_0x3fa88e,_0x1e56b1){const _0x4a60f2=a6_0x2c21,_0x614e52=_0x3fa88e();while(!![]){try{const _0x1c0781=parseInt(_0x4a60f2(0x101))/0x1*(-parseInt(_0x4a60f2(0x10e))/0x2)+-parseInt(_0x4a60f2(0x14c))/0x3*(-parseInt(_0x4a60f2(0x124))/0x4)+parseInt(_0x4a60f2(0xfe))/0x5*(parseInt(_0x4a60f2(0x135))/0x6)+parseInt(_0x4a60f2(0x12b))/0x7+-parseInt(_0x4a60f2(0x109))/0x8*(-parseInt(_0x4a60f2(0x152))/0x9)+-parseInt(_0x4a60f2(0x10d))/0xa+parseInt(_0x4a60f2(0x116))/0xb;if(_0x1c0781===_0x1e56b1)break;else _0x614e52['push'](_0x614e52['shift']());}catch(_0x145383){_0x614e52['push'](_0x614e52['shift']());}}}(a6_0x14dc,0xcdcf8));import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a6_0x14dc(){const _0x562a9e=['envName','\x20Verify:\x20','17098004UYDzAv','auth','ACCESS_KEY','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','Option\x20A:\x20','AccessKey\x20cleared\x20from\x20','Write\x20to\x20global\x20config\x20(default)','Option\x20C:\x20environment\x20variable','Invalid\x20accessKey\x20format:\x20\x22','AccessKey\x20saved\x20to\x20','\x20auth\x20login\x20--access-key\x20<ak_xxx>','\x20(via\x20','AccessKey\x20(ak_xxx...)','\x20auth\x20status','12JKZtor','Missing\x20accessKey.','userCenterDisplayName','logout','repeat','Then\x20verify\x20with:\x20','production','952252kdoDBL','access-key','ClientAk','trim','read','Clear\x20accessKey\x20from\x20config','boolean','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','=ak_xxx','804mIXfSH','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','push','\x20doctor','env','Tip:\x20you\x20can\x20also\x20run:','Auth\x20config\x20reinitialized\x20in\x20','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','bool','\x20env\x20var','str','accessKey','test','No\x20AccessKey\x20found\x20in\x20','AccessKey:\x20','login','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','Auth\x20mode:\x20','slice','length','Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config','344592DDowoM','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','nonInteractive','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','daily','join','961965mAEBNn','global','9520VMhqlB','write','string','295nlCRRM','\x20scope.','Create\x20one\x20in\x20','\x20config.','\x20config.\x20Nothing\x20to\x20clear.','validation','Clear\x20from\x20global\x20config\x20(default)','\x20Current\x20env:\x20','16MmyqwG','info','global-default','\x20config','6853330KlWlGs','6614HJXBRC','status','newConfigFileName','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','project','init'];a6_0x14dc=function(){return _0x562a9e;};return a6_0x14dc();}import{PRODUCT_CONFIG,productEnv,productEnvName}from'../../constant/product.js';import{AUTH_MODE}from'../../constant/auth-mode.js';import{normalizeEnv,isDaily,isDev}from'../../constant/env.js';import{USER_ACCESS_KEY_CREATE_URL}from'../../constant/url.js';import{CliErrors}from'../../errors.js';import{promptAccessKey,isAbortPrompt}from'../../commands/auth/prompt.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{getLoginUserInfo}from'../../core/api-client.js';const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/;function a6_0x2c21(_0x322228,_0x1ad1bb){_0x322228=_0x322228-0xfd;const _0x14dc2d=a6_0x14dc();let _0x2c2197=_0x14dc2d[_0x322228];return _0x2c2197;}function showAccessKeyCreateHint(){const _0x589b80=a6_0x2c21;writeCliSideChannelLine(_0x589b80(0x119)+PRODUCT_CONFIG[_0x589b80(0x126)]+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine(_0x589b80(0x13b)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x589b80(0x120));}function resolveAuthScopeFlags(_0x6d86dd){const _0x4288b8=a6_0x2c21;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x6d86dd['bool'](_0x4288b8(0xfd)),'explicitProject':_0x6d86dd[_0x4288b8(0x13e)](_0x4288b8(0x112)),'policy':_0x4288b8(0x10b)}));}async function resolveAuthWriteInput(_0x1435fb){const _0x4bb6d2=a6_0x2c21;let _0x2c9220=(_0x1435fb[_0x4bb6d2(0x140)]('access-key')||_0x1435fb[_0x4bb6d2(0x140)]('ak')||'')['trim']();const _0x4d2698=(_0x1435fb[_0x4bb6d2(0x140)](_0x4bb6d2(0x13a))||'')[_0x4bb6d2(0x12e)]();if(!_0x2c9220&&!_0x1435fb[_0x4bb6d2(0x14e)])try{showAccessKeyCreateHint(),_0x2c9220=await promptAccessKey('');}catch(_0x7a193c){if(isAbortPrompt(_0x7a193c))throw CliErrors['cancelled']();throw _0x7a193c;}if(!_0x2c9220)throw CliErrors['validation'](_0x4bb6d2(0x125),[_0x4bb6d2(0x103)+PRODUCT_CONFIG[_0x4bb6d2(0x126)]+':\x20'+USER_ACCESS_KEY_CREATE_URL,'Then\x20run:\x20'+CLI_BIN_NAME+_0x4bb6d2(0x14d)][_0x4bb6d2(0x151)]('\x0a'));if(!ACCESS_KEY_PATTERN[_0x4bb6d2(0x142)](_0x2c9220))throw CliErrors[_0x4bb6d2(0x106)](_0x4bb6d2(0x11e)+_0x2c9220+'\x22',_0x4bb6d2(0x14f));if(!_0x4d2698)return{'accessKey':_0x2c9220};const _0x17f6fb=normalizeEnv(_0x4d2698);return{'accessKey':_0x2c9220,'env':isDaily(_0x17f6fb)?_0x4bb6d2(0x150):isDev(_0x17f6fb)?'development':_0x4bb6d2(0x12a)};}export const authDefinitions=[{'service':a6_0x110091(0x117),'command':a6_0x110091(0x145),'description':a6_0x110091(0x14a),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'access-key','type':a6_0x110091(0x100),'description':'AccessKey\x20(ak_xxx...)'},{'name':'ak','type':'string','description':'Shorthand\x20for\x20--access-key'},{'name':'global','type':a6_0x110091(0x131),'description':'Write\x20to\x20global\x20config\x20(default)','default':!![]},{'name':a6_0x110091(0x112),'type':a6_0x110091(0x131),'description':a6_0x110091(0x137),'default':![]}],async 'execute'(_0x4e8aad){const _0x387957=a6_0x110091,_0x2be698=await resolveAuthWriteInput(_0x4e8aad),_0x49a49d=resolveAuthScopeFlags(_0x4e8aad),_0x391013=readScopedConfig(_0x49a49d);_0x391013['accessKey']=_0x2be698[_0x387957(0x141)];_0x2be698[_0x387957(0x13a)]&&(_0x391013[_0x387957(0x13a)]=_0x2be698['env']);writeScopedConfig(_0x391013,_0x49a49d);const _0x4722ed=_0x49a49d['global']?_0x387957(0xfd):'project',_0x2bfc18=_0x391013[_0x387957(0x13a)]?_0x387957(0x108)+_0x391013['env']+'.':'';return{'ok':!![],'message':_0x387957(0x11f)+_0x4722ed+'\x20config.'+_0x2bfc18+_0x387957(0x115)+CLI_BIN_NAME+_0x387957(0x123)};}},{'service':a6_0x110091(0x117),'command':a6_0x110091(0x113),'description':'Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','risk':a6_0x110091(0xff),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x110091(0x12c),'type':a6_0x110091(0x100),'description':a6_0x110091(0x122)},{'name':'ak','type':'string','description':'Shorthand\x20for\x20--access-key'},{'name':'env','type':a6_0x110091(0x100),'description':a6_0x110091(0x14b)},{'name':a6_0x110091(0xfd),'type':a6_0x110091(0x131),'description':a6_0x110091(0x11c),'default':!![]},{'name':'project','type':a6_0x110091(0x131),'description':a6_0x110091(0x137),'default':![]}],async 'execute'(_0x12b8ca){const _0x553f3a=a6_0x110091,_0x49b2e3=await resolveAuthWriteInput(_0x12b8ca),_0x3ac933=resolveAuthScopeFlags(_0x12b8ca),_0x28e27b={'accessKey':_0x49b2e3['accessKey']};_0x49b2e3[_0x553f3a(0x13a)]&&(_0x28e27b[_0x553f3a(0x13a)]=_0x49b2e3[_0x553f3a(0x13a)]);writeScopedConfig(_0x28e27b,_0x3ac933);const _0x423300=_0x3ac933[_0x553f3a(0xfd)]?_0x553f3a(0xfd):_0x553f3a(0x112),_0x48d44d=_0x28e27b[_0x553f3a(0x13a)]?_0x553f3a(0x108)+_0x28e27b[_0x553f3a(0x13a)]+'.':'';return{'ok':!![],'message':_0x553f3a(0x13c)+_0x423300+_0x553f3a(0x102)+_0x48d44d+_0x553f3a(0x115)+CLI_BIN_NAME+_0x553f3a(0x123)};}},{'service':'auth','command':a6_0x110091(0x127),'description':a6_0x110091(0x130),'risk':a6_0x110091(0xff),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x110091(0xfd),'type':a6_0x110091(0x131),'description':a6_0x110091(0x107),'default':!![]},{'name':a6_0x110091(0x112),'type':a6_0x110091(0x131),'description':a6_0x110091(0x111),'default':![]}],async 'execute'(_0x4ed195){const _0x1759f1=a6_0x110091,_0x3277f6=resolveAuthScopeFlags(_0x4ed195),_0x34890e=readScopedConfig(_0x3277f6),_0x4a959a=!!_0x34890e[_0x1759f1(0x141)];delete _0x34890e[_0x1759f1(0x141)],writeScopedConfig(_0x34890e,_0x3277f6);const _0xcdecee=_0x3277f6[_0x1759f1(0xfd)]?_0x1759f1(0xfd):_0x1759f1(0x112);if(_0x4a959a)return{'ok':!![],'message':_0x1759f1(0x11b)+_0xcdecee+_0x1759f1(0x104)};return{'ok':!![],'message':_0x1759f1(0x143)+_0xcdecee+_0x1759f1(0x105)};}},{'service':a6_0x110091(0x117),'command':a6_0x110091(0x10f),'description':'Show\x20current\x20authentication\x20status','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'global','type':a6_0x110091(0x131),'description':'Read\x20from\x20global\x20config\x20(default)','default':!![]},{'name':a6_0x110091(0x112),'type':a6_0x110091(0x131),'description':a6_0x110091(0x136),'default':![]}],async 'execute'(_0x19afc1){const _0x2ab6ff=a6_0x110091,_0x4eaf47=resolveAuthScopeFlags(_0x19afc1),_0x1e317c=readScopedConfig(_0x4eaf47),_0x2e791f=productEnvName(_0x2ab6ff(0x118)),_0x338350=productEnv('ACCESS_KEY')||undefined,_0xfacb1c=_0x1e317c['accessKey']||undefined,_0x4a8d51=_0x338350||_0xfacb1c,_0x5543ab=_0x338350?_0x2e791f+_0x2ab6ff(0x13f):_0xfacb1c?(_0x4eaf47[_0x2ab6ff(0xfd)]?_0x2ab6ff(0xfd):'project')+_0x2ab6ff(0x10c):null,_0xdd3840=[_0x2ab6ff(0x147)+AUTH_MODE[_0x2ab6ff(0x12d)]];if(_0x4a8d51){const _0x30c0c6=_0x4a8d51['length']>0x8?''+_0x4a8d51[_0x2ab6ff(0x148)](0x0,0x8)+'*'[_0x2ab6ff(0x128)](_0x4a8d51[_0x2ab6ff(0x149)]-0x8):_0x4a8d51;_0xdd3840['push'](_0x2ab6ff(0x144)+_0x30c0c6+(_0x5543ab?_0x2ab6ff(0x121)+_0x5543ab+')':''));}return!_0x4a8d51&&(_0xdd3840[_0x2ab6ff(0x138)](''),_0xdd3840[_0x2ab6ff(0x138)](_0x2ab6ff(0x132)),_0xdd3840[_0x2ab6ff(0x138)](''),_0xdd3840[_0x2ab6ff(0x138)](_0x2ab6ff(0x11a)+CLI_BIN_NAME+'\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]'),_0xdd3840[_0x2ab6ff(0x138)](''),_0xdd3840[_0x2ab6ff(0x138)]('Option\x20B:\x20apps\x20config\x20('+PRODUCT_CONFIG[_0x2ab6ff(0x110)]+')'),_0xdd3840[_0x2ab6ff(0x138)](_0x2ab6ff(0x13d)),_0xdd3840['push'](''),_0xdd3840[_0x2ab6ff(0x138)](_0x2ab6ff(0x11d)),_0xdd3840[_0x2ab6ff(0x138)]('\x20\x20export\x20'+_0x2e791f+_0x2ab6ff(0x134)),_0xdd3840[_0x2ab6ff(0x138)](''),_0xdd3840[_0x2ab6ff(0x138)](_0x2ab6ff(0x129)+CLI_BIN_NAME+_0x2ab6ff(0x123)),_0xdd3840[_0x2ab6ff(0x138)](_0x2ab6ff(0x133)+CLI_BIN_NAME+_0x2ab6ff(0x139))),{'ok':!![],'message':_0xdd3840[_0x2ab6ff(0x151)]('\x0a')};}},{'service':a6_0x110091(0x117),'command':a6_0x110091(0x10a),'description':a6_0x110091(0x146),'risk':a6_0x110091(0x12f),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x176bcc){const _0x57e248=a6_0x110091,_0x54b35d=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x54b35d,'meta':{'env':_0x176bcc[_0x57e248(0x114)]??_0x57e248(0x12a)}}};}}];
1
+ const a6_0x24fb07=a6_0x5b27;function a6_0x5b27(_0xc565e,_0x2cba9f){_0xc565e=_0xc565e-0xb4;const _0x4d401d=a6_0x4d40();let _0x5b2720=_0x4d401d[_0xc565e];return _0x5b2720;}(function(_0x14cfe7,_0x4790e3){const _0x4d9cee=a6_0x5b27,_0x4fb945=_0x14cfe7();while(!![]){try{const _0x4a8dd2=parseInt(_0x4d9cee(0xca))/0x1*(-parseInt(_0x4d9cee(0xf1))/0x2)+parseInt(_0x4d9cee(0x10a))/0x3*(-parseInt(_0x4d9cee(0xf3))/0x4)+-parseInt(_0x4d9cee(0xda))/0x5*(parseInt(_0x4d9cee(0xb6))/0x6)+parseInt(_0x4d9cee(0x10b))/0x7+-parseInt(_0x4d9cee(0x109))/0x8*(parseInt(_0x4d9cee(0xc6))/0x9)+parseInt(_0x4d9cee(0x105))/0xa+parseInt(_0x4d9cee(0xce))/0xb*(parseInt(_0x4d9cee(0xe3))/0xc);if(_0x4a8dd2===_0x4790e3)break;else _0x4fb945['push'](_0x4fb945['shift']());}catch(_0x477493){_0x4fb945['push'](_0x4fb945['shift']());}}}(a6_0x4d40,0x7087a));import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../../constant/product.js';import{AUTH_MODE}from'../../constant/auth-mode.js';import{normalizeEnv,isDaily,isDev}from'../../constant/env.js';import{USER_ACCESS_KEY_CREATE_URL}from'../../constant/url.js';import{CliErrors}from'../../errors.js';import{promptAccessKey,isAbortPrompt}from'../../commands/auth/prompt.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';function a6_0x4d40(){const _0x291111=['AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','312584ElVRNM','831057USbCMm','2466205UKtNCr','Invalid\x20accessKey\x20format:\x20\x22','logout','validation','str','Option\x20A:\x20','6SRToiX','Missing\x20accessKey.','Then\x20verify\x20with:\x20','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','envName','trim','status','ACCESS_KEY','Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','auth','Tip:\x20you\x20can\x20also\x20run:','stdout','\x20\x20export\x20','cancelled','global','AccessKey\x20cleared\x20from\x20','81SfGxKm','AccessKey\x20(ak_xxx...)','repeat','env','698AnUeQG','Shorthand\x20for\x20--access-key','access-key','daily','11ksqQad','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','\x20config.','info','`auth\x20login`\x20does\x20not\x20support\x20--yes.','\x20doctor','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','Option\x20B:\x20apps\x20config\x20(','\x20Current\x20env:\x20','Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config','boolean','init','3660845gJkgkI','push','\x20config.\x20Nothing\x20to\x20clear.','Option\x20C:\x20environment\x20variable','read','AccessKey:\x20','yes','newConfigFileName','length','28886244IXQmwV','login','Auth\x20config\x20reinitialized\x20in\x20','join','accessKey','AccessKey\x20saved\x20to\x20','Show\x20current\x20authentication\x20status','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','Read\x20from\x20global\x20config\x20(default)','=ak_xxx','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','project','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','2532hZDeMU','\x20auth\x20status','12BrRZTm','\x20auth\x20login\x20--access-key\x20<ak_xxx>','write','Write\x20to\x20global\x20config\x20(default)','Use\x20`','test','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','development','production','\x20(via\x20','isTTY','No\x20AccessKey\x20found\x20in\x20','\x20Verify:\x20','ClientAk','Auth\x20mode:\x20','string','stdin','\x20env\x20var','4999710ptnaXm','slice','bool'];a6_0x4d40=function(){return _0x291111;};return a6_0x4d40();}import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{getLoginUserInfo}from'../../core/api-client.js';const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/;function showAccessKeyCreateHint(){const _0x3469bf=a6_0x5b27;writeCliSideChannelLine(_0x3469bf(0x108)+PRODUCT_CONFIG['userCenterDisplayName']+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine(_0x3469bf(0xc0)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x3469bf(0xf4));}function buildAccessKeySetupGuide(){const _0x5f2283=a6_0x5b27;return['AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20'+PRODUCT_CONFIG['userCenterDisplayName']+':',USER_ACCESS_KEY_CREATE_URL,'Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20'+CLI_BIN_NAME+_0x5f2283(0xcf)]['join']('\x0a');}function canPromptForAccessKey(_0x39520a){const _0x5c6f14=a6_0x5b27;return!_0x39520a['nonInteractive']&&process[_0x5c6f14(0x103)][_0x5c6f14(0xfd)]!==![]&&process[_0x5c6f14(0xc1)][_0x5c6f14(0xfd)]!==![];}function resolveAuthScopeFlags(_0x20ad7a){const _0x5964bb=a6_0x5b27;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x20ad7a[_0x5964bb(0x107)]('global'),'explicitProject':_0x20ad7a[_0x5964bb(0x107)]('project'),'policy':'global-default'}));}async function resolveAuthWriteInput(_0xeded74){const _0x1e5f9c=a6_0x5b27;let _0x4845a7=(_0xeded74[_0x1e5f9c(0xb4)]('access-key')||_0xeded74[_0x1e5f9c(0xb4)]('ak')||'')[_0x1e5f9c(0xbb)]();const _0x4373a8=(_0xeded74[_0x1e5f9c(0xb4)](_0x1e5f9c(0xc9))||'')['trim']();if(!_0x4845a7&&canPromptForAccessKey(_0xeded74))try{showAccessKeyCreateHint(),_0x4845a7=await promptAccessKey('');}catch(_0xaad5ae){if(isAbortPrompt(_0xaad5ae))throw CliErrors[_0x1e5f9c(0xc3)]();throw _0xaad5ae;}if(!_0x4845a7)throw CliErrors[_0x1e5f9c(0x10e)](_0x1e5f9c(0xb7),buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN[_0x1e5f9c(0xf8)](_0x4845a7))throw CliErrors[_0x1e5f9c(0x10e)](_0x1e5f9c(0x10c)+_0x4845a7+'\x22',_0x1e5f9c(0xd4));if(!_0x4373a8)return{'accessKey':_0x4845a7};const _0x517fa0=normalizeEnv(_0x4373a8);return{'accessKey':_0x4845a7,'env':isDaily(_0x517fa0)?_0x1e5f9c(0xcd):isDev(_0x517fa0)?_0x1e5f9c(0xfa):_0x1e5f9c(0xfb)};}export const authDefinitions=[{'service':a6_0x24fb07(0xbf),'command':a6_0x24fb07(0xe4),'description':a6_0x24fb07(0xbe),'risk':a6_0x24fb07(0xf5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x24fb07(0xcc),'type':a6_0x24fb07(0x102),'description':a6_0x24fb07(0xc7)},{'name':'ak','type':a6_0x24fb07(0x102),'description':a6_0x24fb07(0xcb)},{'name':a6_0x24fb07(0xc4),'type':a6_0x24fb07(0xd8),'description':a6_0x24fb07(0xf6),'default':!![]},{'name':a6_0x24fb07(0xef),'type':a6_0x24fb07(0xd8),'description':'Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x3d325f){const _0x3b5427=a6_0x24fb07;if(_0x3d325f['bool'](_0x3b5427(0xe0)))throw CliErrors[_0x3b5427(0x10e)](_0x3b5427(0xd2),_0x3b5427(0xf7)+CLI_BIN_NAME+_0x3b5427(0xee)+CLI_BIN_NAME+_0x3b5427(0xf0));const _0x21b00e=(_0x3d325f[_0x3b5427(0xb4)](_0x3b5427(0xcc))||_0x3d325f['str']('ak')||'')[_0x3b5427(0xbb)]();if(!_0x21b00e&&_0x3d325f['nonInteractive'])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x2941ef=await resolveAuthWriteInput(_0x3d325f),_0x2693b9=resolveAuthScopeFlags(_0x3d325f),_0x5a2756=readScopedConfig(_0x2693b9);_0x5a2756[_0x3b5427(0xe7)]=_0x2941ef[_0x3b5427(0xe7)];_0x2941ef[_0x3b5427(0xc9)]&&(_0x5a2756[_0x3b5427(0xc9)]=_0x2941ef[_0x3b5427(0xc9)]);writeScopedConfig(_0x5a2756,_0x2693b9);const _0x278258=_0x2693b9[_0x3b5427(0xc4)]?_0x3b5427(0xc4):_0x3b5427(0xef),_0x1af91e=_0x5a2756[_0x3b5427(0xc9)]?_0x3b5427(0xd6)+_0x5a2756[_0x3b5427(0xc9)]+'.':'';return{'ok':!![],'message':_0x3b5427(0xe8)+_0x278258+_0x3b5427(0xd0)+_0x1af91e+_0x3b5427(0xff)+CLI_BIN_NAME+'\x20auth\x20status'};}},{'service':a6_0x24fb07(0xbf),'command':a6_0x24fb07(0xd9),'description':'Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','risk':a6_0x24fb07(0xf5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'access-key','type':'string','description':a6_0x24fb07(0xc7)},{'name':'ak','type':a6_0x24fb07(0x102),'description':a6_0x24fb07(0xcb)},{'name':'env','type':a6_0x24fb07(0x102),'description':a6_0x24fb07(0xd7)},{'name':'global','type':a6_0x24fb07(0xd8),'description':'Write\x20to\x20global\x20config\x20(default)','default':!![]},{'name':a6_0x24fb07(0xef),'type':'boolean','description':a6_0x24fb07(0xea),'default':![]}],async 'execute'(_0x5a947a){const _0x19c93d=a6_0x24fb07,_0x35fbe5=await resolveAuthWriteInput(_0x5a947a),_0x9b5a58=resolveAuthScopeFlags(_0x5a947a),_0x287a61={'accessKey':_0x35fbe5[_0x19c93d(0xe7)]};_0x35fbe5['env']&&(_0x287a61[_0x19c93d(0xc9)]=_0x35fbe5[_0x19c93d(0xc9)]);writeScopedConfig(_0x287a61,_0x9b5a58);const _0x22b440=_0x9b5a58[_0x19c93d(0xc4)]?_0x19c93d(0xc4):_0x19c93d(0xef),_0x1a1915=_0x287a61['env']?'\x20Current\x20env:\x20'+_0x287a61[_0x19c93d(0xc9)]+'.':'';return{'ok':!![],'message':_0x19c93d(0xe5)+_0x22b440+'\x20scope.'+_0x1a1915+_0x19c93d(0xff)+CLI_BIN_NAME+'\x20auth\x20status'};}},{'service':a6_0x24fb07(0xbf),'command':a6_0x24fb07(0x10d),'description':'Clear\x20accessKey\x20from\x20config','risk':a6_0x24fb07(0xf5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x24fb07(0xc4),'type':a6_0x24fb07(0xd8),'description':'Clear\x20from\x20global\x20config\x20(default)','default':!![]},{'name':'project','type':a6_0x24fb07(0xd8),'description':'Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x3a77da){const _0x188a7f=a6_0x24fb07,_0x5831a1=resolveAuthScopeFlags(_0x3a77da),_0x5a8e55=readScopedConfig(_0x5831a1),_0x14414b=!!_0x5a8e55[_0x188a7f(0xe7)];delete _0x5a8e55['accessKey'],writeScopedConfig(_0x5a8e55,_0x5831a1);const _0x371270=_0x5831a1[_0x188a7f(0xc4)]?_0x188a7f(0xc4):'project';if(_0x14414b)return{'ok':!![],'message':_0x188a7f(0xc5)+_0x371270+'\x20config.'};return{'ok':!![],'message':_0x188a7f(0xfe)+_0x371270+_0x188a7f(0xdc)};}},{'service':a6_0x24fb07(0xbf),'command':a6_0x24fb07(0xbc),'description':a6_0x24fb07(0xe9),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x24fb07(0xc4),'type':a6_0x24fb07(0xd8),'description':a6_0x24fb07(0xec),'default':!![]},{'name':a6_0x24fb07(0xef),'type':'boolean','description':a6_0x24fb07(0xb9),'default':![]}],async 'execute'(_0x134b61){const _0x2976af=a6_0x24fb07,_0x47a25a=resolveAuthScopeFlags(_0x134b61),_0x338c7d=readScopedConfig(_0x47a25a),_0x439e98=productEnvName(_0x2976af(0xbd)),_0x1e4a0e=productEnv('ACCESS_KEY')||undefined,_0x5c81f8=_0x338c7d[_0x2976af(0xe7)]||undefined,_0xe63d57=_0x1e4a0e||_0x5c81f8,_0x2a254c=_0x1e4a0e?_0x439e98+_0x2976af(0x104):_0x5c81f8?(_0x47a25a[_0x2976af(0xc4)]?_0x2976af(0xc4):_0x2976af(0xef))+'\x20config':null,_0x450010=[_0x2976af(0x101)+AUTH_MODE[_0x2976af(0x100)]];if(_0xe63d57){const _0x563f51=_0xe63d57['length']>0x8?''+_0xe63d57[_0x2976af(0x106)](0x0,0x8)+'*'[_0x2976af(0xc8)](_0xe63d57[_0x2976af(0xe2)]-0x8):_0xe63d57;_0x450010[_0x2976af(0xdb)](_0x2976af(0xdf)+_0x563f51+(_0x2a254c?_0x2976af(0xfc)+_0x2a254c+')':''));}return!_0xe63d57&&(_0x450010[_0x2976af(0xdb)](''),_0x450010[_0x2976af(0xdb)]('No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:'),_0x450010[_0x2976af(0xdb)](''),_0x450010[_0x2976af(0xdb)](_0x2976af(0xb5)+CLI_BIN_NAME+'\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]'),_0x450010['push'](''),_0x450010[_0x2976af(0xdb)](_0x2976af(0xd5)+PRODUCT_CONFIG[_0x2976af(0xe1)]+')'),_0x450010[_0x2976af(0xdb)](_0x2976af(0xf9)),_0x450010[_0x2976af(0xdb)](''),_0x450010[_0x2976af(0xdb)](_0x2976af(0xdd)),_0x450010[_0x2976af(0xdb)](_0x2976af(0xc2)+_0x439e98+_0x2976af(0xed)),_0x450010['push'](''),_0x450010[_0x2976af(0xdb)](_0x2976af(0xb8)+CLI_BIN_NAME+_0x2976af(0xf2)),_0x450010[_0x2976af(0xdb)]('If\x20command\x20execution\x20still\x20fails,\x20run:\x20'+CLI_BIN_NAME+_0x2976af(0xd3))),{'ok':!![],'message':_0x450010[_0x2976af(0xe6)]('\x0a')};}},{'service':a6_0x24fb07(0xbf),'command':a6_0x24fb07(0xd1),'description':a6_0x24fb07(0xeb),'risk':a6_0x24fb07(0xde),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x5d89d6){const _0x296bb6=a6_0x24fb07,_0x21a96c=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x21a96c,'meta':{'env':_0x5d89d6[_0x296bb6(0xba)]??'production'}}};}}];
@@ -1 +1 @@
1
- (function(_0x321a61,_0x2a7ad2){const _0x547e6f=a7_0x42f0,_0x5ec94d=_0x321a61();while(!![]){try{const _0x38a4c9=-parseInt(_0x547e6f(0x1cf))/0x1+-parseInt(_0x547e6f(0x1d5))/0x2*(-parseInt(_0x547e6f(0x1c7))/0x3)+parseInt(_0x547e6f(0x1cb))/0x4*(-parseInt(_0x547e6f(0x1d6))/0x5)+parseInt(_0x547e6f(0x1d8))/0x6+parseInt(_0x547e6f(0x1dc))/0x7+parseInt(_0x547e6f(0x1d1))/0x8+parseInt(_0x547e6f(0x1d2))/0x9*(-parseInt(_0x547e6f(0x1d9))/0xa);if(_0x38a4c9===_0x2a7ad2)break;else _0x5ec94d['push'](_0x5ec94d['shift']());}catch(_0x44b74c){_0x5ec94d['push'](_0x5ec94d['shift']());}}}(a7_0x5129,0xade98));import{createInterface}from'node:readline';class AbortPrompt extends Error{constructor(){const _0xf4ac28=a7_0x42f0;super('User\x20aborted\x20prompt'),this[_0xf4ac28(0x1d7)]=_0xf4ac28(0x1ce);}}function createSafeRl(){const _0x2579ca=a7_0x42f0,_0x1eb7f9=createInterface({'input':process[_0x2579ca(0x1c8)],'output':process[_0x2579ca(0x1c9)]});let _0x49bb39;const _0x3b8d40=new Promise((_0x3f02b5,_0x154ba1)=>{const _0x2e6131=_0x2579ca;_0x49bb39=()=>{const _0x3e38f5=a7_0x42f0;_0x49bb39&&(_0x1eb7f9[_0x3e38f5(0x1cc)]('SIGINT',_0x49bb39),_0x49bb39=undefined);try{_0x1eb7f9['close']();}catch{}_0x154ba1(new AbortPrompt());},_0x1eb7f9[_0x2e6131(0x1cd)](_0x2e6131(0x1d3),_0x49bb39);}),_0x5107a9=()=>{const _0x1762da=_0x2579ca;_0x49bb39&&(_0x1eb7f9[_0x1762da(0x1cc)]('SIGINT',_0x49bb39),_0x49bb39=undefined);try{_0x1eb7f9[_0x1762da(0x1d4)]();}catch{}};return{'rl':_0x1eb7f9,'abortPromise':_0x3b8d40,'disposeSuccess':_0x5107a9};}function a7_0x5129(){const _0x40b705=['12tnszmq','removeListener','once','AbortPrompt','122723qWYCyX','AccessKey\x20(','10401936APInDd','21267mvHrEu','SIGINT','close','14yAvShV','846965ZBokse','name','5765160uKGXnN','15050pWhnXV','AccessKey\x20(paste\x20ak_...):\x20','question','9833796OxsDQr','race','528699SSRSCY','stdin','stdout','):\x20'];a7_0x5129=function(){return _0x40b705;};return a7_0x5129();}function a7_0x42f0(_0x17fe3f,_0x479c32){_0x17fe3f=_0x17fe3f-0x1c7;const _0x512975=a7_0x5129();let _0x42f00c=_0x512975[_0x17fe3f];return _0x42f00c;}export async function promptAccessKey(_0x47859e=''){const _0x213283=a7_0x42f0,{rl:_0x47184a,abortPromise:_0x4c5f23,disposeSuccess:_0x3b670a}=createSafeRl(),_0x34b2b0=new Promise(_0x4a4b10=>{const _0x1cbe9d=a7_0x42f0,_0x24c94d=_0x47859e?_0x1cbe9d(0x1d0)+_0x47859e+_0x1cbe9d(0x1ca):_0x1cbe9d(0x1da);_0x47184a[_0x1cbe9d(0x1db)](_0x24c94d,_0x231100=>{_0x3b670a(),_0x4a4b10(_0x231100['trim']()||_0x47859e);});});return Promise[_0x213283(0x1dd)]([_0x34b2b0,_0x4c5f23]);}export function isAbortPrompt(_0x108309){const _0x8ccd5e=a7_0x42f0;return _0x108309 instanceof Error&&_0x108309[_0x8ccd5e(0x1d7)]===_0x8ccd5e(0x1ce);}
1
+ (function(_0xbd6c56,_0x207828){const _0x395a1f=a7_0x4b96,_0x3c2302=_0xbd6c56();while(!![]){try{const _0x387a56=parseInt(_0x395a1f(0x143))/0x1+-parseInt(_0x395a1f(0x139))/0x2+-parseInt(_0x395a1f(0x13e))/0x3*(-parseInt(_0x395a1f(0x14a))/0x4)+-parseInt(_0x395a1f(0x146))/0x5+-parseInt(_0x395a1f(0x142))/0x6+-parseInt(_0x395a1f(0x141))/0x7+parseInt(_0x395a1f(0x140))/0x8;if(_0x387a56===_0x207828)break;else _0x3c2302['push'](_0x3c2302['shift']());}catch(_0x3a2909){_0x3c2302['push'](_0x3c2302['shift']());}}}(a7_0x1193,0xab48c));import{createInterface}from'node:readline';class AbortPrompt extends Error{constructor(){const _0x350238=a7_0x4b96;super(_0x350238(0x148)),this[_0x350238(0x13c)]='AbortPrompt';}}function createSafeRl(){const _0x286ea1=a7_0x4b96,_0x59c926=createInterface({'input':process[_0x286ea1(0x13d)],'output':process['stdout']});let _0x1e6a19;const _0x1b5ae4=new Promise((_0x54faae,_0x22bf3a)=>{const _0x5e2c3=_0x286ea1;_0x1e6a19=()=>{const _0x1986c6=a7_0x4b96;_0x1e6a19&&(_0x59c926['removeListener'](_0x1986c6(0x149),_0x1e6a19),_0x1e6a19=undefined);try{_0x59c926[_0x1986c6(0x14b)]();}catch{}_0x22bf3a(new AbortPrompt());},_0x59c926[_0x5e2c3(0x145)](_0x5e2c3(0x149),_0x1e6a19);}),_0x288aa4=()=>{const _0x16dd2c=_0x286ea1;_0x1e6a19&&(_0x59c926[_0x16dd2c(0x13b)](_0x16dd2c(0x149),_0x1e6a19),_0x1e6a19=undefined);try{_0x59c926[_0x16dd2c(0x14b)]();}catch{}};return{'rl':_0x59c926,'abortPromise':_0x1b5ae4,'disposeSuccess':_0x288aa4};}function a7_0x1193(){const _0x1dae71=['once','6000105cPPANg','AccessKey\x20(','User\x20aborted\x20prompt','SIGINT','60840lCkLcw','close','2625154TPUSyy','question','removeListener','name','stdin','54Yddlqn','race','24190232QUXfcs','3957023PpHqjA','416646LXayoX','551349XFJhap','):\x20'];a7_0x1193=function(){return _0x1dae71;};return a7_0x1193();}function a7_0x4b96(_0x498282,_0x33bbff){_0x498282=_0x498282-0x139;const _0x119389=a7_0x1193();let _0x4b96cf=_0x119389[_0x498282];return _0x4b96cf;}export async function promptAccessKey(_0x459456=''){const _0x410d99=a7_0x4b96,{rl:_0x32cd72,abortPromise:_0x147e88,disposeSuccess:_0x27a51d}=createSafeRl(),_0x1390c3=new Promise(_0x5d7727=>{const _0x42bd80=a7_0x4b96,_0xe0af2d=_0x459456?_0x42bd80(0x147)+_0x459456+_0x42bd80(0x144):'AccessKey\x20(paste\x20ak_...):\x20';_0x32cd72[_0x42bd80(0x13a)](_0xe0af2d,_0x246d11=>{_0x27a51d(),_0x5d7727(_0x246d11['trim']()||_0x459456);});});return Promise[_0x410d99(0x13f)]([_0x1390c3,_0x147e88]);}export function isAbortPrompt(_0x5c4243){return _0x5c4243 instanceof Error&&_0x5c4243['name']==='AbortPrompt';}
@@ -1 +1 @@
1
- const a8_0x22cdcc=a8_0x2e69;function a8_0x2e69(_0x4e7aa6,_0x1df3e4){_0x4e7aa6=_0x4e7aa6-0x74;const _0x412665=a8_0x4126();let _0x2e69d9=_0x412665[_0x4e7aa6];return _0x2e69d9;}(function(_0xa4062c,_0x1d770c){const _0x4e51d2=a8_0x2e69,_0x32404d=_0xa4062c();while(!![]){try{const _0x4cc18c=-parseInt(_0x4e51d2(0x88))/0x1*(-parseInt(_0x4e51d2(0x76))/0x2)+-parseInt(_0x4e51d2(0x77))/0x3+-parseInt(_0x4e51d2(0x82))/0x4*(-parseInt(_0x4e51d2(0x83))/0x5)+parseInt(_0x4e51d2(0x81))/0x6+-parseInt(_0x4e51d2(0x74))/0x7+-parseInt(_0x4e51d2(0x84))/0x8*(-parseInt(_0x4e51d2(0x87))/0x9)+parseInt(_0x4e51d2(0x7d))/0xa*(parseInt(_0x4e51d2(0x80))/0xb);if(_0x4cc18c===_0x1d770c)break;else _0x32404d['push'](_0x32404d['shift']());}catch(_0x174e38){_0x32404d['push'](_0x32404d['shift']());}}}(a8_0x4126,0x8539c));import{getBffScriptInfo}from'../../core/api-client.js';function a8_0x4126(){const _0x6154a=['1298570ufHYHq','Script\x20ID','functionName','11LFtxpn','3100644DZKvEm','260NBSpWW','49815wKkOfV','9616ZkHKDZ','bff','updatedTime','4707HGjgGW','11BSGGUD','5025538uabHwS','scriptType','72986OIbQai','3182007PVTmAu','Get\x20BFF\x20script\x20details\x20by\x20ID','detail','(none)','description','createdTime'];a8_0x4126=function(){return _0x6154a;};return a8_0x4126();}import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';export const bffDetail={'service':a8_0x22cdcc(0x85),'command':a8_0x22cdcc(0x79),'description':a8_0x22cdcc(0x78),'risk':'read','flags':[{...ID_FLAG,'description':a8_0x22cdcc(0x7e)},VERBOSE_FLAG],async 'execute'(_0x371f94){const _0x1f85bd=a8_0x22cdcc,_0x248934=await getBffScriptInfo(_0x371f94['num']('id')),_0x58c6ce=_0x371f94['bool']('verbose');if(_0x58c6ce)return{'ok':!![],'data':_0x248934};return{'ok':!![],'data':{'id':_0x248934['id'],'appCode':_0x248934['appCode'],'functionName':_0x248934[_0x1f85bd(0x7f)]??'','scriptType':_0x248934[_0x1f85bd(0x75)],'description':_0x248934[_0x1f85bd(0x7b)]||_0x1f85bd(0x7a),'createdTime':_0x248934[_0x1f85bd(0x7c)]??'','updatedTime':_0x248934[_0x1f85bd(0x86)]??''}};}};
1
+ const a8_0x30b88c=a8_0x464c;function a8_0x464c(_0x555235,_0x1d4faf){_0x555235=_0x555235-0x1f4;const _0x41c74f=a8_0x41c7();let _0x464c2c=_0x41c74f[_0x555235];return _0x464c2c;}(function(_0x1d5f19,_0x2e40b4){const _0x319c69=a8_0x464c,_0xd5205=_0x1d5f19();while(!![]){try{const _0x4dbe32=parseInt(_0x319c69(0x202))/0x1+-parseInt(_0x319c69(0x1f5))/0x2*(parseInt(_0x319c69(0x1fb))/0x3)+parseInt(_0x319c69(0x203))/0x4+parseInt(_0x319c69(0x1f9))/0x5*(parseInt(_0x319c69(0x209))/0x6)+-parseInt(_0x319c69(0x1f6))/0x7+parseInt(_0x319c69(0x1f7))/0x8+-parseInt(_0x319c69(0x1ff))/0x9;if(_0x4dbe32===_0x2e40b4)break;else _0xd5205['push'](_0xd5205['shift']());}catch(_0x31b335){_0xd5205['push'](_0xd5205['shift']());}}}(a8_0x41c7,0x65e7e));import{getBffScriptInfo}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';export const bffDetail={'service':a8_0x30b88c(0x206),'command':a8_0x30b88c(0x201),'description':a8_0x30b88c(0x1f4),'risk':a8_0x30b88c(0x1fd),'flags':[{...ID_FLAG,'description':a8_0x30b88c(0x1f8)},VERBOSE_FLAG],async 'execute'(_0x279a19){const _0x5ae38d=a8_0x30b88c,_0x191e04=await getBffScriptInfo(_0x279a19[_0x5ae38d(0x1fe)]('id')),_0x381e84=_0x279a19['bool'](_0x5ae38d(0x204));if(_0x381e84)return{'ok':!![],'data':_0x191e04};return{'ok':!![],'data':{'id':_0x191e04['id'],'appCode':_0x191e04[_0x5ae38d(0x200)],'functionName':_0x191e04[_0x5ae38d(0x205)]??'','scriptType':_0x191e04[_0x5ae38d(0x208)],'description':_0x191e04['description']||_0x5ae38d(0x1fc),'createdTime':_0x191e04[_0x5ae38d(0x207)]??'','updatedTime':_0x191e04[_0x5ae38d(0x1fa)]??''}};}};function a8_0x41c7(){const _0x2f88f8=['detail','292319YRGKrW','1215316OxmXss','verbose','functionName','bff','createdTime','scriptType','6AQWxxd','Get\x20BFF\x20script\x20details\x20by\x20ID','149826fKzADh','5632053XiUeai','3894120OFORqh','Script\x20ID','1832915fJcqun','updatedTime','3fukHwH','(none)','read','num','1373382aqCKFi','appCode'];a8_0x41c7=function(){return _0x2f88f8;};return a8_0x41c7();}
@@ -1 +1 @@
1
- const a9_0x13a0f3=a9_0xbffa;function a9_0xbffa(_0x19116e,_0x98281c){_0x19116e=_0x19116e-0x16e;const _0x539afc=a9_0x539a();let _0xbffaa6=_0x539afc[_0x19116e];return _0xbffaa6;}(function(_0x4d7fad,_0x319f06){const _0x52918f=a9_0xbffa,_0x1ffbdf=_0x4d7fad();while(!![]){try{const _0x482777=-parseInt(_0x52918f(0x174))/0x1*(parseInt(_0x52918f(0x178))/0x2)+-parseInt(_0x52918f(0x172))/0x3*(parseInt(_0x52918f(0x173))/0x4)+-parseInt(_0x52918f(0x17d))/0x5*(parseInt(_0x52918f(0x171))/0x6)+-parseInt(_0x52918f(0x170))/0x7*(parseInt(_0x52918f(0x17a))/0x8)+-parseInt(_0x52918f(0x177))/0x9+parseInt(_0x52918f(0x175))/0xa*(-parseInt(_0x52918f(0x17b))/0xb)+parseInt(_0x52918f(0x17f))/0xc;if(_0x482777===_0x319f06)break;else _0x1ffbdf['push'](_0x1ffbdf['shift']());}catch(_0x39910c){_0x1ffbdf['push'](_0x1ffbdf['shift']());}}}(a9_0x539a,0xde8d3));import{executeSdkBff}from'../../core/sdk-client.js';import{parseJsonParams}from'../../utils/params.js';import{NAME_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';export const bffExec={'service':'bff','command':a9_0x13a0f3(0x16e),'description':a9_0x13a0f3(0x176),'risk':'read','flags':[{...NAME_FLAG,'required':!![],'description':'BFF\x20function\x20name\x20to\x20execute'},PARAMS_FLAG],async 'execute'(_0x43f0cc){const _0xe1a7a=a9_0x13a0f3,_0x2af9b0=parseJsonParams(_0x43f0cc[_0xe1a7a(0x17e)](_0xe1a7a(0x17c))),_0x214e48=Date[_0xe1a7a(0x16f)](),_0x2e616e=await executeSdkBff(_0x43f0cc['str'](_0xe1a7a(0x180)),_0x2af9b0),_0x25addc=Date[_0xe1a7a(0x16f)]()-_0x214e48;return{'ok':!![],'data':{'result':_0x2e616e,'elapsed':_0x25addc},'message':_0xe1a7a(0x179)+_0x25addc+'ms'};}};function a9_0x539a(){const _0x2e2147=['params','205cnjcTH','str','82131048SbskEe','name','exec','now','45017pGAkkd','221928xXKgVm','1194351hJtaoC','4nfPPsf','9733OamrCa','98150XypBKc','Execute\x20a\x20BFF\x20script\x20by\x20function\x20name','15340023PeBtOt','258zEQXuM','BFF\x20executed\x20in\x20','1072JjjPnR','220HXhxkH'];a9_0x539a=function(){return _0x2e2147;};return a9_0x539a();}
1
+ const a9_0x582373=a9_0x507c;function a9_0x507c(_0x348c76,_0x407e5d){_0x348c76=_0x348c76-0x81;const _0x38bee1=a9_0x38be();let _0x507c3c=_0x38bee1[_0x348c76];return _0x507c3c;}function a9_0x38be(){const _0x383dab=['33880HUEFHq','128658YUuIoc','name','3vMflfm','814coMeXA','1683nssKtW','2617404BTohaO','bff','now','159334eJhRlu','read','BFF\x20executed\x20in\x20','exec','18890XMcRXc','1336535jMMMGk','str','params','430686rBdnCG','36bZosAi'];a9_0x38be=function(){return _0x383dab;};return a9_0x38be();}(function(_0x21bd5b,_0x346e11){const _0x537547=a9_0x507c,_0x27c91a=_0x21bd5b();while(!![]){try{const _0x5a7048=-parseInt(_0x537547(0x90))/0x1+parseInt(_0x537547(0x8d))/0x2+-parseInt(_0x537547(0x92))/0x3*(parseInt(_0x537547(0x82))/0x4)+parseInt(_0x537547(0x8a))/0x5+-parseInt(_0x537547(0x8e))/0x6*(-parseInt(_0x537547(0x85))/0x7)+parseInt(_0x537547(0x8f))/0x8*(parseInt(_0x537547(0x81))/0x9)+parseInt(_0x537547(0x89))/0xa*(-parseInt(_0x537547(0x93))/0xb);if(_0x5a7048===_0x346e11)break;else _0x27c91a['push'](_0x27c91a['shift']());}catch(_0x2feaa4){_0x27c91a['push'](_0x27c91a['shift']());}}}(a9_0x38be,0x773b4));import{executeSdkBff}from'../../core/sdk-client.js';import{parseJsonParams}from'../../utils/params.js';import{NAME_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';export const bffExec={'service':a9_0x582373(0x83),'command':a9_0x582373(0x88),'description':'Execute\x20a\x20BFF\x20script\x20by\x20function\x20name','risk':a9_0x582373(0x86),'flags':[{...NAME_FLAG,'required':!![],'description':'BFF\x20function\x20name\x20to\x20execute'},PARAMS_FLAG],async 'execute'(_0x3d17fa){const _0x5d3df9=a9_0x582373,_0xcbd378=parseJsonParams(_0x3d17fa[_0x5d3df9(0x8b)](_0x5d3df9(0x8c))),_0x4d3c2c=Date[_0x5d3df9(0x84)](),_0x8cf90c=await executeSdkBff(_0x3d17fa[_0x5d3df9(0x8b)](_0x5d3df9(0x91)),_0xcbd378),_0xf8397a=Date[_0x5d3df9(0x84)]()-_0x4d3c2c;return{'ok':!![],'data':{'result':_0x8cf90c,'elapsed':_0xf8397a},'message':_0x5d3df9(0x87)+_0xf8397a+'ms'};}};
@@ -1 +1 @@
1
- (function(_0x3d5a0c,_0x32c014){const _0x34defd=a10_0x4a12,_0xef3897=_0x3d5a0c();while(!![]){try{const _0x37d56e=parseInt(_0x34defd(0x179))/0x1+-parseInt(_0x34defd(0x178))/0x2*(parseInt(_0x34defd(0x176))/0x3)+parseInt(_0x34defd(0x175))/0x4+-parseInt(_0x34defd(0x174))/0x5+-parseInt(_0x34defd(0x173))/0x6+parseInt(_0x34defd(0x172))/0x7*(-parseInt(_0x34defd(0x177))/0x8)+parseInt(_0x34defd(0x17a))/0x9;if(_0x37d56e===_0x32c014)break;else _0xef3897['push'](_0xef3897['shift']());}catch(_0x30896d){_0xef3897['push'](_0xef3897['shift']());}}}(a10_0x1138,0xc7b28));function a10_0x4a12(_0x5af164,_0x39f559){_0x5af164=_0x5af164-0x172;const _0x1138c7=a10_0x1138();let _0x4a12c2=_0x1138c7[_0x5af164];return _0x4a12c2;}import{bffDetail}from'../../commands/bff/detail.js';function a10_0x1138(){const _0x3ee4c1=['1161572KWqjMs','4926tlDmla','1011952EuBmuY','1264VpKRXT','21212zOjUcM','44325117NzivDU','35IHBnvl','8129382qhhfbq','6967735XpNMsI'];a10_0x1138=function(){return _0x3ee4c1;};return a10_0x1138();}import{bffExec}from'../../commands/bff/exec.js';export const bffDefinitions=[bffDetail,bffExec];
1
+ function a10_0x115f(){const _0x4a3129=['5961123XrwOQH','1062RytNWs','8aMBwzA','527071WLiJzO','131945YNGupf','1555816QLupjv','10gPauwZ','6KntHit','31678699uCELan','4UsUMYq','99290rmhoOD','12aSihHk','249816jmblaK'];a10_0x115f=function(){return _0x4a3129;};return a10_0x115f();}function a10_0x101f(_0x1ed6c7,_0x339d13){_0x1ed6c7=_0x1ed6c7-0x1b0;const _0x115f41=a10_0x115f();let _0x101f86=_0x115f41[_0x1ed6c7];return _0x101f86;}(function(_0x265b3a,_0x5f3d1b){const _0x2a009f=a10_0x101f,_0x2a5ec2=_0x265b3a();while(!![]){try{const _0x3eb378=parseInt(_0x2a009f(0x1b3))/0x1*(parseInt(_0x2a009f(0x1b9))/0x2)+parseInt(_0x2a009f(0x1b7))/0x3*(-parseInt(_0x2a009f(0x1b5))/0x4)+parseInt(_0x2a009f(0x1b6))/0x5*(-parseInt(_0x2a009f(0x1bc))/0x6)+-parseInt(_0x2a009f(0x1b0))/0x7*(parseInt(_0x2a009f(0x1b2))/0x8)+parseInt(_0x2a009f(0x1b1))/0x9*(-parseInt(_0x2a009f(0x1ba))/0xa)+-parseInt(_0x2a009f(0x1b4))/0xb+parseInt(_0x2a009f(0x1bb))/0xc*(parseInt(_0x2a009f(0x1b8))/0xd);if(_0x3eb378===_0x5f3d1b)break;else _0x2a5ec2['push'](_0x2a5ec2['shift']());}catch(_0x2326e4){_0x2a5ec2['push'](_0x2a5ec2['shift']());}}}(a10_0x115f,0x91293));import{bffDetail}from'../../commands/bff/detail.js';import{bffExec}from'../../commands/bff/exec.js';export const bffDefinitions=[bffDetail,bffExec];
@@ -1 +1 @@
1
- (function(_0x14420c,_0x3a8a2e){const _0x38fffc=a11_0x3f60,_0x4456f5=_0x14420c();while(!![]){try{const _0x31a47b=-parseInt(_0x38fffc(0x17d))/0x1*(-parseInt(_0x38fffc(0x180))/0x2)+parseInt(_0x38fffc(0x178))/0x3+-parseInt(_0x38fffc(0x176))/0x4+parseInt(_0x38fffc(0x186))/0x5+-parseInt(_0x38fffc(0x17a))/0x6+parseInt(_0x38fffc(0x17f))/0x7*(parseInt(_0x38fffc(0x17c))/0x8)+-parseInt(_0x38fffc(0x177))/0x9;if(_0x31a47b===_0x3a8a2e)break;else _0x4456f5['push'](_0x4456f5['shift']());}catch(_0x1a6df8){_0x4456f5['push'](_0x4456f5['shift']());}}}(a11_0x21dc,0x3a75d));import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG}from'../../constant/product.js';function a11_0x21dc(){const _0xc9d10=['validation','Not\x20inside\x20a\x20project\x20(no\x20',',\x20or\x20run\x20`','newConfigFileName','global','685625ZZNUQc','Use\x20only\x20one\x20config\x20scope\x20flag.','project','813004tNpDWZ','846369rKwuZF','488208dISLcL','project-or-global-explicit','2399898CnePtc','global-default','8FxcDWW','35MJKlFd','inProject','2968714AgbVnH','12158KNrGGt'];a11_0x21dc=function(){return _0xc9d10;};return a11_0x21dc();}export{DEFAULT_APP_PROFILE_NAME,DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';export{RUNTIME_ENV_VALUES}from'../../constant/env.js';export{OUTPUT_FORMAT_VALUES}from'../../constant/output.js';import{isInProject}from'../../context.js';import{CliErrors}from'../../errors.js';function a11_0x3f60(_0x3406bf,_0x222aaf){_0x3406bf=_0x3406bf-0x174;const _0x21dc8d=a11_0x21dc();let _0x3f603e=_0x21dc8d[_0x3406bf];return _0x3f603e;}export{buildAppProfileListFields,CONFIG_ENUM_VALUES,IMPORTABLE_RUNTIME_CONFIG_KEYS,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getConfigDefaultValue,getConfigEnumValues,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isLegacyCompatConfigKey,isTopLevelConfigKey}from'../../config/schema.js';export function resolveConfigScope(_0x426173){const _0x171b15=a11_0x3f60,{explicitGlobal:explicitGlobal=![],explicitProject:explicitProject=![],policy:_0x372f4e}=_0x426173;if(explicitGlobal&&explicitProject)throw CliErrors[_0x171b15(0x181)]('Flags\x20--global\x20and\x20--project\x20are\x20mutually\x20exclusive.',_0x171b15(0x174));if(explicitGlobal)return'global';if(explicitProject)return _0x171b15(0x175);switch(_0x372f4e){case _0x171b15(0x17b):return _0x171b15(0x185);case'project-default':return _0x426173[_0x171b15(0x17e)]??isInProject()?'project':_0x171b15(0x185);case _0x171b15(0x179):if(!(_0x426173['inProject']??isInProject()))throw CliErrors[_0x171b15(0x181)](_0x171b15(0x182)+PRODUCT_CONFIG[_0x171b15(0x184)]+'\x20found).','Add\x20--global\x20to\x20write\x20to\x20~/'+PRODUCT_CONFIG[_0x171b15(0x184)]+_0x171b15(0x183)+CLI_BIN_NAME+'\x20init`\x20first.');return _0x171b15(0x175);}}export function toScopeFlags(_0x23ae28){const _0x146d3b=a11_0x3f60;return{'global':_0x23ae28===_0x146d3b(0x185)};}export function formatScopeLabel(_0x690d52){const _0x2b715c=a11_0x3f60;return _0x690d52===_0x2b715c(0x185)?'\x20(global)':'';}
1
+ (function(_0x33252e,_0x4ffb4c){const _0x19e559=a11_0x5377,_0x142032=_0x33252e();while(!![]){try{const _0x2c2861=-parseInt(_0x19e559(0x1b2))/0x1+-parseInt(_0x19e559(0x1c1))/0x2+parseInt(_0x19e559(0x1b9))/0x3*(parseInt(_0x19e559(0x1ac))/0x4)+parseInt(_0x19e559(0x1b8))/0x5+-parseInt(_0x19e559(0x1b3))/0x6+parseInt(_0x19e559(0x1b1))/0x7+-parseInt(_0x19e559(0x1ad))/0x8*(-parseInt(_0x19e559(0x1bc))/0x9);if(_0x2c2861===_0x4ffb4c)break;else _0x142032['push'](_0x142032['shift']());}catch(_0x4a6400){_0x142032['push'](_0x142032['shift']());}}}(a11_0x220d,0xaeae0));function a11_0x5377(_0x48d3b5,_0x3e98d9){_0x48d3b5=_0x48d3b5-0x1ac;const _0x220d68=a11_0x220d();let _0x5377d8=_0x220d68[_0x48d3b5];return _0x5377d8;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG}from'../../constant/product.js';export{DEFAULT_APP_PROFILE_NAME,DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';export{RUNTIME_ENV_VALUES}from'../../constant/env.js';export{OUTPUT_FORMAT_VALUES}from'../../constant/output.js';function a11_0x220d(){const _0x1d1639=['73144PDCJVu','\x20found).','newConfigFileName','project-default','5560751UzqIVb','246117jbMxPf','6908850jBbbJa','project','Add\x20--global\x20to\x20write\x20to\x20~/',',\x20or\x20run\x20`','\x20(global)','6288655lyyeXo','3YXvsXc','inProject','global','261lPwFVA','validation','Not\x20inside\x20a\x20project\x20(no\x20','project-or-global-explicit','Flags\x20--global\x20and\x20--project\x20are\x20mutually\x20exclusive.','1449788kFVbBL','2082812oOjnvP'];a11_0x220d=function(){return _0x1d1639;};return a11_0x220d();}import{isInProject}from'../../context.js';import{CliErrors}from'../../errors.js';export{buildAppProfileListFields,CONFIG_ENUM_VALUES,IMPORTABLE_RUNTIME_CONFIG_KEYS,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getConfigDefaultValue,getConfigEnumValues,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isLegacyCompatConfigKey,isTopLevelConfigKey}from'../../config/schema.js';export function resolveConfigScope(_0x6dbc1e){const _0x34abfb=a11_0x5377,{explicitGlobal:explicitGlobal=![],explicitProject:explicitProject=![],policy:_0x40ead3}=_0x6dbc1e;if(explicitGlobal&&explicitProject)throw CliErrors[_0x34abfb(0x1bd)](_0x34abfb(0x1c0),'Use\x20only\x20one\x20config\x20scope\x20flag.');if(explicitGlobal)return'global';if(explicitProject)return _0x34abfb(0x1b4);switch(_0x40ead3){case'global-default':return _0x34abfb(0x1bb);case _0x34abfb(0x1b0):return _0x6dbc1e[_0x34abfb(0x1ba)]??isInProject()?_0x34abfb(0x1b4):_0x34abfb(0x1bb);case _0x34abfb(0x1bf):if(!(_0x6dbc1e[_0x34abfb(0x1ba)]??isInProject()))throw CliErrors['validation'](_0x34abfb(0x1be)+PRODUCT_CONFIG['newConfigFileName']+_0x34abfb(0x1ae),_0x34abfb(0x1b5)+PRODUCT_CONFIG[_0x34abfb(0x1af)]+_0x34abfb(0x1b6)+CLI_BIN_NAME+'\x20init`\x20first.');return _0x34abfb(0x1b4);}}export function toScopeFlags(_0x1cdd66){const _0xddcc39=a11_0x5377;return{'global':_0x1cdd66===_0xddcc39(0x1bb)};}export function formatScopeLabel(_0x25081e){const _0x5a64a1=a11_0x5377;return _0x25081e===_0x5a64a1(0x1bb)?_0x5a64a1(0x1b7):'';}
@@ -1 +1 @@
1
- (function(_0x11aad5,_0x177e70){const _0x484113=a12_0x3f4d,_0x179e0a=_0x11aad5();while(!![]){try{const _0x5b1926=-parseInt(_0x484113(0x90))/0x1+parseInt(_0x484113(0x9d))/0x2*(parseInt(_0x484113(0x9a))/0x3)+parseInt(_0x484113(0xa7))/0x4+parseInt(_0x484113(0xaa))/0x5*(-parseInt(_0x484113(0x98))/0x6)+-parseInt(_0x484113(0xab))/0x7+-parseInt(_0x484113(0x99))/0x8*(-parseInt(_0x484113(0x93))/0x9)+-parseInt(_0x484113(0xac))/0xa*(parseInt(_0x484113(0x92))/0xb);if(_0x5b1926===_0x177e70)break;else _0x179e0a['push'](_0x179e0a['shift']());}catch(_0x17efef){_0x179e0a['push'](_0x179e0a['shift']());}}}(a12_0x2db9,0x5e922));import{CliErrors}from'../../errors.js';function isSet(_0x518fcb,_0x5d7fc6){const _0x5b9c7c=a12_0x3f4d,_0x416324=_0x518fcb[_0x5b9c7c(0x96)](_0x5d7fc6);return _0x416324!==undefined&&_0x416324!==''&&_0x416324!==![]&&_0x416324!==0x0;}function fmtNames(_0x320e9f){const _0x5727f9=a12_0x3f4d;return _0x320e9f[_0x5727f9(0x95)](_0x361896=>'--'+_0x361896)[_0x5727f9(0x9f)](',\x20');}function a12_0x3f4d(_0x4b38dc,_0x1cae31){_0x4b38dc=_0x4b38dc-0x8f;const _0x2db96e=a12_0x2db9();let _0x3f4d63=_0x2db96e[_0x4b38dc];return _0x3f4d63;}export function requireOneOf(_0x4768fc,_0x6aadfb,_0x40f8c3){const _0x221279=a12_0x3f4d,_0x22aedc=_0x6aadfb['filter'](_0x269a71=>isSet(_0x4768fc,_0x269a71));if(_0x22aedc['length']!==0x1)throw CliErrors[_0x221279(0x9c)](_0x22aedc[_0x221279(0xa2)]===0x0?_0x221279(0x9b)+fmtNames(_0x6aadfb)+_0x221279(0xa0)+_0x40f8c3+'`.':_0x221279(0xa9)+fmtNames(_0x6aadfb)+'\x20is\x20allowed,\x20found:\x20'+fmtNames(_0x22aedc)+'.',_0x22aedc[_0x221279(0xa2)]===0x0?_0x221279(0x94)+fmtNames(_0x6aadfb):_0x221279(0x97));}export function requireAnyOf(_0x36c729,_0xa4cf90,_0x339228){const _0x5aba18=a12_0x3f4d;if(!_0xa4cf90[_0x5aba18(0x91)](_0x411e00=>isSet(_0x36c729,_0x411e00)))throw CliErrors[_0x5aba18(0x9c)](_0x5aba18(0x8f)+fmtNames(_0xa4cf90)+'\x20is\x20required\x20for\x20`'+_0x339228+'`.',_0x5aba18(0x94)+fmtNames(_0xa4cf90));}export function mutuallyExclusive(_0x3acd8c,_0x22e27f,_0x49b688){const _0x21b3e3=a12_0x3f4d,_0x30958a=_0x22e27f[_0x21b3e3(0xa5)](_0x1a21ad=>isSet(_0x3acd8c,_0x1a21ad));if(_0x30958a[_0x21b3e3(0xa2)]>0x1)throw CliErrors[_0x21b3e3(0x9c)](_0x21b3e3(0xa1)+fmtNames(_0x30958a)+_0x21b3e3(0xa6)+_0x49b688+'`.','Use\x20only\x20one\x20of:\x20'+fmtNames(_0x22e27f));}function a12_0x2db9(){const _0xd58023=['138SBZqny','55664rBxFFH','109959GTPlUc','Exactly\x20one\x20of\x20','validation','16bkAmRU',',\x20got\x20\x22','join','\x20is\x20required\x20for\x20`','Flags\x20','length','str','Invalid\x20--','filter','\x20are\x20mutually\x20exclusive\x20for\x20`','2463792JkLnme',':\x20expected\x20','Only\x20one\x20of\x20','16715YCuHLZ','1843534OFUrLj','16960IlZxZu','At\x20least\x20one\x20of\x20','648093FFoUvr','some','88igEZhG','621yWTnCQ','Provide\x20one\x20of:\x20','map','flag','Remove\x20all\x20but\x20one.'];a12_0x2db9=function(){return _0xd58023;};return a12_0x2db9();}export function validatePattern(_0x1a77b2,_0x170ec3,_0x59fea3,_0x2cf8c4){const _0x5655ee=a12_0x3f4d,_0x4427b0=_0x1a77b2[_0x5655ee(0xa3)](_0x170ec3);if(_0x4427b0&&!_0x59fea3['test'](_0x4427b0))throw CliErrors[_0x5655ee(0x9c)](_0x5655ee(0xa4)+_0x170ec3+_0x5655ee(0xa8)+_0x2cf8c4+_0x5655ee(0x9e)+_0x4427b0+'\x22.');}
1
+ function a12_0x132e(){const _0x2c1127=['test','Exactly\x20one\x20of\x20','2597483wlmzUY','some',',\x20got\x20\x22','join','428bgTIaa','\x20is\x20allowed,\x20found:\x20','49639wrDNhu','24185SXFNly','12120980OedYcr','3284724SFEmfu','Use\x20only\x20one\x20of:\x20','filter','4720504XQHIcA','\x20is\x20required\x20for\x20`','flag','18sMGeYC','1273732GopgYQ','Provide\x20one\x20of:\x20','9OehHNb','Only\x20one\x20of\x20','\x20are\x20mutually\x20exclusive\x20for\x20`','Remove\x20all\x20but\x20one.','map','length','validation',':\x20expected\x20'];a12_0x132e=function(){return _0x2c1127;};return a12_0x132e();}(function(_0x28c3e4,_0x4f9afe){const _0x57c128=a12_0x5118,_0x3b2696=_0x28c3e4();while(!![]){try{const _0x5525ff=-parseInt(_0x57c128(0x105))/0x1+-parseInt(_0x57c128(0xf3))/0x2+parseInt(_0x57c128(0xec))/0x3+-parseInt(_0x57c128(0x103))/0x4*(parseInt(_0x57c128(0x106))/0x5)+-parseInt(_0x57c128(0xf2))/0x6*(parseInt(_0x57c128(0xff))/0x7)+parseInt(_0x57c128(0xef))/0x8+-parseInt(_0x57c128(0xf5))/0x9*(-parseInt(_0x57c128(0xeb))/0xa);if(_0x5525ff===_0x4f9afe)break;else _0x3b2696['push'](_0x3b2696['shift']());}catch(_0x50ced9){_0x3b2696['push'](_0x3b2696['shift']());}}}(a12_0x132e,0x8d8d6));import{CliErrors}from'../../errors.js';function isSet(_0x1d2e98,_0x50ca80){const _0x5a8390=a12_0x5118,_0x38d76c=_0x1d2e98[_0x5a8390(0xf1)](_0x50ca80);return _0x38d76c!==undefined&&_0x38d76c!==''&&_0x38d76c!==![]&&_0x38d76c!==0x0;}function fmtNames(_0x4d1132){const _0x238202=a12_0x5118;return _0x4d1132[_0x238202(0xf9)](_0x62a214=>'--'+_0x62a214)[_0x238202(0x102)](',\x20');}export function requireOneOf(_0x500b7a,_0x249cd2,_0x588795){const _0x257e5c=a12_0x5118,_0x493523=_0x249cd2[_0x257e5c(0xee)](_0x511c9e=>isSet(_0x500b7a,_0x511c9e));if(_0x493523[_0x257e5c(0xfa)]!==0x1)throw CliErrors[_0x257e5c(0xfb)](_0x493523[_0x257e5c(0xfa)]===0x0?_0x257e5c(0xfe)+fmtNames(_0x249cd2)+_0x257e5c(0xf0)+_0x588795+'`.':_0x257e5c(0xf6)+fmtNames(_0x249cd2)+_0x257e5c(0x104)+fmtNames(_0x493523)+'.',_0x493523[_0x257e5c(0xfa)]===0x0?_0x257e5c(0xf4)+fmtNames(_0x249cd2):_0x257e5c(0xf8));}function a12_0x5118(_0x2ba5fa,_0x98f193){_0x2ba5fa=_0x2ba5fa-0xeb;const _0x132eff=a12_0x132e();let _0x511844=_0x132eff[_0x2ba5fa];return _0x511844;}export function requireAnyOf(_0x24e360,_0x2aeee1,_0x593159){const _0x35c995=a12_0x5118;if(!_0x2aeee1[_0x35c995(0x100)](_0x52149d=>isSet(_0x24e360,_0x52149d)))throw CliErrors[_0x35c995(0xfb)]('At\x20least\x20one\x20of\x20'+fmtNames(_0x2aeee1)+'\x20is\x20required\x20for\x20`'+_0x593159+'`.',_0x35c995(0xf4)+fmtNames(_0x2aeee1));}export function mutuallyExclusive(_0x29807e,_0x59664b,_0x615b59){const _0x5bb068=a12_0x5118,_0x33ee17=_0x59664b[_0x5bb068(0xee)](_0x197583=>isSet(_0x29807e,_0x197583));if(_0x33ee17[_0x5bb068(0xfa)]>0x1)throw CliErrors[_0x5bb068(0xfb)]('Flags\x20'+fmtNames(_0x33ee17)+_0x5bb068(0xf7)+_0x615b59+'`.',_0x5bb068(0xed)+fmtNames(_0x59664b));}export function validatePattern(_0x58ae0b,_0x3c4084,_0x1d5460,_0x1a57bd){const _0x120d98=a12_0x5118,_0x143a32=_0x58ae0b['str'](_0x3c4084);if(_0x143a32&&!_0x1d5460[_0x120d98(0xfd)](_0x143a32))throw CliErrors[_0x120d98(0xfb)]('Invalid\x20--'+_0x3c4084+_0x120d98(0xfc)+_0x1a57bd+_0x120d98(0x101)+_0x143a32+'\x22.');}
@@ -1 +1 @@
1
- function a13_0x34e6(){const _0x1da2ac=['params','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','Return\x20full\x20raw\x20response\x20object','2242232MSHkco','number','Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','4725468czBREQ','110512UHKQrq','493761YWUdJd','105ypVxLN','Dataset\x20code\x20(32-char\x20hex\x20UUID)','4105956MKNSgN','string','4725480jFbLIi','a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588a3a79d4a3540bbb2def2ad0a228a9acd)','Resource\x20name\x20for\x20lookup','verbose','552735dxWqJG'];a13_0x34e6=function(){return _0x1da2ac;};return a13_0x34e6();}function a13_0x4e0a(_0x4b877f,_0x22b101){_0x4b877f=_0x4b877f-0x1a5;const _0x34e6c6=a13_0x34e6();let _0x4e0acf=_0x34e6c6[_0x4b877f];return _0x4e0acf;}const a13_0x4ec79e=a13_0x4e0a;(function(_0x310342,_0x27bf97){const _0x300d2b=a13_0x4e0a,_0x272f01=_0x310342();while(!![]){try{const _0x3f236c=parseInt(_0x300d2b(0x1a9))/0x1+-parseInt(_0x300d2b(0x1b6))/0x2+parseInt(_0x300d2b(0x1ae))/0x3+-parseInt(_0x300d2b(0x1ac))/0x4+-parseInt(_0x300d2b(0x1b2))/0x5+parseInt(_0x300d2b(0x1a7))/0x6+-parseInt(_0x300d2b(0x1aa))/0x7*(-parseInt(_0x300d2b(0x1a8))/0x8);if(_0x3f236c===_0x27bf97)break;else _0x272f01['push'](_0x272f01['shift']());}catch(_0x42b0af){_0x272f01['push'](_0x272f01['shift']());}}}(a13_0x34e6,0xc4ab5));export const CODE_FLAG={'name':'code','type':a13_0x4ec79e(0x1ad),'required':!![],'description':a13_0x4ec79e(0x1ab),'pattern':{'regex':/^[a-f0-9]{32}$/i,'description':a13_0x4ec79e(0x1af)}};export const SQLCODE_FLAG={'name':'sqlcode','type':a13_0x4ec79e(0x1ad),'required':!![],'description':a13_0x4ec79e(0x1b4),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':'SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)'}};export const VERBOSE_FLAG={'name':a13_0x4ec79e(0x1b1),'type':'boolean','description':a13_0x4ec79e(0x1b5)};export const PARAMS_FLAG={'name':a13_0x4ec79e(0x1b3),'type':a13_0x4ec79e(0x1ad),'description':a13_0x4ec79e(0x1a6)};export const NAME_FLAG={'name':'name','type':a13_0x4ec79e(0x1ad),'description':a13_0x4ec79e(0x1b0)};export const ID_FLAG={'name':'id','type':a13_0x4ec79e(0x1a5),'required':!![],'description':'Resource\x20ID'};
1
+ const a13_0x7f905e=a13_0x1a1b;(function(_0x549016,_0x3e93a4){const _0x5bf0b0=a13_0x1a1b,_0x2e05ec=_0x549016();while(!![]){try{const _0x5ccd4b=-parseInt(_0x5bf0b0(0x149))/0x1+parseInt(_0x5bf0b0(0x141))/0x2*(parseInt(_0x5bf0b0(0x154))/0x3)+-parseInt(_0x5bf0b0(0x14e))/0x4*(parseInt(_0x5bf0b0(0x14d))/0x5)+-parseInt(_0x5bf0b0(0x151))/0x6*(parseInt(_0x5bf0b0(0x155))/0x7)+-parseInt(_0x5bf0b0(0x14c))/0x8*(parseInt(_0x5bf0b0(0x152))/0x9)+parseInt(_0x5bf0b0(0x144))/0xa*(-parseInt(_0x5bf0b0(0x13f))/0xb)+-parseInt(_0x5bf0b0(0x143))/0xc*(-parseInt(_0x5bf0b0(0x145))/0xd);if(_0x5ccd4b===_0x3e93a4)break;else _0x2e05ec['push'](_0x2e05ec['shift']());}catch(_0x2ada16){_0x2e05ec['push'](_0x2e05ec['shift']());}}}(a13_0x3ff7,0xcd0ab));export const CODE_FLAG={'name':a13_0x7f905e(0x150),'type':a13_0x7f905e(0x14a),'required':!![],'description':'Dataset\x20code\x20(32-char\x20hex\x20UUID)','pattern':{'regex':/^[a-f0-9]{32}$/i,'description':a13_0x7f905e(0x140)}};function a13_0x3ff7(){const _0x3feeba=['368ZaLYpr','verbose','4080fCHbNx','92290hxoLNe','246129BkQVcA','Return\x20full\x20raw\x20response\x20object','params','number','1328532uRqGpk','string','Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','8dMJJiJ','8078215bhcBXB','4nuNukJ','name','code','216XoOsFm','14145777iRMDTq','sqlcode','10767DLbUMl','265111zIDtoR','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','451JmkMNS','a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588a3a79d4a3540bbb2def2ad0a228a9acd)'];a13_0x3ff7=function(){return _0x3feeba;};return a13_0x3ff7();}function a13_0x1a1b(_0x49a028,_0x145c91){_0x49a028=_0x49a028-0x13e;const _0x3ff75a=a13_0x3ff7();let _0x1a1b1d=_0x3ff75a[_0x49a028];return _0x1a1b1d;}export const SQLCODE_FLAG={'name':a13_0x7f905e(0x153),'type':'string','required':!![],'description':'SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a13_0x7f905e(0x13e)}};export const VERBOSE_FLAG={'name':a13_0x7f905e(0x142),'type':'boolean','description':a13_0x7f905e(0x146)};export const PARAMS_FLAG={'name':a13_0x7f905e(0x147),'type':'string','description':a13_0x7f905e(0x14b)};export const NAME_FLAG={'name':a13_0x7f905e(0x14f),'type':a13_0x7f905e(0x14a),'description':'Resource\x20name\x20for\x20lookup'};export const ID_FLAG={'name':'id','type':a13_0x7f905e(0x148),'required':!![],'description':'Resource\x20ID'};
@@ -1 +1 @@
1
- const a14_0x41c305=a14_0x2dc8;(function(_0x2df500,_0x2cec59){const _0x2e4450=a14_0x2dc8,_0x25979f=_0x2df500();while(!![]){try{const _0x423a29=parseInt(_0x2e4450(0x20a))/0x1*(parseInt(_0x2e4450(0x218))/0x2)+-parseInt(_0x2e4450(0x20b))/0x3+parseInt(_0x2e4450(0x208))/0x4+parseInt(_0x2e4450(0x21e))/0x5*(parseInt(_0x2e4450(0x223))/0x6)+parseInt(_0x2e4450(0x20c))/0x7+parseInt(_0x2e4450(0x211))/0x8+parseInt(_0x2e4450(0x222))/0x9*(-parseInt(_0x2e4450(0x21b))/0xa);if(_0x423a29===_0x2cec59)break;else _0x25979f['push'](_0x25979f['shift']());}catch(_0x4dce15){_0x25979f['push'](_0x25979f['shift']());}}}(a14_0x3835,0x1cde7));import{CliErrors}from'../../errors.js';function a14_0x3835(){const _0x3c5139=['9rWXqak','619908WPpDEb','includes','alias','format','read','Deleted\x20`','\x20\x20project:\x20','Key\x20\x22','value','Key\x20not\x20found:\x20','appcode','delete','Settable\x20keys:\x20','pageSize\x20must\x20be\x20a\x20positive\x20number','Write\x20to\x20global\x20config','field','stringify','key','log','\x22\x20not\x20found\x20at\x20top\x20level.','pageSize','\x22\x20is\x20not\x20settable.','riskLevel','validation','../../context.js','length','\x20config\x20get\x20<key>','config','raw','split','keys','(none)','global','write','\x20config\x20delete\x20<key>\x20[--global]','\x22.\x20Allowed:\x20','853392dOkgEa','pretty','1773OOJdrY','360741nYQtEd','74179myEcsN','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','isArray','join','Usage:\x20','296000cTxLez','Missing\x20key\x20or\x20value.','Invalid\x20value\x20for\x20\x22','Config\x20files:\x0a','apps','object','trim','178ISUcKZ','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a','set','3868840qzrGkp','\x20(global)','bool','10EWdHak','\x20\x20global:\x20\x20','Value\x20to\x20assign','\x20config\x20set\x20<key>\x20<value>\x20[--global]'];a14_0x3835=function(){return _0x3c5139;};return a14_0x3835();}import{CLI_BIN_NAME,ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,readScopedConfig,writeScopedConfig,resolveWriteScope,toScopeFlags}from'../../commands/config/shared.js';import{resolveWriteConfigPath,getProjectConfigPath}from'../../context.js';const GLOBAL_FLAG={'name':a14_0x41c305(0x204),'type':'boolean','description':a14_0x41c305(0x1f2),'default':![]};function parseAliasAppcodeSetKey(_0x444f16){const _0x571688=a14_0x41c305,_0xc58798=_0x444f16['split']('.');if(_0xc58798[_0x571688(0x1fd)]!==0x3||_0xc58798[0x0]!==_0x571688(0x215)||_0xc58798[0x2]!==_0x571688(0x1ee))return undefined;const _0x1443cf=_0xc58798[0x1]?.[_0x571688(0x217)]();return _0x1443cf?_0x1443cf:undefined;}function parseAliasDeleteKey(_0x3c803c){const _0x1a89a4=a14_0x41c305,_0x3395d7=_0x3c803c['split']('.');if(_0x3395d7[_0x1a89a4(0x1fd)]===0x2&&_0x3395d7[0x0]===_0x1a89a4(0x215)){const _0x26ae8f=_0x3395d7[0x1]?.[_0x1a89a4(0x217)]();return _0x26ae8f?{'alias':_0x26ae8f}:undefined;}if(_0x3395d7['length']===0x3&&_0x3395d7[0x0]===_0x1a89a4(0x215)&&_0x3395d7[0x2]===_0x1a89a4(0x1ee)){const _0x4dfc0d=_0x3395d7[0x1]?.[_0x1a89a4(0x217)]();return _0x4dfc0d?{'alias':_0x4dfc0d,'field':_0x1a89a4(0x1ee)}:undefined;}return undefined;}function setLocalAppAlias(_0x4cb117,_0x152326,_0x5a15f1){const _0x52314a=a14_0x41c305,_0x7dee41=_0x4cb117[_0x52314a(0x215)]&&typeof _0x4cb117[_0x52314a(0x215)]===_0x52314a(0x216)&&!Array[_0x52314a(0x20e)](_0x4cb117[_0x52314a(0x215)])?_0x4cb117[_0x52314a(0x215)]:{},_0x131d79=_0x7dee41[_0x152326]&&typeof _0x7dee41[_0x152326]===_0x52314a(0x216)&&!Array[_0x52314a(0x20e)](_0x7dee41[_0x152326])?_0x7dee41[_0x152326]:{};_0x131d79['appcode']=_0x5a15f1,_0x7dee41[_0x152326]=_0x131d79,_0x4cb117[_0x52314a(0x215)]=_0x7dee41;}function deleteLocalAppAlias(_0x274c4d,_0x418889){const _0x40bc2e=a14_0x41c305;if(!_0x274c4d[_0x40bc2e(0x215)]||typeof _0x274c4d[_0x40bc2e(0x215)]!==_0x40bc2e(0x216)||Array[_0x40bc2e(0x20e)](_0x274c4d[_0x40bc2e(0x215)]))return![];const _0xbdf178=_0x274c4d['apps'],_0x5c07b9=_0xbdf178[_0x418889[_0x40bc2e(0x225)]];if(!_0x5c07b9||typeof _0x5c07b9!==_0x40bc2e(0x216)||Array[_0x40bc2e(0x20e)](_0x5c07b9))return![];if(!_0x418889[_0x40bc2e(0x1f3)])return delete _0xbdf178[_0x418889[_0x40bc2e(0x225)]],!![];if(!(_0x418889['field']in _0x5c07b9))return![];return delete _0x5c07b9[_0x418889['field']],Object[_0x40bc2e(0x202)](_0x5c07b9)[_0x40bc2e(0x1fd)]===0x0&&delete _0xbdf178[_0x418889[_0x40bc2e(0x225)]],!![];}const listDef={'service':a14_0x41c305(0x1ff),'command':'list','description':'List\x20current\x20config','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x588665){const _0x179119=a14_0x41c305,{buildConfigFromFlags:_0x2522ef}=await import(_0x179119(0x1fc)),_0x47b4a8=_0x2522ef({}),_0x2b1bfa=getProjectConfigPath(),_0x20cd63=resolveWriteConfigPath('global');if(_0x588665[_0x179119(0x226)]===_0x179119(0x209))return{'ok':!![],'message':_0x179119(0x219)+(JSON['stringify'](_0x47b4a8[_0x179119(0x200)],null,0x2)+'\x0a\x0a')+_0x179119(0x214)+(_0x179119(0x229)+(_0x2b1bfa??_0x179119(0x203))+'\x0a')+(_0x179119(0x21f)+_0x20cd63)};return{'ok':!![],'data':{'effective':_0x47b4a8[_0x179119(0x200)],'configFiles':{'project':_0x2b1bfa??null,'global':_0x20cd63}}};}},getDef={'service':a14_0x41c305(0x1ff),'command':'get','description':'Get\x20a\x20config\x20value','risk':a14_0x41c305(0x227),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x41c305(0x1f5),'description':'Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','required':!![]}],'flags':[],async 'execute'(_0x126c63){const _0x15aff=a14_0x41c305,_0x59e851=_0x126c63['args'][0x0];if(!_0x59e851)throw CliErrors['validation']('Missing\x20key\x20argument.','Usage:\x20'+CLI_BIN_NAME+_0x15aff(0x1fe));const {buildConfigFromFlags:_0xaf9a20}=await import(_0x15aff(0x1fc)),{raw:_0x5423c8}=_0xaf9a20({});if(_0x59e851['includes']('.')){const _0x3cf6c1=_0x59e851[_0x15aff(0x201)]('.');let _0x2d634c=_0x5423c8;for(const _0x215ba7 of _0x3cf6c1){if(_0x2d634c==null||typeof _0x2d634c!=='object')throw CliErrors[_0x15aff(0x1fb)](_0x15aff(0x1ed)+_0x59e851);_0x2d634c=_0x2d634c[_0x215ba7];}if(_0x2d634c===undefined)throw CliErrors['validation'](_0x15aff(0x1ed)+_0x59e851);return console[_0x15aff(0x1f6)](typeof _0x2d634c===_0x15aff(0x216)?JSON['stringify'](_0x2d634c,null,0x2):String(_0x2d634c)),{'ok':!![]};}const _0x62b245=_0x5423c8[_0x59e851];if(_0x62b245===undefined)throw CliErrors[_0x15aff(0x1fb)](_0x15aff(0x1ed)+_0x59e851);return console[_0x15aff(0x1f6)](typeof _0x62b245===_0x15aff(0x216)?JSON[_0x15aff(0x1f4)](_0x62b245,null,0x2):String(_0x62b245)),{'ok':!![]};}},setDef={'service':a14_0x41c305(0x1ff),'command':a14_0x41c305(0x21a),'description':'Set\x20a\x20config\x20value','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':getConfigCommandKeyDescription(),'required':!![]},{'name':a14_0x41c305(0x1ec),'description':a14_0x41c305(0x220),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x32fb8b){const _0x1ab0e3=a14_0x41c305,_0x5f1c80=_0x32fb8b['args'][0x0],_0x4c1c8e=_0x32fb8b['args'][0x1];if(!_0x5f1c80||_0x4c1c8e===undefined)throw CliErrors[_0x1ab0e3(0x1fb)](_0x1ab0e3(0x212),_0x1ab0e3(0x210)+CLI_BIN_NAME+_0x1ab0e3(0x221));if(ENUM_KEYS[_0x5f1c80]&&!ENUM_KEYS[_0x5f1c80][_0x1ab0e3(0x224)](_0x4c1c8e))throw CliErrors[_0x1ab0e3(0x1fb)](_0x1ab0e3(0x213)+_0x5f1c80+_0x1ab0e3(0x207)+ENUM_KEYS[_0x5f1c80][_0x1ab0e3(0x20f)](',\x20'));if(_0x5f1c80===_0x1ab0e3(0x1fa))throw CliErrors[_0x1ab0e3(0x1fb)](_0x1ab0e3(0x20d));if(_0x5f1c80===_0x1ab0e3(0x1f8)){const _0x13c868=Number(_0x4c1c8e);if(isNaN(_0x13c868)||_0x13c868<=0x0)throw CliErrors[_0x1ab0e3(0x1fb)](_0x1ab0e3(0x1f1));}const _0x143c6d=resolveWriteScope({'explicitGlobal':_0x32fb8b[_0x1ab0e3(0x21d)](_0x1ab0e3(0x204)),'policy':'project-or-global-explicit'}),_0x215843=toScopeFlags(_0x143c6d),_0x4823f4=readScopedConfig(_0x215843),_0x1a5a09=parseAliasAppcodeSetKey(_0x5f1c80);if(!_0x1a5a09&&!isTopLevelConfigKey(_0x5f1c80))throw CliErrors[_0x1ab0e3(0x1fb)]('Top-level\x20key\x20\x22'+_0x5f1c80+_0x1ab0e3(0x1f9),_0x1ab0e3(0x1f0)+getTopLevelConfigKeySummary()+';\x20apps.<alias>.appcode');return _0x1a5a09?setLocalAppAlias(_0x4823f4,_0x1a5a09,_0x4c1c8e):_0x4823f4[_0x5f1c80]=_0x5f1c80===_0x1ab0e3(0x1f8)?Number(_0x4c1c8e):_0x4c1c8e,console[_0x1ab0e3(0x1f6)]('Set\x20`'+_0x5f1c80+'`\x20=\x20\x22'+_0x4c1c8e+'\x22'+(_0x143c6d==='global'?_0x1ab0e3(0x21c):'')),writeScopedConfig(_0x4823f4,_0x215843),{'ok':!![]};}},deleteDef={'service':a14_0x41c305(0x1ff),'command':a14_0x41c305(0x1ef),'description':'Delete\x20a\x20config\x20value','risk':a14_0x41c305(0x205),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x41c305(0x1f5),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x567104){const _0x56d708=a14_0x41c305,_0x4a8a3e=_0x567104['args'][0x0];if(!_0x4a8a3e)throw CliErrors[_0x56d708(0x1fb)]('Missing\x20key\x20argument.',_0x56d708(0x210)+CLI_BIN_NAME+_0x56d708(0x206));const _0x6bedb9=resolveWriteScope({'explicitGlobal':_0x567104[_0x56d708(0x21d)](_0x56d708(0x204)),'policy':'project-or-global-explicit'}),_0x65bb1c=toScopeFlags(_0x6bedb9),_0x3a1239=readScopedConfig(_0x65bb1c),_0xceea65=parseAliasDeleteKey(_0x4a8a3e);if(_0xceea65){if(!deleteLocalAppAlias(_0x3a1239,_0xceea65))throw CliErrors[_0x56d708(0x1fb)](_0x56d708(0x1ed)+_0x4a8a3e);return console[_0x56d708(0x1f6)](_0x56d708(0x228)+_0x4a8a3e+'`'+(_0x6bedb9===_0x56d708(0x204)?_0x56d708(0x21c):'')),writeScopedConfig(_0x3a1239,_0x65bb1c),{'ok':!![]};}if(_0x3a1239[_0x4a8a3e]===undefined)throw CliErrors['validation'](_0x56d708(0x22a)+_0x4a8a3e+_0x56d708(0x1f7));return delete _0x3a1239[_0x4a8a3e],console[_0x56d708(0x1f6)](_0x56d708(0x228)+_0x4a8a3e+'`'+(_0x6bedb9===_0x56d708(0x204)?'\x20(global)':'')),writeScopedConfig(_0x3a1239,_0x65bb1c),{'ok':!![]};}};function a14_0x2dc8(_0x538db4,_0x2011bd){_0x538db4=_0x538db4-0x1ec;const _0x38359b=a14_0x3835();let _0x2dc874=_0x38359b[_0x538db4];return _0x2dc874;}export const configDefinitions=[listDef,getDef,setDef,deleteDef];
1
+ const a14_0x590851=a14_0x5ce9;function a14_0x5ce9(_0x449f66,_0x3c9a3f){_0x449f66=_0x449f66-0x1c6;const _0xbf49ba=a14_0xbf49();let _0x5ce978=_0xbf49ba[_0x449f66];return _0x5ce978;}(function(_0x328309,_0x2f627a){const _0x365e5c=a14_0x5ce9,_0xc5627f=_0x328309();while(!![]){try{const _0xf8bd5e=parseInt(_0x365e5c(0x1f7))/0x1+parseInt(_0x365e5c(0x1d0))/0x2+-parseInt(_0x365e5c(0x203))/0x3*(-parseInt(_0x365e5c(0x1dc))/0x4)+-parseInt(_0x365e5c(0x1df))/0x5+-parseInt(_0x365e5c(0x1d3))/0x6+-parseInt(_0x365e5c(0x1d6))/0x7+-parseInt(_0x365e5c(0x1da))/0x8*(-parseInt(_0x365e5c(0x206))/0x9);if(_0xf8bd5e===_0x2f627a)break;else _0xc5627f['push'](_0xc5627f['shift']());}catch(_0x2cfe09){_0xc5627f['push'](_0xc5627f['shift']());}}}(a14_0xbf49,0xe254c));import{CliErrors}from'../../errors.js';function a14_0xbf49(){const _0x304c72=['Config\x20files:\x0a','stringify','log','\x22\x20not\x20found\x20at\x20top\x20level.','Write\x20to\x20global\x20config','Value\x20to\x20assign','object','includes','Settable\x20keys:\x20','\x22\x20is\x20not\x20settable.','value','field','pretty','trim','\x20(global)','\x20config\x20delete\x20<key>\x20[--global]','Invalid\x20value\x20for\x20\x22','List\x20current\x20config','bool','Usage:\x20','1246256misbye','length','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a','Set\x20a\x20config\x20value','alias','format','Key\x20not\x20found:\x20','global','Key\x20\x22','raw','pageSize','pageSize\x20must\x20be\x20a\x20positive\x20number','89190jOHlYt','Get\x20a\x20config\x20value','\x22.\x20Allowed:\x20','604026EZQNhx','read','Top-level\x20key\x20\x22','../../context.js','key','split','isArray','validation','Delete\x20a\x20config\x20value','Missing\x20key\x20or\x20value.','\x20config\x20get\x20<key>','(none)','2666868SdSIPN','project-or-global-explicit','keys','3650094xcOJBZ','\x20config\x20set\x20<key>\x20<value>\x20[--global]','config','10366538RyZEOK','\x20\x20global:\x20\x20','appcode','args','56elqlLA','Missing\x20key\x20argument.','28TeBlaI',';\x20apps.<alias>.appcode','Set\x20`','1206315GEfrOl','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','write','apps'];a14_0xbf49=function(){return _0x304c72;};return a14_0xbf49();}import{CLI_BIN_NAME,ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,readScopedConfig,writeScopedConfig,resolveWriteScope,toScopeFlags}from'../../commands/config/shared.js';import{resolveWriteConfigPath,getProjectConfigPath}from'../../context.js';const GLOBAL_FLAG={'name':a14_0x590851(0x1fe),'type':'boolean','description':a14_0x590851(0x1e7),'default':![]};function parseAliasAppcodeSetKey(_0x28f8c5){const _0x1e5800=a14_0x590851,_0x2abeb3=_0x28f8c5[_0x1e5800(0x1c9)]('.');if(_0x2abeb3[_0x1e5800(0x1f8)]!==0x3||_0x2abeb3[0x0]!==_0x1e5800(0x1e2)||_0x2abeb3[0x2]!=='appcode')return undefined;const _0x233a65=_0x2abeb3[0x1]?.[_0x1e5800(0x1f0)]();return _0x233a65?_0x233a65:undefined;}function parseAliasDeleteKey(_0x34be96){const _0x2df27c=a14_0x590851,_0x31508b=_0x34be96['split']('.');if(_0x31508b[_0x2df27c(0x1f8)]===0x2&&_0x31508b[0x0]===_0x2df27c(0x1e2)){const _0x402709=_0x31508b[0x1]?.[_0x2df27c(0x1f0)]();return _0x402709?{'alias':_0x402709}:undefined;}if(_0x31508b['length']===0x3&&_0x31508b[0x0]==='apps'&&_0x31508b[0x2]==='appcode'){const _0x4842ab=_0x31508b[0x1]?.['trim']();return _0x4842ab?{'alias':_0x4842ab,'field':_0x2df27c(0x1d8)}:undefined;}return undefined;}function setLocalAppAlias(_0x5373a6,_0x37b8d1,_0x22ad39){const _0x1eca9c=a14_0x590851,_0x2dd810=_0x5373a6['apps']&&typeof _0x5373a6[_0x1eca9c(0x1e2)]===_0x1eca9c(0x1e9)&&!Array['isArray'](_0x5373a6[_0x1eca9c(0x1e2)])?_0x5373a6['apps']:{},_0xa4260f=_0x2dd810[_0x37b8d1]&&typeof _0x2dd810[_0x37b8d1]==='object'&&!Array[_0x1eca9c(0x1ca)](_0x2dd810[_0x37b8d1])?_0x2dd810[_0x37b8d1]:{};_0xa4260f[_0x1eca9c(0x1d8)]=_0x22ad39,_0x2dd810[_0x37b8d1]=_0xa4260f,_0x5373a6[_0x1eca9c(0x1e2)]=_0x2dd810;}function deleteLocalAppAlias(_0x2dbf68,_0x2a1726){const _0x4b2ea1=a14_0x590851;if(!_0x2dbf68[_0x4b2ea1(0x1e2)]||typeof _0x2dbf68['apps']!==_0x4b2ea1(0x1e9)||Array[_0x4b2ea1(0x1ca)](_0x2dbf68[_0x4b2ea1(0x1e2)]))return![];const _0x1380cb=_0x2dbf68[_0x4b2ea1(0x1e2)],_0x301b57=_0x1380cb[_0x2a1726[_0x4b2ea1(0x1fb)]];if(!_0x301b57||typeof _0x301b57!=='object'||Array[_0x4b2ea1(0x1ca)](_0x301b57))return![];if(!_0x2a1726[_0x4b2ea1(0x1ee)])return delete _0x1380cb[_0x2a1726[_0x4b2ea1(0x1fb)]],!![];if(!(_0x2a1726['field']in _0x301b57))return![];return delete _0x301b57[_0x2a1726[_0x4b2ea1(0x1ee)]],Object[_0x4b2ea1(0x1d2)](_0x301b57)['length']===0x0&&delete _0x1380cb[_0x2a1726[_0x4b2ea1(0x1fb)]],!![];}const listDef={'service':'config','command':'list','description':a14_0x590851(0x1f4),'risk':a14_0x590851(0x207),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x38056c){const _0x520fe8=a14_0x590851,{buildConfigFromFlags:_0x5a0c39}=await import(_0x520fe8(0x1c7)),_0x32cc15=_0x5a0c39({}),_0x428e4f=getProjectConfigPath(),_0x759dae=resolveWriteConfigPath(_0x520fe8(0x1fe));if(_0x38056c[_0x520fe8(0x1fc)]===_0x520fe8(0x1ef))return{'ok':!![],'message':_0x520fe8(0x1f9)+(JSON[_0x520fe8(0x1e4)](_0x32cc15['raw'],null,0x2)+'\x0a\x0a')+_0x520fe8(0x1e3)+('\x20\x20project:\x20'+(_0x428e4f??_0x520fe8(0x1cf))+'\x0a')+(_0x520fe8(0x1d7)+_0x759dae)};return{'ok':!![],'data':{'effective':_0x32cc15[_0x520fe8(0x200)],'configFiles':{'project':_0x428e4f??null,'global':_0x759dae}}};}},getDef={'service':a14_0x590851(0x1d5),'command':'get','description':a14_0x590851(0x204),'risk':a14_0x590851(0x207),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x590851(0x1c8),'description':a14_0x590851(0x1e0),'required':!![]}],'flags':[],async 'execute'(_0x42832e){const _0x3eae64=a14_0x590851,_0x2e8d53=_0x42832e[_0x3eae64(0x1d9)][0x0];if(!_0x2e8d53)throw CliErrors['validation'](_0x3eae64(0x1db),_0x3eae64(0x1f6)+CLI_BIN_NAME+_0x3eae64(0x1ce));const {buildConfigFromFlags:_0x4b4684}=await import(_0x3eae64(0x1c7)),{raw:_0x26c68b}=_0x4b4684({});if(_0x2e8d53[_0x3eae64(0x1ea)]('.')){const _0x411b34=_0x2e8d53[_0x3eae64(0x1c9)]('.');let _0x23c3fa=_0x26c68b;for(const _0x57e547 of _0x411b34){if(_0x23c3fa==null||typeof _0x23c3fa!==_0x3eae64(0x1e9))throw CliErrors[_0x3eae64(0x1cb)](_0x3eae64(0x1fd)+_0x2e8d53);_0x23c3fa=_0x23c3fa[_0x57e547];}if(_0x23c3fa===undefined)throw CliErrors[_0x3eae64(0x1cb)](_0x3eae64(0x1fd)+_0x2e8d53);return console['log'](typeof _0x23c3fa==='object'?JSON[_0x3eae64(0x1e4)](_0x23c3fa,null,0x2):String(_0x23c3fa)),{'ok':!![]};}const _0x5d3fb3=_0x26c68b[_0x2e8d53];if(_0x5d3fb3===undefined)throw CliErrors[_0x3eae64(0x1cb)]('Key\x20not\x20found:\x20'+_0x2e8d53);return console[_0x3eae64(0x1e5)](typeof _0x5d3fb3===_0x3eae64(0x1e9)?JSON[_0x3eae64(0x1e4)](_0x5d3fb3,null,0x2):String(_0x5d3fb3)),{'ok':!![]};}},setDef={'service':'config','command':'set','description':a14_0x590851(0x1fa),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x590851(0x1c8),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a14_0x590851(0x1ed),'description':a14_0x590851(0x1e8),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x483cae){const _0x421136=a14_0x590851,_0x16e6a0=_0x483cae[_0x421136(0x1d9)][0x0],_0x3f3805=_0x483cae[_0x421136(0x1d9)][0x1];if(!_0x16e6a0||_0x3f3805===undefined)throw CliErrors['validation'](_0x421136(0x1cd),'Usage:\x20'+CLI_BIN_NAME+_0x421136(0x1d4));if(ENUM_KEYS[_0x16e6a0]&&!ENUM_KEYS[_0x16e6a0][_0x421136(0x1ea)](_0x3f3805))throw CliErrors[_0x421136(0x1cb)](_0x421136(0x1f3)+_0x16e6a0+_0x421136(0x205)+ENUM_KEYS[_0x16e6a0]['join'](',\x20'));if(_0x16e6a0==='riskLevel')throw CliErrors['validation']('\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.');if(_0x16e6a0===_0x421136(0x201)){const _0x2a65eb=Number(_0x3f3805);if(isNaN(_0x2a65eb)||_0x2a65eb<=0x0)throw CliErrors['validation'](_0x421136(0x202));}const _0x268af5=resolveWriteScope({'explicitGlobal':_0x483cae['bool'](_0x421136(0x1fe)),'policy':'project-or-global-explicit'}),_0x295945=toScopeFlags(_0x268af5),_0x3e82bd=readScopedConfig(_0x295945),_0x18cbff=parseAliasAppcodeSetKey(_0x16e6a0);if(!_0x18cbff&&!isTopLevelConfigKey(_0x16e6a0))throw CliErrors[_0x421136(0x1cb)](_0x421136(0x1c6)+_0x16e6a0+_0x421136(0x1ec),_0x421136(0x1eb)+getTopLevelConfigKeySummary()+_0x421136(0x1dd));return _0x18cbff?setLocalAppAlias(_0x3e82bd,_0x18cbff,_0x3f3805):_0x3e82bd[_0x16e6a0]=_0x16e6a0==='pageSize'?Number(_0x3f3805):_0x3f3805,console[_0x421136(0x1e5)](_0x421136(0x1de)+_0x16e6a0+'`\x20=\x20\x22'+_0x3f3805+'\x22'+(_0x268af5===_0x421136(0x1fe)?_0x421136(0x1f1):'')),writeScopedConfig(_0x3e82bd,_0x295945),{'ok':!![]};}},deleteDef={'service':a14_0x590851(0x1d5),'command':'delete','description':a14_0x590851(0x1cc),'risk':a14_0x590851(0x1e1),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x590851(0x1c8),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x3b235a){const _0x149d4b=a14_0x590851,_0x10f229=_0x3b235a[_0x149d4b(0x1d9)][0x0];if(!_0x10f229)throw CliErrors[_0x149d4b(0x1cb)]('Missing\x20key\x20argument.',_0x149d4b(0x1f6)+CLI_BIN_NAME+_0x149d4b(0x1f2));const _0x3cd90d=resolveWriteScope({'explicitGlobal':_0x3b235a[_0x149d4b(0x1f5)](_0x149d4b(0x1fe)),'policy':_0x149d4b(0x1d1)}),_0x19a9c4=toScopeFlags(_0x3cd90d),_0x14cf6f=readScopedConfig(_0x19a9c4),_0x3ecdbb=parseAliasDeleteKey(_0x10f229);if(_0x3ecdbb){if(!deleteLocalAppAlias(_0x14cf6f,_0x3ecdbb))throw CliErrors[_0x149d4b(0x1cb)](_0x149d4b(0x1fd)+_0x10f229);return console['log']('Deleted\x20`'+_0x10f229+'`'+(_0x3cd90d===_0x149d4b(0x1fe)?_0x149d4b(0x1f1):'')),writeScopedConfig(_0x14cf6f,_0x19a9c4),{'ok':!![]};}if(_0x14cf6f[_0x10f229]===undefined)throw CliErrors[_0x149d4b(0x1cb)](_0x149d4b(0x1ff)+_0x10f229+_0x149d4b(0x1e6));return delete _0x14cf6f[_0x10f229],console['log']('Deleted\x20`'+_0x10f229+'`'+(_0x3cd90d===_0x149d4b(0x1fe)?_0x149d4b(0x1f1):'')),writeScopedConfig(_0x14cf6f,_0x19a9c4),{'ok':!![]};}};export const configDefinitions=[listDef,getDef,setDef,deleteDef];
@@ -1 +1 @@
1
- (function(_0xaf018e,_0x134981){var _0x4d4d28=a15_0x4579,_0x56b29f=_0xaf018e();while(!![]){try{var _0x3b72d4=-parseInt(_0x4d4d28(0x1ad))/0x1*(-parseInt(_0x4d4d28(0x1a9))/0x2)+parseInt(_0x4d4d28(0x1a7))/0x3*(parseInt(_0x4d4d28(0x1aa))/0x4)+-parseInt(_0x4d4d28(0x1ac))/0x5*(parseInt(_0x4d4d28(0x1ab))/0x6)+-parseInt(_0x4d4d28(0x1a8))/0x7*(parseInt(_0x4d4d28(0x1ae))/0x8)+-parseInt(_0x4d4d28(0x1a3))/0x9*(-parseInt(_0x4d4d28(0x1a2))/0xa)+-parseInt(_0x4d4d28(0x1a6))/0xb+-parseInt(_0x4d4d28(0x1a4))/0xc*(-parseInt(_0x4d4d28(0x1a5))/0xd);if(_0x3b72d4===_0x134981)break;else _0x56b29f['push'](_0x56b29f['shift']());}catch(_0x471a76){_0x56b29f['push'](_0x56b29f['shift']());}}}(a15_0x59b5,0x63b51));function a15_0x59b5(){var _0x57fddd=['36lXJloZ','1204272XeUJKu','13vPjiAJ','2049630rgfVxZ','866787sTCfTW','18263HIqJWN','2pfFzRI','8DzTCbe','6OWkfXx','1384195ORygnq','210421uNZrSf','296jeWhyq','198670ybEGsf'];a15_0x59b5=function(){return _0x57fddd;};return a15_0x59b5();}import{CLI_BIN_NAME}from'../../constant/cli.js';export{CLI_BIN_NAME};function a15_0x4579(_0x4417bb,_0x2d68ce){_0x4417bb=_0x4417bb-0x1a2;var _0x59b537=a15_0x59b5();var _0x457965=_0x59b537[_0x4417bb];return _0x457965;}export{readScopedConfig,writeScopedConfig}from'../../context.js';export{resolveConfigScope as resolveWriteScope,TOP_LEVEL_CONFIG_KEYS as TOP_LEVEL_KEYS,CONFIG_ENUM_VALUES as ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,toScopeFlags}from'../../commands/common/config-policy.js';
1
+ function a15_0xdf3c(){var _0x1a36eb=['8371027DBcbVv','2410QXXxks','1884dtoeet','999866UJPBhI','7557ZtnsZL','508vBDIGW','790128dJQNFZ','22511286mOcRCD','7161512lJrsLd'];a15_0xdf3c=function(){return _0x1a36eb;};return a15_0xdf3c();}(function(_0x2c5626,_0x724505){var _0x961b05=a15_0x5488,_0x19ad51=_0x2c5626();while(!![]){try{var _0x3db98a=-parseInt(_0x961b05(0x194))/0x1+-parseInt(_0x961b05(0x18d))/0x2*(parseInt(_0x961b05(0x18c))/0x3)+parseInt(_0x961b05(0x18e))/0x4+-parseInt(_0x961b05(0x192))/0x5*(parseInt(_0x961b05(0x193))/0x6)+-parseInt(_0x961b05(0x191))/0x7+parseInt(_0x961b05(0x190))/0x8+parseInt(_0x961b05(0x18f))/0x9;if(_0x3db98a===_0x724505)break;else _0x19ad51['push'](_0x19ad51['shift']());}catch(_0x5bfc52){_0x19ad51['push'](_0x19ad51['shift']());}}}(a15_0xdf3c,0x94362));function a15_0x5488(_0x1bf875,_0x3ae94f){_0x1bf875=_0x1bf875-0x18c;var _0xdf3c28=a15_0xdf3c();var _0x548871=_0xdf3c28[_0x1bf875];return _0x548871;}import{CLI_BIN_NAME}from'../../constant/cli.js';export{CLI_BIN_NAME};export{readScopedConfig,writeScopedConfig}from'../../context.js';export{resolveConfigScope as resolveWriteScope,TOP_LEVEL_CONFIG_KEYS as TOP_LEVEL_KEYS,CONFIG_ENUM_VALUES as ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,toScopeFlags}from'../../commands/common/config-policy.js';
@@ -1 +1 @@
1
- const a16_0x1375d7=a16_0x1980;function a16_0x1980(_0xe3b50c,_0x3dbf34){_0xe3b50c=_0xe3b50c-0x8a;const _0x1ca28f=a16_0x1ca2();let _0x198086=_0x1ca28f[_0xe3b50c];return _0x198086;}(function(_0x18f9ef,_0x6855ec){const _0x2af370=a16_0x1980,_0x42e343=_0x18f9ef();while(!![]){try{const _0x1eca6b=parseInt(_0x2af370(0x8e))/0x1*(parseInt(_0x2af370(0x96))/0x2)+parseInt(_0x2af370(0x9a))/0x3*(parseInt(_0x2af370(0xab))/0x4)+parseInt(_0x2af370(0xa4))/0x5+parseInt(_0x2af370(0xdb))/0x6+-parseInt(_0x2af370(0xa1))/0x7*(parseInt(_0x2af370(0xc8))/0x8)+-parseInt(_0x2af370(0xa3))/0x9*(-parseInt(_0x2af370(0x98))/0xa)+-parseInt(_0x2af370(0xce))/0xb*(parseInt(_0x2af370(0x97))/0xc);if(_0x1eca6b===_0x6855ec)break;else _0x42e343['push'](_0x42e343['shift']());}catch(_0x5c1894){_0x42e343['push'](_0x42e343['shift']());}}}(a16_0x1ca2,0x793bf));import{executeData}from'../../core/sdk-client.js';import{CODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';import{requireAnyOf}from'../../commands/common/constraints.js';import{parseJsonParams,parseJsonParamsValue,parseBatchCreateItemsFromParams}from'../../utils/params.js';function a16_0x1ca2(){const _0x22a775=['now','\x20\x20LOGICAL\x20COMBINATORS','\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Rounded\x20average\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg\x22,\x22round\x22:true,\x22precision\x22:2}','high-risk-write','\x20\x20\x20\x20having\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Post-aggregation\x20filter,\x20e.g.\x20{\x22total\x22:{\x22$gt\x22:1000}}','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20distinct\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22,\x22distinct\x22:true}','2998564vokRsF','\x20\x20PAGINATION','\x20\x20\x20\x20$contain\x20\x20\x20\x20\x20Substring\x20match\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$contain\x22:\x22test\x22}}','batchCreate','\x20\x20EXAMPLES','code','\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Average\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg_score\x22}','Update\x20an\x20existing\x20record','\x20\x20\x20\x20MIN\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Minimum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22price\x22,\x22type\x22:\x22MIN\x22,\x22alias\x22:\x22min_price\x22}','str','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]','build','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','write','\x20\x20\x20\x20SUM\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Sum\x20of\x20field\x20values\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}','\x20\x20WHERE\x20OPERATORS','Create\x20multiple\x20records\x20in\x20one\x20request\x20(SDK\x20batchCreate)','delete','/api/{appCode}/','\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','Get\x20a\x20single\x20record\x20by\x20ID','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter','body','create','helpExtra','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]','filter','operation','8VuRsng','Preview:\x20data\x20','\x20\x20\x20\x20$lte\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20or\x20equal\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lte\x22:1000}}','Delete\x20a\x20record\x20(requires\x20--yes\x20in\x20non-interactive)','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22field\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[\x22region\x22],\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}}}\x27','143uJlnql','map','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','aggregate','\x20\x20\x20\x20$or\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Any\x20condition\x20matches\x20\x20{\x22$or\x22:[{\x22status\x22:{\x22$eq\x22:\x22active\x22}},{\x22status\x22:{\x22$eq\x22:\x22pending\x22}}]}','\x20\x20\x20\x20Correct:\x20\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:10}\x27','POST','Create\x20a\x20new\x20record\x20in\x20a\x20dataset','JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20Example:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27','description','risk','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','\x20\x20\x20\x20$ne\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Not\x20equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22status\x22:{\x22$ne\x22:\x22deleted\x22}}','849408PpeFrj','\x20\x20\x20\x20$startWith\x20\x20\x20Starts\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$startWith\x22:\x22Mr.\x22}}','Example:\x20\x27{\x22aggregate\x22:[{\x22field\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','read','\x20\x20\x20\x20$and\x20\x20\x20\x20\x20\x20\x20\x20\x20All\x20conditions\x20match\x20\x20\x20{\x22$and\x22:[{\x22age\x22:{\x22$gte\x22:18}},{\x22status\x22:{\x22$eq\x22:\x22active\x22}}]}','data','\x20\x20\x20\x20$eq\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22age\x22:{\x22$eq\x22:18}}','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20of\x20records\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}','\x20\x20\x20\x20$endWith\x20\x20\x20\x20\x20Ends\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22email\x22:{\x22$endWith\x22:\x22@example.com\x22}}','407657tWZMmg','join','Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','getOne','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22id\x22:\x22desc\x22},{\x22name\x22:\x22asc\x22}]','\x20\x20\x20\x20$gt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$gt\x22:100}}','\x20\x20\x20\x20$in\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Value\x20in\x20set\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22country\x22:{\x22$in\x22:[\x22CN\x22,\x22US\x22]}}','4FkxAqp','965256uSEFvq','1282470hgKYwu','command','3DrGPEc','params','\x20\x20\x20\x20MAX\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Maximum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22price\x22,\x22type\x22:\x22MAX\x22,\x22alias\x22:\x22max_price\x22}','paramsRequired','\x20on\x20dataset\x20','JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','update','6378778bxCKcr','\x20\x20\x20\x20$gte\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20or\x20equal\x20\x20{\x22amount\x22:{\x22$gte\x22:100}}','45VlDnDL','528825umYPon'];a16_0x1ca2=function(){return _0x22a775;};return a16_0x1ca2();}import{dryRun}from'../../framework/dryrun.js';const specs=[{'command':a16_0x1375d7(0xc6),'operation':'filter','risk':a16_0x1375d7(0xde),'paramsRequired':![],'description':'Filter\x20dataset\x20records\x20with\x20query\x20conditions','paramsHint':a16_0x1375d7(0x92)+a16_0x1375d7(0xd0),'helpExtra':[a16_0x1375d7(0xba),a16_0x1375d7(0x8b),a16_0x1375d7(0xda),a16_0x1375d7(0x94),a16_0x1375d7(0xa2),'\x20\x20\x20\x20$lt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lt\x22:1000}}',a16_0x1375d7(0xca),a16_0x1375d7(0x95),a16_0x1375d7(0xad),a16_0x1375d7(0xdc),a16_0x1375d7(0x8d),'',a16_0x1375d7(0xa6),a16_0x1375d7(0xdf),a16_0x1375d7(0xd2),'','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)',a16_0x1375d7(0xd9),a16_0x1375d7(0xc5),a16_0x1375d7(0x93),'\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)',a16_0x1375d7(0xb7),'',a16_0x1375d7(0xac),'\x20\x20\x20\x20Pagination\x20is\x20controlled\x20via\x20JSON\x20in\x20--params.\x20Do\x20NOT\x20use\x20--page-size\x20as\x20a\x20CLI\x20flag.',a16_0x1375d7(0xd3),'\x20\x20\x20\x20Wrong:\x20\x20\x20\x20--page-size\x2010\x20\x20(this\x20is\x20not\x20a\x20valid\x20flag)']['join']('\x0a')},{'command':a16_0x1375d7(0x91),'operation':a16_0x1375d7(0x91),'risk':a16_0x1375d7(0xde),'paramsRequired':!![],'description':a16_0x1375d7(0xc0),'paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'},{'command':a16_0x1375d7(0xc3),'operation':a16_0x1375d7(0xc3),'risk':'write','paramsRequired':!![],'description':a16_0x1375d7(0xd5),'paramsHint':a16_0x1375d7(0xcc)},{'command':'batchCreate','operation':a16_0x1375d7(0xae),'risk':a16_0x1375d7(0xb8),'paramsRequired':!![],'description':a16_0x1375d7(0xbb),'paramsHint':a16_0x1375d7(0x9f)},{'command':'update','operation':a16_0x1375d7(0xa0),'risk':a16_0x1375d7(0xb8),'paramsRequired':!![],'description':a16_0x1375d7(0xb2),'paramsHint':a16_0x1375d7(0xd6)},{'command':a16_0x1375d7(0xbc),'operation':'delete','risk':a16_0x1375d7(0xa8),'paramsRequired':!![],'description':a16_0x1375d7(0xcb),'paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'},{'command':a16_0x1375d7(0xd1),'operation':a16_0x1375d7(0xd1),'risk':a16_0x1375d7(0xde),'paramsRequired':![],'description':a16_0x1375d7(0x90),'paramsHint':'JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20'+a16_0x1375d7(0xdd),'helpExtra':['\x20\x20AGGREGATE\x20TYPES',a16_0x1375d7(0xb9),a16_0x1375d7(0x8c),a16_0x1375d7(0xaa),a16_0x1375d7(0xb1),a16_0x1375d7(0xa7),a16_0x1375d7(0x9c),a16_0x1375d7(0xb3),'','\x20\x20PARAMS\x20STRUCTURE','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return\x20alongside\x20aggregates,\x20e.g.\x20[\x22status\x22,\x22region\x22]',a16_0x1375d7(0xbf),'\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]',a16_0x1375d7(0xa9),a16_0x1375d7(0xb5),'',a16_0x1375d7(0xaf),a16_0x1375d7(0xbe),'\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22field\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','',a16_0x1375d7(0xc1),a16_0x1375d7(0xcd)][a16_0x1375d7(0x8f)]('\x0a')}];function makeDataCommand(_0x5e20a7){const _0xc9fc5c=a16_0x1375d7,_0x2e35a9='data\x20'+_0x5e20a7['command'],_0x4e4f71={'service':_0xc9fc5c(0x8a),'command':_0x5e20a7[_0xc9fc5c(0x99)],'description':_0x5e20a7[_0xc9fc5c(0xd7)],'risk':_0x5e20a7['risk'],'helpExtra':_0x5e20a7[_0xc9fc5c(0xc4)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x5e20a7['paramsHint']}],'validate':async _0x481c6c=>{const _0x1348db=_0xc9fc5c;_0x5e20a7[_0x1348db(0x9d)]&&requireAnyOf(_0x481c6c,[_0x1348db(0x9b)],_0x2e35a9),_0x5e20a7[_0x1348db(0xc7)]===_0x1348db(0xae)&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x481c6c[_0x1348db(0xb4)]('params')));},async 'execute'(_0x30aeb){const _0xd5db6=_0xc9fc5c,_0x3bd2d9=_0x30aeb[_0xd5db6(0xb4)](_0xd5db6(0xb0)),_0x3e35d5=_0x5e20a7[_0xd5db6(0xc7)]===_0xd5db6(0xae)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x30aeb[_0xd5db6(0xb4)](_0xd5db6(0x9b)))):parseJsonParams(_0x30aeb['str'](_0xd5db6(0x9b)))??{},_0x5c11ca=Date[_0xd5db6(0xa5)](),_0x39cac2=await executeData(_0x3bd2d9,_0x5e20a7[_0xd5db6(0xc7)],_0x3e35d5),_0x38ad1c=Date[_0xd5db6(0xa5)]()-_0x5c11ca;return{'ok':!![],'data':{'result':_0x39cac2,'elapsed':_0x38ad1c},'message':'data\x20'+_0x5e20a7[_0xd5db6(0x99)]+'\x20completed\x20in\x20'+_0x38ad1c+'ms'};}};return _0x5e20a7[_0xc9fc5c(0xd8)]!==_0xc9fc5c(0xde)&&(_0x4e4f71['dryRun']=async _0xa3d68c=>{const _0x2183cc=_0xc9fc5c,_0x48f97f=_0xa3d68c[_0x2183cc(0xb4)]('code'),_0x1d7824=_0x5e20a7[_0x2183cc(0xc7)]===_0x2183cc(0xae)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0xa3d68c['str'](_0x2183cc(0x9b)))):parseJsonParams(_0xa3d68c[_0x2183cc(0xb4)](_0x2183cc(0x9b)))??{};return dryRun(_0x2183cc(0xd4),_0x2183cc(0xbd)+_0x48f97f+'/'+_0x5e20a7['operation'])[_0x2183cc(0xc2)](_0x1d7824)[_0x2183cc(0xd7)](_0x2183cc(0xc9)+_0x5e20a7[_0x2183cc(0x99)]+_0x2183cc(0x9e)+_0x48f97f)[_0x2183cc(0xb6)]();}),_0x4e4f71;}export const dataDefinitions=specs[a16_0x1375d7(0xcf)](makeDataCommand);
1
+ function a16_0x397a(_0x380659,_0x3932f8){_0x380659=_0x380659-0xde;const _0x40213a=a16_0x4021();let _0x397a86=_0x40213a[_0x380659];return _0x397a86;}const a16_0x360d1c=a16_0x397a;(function(_0x353a1c,_0x5b649d){const _0x1d191a=a16_0x397a,_0x52d4ba=_0x353a1c();while(!![]){try{const _0x4a64f7=parseInt(_0x1d191a(0xf9))/0x1*(-parseInt(_0x1d191a(0x10f))/0x2)+parseInt(_0x1d191a(0xff))/0x3*(-parseInt(_0x1d191a(0xe1))/0x4)+-parseInt(_0x1d191a(0x130))/0x5*(-parseInt(_0x1d191a(0x10a))/0x6)+parseInt(_0x1d191a(0xfd))/0x7+parseInt(_0x1d191a(0x108))/0x8+parseInt(_0x1d191a(0x11f))/0x9*(parseInt(_0x1d191a(0xf6))/0xa)+-parseInt(_0x1d191a(0xe4))/0xb*(-parseInt(_0x1d191a(0xe7))/0xc);if(_0x4a64f7===_0x5b649d)break;else _0x52d4ba['push'](_0x52d4ba['shift']());}catch(_0x2f42c0){_0x52d4ba['push'](_0x52d4ba['shift']());}}}(a16_0x4021,0x19c06));import{executeData}from'../../core/sdk-client.js';import{CODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';import{requireAnyOf}from'../../commands/common/constraints.js';import{parseJsonParams,parseJsonParamsValue,parseBatchCreateItemsFromParams}from'../../utils/params.js';function a16_0x4021(){const _0x243703=['body','map','JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20Example:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27','Get\x20a\x20single\x20record\x20by\x20ID','dryRun','370JUSEyc','\x20\x20\x20\x20Pagination\x20is\x20controlled\x20via\x20JSON\x20in\x20--params.\x20Do\x20NOT\x20use\x20--page-size\x20as\x20a\x20CLI\x20flag.','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]','2067gOkltq','delete','getOne','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','96397hNKZgt','Delete\x20a\x20record\x20(requires\x20--yes\x20in\x20non-interactive)','1479dHQSrO','description','JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','high-risk-write','filter','\x20\x20LOGICAL\x20COMBINATORS','\x20\x20PARAMS\x20STRUCTURE','paramsRequired','build','407600qAtZVg','\x20on\x20dataset\x20','2364euPXBf','command','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','str','batchCreate','110imgnmm','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return\x20alongside\x20aggregates,\x20e.g.\x20[\x22status\x22,\x22region\x22]','Update\x20an\x20existing\x20record','read','\x20\x20\x20\x20SUM\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Sum\x20of\x20field\x20values\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}','update','data','\x20\x20WHERE\x20OPERATORS','\x20\x20\x20\x20MIN\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Minimum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22price\x22,\x22type\x22:\x22MIN\x22,\x22alias\x22:\x22min_price\x22}','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter','Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','\x20completed\x20in\x20','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22field\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','\x20\x20\x20\x20Correct:\x20\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:10}\x27','3339GPJfOF','\x20\x20\x20\x20$gte\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20or\x20equal\x20\x20{\x22amount\x22:{\x22$gte\x22:100}}','risk','paramsHint','write','\x20\x20\x20\x20$contain\x20\x20\x20\x20\x20Substring\x20match\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$contain\x22:\x22test\x22}}','\x20\x20\x20\x20$lte\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20or\x20equal\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lte\x22:1000}}','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20','\x20\x20\x20\x20$eq\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22age\x22:{\x22$eq\x22:18}}','params','join','data\x20','\x20\x20\x20\x20$gt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$gt\x22:100}}','create','\x20\x20\x20\x20having\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Post-aggregation\x20filter,\x20e.g.\x20{\x22total\x22:{\x22$gt\x22:1000}}','Create\x20a\x20new\x20record\x20in\x20a\x20dataset','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','2050OutDbH','now','\x20\x20\x20\x20$and\x20\x20\x20\x20\x20\x20\x20\x20\x20All\x20conditions\x20match\x20\x20\x20{\x22$and\x22:[{\x22age\x22:{\x22$gte\x22:18}},{\x22status\x22:{\x22$eq\x22:\x22active\x22}}]}','\x20\x20EXAMPLES','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','444PYgtvn','POST','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20of\x20records\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}','186439Bsfjav','aggregate','\x20\x20\x20\x20MAX\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Maximum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22price\x22,\x22type\x22:\x22MAX\x22,\x22alias\x22:\x22max_price\x22}','24EaUOFF','Example:\x20\x27{\x22aggregate\x22:[{\x22field\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22field\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[\x22region\x22],\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}}}\x27','operation','JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20','code','\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]','Preview:\x20data\x20','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22id\x22:\x22desc\x22},{\x22name\x22:\x22asc\x22}]'];a16_0x4021=function(){return _0x243703;};return a16_0x4021();}import{dryRun}from'../../framework/dryrun.js';const specs=[{'command':a16_0x360d1c(0x103),'operation':a16_0x360d1c(0x103),'risk':a16_0x360d1c(0x112),'paramsRequired':![],'description':'Filter\x20dataset\x20records\x20with\x20query\x20conditions','paramsHint':a16_0x360d1c(0x126)+'Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','helpExtra':[a16_0x360d1c(0x116),a16_0x360d1c(0x127),'\x20\x20\x20\x20$ne\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Not\x20equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22status\x22:{\x22$ne\x22:\x22deleted\x22}}',a16_0x360d1c(0x12b),a16_0x360d1c(0x120),'\x20\x20\x20\x20$lt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lt\x22:1000}}',a16_0x360d1c(0x125),'\x20\x20\x20\x20$in\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Value\x20in\x20set\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22country\x22:{\x22$in\x22:[\x22CN\x22,\x22US\x22]}}',a16_0x360d1c(0x124),'\x20\x20\x20\x20$startWith\x20\x20\x20Starts\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$startWith\x22:\x22Mr.\x22}}','\x20\x20\x20\x20$endWith\x20\x20\x20\x20\x20Ends\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22email\x22:{\x22$endWith\x22:\x22@example.com\x22}}','',a16_0x360d1c(0x104),a16_0x360d1c(0xde),'\x20\x20\x20\x20$or\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Any\x20condition\x20matches\x20\x20{\x22$or\x22:[{\x22status\x22:{\x22$eq\x22:\x22active\x22}},{\x22status\x22:{\x22$eq\x22:\x22pending\x22}}]}','',a16_0x360d1c(0xfc),a16_0x360d1c(0xe0),'\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]',a16_0x360d1c(0xf0),'\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)',a16_0x360d1c(0x11b),'','\x20\x20PAGINATION',a16_0x360d1c(0xf7),a16_0x360d1c(0x11e),'\x20\x20\x20\x20Wrong:\x20\x20\x20\x20--page-size\x2010\x20\x20(this\x20is\x20not\x20a\x20valid\x20flag)']['join']('\x0a')},{'command':a16_0x360d1c(0xfb),'operation':'getOne','risk':a16_0x360d1c(0x112),'paramsRequired':!![],'description':a16_0x360d1c(0xf4),'paramsHint':a16_0x360d1c(0xef)},{'command':a16_0x360d1c(0x12c),'operation':a16_0x360d1c(0x12c),'risk':a16_0x360d1c(0x123),'paramsRequired':!![],'description':a16_0x360d1c(0x12e),'paramsHint':a16_0x360d1c(0x12f)},{'command':a16_0x360d1c(0x10e),'operation':a16_0x360d1c(0x10e),'risk':a16_0x360d1c(0x123),'paramsRequired':!![],'description':'Create\x20multiple\x20records\x20in\x20one\x20request\x20(SDK\x20batchCreate)','paramsHint':a16_0x360d1c(0x101)},{'command':a16_0x360d1c(0x114),'operation':a16_0x360d1c(0x114),'risk':a16_0x360d1c(0x123),'paramsRequired':!![],'description':a16_0x360d1c(0x111),'paramsHint':a16_0x360d1c(0xf3)},{'command':a16_0x360d1c(0xfa),'operation':a16_0x360d1c(0xfa),'risk':a16_0x360d1c(0x102),'paramsRequired':!![],'description':a16_0x360d1c(0xfe),'paramsHint':a16_0x360d1c(0xef)},{'command':a16_0x360d1c(0xe5),'operation':a16_0x360d1c(0xe5),'risk':a16_0x360d1c(0x112),'paramsRequired':![],'description':a16_0x360d1c(0x11a),'paramsHint':a16_0x360d1c(0xeb)+a16_0x360d1c(0xe8),'helpExtra':['\x20\x20AGGREGATE\x20TYPES',a16_0x360d1c(0x113),a16_0x360d1c(0xe3),'\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20distinct\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22,\x22distinct\x22:true}','\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Average\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg_score\x22}','\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Rounded\x20average\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg\x22,\x22round\x22:true,\x22precision\x22:2}',a16_0x360d1c(0xe6),a16_0x360d1c(0x117),'',a16_0x360d1c(0x105),a16_0x360d1c(0x110),a16_0x360d1c(0x118),a16_0x360d1c(0x10c),a16_0x360d1c(0xed),a16_0x360d1c(0x12d),a16_0x360d1c(0xf8),'',a16_0x360d1c(0xdf),'\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status',a16_0x360d1c(0x11d),'',a16_0x360d1c(0x119),a16_0x360d1c(0xe9)][a16_0x360d1c(0x129)]('\x0a')}];function makeDataCommand(_0x2eaf6d){const _0x312f2c=a16_0x360d1c,_0x4e5788='data\x20'+_0x2eaf6d[_0x312f2c(0x10b)],_0x4a2431={'service':_0x312f2c(0x115),'command':_0x2eaf6d[_0x312f2c(0x10b)],'description':_0x2eaf6d[_0x312f2c(0x100)],'risk':_0x2eaf6d[_0x312f2c(0x121)],'helpExtra':_0x2eaf6d['helpExtra'],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x2eaf6d[_0x312f2c(0x122)]}],'validate':async _0x1e0f97=>{const _0x316244=_0x312f2c;_0x2eaf6d[_0x316244(0x106)]&&requireAnyOf(_0x1e0f97,[_0x316244(0x128)],_0x4e5788),_0x2eaf6d[_0x316244(0xea)]==='batchCreate'&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x1e0f97['str'](_0x316244(0x128))));},async 'execute'(_0x139bae){const _0x34191f=_0x312f2c,_0x3cb7b0=_0x139bae[_0x34191f(0x10d)](_0x34191f(0xec)),_0x1a8763=_0x2eaf6d['operation']==='batchCreate'?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x139bae[_0x34191f(0x10d)](_0x34191f(0x128)))):parseJsonParams(_0x139bae[_0x34191f(0x10d)](_0x34191f(0x128)))??{},_0x53f32d=Date[_0x34191f(0x131)](),_0x3d0d98=await executeData(_0x3cb7b0,_0x2eaf6d['operation'],_0x1a8763),_0x5bc3d1=Date['now']()-_0x53f32d;return{'ok':!![],'data':{'result':_0x3d0d98,'elapsed':_0x5bc3d1},'message':_0x34191f(0x12a)+_0x2eaf6d['command']+_0x34191f(0x11c)+_0x5bc3d1+'ms'};}};return _0x2eaf6d[_0x312f2c(0x121)]!==_0x312f2c(0x112)&&(_0x4a2431[_0x312f2c(0xf5)]=async _0x2d2c51=>{const _0x71eee2=_0x312f2c,_0x3bf5e5=_0x2d2c51[_0x71eee2(0x10d)](_0x71eee2(0xec)),_0x114c0f=_0x2eaf6d[_0x71eee2(0xea)]==='batchCreate'?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x2d2c51[_0x71eee2(0x10d)](_0x71eee2(0x128)))):parseJsonParams(_0x2d2c51[_0x71eee2(0x10d)](_0x71eee2(0x128)))??{};return dryRun(_0x71eee2(0xe2),'/api/{appCode}/'+_0x3bf5e5+'/'+_0x2eaf6d[_0x71eee2(0xea)])[_0x71eee2(0xf1)](_0x114c0f)[_0x71eee2(0x100)](_0x71eee2(0xee)+_0x2eaf6d[_0x71eee2(0x10b)]+_0x71eee2(0x109)+_0x3bf5e5)[_0x71eee2(0x107)]();}),_0x4a2431;}export const dataDefinitions=specs[a16_0x360d1c(0xf2)](makeDataCommand);