@lovrabet/lovrabet-cli 2.0.14-beta.1 → 2.0.14-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/lib/cli.js +1 -1
  2. package/lib/commands/api-doc/index.js +1 -1
  3. package/lib/commands/app/cache.js +1 -1
  4. package/lib/commands/app/definitions.js +1 -1
  5. package/lib/commands/app/mock-loader.js +1 -1
  6. package/lib/commands/app/remote-source.js +1 -1
  7. package/lib/commands/app/shared.js +1 -1
  8. package/lib/commands/artifact/index.js +1 -1
  9. package/lib/commands/auth/index.js +1 -1
  10. package/lib/commands/auth/prompt.js +1 -1
  11. package/lib/commands/bff/detail.js +1 -1
  12. package/lib/commands/bff/exec.js +1 -1
  13. package/lib/commands/bff/index.js +1 -1
  14. package/lib/commands/common/config-policy.js +1 -1
  15. package/lib/commands/common/constraints.js +1 -1
  16. package/lib/commands/common/flags.js +1 -1
  17. package/lib/commands/config/definitions.js +1 -1
  18. package/lib/commands/config/shared.js +1 -1
  19. package/lib/commands/data/index.js +1 -1
  20. package/lib/commands/dataset/detail.js +1 -1
  21. package/lib/commands/dataset/index.js +1 -1
  22. package/lib/commands/dataset/list.js +1 -1
  23. package/lib/commands/dataset/sdk-doc.js +1 -1
  24. package/lib/commands/doctor.js +1 -1
  25. package/lib/commands/init.js +1 -1
  26. package/lib/commands/kb/index.js +1 -1
  27. package/lib/commands/logs/index.js +1 -1
  28. package/lib/commands/personal-bff/index.js +1 -1
  29. package/lib/commands/registry.js +1 -1
  30. package/lib/commands/schema.js +1 -1
  31. package/lib/commands/skill/index.js +1 -1
  32. package/lib/commands/skill/templates.js +1 -1
  33. package/lib/commands/skill/validate.js +1 -1
  34. package/lib/commands/sql/detail.js +1 -1
  35. package/lib/commands/sql/exec.js +1 -1
  36. package/lib/commands/sql/index.js +1 -1
  37. package/lib/commands/update.js +1 -1
  38. package/lib/config/schema.js +1 -1
  39. package/lib/constant/auth-mode.js +1 -1
  40. package/lib/constant/cli.js +1 -1
  41. package/lib/constant/defaults.js +1 -1
  42. package/lib/constant/distribution.js +1 -1
  43. package/lib/constant/domain.js +1 -1
  44. package/lib/constant/env.js +1 -1
  45. package/lib/constant/output.js +1 -1
  46. package/lib/constant/product.js +1 -1
  47. package/lib/constant/risk.js +1 -1
  48. package/lib/constant/url.js +1 -1
  49. package/lib/context.js +1 -1
  50. package/lib/core/api-client.js +1 -1
  51. package/lib/core/db-resolver.js +1 -1
  52. package/lib/core/sdk-client.js +1 -1
  53. package/lib/errors.js +1 -1
  54. package/lib/framework/build-all-flags.js +1 -1
  55. package/lib/framework/dryrun.js +1 -1
  56. package/lib/framework/flags.js +1 -1
  57. package/lib/framework/help.js +1 -1
  58. package/lib/framework/index.js +1 -1
  59. package/lib/framework/output.js +1 -1
  60. package/lib/framework/preparse.js +1 -1
  61. package/lib/framework/response.js +1 -1
  62. package/lib/framework/runner-confirmation.js +1 -1
  63. package/lib/framework/runner-error.js +1 -1
  64. package/lib/framework/runner.js +1 -1
  65. package/lib/framework/schema-export.js +1 -1
  66. package/lib/framework/types.js +1 -1
  67. package/lib/generated/build-info.js +1 -1
  68. package/lib/help.js +1 -1
  69. package/lib/skills/npx-skills-add.js +1 -1
  70. package/lib/skills/runtime-skill-sync.js +1 -1
  71. package/lib/utils/apply-jq-filter.js +1 -1
  72. package/lib/utils/logger.js +1 -1
  73. package/lib/utils/params.js +1 -1
  74. package/lib/utils/platform.js +1 -1
  75. package/lib/utils/update-notice.js +1 -1
  76. package/lib/utils/version.js +1 -1
  77. package/lib/utils/write-cli-side-channel.js +1 -1
  78. package/package.json +1 -1
package/lib/cli.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- (function(_0x277d92,_0x23dc6d){const _0x37a144=a0_0x5c8d,_0x909ad9=_0x277d92();while(!![]){try{const _0x22c0f4=-parseInt(_0x37a144(0x15c))/0x1*(-parseInt(_0x37a144(0x151))/0x2)+-parseInt(_0x37a144(0x146))/0x3+parseInt(_0x37a144(0x14f))/0x4*(parseInt(_0x37a144(0x143))/0x5)+-parseInt(_0x37a144(0x148))/0x6*(-parseInt(_0x37a144(0x15a))/0x7)+-parseInt(_0x37a144(0x13e))/0x8+-parseInt(_0x37a144(0x150))/0x9*(parseInt(_0x37a144(0x15b))/0xa)+-parseInt(_0x37a144(0x157))/0xb*(-parseInt(_0x37a144(0x156))/0xc);if(_0x22c0f4===_0x23dc6d)break;else _0x909ad9['push'](_0x909ad9['shift']());}catch(_0x3aed2f){_0x909ad9['push'](_0x909ad9['shift']());}}}(a0_0x4ac0,0xadda7));import{jsx as a0_0x40f454}from'react/jsx-runtime';import a0_0xec9958 from'meow';import{render}from'ink';import{Help}from'./help.js';import{CliError,CliErrors}from'./errors.js';function a0_0x4ac0(){const _0x4f76f5=['flags','368388hUHqWd','506ygzOdN','[preparse]\x20','log','889sfemJu','3734240MtyMiF','21YWHUtm','assign','ERR_STREAM_DESTROYED','stderr','ERR_USE_AFTER_CLOSE','\x0aCancelled.\x0a','defaultCommand','hint','8770240iHCfZZ','error','slice','Unexpected\x20error:','\x20->\x20--','4673605EbfOaP','code','corrected','3236418KPOQRD','exitCode','23502MJXyzK','message','ExitPromptError',':\x20--','write','Error:\x20','flatMap','4lxjqSs','27pklUAX','110774DwQKjH','handler','input','exit'];a0_0x4ac0=function(){return _0x4f76f5;};return a0_0x4ac0();}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';import{buildMeowFlags}from'./constant/cli.js';import{getCliVersionDisplay}from'./utils/version.js';const helpText=generateFullHelp(),cli=a0_0xec9958(helpText,{'importMeta':import.meta,'flags':buildMeowFlags(),'version':getCliVersionDisplay()});void main()['catch'](handleError);function a0_0x5c8d(_0x111024,_0x599589){_0x111024=_0x111024-0x139;const _0x4ac0d6=a0_0x4ac0();let _0x5c8db8=_0x4ac0d6[_0x111024];return _0x5c8db8;}async function main(){try{await run();}catch(_0x17779c){handleError(_0x17779c);}}async function run(){const _0x12c1c8=a0_0x5c8d;let _0x4fffa6=cli[_0x12c1c8(0x153)][0x0],_0x5925f5=cli[_0x12c1c8(0x153)][0x1];const _0x57a651=cli[_0x12c1c8(0x155)];try{const {correctFlags:_0x170db1}=await import('./framework/preparse.js'),_0xc6f728=getAllDefinitions()[_0x12c1c8(0x14e)](_0x461973=>_0x461973[_0x12c1c8(0x155)]??[]),{flags:_0xcbe76c,corrections:_0x4ec669}=_0x170db1(_0x57a651,_0xc6f728);if(_0x4ec669['length']>0x0){for(const _0x8e0ad1 of _0x4ec669){process[_0x12c1c8(0x139)][_0x12c1c8(0x14c)](_0x12c1c8(0x158)+_0x8e0ad1[_0x12c1c8(0x152)]+_0x12c1c8(0x14b)+_0x8e0ad1['original']+_0x12c1c8(0x142)+_0x8e0ad1[_0x12c1c8(0x145)]+'\x0a');}Object[_0x12c1c8(0x15d)](_0x57a651,_0xcbe76c);}}catch{}if(!_0x4fffa6||!isKnownService(_0x4fffa6)){const {waitUntilExit:_0x8c05a3}=render(a0_0x40f454(Help,{}));await _0x8c05a3();return;}const _0x418a4d=getServiceEntry(_0x4fffa6);if(!_0x5925f5){if(_0x57a651['help']){console['log'](generateServiceHelp(_0x4fffa6));return;}if(_0x418a4d[_0x12c1c8(0x13c)])_0x5925f5=_0x418a4d[_0x12c1c8(0x13c)];else{console[_0x12c1c8(0x159)](generateServiceHelp(_0x4fffa6));return;}}const _0x294e7d=findDefinition(_0x4fffa6,_0x5925f5);!_0x294e7d&&(console[_0x12c1c8(0x159)](generateServiceHelp(_0x4fffa6)),handleError(CliErrors['unknownCommand'](_0x4fffa6+'\x20'+_0x5925f5)));if(_0x57a651['help']){console['log'](generateCommandHelp(_0x294e7d));return;}const _0x4dd1d7=buildConfigFromFlags(_0x57a651);await initGlobalEnvironment(_0x4dd1d7);const _0x244c11=createPipelineEnv(_0x4dd1d7,_0x57a651);_0x244c11['args']=cli[_0x12c1c8(0x153)][_0x12c1c8(0x140)](0x2),await runCommand(_0x294e7d,_0x244c11);}function handleError(_0x155dfe){const _0x1cff35=a0_0x5c8d;if(_0x155dfe instanceof CliError){_0x155dfe[_0x1cff35(0x144)]==='cancelled'&&(process[_0x1cff35(0x139)]['write']('\x0aCancelled.\x0a'),process[_0x1cff35(0x154)](0x0));console[_0x1cff35(0x13f)](_0x1cff35(0x14d)+_0x155dfe[_0x1cff35(0x149)]);if(_0x155dfe[_0x1cff35(0x13d)])console[_0x1cff35(0x13f)]('Hint:\x20'+_0x155dfe[_0x1cff35(0x13d)]);process['exit'](_0x155dfe[_0x1cff35(0x147)]);}isUserCancellation(_0x155dfe)&&(process['stderr'][_0x1cff35(0x14c)](_0x1cff35(0x13b)),process[_0x1cff35(0x154)](0x0)),console[_0x1cff35(0x13f)](_0x1cff35(0x141),_0x155dfe),process['exit'](0x1);}function isUserCancellation(_0x16ac31){const _0x344f72=a0_0x5c8d;if(!(_0x16ac31 instanceof Error))return![];if(_0x16ac31['name']===_0x344f72(0x14a))return!![];if(_0x16ac31[_0x344f72(0x144)]===_0x344f72(0x13a))return!![];if(_0x16ac31['code']===_0x344f72(0x15e))return!![];return![];}
2
+ function a0_0xa75f(){const _0x176e51=['4941675MXkVOo','catch','message','11301700PaLtxQ','exitCode','flatMap','defaultCommand','write','324248FMuYpG','original','corrected','code','[preparse]\x20','42GYQQTM','log','\x0aCancelled.\x0a','\x20->\x20--','hint','assign','help','stderr','exit','1273170vVsGnF','604662PHunhr','ERR_STREAM_DESTROYED','slice','ERR_USE_AFTER_CLOSE','Hint:\x20','flags','542679ZPyGMP','3GlUhMg','input','1023475EOZpLO','8pNEwkz','length','Unexpected\x20error:','handler','error','name','ExitPromptError'];a0_0xa75f=function(){return _0x176e51;};return a0_0xa75f();}const a0_0x5855ff=a0_0x10ae;(function(_0x2a0b7a,_0x9bf7cf){const _0x55588e=a0_0x10ae,_0x4705b9=_0x2a0b7a();while(!![]){try{const _0x2f67f8=parseInt(_0x55588e(0x1f2))/0x1*(parseInt(_0x55588e(0x1eb))/0x2)+parseInt(_0x55588e(0x1f1))/0x3+parseInt(_0x55588e(0x1f5))/0x4*(-parseInt(_0x55588e(0x1f4))/0x5)+parseInt(_0x55588e(0x1ea))/0x6+parseInt(_0x55588e(0x1e1))/0x7*(parseInt(_0x55588e(0x1dc))/0x8)+parseInt(_0x55588e(0x1fc))/0x9+-parseInt(_0x55588e(0x1d7))/0xa;if(_0x2f67f8===_0x9bf7cf)break;else _0x4705b9['push'](_0x4705b9['shift']());}catch(_0x10a6f7){_0x4705b9['push'](_0x4705b9['shift']());}}}(a0_0xa75f,0x86f4e));import{jsx as a0_0x4698ba}from'react/jsx-runtime';import a0_0x1cbd4b 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';import{runCommand,createPipelineEnv}from'./framework/runner.js';import{generateCommandHelp,generateServiceHelp,generateFullHelp}from'./framework/help.js';function a0_0x10ae(_0x1e84c8,_0xc447aa){_0x1e84c8=_0x1e84c8-0x1d5;const _0xa75f66=a0_0xa75f();let _0x10ae49=_0xa75f66[_0x1e84c8];return _0x10ae49;}import{buildMeowFlags}from'./constant/cli.js';import{getCliVersionDisplay}from'./utils/version.js';const helpText=generateFullHelp(),cli=a0_0x1cbd4b(helpText,{'importMeta':import.meta,'flags':buildMeowFlags(),'version':getCliVersionDisplay()});void main()[a0_0x5855ff(0x1d5)](handleError);async function main(){try{await run();}catch(_0x54f61a){handleError(_0x54f61a);}}async function run(){const _0x368e2b=a0_0x5855ff;let _0x4eabc4=cli['input'][0x0],_0x46f6be=cli[_0x368e2b(0x1f3)][0x1];const _0x4a95b0=cli[_0x368e2b(0x1f0)];try{const {correctFlags:_0x3f2f3c}=await import('./framework/preparse.js'),_0x24d86f=getAllDefinitions()[_0x368e2b(0x1d9)](_0x364a4f=>_0x364a4f[_0x368e2b(0x1f0)]??[]),{flags:_0x591266,corrections:_0xf8547f}=_0x3f2f3c(_0x4a95b0,_0x24d86f);if(_0xf8547f[_0x368e2b(0x1f6)]>0x0){for(const _0x845083 of _0xf8547f){process[_0x368e2b(0x1e8)][_0x368e2b(0x1db)](_0x368e2b(0x1e0)+_0x845083[_0x368e2b(0x1f8)]+':\x20--'+_0x845083[_0x368e2b(0x1dd)]+_0x368e2b(0x1e4)+_0x845083[_0x368e2b(0x1de)]+'\x0a');}Object[_0x368e2b(0x1e6)](_0x4a95b0,_0x591266);}}catch{}if(!_0x4eabc4||!isKnownService(_0x4eabc4)){const {waitUntilExit:_0x7aa2bb}=render(a0_0x4698ba(Help,{}));await _0x7aa2bb();return;}const _0x3ebdce=getServiceEntry(_0x4eabc4);if(!_0x46f6be){if(_0x4a95b0[_0x368e2b(0x1e7)]){console['log'](generateServiceHelp(_0x4eabc4));return;}if(_0x3ebdce[_0x368e2b(0x1da)])_0x46f6be=_0x3ebdce[_0x368e2b(0x1da)];else{console[_0x368e2b(0x1e2)](generateServiceHelp(_0x4eabc4));return;}}const _0x444231=findDefinition(_0x4eabc4,_0x46f6be);!_0x444231&&(console[_0x368e2b(0x1e2)](generateServiceHelp(_0x4eabc4)),handleError(CliErrors['unknownCommand'](_0x4eabc4+'\x20'+_0x46f6be)));if(_0x4a95b0[_0x368e2b(0x1e7)]){console[_0x368e2b(0x1e2)](generateCommandHelp(_0x444231));return;}const _0x7c9ced=buildConfigFromFlags(_0x4a95b0);await initGlobalEnvironment(_0x7c9ced);const _0x57bb6b=createPipelineEnv(_0x7c9ced,_0x4a95b0);_0x57bb6b['args']=cli[_0x368e2b(0x1f3)][_0x368e2b(0x1ed)](0x2),await runCommand(_0x444231,_0x57bb6b);}function handleError(_0x54d7d2){const _0x1f7eb4=a0_0x5855ff;if(_0x54d7d2 instanceof CliError){_0x54d7d2[_0x1f7eb4(0x1df)]==='cancelled'&&(process[_0x1f7eb4(0x1e8)]['write'](_0x1f7eb4(0x1e3)),process[_0x1f7eb4(0x1e9)](0x0));console['error']('Error:\x20'+_0x54d7d2[_0x1f7eb4(0x1d6)]);if(_0x54d7d2['hint'])console[_0x1f7eb4(0x1f9)](_0x1f7eb4(0x1ef)+_0x54d7d2[_0x1f7eb4(0x1e5)]);process[_0x1f7eb4(0x1e9)](_0x54d7d2[_0x1f7eb4(0x1d8)]);}isUserCancellation(_0x54d7d2)&&(process[_0x1f7eb4(0x1e8)][_0x1f7eb4(0x1db)](_0x1f7eb4(0x1e3)),process[_0x1f7eb4(0x1e9)](0x0)),console[_0x1f7eb4(0x1f9)](_0x1f7eb4(0x1f7),_0x54d7d2),process['exit'](0x1);}function isUserCancellation(_0x3b5935){const _0x2dceae=a0_0x5855ff;if(!(_0x3b5935 instanceof Error))return![];if(_0x3b5935[_0x2dceae(0x1fa)]===_0x2dceae(0x1fb))return!![];if(_0x3b5935[_0x2dceae(0x1df)]===_0x2dceae(0x1ee))return!![];if(_0x3b5935[_0x2dceae(0x1df)]===_0x2dceae(0x1ec))return!![];return![];}
@@ -1 +1 @@
1
- const a1_0x5e33e9=a1_0x379e;(function(_0x883cea,_0x1830a2){const _0x568a31=a1_0x379e,_0x288369=_0x883cea();while(!![]){try{const _0x3c1122=-parseInt(_0x568a31(0x1f2))/0x1*(parseInt(_0x568a31(0x21f))/0x2)+parseInt(_0x568a31(0x1b3))/0x3+parseInt(_0x568a31(0x1f0))/0x4*(parseInt(_0x568a31(0x1ff))/0x5)+parseInt(_0x568a31(0x1b1))/0x6+-parseInt(_0x568a31(0x21e))/0x7*(parseInt(_0x568a31(0x1bb))/0x8)+-parseInt(_0x568a31(0x1b4))/0x9+parseInt(_0x568a31(0x1fd))/0xa*(-parseInt(_0x568a31(0x21b))/0xb);if(_0x3c1122===_0x1830a2)break;else _0x288369['push'](_0x288369['shift']());}catch(_0x3d7330){_0x288369['push'](_0x288369['shift']());}}}(a1_0x5454,0x4c017));function a1_0x5454(){const _0x4eb593=['9162JOeVow','{\x22appCode\x22:\x22app-aa63b188\x22,\x22sqlCode\x22:\x22xxxxxxxx-xxxxxxxx\x22,\x22params\x22:{}}','32-character\x20dataset\x20code','646692EnuCpJ','Get\x20one\x20dataset\x20record','1527459Bhwhgt','1376640UyVfon','dataset_data_get_one','list','需要按\x20appCode\x20分页获取运行态数据集列表,并优先收敛可用\x20datasetCode\x20时使用','Use\x20this\x20API\x20or\x20`lovrabet\x20dataset\x20list`\x20to\x20discover\x20available\x20dataset\x20codes\x20before\x20reading\x20data.','method','POST','388528XaztIW','Returns\x20script\x20business\x20payload','##\x20Execute\x20BF\x20endpoint\x20function\x0a\x0aExecute\x20a\x20known\x20endpoint\x20script.','map','已经确认目标\x20sqlCode\x20存在,并需要实际执行该自定义\x20SQL\x20时使用','已经知道记录\x20id,需要按数据集读取单条业务数据时使用','需要向指定数据集新增一条业务数据时使用','dataset_list','获取应用下可调用的\x20BF\x20函数列表','lovrabet\x20data\x20create\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22name\x22:\x22demo\x22}\x27','tableData\x20contains\x20records','lovrabet\x20bff\x20exec\x20--name\x20<functionName>\x20--params\x20\x27{}\x27','category','includes','GET','条件过滤查询数据','summary','##\x20Get\x20one\x20dataset\x20record\x0a\x0aRead\x20one\x20record\x20by\x20id.','/api/{appCode}/{datasetCode}/filter','需要先确认当前应用有哪些可执行的\x20BF/ENDPOINT\x20函数,以及收敛可用\x20scriptName\x20时使用','This\x20is\x20a\x20write\x20operation;\x20use\x20dry-run\x20when\x20available\x20and\x20safe\x20fixtures\x20for\x20smoke\x20tests.','string','CLI\x20users\x20should\x20prefer\x20`lovrabet\x20dataset\x20list`\x20for\x20this\x20workflow.','bf_function_list','title','执行指定\x20BF\x20函数','Create\x20dataset\x20record','{\x22id\x22:123}','Use\x20`having`\x20only\x20for\x20post-aggregation\x20filters.','join','List\x20available\x20runtime\x20API\x20documentation\x20entries','分页获取数据集列表','datasetCode','paging.totalCount\x20gives\x20total\x20rows','str','detail','{\x22appCode\x22:\x22app-aa63b188\x22,\x22currentPage\x22:1,\x22pageSize\x22:100}','keyword','Returns\x20SQL\x20execution\x20payload','filter','/api/dataset/get-dataset-list-by-app-code','dataset_detail','{\x22param\x22:\x22value\x22}','toLowerCase','Current\x20app\x20code','api-doc','Aggregate\x20supports\x20COUNT,\x20SUM,\x20AVG,\x20MAX,\x20and\x20MIN\x20definitions\x20in\x20the\x20`aggregate`\x20array.','创建数据','dataset_data_aggregate','List\x20BF\x20endpoint\x20functions','Execute\x20custom\x20SQL','/api/endpoint/{appCode}/{scriptName}','appCode','666784bmsGXK','Returns\x20one\x20matching\x20business\x20record','21CsZTsc','bf_execute','find','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27','paging\x20contains\x20pagination','code','dataset','List\x20datasets','Filter\x20dataset\x20data','Returns\x20the\x20created\x20record\x20or\x20backend\x20operation\x20result','fields/properties\x20describe\x20data\x20shape','10WDeCpD','##\x20List\x20datasets','15RmbHQu','operations\x20describes\x20runtime\x20APIs','Endpoint\x20function\x20name','/api/{appCode}/{datasetCode}/getOne','whenToUse','##\x20List\x20BF\x20endpoint\x20functions\x0a\x0aDiscover\x20executable\x20endpoint\x20functions.','Dataset\x20detail','read','custom_sql','path','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:5}\x27','##\x20Execute\x20custom\x20SQL\x0a\x0aExecute\x20a\x20configured\x20SQL\x20script\x20by\x20sqlCode.','Returns\x20endpoint\x20functionName/id/description','API\x20doc\x20code,\x20for\x20example\x20dataset_list','需要按\x20groupBy\x20分组并做\x20count、sum、avg、max、min\x20等聚合统计时使用','Use\x20`where`,\x20`select`,\x20`orderBy`,\x20`currentPage`,\x20and\x20`pageSize`\x20to\x20inspect\x20live\x20data\x20shape.','API\x20doc\x20code\x20not\x20found:\x20','{\x22aggregate\x22:[{\x22field\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[]}','##\x20Create\x20dataset\x20record\x0a\x0aCreate\x20one\x20data\x20record\x20in\x20a\x20dataset.','/api/{appCode}/{datasetCode}/create','Search\x20docs\x20by\x20code,\x20summary,\x20path,\x20or\x20usage\x20text','CLI\x20has\x20typed\x20`bff\x20detail`\x20and\x20`bff\x20exec`\x20commands\x20for\x20endpoint\x20scripts.','/api/{appCode}/{datasetCode}/aggregate','/api/dataset/getOneByCode?code={datasetCode}','None','##\x20Aggregate\x20dataset\x20data','Script\x20behavior\x20may\x20have\x20side\x20effects;\x20inspect\x20detail\x20first.','Use\x20read-only\x20data\x20commands\x20before\x20writing\x20Artifacts\x20that\x20display\x20real\x20data.','2916617KAnRPG','lovrabet\x20sql\x20exec\x20--sqlcode\x20<sqlCode>\x20--params\x20\x27{}\x27','查询单条数据','42UaHxyw'];a1_0x5454=function(){return _0x4eb593;};return a1_0x5454();}import{CliErrors}from'../../errors.js';const CATEGORY_FLAG={'name':a1_0x5e33e9(0x1c7),'type':a1_0x5e33e9(0x1d0),'description':'Filter\x20docs\x20by\x20category,\x20for\x20example\x20dataset'},KEYWORD_FLAG={'name':a1_0x5e33e9(0x1e0),'type':a1_0x5e33e9(0x1d0),'description':a1_0x5e33e9(0x213)},DOC_CODE_FLAG={'name':a1_0x5e33e9(0x1f7),'type':a1_0x5e33e9(0x1d0),'required':!![],'description':a1_0x5e33e9(0x20c)},DOCS=[{'code':a1_0x5e33e9(0x1c2),'category':a1_0x5e33e9(0x1f8),'title':a1_0x5e33e9(0x1f9),'method':a1_0x5e33e9(0x1ba),'path':a1_0x5e33e9(0x1e3),'summary':a1_0x5e33e9(0x1da),'whenToUse':a1_0x5e33e9(0x1b7),'pathParams':[],'queryParams':[],'bodySchema':a1_0x5e33e9(0x1df),'responseHighlights':['tableData\x20contains\x20dataset\x20id/code/name',a1_0x5e33e9(0x1dc)],'examples':['lovrabet\x20dataset\x20list\x20--appcode\x20<appCode>\x20--format\x20compress'],'notes':[a1_0x5e33e9(0x1d1)],'markdown':[a1_0x5e33e9(0x1fe),'',a1_0x5e33e9(0x1b8)][a1_0x5e33e9(0x1d8)]('\x0a')},{'code':a1_0x5e33e9(0x1e4),'category':'dataset','title':a1_0x5e33e9(0x205),'method':a1_0x5e33e9(0x1c9),'path':a1_0x5e33e9(0x216),'summary':'获取数据集详情','whenToUse':'需要按数据集\x20code\x20获取字段、表信息或操作定义时使用','pathParams':[],'queryParams':[{'name':a1_0x5e33e9(0x1f7),'description':a1_0x5e33e9(0x221)}],'bodySchema':a1_0x5e33e9(0x217),'responseHighlights':[a1_0x5e33e9(0x1fc),a1_0x5e33e9(0x200)],'examples':['lovrabet\x20dataset\x20detail\x20--code\x20<datasetCode>\x20--appcode\x20<appCode>'],'notes':['If\x20SDK\x20usage\x20is\x20needed,\x20follow\x20with\x20`lovrabet\x20dataset\x20sdk-doc\x20--code\x20<datasetCode>`.'],'markdown':['##\x20Dataset\x20detail','','Inspect\x20field\x20names\x20and\x20operation\x20metadata\x20for\x20a\x20known\x20dataset\x20code.'][a1_0x5e33e9(0x1d8)]('\x0a')},{'code':'dataset_data_filter','category':a1_0x5e33e9(0x1f8),'title':a1_0x5e33e9(0x1fa),'method':'POST','path':a1_0x5e33e9(0x1cd),'summary':a1_0x5e33e9(0x1ca),'whenToUse':'需要携带\x20where、orderBy、分页等条件读取业务数据时使用','pathParams':[{'name':a1_0x5e33e9(0x1ef),'description':a1_0x5e33e9(0x1e7)},{'name':'datasetCode','description':a1_0x5e33e9(0x221)}],'queryParams':[],'bodySchema':'{\x22where\x22:{},\x22currentPage\x22:1,\x22pageSize\x22:20}','responseHighlights':[a1_0x5e33e9(0x1c5),a1_0x5e33e9(0x1f6)],'examples':[a1_0x5e33e9(0x209)],'notes':[a1_0x5e33e9(0x21a)],'markdown':['##\x20Filter\x20dataset\x20data','',a1_0x5e33e9(0x20e)][a1_0x5e33e9(0x1d8)]('\x0a')},{'code':a1_0x5e33e9(0x1eb),'category':a1_0x5e33e9(0x1f8),'title':'Aggregate\x20dataset\x20data','method':a1_0x5e33e9(0x1ba),'path':a1_0x5e33e9(0x215),'summary':'聚合查询数据集数据','whenToUse':a1_0x5e33e9(0x20d),'pathParams':[{'name':a1_0x5e33e9(0x1ef),'description':a1_0x5e33e9(0x1e7)},{'name':a1_0x5e33e9(0x1db),'description':a1_0x5e33e9(0x221)}],'queryParams':[],'bodySchema':a1_0x5e33e9(0x210),'responseHighlights':['result\x20rows\x20contain\x20aggregate\x20aliases','where\x20filters\x20before\x20aggregation'],'examples':['lovrabet\x20data\x20aggregate\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22aggregate\x22:[{\x22field\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}]}\x27'],'notes':[a1_0x5e33e9(0x1d7)],'markdown':[a1_0x5e33e9(0x218),'',a1_0x5e33e9(0x1e9)]['join']('\x0a')},{'code':a1_0x5e33e9(0x1b5),'category':a1_0x5e33e9(0x1f8),'title':a1_0x5e33e9(0x1b2),'method':a1_0x5e33e9(0x1ba),'path':a1_0x5e33e9(0x202),'summary':a1_0x5e33e9(0x21d),'whenToUse':a1_0x5e33e9(0x1c0),'pathParams':[{'name':a1_0x5e33e9(0x1ef),'description':a1_0x5e33e9(0x1e7)},{'name':a1_0x5e33e9(0x1db),'description':a1_0x5e33e9(0x221)}],'queryParams':[],'bodySchema':a1_0x5e33e9(0x1d6),'responseHighlights':[a1_0x5e33e9(0x1f1)],'examples':[a1_0x5e33e9(0x1f5)],'notes':['Prefer\x20`filter`\x20when\x20the\x20record\x20id\x20is\x20unknown.'],'markdown':a1_0x5e33e9(0x1cc)},{'code':'dataset_data_create','category':'dataset','title':a1_0x5e33e9(0x1d5),'method':a1_0x5e33e9(0x1ba),'path':a1_0x5e33e9(0x212),'summary':a1_0x5e33e9(0x1ea),'whenToUse':a1_0x5e33e9(0x1c1),'pathParams':[{'name':a1_0x5e33e9(0x1ef),'description':a1_0x5e33e9(0x1e7)},{'name':a1_0x5e33e9(0x1db),'description':a1_0x5e33e9(0x221)}],'queryParams':[],'bodySchema':'{\x22fieldName\x22:\x22value\x22}','responseHighlights':[a1_0x5e33e9(0x1fb)],'examples':[a1_0x5e33e9(0x1c4)],'notes':[a1_0x5e33e9(0x1cf)],'markdown':a1_0x5e33e9(0x211)},{'code':a1_0x5e33e9(0x1d2),'category':'bf','title':a1_0x5e33e9(0x1ec),'method':a1_0x5e33e9(0x1c9),'path':'/api/endpoint/{appCode}/functions','summary':a1_0x5e33e9(0x1c3),'whenToUse':a1_0x5e33e9(0x1ce),'pathParams':[{'name':'appCode','description':a1_0x5e33e9(0x1e7)}],'queryParams':[],'bodySchema':a1_0x5e33e9(0x217),'responseHighlights':[a1_0x5e33e9(0x20b)],'examples':['lovrabet\x20bff\x20detail\x20--id\x20<scriptId>\x20--appcode\x20<appCode>'],'notes':[a1_0x5e33e9(0x214)],'markdown':a1_0x5e33e9(0x204)},{'code':a1_0x5e33e9(0x1f3),'category':'bf','title':'Execute\x20BF\x20endpoint\x20function','method':'POST','path':a1_0x5e33e9(0x1ee),'summary':a1_0x5e33e9(0x1d4),'whenToUse':'已经确认目标\x20BF\x20的\x20scriptName,且需要实际调用该\x20ENDPOINT\x20脚本完成业务操作时使用','pathParams':[{'name':a1_0x5e33e9(0x1ef),'description':a1_0x5e33e9(0x1e7)},{'name':'scriptName','description':a1_0x5e33e9(0x201)}],'queryParams':[],'bodySchema':a1_0x5e33e9(0x1e5),'responseHighlights':[a1_0x5e33e9(0x1bc)],'examples':[a1_0x5e33e9(0x1c6)],'notes':[a1_0x5e33e9(0x219)],'markdown':a1_0x5e33e9(0x1bd)},{'code':'custom_sql_execute','category':a1_0x5e33e9(0x207),'title':a1_0x5e33e9(0x1ed),'method':a1_0x5e33e9(0x1ba),'path':'/api/custom/executeSql','summary':'执行自定义\x20SQL','whenToUse':a1_0x5e33e9(0x1bf),'pathParams':[],'queryParams':[],'bodySchema':a1_0x5e33e9(0x220),'responseHighlights':[a1_0x5e33e9(0x1e1)],'examples':[a1_0x5e33e9(0x21c)],'notes':['Use\x20`lovrabet\x20sql\x20detail`\x20before\x20execution.'],'markdown':a1_0x5e33e9(0x20a)}];function entrySummary(_0x2a9a9b){const _0x374ad9=a1_0x5e33e9;return{'code':_0x2a9a9b[_0x374ad9(0x1f7)],'category':_0x2a9a9b[_0x374ad9(0x1c7)],'method':_0x2a9a9b[_0x374ad9(0x1b9)],'path':_0x2a9a9b['path'],'summary':_0x2a9a9b[_0x374ad9(0x1cb)],'whenToUse':_0x2a9a9b[_0x374ad9(0x203)]};}function a1_0x379e(_0x16987c,_0x6d9b63){_0x16987c=_0x16987c-0x1b1;const _0x545488=a1_0x5454();let _0x379e59=_0x545488[_0x16987c];return _0x379e59;}export function listApiDocEntries(_0x3b2597={}){const _0xc5f9f6=a1_0x5e33e9,_0x198493=String(_0x3b2597[_0xc5f9f6(0x1c7)]||'')['trim'](),_0x45dda9=String(_0x3b2597[_0xc5f9f6(0x1e0)]||'')['trim']()[_0xc5f9f6(0x1e6)]();return DOCS[_0xc5f9f6(0x1e2)](_0x50d115=>{const _0x1fb816=_0xc5f9f6;if(_0x198493&&_0x50d115[_0x1fb816(0x1c7)]!==_0x198493)return![];if(!_0x45dda9)return!![];return[_0x50d115[_0x1fb816(0x1f7)],_0x50d115[_0x1fb816(0x1c7)],_0x50d115['method'],_0x50d115[_0x1fb816(0x208)],_0x50d115['summary'],_0x50d115['whenToUse'],_0x50d115[_0x1fb816(0x1d3)]]['join']('\x20')['toLowerCase']()[_0x1fb816(0x1c8)](_0x45dda9);})[_0xc5f9f6(0x1be)](entrySummary);}export function getApiDocDetail(_0x524475){const _0x552315=a1_0x5e33e9,_0x59cebd=DOCS[_0x552315(0x1f4)](_0x12666a=>_0x12666a[_0x552315(0x1f7)]===_0x524475);if(!_0x59cebd)throw CliErrors['validation'](_0x552315(0x20f)+_0x524475);return{..._0x59cebd};}const apiDocList={'service':a1_0x5e33e9(0x1e8),'command':a1_0x5e33e9(0x1b6),'description':a1_0x5e33e9(0x1d9),'risk':a1_0x5e33e9(0x206),'requiresAppCode':![],'flags':[CATEGORY_FLAG,KEYWORD_FLAG],async 'execute'(_0x8463d1){const _0x1e242a=a1_0x5e33e9,_0x15f146=listApiDocEntries({'category':_0x8463d1[_0x1e242a(0x1dd)](_0x1e242a(0x1c7)),'keyword':_0x8463d1['str'](_0x1e242a(0x1e0))});return{'ok':!![],'data':{'total':_0x15f146['length'],'items':_0x15f146}};}},apiDocDetail={'service':a1_0x5e33e9(0x1e8),'command':a1_0x5e33e9(0x1de),'description':'Show\x20runtime\x20API\x20documentation\x20by\x20code','risk':'read','requiresAppCode':![],'flags':[DOC_CODE_FLAG],async 'execute'(_0x1c2aa6){const _0x406949=a1_0x5e33e9;return{'ok':!![],'data':getApiDocDetail(_0x1c2aa6[_0x406949(0x1dd)](_0x406949(0x1f7)))};}};export const apiDocDefinitions=[apiDocList,apiDocDetail];
1
+ const a1_0x3327e0=a1_0x3c61;function a1_0x110e(){const _0x41b951=['创建数据','Use\x20read-only\x20data\x20commands\x20before\x20writing\x20Artifacts\x20that\x20display\x20real\x20data.','需要按\x20groupBy\x20分组并做\x20count、sum、avg、max、min\x20等聚合统计时使用','##\x20Get\x20one\x20dataset\x20record\x0a\x0aRead\x20one\x20record\x20by\x20id.','Inspect\x20field\x20names\x20and\x20operation\x20metadata\x20for\x20a\x20known\x20dataset\x20code.','Script\x20behavior\x20may\x20have\x20side\x20effects;\x20inspect\x20detail\x20first.','API\x20doc\x20code\x20not\x20found:\x20','includes','##\x20Filter\x20dataset\x20data','6xcWxzK','lovrabet\x20data\x20aggregate\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22aggregate\x22:[{\x22field\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}]}\x27','detail','List\x20BF\x20endpoint\x20functions','toLowerCase','分页获取数据集列表','10wSGqTL','None','lovrabet\x20sql\x20exec\x20--sqlcode\x20<sqlCode>\x20--params\x20\x27{}\x27','path','method','length','whenToUse','List\x20datasets','fields/properties\x20describe\x20data\x20shape','Endpoint\x20function\x20name','List\x20available\x20runtime\x20API\x20documentation\x20entries','Search\x20docs\x20by\x20code,\x20summary,\x20path,\x20or\x20usage\x20text','lovrabet\x20data\x20create\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22name\x22:\x22demo\x22}\x27','需要向指定数据集新增一条业务数据时使用','scriptName','Create\x20dataset\x20record','11457891BOrdfQ','dataset_data_filter','Returns\x20SQL\x20execution\x20payload','##\x20List\x20datasets','Filter\x20docs\x20by\x20category,\x20for\x20example\x20dataset','string','datasetCode','/api/{appCode}/{datasetCode}/aggregate','需要先确认当前应用有哪些可执行的\x20BF/ENDPOINT\x20函数,以及收敛可用\x20scriptName\x20时使用','where\x20filters\x20before\x20aggregation','##\x20Execute\x20custom\x20SQL\x0a\x0aExecute\x20a\x20configured\x20SQL\x20script\x20by\x20sqlCode.','Use\x20`where`,\x20`select`,\x20`orderBy`,\x20`currentPage`,\x20and\x20`pageSize`\x20to\x20inspect\x20live\x20data\x20shape.','tableData\x20contains\x20records','trim','category','appCode','346227SHJEml','已经确认目标\x20sqlCode\x20存在,并需要实际执行该自定义\x20SQL\x20时使用','{\x22fieldName\x22:\x22value\x22}','聚合查询数据集数据','lovrabet\x20bff\x20detail\x20--id\x20<scriptId>\x20--appcode\x20<appCode>','{\x22param\x22:\x22value\x22}','map','code','dataset','3256050muSKOC','/api/endpoint/{appCode}/{scriptName}','Current\x20app\x20code','custom_sql','704509XgAqul','/api/dataset/getOneByCode?code={datasetCode}','{\x22id\x22:123}','lovrabet\x20dataset\x20detail\x20--code\x20<datasetCode>\x20--appcode\x20<appCode>','validation','POST','55788HtPCBr','Get\x20one\x20dataset\x20record','/api/{appCode}/{datasetCode}/getOne','read','api-doc','bf_execute','operations\x20describes\x20runtime\x20APIs','This\x20is\x20a\x20write\x20operation;\x20use\x20dry-run\x20when\x20available\x20and\x20safe\x20fixtures\x20for\x20smoke\x20tests.','{\x22appCode\x22:\x22app-aa63b188\x22,\x22currentPage\x22:1,\x22pageSize\x22:100}','已经确认目标\x20BF\x20的\x20scriptName,且需要实际调用该\x20ENDPOINT\x20脚本完成业务操作时使用','GET','Filter\x20dataset\x20data','Dataset\x20detail','summary','/api/{appCode}/{datasetCode}/filter','paging.totalCount\x20gives\x20total\x20rows','Aggregate\x20dataset\x20data','需要携带\x20where、orderBy、分页等条件读取业务数据时使用','list','219yeAjlP','{\x22appCode\x22:\x22app-aa63b188\x22,\x22sqlCode\x22:\x22xxxxxxxx-xxxxxxxx\x22,\x22params\x22:{}}','{\x22where\x22:{},\x22currentPage\x22:1,\x22pageSize\x22:20}','dataset_data_get_one','filter','bf_function_list','paging\x20contains\x20pagination','32-character\x20dataset\x20code','result\x20rows\x20contain\x20aggregate\x20aliases','{\x22aggregate\x22:[{\x22field\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[]}','##\x20Dataset\x20detail','条件过滤查询数据','9032808jnKJcw','Prefer\x20`filter`\x20when\x20the\x20record\x20id\x20is\x20unknown.','dataset_data_create','##\x20Create\x20dataset\x20record\x0a\x0aCreate\x20one\x20data\x20record\x20in\x20a\x20dataset.','Returns\x20the\x20created\x20record\x20or\x20backend\x20operation\x20result','需要按数据集\x20code\x20获取字段、表信息或操作定义时使用','join','Use\x20`lovrabet\x20sql\x20detail`\x20before\x20execution.','执行自定义\x20SQL','keyword','已经知道记录\x20id,需要按数据集读取单条业务数据时使用','find','Show\x20runtime\x20API\x20documentation\x20by\x20code','/api/custom/executeSql','/api/{appCode}/{datasetCode}/create','1091715iAADCN','If\x20SDK\x20usage\x20is\x20needed,\x20follow\x20with\x20`lovrabet\x20dataset\x20sdk-doc\x20--code\x20<datasetCode>`.','需要按\x20appCode\x20分页获取运行态数据集列表,并优先收敛可用\x20datasetCode\x20时使用','str'];a1_0x110e=function(){return _0x41b951;};return a1_0x110e();}(function(_0x2fc567,_0x1b2e95){const _0x15ed08=a1_0x3c61,_0x18c50a=_0x2fc567();while(!![]){try{const _0x42e971=-parseInt(_0x15ed08(0x145))/0x1+-parseInt(_0x15ed08(0x141))/0x2+parseInt(_0x15ed08(0x15e))/0x3*(parseInt(_0x15ed08(0x14b))/0x4)+-parseInt(_0x15ed08(0x105))/0x5+-parseInt(_0x15ed08(0x112))/0x6*(-parseInt(_0x15ed08(0x138))/0x7)+parseInt(_0x15ed08(0x16a))/0x8+-parseInt(_0x15ed08(0x128))/0x9*(-parseInt(_0x15ed08(0x118))/0xa);if(_0x42e971===_0x1b2e95)break;else _0x18c50a['push'](_0x18c50a['shift']());}catch(_0x2c6447){_0x18c50a['push'](_0x18c50a['shift']());}}}(a1_0x110e,0xe0583));import{CliErrors}from'../../errors.js';const CATEGORY_FLAG={'name':a1_0x3327e0(0x136),'type':a1_0x3327e0(0x12d),'description':a1_0x3327e0(0x12c)},KEYWORD_FLAG={'name':a1_0x3327e0(0xff),'type':'string','description':a1_0x3327e0(0x123)},DOC_CODE_FLAG={'name':a1_0x3327e0(0x13f),'type':a1_0x3327e0(0x12d),'required':!![],'description':'API\x20doc\x20code,\x20for\x20example\x20dataset_list'},DOCS=[{'code':'dataset_list','category':a1_0x3327e0(0x140),'title':a1_0x3327e0(0x11f),'method':'POST','path':'/api/dataset/get-dataset-list-by-app-code','summary':a1_0x3327e0(0x117),'whenToUse':a1_0x3327e0(0x107),'pathParams':[],'queryParams':[],'bodySchema':a1_0x3327e0(0x153),'responseHighlights':['tableData\x20contains\x20dataset\x20id/code/name',a1_0x3327e0(0x15a)],'examples':['lovrabet\x20dataset\x20list\x20--appcode\x20<appCode>\x20--format\x20compress'],'notes':['CLI\x20users\x20should\x20prefer\x20`lovrabet\x20dataset\x20list`\x20for\x20this\x20workflow.'],'markdown':[a1_0x3327e0(0x12b),'','Use\x20this\x20API\x20or\x20`lovrabet\x20dataset\x20list`\x20to\x20discover\x20available\x20dataset\x20codes\x20before\x20reading\x20data.'][a1_0x3327e0(0xfc)]('\x0a')},{'code':'dataset_detail','category':a1_0x3327e0(0x140),'title':a1_0x3327e0(0x157),'method':a1_0x3327e0(0x155),'path':a1_0x3327e0(0x146),'summary':'获取数据集详情','whenToUse':a1_0x3327e0(0xfb),'pathParams':[],'queryParams':[{'name':a1_0x3327e0(0x13f),'description':a1_0x3327e0(0x165)}],'bodySchema':a1_0x3327e0(0x119),'responseHighlights':[a1_0x3327e0(0x120),a1_0x3327e0(0x151)],'examples':[a1_0x3327e0(0x148)],'notes':[a1_0x3327e0(0x106)],'markdown':[a1_0x3327e0(0x168),'',a1_0x3327e0(0x10d)][a1_0x3327e0(0xfc)]('\x0a')},{'code':a1_0x3327e0(0x129),'category':a1_0x3327e0(0x140),'title':a1_0x3327e0(0x156),'method':a1_0x3327e0(0x14a),'path':a1_0x3327e0(0x159),'summary':a1_0x3327e0(0x169),'whenToUse':a1_0x3327e0(0x15c),'pathParams':[{'name':'appCode','description':'Current\x20app\x20code'},{'name':a1_0x3327e0(0x12e),'description':a1_0x3327e0(0x165)}],'queryParams':[],'bodySchema':a1_0x3327e0(0x160),'responseHighlights':[a1_0x3327e0(0x134),a1_0x3327e0(0x164)],'examples':['lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:5}\x27'],'notes':[a1_0x3327e0(0x10a)],'markdown':[a1_0x3327e0(0x111),'',a1_0x3327e0(0x133)][a1_0x3327e0(0xfc)]('\x0a')},{'code':'dataset_data_aggregate','category':a1_0x3327e0(0x140),'title':a1_0x3327e0(0x15b),'method':a1_0x3327e0(0x14a),'path':a1_0x3327e0(0x12f),'summary':a1_0x3327e0(0x13b),'whenToUse':a1_0x3327e0(0x10b),'pathParams':[{'name':a1_0x3327e0(0x137),'description':a1_0x3327e0(0x143)},{'name':a1_0x3327e0(0x12e),'description':a1_0x3327e0(0x165)}],'queryParams':[],'bodySchema':a1_0x3327e0(0x167),'responseHighlights':[a1_0x3327e0(0x166),a1_0x3327e0(0x131)],'examples':[a1_0x3327e0(0x113)],'notes':['Use\x20`having`\x20only\x20for\x20post-aggregation\x20filters.'],'markdown':['##\x20Aggregate\x20dataset\x20data','','Aggregate\x20supports\x20COUNT,\x20SUM,\x20AVG,\x20MAX,\x20and\x20MIN\x20definitions\x20in\x20the\x20`aggregate`\x20array.'][a1_0x3327e0(0xfc)]('\x0a')},{'code':a1_0x3327e0(0x161),'category':'dataset','title':a1_0x3327e0(0x14c),'method':'POST','path':a1_0x3327e0(0x14d),'summary':'查询单条数据','whenToUse':a1_0x3327e0(0x100),'pathParams':[{'name':a1_0x3327e0(0x137),'description':a1_0x3327e0(0x143)},{'name':a1_0x3327e0(0x12e),'description':'32-character\x20dataset\x20code'}],'queryParams':[],'bodySchema':a1_0x3327e0(0x147),'responseHighlights':['Returns\x20one\x20matching\x20business\x20record'],'examples':['lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27'],'notes':[a1_0x3327e0(0x16b)],'markdown':a1_0x3327e0(0x10c)},{'code':a1_0x3327e0(0x16c),'category':a1_0x3327e0(0x140),'title':a1_0x3327e0(0x127),'method':'POST','path':a1_0x3327e0(0x104),'summary':a1_0x3327e0(0x109),'whenToUse':a1_0x3327e0(0x125),'pathParams':[{'name':a1_0x3327e0(0x137),'description':a1_0x3327e0(0x143)},{'name':a1_0x3327e0(0x12e),'description':a1_0x3327e0(0x165)}],'queryParams':[],'bodySchema':a1_0x3327e0(0x13a),'responseHighlights':[a1_0x3327e0(0xfa)],'examples':[a1_0x3327e0(0x124)],'notes':[a1_0x3327e0(0x152)],'markdown':a1_0x3327e0(0x16d)},{'code':a1_0x3327e0(0x163),'category':'bf','title':a1_0x3327e0(0x115),'method':a1_0x3327e0(0x155),'path':'/api/endpoint/{appCode}/functions','summary':'获取应用下可调用的\x20BF\x20函数列表','whenToUse':a1_0x3327e0(0x130),'pathParams':[{'name':a1_0x3327e0(0x137),'description':a1_0x3327e0(0x143)}],'queryParams':[],'bodySchema':a1_0x3327e0(0x119),'responseHighlights':['Returns\x20endpoint\x20functionName/id/description'],'examples':[a1_0x3327e0(0x13c)],'notes':['CLI\x20has\x20typed\x20`bff\x20detail`\x20and\x20`bff\x20exec`\x20commands\x20for\x20endpoint\x20scripts.'],'markdown':'##\x20List\x20BF\x20endpoint\x20functions\x0a\x0aDiscover\x20executable\x20endpoint\x20functions.'},{'code':a1_0x3327e0(0x150),'category':'bf','title':'Execute\x20BF\x20endpoint\x20function','method':a1_0x3327e0(0x14a),'path':a1_0x3327e0(0x142),'summary':'执行指定\x20BF\x20函数','whenToUse':a1_0x3327e0(0x154),'pathParams':[{'name':a1_0x3327e0(0x137),'description':a1_0x3327e0(0x143)},{'name':a1_0x3327e0(0x126),'description':a1_0x3327e0(0x121)}],'queryParams':[],'bodySchema':a1_0x3327e0(0x13d),'responseHighlights':['Returns\x20script\x20business\x20payload'],'examples':['lovrabet\x20bff\x20exec\x20--name\x20<functionName>\x20--params\x20\x27{}\x27'],'notes':[a1_0x3327e0(0x10e)],'markdown':'##\x20Execute\x20BF\x20endpoint\x20function\x0a\x0aExecute\x20a\x20known\x20endpoint\x20script.'},{'code':'custom_sql_execute','category':a1_0x3327e0(0x144),'title':'Execute\x20custom\x20SQL','method':a1_0x3327e0(0x14a),'path':a1_0x3327e0(0x103),'summary':a1_0x3327e0(0xfe),'whenToUse':a1_0x3327e0(0x139),'pathParams':[],'queryParams':[],'bodySchema':a1_0x3327e0(0x15f),'responseHighlights':[a1_0x3327e0(0x12a)],'examples':[a1_0x3327e0(0x11a)],'notes':[a1_0x3327e0(0xfd)],'markdown':a1_0x3327e0(0x132)}];function entrySummary(_0x2c88f0){const _0xbe8ef1=a1_0x3327e0;return{'code':_0x2c88f0[_0xbe8ef1(0x13f)],'category':_0x2c88f0['category'],'method':_0x2c88f0[_0xbe8ef1(0x11c)],'path':_0x2c88f0[_0xbe8ef1(0x11b)],'summary':_0x2c88f0[_0xbe8ef1(0x158)],'whenToUse':_0x2c88f0[_0xbe8ef1(0x11e)]};}export function listApiDocEntries(_0x5e51b3={}){const _0x2cf7dd=a1_0x3327e0,_0x4a8709=String(_0x5e51b3['category']||'')[_0x2cf7dd(0x135)](),_0x50044c=String(_0x5e51b3['keyword']||'')['trim']()[_0x2cf7dd(0x116)]();return DOCS[_0x2cf7dd(0x162)](_0x3bdcd1=>{const _0x40e777=_0x2cf7dd;if(_0x4a8709&&_0x3bdcd1['category']!==_0x4a8709)return![];if(!_0x50044c)return!![];return[_0x3bdcd1[_0x40e777(0x13f)],_0x3bdcd1[_0x40e777(0x136)],_0x3bdcd1[_0x40e777(0x11c)],_0x3bdcd1['path'],_0x3bdcd1['summary'],_0x3bdcd1[_0x40e777(0x11e)],_0x3bdcd1['title']][_0x40e777(0xfc)]('\x20')[_0x40e777(0x116)]()[_0x40e777(0x110)](_0x50044c);})[_0x2cf7dd(0x13e)](entrySummary);}function a1_0x3c61(_0x3d6a5e,_0x2af1e6){_0x3d6a5e=_0x3d6a5e-0xfa;const _0x110e03=a1_0x110e();let _0x3c6135=_0x110e03[_0x3d6a5e];return _0x3c6135;}export function getApiDocDetail(_0x56d137){const _0x1ca184=a1_0x3327e0,_0x21ba6f=DOCS[_0x1ca184(0x101)](_0x4781be=>_0x4781be[_0x1ca184(0x13f)]===_0x56d137);if(!_0x21ba6f)throw CliErrors[_0x1ca184(0x149)](_0x1ca184(0x10f)+_0x56d137);return{..._0x21ba6f};}const apiDocList={'service':'api-doc','command':a1_0x3327e0(0x15d),'description':a1_0x3327e0(0x122),'risk':a1_0x3327e0(0x14e),'requiresAppCode':![],'flags':[CATEGORY_FLAG,KEYWORD_FLAG],async 'execute'(_0x1e0cce){const _0x8332d=a1_0x3327e0,_0x95289=listApiDocEntries({'category':_0x1e0cce[_0x8332d(0x108)](_0x8332d(0x136)),'keyword':_0x1e0cce['str']('keyword')});return{'ok':!![],'data':{'total':_0x95289[_0x8332d(0x11d)],'items':_0x95289}};}},apiDocDetail={'service':a1_0x3327e0(0x14f),'command':a1_0x3327e0(0x114),'description':a1_0x3327e0(0x102),'risk':'read','requiresAppCode':![],'flags':[DOC_CODE_FLAG],async 'execute'(_0x18654e){const _0x1fad38=a1_0x3327e0;return{'ok':!![],'data':getApiDocDetail(_0x18654e[_0x1fad38(0x108)](_0x1fad38(0x13f)))};}};export const apiDocDefinitions=[apiDocList,apiDocDetail];
@@ -1 +1 @@
1
- (function(_0x1c32ab,_0x2a1e02){const _0x25575a=a2_0x3a38,_0x627ea4=_0x1c32ab();while(!![]){try{const _0x39e2bf=parseInt(_0x25575a(0x10e))/0x1*(-parseInt(_0x25575a(0x109))/0x2)+-parseInt(_0x25575a(0xfe))/0x3*(parseInt(_0x25575a(0xfd))/0x4)+-parseInt(_0x25575a(0x10c))/0x5+parseInt(_0x25575a(0x116))/0x6+-parseInt(_0x25575a(0x103))/0x7*(parseInt(_0x25575a(0x112))/0x8)+-parseInt(_0x25575a(0xfc))/0x9*(-parseInt(_0x25575a(0x111))/0xa)+parseInt(_0x25575a(0x10d))/0xb;if(_0x39e2bf===_0x2a1e02)break;else _0x627ea4['push'](_0x627ea4['shift']());}catch(_0x2152f8){_0x627ea4['push'](_0x627ea4['shift']());}}}(a2_0x5ea0,0xe6bc2));import{createHash}from'node:crypto';import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{homedir}from'node:os';function a2_0x3a38(_0x345ef4,_0x723ba9){_0x345ef4=_0x345ef4-0xfc;const _0x5ea0ef=a2_0x5ea0();let _0x3a386f=_0x5ea0ef[_0x345ef4];return _0x3a386f;}import{dirname,resolve}from'node:path';import{PRODUCT_CONFIG}from'../../constant/product.js';export function fingerprintAccessKey(_0x3a71c0){const _0x1466c6=a2_0x3a38,_0x126734=_0x3a71c0[_0x1466c6(0xff)](),_0x169881=_0x126734[_0x1466c6(0x10a)](-0x6)||'unknown',_0x13e31c=createHash(_0x1466c6(0x102))[_0x1466c6(0x10b)](_0x126734)[_0x1466c6(0x107)](_0x1466c6(0x105))['slice'](0x0,0xc);return _0x1466c6(0x108)+_0x169881+'_'+_0x13e31c;}function a2_0x5ea0(){const _0x1d2163=['isArray','items','190BJDTZZ','9729088mBYWsz','code','appCode','stringify','9351420sSISVW','193122dxlUCR','515384oMODPE','39tEERSV','trim','my-apps.json','cache','sha256','7eZmNqz','find','hex','EPERM','digest','ak_','1073820udEYoW','slice','update','1435840ZsRcFc','29634330DIyHpa','1kOfOZE'];a2_0x5ea0=function(){return _0x1d2163;};return a2_0x5ea0();}export function getAppCacheFilePath(_0x496675,_0xcf36f6){const _0x1ff41d=a2_0x3a38;return resolve(homedir(),PRODUCT_CONFIG['homeDirName'],_0x1ff41d(0x101),_0x496675,fingerprintAccessKey(_0xcf36f6),_0x1ff41d(0x100));}export function readCachedAppList(_0x267dac,_0x559c34){const _0xb24c8c=a2_0x3a38;if(!_0x559c34?.['trim']())return null;const _0x4df181=getAppCacheFilePath(_0x267dac,_0x559c34);if(!existsSync(_0x4df181))return null;try{const _0x3199b8=readFileSync(_0x4df181,'utf8');if(!_0x3199b8[_0xb24c8c(0xff)]())return null;const _0x211942=JSON['parse'](_0x3199b8);if(!Array[_0xb24c8c(0x10f)](_0x211942['items']))return null;return _0x211942;}catch{return null;}}export function writeCachedAppList(_0x25be5b,_0x386541,_0x49e908){const _0x42b244=a2_0x3a38,_0x36b8c9=getAppCacheFilePath(_0x25be5b,_0x386541),_0x23edd5=dirname(_0x36b8c9);!existsSync(_0x23edd5)&&mkdirSync(_0x23edd5,{'recursive':!![]});const _0xe99170=_0x36b8c9+'.tmp';try{writeFileSync(_0xe99170,JSON[_0x42b244(0x115)](_0x49e908,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180});try{renameSync(_0xe99170,_0x36b8c9);}catch(_0x3fae6f){if(_0x3fae6f[_0x42b244(0x113)]===_0x42b244(0x106)||_0x3fae6f[_0x42b244(0x113)]==='EXDEV'||_0x3fae6f[_0x42b244(0x113)]==='EACCES'){writeFileSync(_0x36b8c9,JSON[_0x42b244(0x115)](_0x49e908,null,0x2)+'\x0a',{'encoding':'utf8'});try{unlinkSync(_0xe99170);}catch{}}else throw _0x3fae6f;}}catch(_0x390440){try{unlinkSync(_0xe99170);}catch{}throw _0x390440;}return _0x36b8c9;}export function resolveCachedAppCode(_0x2ab2cc,_0x2e731f,_0x369d4e){const _0x400500=a2_0x3a38;if(!_0x2ab2cc)return undefined;const _0x452347=readCachedAppList(_0x2e731f,_0x369d4e),_0x1ff0d9=_0x452347?.[_0x400500(0x110)][_0x400500(0x104)](_0x2673e9=>_0x2673e9['appName']===_0x2ab2cc);return _0x1ff0d9?.[_0x400500(0x114)]?.[_0x400500(0xff)]()||undefined;}
1
+ (function(_0x492104,_0x36d280){const _0x3e2d43=a2_0x5018,_0x45018b=_0x492104();while(!![]){try{const _0xa9435e=-parseInt(_0x3e2d43(0x160))/0x1+-parseInt(_0x3e2d43(0x162))/0x2+-parseInt(_0x3e2d43(0x14b))/0x3+-parseInt(_0x3e2d43(0x158))/0x4*(parseInt(_0x3e2d43(0x152))/0x5)+-parseInt(_0x3e2d43(0x165))/0x6*(-parseInt(_0x3e2d43(0x168))/0x7)+parseInt(_0x3e2d43(0x15d))/0x8+parseInt(_0x3e2d43(0x15e))/0x9*(parseInt(_0x3e2d43(0x159))/0xa);if(_0xa9435e===_0x36d280)break;else _0x45018b['push'](_0x45018b['shift']());}catch(_0x4f9754){_0x45018b['push'](_0x45018b['shift']());}}}(a2_0x3151,0x4d358));import{createHash}from'node:crypto';function a2_0x3151(){const _0x4e5ef3=['hex','find','4070568ZMdqhP','42669yFjnUN','stringify','509586hIDxry','ak_','920222pvWrvr','EACCES','appCode','42sKEqfQ','EXDEV','utf8','279622wDYyZV','EPERM','.tmp','update','190026HtrEra','items','slice','trim','my-apps.json','parse','sha256','585595mfKxpA','digest','cache','isArray','homeDirName','code','4jRklef','1430tdUfKg','unknown'];a2_0x3151=function(){return _0x4e5ef3;};return a2_0x3151();}import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{homedir}from'node:os';function a2_0x5018(_0xc2613f,_0x35d1f1){_0xc2613f=_0xc2613f-0x148;const _0x315168=a2_0x3151();let _0x501831=_0x315168[_0xc2613f];return _0x501831;}import{dirname,resolve}from'node:path';import{PRODUCT_CONFIG}from'../../constant/product.js';export function fingerprintAccessKey(_0x34ed27){const _0x2ce372=a2_0x5018,_0xcbb9b3=_0x34ed27[_0x2ce372(0x14e)](),_0x2dacec=_0xcbb9b3[_0x2ce372(0x14d)](-0x6)||_0x2ce372(0x15a),_0x17cb86=createHash(_0x2ce372(0x151))[_0x2ce372(0x14a)](_0xcbb9b3)[_0x2ce372(0x153)](_0x2ce372(0x15b))[_0x2ce372(0x14d)](0x0,0xc);return _0x2ce372(0x161)+_0x2dacec+'_'+_0x17cb86;}export function getAppCacheFilePath(_0x1393dd,_0x38dd72){const _0xd2ab6e=a2_0x5018;return resolve(homedir(),PRODUCT_CONFIG[_0xd2ab6e(0x156)],_0xd2ab6e(0x154),_0x1393dd,fingerprintAccessKey(_0x38dd72),_0xd2ab6e(0x14f));}export function readCachedAppList(_0x5d5bcf,_0x4d0281){const _0x328281=a2_0x5018;if(!_0x4d0281?.[_0x328281(0x14e)]())return null;const _0x46beb2=getAppCacheFilePath(_0x5d5bcf,_0x4d0281);if(!existsSync(_0x46beb2))return null;try{const _0x540aa1=readFileSync(_0x46beb2,_0x328281(0x167));if(!_0x540aa1['trim']())return null;const _0x1ee4c7=JSON[_0x328281(0x150)](_0x540aa1);if(!Array[_0x328281(0x155)](_0x1ee4c7[_0x328281(0x14c)]))return null;return _0x1ee4c7;}catch{return null;}}export function writeCachedAppList(_0x4cdb31,_0x1595d8,_0x36ac39){const _0x4d5812=a2_0x5018,_0x571120=getAppCacheFilePath(_0x4cdb31,_0x1595d8),_0x1b055a=dirname(_0x571120);!existsSync(_0x1b055a)&&mkdirSync(_0x1b055a,{'recursive':!![]});const _0x5315f7=_0x571120+_0x4d5812(0x149);try{writeFileSync(_0x5315f7,JSON[_0x4d5812(0x15f)](_0x36ac39,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180});try{renameSync(_0x5315f7,_0x571120);}catch(_0x4ee376){if(_0x4ee376[_0x4d5812(0x157)]===_0x4d5812(0x148)||_0x4ee376[_0x4d5812(0x157)]===_0x4d5812(0x166)||_0x4ee376[_0x4d5812(0x157)]===_0x4d5812(0x163)){writeFileSync(_0x571120,JSON[_0x4d5812(0x15f)](_0x36ac39,null,0x2)+'\x0a',{'encoding':'utf8'});try{unlinkSync(_0x5315f7);}catch{}}else throw _0x4ee376;}}catch(_0x1e1eea){try{unlinkSync(_0x5315f7);}catch{}throw _0x1e1eea;}return _0x571120;}export function resolveCachedAppCode(_0x1d645e,_0x4ba7e8,_0x571c03){const _0x1d4c1b=a2_0x5018;if(!_0x1d645e)return undefined;const _0x2a3a39=readCachedAppList(_0x4ba7e8,_0x571c03),_0x4ee3a2=_0x2a3a39?.['items'][_0x1d4c1b(0x15c)](_0x3bb74e=>_0x3bb74e['appName']===_0x1d645e);return _0x4ee3a2?.[_0x1d4c1b(0x164)]?.['trim']()||undefined;}
@@ -1 +1 @@
1
- const a3_0x132b15=a3_0x40d9;function a3_0x42d7(){const _0x1c810f=['newConfigFileName','map','Filter\x20by\x20environment\x20(default:\x20current\x20env)','nonInteractive','\x20config\x20file','remote','langs','.\x20Local\x20aliases\x20can\x20be\x20added\x20under\x20apps.<alias>.appcode.','fetchedAt','config','isCurrent','Refreshed\x20app\x20cache\x20with\x20','name','args','write','accessKey','cachePath','Target\x20environment\x20(default:\x20current\x20env)','local','Initialize\x20','app','732960SxNxNn','use','trim','items','Read\x20from\x20local\x20cache\x20only','Remote\x20app\x20name\x20to\x20activate','../../commands/app/remote-source.js','2787095TOwjHX','512871NjtDwG','read','List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','Read\x20app\x20list\x20from\x20local\x20cache\x20only','3312690hrizxI','Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','string','Usage:\x20','push','production','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','../../commands/app/cache.js','entries','envName','str','isArray','from','1204264ofbQlb','env','find','enableI18n','source','appCode','length','raw','init','filter','Missing\x20app\x20name.','cache','2399060aXKyKS','28CcDywR','validation','\x20cached\x20app(s)\x20for\x20env=\x22','Set\x20the\x20fallback\x20app\x20candidate','2145690cYznEe','appOwnerName','6bcMfBe','type','14NDSZbv','bool','appName','Use\x20global\x20config\x20scope','no-cache','Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','i18nInfo','App\x20\x22','boolean','.appcode\x20to\x20.lovrabet.json.','\x20app(s)\x20for\x20env=\x22','join','../../context.js','projectPath','appcode','list','global','\x20app\x20list`\x20to\x20discover\x20remote\x20apps,\x20or\x20add\x20apps.','defaultApp','globalPath','\x20app\x20use\x20<name>\x20[--global]','77BDTbZn'];a3_0x42d7=function(){return _0x1c810f;};return a3_0x42d7();}(function(_0x109788,_0x1c7771){const _0x1d57db=a3_0x40d9,_0x1d3521=_0x109788();while(!![]){try{const _0xc1cca5=parseInt(_0x1d57db(0x18e))/0x1+-parseInt(_0x1d57db(0x1b3))/0x2+-parseInt(_0x1d57db(0x196))/0x3*(parseInt(_0x1d57db(0x1b4))/0x4)+-parseInt(_0x1d57db(0x195))/0x5*(-parseInt(_0x1d57db(0x1ba))/0x6)+parseInt(_0x1d57db(0x1bc))/0x7*(-parseInt(_0x1d57db(0x1a7))/0x8)+-parseInt(_0x1d57db(0x1b8))/0x9+parseInt(_0x1d57db(0x19a))/0xa*(parseInt(_0x1d57db(0x1d1))/0xb);if(_0xc1cca5===_0x1c7771)break;else _0x1d3521['push'](_0x1d3521['shift']());}catch(_0x5c5b66){_0x1d3521['push'](_0x1d3521['shift']());}}}(a3_0x42d7,0xa4715));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 a3_0x40d9(_0x3d33e7,_0x268580){_0x3d33e7=_0x3d33e7-0x189;const _0x42d71d=a3_0x42d7();let _0x40d914=_0x42d71d[_0x3d33e7];return _0x40d914;}const GLOBAL_FLAG={'name':a3_0x132b15(0x1cc),'type':a3_0x132b15(0x1c4),'description':a3_0x132b15(0x1bf),'default':![]};function collectFlags(_0x23b4ec,_0x51b77d){const _0x19cb44=a3_0x132b15,_0x186aba={};for(const _0xe12d5 of _0x51b77d){const _0x4c9b9e=_0xe12d5[_0x19cb44(0x1bb)]===_0x19cb44(0x1c4)?_0x23b4ec[_0x19cb44(0x1bd)](_0xe12d5[_0x19cb44(0x1de)]):_0x23b4ec['str'](_0xe12d5[_0x19cb44(0x1de)]);if(_0x4c9b9e!==''&&_0x4c9b9e!==![])_0x186aba[_0xe12d5[_0x19cb44(0x1de)]]=_0x4c9b9e;}if(_0x23b4ec['nonInteractive'])_0x186aba[_0x19cb44(0x1d5)]=!![];return _0x186aba;}function normalizeLanguages(_0x2ccb46){const _0x11e6e5=a3_0x132b15;if(!Array[_0x11e6e5(0x1a5)](_0x2ccb46))return[];return _0x2ccb46[_0x11e6e5(0x1b0)](_0x7e4dc4=>typeof _0x7e4dc4===_0x11e6e5(0x19c))[_0x11e6e5(0x1d3)](_0x44ba7c=>_0x44ba7c[_0x11e6e5(0x190)]())[_0x11e6e5(0x1b0)](Boolean);}function buildRemoteAppI18nFields(_0x31b968){const _0x323d3f=a3_0x132b15,_0x5eb4aa=normalizeLanguages(_0x31b968[_0x323d3f(0x1c2)]?.[_0x323d3f(0x1d8)]);return{'enableI18n':typeof _0x31b968['enableI18n']==='boolean'?_0x31b968[_0x323d3f(0x1aa)]:null,'languages':_0x5eb4aa,'i18nInfo':_0x31b968[_0x323d3f(0x1c2)]?{..._0x31b968[_0x323d3f(0x1c2)],'langs':_0x5eb4aa[_0x323d3f(0x1ad)]?_0x5eb4aa:null}:null};}const initDef={'service':a3_0x132b15(0x18d),'command':a3_0x132b15(0x1af),'description':a3_0x132b15(0x18c)+PRODUCT_CONFIG[a3_0x132b15(0x1d2)]+a3_0x132b15(0x1d6),'risk':a3_0x132b15(0x1e0),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initCreateFlagDefs,async 'execute'(_0x2abb14){return await runInit(collectFlags(_0x2abb14,initCreateFlagDefs)),{'ok':!![]};}},listDef={'service':a3_0x132b15(0x18d),'command':a3_0x132b15(0x1cb),'description':a3_0x132b15(0x198),'risk':a3_0x132b15(0x197),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':a3_0x132b15(0x1a8),'type':'string','description':a3_0x132b15(0x1d4),'enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0x132b15(0x18b),'type':a3_0x132b15(0x1c4),'description':a3_0x132b15(0x199),'default':![]},{'name':a3_0x132b15(0x1c0),'type':a3_0x132b15(0x1c4),'description':a3_0x132b15(0x1a0),'default':![]}],async 'execute'(_0x2365ec){const _0x4128dc=a3_0x132b15,_0xc2e72d=_0x2365ec[_0x4128dc(0x1a4)]('env')||_0x2365ec[_0x4128dc(0x1a3)]||getEnv()||_0x4128dc(0x19f),_0x1a8b1b=_0x2365ec[_0x4128dc(0x1bd)](_0x4128dc(0x18b)),_0x2d0ad0=_0x2365ec[_0x4128dc(0x1bd)](_0x4128dc(0x1c0)),{readRawConfigWithLayers:_0x58388a,resolveDefaultAppSource:_0x520262,getLocalAppAliases:_0x1e71cd}=await import(_0x4128dc(0x1c8)),{getRemoteAppList:_0x165b34}=await import(_0x4128dc(0x194)),{config:_0x7d6a19,layers:_0x4c4bda}=_0x58388a(),_0xbfde62=_0x520262(_0x4c4bda),{defaultApp:_0x256428}=_0x7d6a19,_0x4b2539=await _0x165b34({'env':_0xc2e72d,'accessKey':_0x2365ec[_0x4128dc(0x1e1)],'localOnly':_0x1a8b1b,'noCache':_0x2d0ad0}),_0x1982a1=_0x4b2539[_0x4128dc(0x191)]['map'](_0x13dfd8=>{const _0x2f957c=_0x4128dc;return{'name':_0x13dfd8['appName'],'appcode':_0x13dfd8[_0x2f957c(0x1ac)],'named':!![],'definedIn':_0x2f957c(0x1d7),'isDefault':_0x13dfd8[_0x2f957c(0x1be)]===_0x256428,...buildAppProfileListFields(_0xc2e72d),...buildRemoteAppI18nFields(_0x13dfd8),'source':_0x4b2539['source'],'owner':_0x13dfd8[_0x2f957c(0x1b9)]??null,'status':_0x13dfd8['appPublishStatus']??null,'cachedAt':_0x4b2539['fetchedAt']};}),_0x26fbb0=_0x1e71cd(_0x7d6a19);let _0x264bfd=0x0;for(const [_0x208889,_0x565ee7]of Object[_0x4128dc(0x1a2)](_0x26fbb0)){const _0x2bf1f8=typeof _0x565ee7[_0x4128dc(0x1ca)]===_0x4128dc(0x19c)?_0x565ee7[_0x4128dc(0x1ca)][_0x4128dc(0x190)]():'';if(!_0x2bf1f8)continue;_0x264bfd+=0x1,_0x1982a1[_0x4128dc(0x19e)]({'name':_0x208889,'appcode':_0x2bf1f8,'named':!![],'definedIn':_0x4128dc(0x18b),'isDefault':_0x208889===_0x256428,...buildAppProfileListFields(_0xc2e72d),'source':_0x4128dc(0x1db),'owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0x1982a1,_0x2365ec['mergedCli']);if(_0x1982a1['length']===0x0)return{'ok':!![],'data':[],'message':_0x4b2539['source']===_0x4128dc(0x1b2)?'No\x20cached\x20apps\x20found.':'No\x20apps\x20found\x20on\x20the\x20platform.'};const _0x109527=_0x1982a1['find'](_0x53aa70=>_0x53aa70[_0x4128dc(0x1dc)]===!![]),_0x2f17d2=_0x256428??_0x109527?.['name']??null,_0x2eced1={'env':_0xc2e72d,'source':_0x4b2539[_0x4128dc(0x1ab)],'fetchedAt':_0x4b2539[_0x4128dc(0x1da)],'cachePath':_0x4b2539[_0x4128dc(0x189)],'globalPath':_0x4c4bda[_0x4128dc(0x1cf)]??null,'projectPath':_0x4c4bda[_0x4128dc(0x1c9)]??null,'defaultApp':_0x2f17d2,'defaultAppSource':_0x256428!=null?_0xbfde62:null,'localAliasCount':_0x264bfd};return{'ok':!![],'data':{'items':_0x1982a1,'meta':_0x2eced1}};}},pullDef={'service':a3_0x132b15(0x18d),'command':'pull','description':a3_0x132b15(0x1c1),'risk':a3_0x132b15(0x1e0),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a3_0x132b15(0x1a8),'type':'string','description':a3_0x132b15(0x18a),'enum':[...RUNTIME_ENV_VALUES]},{'name':'local','type':a3_0x132b15(0x1c4),'description':a3_0x132b15(0x192),'default':![]},{'name':'no-cache','type':a3_0x132b15(0x1c4),'description':'Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','default':![]}],async 'execute'(_0x52b479){const _0x2a24d1=a3_0x132b15,_0x415bd9=_0x52b479[_0x2a24d1(0x1a4)]('env')||_0x52b479[_0x2a24d1(0x1a3)]||getEnv()||_0x2a24d1(0x19f),_0x45afd0=_0x52b479['bool']('local'),_0x86db45=_0x52b479[_0x2a24d1(0x1bd)]('no-cache'),{getRemoteAppList:_0x29f873}=await import('../../commands/app/remote-source.js'),_0x220487=await _0x29f873({'env':_0x415bd9,'accessKey':_0x52b479[_0x2a24d1(0x1e1)],'localOnly':_0x45afd0,'noCache':_0x86db45});return{'ok':!![],'data':{'total':_0x220487['items'][_0x2a24d1(0x1ad)],'env':_0x415bd9,'source':_0x220487[_0x2a24d1(0x1ab)],'fetchedAt':_0x220487[_0x2a24d1(0x1da)],'cachePath':_0x220487[_0x2a24d1(0x189)]},'message':_0x220487[_0x2a24d1(0x1ab)]===_0x2a24d1(0x1b2)?'Loaded\x20'+_0x220487[_0x2a24d1(0x191)][_0x2a24d1(0x1ad)]+_0x2a24d1(0x1b6)+_0x415bd9+'\x22.':_0x2a24d1(0x1dd)+_0x220487[_0x2a24d1(0x191)][_0x2a24d1(0x1ad)]+_0x2a24d1(0x1c6)+_0x415bd9+'\x22.'};}},useDef={'service':'app','command':a3_0x132b15(0x18f),'description':a3_0x132b15(0x1b7),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'name','description':a3_0x132b15(0x193),'required':!![]}],'flags':[GLOBAL_FLAG],async 'validate'(_0x45f4ba){const _0x16235b=a3_0x132b15;if(!_0x45f4ba[_0x16235b(0x1df)][0x0])throw CliErrors[_0x16235b(0x1b5)](_0x16235b(0x1b1),_0x16235b(0x19d)+CLI_BIN_NAME+'\x20app\x20use\x20<name>\x20[--global]');},async 'execute'(_0x58f0c3){const _0x491273=a3_0x132b15,_0x59da17=_0x58f0c3[_0x491273(0x1df)][0x0];if(!_0x59da17)throw CliErrors[_0x491273(0x1b5)](_0x491273(0x1b1),_0x491273(0x19d)+CLI_BIN_NAME+_0x491273(0x1d0));const {buildConfigFromFlags:_0xe342bd,resolveLocalAppAliasCode:_0x8b3bd}=await import('../../context.js'),{readCachedAppList:_0xfb524d}=await import(_0x491273(0x1a1)),_0x22e3a2=_0x58f0c3[_0x491273(0x1a4)](_0x491273(0x1a8)),_0x3d35af=_0xe342bd(_0x22e3a2?{'env':_0x22e3a2}:{}),_0x149920=_0xfb524d(_0x3d35af[_0x491273(0x1a8)],_0x3d35af[_0x491273(0x1e1)]),_0x1c92a5=_0x149920?.[_0x491273(0x191)][_0x491273(0x1a9)](_0x3777d2=>_0x3777d2[_0x491273(0x1be)]===_0x59da17),_0x354d39=_0x8b3bd(_0x3d35af[_0x491273(0x1ae)]??{},_0x59da17);if(!_0x1c92a5&&!_0x354d39&&_0x3d35af[_0x491273(0x1ce)]!==_0x59da17){const _0x1815c5=[..._0x149920?.['items'][_0x491273(0x1d3)](_0x3c073a=>_0x3c073a[_0x491273(0x1be)])??[]],_0xc00e3a=_0x1815c5[_0x491273(0x1ad)]===0x0?'Use\x20`'+CLI_BIN_NAME+_0x491273(0x1cd)+_0x59da17+_0x491273(0x1c5):'Available\x20remote\x20apps:\x20'+Array[_0x491273(0x1a6)](new Set(_0x1815c5))[_0x491273(0x1c7)](',\x20')+_0x491273(0x1d9);throw CliErrors[_0x491273(0x1b5)](_0x491273(0x1c3)+_0x59da17+'\x22\x20not\x20found.',_0xc00e3a);}const _0x20678d=_0x58f0c3['bool']('global');let _0x2ee107;if(_0x20678d)_0x2ee107={'global':!![]};else{const {isInProject:_0x3a541b}=await import(_0x491273(0x1c8)),_0x5ac07d=_0x3a541b();_0x2ee107=toScopeFlags(resolveConfigScope({'explicitGlobal':![],'policy':'project-default','inProject':_0x5ac07d}));}const _0x19c1cc=readConfig(_0x2ee107);return _0x19c1cc[_0x491273(0x1ce)]=_0x59da17,writeConfig(_0x19c1cc,_0x2ee107),{'ok':!![],'message':'Default\x20app\x20candidate\x20set\x20to\x20\x22'+_0x59da17+'\x22'+scopeLabel(_0x2ee107)+'.'};}},importDef={'service':a3_0x132b15(0x18d),'command':'import','description':a3_0x132b15(0x19b),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initImportFlagDefs,async 'execute'(_0x413f4b){return await runInitImport(collectFlags(_0x413f4b,initImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[initDef,listDef,pullDef,useDef,importDef];
1
+ const a3_0x2f3f65=a3_0x3a4f;(function(_0x1a9078,_0x452772){const _0x4dd4bd=a3_0x3a4f,_0x4597c0=_0x1a9078();while(!![]){try{const _0x898e5e=-parseInt(_0x4dd4bd(0xd6))/0x1+-parseInt(_0x4dd4bd(0x9d))/0x2*(-parseInt(_0x4dd4bd(0xbf))/0x3)+parseInt(_0x4dd4bd(0xd1))/0x4+parseInt(_0x4dd4bd(0xcc))/0x5+-parseInt(_0x4dd4bd(0xa5))/0x6*(parseInt(_0x4dd4bd(0x83))/0x7)+parseInt(_0x4dd4bd(0xb2))/0x8*(parseInt(_0x4dd4bd(0xa4))/0x9)+-parseInt(_0x4dd4bd(0xb9))/0xa;if(_0x898e5e===_0x452772)break;else _0x4597c0['push'](_0x4597c0['shift']());}catch(_0x4b005b){_0x4597c0['push'](_0x4597c0['shift']());}}}(a3_0x8307,0xba291));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';function a3_0x3a4f(_0x45c85e,_0x30f9d2){_0x45c85e=_0x45c85e-0x81;const _0x83071f=a3_0x8307();let _0x3a4f7b=_0x83071f[_0x45c85e];return _0x3a4f7b;}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':a3_0x2f3f65(0xb7),'type':'boolean','description':a3_0x2f3f65(0xcd),'default':![]};function collectFlags(_0x5a043e,_0x5721d2){const _0x3ceb27=a3_0x2f3f65,_0x5350f4={};for(const _0x8db2cb of _0x5721d2){const _0x1740b8=_0x8db2cb[_0x3ceb27(0x93)]===_0x3ceb27(0xcb)?_0x5a043e[_0x3ceb27(0x96)](_0x8db2cb[_0x3ceb27(0x9c)]):_0x5a043e['str'](_0x8db2cb['name']);if(_0x1740b8!==''&&_0x1740b8!==![])_0x5350f4[_0x8db2cb[_0x3ceb27(0x9c)]]=_0x1740b8;}if(_0x5a043e[_0x3ceb27(0xc4)])_0x5350f4[_0x3ceb27(0xc4)]=!![];return _0x5350f4;}function a3_0x8307(){const _0xb9aead=['remote','Read\x20from\x20local\x20cache\x20only','read','name','161074wJAUcE','args','Use\x20`','No\x20apps\x20found\x20on\x20the\x20platform.','production','trim','config','9VnOMyG','6rxXoCF','string','appPublishStatus','No\x20cached\x20apps\x20found.','source','local','raw','str','.\x20Local\x20aliases\x20can\x20be\x20added\x20under\x20apps.<alias>.appcode.','cachePath','use','appOwnerName','push','10757584VXeJXk','length','project-default','cache','env','global','Available\x20remote\x20apps:\x20','16173560HcStaV','\x20app\x20list`\x20to\x20discover\x20remote\x20apps,\x20or\x20add\x20apps.','validation','fetchedAt','Filter\x20by\x20environment\x20(default:\x20current\x20env)','items','39FVwUPt','App\x20\x22','\x20app\x20use\x20<name>\x20[--global]','\x20config\x20file','appCode','nonInteractive','envName','.appcode\x20to\x20.lovrabet.json.','Default\x20app\x20candidate\x20set\x20to\x20\x22','i18nInfo','Usage:\x20','newConfigFileName','boolean','4178315IBzCOI','Use\x20global\x20config\x20scope','app','Target\x20environment\x20(default:\x20current\x20env)','find','3547748OsDszQ','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','\x20cached\x20app(s)\x20for\x20env=\x22','write','../../commands/app/remote-source.js','832804IOFctM','defaultApp','Refreshed\x20app\x20cache\x20with\x20','6311242JiQTKd','appName','mergedCli','init','pull','entries','Read\x20app\x20list\x20from\x20local\x20cache\x20only','Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','appcode','globalPath','map','enableI18n','import','from','Missing\x20app\x20name.','List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','type','accessKey','no-cache','bool','../../context.js','projectPath'];a3_0x8307=function(){return _0xb9aead;};return a3_0x8307();}function normalizeLanguages(_0xb205f7){const _0x314c86=a3_0x2f3f65;if(!Array['isArray'](_0xb205f7))return[];return _0xb205f7['filter'](_0x4caf0f=>typeof _0x4caf0f===_0x314c86(0xa6))[_0x314c86(0x8d)](_0x1fdcb1=>_0x1fdcb1[_0x314c86(0xa2)]())['filter'](Boolean);}function buildRemoteAppI18nFields(_0x54e3a6){const _0x503ccd=a3_0x2f3f65,_0x35864e=normalizeLanguages(_0x54e3a6[_0x503ccd(0xc8)]?.['langs']);return{'enableI18n':typeof _0x54e3a6['enableI18n']==='boolean'?_0x54e3a6[_0x503ccd(0x8e)]:null,'languages':_0x35864e,'i18nInfo':_0x54e3a6[_0x503ccd(0xc8)]?{..._0x54e3a6[_0x503ccd(0xc8)],'langs':_0x35864e[_0x503ccd(0xb3)]?_0x35864e:null}:null};}const initDef={'service':a3_0x2f3f65(0xce),'command':a3_0x2f3f65(0x86),'description':'Initialize\x20'+PRODUCT_CONFIG[a3_0x2f3f65(0xca)]+a3_0x2f3f65(0xc2),'risk':a3_0x2f3f65(0xd4),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initCreateFlagDefs,async 'execute'(_0xb83b11){return await runInit(collectFlags(_0xb83b11,initCreateFlagDefs)),{'ok':!![]};}},listDef={'service':a3_0x2f3f65(0xce),'command':'list','description':a3_0x2f3f65(0x92),'risk':a3_0x2f3f65(0x9b),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':a3_0x2f3f65(0xb6),'type':a3_0x2f3f65(0xa6),'description':a3_0x2f3f65(0xbd),'enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0x2f3f65(0xaa),'type':a3_0x2f3f65(0xcb),'description':a3_0x2f3f65(0x89),'default':![]},{'name':a3_0x2f3f65(0x95),'type':a3_0x2f3f65(0xcb),'description':a3_0x2f3f65(0xd2),'default':![]}],async 'execute'(_0x2c083e){const _0x472770=a3_0x2f3f65,_0x398971=_0x2c083e['str'](_0x472770(0xb6))||_0x2c083e[_0x472770(0xc5)]||getEnv()||_0x472770(0xa1),_0x4f2d50=_0x2c083e['bool'](_0x472770(0xaa)),_0x56f158=_0x2c083e[_0x472770(0x96)](_0x472770(0x95)),{readRawConfigWithLayers:_0x21a053,resolveDefaultAppSource:_0x1f9855,getLocalAppAliases:_0x32072a}=await import('../../context.js'),{getRemoteAppList:_0x1ae19f}=await import(_0x472770(0xd5)),{config:_0x415c8f,layers:_0x37373d}=_0x21a053(),_0x583ea2=_0x1f9855(_0x37373d),{defaultApp:_0x264baf}=_0x415c8f,_0x5904d7=await _0x1ae19f({'env':_0x398971,'accessKey':_0x2c083e[_0x472770(0x94)],'localOnly':_0x4f2d50,'noCache':_0x56f158}),_0x2457b2=_0x5904d7[_0x472770(0xbe)]['map'](_0x448f66=>{const _0xee0989=_0x472770;return{'name':_0x448f66[_0xee0989(0x84)],'appcode':_0x448f66[_0xee0989(0xc3)],'named':!![],'definedIn':_0xee0989(0x99),'isDefault':_0x448f66[_0xee0989(0x84)]===_0x264baf,...buildAppProfileListFields(_0x398971),...buildRemoteAppI18nFields(_0x448f66),'source':_0x5904d7[_0xee0989(0xa9)],'owner':_0x448f66[_0xee0989(0xb0)]??null,'status':_0x448f66[_0xee0989(0xa7)]??null,'cachedAt':_0x5904d7['fetchedAt']};}),_0x37af1f=_0x32072a(_0x415c8f);let _0x59855e=0x0;for(const [_0x5741e0,_0x412963]of Object[_0x472770(0x88)](_0x37af1f)){const _0x310e6f=typeof _0x412963[_0x472770(0x8b)]===_0x472770(0xa6)?_0x412963[_0x472770(0x8b)][_0x472770(0xa2)]():'';if(!_0x310e6f)continue;_0x59855e+=0x1,_0x2457b2[_0x472770(0xb1)]({'name':_0x5741e0,'appcode':_0x310e6f,'named':!![],'definedIn':_0x472770(0xaa),'isDefault':_0x5741e0===_0x264baf,...buildAppProfileListFields(_0x398971),'source':_0x472770(0xa3),'owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0x2457b2,_0x2c083e[_0x472770(0x85)]);if(_0x2457b2[_0x472770(0xb3)]===0x0)return{'ok':!![],'data':[],'message':_0x5904d7['source']===_0x472770(0xb5)?_0x472770(0xa8):_0x472770(0xa0)};const _0x3ffb59=_0x2457b2[_0x472770(0xd0)](_0x586477=>_0x586477['isCurrent']===!![]),_0x5e375a=_0x264baf??_0x3ffb59?.[_0x472770(0x9c)]??null,_0x50f1a1={'env':_0x398971,'source':_0x5904d7[_0x472770(0xa9)],'fetchedAt':_0x5904d7[_0x472770(0xbc)],'cachePath':_0x5904d7[_0x472770(0xae)],'globalPath':_0x37373d[_0x472770(0x8c)]??null,'projectPath':_0x37373d[_0x472770(0x98)]??null,'defaultApp':_0x5e375a,'defaultAppSource':_0x264baf!=null?_0x583ea2:null,'localAliasCount':_0x59855e};return{'ok':!![],'data':{'items':_0x2457b2,'meta':_0x50f1a1}};}},pullDef={'service':a3_0x2f3f65(0xce),'command':a3_0x2f3f65(0x87),'description':'Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','risk':a3_0x2f3f65(0xd4),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'env','type':a3_0x2f3f65(0xa6),'description':a3_0x2f3f65(0xcf),'enum':[...RUNTIME_ENV_VALUES]},{'name':'local','type':a3_0x2f3f65(0xcb),'description':a3_0x2f3f65(0x9a),'default':![]},{'name':a3_0x2f3f65(0x95),'type':'boolean','description':'Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','default':![]}],async 'execute'(_0x1bbdc0){const _0x313206=a3_0x2f3f65,_0x4b69c8=_0x1bbdc0['str']('env')||_0x1bbdc0[_0x313206(0xc5)]||getEnv()||_0x313206(0xa1),_0x52a638=_0x1bbdc0[_0x313206(0x96)](_0x313206(0xaa)),_0x29de3b=_0x1bbdc0[_0x313206(0x96)](_0x313206(0x95)),{getRemoteAppList:_0x266c5d}=await import('../../commands/app/remote-source.js'),_0x3417a2=await _0x266c5d({'env':_0x4b69c8,'accessKey':_0x1bbdc0[_0x313206(0x94)],'localOnly':_0x52a638,'noCache':_0x29de3b});return{'ok':!![],'data':{'total':_0x3417a2[_0x313206(0xbe)][_0x313206(0xb3)],'env':_0x4b69c8,'source':_0x3417a2[_0x313206(0xa9)],'fetchedAt':_0x3417a2[_0x313206(0xbc)],'cachePath':_0x3417a2[_0x313206(0xae)]},'message':_0x3417a2[_0x313206(0xa9)]===_0x313206(0xb5)?'Loaded\x20'+_0x3417a2[_0x313206(0xbe)]['length']+_0x313206(0xd3)+_0x4b69c8+'\x22.':_0x313206(0x82)+_0x3417a2['items']['length']+'\x20app(s)\x20for\x20env=\x22'+_0x4b69c8+'\x22.'};}},useDef={'service':'app','command':a3_0x2f3f65(0xaf),'description':'Set\x20the\x20fallback\x20app\x20candidate','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'name','description':'Remote\x20app\x20name\x20to\x20activate','required':!![]}],'flags':[GLOBAL_FLAG],async 'validate'(_0x9d8d8b){const _0x17e07d=a3_0x2f3f65;if(!_0x9d8d8b[_0x17e07d(0x9e)][0x0])throw CliErrors[_0x17e07d(0xbb)](_0x17e07d(0x91),'Usage:\x20'+CLI_BIN_NAME+_0x17e07d(0xc1));},async 'execute'(_0x1cbbf1){const _0x4ab3a4=a3_0x2f3f65,_0x53ebe2=_0x1cbbf1[_0x4ab3a4(0x9e)][0x0];if(!_0x53ebe2)throw CliErrors[_0x4ab3a4(0xbb)]('Missing\x20app\x20name.',_0x4ab3a4(0xc9)+CLI_BIN_NAME+_0x4ab3a4(0xc1));const {buildConfigFromFlags:_0x5e094b,resolveLocalAppAliasCode:_0x32dc69}=await import(_0x4ab3a4(0x97)),{readCachedAppList:_0x5c760e}=await import('../../commands/app/cache.js'),_0x27dffc=_0x1cbbf1[_0x4ab3a4(0xac)](_0x4ab3a4(0xb6)),_0x593f3c=_0x5e094b(_0x27dffc?{'env':_0x27dffc}:{}),_0x4b7d19=_0x5c760e(_0x593f3c[_0x4ab3a4(0xb6)],_0x593f3c[_0x4ab3a4(0x94)]),_0x2a2f48=_0x4b7d19?.[_0x4ab3a4(0xbe)][_0x4ab3a4(0xd0)](_0x27d9da=>_0x27d9da[_0x4ab3a4(0x84)]===_0x53ebe2),_0x5a4cdb=_0x32dc69(_0x593f3c[_0x4ab3a4(0xab)]??{},_0x53ebe2);if(!_0x2a2f48&&!_0x5a4cdb&&_0x593f3c[_0x4ab3a4(0x81)]!==_0x53ebe2){const _0x1061c8=[..._0x4b7d19?.[_0x4ab3a4(0xbe)]['map'](_0x1bca04=>_0x1bca04[_0x4ab3a4(0x84)])??[]],_0x2a3bd0=_0x1061c8[_0x4ab3a4(0xb3)]===0x0?_0x4ab3a4(0x9f)+CLI_BIN_NAME+_0x4ab3a4(0xba)+_0x53ebe2+_0x4ab3a4(0xc6):_0x4ab3a4(0xb8)+Array[_0x4ab3a4(0x90)](new Set(_0x1061c8))['join'](',\x20')+_0x4ab3a4(0xad);throw CliErrors['validation'](_0x4ab3a4(0xc0)+_0x53ebe2+'\x22\x20not\x20found.',_0x2a3bd0);}const _0x550ce3=_0x1cbbf1['bool']('global');let _0x20f0d8;if(_0x550ce3)_0x20f0d8={'global':!![]};else{const {isInProject:_0x3ff6a1}=await import(_0x4ab3a4(0x97)),_0x4a9ee0=_0x3ff6a1();_0x20f0d8=toScopeFlags(resolveConfigScope({'explicitGlobal':![],'policy':_0x4ab3a4(0xb4),'inProject':_0x4a9ee0}));}const _0x2bba01=readConfig(_0x20f0d8);return _0x2bba01[_0x4ab3a4(0x81)]=_0x53ebe2,writeConfig(_0x2bba01,_0x20f0d8),{'ok':!![],'message':_0x4ab3a4(0xc7)+_0x53ebe2+'\x22'+scopeLabel(_0x20f0d8)+'.'};}},importDef={'service':'app','command':a3_0x2f3f65(0x8f),'description':a3_0x2f3f65(0x8a),'risk':a3_0x2f3f65(0xd4),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initImportFlagDefs,async 'execute'(_0x4ba663){return await runInitImport(collectFlags(_0x4ba663,initImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[initDef,listDef,pullDef,useDef,importDef];
@@ -1 +1 @@
1
- (function(_0x3aa89a,_0x5c66be){const _0x1104e0=a4_0x4d03,_0x26c9b7=_0x3aa89a();while(!![]){try{const _0x56933f=parseInt(_0x1104e0(0x1d4))/0x1*(-parseInt(_0x1104e0(0x1db))/0x2)+parseInt(_0x1104e0(0x1de))/0x3+-parseInt(_0x1104e0(0x1d2))/0x4*(parseInt(_0x1104e0(0x1d5))/0x5)+-parseInt(_0x1104e0(0x1d1))/0x6*(parseInt(_0x1104e0(0x1da))/0x7)+parseInt(_0x1104e0(0x1d7))/0x8+parseInt(_0x1104e0(0x1d9))/0x9+parseInt(_0x1104e0(0x1d8))/0xa*(-parseInt(_0x1104e0(0x1dc))/0xb);if(_0x56933f===_0x5c66be)break;else _0x26c9b7['push'](_0x26c9b7['shift']());}catch(_0x5725f0){_0x26c9b7['push'](_0x26c9b7['shift']());}}}(a4_0x1870,0x3b65a));import{fileURLToPath}from'url';function a4_0x1870(){const _0x2b9933=['errorMsg','3216592mtxYkQ','20SYTHgK','1811025UzvLzJ','7jsalPb','11996WOtqKe','633886HJYLZn','tableData','1445085YZWjbH','../../../mock/app-list.json','errorCode','2606994ZAMPXk','244aWEyJh','data','40CXAvXb','4265TfhjGA'];a4_0x1870=function(){return _0x2b9933;};return a4_0x1870();}function a4_0x4d03(_0x4b2b01,_0x3115b1){_0x4b2b01=_0x4b2b01-0x1d1;const _0x187055=a4_0x1870();let _0x4d03eb=_0x187055[_0x4b2b01];return _0x4d03eb;}import{dirname,join}from'path';import{readFileSync}from'fs';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function loadMockAppList(){const _0x3d08b0=a4_0x4d03,_0x1c4b53=join(__dirname,_0x3d08b0(0x1df)),_0x451055=readFileSync(_0x1c4b53,'utf-8');return JSON['parse'](_0x451055);}let _cached=null;export function getMockAppList(){return!_cached&&(_cached=loadMockAppList()),_cached;}export function getMockRemoteAppItems(){const _0xf70eaf=a4_0x4d03,_0x2fc8d0=getMockAppList();if(!_0x2fc8d0['success'])throw new Error('Mock\x20API\x20error:\x20'+_0x2fc8d0[_0xf70eaf(0x1d6)]+'\x20('+_0x2fc8d0[_0xf70eaf(0x1e0)]+')');return _0x2fc8d0[_0xf70eaf(0x1d3)][_0xf70eaf(0x1dd)];}
1
+ (function(_0x1e2eb8,_0x3ad69a){const _0x3d38ff=a4_0x4439,_0x2c57bc=_0x1e2eb8();while(!![]){try{const _0x556853=-parseInt(_0x3d38ff(0x129))/0x1*(-parseInt(_0x3d38ff(0x127))/0x2)+parseInt(_0x3d38ff(0x123))/0x3+-parseInt(_0x3d38ff(0x11e))/0x4*(parseInt(_0x3d38ff(0x12b))/0x5)+parseInt(_0x3d38ff(0x12c))/0x6+parseInt(_0x3d38ff(0x122))/0x7+-parseInt(_0x3d38ff(0x128))/0x8*(parseInt(_0x3d38ff(0x11d))/0x9)+-parseInt(_0x3d38ff(0x12a))/0xa;if(_0x556853===_0x3ad69a)break;else _0x2c57bc['push'](_0x2c57bc['shift']());}catch(_0x3f1b21){_0x2c57bc['push'](_0x2c57bc['shift']());}}}(a4_0x32da,0x5096b));import{fileURLToPath}from'url';import{dirname,join}from'path';import{readFileSync}from'fs';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function a4_0x32da(){const _0x1c08ff=['2781768XVEVWF','438894oeZOHb','60odhMJt','errorCode','success','parse','39599FXHbzF','3117jkoLls','../../../mock/app-list.json','utf-8','errorMsg','344644rzLqIP','24isMxCz','3EBgqXz','2804860pJcvFh','76805qRHMGY'];a4_0x32da=function(){return _0x1c08ff;};return a4_0x32da();}function a4_0x4439(_0x3830ee,_0x19d63d){_0x3830ee=_0x3830ee-0x11d;const _0x32daf0=a4_0x32da();let _0x443915=_0x32daf0[_0x3830ee];return _0x443915;}function loadMockAppList(){const _0x4442ca=a4_0x4439,_0x29f92a=join(__dirname,_0x4442ca(0x124)),_0x4d675f=readFileSync(_0x29f92a,_0x4442ca(0x125));return JSON[_0x4442ca(0x121)](_0x4d675f);}let _cached=null;export function getMockAppList(){return!_cached&&(_cached=loadMockAppList()),_cached;}export function getMockRemoteAppItems(){const _0x10b039=a4_0x4439,_0x413870=getMockAppList();if(!_0x413870[_0x10b039(0x120)])throw new Error('Mock\x20API\x20error:\x20'+_0x413870[_0x10b039(0x126)]+'\x20('+_0x413870[_0x10b039(0x11f)]+')');return _0x413870['data']['tableData'];}
@@ -1 +1 @@
1
- (function(_0x3c02fa,_0x160dd2){const _0x3e44f7=a5_0x298b,_0x34dfcb=_0x3c02fa();while(!![]){try{const _0x58db5a=-parseInt(_0x3e44f7(0x1c3))/0x1*(parseInt(_0x3e44f7(0x1c4))/0x2)+parseInt(_0x3e44f7(0x1ce))/0x3+-parseInt(_0x3e44f7(0x1c6))/0x4*(parseInt(_0x3e44f7(0x1c9))/0x5)+-parseInt(_0x3e44f7(0x1cc))/0x6*(parseInt(_0x3e44f7(0x1cb))/0x7)+-parseInt(_0x3e44f7(0x1d3))/0x8+parseInt(_0x3e44f7(0x1c0))/0x9*(parseInt(_0x3e44f7(0x1c5))/0xa)+-parseInt(_0x3e44f7(0x1c8))/0xb*(-parseInt(_0x3e44f7(0x1ca))/0xc);if(_0x58db5a===_0x160dd2)break;else _0x34dfcb['push'](_0x34dfcb['shift']());}catch(_0x248035){_0x34dfcb['push'](_0x34dfcb['shift']());}}}(a5_0x3593,0x952ab));function a5_0x3593(){const _0x5288ee=['909043YSqkfv','2hZTiHd','10AjiCRD','56BiBxDh','trim','11klpksC','136090ZGhMFo','23629332kozKcx','7bScBkZ','6051570nUnssh','cache','2759286vaasJp','fetchedAt','mock','items','toLowerCase','4705096HsJNMK','5480469vvJLyr','APP_LIST_SOURCE','remote'];a5_0x3593=function(){return _0x5288ee;};return a5_0x3593();}import{getMyApps}from'../../core/api-client.js';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 _0x19086a=a5_0x298b,_0x2623bf=(productEnv(_0x19086a(0x1c1))||'')[_0x19086a(0x1c7)]()[_0x19086a(0x1d2)]();return _0x2623bf===_0x19086a(0x1d0);}export async function getRemoteAppItems(){if(shouldUseMockRemoteApps())return getMockRemoteAppItems();return getMyApps();}function a5_0x298b(_0xb274d9,_0x3bbff9){_0xb274d9=_0xb274d9-0x1c0;const _0x3593c6=a5_0x3593();let _0x298bbc=_0x3593c6[_0xb274d9];return _0x298bbc;}export async function getRemoteAppList(_0x29b0ce){const _0x56bbc2=a5_0x298b,{env:_0x4bd5ec,accessKey:_0x156d6d,localOnly:localOnly=![],noCache:noCache=![]}=_0x29b0ce,_0x4bf3da=readCachedAppList(_0x4bd5ec,_0x156d6d),_0x1520de=_0x156d6d?.[_0x56bbc2(0x1c7)]()?getAppCacheFilePath(_0x4bd5ec,_0x156d6d):null;if(localOnly)return{'items':_0x4bf3da?.[_0x56bbc2(0x1d1)]??[],'source':_0x56bbc2(0x1cd),'fetchedAt':_0x4bf3da?.[_0x56bbc2(0x1cf)]??null,'cachePath':_0x1520de};try{const _0x16cee8=await getRemoteAppItems(),_0x559a36=shouldUseMockRemoteApps()?_0x56bbc2(0x1d0):_0x56bbc2(0x1c2),_0x1dc29e=new Date()['toISOString'](),_0x4c8cf9=_0x156d6d?.['trim']()?writeCachedAppList(_0x4bd5ec,_0x156d6d,{'env':_0x4bd5ec,'fetchedAt':_0x1dc29e,'source':_0x559a36,'items':_0x16cee8}):null;return{'items':_0x16cee8,'source':_0x559a36,'fetchedAt':_0x1dc29e,'cachePath':_0x4c8cf9};}catch(_0x49080c){if(!noCache&&_0x4bf3da)return{'items':_0x4bf3da['items'],'source':_0x56bbc2(0x1cd),'fetchedAt':_0x4bf3da['fetchedAt'],'cachePath':_0x1520de};throw _0x49080c;}}
1
+ (function(_0xbdfff0,_0x31ea6f){const _0x1806fc=a5_0x42d3,_0x42f0b1=_0xbdfff0();while(!![]){try{const _0x4f1905=-parseInt(_0x1806fc(0x1aa))/0x1*(parseInt(_0x1806fc(0x1b4))/0x2)+-parseInt(_0x1806fc(0x1ac))/0x3*(-parseInt(_0x1806fc(0x1b0))/0x4)+-parseInt(_0x1806fc(0x1b1))/0x5+-parseInt(_0x1806fc(0x1ab))/0x6*(-parseInt(_0x1806fc(0x1bb))/0x7)+-parseInt(_0x1806fc(0x1b6))/0x8*(-parseInt(_0x1806fc(0x1b7))/0x9)+parseInt(_0x1806fc(0x1ad))/0xa+-parseInt(_0x1806fc(0x1bc))/0xb*(parseInt(_0x1806fc(0x1ae))/0xc);if(_0x4f1905===_0x31ea6f)break;else _0x42f0b1['push'](_0x42f0b1['shift']());}catch(_0x1e94ce){_0x42f0b1['push'](_0x42f0b1['shift']());}}}(a5_0x546a,0x823d7));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 a5_0x42d3(_0x29a38d,_0x4c484f){_0x29a38d=_0x29a38d-0x1a9;const _0x546a87=a5_0x546a();let _0x42d35a=_0x546a87[_0x29a38d];return _0x42d35a;}import{productEnv}from'../../constant/product.js';export function shouldUseMockRemoteApps(){const _0x158071=a5_0x42d3,_0x44fa20=(productEnv(_0x158071(0x1b3))||'')['trim']()[_0x158071(0x1ba)]();return _0x44fa20===_0x158071(0x1b9);}function a5_0x546a(){const _0x237cad=['7346980tbNcfp','456fGwUxh','toISOString','2657660uoWtEc','2407885VWdiXf','items','APP_LIST_SOURCE','26472RVDPnr','cache','16pnCCqc','353088SEkREf','trim','mock','toLowerCase','2981839qlOpMJ','100111UutuuL','fetchedAt','41ZpZwuo','6gutLHx','3OuKJOu'];a5_0x546a=function(){return _0x237cad;};return a5_0x546a();}export async function getRemoteAppItems(){if(shouldUseMockRemoteApps())return getMockRemoteAppItems();return getMyApps();}export async function getRemoteAppList(_0xa6c638){const _0x6c4ad=a5_0x42d3,{env:_0x1dbf5f,accessKey:_0x8476b9,localOnly:localOnly=![],noCache:noCache=![]}=_0xa6c638,_0x1b8199=readCachedAppList(_0x1dbf5f,_0x8476b9),_0x2cf857=_0x8476b9?.['trim']()?getAppCacheFilePath(_0x1dbf5f,_0x8476b9):null;if(localOnly)return{'items':_0x1b8199?.[_0x6c4ad(0x1b2)]??[],'source':_0x6c4ad(0x1b5),'fetchedAt':_0x1b8199?.[_0x6c4ad(0x1a9)]??null,'cachePath':_0x2cf857};try{const _0x538c05=await getRemoteAppItems(),_0x1fb4dd=shouldUseMockRemoteApps()?_0x6c4ad(0x1b9):'remote',_0x55c304=new Date()[_0x6c4ad(0x1af)](),_0x3506ff=_0x8476b9?.[_0x6c4ad(0x1b8)]()?writeCachedAppList(_0x1dbf5f,_0x8476b9,{'env':_0x1dbf5f,'fetchedAt':_0x55c304,'source':_0x1fb4dd,'items':_0x538c05}):null;return{'items':_0x538c05,'source':_0x1fb4dd,'fetchedAt':_0x55c304,'cachePath':_0x3506ff};}catch(_0x41f4d5){if(!noCache&&_0x1b8199)return{'items':_0x1b8199[_0x6c4ad(0x1b2)],'source':'cache','fetchedAt':_0x1b8199['fetchedAt'],'cachePath':_0x2cf857};throw _0x41f4d5;}}
@@ -1 +1 @@
1
- (function(_0x55c832,_0x529491){const _0x13a543=a6_0x5a33,_0xe74836=_0x55c832();while(!![]){try{const _0x42cf1b=-parseInt(_0x13a543(0xea))/0x1+-parseInt(_0x13a543(0xe3))/0x2+parseInt(_0x13a543(0xe5))/0x3*(parseInt(_0x13a543(0xe4))/0x4)+-parseInt(_0x13a543(0xef))/0x5+-parseInt(_0x13a543(0xe2))/0x6+parseInt(_0x13a543(0xec))/0x7+parseInt(_0x13a543(0xdf))/0x8;if(_0x42cf1b===_0x529491)break;else _0xe74836['push'](_0xe74836['shift']());}catch(_0x4bfd3c){_0xe74836['push'](_0xe74836['shift']());}}}(a6_0xe4db,0x3f310));import{CLI_BIN_NAME}from'../../constant/cli.js';import{formatScopeLabel}from'../../commands/common/config-policy.js';export{CLI_BIN_NAME};export function enrichAppListItemsWithMergedSelection(_0x488d4c,_0x4bf216){const _0x5bfc39=a6_0x5a33;if(!_0x4bf216)return;const _0x9785d3=!!(_0x4bf216[_0x5bfc39(0xe9)]??_0x4bf216[_0x5bfc39(0xe1)]);for(const _0x28f55d of _0x488d4c){_0x28f55d['isCurrent']=![];}const _0x3b1688=_0x4bf216['appCode']!=null?String(_0x4bf216[_0x5bfc39(0xed)])[_0x5bfc39(0xf0)]():'';if(_0x9785d3){const _0xebda5d=_0x4bf216[_0x5bfc39(0xe9)]??_0x4bf216[_0x5bfc39(0xe1)];if(_0xebda5d){const _0x341039=_0x488d4c[_0x5bfc39(0xe7)](_0x3f7b1e=>_0x3f7b1e[_0x5bfc39(0xeb)]===!![]&&_0x3f7b1e[_0x5bfc39(0xe0)]===_0xebda5d&&_0x3f7b1e['definedIn']==='local'),_0x33697e=_0x341039??_0x488d4c[_0x5bfc39(0xe7)](_0x12a547=>_0x12a547[_0x5bfc39(0xeb)]===!![]&&_0x12a547['name']===_0xebda5d);_0x33697e&&(_0x33697e['isCurrent']=!![]);}return;}if(!_0x3b1688)return;for(const _0xfe6b29 of _0x488d4c){String(_0xfe6b29[_0x5bfc39(0xe6)]??'')[_0x5bfc39(0xf0)]()===_0x3b1688&&(_0xfe6b29[_0x5bfc39(0xe8)]=!![]);}}function a6_0x5a33(_0x1b80a8,_0x43f6a0){_0x1b80a8=_0x1b80a8-0xdf;const _0xe4dbd9=a6_0xe4db();let _0x5a3364=_0xe4dbd9[_0x1b80a8];return _0x5a3364;}function a6_0xe4db(){const _0x132f6b=['172OYxSKX','4869jLBipP','appcode','find','isCurrent','currentApp','502995Xoqlfb','named','494655LadBAp','appCode','global','1722115jvBmsn','trim','10923944UAwNoB','name','defaultApp','308304fhtUOp','696626KpCoBc'];a6_0xe4db=function(){return _0x132f6b;};return a6_0xe4db();}export{readScopedConfig as readConfig,writeScopedConfig as writeConfig,isInProject}from'../../context.js';export function scopeLabel(_0x48cb07){const _0x17c780=a6_0x5a33;return formatScopeLabel(_0x48cb07[_0x17c780(0xee)]?_0x17c780(0xee):'project');}
1
+ function a6_0x4f1f(){const _0x229fb2=['1511694aARVQW','21368CStfsq','find','5639868BxWHRu','named','2255AHQTXb','trim','56YGifJa','appcode','3JRzwWJ','definedIn','project','558640QnKfBT','isCurrent','name','global','currentApp','appCode','defaultApp','963305tqJsdD','local','211701bfZfSF'];a6_0x4f1f=function(){return _0x229fb2;};return a6_0x4f1f();}function a6_0x90d4(_0x218102,_0x1093c9){_0x218102=_0x218102-0xfb;const _0x4f1fad=a6_0x4f1f();let _0x90d419=_0x4f1fad[_0x218102];return _0x90d419;}(function(_0x36de14,_0x3fe518){const _0x150e64=a6_0x90d4,_0x1a3834=_0x36de14();while(!![]){try{const _0x121f1d=-parseInt(_0x150e64(0xfc))/0x1*(-parseInt(_0x150e64(0x10a))/0x2)+-parseInt(_0x150e64(0x108))/0x3+-parseInt(_0x150e64(0x110))/0x4*(-parseInt(_0x150e64(0x10e))/0x5)+-parseInt(_0x150e64(0x109))/0x6+-parseInt(_0x150e64(0x106))/0x7+-parseInt(_0x150e64(0xff))/0x8+parseInt(_0x150e64(0x10c))/0x9;if(_0x121f1d===_0x3fe518)break;else _0x1a3834['push'](_0x1a3834['shift']());}catch(_0x1622bd){_0x1a3834['push'](_0x1a3834['shift']());}}}(a6_0x4f1f,0x20f91));import{CLI_BIN_NAME}from'../../constant/cli.js';import{formatScopeLabel}from'../../commands/common/config-policy.js';export{CLI_BIN_NAME};export function enrichAppListItemsWithMergedSelection(_0x5818cd,_0x4066c7){const _0x540d63=a6_0x90d4;if(!_0x4066c7)return;const _0x5867e9=!!(_0x4066c7[_0x540d63(0x103)]??_0x4066c7[_0x540d63(0x105)]);for(const _0x13cb93 of _0x5818cd){_0x13cb93['isCurrent']=![];}const _0x4172e2=_0x4066c7[_0x540d63(0x104)]!=null?String(_0x4066c7[_0x540d63(0x104)])[_0x540d63(0x10f)]():'';if(_0x5867e9){const _0xeaf23a=_0x4066c7['currentApp']??_0x4066c7['defaultApp'];if(_0xeaf23a){const _0xc18023=_0x5818cd[_0x540d63(0x10b)](_0xf6481=>_0xf6481[_0x540d63(0x10d)]===!![]&&_0xf6481[_0x540d63(0x101)]===_0xeaf23a&&_0xf6481[_0x540d63(0xfd)]===_0x540d63(0x107)),_0x284c9e=_0xc18023??_0x5818cd[_0x540d63(0x10b)](_0x50fba1=>_0x50fba1[_0x540d63(0x10d)]===!![]&&_0x50fba1[_0x540d63(0x101)]===_0xeaf23a);_0x284c9e&&(_0x284c9e[_0x540d63(0x100)]=!![]);}return;}if(!_0x4172e2)return;for(const _0x2bdc67 of _0x5818cd){String(_0x2bdc67[_0x540d63(0xfb)]??'')[_0x540d63(0x10f)]()===_0x4172e2&&(_0x2bdc67['isCurrent']=!![]);}}export{readScopedConfig as readConfig,writeScopedConfig as writeConfig,isInProject}from'../../context.js';export function scopeLabel(_0x439e7e){const _0x508860=a6_0x90d4;return formatScopeLabel(_0x439e7e[_0x508860(0x102)]?_0x508860(0x102):_0x508860(0xfe));}
@@ -1 +1 @@
1
- const a7_0x56df13=a7_0x2a9f;function a7_0x2a9f(_0x4244ec,_0x29b4f7){_0x4244ec=_0x4244ec-0xb0;const _0x3591ca=a7_0x3591();let _0x2a9fbb=_0x3591ca[_0x4244ec];return _0x2a9fbb;}(function(_0x39303f,_0x23de04){const _0x5d4715=a7_0x2a9f,_0x583b2e=_0x39303f();while(!![]){try{const _0x1180aa=-parseInt(_0x5d4715(0xf8))/0x1*(parseInt(_0x5d4715(0xb1))/0x2)+-parseInt(_0x5d4715(0xed))/0x3+parseInt(_0x5d4715(0xd3))/0x4+parseInt(_0x5d4715(0xe6))/0x5+-parseInt(_0x5d4715(0xee))/0x6*(-parseInt(_0x5d4715(0xe3))/0x7)+-parseInt(_0x5d4715(0xd7))/0x8+parseInt(_0x5d4715(0xd1))/0x9;if(_0x1180aa===_0x23de04)break;else _0x583b2e['push'](_0x583b2e['shift']());}catch(_0x2f48c2){_0x583b2e['push'](_0x583b2e['shift']());}}}(a7_0x3591,0x798c1));import{existsSync,readFileSync,statSync}from'node:fs';import{createRuntimeArtifact,getRuntimeArtifact,listRuntimeArtifacts,updateRuntimeArtifact}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const ARTIFACT_TYPE_REACT_MODULE='react_module',ARTIFACT_SOURCE_AGENT=a7_0x56df13(0xce),ALLOWED_REACT_MODULE_IMPORTS=[a7_0x56df13(0xbe),a7_0x56df13(0xe4),'lodash',a7_0x56df13(0xdf),a7_0x56df13(0xba),a7_0x56df13(0xc6)];export const ALLOWED_REACT_MODULE_IMPORTS_TEXT=ALLOWED_REACT_MODULE_IMPORTS[a7_0x56df13(0xca)](',\x20');const IMPORT_SOURCE_PATTERNS=[/\bimport\s+(?:type\s+)?(?:[^'";]*?\s+from\s+)?["']([^"']+)["']/g,/\bexport\s+(?:type\s+)?[^'";]*?\s+from\s+["']([^"']+)["']/g,/\bimport\s*\(\s*["']([^"']+)["']\s*\)/g,/\brequire\s*\(\s*["']([^"']+)["']\s*\)/g],PAGE_LEVEL_PATTERNS=[/<!doctype\s+html/i,/<\s*html\b/i,/\bcreateRoot\s*\(/,/\bReactDOM\s*\.\s*render\s*\(/,/\bReactDOM\s*\.\s*createRoot\s*\(/],FILE_FLAG={'name':'file','type':a7_0x56df13(0xe5),'required':!![],'description':a7_0x56df13(0xc7)},ARTIFACT_NAME_FLAG={'name':a7_0x56df13(0xf0),'type':a7_0x56df13(0xe5),'description':a7_0x56df13(0xbb)},METADATA_FLAG={'name':a7_0x56df13(0xec),'type':a7_0x56df13(0xe5),'description':a7_0x56df13(0xe7)};function isPlainObject(_0x2fa308){const _0x1964f6=a7_0x56df13;return typeof _0x2fa308==='object'&&_0x2fa308!==null&&!Array[_0x1964f6(0xd4)](_0x2fa308);}function a7_0x3591(){const _0x105b4f=['154702bZKaBf','add','Artifact\x20source\x20file\x20is\x20blank.','body','deleted','length','split','artifactType','lastIndex','antd','Artifact\x20display\x20name','utf8','Create\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','react','trim','/client/artifact/','appCode','updateTime','filter','bool','list','@ant-design/icons','Path\x20to\x20a\x20local\x20UTF-8\x20React\x20module\x20source\x20file','Optional\x20source\x20filter,\x20for\x20example\x20AGENT','File\x20path\x20is\x20required.','join','source','react_module\x20imports\x20are\x20limited\x20to:\x20','Optional\x20favorite-state\x20filter','AGENT','str','artifact','162288JfpaOM','num','2895356ktZLcy','isArray','content','build','7365064PNbcPq','List\x20current-app\x20react_module\x20Artifacts','verbose','createTime','boolean','validation','/update','some','dayjs','react_module\x20must\x20be\x20an\x20embeddable\x20React\x20module,\x20not\x20full\x20HTML\x20or\x20a\x20ReactDOM/createRoot\x20mount\x20entry.','description','test','134169oQtAct','react-dom','string','466900joRvUX','Artifact\x20metadata\x20as\x20JSON\x20object;\x20compiledContent\x20is\x20stripped','Updated\x20Artifact\x20','read','Invalid\x20JSON\x20for\x20--metadata:\x20','includes','metadata','256671PHzRbt','282nhoMgp','File\x20not\x20found:\x20','name','.\x20Unsupported:\x20','Created\x20Artifact\x20','write','parse','/client/artifact/create','detail','favorite','3vjuvlY','map','isFile','file','exec','create','Show\x20one\x20Artifact\x20by\x20id'];a7_0x3591=function(){return _0x105b4f;};return a7_0x3591();}function readSourceFile(_0x4907b6){const _0xa6750f=a7_0x56df13;if(!_0x4907b6)throw CliErrors[_0xa6750f(0xdc)](_0xa6750f(0xc9));if(!existsSync(_0x4907b6))throw CliErrors[_0xa6750f(0xdc)](_0xa6750f(0xef)+_0x4907b6);if(!statSync(_0x4907b6)[_0xa6750f(0xfa)]())throw CliErrors['validation']('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x4907b6);const _0x5dfd66=readFileSync(_0x4907b6,_0xa6750f(0xbc));return validateReactModuleSource(_0x5dfd66),_0x5dfd66;}function parseMetadata(_0x37e2d8){const _0x11890a=a7_0x56df13;if(!_0x37e2d8)return undefined;let _0x52a284;try{_0x52a284=JSON[_0x11890a(0xf4)](_0x37e2d8);}catch{throw CliErrors[_0x11890a(0xdc)](_0x11890a(0xea)+_0x37e2d8);}if(!isPlainObject(_0x52a284))throw CliErrors[_0x11890a(0xdc)]('--metadata\x20must\x20be\x20a\x20JSON\x20object.');const _0x29a9c6={..._0x52a284};return delete _0x29a9c6['compiledContent'],_0x29a9c6;}function getPackageName(_0x22b2a8){const _0x613a8c=a7_0x56df13;if(_0x22b2a8['startsWith']('@')){const [_0x30976a,_0x5b000a]=_0x22b2a8[_0x613a8c(0xb7)]('/');return _0x30976a&&_0x5b000a?_0x30976a+'/'+_0x5b000a:_0x22b2a8;}return _0x22b2a8[_0x613a8c(0xb7)]('/')[0x0]||_0x22b2a8;}function validateAllowedImports(_0x86fbe){const _0x53e22b=a7_0x56df13,_0x1b75df=new Set();for(const _0x51255b of IMPORT_SOURCE_PATTERNS){_0x51255b[_0x53e22b(0xb9)]=0x0;let _0x236c40;while((_0x236c40=_0x51255b[_0x53e22b(0xfc)](_0x86fbe))!==null){const _0x49d1e9=_0x236c40[0x1]?.[_0x53e22b(0xbf)]();_0x49d1e9&&_0x1b75df[_0x53e22b(0xb2)](_0x49d1e9);}}const _0x171f74=[..._0x1b75df]['map'](getPackageName)[_0x53e22b(0xc3)](_0x3c1c82=>!ALLOWED_REACT_MODULE_IMPORTS[_0x53e22b(0xeb)](_0x3c1c82));if(_0x171f74[_0x53e22b(0xb6)]>0x0)throw CliErrors['validation'](_0x53e22b(0xcc)+ALLOWED_REACT_MODULE_IMPORTS_TEXT+_0x53e22b(0xf1)+[...new Set(_0x171f74)]['join'](',\x20'));}export function validateReactModuleSource(_0x2f304a){const _0x16a9e2=a7_0x56df13;if(!_0x2f304a['trim']())throw CliErrors[_0x16a9e2(0xdc)](_0x16a9e2(0xb3));if(PAGE_LEVEL_PATTERNS[_0x16a9e2(0xde)](_0x56ea15=>_0x56ea15[_0x16a9e2(0xe2)](_0x2f304a)))throw CliErrors[_0x16a9e2(0xdc)](_0x16a9e2(0xe0));validateAllowedImports(_0x2f304a);}function buildArtifactInput(_0x36b87b){const _0x12d86e=a7_0x56df13,_0x1b21b6=readSourceFile(_0x36b87b[_0x12d86e(0xcf)](_0x12d86e(0xfb))),_0x5e2572=_0x36b87b['str'](_0x12d86e(0xf0))[_0x12d86e(0xbf)](),_0x41fcc1=parseMetadata(_0x36b87b[_0x12d86e(0xcf)]('metadata'));return{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x5e2572?{'name':_0x5e2572}:{},'content':_0x1b21b6,..._0x41fcc1?{'metadata':_0x41fcc1}:{},'source':ARTIFACT_SOURCE_AGENT};}function summarizeArtifact(_0xa6bee){const _0x209fc6=a7_0x56df13;return{'id':_0xa6bee['id'],'name':_0xa6bee[_0x209fc6(0xf0)],'artifactType':_0xa6bee[_0x209fc6(0xb8)],'source':_0xa6bee[_0x209fc6(0xcb)],'favorite':_0xa6bee[_0x209fc6(0xf7)],'deleted':_0xa6bee[_0x209fc6(0xb5)],'createTime':_0xa6bee[_0x209fc6(0xda)],'updateTime':_0xa6bee[_0x209fc6(0xc2)]};}function detailArtifact(_0x46030c){const _0x5a3c62=a7_0x56df13;return{'id':_0x46030c['id'],'appCode':_0x46030c[_0x5a3c62(0xc1)],'name':_0x46030c[_0x5a3c62(0xf0)],'artifactType':_0x46030c[_0x5a3c62(0xb8)],'source':_0x46030c[_0x5a3c62(0xcb)],'favorite':_0x46030c[_0x5a3c62(0xf7)],'deleted':_0x46030c[_0x5a3c62(0xb5)],'content':_0x46030c[_0x5a3c62(0xd5)]??'','compiledContent':_0x46030c['compiledContent'],'metadata':_0x46030c[_0x5a3c62(0xec)]??{},'createTime':_0x46030c[_0x5a3c62(0xda)],'updateTime':_0x46030c[_0x5a3c62(0xc2)]};}function readFavoriteFlag(_0x60ebcc){const _0x3f22bd=a7_0x56df13,_0x5920fa=_0x60ebcc['flag']('favorite');return _0x5920fa===undefined||_0x5920fa===null||_0x5920fa===''?undefined:_0x60ebcc[_0x3f22bd(0xc4)](_0x3f22bd(0xf7));}const artifactList={'service':a7_0x56df13(0xd0),'command':a7_0x56df13(0xc5),'description':a7_0x56df13(0xd8),'risk':a7_0x56df13(0xe9),'flags':[{'name':a7_0x56df13(0xcb),'type':a7_0x56df13(0xe5),'description':a7_0x56df13(0xc8)},{'name':a7_0x56df13(0xf7),'type':a7_0x56df13(0xdb),'description':a7_0x56df13(0xcd)},VERBOSE_FLAG],async 'execute'(_0x4b0cc0){const _0x1666ca=a7_0x56df13,_0x10e0a7=await listRuntimeArtifacts(_0x4b0cc0[_0x1666ca(0xc1)],{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x4b0cc0[_0x1666ca(0xcf)](_0x1666ca(0xcb))?{'source':_0x4b0cc0[_0x1666ca(0xcf)]('source')}:{},...readFavoriteFlag(_0x4b0cc0)!==undefined?{'favorite':readFavoriteFlag(_0x4b0cc0)}:{}});return{'ok':!![],'data':{'total':_0x10e0a7[_0x1666ca(0xb6)],'items':_0x4b0cc0[_0x1666ca(0xc4)](_0x1666ca(0xd9))?_0x10e0a7:_0x10e0a7[_0x1666ca(0xf9)](summarizeArtifact)}};}},artifactDetail={'service':a7_0x56df13(0xd0),'command':a7_0x56df13(0xf6),'description':a7_0x56df13(0xb0),'risk':a7_0x56df13(0xe9),'flags':[{...ID_FLAG,'description':'Artifact\x20ID'}],async 'execute'(_0x19b62f){const _0x470061=a7_0x56df13,_0x4046f8=await getRuntimeArtifact(_0x19b62f[_0x470061(0xd2)]('id'),_0x19b62f[_0x470061(0xc1)]);return{'ok':!![],'data':detailArtifact(_0x4046f8)};}},artifactCreate={'service':a7_0x56df13(0xd0),'command':a7_0x56df13(0xfd),'description':a7_0x56df13(0xbd),'risk':a7_0x56df13(0xf3),'flags':[FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x5663af){const _0x12f549=a7_0x56df13,_0x13856b=buildArtifactInput(_0x5663af),_0x35c964=await createRuntimeArtifact(_0x5663af[_0x12f549(0xc1)],_0x13856b);return{'ok':!![],'data':detailArtifact(_0x35c964),'message':_0x12f549(0xf2)+_0x35c964['id']+(_0x35c964['name']?'\x20('+_0x35c964[_0x12f549(0xf0)]+')':'')};},async 'dryRun'(_0x19eb1b){const _0x3fc53c=a7_0x56df13,_0x270bde=buildArtifactInput(_0x19eb1b);return dryRun('POST',_0x3fc53c(0xf5))[_0x3fc53c(0xb4)]({'appCode':_0x19eb1b[_0x3fc53c(0xc1)],..._0x270bde})[_0x3fc53c(0xe1)]('Preview:\x20create\x20react_module\x20Artifact')[_0x3fc53c(0xd6)]();}},artifactUpdate={'service':'artifact','command':'update','description':'Update\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','risk':a7_0x56df13(0xf3),'flags':[{...ID_FLAG,'description':'Artifact\x20ID'},FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x259d44){const _0x2f203d=a7_0x56df13,_0x101e40=_0x259d44[_0x2f203d(0xd2)]('id'),_0x50784d=buildArtifactInput(_0x259d44),_0x33a57f=await updateRuntimeArtifact(_0x101e40,_0x259d44[_0x2f203d(0xc1)],_0x50784d);return{'ok':!![],'data':detailArtifact(_0x33a57f),'message':_0x2f203d(0xe8)+_0x33a57f['id']+(_0x33a57f[_0x2f203d(0xf0)]?'\x20('+_0x33a57f['name']+')':'')};},async 'dryRun'(_0x48abfc){const _0x220661=a7_0x56df13,_0x218043=_0x48abfc[_0x220661(0xd2)]('id'),_0x20956c=buildArtifactInput(_0x48abfc);return dryRun('POST',_0x220661(0xc0)+_0x218043+_0x220661(0xdd))[_0x220661(0xb4)]({'appCode':_0x48abfc[_0x220661(0xc1)],..._0x20956c})[_0x220661(0xe1)]('Preview:\x20update\x20react_module\x20Artifact\x20'+_0x218043)[_0x220661(0xd6)]();}};export const artifactDefinitions=[artifactList,artifactDetail,artifactCreate,artifactUpdate];
1
+ const a7_0x504572=a7_0x2c96;(function(_0x294742,_0x20aac3){const _0x218568=a7_0x2c96,_0x3d5345=_0x294742();while(!![]){try{const _0x19ec2c=-parseInt(_0x218568(0xdc))/0x1*(-parseInt(_0x218568(0xb5))/0x2)+parseInt(_0x218568(0xa1))/0x3+-parseInt(_0x218568(0xa7))/0x4+-parseInt(_0x218568(0xaf))/0x5*(parseInt(_0x218568(0xc6))/0x6)+-parseInt(_0x218568(0xb4))/0x7*(parseInt(_0x218568(0xa3))/0x8)+-parseInt(_0x218568(0xd0))/0x9*(parseInt(_0x218568(0xdb))/0xa)+-parseInt(_0x218568(0xcf))/0xb*(-parseInt(_0x218568(0xdd))/0xc);if(_0x19ec2c===_0x20aac3)break;else _0x3d5345['push'](_0x3d5345['shift']());}catch(_0x5758f6){_0x3d5345['push'](_0x3d5345['shift']());}}}(a7_0x4b31,0xd640f));import{existsSync,readFileSync,statSync}from'node:fs';import{createRuntimeArtifact,getRuntimeArtifact,listRuntimeArtifacts,updateRuntimeArtifact}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';function a7_0x4b31(){const _0x413b68=['1540bFLnCs','9CIADOQ','Path\x20to\x20a\x20local\x20UTF-8\x20React\x20module\x20source\x20file','str','length','metadata','content','name','filter','Artifact\x20metadata\x20as\x20JSON\x20object;\x20compiledContent\x20is\x20stripped','includes','favorite','3545130vnUZSg','1275049KazfGo','185964NcVVeB','File\x20path\x20is\x20required.','updateTime','verbose','build','boolean','appCode','join','description','createTime','Optional\x20source\x20filter,\x20for\x20example\x20AGENT','dayjs','Invalid\x20JSON\x20for\x20--metadata:\x20','add','Show\x20one\x20Artifact\x20by\x20id','artifact','exec','startsWith','compiledContent','--metadata\x20must\x20be\x20a\x20JSON\x20object.','1456047diXPJs','body','2099960XYbBUB','POST','parse','.\x20Unsupported:\x20','5273060KYQvrS','isFile','update','AGENT','lastIndex','trim','Create\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','/update','930935lJvIak','utf8','create','split','Artifact\x20display\x20name','7REVZhj','2FXTods','string','react','antd','File\x20is\x20not\x20a\x20regular\x20file:\x20','Artifact\x20ID','isArray','map','react-dom','read','validation','detail','Preview:\x20create\x20react_module\x20Artifact','react_module','/client/artifact/','Updated\x20Artifact\x20','List\x20current-app\x20react_module\x20Artifacts','36kleHdt','file','num','File\x20not\x20found:\x20','object','source','Optional\x20favorite-state\x20filter','write','bool'];a7_0x4b31=function(){return _0x413b68;};return a7_0x4b31();}import{dryRun}from'../../framework/dryrun.js';const ARTIFACT_TYPE_REACT_MODULE=a7_0x504572(0xc2),ARTIFACT_SOURCE_AGENT=a7_0x504572(0xaa),ALLOWED_REACT_MODULE_IMPORTS=[a7_0x504572(0xb7),a7_0x504572(0xbd),'lodash',a7_0x504572(0xe8),a7_0x504572(0xb8),'@ant-design/icons'];export const ALLOWED_REACT_MODULE_IMPORTS_TEXT=ALLOWED_REACT_MODULE_IMPORTS[a7_0x504572(0xe4)](',\x20');const IMPORT_SOURCE_PATTERNS=[/\bimport\s+(?:type\s+)?(?:[^'";]*?\s+from\s+)?["']([^"']+)["']/g,/\bexport\s+(?:type\s+)?[^'";]*?\s+from\s+["']([^"']+)["']/g,/\bimport\s*\(\s*["']([^"']+)["']\s*\)/g,/\brequire\s*\(\s*["']([^"']+)["']\s*\)/g],PAGE_LEVEL_PATTERNS=[/<!doctype\s+html/i,/<\s*html\b/i,/\bcreateRoot\s*\(/,/\bReactDOM\s*\.\s*render\s*\(/,/\bReactDOM\s*\.\s*createRoot\s*\(/],FILE_FLAG={'name':a7_0x504572(0xc7),'type':'string','required':!![],'description':a7_0x504572(0xd1)},ARTIFACT_NAME_FLAG={'name':a7_0x504572(0xd6),'type':a7_0x504572(0xb6),'description':a7_0x504572(0xb3)},METADATA_FLAG={'name':a7_0x504572(0xd4),'type':a7_0x504572(0xb6),'description':a7_0x504572(0xd8)};function isPlainObject(_0x1a4259){const _0x1dc477=a7_0x504572;return typeof _0x1a4259===_0x1dc477(0xca)&&_0x1a4259!==null&&!Array[_0x1dc477(0xbb)](_0x1a4259);}function readSourceFile(_0x735f3a){const _0x5d2472=a7_0x504572;if(!_0x735f3a)throw CliErrors[_0x5d2472(0xbf)](_0x5d2472(0xde));if(!existsSync(_0x735f3a))throw CliErrors[_0x5d2472(0xbf)](_0x5d2472(0xc9)+_0x735f3a);if(!statSync(_0x735f3a)[_0x5d2472(0xa8)]())throw CliErrors[_0x5d2472(0xbf)](_0x5d2472(0xb9)+_0x735f3a);const _0x1a353e=readFileSync(_0x735f3a,_0x5d2472(0xb0));return validateReactModuleSource(_0x1a353e),_0x1a353e;}function parseMetadata(_0xc5312f){const _0x378ae0=a7_0x504572;if(!_0xc5312f)return undefined;let _0x554392;try{_0x554392=JSON[_0x378ae0(0xa5)](_0xc5312f);}catch{throw CliErrors[_0x378ae0(0xbf)](_0x378ae0(0xe9)+_0xc5312f);}if(!isPlainObject(_0x554392))throw CliErrors[_0x378ae0(0xbf)](_0x378ae0(0xa0));const _0x24ccd={..._0x554392};return delete _0x24ccd[_0x378ae0(0x9f)],_0x24ccd;}function getPackageName(_0x3bc644){const _0x58f773=a7_0x504572;if(_0x3bc644[_0x58f773(0x9e)]('@')){const [_0x210758,_0x50da89]=_0x3bc644['split']('/');return _0x210758&&_0x50da89?_0x210758+'/'+_0x50da89:_0x3bc644;}return _0x3bc644[_0x58f773(0xb2)]('/')[0x0]||_0x3bc644;}function validateAllowedImports(_0x27aace){const _0x248e0e=a7_0x504572,_0x5000d0=new Set();for(const _0x24dce5 of IMPORT_SOURCE_PATTERNS){_0x24dce5[_0x248e0e(0xab)]=0x0;let _0x489dbc;while((_0x489dbc=_0x24dce5[_0x248e0e(0x9d)](_0x27aace))!==null){const _0x1c0ae3=_0x489dbc[0x1]?.[_0x248e0e(0xac)]();_0x1c0ae3&&_0x5000d0[_0x248e0e(0xea)](_0x1c0ae3);}}const _0x167bd1=[..._0x5000d0][_0x248e0e(0xbc)](getPackageName)[_0x248e0e(0xd7)](_0x178ccd=>!ALLOWED_REACT_MODULE_IMPORTS[_0x248e0e(0xd9)](_0x178ccd));if(_0x167bd1[_0x248e0e(0xd3)]>0x0)throw CliErrors['validation']('react_module\x20imports\x20are\x20limited\x20to:\x20'+ALLOWED_REACT_MODULE_IMPORTS_TEXT+_0x248e0e(0xa6)+[...new Set(_0x167bd1)][_0x248e0e(0xe4)](',\x20'));}export function validateReactModuleSource(_0x3edc7b){const _0x58ca63=a7_0x504572;if(!_0x3edc7b['trim']())throw CliErrors[_0x58ca63(0xbf)]('Artifact\x20source\x20file\x20is\x20blank.');if(PAGE_LEVEL_PATTERNS['some'](_0x24330e=>_0x24330e['test'](_0x3edc7b)))throw CliErrors[_0x58ca63(0xbf)]('react_module\x20must\x20be\x20an\x20embeddable\x20React\x20module,\x20not\x20full\x20HTML\x20or\x20a\x20ReactDOM/createRoot\x20mount\x20entry.');validateAllowedImports(_0x3edc7b);}function buildArtifactInput(_0x45adb5){const _0x3173ba=a7_0x504572,_0x3896e6=readSourceFile(_0x45adb5[_0x3173ba(0xd2)](_0x3173ba(0xc7))),_0x415cfe=_0x45adb5[_0x3173ba(0xd2)]('name')[_0x3173ba(0xac)](),_0x3d50f7=parseMetadata(_0x45adb5[_0x3173ba(0xd2)]('metadata'));return{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x415cfe?{'name':_0x415cfe}:{},'content':_0x3896e6,..._0x3d50f7?{'metadata':_0x3d50f7}:{},'source':ARTIFACT_SOURCE_AGENT};}function summarizeArtifact(_0x471efb){const _0x34c2d1=a7_0x504572;return{'id':_0x471efb['id'],'name':_0x471efb[_0x34c2d1(0xd6)],'artifactType':_0x471efb['artifactType'],'source':_0x471efb[_0x34c2d1(0xcb)],'favorite':_0x471efb['favorite'],'deleted':_0x471efb['deleted'],'createTime':_0x471efb[_0x34c2d1(0xe6)],'updateTime':_0x471efb['updateTime']};}function detailArtifact(_0x27e9be){const _0x52c4c2=a7_0x504572;return{'id':_0x27e9be['id'],'appCode':_0x27e9be[_0x52c4c2(0xe3)],'name':_0x27e9be[_0x52c4c2(0xd6)],'artifactType':_0x27e9be['artifactType'],'source':_0x27e9be[_0x52c4c2(0xcb)],'favorite':_0x27e9be[_0x52c4c2(0xda)],'deleted':_0x27e9be['deleted'],'content':_0x27e9be[_0x52c4c2(0xd5)]??'','compiledContent':_0x27e9be[_0x52c4c2(0x9f)],'metadata':_0x27e9be[_0x52c4c2(0xd4)]??{},'createTime':_0x27e9be[_0x52c4c2(0xe6)],'updateTime':_0x27e9be[_0x52c4c2(0xdf)]};}function readFavoriteFlag(_0x2741a3){const _0x341012=a7_0x504572,_0x286e53=_0x2741a3['flag']('favorite');return _0x286e53===undefined||_0x286e53===null||_0x286e53===''?undefined:_0x2741a3[_0x341012(0xce)](_0x341012(0xda));}const artifactList={'service':a7_0x504572(0x9c),'command':'list','description':a7_0x504572(0xc5),'risk':a7_0x504572(0xbe),'flags':[{'name':a7_0x504572(0xcb),'type':a7_0x504572(0xb6),'description':a7_0x504572(0xe7)},{'name':'favorite','type':a7_0x504572(0xe2),'description':a7_0x504572(0xcc)},VERBOSE_FLAG],async 'execute'(_0x70529b){const _0xb4b0e7=a7_0x504572,_0x739404=await listRuntimeArtifacts(_0x70529b['appCode'],{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x70529b[_0xb4b0e7(0xd2)](_0xb4b0e7(0xcb))?{'source':_0x70529b[_0xb4b0e7(0xd2)]('source')}:{},...readFavoriteFlag(_0x70529b)!==undefined?{'favorite':readFavoriteFlag(_0x70529b)}:{}});return{'ok':!![],'data':{'total':_0x739404['length'],'items':_0x70529b[_0xb4b0e7(0xce)](_0xb4b0e7(0xe0))?_0x739404:_0x739404[_0xb4b0e7(0xbc)](summarizeArtifact)}};}},artifactDetail={'service':'artifact','command':a7_0x504572(0xc0),'description':a7_0x504572(0xeb),'risk':'read','flags':[{...ID_FLAG,'description':a7_0x504572(0xba)}],async 'execute'(_0x496122){const _0x5a9000=a7_0x504572,_0x26b23f=await getRuntimeArtifact(_0x496122['num']('id'),_0x496122[_0x5a9000(0xe3)]);return{'ok':!![],'data':detailArtifact(_0x26b23f)};}},artifactCreate={'service':a7_0x504572(0x9c),'command':a7_0x504572(0xb1),'description':a7_0x504572(0xad),'risk':a7_0x504572(0xcd),'flags':[FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x4d3b63){const _0x33111b=a7_0x504572,_0x3860eb=buildArtifactInput(_0x4d3b63),_0x21732a=await createRuntimeArtifact(_0x4d3b63[_0x33111b(0xe3)],_0x3860eb);return{'ok':!![],'data':detailArtifact(_0x21732a),'message':'Created\x20Artifact\x20'+_0x21732a['id']+(_0x21732a[_0x33111b(0xd6)]?'\x20('+_0x21732a[_0x33111b(0xd6)]+')':'')};},async 'dryRun'(_0x5223c0){const _0x3382d=a7_0x504572,_0x53e1fa=buildArtifactInput(_0x5223c0);return dryRun(_0x3382d(0xa4),'/client/artifact/create')[_0x3382d(0xa2)]({'appCode':_0x5223c0['appCode'],..._0x53e1fa})[_0x3382d(0xe5)](_0x3382d(0xc1))[_0x3382d(0xe1)]();}},artifactUpdate={'service':a7_0x504572(0x9c),'command':a7_0x504572(0xa9),'description':'Update\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','risk':a7_0x504572(0xcd),'flags':[{...ID_FLAG,'description':a7_0x504572(0xba)},FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x443dae){const _0x69d4e4=a7_0x504572,_0x16b3d2=_0x443dae[_0x69d4e4(0xc8)]('id'),_0x567645=buildArtifactInput(_0x443dae),_0x491188=await updateRuntimeArtifact(_0x16b3d2,_0x443dae[_0x69d4e4(0xe3)],_0x567645);return{'ok':!![],'data':detailArtifact(_0x491188),'message':_0x69d4e4(0xc4)+_0x491188['id']+(_0x491188['name']?'\x20('+_0x491188['name']+')':'')};},async 'dryRun'(_0x31fdd2){const _0x44cda9=a7_0x504572,_0x4f75a7=_0x31fdd2[_0x44cda9(0xc8)]('id'),_0x5a49bb=buildArtifactInput(_0x31fdd2);return dryRun(_0x44cda9(0xa4),_0x44cda9(0xc3)+_0x4f75a7+_0x44cda9(0xae))[_0x44cda9(0xa2)]({'appCode':_0x31fdd2[_0x44cda9(0xe3)],..._0x5a49bb})[_0x44cda9(0xe5)]('Preview:\x20update\x20react_module\x20Artifact\x20'+_0x4f75a7)['build']();}};function a7_0x2c96(_0x583c4d,_0x3cc67b){_0x583c4d=_0x583c4d-0x9c;const _0x4b3152=a7_0x4b31();let _0x2c966d=_0x4b3152[_0x583c4d];return _0x2c966d;}export const artifactDefinitions=[artifactList,artifactDetail,artifactCreate,artifactUpdate];
@@ -1 +1 @@
1
- const a8_0x4831db=a8_0x39b2;(function(_0x537573,_0x2c2a87){const _0x106615=a8_0x39b2,_0x2d864b=_0x537573();while(!![]){try{const _0x276f8c=parseInt(_0x106615(0x211))/0x1+parseInt(_0x106615(0x237))/0x2*(parseInt(_0x106615(0x1fc))/0x3)+parseInt(_0x106615(0x227))/0x4*(parseInt(_0x106615(0x206))/0x5)+parseInt(_0x106615(0x234))/0x6+-parseInt(_0x106615(0x20f))/0x7+-parseInt(_0x106615(0x23e))/0x8*(-parseInt(_0x106615(0x226))/0x9)+-parseInt(_0x106615(0x20e))/0xa;if(_0x276f8c===_0x2c2a87)break;else _0x2d864b['push'](_0x2d864b['shift']());}catch(_0x577a1d){_0x2d864b['push'](_0x2d864b['shift']());}}}(a8_0x210d,0x42b7f));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';function a8_0x39b2(_0x1a3a30,_0x13f6cd){_0x1a3a30=_0x1a3a30-0x1e9;const _0x210d24=a8_0x210d();let _0x39b2ce=_0x210d24[_0x1a3a30];return _0x39b2ce;}import{promptAccessKey,isAbortPrompt}from'../../commands/auth/prompt.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';function a8_0x210d(){const _0x1d97d5=['isTTY','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','\x20Verify:\x20','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','cancelled','str','test','Clear\x20accessKey\x20from\x20config','join','write','read','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','AccessKey:\x20','Option\x20C:\x20environment\x20variable','stdin','init','Use\x20`','global-default','yes','3Xdbckf','env','envName','auth','\x20config.','\x20(via\x20','AccessKey\x20saved\x20to\x20','project','Invalid\x20accessKey\x20format:\x20\x22','push','24220KrkvDK','\x20Current\x20env:\x20','global','Auth\x20config\x20reinitialized\x20in\x20','nonInteractive','ACCESS_KEY','\x20doctor','slice','4388530RDXmTF','1340619yDkMlQ','status','32084jWlooe','Shorthand\x20for\x20--access-key','Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config','AccessKey\x20cleared\x20from\x20','ClientAk','repeat','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','userCenterDisplayName','logout','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','string','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','production','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','=ak_xxx','Write\x20to\x20global\x20config\x20(default)','length','\x20env\x20var','Option\x20A:\x20','stdout','49023uHZxfe','152LoSflm','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','access-key','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','No\x20AccessKey\x20found\x20in\x20','`auth\x20login`\x20does\x20not\x20support\x20--yes.','boolean','Read\x20from\x20global\x20config\x20(default)','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','\x20auth\x20status','accessKey','Option\x20B:\x20apps\x20config\x20(','bool','121860ZoSQzc','Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','trim','756984voGZKY','development','AccessKey\x20(ak_xxx...)','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','Auth\x20mode:\x20','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','validation','424gFpLNK','Then\x20verify\x20with:\x20','daily'];a8_0x210d=function(){return _0x1d97d5;};return a8_0x210d();}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 _0x1d5345=a8_0x39b2;writeCliSideChannelLine(_0x1d5345(0x217)+PRODUCT_CONFIG['userCenterDisplayName']+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine('Tip:\x20you\x20can\x20also\x20run:'),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+'\x20auth\x20login\x20--access-key\x20<ak_xxx>');}function buildAccessKeySetupGuide(){const _0x1242f5=a8_0x39b2;return[_0x1242f5(0x217)+PRODUCT_CONFIG[_0x1242f5(0x218)]+':',USER_ACCESS_KEY_CREATE_URL,'Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20'+CLI_BIN_NAME+_0x1242f5(0x1f4)][_0x1242f5(0x1f1)]('\x0a');}function canPromptForAccessKey(_0x402f3c){const _0x10e443=a8_0x39b2;return!_0x402f3c[_0x10e443(0x20a)]&&process[_0x10e443(0x1f7)][_0x10e443(0x1e9)]!==![]&&process[_0x10e443(0x225)][_0x10e443(0x1e9)]!==![];}function resolveAuthScopeFlags(_0x1e21e8){const _0x38179a=a8_0x39b2;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x1e21e8[_0x38179a(0x233)](_0x38179a(0x208)),'explicitProject':_0x1e21e8[_0x38179a(0x233)](_0x38179a(0x203)),'policy':_0x38179a(0x1fa)}));}async function resolveAuthWriteInput(_0x1274ee){const _0x1077fb=a8_0x39b2;let _0x1f44ed=(_0x1274ee['str'](_0x1077fb(0x229))||_0x1274ee[_0x1077fb(0x1ee)]('ak')||'')[_0x1077fb(0x236)]();const _0x5131ae=(_0x1274ee[_0x1077fb(0x1ee)](_0x1077fb(0x1fd))||'')[_0x1077fb(0x236)]();if(!_0x1f44ed&&canPromptForAccessKey(_0x1274ee))try{showAccessKeyCreateHint(),_0x1f44ed=await promptAccessKey('');}catch(_0x1022d8){if(isAbortPrompt(_0x1022d8))throw CliErrors[_0x1077fb(0x1ed)]();throw _0x1022d8;}if(!_0x1f44ed)throw CliErrors[_0x1077fb(0x23d)]('Missing\x20accessKey.',buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN[_0x1077fb(0x1ef)](_0x1f44ed))throw CliErrors[_0x1077fb(0x23d)](_0x1077fb(0x204)+_0x1f44ed+'\x22',_0x1077fb(0x1ec));if(!_0x5131ae)return{'accessKey':_0x1f44ed};const _0x204369=normalizeEnv(_0x5131ae);return{'accessKey':_0x1f44ed,'env':isDaily(_0x204369)?_0x1077fb(0x240):isDev(_0x204369)?_0x1077fb(0x238):_0x1077fb(0x21d)};}export const authDefinitions=[{'service':a8_0x4831db(0x1ff),'command':'login','description':a8_0x4831db(0x235),'risk':a8_0x4831db(0x1f2),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a8_0x4831db(0x229),'type':a8_0x4831db(0x21b),'description':a8_0x4831db(0x239)},{'name':'ak','type':a8_0x4831db(0x21b),'description':a8_0x4831db(0x212)},{'name':'global','type':'boolean','description':a8_0x4831db(0x221),'default':!![]},{'name':a8_0x4831db(0x203),'type':a8_0x4831db(0x22d),'description':a8_0x4831db(0x22a),'default':![]}],async 'execute'(_0x2f9f34){const _0x454033=a8_0x4831db;if(_0x2f9f34[_0x454033(0x233)](_0x454033(0x1fb)))throw CliErrors[_0x454033(0x23d)](_0x454033(0x22c),_0x454033(0x1f9)+CLI_BIN_NAME+_0x454033(0x228)+CLI_BIN_NAME+_0x454033(0x23a));const _0x44a006=(_0x2f9f34['str'](_0x454033(0x229))||_0x2f9f34[_0x454033(0x1ee)]('ak')||'')['trim']();if(!_0x44a006&&_0x2f9f34[_0x454033(0x20a)])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x4322df=await resolveAuthWriteInput(_0x2f9f34),_0x4e3fec=resolveAuthScopeFlags(_0x2f9f34),_0x28221b=readScopedConfig(_0x4e3fec);_0x28221b['accessKey']=_0x4322df['accessKey'];_0x4322df[_0x454033(0x1fd)]&&(_0x28221b[_0x454033(0x1fd)]=_0x4322df[_0x454033(0x1fd)]);writeScopedConfig(_0x28221b,_0x4e3fec);const _0x29ad46=_0x4e3fec[_0x454033(0x208)]?_0x454033(0x208):'project',_0x285ff6=_0x28221b['env']?_0x454033(0x207)+_0x28221b['env']+'.':'';return{'ok':!![],'message':_0x454033(0x202)+_0x29ad46+_0x454033(0x200)+_0x285ff6+_0x454033(0x1eb)+CLI_BIN_NAME+_0x454033(0x230)};}},{'service':a8_0x4831db(0x1ff),'command':a8_0x4831db(0x1f8),'description':a8_0x4831db(0x21f),'risk':a8_0x4831db(0x1f2),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a8_0x4831db(0x229),'type':a8_0x4831db(0x21b),'description':a8_0x4831db(0x239)},{'name':'ak','type':'string','description':a8_0x4831db(0x212)},{'name':'env','type':'string','description':a8_0x4831db(0x213)},{'name':a8_0x4831db(0x208),'type':a8_0x4831db(0x22d),'description':a8_0x4831db(0x221),'default':!![]},{'name':a8_0x4831db(0x203),'type':a8_0x4831db(0x22d),'description':a8_0x4831db(0x22a),'default':![]}],async 'execute'(_0x14228f){const _0x2dfe61=a8_0x4831db,_0x3b3d73=await resolveAuthWriteInput(_0x14228f),_0x82dc44=resolveAuthScopeFlags(_0x14228f),_0x3a7bfe={'accessKey':_0x3b3d73['accessKey']};_0x3b3d73['env']&&(_0x3a7bfe[_0x2dfe61(0x1fd)]=_0x3b3d73[_0x2dfe61(0x1fd)]);writeScopedConfig(_0x3a7bfe,_0x82dc44);const _0x4c7f11=_0x82dc44[_0x2dfe61(0x208)]?'global':'project',_0x55e787=_0x3a7bfe[_0x2dfe61(0x1fd)]?'\x20Current\x20env:\x20'+_0x3a7bfe[_0x2dfe61(0x1fd)]+'.':'';return{'ok':!![],'message':_0x2dfe61(0x209)+_0x4c7f11+'\x20scope.'+_0x55e787+_0x2dfe61(0x1eb)+CLI_BIN_NAME+_0x2dfe61(0x230)};}},{'service':a8_0x4831db(0x1ff),'command':a8_0x4831db(0x219),'description':a8_0x4831db(0x1f0),'risk':a8_0x4831db(0x1f2),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a8_0x4831db(0x208),'type':a8_0x4831db(0x22d),'description':'Clear\x20from\x20global\x20config\x20(default)','default':!![]},{'name':'project','type':'boolean','description':'Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x298b76){const _0xb0bd17=a8_0x4831db,_0xb0b3c1=resolveAuthScopeFlags(_0x298b76),_0x426d8c=readScopedConfig(_0xb0b3c1),_0x14fde1=!!_0x426d8c[_0xb0bd17(0x231)];delete _0x426d8c['accessKey'],writeScopedConfig(_0x426d8c,_0xb0b3c1);const _0x517303=_0xb0b3c1[_0xb0bd17(0x208)]?_0xb0bd17(0x208):'project';if(_0x14fde1)return{'ok':!![],'message':_0xb0bd17(0x214)+_0x517303+_0xb0bd17(0x200)};return{'ok':!![],'message':_0xb0bd17(0x22b)+_0x517303+'\x20config.\x20Nothing\x20to\x20clear.'};}},{'service':a8_0x4831db(0x1ff),'command':a8_0x4831db(0x210),'description':'Show\x20current\x20authentication\x20status','risk':a8_0x4831db(0x1f3),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a8_0x4831db(0x208),'type':'boolean','description':a8_0x4831db(0x22e),'default':!![]},{'name':a8_0x4831db(0x203),'type':'boolean','description':a8_0x4831db(0x22f),'default':![]}],async 'execute'(_0xe208a4){const _0x1f9c9=a8_0x4831db,_0x596bb2=resolveAuthScopeFlags(_0xe208a4),_0x4e61aa=readScopedConfig(_0x596bb2),_0x1f1763=productEnvName(_0x1f9c9(0x20b)),_0x5cb217=productEnv(_0x1f9c9(0x20b))||undefined,_0x143d32=_0x4e61aa[_0x1f9c9(0x231)]||undefined,_0x1645bd=_0x5cb217||_0x143d32,_0x31c69c=_0x5cb217?_0x1f1763+_0x1f9c9(0x223):_0x143d32?(_0x596bb2[_0x1f9c9(0x208)]?_0x1f9c9(0x208):_0x1f9c9(0x203))+'\x20config':null,_0x5cb118=[_0x1f9c9(0x23b)+AUTH_MODE[_0x1f9c9(0x215)]];if(_0x1645bd){const _0x35f7e1=_0x1645bd[_0x1f9c9(0x222)]>0x8?''+_0x1645bd[_0x1f9c9(0x20d)](0x0,0x8)+'*'[_0x1f9c9(0x216)](_0x1645bd[_0x1f9c9(0x222)]-0x8):_0x1645bd;_0x5cb118[_0x1f9c9(0x205)](_0x1f9c9(0x1f5)+_0x35f7e1+(_0x31c69c?_0x1f9c9(0x201)+_0x31c69c+')':''));}return!_0x1645bd&&(_0x5cb118[_0x1f9c9(0x205)](''),_0x5cb118[_0x1f9c9(0x205)](_0x1f9c9(0x21c)),_0x5cb118[_0x1f9c9(0x205)](''),_0x5cb118[_0x1f9c9(0x205)](_0x1f9c9(0x224)+CLI_BIN_NAME+_0x1f9c9(0x23c)),_0x5cb118['push'](''),_0x5cb118['push'](_0x1f9c9(0x232)+PRODUCT_CONFIG['newConfigFileName']+')'),_0x5cb118[_0x1f9c9(0x205)](_0x1f9c9(0x21a)),_0x5cb118[_0x1f9c9(0x205)](''),_0x5cb118[_0x1f9c9(0x205)](_0x1f9c9(0x1f6)),_0x5cb118[_0x1f9c9(0x205)]('\x20\x20export\x20'+_0x1f1763+_0x1f9c9(0x220)),_0x5cb118[_0x1f9c9(0x205)](''),_0x5cb118[_0x1f9c9(0x205)](_0x1f9c9(0x23f)+CLI_BIN_NAME+_0x1f9c9(0x230)),_0x5cb118[_0x1f9c9(0x205)](_0x1f9c9(0x21e)+CLI_BIN_NAME+_0x1f9c9(0x20c))),{'ok':!![],'message':_0x5cb118[_0x1f9c9(0x1f1)]('\x0a')};}},{'service':a8_0x4831db(0x1ff),'command':'info','description':a8_0x4831db(0x1ea),'risk':a8_0x4831db(0x1f3),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x51a66b){const _0x475712=a8_0x4831db,_0x44cc2e=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x44cc2e,'meta':{'env':_0x51a66b[_0x475712(0x1fe)]??_0x475712(0x21d)}}};}}];
1
+ const a8_0x255173=a8_0x278f;function a8_0x278f(_0xc1f08e,_0xc8990d){_0xc1f08e=_0xc1f08e-0x16f;const _0x5a6db0=a8_0x5a6d();let _0x278fa0=_0x5a6db0[_0xc1f08e];return _0x278fa0;}(function(_0x141fc1,_0x20787f){const _0x37097e=a8_0x278f,_0x25f3a8=_0x141fc1();while(!![]){try{const _0x11b5ee=-parseInt(_0x37097e(0x18c))/0x1+-parseInt(_0x37097e(0x183))/0x2*(-parseInt(_0x37097e(0x173))/0x3)+-parseInt(_0x37097e(0x1c6))/0x4*(-parseInt(_0x37097e(0x181))/0x5)+parseInt(_0x37097e(0x1ba))/0x6+parseInt(_0x37097e(0x1c4))/0x7+-parseInt(_0x37097e(0x19e))/0x8+parseInt(_0x37097e(0x1b5))/0x9*(parseInt(_0x37097e(0x1bb))/0xa);if(_0x11b5ee===_0x20787f)break;else _0x25f3a8['push'](_0x25f3a8['shift']());}catch(_0x627c08){_0x25f3a8['push'](_0x25f3a8['shift']());}}}(a8_0x5a6d,0xda3d8));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';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 _0x3ebc8c=a8_0x278f;writeCliSideChannelLine('AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20'+PRODUCT_CONFIG['userCenterDisplayName']+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine(_0x3ebc8c(0x1b8)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x3ebc8c(0x180));}function buildAccessKeySetupGuide(){const _0x1b3fde=a8_0x278f;return[_0x1b3fde(0x198)+PRODUCT_CONFIG[_0x1b3fde(0x1ad)]+':',USER_ACCESS_KEY_CREATE_URL,_0x1b3fde(0x17a)+CLI_BIN_NAME+'\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]'][_0x1b3fde(0x189)]('\x0a');}function canPromptForAccessKey(_0x19f84b){const _0x12902e=a8_0x278f;return!_0x19f84b[_0x12902e(0x1c7)]&&process[_0x12902e(0x1ac)][_0x12902e(0x1c1)]!==![]&&process[_0x12902e(0x17c)][_0x12902e(0x1c1)]!==![];}function resolveAuthScopeFlags(_0x4cc3a0){const _0xc8a581=a8_0x278f;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x4cc3a0[_0xc8a581(0x1b9)](_0xc8a581(0x1a0)),'explicitProject':_0x4cc3a0[_0xc8a581(0x1b9)]('project'),'policy':_0xc8a581(0x194)}));}async function resolveAuthWriteInput(_0x25d2ff){const _0xb87ee4=a8_0x278f;let _0x39e5f0=(_0x25d2ff[_0xb87ee4(0x1bc)](_0xb87ee4(0x1b4))||_0x25d2ff[_0xb87ee4(0x1bc)]('ak')||'')['trim']();const _0xcb0732=(_0x25d2ff[_0xb87ee4(0x1bc)](_0xb87ee4(0x177))||'')[_0xb87ee4(0x172)]();if(!_0x39e5f0&&canPromptForAccessKey(_0x25d2ff))try{showAccessKeyCreateHint(),_0x39e5f0=await promptAccessKey('');}catch(_0x56f107){if(isAbortPrompt(_0x56f107))throw CliErrors[_0xb87ee4(0x193)]();throw _0x56f107;}if(!_0x39e5f0)throw CliErrors[_0xb87ee4(0x18f)]('Missing\x20accessKey.',buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN[_0xb87ee4(0x176)](_0x39e5f0))throw CliErrors[_0xb87ee4(0x18f)](_0xb87ee4(0x17b)+_0x39e5f0+'\x22','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars');if(!_0xcb0732)return{'accessKey':_0x39e5f0};const _0x13ccc3=normalizeEnv(_0xcb0732);return{'accessKey':_0x39e5f0,'env':isDaily(_0x13ccc3)?_0xb87ee4(0x17f):isDev(_0x13ccc3)?'development':_0xb87ee4(0x1b2)};}export const authDefinitions=[{'service':a8_0x255173(0x19d),'command':a8_0x255173(0x188),'description':a8_0x255173(0x1a5),'risk':a8_0x255173(0x1bf),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a8_0x255173(0x1b4),'type':a8_0x255173(0x190),'description':'AccessKey\x20(ak_xxx...)'},{'name':'ak','type':a8_0x255173(0x190),'description':a8_0x255173(0x18d)},{'name':a8_0x255173(0x1a0),'type':a8_0x255173(0x17d),'description':a8_0x255173(0x16f),'default':!![]},{'name':a8_0x255173(0x1a8),'type':a8_0x255173(0x17d),'description':a8_0x255173(0x170),'default':![]}],async 'execute'(_0x37c5c8){const _0x52f0f3=a8_0x255173;if(_0x37c5c8[_0x52f0f3(0x1b9)](_0x52f0f3(0x18a)))throw CliErrors[_0x52f0f3(0x18f)](_0x52f0f3(0x1a6),_0x52f0f3(0x18e)+CLI_BIN_NAME+'\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`'+CLI_BIN_NAME+_0x52f0f3(0x187));const _0x72e514=(_0x37c5c8['str'](_0x52f0f3(0x1b4))||_0x37c5c8[_0x52f0f3(0x1bc)]('ak')||'')[_0x52f0f3(0x172)]();if(!_0x72e514&&_0x37c5c8[_0x52f0f3(0x1c7)])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x3be932=await resolveAuthWriteInput(_0x37c5c8),_0x3a2831=resolveAuthScopeFlags(_0x37c5c8),_0x3825e3=readScopedConfig(_0x3a2831);_0x3825e3['accessKey']=_0x3be932[_0x52f0f3(0x1a9)];_0x3be932[_0x52f0f3(0x177)]&&(_0x3825e3[_0x52f0f3(0x177)]=_0x3be932[_0x52f0f3(0x177)]);writeScopedConfig(_0x3825e3,_0x3a2831);const _0x217058=_0x3a2831[_0x52f0f3(0x1a0)]?_0x52f0f3(0x1a0):'project',_0x1d2799=_0x3825e3[_0x52f0f3(0x177)]?_0x52f0f3(0x1bd)+_0x3825e3[_0x52f0f3(0x177)]+'.':'';return{'ok':!![],'message':_0x52f0f3(0x1a3)+_0x217058+_0x52f0f3(0x1c3)+_0x1d2799+_0x52f0f3(0x1b0)+CLI_BIN_NAME+_0x52f0f3(0x1ae)};}},{'service':'auth','command':'init','description':a8_0x255173(0x175),'risk':a8_0x255173(0x1bf),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'access-key','type':'string','description':'AccessKey\x20(ak_xxx...)'},{'name':'ak','type':a8_0x255173(0x190),'description':'Shorthand\x20for\x20--access-key'},{'name':a8_0x255173(0x177),'type':'string','description':a8_0x255173(0x197)},{'name':a8_0x255173(0x1a0),'type':a8_0x255173(0x17d),'description':a8_0x255173(0x16f),'default':!![]},{'name':a8_0x255173(0x1a8),'type':'boolean','description':a8_0x255173(0x170),'default':![]}],async 'execute'(_0x28c498){const _0x56a9c4=a8_0x255173,_0x2c1793=await resolveAuthWriteInput(_0x28c498),_0x5ca8c6=resolveAuthScopeFlags(_0x28c498),_0x5839fc={'accessKey':_0x2c1793[_0x56a9c4(0x1a9)]};_0x2c1793[_0x56a9c4(0x177)]&&(_0x5839fc[_0x56a9c4(0x177)]=_0x2c1793[_0x56a9c4(0x177)]);writeScopedConfig(_0x5839fc,_0x5ca8c6);const _0x3d63c8=_0x5ca8c6[_0x56a9c4(0x1a0)]?'global':_0x56a9c4(0x1a8),_0xaf77ee=_0x5839fc[_0x56a9c4(0x177)]?'\x20Current\x20env:\x20'+_0x5839fc['env']+'.':'';return{'ok':!![],'message':_0x56a9c4(0x191)+_0x3d63c8+'\x20scope.'+_0xaf77ee+'\x20Verify:\x20'+CLI_BIN_NAME+_0x56a9c4(0x1ae)};}},{'service':'auth','command':a8_0x255173(0x182),'description':a8_0x255173(0x1a2),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a8_0x255173(0x1a0),'type':a8_0x255173(0x17d),'description':a8_0x255173(0x1ab),'default':!![]},{'name':'project','type':a8_0x255173(0x17d),'description':a8_0x255173(0x1b6),'default':![]}],async 'execute'(_0x5e7f6d){const _0x37c09c=a8_0x255173,_0x294c6e=resolveAuthScopeFlags(_0x5e7f6d),_0x55ef29=readScopedConfig(_0x294c6e),_0x25ea64=!!_0x55ef29[_0x37c09c(0x1a9)];delete _0x55ef29['accessKey'],writeScopedConfig(_0x55ef29,_0x294c6e);const _0x5eada9=_0x294c6e[_0x37c09c(0x1a0)]?_0x37c09c(0x1a0):_0x37c09c(0x1a8);if(_0x25ea64)return{'ok':!![],'message':_0x37c09c(0x195)+_0x5eada9+_0x37c09c(0x1c3)};return{'ok':!![],'message':_0x37c09c(0x19f)+_0x5eada9+_0x37c09c(0x1be)};}},{'service':a8_0x255173(0x19d),'command':a8_0x255173(0x19a),'description':a8_0x255173(0x1aa),'risk':a8_0x255173(0x18b),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a8_0x255173(0x1a0),'type':a8_0x255173(0x17d),'description':'Read\x20from\x20global\x20config\x20(default)','default':!![]},{'name':a8_0x255173(0x1a8),'type':a8_0x255173(0x17d),'description':'Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x51236d){const _0x4a65e6=a8_0x255173,_0x1af71b=resolveAuthScopeFlags(_0x51236d),_0x532d84=readScopedConfig(_0x1af71b),_0x3f3783=productEnvName(_0x4a65e6(0x1af)),_0x2d39df=productEnv(_0x4a65e6(0x1af))||undefined,_0x270c26=_0x532d84[_0x4a65e6(0x1a9)]||undefined,_0x45cba6=_0x2d39df||_0x270c26,_0x429383=_0x2d39df?_0x3f3783+_0x4a65e6(0x174):_0x270c26?(_0x1af71b[_0x4a65e6(0x1a0)]?_0x4a65e6(0x1a0):_0x4a65e6(0x1a8))+_0x4a65e6(0x1c0):null,_0x421cf4=[_0x4a65e6(0x196)+AUTH_MODE[_0x4a65e6(0x192)]];if(_0x45cba6){const _0x3c515b=_0x45cba6[_0x4a65e6(0x1b7)]>0x8?''+_0x45cba6[_0x4a65e6(0x171)](0x0,0x8)+'*'[_0x4a65e6(0x1c2)](_0x45cba6[_0x4a65e6(0x1b7)]-0x8):_0x45cba6;_0x421cf4[_0x4a65e6(0x1a4)](_0x4a65e6(0x186)+_0x3c515b+(_0x429383?'\x20(via\x20'+_0x429383+')':''));}return!_0x45cba6&&(_0x421cf4['push'](''),_0x421cf4['push'](_0x4a65e6(0x1b1)),_0x421cf4[_0x4a65e6(0x1a4)](''),_0x421cf4[_0x4a65e6(0x1a4)]('Option\x20A:\x20'+CLI_BIN_NAME+_0x4a65e6(0x1a7)),_0x421cf4[_0x4a65e6(0x1a4)](''),_0x421cf4[_0x4a65e6(0x1a4)](_0x4a65e6(0x1a1)+PRODUCT_CONFIG[_0x4a65e6(0x19b)]+')'),_0x421cf4[_0x4a65e6(0x1a4)]('{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}'),_0x421cf4[_0x4a65e6(0x1a4)](''),_0x421cf4[_0x4a65e6(0x1a4)](_0x4a65e6(0x1b3)),_0x421cf4['push'](_0x4a65e6(0x179)+_0x3f3783+_0x4a65e6(0x185)),_0x421cf4[_0x4a65e6(0x1a4)](''),_0x421cf4[_0x4a65e6(0x1a4)](_0x4a65e6(0x178)+CLI_BIN_NAME+_0x4a65e6(0x1ae)),_0x421cf4[_0x4a65e6(0x1a4)](_0x4a65e6(0x184)+CLI_BIN_NAME+_0x4a65e6(0x19c))),{'ok':!![],'message':_0x421cf4[_0x4a65e6(0x189)]('\x0a')};}},{'service':a8_0x255173(0x19d),'command':a8_0x255173(0x1c5),'description':a8_0x255173(0x17e),'risk':a8_0x255173(0x18b),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x5dc3f9){const _0x416352=a8_0x255173,_0x43f1c3=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x43f1c3,'meta':{'env':_0x5dc3f9[_0x416352(0x199)]??_0x416352(0x1b2)}}};}}];function a8_0x5a6d(){const _0x477640=['10559304gqFJkR','No\x20AccessKey\x20found\x20in\x20','global','Option\x20B:\x20apps\x20config\x20(','Clear\x20accessKey\x20from\x20config','AccessKey\x20saved\x20to\x20','push','Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','`auth\x20login`\x20does\x20not\x20support\x20--yes.','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','project','accessKey','Show\x20current\x20authentication\x20status','Clear\x20from\x20global\x20config\x20(default)','stdin','userCenterDisplayName','\x20auth\x20status','ACCESS_KEY','\x20Verify:\x20','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','production','Option\x20C:\x20environment\x20variable','access-key','630PhZlqK','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','length','Tip:\x20you\x20can\x20also\x20run:','bool','3256296FMirBH','56430FzhIYJ','str','\x20Current\x20env:\x20','\x20config.\x20Nothing\x20to\x20clear.','write','\x20config','isTTY','repeat','\x20config.','8304086cPQSPD','info','111128KepDiS','nonInteractive','Write\x20to\x20global\x20config\x20(default)','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','slice','trim','633CYCKlj','\x20env\x20var','Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','test','env','Then\x20verify\x20with:\x20','\x20\x20export\x20','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','Invalid\x20accessKey\x20format:\x20\x22','stdout','boolean','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','daily','\x20auth\x20login\x20--access-key\x20<ak_xxx>','245CiLRQB','logout','4278NVxZJk','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','=ak_xxx','AccessKey:\x20','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','login','join','yes','read','1722846rgIzDm','Shorthand\x20for\x20--access-key','Use\x20`','validation','string','Auth\x20config\x20reinitialized\x20in\x20','ClientAk','cancelled','global-default','AccessKey\x20cleared\x20from\x20','Auth\x20mode:\x20','Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','envName','status','newConfigFileName','\x20doctor','auth'];a8_0x5a6d=function(){return _0x477640;};return a8_0x5a6d();}
@@ -1 +1 @@
1
- (function(_0x1eafd2,_0x420a50){const _0x39e2c0=a9_0x5c9c,_0x352b7b=_0x1eafd2();while(!![]){try{const _0x18d54b=-parseInt(_0x39e2c0(0x94))/0x1*(parseInt(_0x39e2c0(0x8f))/0x2)+parseInt(_0x39e2c0(0x95))/0x3*(parseInt(_0x39e2c0(0x9c))/0x4)+-parseInt(_0x39e2c0(0x92))/0x5*(parseInt(_0x39e2c0(0xa4))/0x6)+parseInt(_0x39e2c0(0x90))/0x7*(parseInt(_0x39e2c0(0x9a))/0x8)+-parseInt(_0x39e2c0(0x98))/0x9*(-parseInt(_0x39e2c0(0xa3))/0xa)+parseInt(_0x39e2c0(0x9e))/0xb+parseInt(_0x39e2c0(0xa0))/0xc;if(_0x18d54b===_0x420a50)break;else _0x352b7b['push'](_0x352b7b['shift']());}catch(_0x52ddb1){_0x352b7b['push'](_0x352b7b['shift']());}}}(a9_0x4469,0x7d6cc));import{createInterface}from'node:readline';function a9_0x5c9c(_0x2592c7,_0x1c3a69){_0x2592c7=_0x2592c7-0x8d;const _0x446992=a9_0x4469();let _0x5c9c3d=_0x446992[_0x2592c7];return _0x5c9c3d;}class AbortPrompt extends Error{constructor(){const _0x32c4f1=a9_0x5c9c;super('User\x20aborted\x20prompt'),this[_0x32c4f1(0x96)]=_0x32c4f1(0x97);}}function a9_0x4469(){const _0x65a94d=['11CyMMpi','52902cBohIa','name','AbortPrompt','335556Spolhw','SIGINT','17608kmIqGj','trim','12MqKqkr','):\x20','10365938LFSmiF','AccessKey\x20(','3021120eyIiLx','question','removeListener','90UdTqan','836292zgkrkx','close','race','71494mTjUlW','511URQwBX','AccessKey\x20(paste\x20ak_...):\x20','30rttjPE','stdout'];a9_0x4469=function(){return _0x65a94d;};return a9_0x4469();}function createSafeRl(){const _0x32527d=a9_0x5c9c,_0x20b2f2=createInterface({'input':process['stdin'],'output':process[_0x32527d(0x93)]});let _0x5d7869;const _0x8ea1cd=new Promise((_0x43c6b1,_0x4db096)=>{const _0x54232e=_0x32527d;_0x5d7869=()=>{const _0x1caf41=a9_0x5c9c;_0x5d7869&&(_0x20b2f2[_0x1caf41(0xa2)](_0x1caf41(0x99),_0x5d7869),_0x5d7869=undefined);try{_0x20b2f2[_0x1caf41(0x8d)]();}catch{}_0x4db096(new AbortPrompt());},_0x20b2f2['once'](_0x54232e(0x99),_0x5d7869);}),_0x30644f=()=>{const _0x1712ce=_0x32527d;_0x5d7869&&(_0x20b2f2['removeListener'](_0x1712ce(0x99),_0x5d7869),_0x5d7869=undefined);try{_0x20b2f2[_0x1712ce(0x8d)]();}catch{}};return{'rl':_0x20b2f2,'abortPromise':_0x8ea1cd,'disposeSuccess':_0x30644f};}export async function promptAccessKey(_0x546595=''){const _0x39bb57=a9_0x5c9c,{rl:_0x4a528a,abortPromise:_0x560ee5,disposeSuccess:_0x58ed7c}=createSafeRl(),_0x26da51=new Promise(_0x5b4260=>{const _0x100dc4=a9_0x5c9c,_0x3e1d4a=_0x546595?_0x100dc4(0x9f)+_0x546595+_0x100dc4(0x9d):_0x100dc4(0x91);_0x4a528a[_0x100dc4(0xa1)](_0x3e1d4a,_0x4beaa4=>{const _0xf5c9b7=_0x100dc4;_0x58ed7c(),_0x5b4260(_0x4beaa4[_0xf5c9b7(0x9b)]()||_0x546595);});});return Promise[_0x39bb57(0x8e)]([_0x26da51,_0x560ee5]);}export function isAbortPrompt(_0xd81fce){const _0x4d5952=a9_0x5c9c;return _0xd81fce instanceof Error&&_0xd81fce['name']===_0x4d5952(0x97);}
1
+ (function(_0x10e2cc,_0x10c110){const _0xc079e8=a9_0x4296,_0x46fb0b=_0x10e2cc();while(!![]){try{const _0x30abaa=parseInt(_0xc079e8(0x142))/0x1+parseInt(_0xc079e8(0x138))/0x2+parseInt(_0xc079e8(0x13e))/0x3+-parseInt(_0xc079e8(0x133))/0x4+-parseInt(_0xc079e8(0x136))/0x5+-parseInt(_0xc079e8(0x135))/0x6*(-parseInt(_0xc079e8(0x13a))/0x7)+parseInt(_0xc079e8(0x141))/0x8;if(_0x30abaa===_0x10c110)break;else _0x46fb0b['push'](_0x46fb0b['shift']());}catch(_0x4d2b43){_0x46fb0b['push'](_0x46fb0b['shift']());}}}(a9_0x37c6,0xddc43));import{createInterface}from'node:readline';class AbortPrompt extends Error{constructor(){const _0x310451=a9_0x4296;super(_0x310451(0x145)),this[_0x310451(0x140)]=_0x310451(0x13f);}}function a9_0x4296(_0x273128,_0x28daee){_0x273128=_0x273128-0x133;const _0x37c616=a9_0x37c6();let _0x429606=_0x37c616[_0x273128];return _0x429606;}function createSafeRl(){const _0x21a3dc=a9_0x4296,_0x15e99d=createInterface({'input':process[_0x21a3dc(0x146)],'output':process[_0x21a3dc(0x13d)]});let _0x300c58;const _0x426543=new Promise((_0x488389,_0x1e8c2f)=>{const _0x27f744=_0x21a3dc;_0x300c58=()=>{const _0x158316=a9_0x4296;_0x300c58&&(_0x15e99d[_0x158316(0x144)](_0x158316(0x134),_0x300c58),_0x300c58=undefined);try{_0x15e99d[_0x158316(0x13b)]();}catch{}_0x1e8c2f(new AbortPrompt());},_0x15e99d[_0x27f744(0x137)]('SIGINT',_0x300c58);}),_0x15b4ef=()=>{const _0x484b4d=_0x21a3dc;_0x300c58&&(_0x15e99d[_0x484b4d(0x144)](_0x484b4d(0x134),_0x300c58),_0x300c58=undefined);try{_0x15e99d[_0x484b4d(0x13b)]();}catch{}};return{'rl':_0x15e99d,'abortPromise':_0x426543,'disposeSuccess':_0x15b4ef};}export async function promptAccessKey(_0x3ca8ed=''){const _0x4e7684=a9_0x4296,{rl:_0x4ee994,abortPromise:_0x2216a2,disposeSuccess:_0x3ee806}=createSafeRl(),_0x374398=new Promise(_0x228d6d=>{const _0x55ae06=a9_0x4296,_0x547b64=_0x3ca8ed?_0x55ae06(0x13c)+_0x3ca8ed+_0x55ae06(0x139):'AccessKey\x20(paste\x20ak_...):\x20';_0x4ee994['question'](_0x547b64,_0x4ec2af=>{_0x3ee806(),_0x228d6d(_0x4ec2af['trim']()||_0x3ca8ed);});});return Promise[_0x4e7684(0x143)]([_0x374398,_0x2216a2]);}function a9_0x37c6(){const _0x13ae8a=['6pUpkCl','8789870KPrfNw','once','1679574TFZdFr','):\x20','3992793yMqztM','close','AccessKey\x20(','stdout','4526163MwBjpH','AbortPrompt','name','1941656jVoxhd','1160966MpYqfc','race','removeListener','User\x20aborted\x20prompt','stdin','6625004uZUttM','SIGINT'];a9_0x37c6=function(){return _0x13ae8a;};return a9_0x37c6();}export function isAbortPrompt(_0x41aa35){const _0x354758=a9_0x4296;return _0x41aa35 instanceof Error&&_0x41aa35[_0x354758(0x140)]===_0x354758(0x13f);}
@@ -1 +1 @@
1
- const a10_0x14ca4a=a10_0x54b5;(function(_0x326960,_0x5d90ae){const _0x20b5cd=a10_0x54b5,_0x1afd18=_0x326960();while(!![]){try{const _0x422c22=-parseInt(_0x20b5cd(0xd4))/0x1*(-parseInt(_0x20b5cd(0xd1))/0x2)+parseInt(_0x20b5cd(0xdf))/0x3+-parseInt(_0x20b5cd(0xe7))/0x4*(parseInt(_0x20b5cd(0xe1))/0x5)+parseInt(_0x20b5cd(0xde))/0x6*(parseInt(_0x20b5cd(0xe5))/0x7)+parseInt(_0x20b5cd(0xd5))/0x8+parseInt(_0x20b5cd(0xd8))/0x9*(parseInt(_0x20b5cd(0xe3))/0xa)+-parseInt(_0x20b5cd(0xdb))/0xb*(parseInt(_0x20b5cd(0xe2))/0xc);if(_0x422c22===_0x5d90ae)break;else _0x1afd18['push'](_0x1afd18['shift']());}catch(_0x5a1afa){_0x1afd18['push'](_0x1afd18['shift']());}}}(a10_0x2965,0x64ebf));import{getBffScriptInfo}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';function a10_0x2965(){const _0x5034bd=['detail','bff','287236ZUgbAP','Script\x20ID','functionName','1dBfOiK','5471920MshRBj','scriptType','updatedTime','171XsRZqD','description','read','132eRTtnv','verbose','bool','294kUqPKK','173859ubnUIK','Get\x20BFF\x20script\x20details\x20by\x20ID','48740CIEZmb','718464AhUfjy','27870nYyhUM','appCode','59647eaKiAc','num','92FHaaUD','createdTime'];a10_0x2965=function(){return _0x5034bd;};return a10_0x2965();}function a10_0x54b5(_0x4f5dbb,_0x3e3edc){_0x4f5dbb=_0x4f5dbb-0xcf;const _0x296544=a10_0x2965();let _0x54b5a4=_0x296544[_0x4f5dbb];return _0x54b5a4;}export const bffDetail={'service':a10_0x14ca4a(0xd0),'command':a10_0x14ca4a(0xcf),'description':a10_0x14ca4a(0xe0),'risk':a10_0x14ca4a(0xda),'flags':[{...ID_FLAG,'description':a10_0x14ca4a(0xd2)},VERBOSE_FLAG],async 'execute'(_0x66366f){const _0x3b518c=a10_0x14ca4a,_0x5d5e0e=await getBffScriptInfo(_0x66366f[_0x3b518c(0xe6)]('id')),_0x16bcf5=_0x66366f[_0x3b518c(0xdd)](_0x3b518c(0xdc));if(_0x16bcf5)return{'ok':!![],'data':_0x5d5e0e};return{'ok':!![],'data':{'id':_0x5d5e0e['id'],'appCode':_0x5d5e0e[_0x3b518c(0xe4)],'functionName':_0x5d5e0e[_0x3b518c(0xd3)]??'','scriptType':_0x5d5e0e[_0x3b518c(0xd6)],'description':_0x5d5e0e[_0x3b518c(0xd9)]||'(none)','createdTime':_0x5d5e0e[_0x3b518c(0xe8)]??'','updatedTime':_0x5d5e0e[_0x3b518c(0xd7)]??''}};}};
1
+ const a10_0x32a805=a10_0x4b24;(function(_0x426c10,_0x34828a){const _0x3edc81=a10_0x4b24,_0xf5f9aa=_0x426c10();while(!![]){try{const _0x11fdd7=-parseInt(_0x3edc81(0x88))/0x1+parseInt(_0x3edc81(0x7e))/0x2*(-parseInt(_0x3edc81(0x89))/0x3)+-parseInt(_0x3edc81(0x85))/0x4*(-parseInt(_0x3edc81(0x7d))/0x5)+parseInt(_0x3edc81(0x83))/0x6+parseInt(_0x3edc81(0x82))/0x7+-parseInt(_0x3edc81(0x81))/0x8*(-parseInt(_0x3edc81(0x87))/0x9)+parseInt(_0x3edc81(0x80))/0xa;if(_0x11fdd7===_0x34828a)break;else _0xf5f9aa['push'](_0xf5f9aa['shift']());}catch(_0x2baa86){_0xf5f9aa['push'](_0xf5f9aa['shift']());}}}(a10_0x4f28,0x31deb));import{getBffScriptInfo}from'../../core/api-client.js';function a10_0x4b24(_0x411d50,_0x26f176){_0x411d50=_0x411d50-0x7b;const _0x4f28e9=a10_0x4f28();let _0x4b24db=_0x4f28e9[_0x411d50];return _0x4b24db;}import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';export const bffDetail={'service':a10_0x32a805(0x7c),'command':'detail','description':'Get\x20BFF\x20script\x20details\x20by\x20ID','risk':'read','flags':[{...ID_FLAG,'description':'Script\x20ID'},VERBOSE_FLAG],async 'execute'(_0x373727){const _0x45c0fe=a10_0x32a805,_0x52d4e9=await getBffScriptInfo(_0x373727['num']('id')),_0x25236f=_0x373727[_0x45c0fe(0x8d)](_0x45c0fe(0x8c));if(_0x25236f)return{'ok':!![],'data':_0x52d4e9};return{'ok':!![],'data':{'id':_0x52d4e9['id'],'appCode':_0x52d4e9[_0x45c0fe(0x8a)],'functionName':_0x52d4e9[_0x45c0fe(0x7b)]??'','scriptType':_0x52d4e9['scriptType'],'description':_0x52d4e9[_0x45c0fe(0x84)]||_0x45c0fe(0x86),'createdTime':_0x52d4e9[_0x45c0fe(0x8b)]??'','updatedTime':_0x52d4e9[_0x45c0fe(0x7f)]??''}};}};function a10_0x4f28(){const _0x179344=['4vufLvl','(none)','460809cUNYCs','193575zhnWrc','1383flnHxe','appCode','createdTime','verbose','bool','functionName','bff','546145qlhuUc','1648EKmAAg','updatedTime','4427820ZYuAvH','24ZwlgaP','445767PjjxBM','50466rrQoCQ','description'];a10_0x4f28=function(){return _0x179344;};return a10_0x4f28();}
@@ -1 +1 @@
1
- function a11_0x1cb2(){const _0x56a219=['336148CWtHsy','294427Ffpact','10295496sDEnZP','3QuhYlG','8CvyhlC','288974xCPxmB','18amoqKm','1499710YGTCWt','name','9xNSnrk','6237385Ondwla','params','now','bff','7103900qKZlmI','str'];a11_0x1cb2=function(){return _0x56a219;};return a11_0x1cb2();}function a11_0x136c(_0x56f0b0,_0x869fa){_0x56f0b0=_0x56f0b0-0x90;const _0x1cb2c7=a11_0x1cb2();let _0x136c15=_0x1cb2c7[_0x56f0b0];return _0x136c15;}const a11_0x48448e=a11_0x136c;(function(_0x1d9bc9,_0x222ec2){const _0x39966e=a11_0x136c,_0x12a9cc=_0x1d9bc9();while(!![]){try{const _0x283fee=parseInt(_0x39966e(0x9b))/0x1*(-parseInt(_0x39966e(0x9c))/0x2)+-parseInt(_0x39966e(0x9a))/0x3*(-parseInt(_0x39966e(0x97))/0x4)+parseInt(_0x39966e(0x9e))/0x5+-parseInt(_0x39966e(0x9d))/0x6*(-parseInt(_0x39966e(0x98))/0x7)+parseInt(_0x39966e(0x99))/0x8+parseInt(_0x39966e(0x90))/0x9*(parseInt(_0x39966e(0x95))/0xa)+-parseInt(_0x39966e(0x91))/0xb;if(_0x283fee===_0x222ec2)break;else _0x12a9cc['push'](_0x12a9cc['shift']());}catch(_0x392b1c){_0x12a9cc['push'](_0x12a9cc['shift']());}}}(a11_0x1cb2,0xbf8ae));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':a11_0x48448e(0x94),'command':'exec','description':'Execute\x20a\x20BFF\x20script\x20by\x20function\x20name','risk':'read','flags':[{...NAME_FLAG,'required':!![],'description':'BFF\x20function\x20name\x20to\x20execute'},PARAMS_FLAG],async 'execute'(_0x4c93c2){const _0x37ac7c=a11_0x48448e,_0x555232=parseJsonParams(_0x4c93c2['str'](_0x37ac7c(0x92))),_0x2a6be1=Date[_0x37ac7c(0x93)](),_0xeee7dd=await executeSdkBff(_0x4c93c2[_0x37ac7c(0x96)](_0x37ac7c(0x9f)),_0x555232),_0x4353b4=Date[_0x37ac7c(0x93)]()-_0x2a6be1;return{'ok':!![],'data':{'result':_0xeee7dd,'elapsed':_0x4353b4},'message':'BFF\x20executed\x20in\x20'+_0x4353b4+'ms'};}};
1
+ const a11_0x51ee54=a11_0x2414;function a11_0x2414(_0x3673b9,_0x48a09b){_0x3673b9=_0x3673b9-0x108;const _0x185713=a11_0x1857();let _0x2414a5=_0x185713[_0x3673b9];return _0x2414a5;}(function(_0xb98b78,_0x304b14){const _0x20a93f=a11_0x2414,_0x5711aa=_0xb98b78();while(!![]){try{const _0x339d8c=-parseInt(_0x20a93f(0x10c))/0x1+-parseInt(_0x20a93f(0x111))/0x2+-parseInt(_0x20a93f(0x10d))/0x3+-parseInt(_0x20a93f(0x117))/0x4+parseInt(_0x20a93f(0x114))/0x5+-parseInt(_0x20a93f(0x10f))/0x6*(-parseInt(_0x20a93f(0x10b))/0x7)+parseInt(_0x20a93f(0x110))/0x8;if(_0x339d8c===_0x304b14)break;else _0x5711aa['push'](_0x5711aa['shift']());}catch(_0xc5abbe){_0x5711aa['push'](_0x5711aa['shift']());}}}(a11_0x1857,0x807be));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':a11_0x51ee54(0x116),'command':a11_0x51ee54(0x10a),'description':a11_0x51ee54(0x113),'risk':a11_0x51ee54(0x10e),'flags':[{...NAME_FLAG,'required':!![],'description':'BFF\x20function\x20name\x20to\x20execute'},PARAMS_FLAG],async 'execute'(_0x457f6d){const _0x1ce6ed=a11_0x51ee54,_0xbd2ad7=parseJsonParams(_0x457f6d[_0x1ce6ed(0x112)](_0x1ce6ed(0x115))),_0x3ca595=Date[_0x1ce6ed(0x109)](),_0x5442df=await executeSdkBff(_0x457f6d['str']('name'),_0xbd2ad7),_0xc5ef9f=Date[_0x1ce6ed(0x109)]()-_0x3ca595;return{'ok':!![],'data':{'result':_0x5442df,'elapsed':_0xc5ef9f},'message':_0x1ce6ed(0x108)+_0xc5ef9f+'ms'};}};function a11_0x1857(){const _0x228a1e=['now','exec','191611oRWlQO','452689wekFhA','1487040PGAric','read','132orApWM','8521872lZKJNW','1532798ByzyVU','str','Execute\x20a\x20BFF\x20script\x20by\x20function\x20name','5143595FoeNLA','params','bff','1820484uWRXkP','BFF\x20executed\x20in\x20'];a11_0x1857=function(){return _0x228a1e;};return a11_0x1857();}
@@ -1 +1 @@
1
- (function(_0x3f9487,_0x504ee1){const _0x2508fe=a12_0x5728,_0x3bfa5e=_0x3f9487();while(!![]){try{const _0x121731=-parseInt(_0x2508fe(0x18f))/0x1+parseInt(_0x2508fe(0x191))/0x2*(-parseInt(_0x2508fe(0x18c))/0x3)+-parseInt(_0x2508fe(0x193))/0x4*(-parseInt(_0x2508fe(0x195))/0x5)+-parseInt(_0x2508fe(0x192))/0x6+-parseInt(_0x2508fe(0x18d))/0x7*(-parseInt(_0x2508fe(0x194))/0x8)+-parseInt(_0x2508fe(0x190))/0x9*(-parseInt(_0x2508fe(0x18b))/0xa)+parseInt(_0x2508fe(0x18e))/0xb;if(_0x121731===_0x504ee1)break;else _0x3bfa5e['push'](_0x3bfa5e['shift']());}catch(_0x357f48){_0x3bfa5e['push'](_0x3bfa5e['shift']());}}}(a12_0x2267,0x70a1f));import{bffDetail}from'../../commands/bff/detail.js';import{bffExec}from'../../commands/bff/exec.js';function a12_0x5728(_0x4583c8,_0x624a37){_0x4583c8=_0x4583c8-0x18b;const _0x226799=a12_0x2267();let _0x5728a9=_0x226799[_0x4583c8];return _0x5728a9;}export const bffDefinitions=[bffDetail,bffExec];function a12_0x2267(){const _0x47651b=['60cZEKAm','656AaNcXx','142155RHuBQR','3610nRSmvR','225879cyYUmG','30548iCkRVl','14779160Pmwloo','514698iyGjXD','1143WPLZpf','14bbbzNU','4023768TRaiXc'];a12_0x2267=function(){return _0x47651b;};return a12_0x2267();}
1
+ (function(_0x39b3c8,_0x2694c3){const _0x2bbc33=a12_0x4b75,_0x55df54=_0x39b3c8();while(!![]){try{const _0x2c9f32=parseInt(_0x2bbc33(0x181))/0x1*(-parseInt(_0x2bbc33(0x17d))/0x2)+-parseInt(_0x2bbc33(0x187))/0x3+-parseInt(_0x2bbc33(0x180))/0x4*(parseInt(_0x2bbc33(0x17f))/0x5)+parseInt(_0x2bbc33(0x182))/0x6*(parseInt(_0x2bbc33(0x183))/0x7)+parseInt(_0x2bbc33(0x184))/0x8+-parseInt(_0x2bbc33(0x17e))/0x9+-parseInt(_0x2bbc33(0x186))/0xa*(-parseInt(_0x2bbc33(0x185))/0xb);if(_0x2c9f32===_0x2694c3)break;else _0x55df54['push'](_0x55df54['shift']());}catch(_0xc48382){_0x55df54['push'](_0x55df54['shift']());}}}(a12_0x2a44,0x9fcf8));function a12_0x4b75(_0x300505,_0x4d6d47){_0x300505=_0x300505-0x17d;const _0x2a445e=a12_0x2a44();let _0x4b757e=_0x2a445e[_0x300505];return _0x4b757e;}import{bffDetail}from'../../commands/bff/detail.js';import{bffExec}from'../../commands/bff/exec.js';export const bffDefinitions=[bffDetail,bffExec];function a12_0x2a44(){const _0x1d70ef=['4229KmkhGy','35838hUTQvC','903YwWKRg','780656FxOVJE','77czaIau','2696910qpbFjv','2319180Pvxskg','40tjbpUe','2143926MZPrXs','5027490iyusWb','4FvcPrJ'];a12_0x2a44=function(){return _0x1d70ef;};return a12_0x2a44();}
@@ -1 +1 @@
1
- (function(_0x4231af,_0x3f79){const _0x282f06=a13_0x229f,_0x30cf25=_0x4231af();while(!![]){try{const _0x5f405f=-parseInt(_0x282f06(0x164))/0x1*(-parseInt(_0x282f06(0x15e))/0x2)+parseInt(_0x282f06(0x166))/0x3*(-parseInt(_0x282f06(0x165))/0x4)+-parseInt(_0x282f06(0x15c))/0x5+-parseInt(_0x282f06(0x15d))/0x6*(-parseInt(_0x282f06(0x161))/0x7)+parseInt(_0x282f06(0x16d))/0x8+-parseInt(_0x282f06(0x16c))/0x9+parseInt(_0x282f06(0x167))/0xa*(parseInt(_0x282f06(0x160))/0xb);if(_0x5f405f===_0x3f79)break;else _0x30cf25['push'](_0x30cf25['shift']());}catch(_0x695afc){_0x30cf25['push'](_0x30cf25['shift']());}}}(a13_0x5a99,0x1f977));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';import{isInProject}from'../../context.js';import{CliErrors}from'../../errors.js';function a13_0x5a99(){const _0x12b4fa=[',\x20or\x20run\x20`','project','\x20init`\x20first.','newConfigFileName','global-default','Add\x20--global\x20to\x20write\x20to\x20~/','global','301710neKJUY','897774dylurp','243526caQXId','Not\x20inside\x20a\x20project\x20(no\x20','82775TIaMgV','7UNjzVH','Flags\x20--global\x20and\x20--project\x20are\x20mutually\x20exclusive.','Use\x20only\x20one\x20config\x20scope\x20flag.','2NUViJj','148twFALb','20931EeZYBL','230GPzYLb','project-or-global-explicit','inProject','validation','\x20(global)','2193921djqyvo','1003432zCeGkA'];a13_0x5a99=function(){return _0x12b4fa;};return a13_0x5a99();}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(_0x227cb0){const _0x49e552=a13_0x229f,{explicitGlobal:explicitGlobal=![],explicitProject:explicitProject=![],policy:_0x25db1d}=_0x227cb0;if(explicitGlobal&&explicitProject)throw CliErrors[_0x49e552(0x16a)](_0x49e552(0x162),_0x49e552(0x163));if(explicitGlobal)return _0x49e552(0x15b);if(explicitProject)return'project';switch(_0x25db1d){case _0x49e552(0x159):return _0x49e552(0x15b);case'project-default':return _0x227cb0['inProject']??isInProject()?'project':_0x49e552(0x15b);case _0x49e552(0x168):if(!(_0x227cb0[_0x49e552(0x169)]??isInProject()))throw CliErrors[_0x49e552(0x16a)](_0x49e552(0x15f)+PRODUCT_CONFIG[_0x49e552(0x158)]+'\x20found).',_0x49e552(0x15a)+PRODUCT_CONFIG[_0x49e552(0x158)]+_0x49e552(0x155)+CLI_BIN_NAME+_0x49e552(0x157));return _0x49e552(0x156);}}function a13_0x229f(_0x1971be,_0x4ce728){_0x1971be=_0x1971be-0x155;const _0x5a995a=a13_0x5a99();let _0x229f34=_0x5a995a[_0x1971be];return _0x229f34;}export function toScopeFlags(_0x10940a){const _0x8c4919=a13_0x229f;return{'global':_0x10940a===_0x8c4919(0x15b)};}export function formatScopeLabel(_0x297fb2){const _0x4f64e7=a13_0x229f;return _0x297fb2==='global'?_0x4f64e7(0x16b):'';}
1
+ (function(_0x2f92be,_0x5c2ce6){const _0x1c1092=a13_0x2a18,_0x3e8214=_0x2f92be();while(!![]){try{const _0x26057c=-parseInt(_0x1c1092(0x192))/0x1+-parseInt(_0x1c1092(0x18f))/0x2*(-parseInt(_0x1c1092(0x183))/0x3)+parseInt(_0x1c1092(0x185))/0x4*(-parseInt(_0x1c1092(0x181))/0x5)+parseInt(_0x1c1092(0x194))/0x6*(-parseInt(_0x1c1092(0x18b))/0x7)+-parseInt(_0x1c1092(0x186))/0x8+parseInt(_0x1c1092(0x18e))/0x9*(-parseInt(_0x1c1092(0x180))/0xa)+-parseInt(_0x1c1092(0x18d))/0xb*(-parseInt(_0x1c1092(0x189))/0xc);if(_0x26057c===_0x5c2ce6)break;else _0x3e8214['push'](_0x3e8214['shift']());}catch(_0x45682b){_0x3e8214['push'](_0x3e8214['shift']());}}}(a13_0x5204,0x1a503));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';import{isInProject}from'../../context.js';function a13_0x2a18(_0x4e6399,_0x561e61){_0x4e6399=_0x4e6399-0x17f;const _0x5204c8=a13_0x5204();let _0x2a18d6=_0x5204c8[_0x4e6399];return _0x2a18d6;}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(_0x410bca){const _0x1353d2=a13_0x2a18,{explicitGlobal:explicitGlobal=![],explicitProject:explicitProject=![],policy:_0x243a99}=_0x410bca;if(explicitGlobal&&explicitProject)throw CliErrors[_0x1353d2(0x187)](_0x1353d2(0x18a),'Use\x20only\x20one\x20config\x20scope\x20flag.');if(explicitGlobal)return'global';if(explicitProject)return'project';switch(_0x243a99){case _0x1353d2(0x184):return _0x1353d2(0x188);case _0x1353d2(0x197):return _0x410bca[_0x1353d2(0x195)]??isInProject()?_0x1353d2(0x182):_0x1353d2(0x188);case _0x1353d2(0x17f):if(!(_0x410bca[_0x1353d2(0x195)]??isInProject()))throw CliErrors[_0x1353d2(0x187)](_0x1353d2(0x18c)+PRODUCT_CONFIG[_0x1353d2(0x190)]+_0x1353d2(0x191),'Add\x20--global\x20to\x20write\x20to\x20~/'+PRODUCT_CONFIG[_0x1353d2(0x190)]+_0x1353d2(0x196)+CLI_BIN_NAME+_0x1353d2(0x193));return _0x1353d2(0x182);}}export function toScopeFlags(_0x5bd55d){return{'global':_0x5bd55d==='global'};}export function formatScopeLabel(_0x34bb6c){return _0x34bb6c==='global'?'\x20(global)':'';}function a13_0x5204(){const _0x3f116e=['Not\x20inside\x20a\x20project\x20(no\x20','11nPYHEC','708417lvGmtt','74BsXaTJ','newConfigFileName','\x20found).','39675bzeGbC','\x20init`\x20first.','6OQsUGU','inProject',',\x20or\x20run\x20`','project-default','project-or-global-explicit','10sUJekL','44645RBajOd','project','11319HhGplG','global-default','12XMczoC','1403064YLqqbX','validation','global','5498040QSMzrY','Flags\x20--global\x20and\x20--project\x20are\x20mutually\x20exclusive.','1186038MPktQE'];a13_0x5204=function(){return _0x3f116e;};return a13_0x5204();}
@@ -1 +1 @@
1
- (function(_0x81ab61,_0x59cf8b){const _0x3f1df5=a14_0x6c5f,_0x1428c3=_0x81ab61();while(!![]){try{const _0x37aa61=-parseInt(_0x3f1df5(0x204))/0x1*(-parseInt(_0x3f1df5(0x1eb))/0x2)+parseInt(_0x3f1df5(0x1fa))/0x3*(parseInt(_0x3f1df5(0x1ff))/0x4)+parseInt(_0x3f1df5(0x1ee))/0x5*(parseInt(_0x3f1df5(0x201))/0x6)+parseInt(_0x3f1df5(0x1f1))/0x7*(-parseInt(_0x3f1df5(0x1f7))/0x8)+-parseInt(_0x3f1df5(0x1e8))/0x9+parseInt(_0x3f1df5(0x202))/0xa+-parseInt(_0x3f1df5(0x1ef))/0xb*(parseInt(_0x3f1df5(0x1f4))/0xc);if(_0x37aa61===_0x59cf8b)break;else _0x1428c3['push'](_0x1428c3['shift']());}catch(_0x1f626d){_0x1428c3['push'](_0x1428c3['shift']());}}}(a14_0x10ee,0x73ba1));import{CliErrors}from'../../errors.js';function isSet(_0x97a666,_0x349b4f){const _0x475a0b=a14_0x6c5f,_0x8165b9=_0x97a666[_0x475a0b(0x1e9)](_0x349b4f);return _0x8165b9!==undefined&&_0x8165b9!==''&&_0x8165b9!==![]&&_0x8165b9!==0x0;}function a14_0x10ee(){const _0x5b8fb3=['5803461YyvAOL','flag','some','40RKcyYP','At\x20least\x20one\x20of\x20','Remove\x20all\x20but\x20one.','445UzHTQs','11vrkBXv','\x20is\x20required\x20for\x20`','3829siuyoY',':\x20expected\x20',',\x20got\x20\x22','7389540kxMLTo','Invalid\x20--','map','4856bOIZYj','Only\x20one\x20of\x20','filter','36NiMKGG','Use\x20only\x20one\x20of:\x20','test','length','join','223928YDDzzd','\x20are\x20mutually\x20exclusive\x20for\x20`','22926OhHxeK','7262770mMuujQ','Provide\x20one\x20of:\x20','16427EqsznM','validation'];a14_0x10ee=function(){return _0x5b8fb3;};return a14_0x10ee();}function a14_0x6c5f(_0x544a41,_0x1c112e){_0x544a41=_0x544a41-0x1e8;const _0x10ee2c=a14_0x10ee();let _0x6c5f3e=_0x10ee2c[_0x544a41];return _0x6c5f3e;}function fmtNames(_0x1048cd){const _0x379fa0=a14_0x6c5f;return _0x1048cd[_0x379fa0(0x1f6)](_0x3259f1=>'--'+_0x3259f1)[_0x379fa0(0x1fe)](',\x20');}export function requireOneOf(_0x5df0ca,_0x1aef2e,_0xae2161){const _0x1455df=a14_0x6c5f,_0x5798be=_0x1aef2e[_0x1455df(0x1f9)](_0x526c69=>isSet(_0x5df0ca,_0x526c69));if(_0x5798be[_0x1455df(0x1fd)]!==0x1)throw CliErrors[_0x1455df(0x205)](_0x5798be['length']===0x0?'Exactly\x20one\x20of\x20'+fmtNames(_0x1aef2e)+_0x1455df(0x1f0)+_0xae2161+'`.':_0x1455df(0x1f8)+fmtNames(_0x1aef2e)+'\x20is\x20allowed,\x20found:\x20'+fmtNames(_0x5798be)+'.',_0x5798be[_0x1455df(0x1fd)]===0x0?_0x1455df(0x203)+fmtNames(_0x1aef2e):_0x1455df(0x1ed));}export function requireAnyOf(_0x4a38b7,_0x3f6355,_0x43334f){const _0x29a422=a14_0x6c5f;if(!_0x3f6355[_0x29a422(0x1ea)](_0x266046=>isSet(_0x4a38b7,_0x266046)))throw CliErrors[_0x29a422(0x205)](_0x29a422(0x1ec)+fmtNames(_0x3f6355)+_0x29a422(0x1f0)+_0x43334f+'`.',_0x29a422(0x203)+fmtNames(_0x3f6355));}export function mutuallyExclusive(_0x39acec,_0x3393fa,_0x54701d){const _0x26d4f1=a14_0x6c5f,_0x2e4255=_0x3393fa[_0x26d4f1(0x1f9)](_0x437f39=>isSet(_0x39acec,_0x437f39));if(_0x2e4255[_0x26d4f1(0x1fd)]>0x1)throw CliErrors[_0x26d4f1(0x205)]('Flags\x20'+fmtNames(_0x2e4255)+_0x26d4f1(0x200)+_0x54701d+'`.',_0x26d4f1(0x1fb)+fmtNames(_0x3393fa));}export function validatePattern(_0x27f7e8,_0x1a30e5,_0x408ee4,_0x5998a4){const _0x46fb70=a14_0x6c5f,_0x3611cd=_0x27f7e8['str'](_0x1a30e5);if(_0x3611cd&&!_0x408ee4[_0x46fb70(0x1fc)](_0x3611cd))throw CliErrors[_0x46fb70(0x205)](_0x46fb70(0x1f5)+_0x1a30e5+_0x46fb70(0x1f2)+_0x5998a4+_0x46fb70(0x1f3)+_0x3611cd+'\x22.');}
1
+ (function(_0x167d3f,_0x117423){const _0x22a711=a14_0x461f,_0x1f29f9=_0x167d3f();while(!![]){try{const _0x30ef19=parseInt(_0x22a711(0x1dc))/0x1*(parseInt(_0x22a711(0x1e1))/0x2)+-parseInt(_0x22a711(0x1ed))/0x3*(-parseInt(_0x22a711(0x1ee))/0x4)+-parseInt(_0x22a711(0x1e2))/0x5*(-parseInt(_0x22a711(0x1f8))/0x6)+-parseInt(_0x22a711(0x1f3))/0x7+-parseInt(_0x22a711(0x1f2))/0x8*(parseInt(_0x22a711(0x1f1))/0x9)+-parseInt(_0x22a711(0x1e9))/0xa*(-parseInt(_0x22a711(0x1ec))/0xb)+parseInt(_0x22a711(0x1ef))/0xc;if(_0x30ef19===_0x117423)break;else _0x1f29f9['push'](_0x1f29f9['shift']());}catch(_0x1ed61b){_0x1f29f9['push'](_0x1f29f9['shift']());}}}(a14_0x87d0,0xd40b7));import{CliErrors}from'../../errors.js';function a14_0x87d0(){const _0x38d126=['3208sbNVzn','10751251esHjcd','map','validation','some','\x20is\x20required\x20for\x20`','30dNONuT','At\x20least\x20one\x20of\x20','Only\x20one\x20of\x20','Invalid\x20--','1OsOrxp','Use\x20only\x20one\x20of:\x20','test','Provide\x20one\x20of:\x20','Flags\x20','2117434SlFIFA','1525070BCKIKQ','length','str','\x20is\x20allowed,\x20found:\x20','Exactly\x20one\x20of\x20','join',',\x20got\x20\x22','260hxCNJn',':\x20expected\x20','flag','218911rSuZET','186480ZMRjML','16jwqTnh','838884jQHcCW','filter','22788kcNvAk'];a14_0x87d0=function(){return _0x38d126;};return a14_0x87d0();}function isSet(_0x52f730,_0xf91476){const _0x597722=a14_0x461f,_0x2c7dc5=_0x52f730[_0x597722(0x1eb)](_0xf91476);return _0x2c7dc5!==undefined&&_0x2c7dc5!==''&&_0x2c7dc5!==![]&&_0x2c7dc5!==0x0;}function fmtNames(_0x5b9fe8){const _0x541a18=a14_0x461f;return _0x5b9fe8[_0x541a18(0x1f4)](_0xfb9b23=>'--'+_0xfb9b23)[_0x541a18(0x1e7)](',\x20');}export function requireOneOf(_0xdb5e0b,_0x568de1,_0x1fe2a8){const _0xaf0dcb=a14_0x461f,_0xd92f32=_0x568de1[_0xaf0dcb(0x1f0)](_0x178c38=>isSet(_0xdb5e0b,_0x178c38));if(_0xd92f32['length']!==0x1)throw CliErrors[_0xaf0dcb(0x1f5)](_0xd92f32[_0xaf0dcb(0x1e3)]===0x0?_0xaf0dcb(0x1e6)+fmtNames(_0x568de1)+_0xaf0dcb(0x1f7)+_0x1fe2a8+'`.':_0xaf0dcb(0x1fa)+fmtNames(_0x568de1)+_0xaf0dcb(0x1e5)+fmtNames(_0xd92f32)+'.',_0xd92f32['length']===0x0?'Provide\x20one\x20of:\x20'+fmtNames(_0x568de1):'Remove\x20all\x20but\x20one.');}export function requireAnyOf(_0x4bf109,_0x421b58,_0x3ebae7){const _0x38de0d=a14_0x461f;if(!_0x421b58[_0x38de0d(0x1f6)](_0x6962c=>isSet(_0x4bf109,_0x6962c)))throw CliErrors[_0x38de0d(0x1f5)](_0x38de0d(0x1f9)+fmtNames(_0x421b58)+_0x38de0d(0x1f7)+_0x3ebae7+'`.',_0x38de0d(0x1df)+fmtNames(_0x421b58));}function a14_0x461f(_0x3ef4f1,_0x576e0a){_0x3ef4f1=_0x3ef4f1-0x1db;const _0x87d091=a14_0x87d0();let _0x461f99=_0x87d091[_0x3ef4f1];return _0x461f99;}export function mutuallyExclusive(_0x353465,_0x437fe3,_0x3ec3f7){const _0x2c48cd=a14_0x461f,_0x4c5332=_0x437fe3[_0x2c48cd(0x1f0)](_0xf2fbc=>isSet(_0x353465,_0xf2fbc));if(_0x4c5332[_0x2c48cd(0x1e3)]>0x1)throw CliErrors[_0x2c48cd(0x1f5)](_0x2c48cd(0x1e0)+fmtNames(_0x4c5332)+'\x20are\x20mutually\x20exclusive\x20for\x20`'+_0x3ec3f7+'`.',_0x2c48cd(0x1dd)+fmtNames(_0x437fe3));}export function validatePattern(_0x53d556,_0x483576,_0xc66adb,_0x346b1b){const _0x28ee07=a14_0x461f,_0x3bb59f=_0x53d556[_0x28ee07(0x1e4)](_0x483576);if(_0x3bb59f&&!_0xc66adb[_0x28ee07(0x1de)](_0x3bb59f))throw CliErrors[_0x28ee07(0x1f5)](_0x28ee07(0x1db)+_0x483576+_0x28ee07(0x1ea)+_0x346b1b+_0x28ee07(0x1e8)+_0x3bb59f+'\x22.');}