@lovrabet/lovrabet-cli 2.1.0-beta.2 → 2.1.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) 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/eligibility.js +1 -1
  6. package/lib/commands/app/mock-loader.js +1 -1
  7. package/lib/commands/app/remote-source.js +1 -1
  8. package/lib/commands/app/shared.js +1 -1
  9. package/lib/commands/artifact/index.js +1 -1
  10. package/lib/commands/auth/index.js +1 -1
  11. package/lib/commands/auth/prompt.js +1 -1
  12. package/lib/commands/bff/detail.js +1 -1
  13. package/lib/commands/bff/exec.js +1 -1
  14. package/lib/commands/bff/index.js +1 -1
  15. package/lib/commands/cli-skill/index.js +1 -1
  16. package/lib/commands/common/config-policy.js +1 -1
  17. package/lib/commands/common/constraints.js +1 -1
  18. package/lib/commands/common/flags.js +1 -1
  19. package/lib/commands/config/definitions.js +1 -1
  20. package/lib/commands/config/shared.js +1 -1
  21. package/lib/commands/data/index.js +1 -1
  22. package/lib/commands/dataset/detail.js +1 -1
  23. package/lib/commands/dataset/index.js +1 -1
  24. package/lib/commands/dataset/list.js +1 -1
  25. package/lib/commands/dataset/sdk-doc.js +1 -1
  26. package/lib/commands/doctor.js +1 -1
  27. package/lib/commands/init.js +1 -1
  28. package/lib/commands/kb/index.js +1 -1
  29. package/lib/commands/logs/index.js +1 -1
  30. package/lib/commands/personal-bff/index.js +1 -1
  31. package/lib/commands/registry.js +1 -1
  32. package/lib/commands/schema.js +1 -1
  33. package/lib/commands/service/dynamic.js +1 -1
  34. package/lib/commands/service/index.js +1 -1
  35. package/lib/commands/service/registry.js +1 -1
  36. package/lib/commands/skill/index.js +1 -1
  37. package/lib/commands/skill/templates.js +1 -1
  38. package/lib/commands/skill/validate.js +1 -1
  39. package/lib/commands/sql/detail.js +1 -1
  40. package/lib/commands/sql/exec.js +1 -1
  41. package/lib/commands/sql/index.js +1 -1
  42. package/lib/commands/update.js +1 -1
  43. package/lib/commands/workspace/index.js +1 -1
  44. package/lib/config/schema.js +1 -1
  45. package/lib/constant/app.js +1 -1
  46. package/lib/constant/auth-mode.js +1 -1
  47. package/lib/constant/cli.js +1 -1
  48. package/lib/constant/defaults.js +1 -1
  49. package/lib/constant/distribution.js +1 -1
  50. package/lib/constant/domain.js +1 -1
  51. package/lib/constant/env.js +1 -1
  52. package/lib/constant/output.js +1 -1
  53. package/lib/constant/product.js +1 -1
  54. package/lib/constant/risk.js +1 -1
  55. package/lib/constant/url.js +1 -1
  56. package/lib/context.js +1 -1
  57. package/lib/core/api-client.js +1 -1
  58. package/lib/core/db-resolver.js +1 -1
  59. package/lib/core/sdk-client.js +1 -1
  60. package/lib/errors.js +1 -1
  61. package/lib/framework/build-all-flags.js +1 -1
  62. package/lib/framework/dryrun.js +1 -1
  63. package/lib/framework/flags.js +1 -1
  64. package/lib/framework/help.js +1 -1
  65. package/lib/framework/index.js +1 -1
  66. package/lib/framework/output.js +1 -1
  67. package/lib/framework/preparse.js +1 -1
  68. package/lib/framework/response.js +1 -1
  69. package/lib/framework/runner-confirmation.js +1 -1
  70. package/lib/framework/runner-error.js +1 -1
  71. package/lib/framework/runner.js +1 -1
  72. package/lib/framework/schema-export.js +1 -1
  73. package/lib/framework/types.js +1 -1
  74. package/lib/generated/build-info.js +1 -1
  75. package/lib/help.js +1 -1
  76. package/lib/skills/npx-skills-add.js +1 -1
  77. package/lib/skills/runtime-skill-sync.js +1 -1
  78. package/lib/utils/apply-jq-filter.js +1 -1
  79. package/lib/utils/logger.js +1 -1
  80. package/lib/utils/params.js +1 -1
  81. package/lib/utils/platform.js +1 -1
  82. package/lib/utils/update-notice.js +1 -1
  83. package/lib/utils/version.js +1 -1
  84. package/lib/utils/write-cli-side-channel.js +1 -1
  85. package/package.json +1 -1
package/lib/cli.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- (function(_0x4ea181,_0x5ddb11){const _0x583c47=a0_0x107d,_0x546cd0=_0x4ea181();while(!![]){try{const _0x1379a1=-parseInt(_0x583c47(0x153))/0x1+parseInt(_0x583c47(0x14f))/0x2*(-parseInt(_0x583c47(0x137))/0x3)+parseInt(_0x583c47(0x131))/0x4+parseInt(_0x583c47(0x147))/0x5+parseInt(_0x583c47(0x14b))/0x6*(parseInt(_0x583c47(0x149))/0x7)+parseInt(_0x583c47(0x13a))/0x8*(parseInt(_0x583c47(0x150))/0x9)+parseInt(_0x583c47(0x14e))/0xa*(-parseInt(_0x583c47(0x146))/0xb);if(_0x1379a1===_0x5ddb11)break;else _0x546cd0['push'](_0x546cd0['shift']());}catch(_0x56ed2c){_0x546cd0['push'](_0x546cd0['shift']());}}}(a0_0x4af3,0x35117));import{jsx as a0_0x5016cf}from'react/jsx-runtime';import a0_0x47565b from'meow';function a0_0x4af3(){const _0x4d11f3=['ERR_STREAM_DESTROYED','flatMap','cancelled','unknownCommand','defaultCommand','exit','Error:\x20','assign','handler','code','ExitPromptError','547635HVOPii','2040675cMGDjl','definition','582176BtsiRR','log','30XlmLPC','error','write','190yvXQUu','176RHhMtY','9VhXoWo','name','length','293704QGzibq','input','hint','exitCode','original','ERR_USE_AFTER_CLOSE','1715532sewNQm','stderr','\x0aCancelled.\x0a','help','Unexpected\x20error:','flags','2343uxHxKj','message','args','2182848hTTACH'];a0_0x4af3=function(){return _0x4d11f3;};return a0_0x4af3();}import{render}from'ink';function a0_0x107d(_0x55bf51,_0x4204c6){_0x55bf51=_0x55bf51-0x12e;const _0x4af380=a0_0x4af3();let _0x107d68=_0x4af380[_0x55bf51];return _0x107d68;}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{generateDynamicServiceHelp,resolveDynamicServiceCommand}from'./commands/service/dynamic.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_0x47565b(helpText,{'importMeta':import.meta,'flags':buildMeowFlags(),'version':getCliVersionDisplay()});void main()['catch'](handleError);async function main(){try{await run();}catch(_0x564192){handleError(_0x564192);}}async function run(){const _0x2c2a5f=a0_0x107d;let _0x1152b3=cli[_0x2c2a5f(0x154)][0x0],_0xbbce6a=cli[_0x2c2a5f(0x154)][0x1];const _0x42bbc6=cli[_0x2c2a5f(0x136)];try{const {correctFlags:_0xd0957d}=await import('./framework/preparse.js'),_0x5b1b6e=getAllDefinitions()[_0x2c2a5f(0x13c)](_0x4fc038=>_0x4fc038[_0x2c2a5f(0x136)]??[]),{flags:_0x379cc4,corrections:_0x3d4c98}=_0xd0957d(_0x42bbc6,_0x5b1b6e);if(_0x3d4c98[_0x2c2a5f(0x152)]>0x0){for(const _0x5bd9f2 of _0x3d4c98){process['stderr'][_0x2c2a5f(0x14d)]('[preparse]\x20'+_0x5bd9f2[_0x2c2a5f(0x143)]+':\x20--'+_0x5bd9f2[_0x2c2a5f(0x12f)]+'\x20->\x20--'+_0x5bd9f2['corrected']+'\x0a');}Object[_0x2c2a5f(0x142)](_0x42bbc6,_0x379cc4);}}catch{}if(!_0x1152b3){const {waitUntilExit:_0x5edeaa}=render(a0_0x5016cf(Help,{}));await _0x5edeaa();return;}if(!isKnownService(_0x1152b3)){const _0x27271b=resolveDynamicServiceCommand(cli[_0x2c2a5f(0x154)],_0x42bbc6);if(_0x27271b){if(_0x42bbc6[_0x2c2a5f(0x134)]){console[_0x2c2a5f(0x14a)](generateCommandHelp(_0x27271b['definition']));return;}Object[_0x2c2a5f(0x142)](_0x42bbc6,_0x27271b[_0x2c2a5f(0x136)]);const _0x7d77eb=buildConfigFromFlags(_0x42bbc6);await initGlobalEnvironment(_0x7d77eb);const _0x33078e=createPipelineEnv(_0x7d77eb,_0x42bbc6);_0x33078e[_0x2c2a5f(0x139)]=_0x27271b[_0x2c2a5f(0x139)],await runCommand(_0x27271b[_0x2c2a5f(0x148)],_0x33078e);return;}if(_0x42bbc6[_0x2c2a5f(0x134)]){const _0x3ff263=generateDynamicServiceHelp(_0x1152b3);if(_0x3ff263){console[_0x2c2a5f(0x14a)](_0x3ff263);return;}}const {waitUntilExit:_0x5a636f}=render(a0_0x5016cf(Help,{}));await _0x5a636f();return;}const _0x46c038=getServiceEntry(_0x1152b3);if(!_0xbbce6a){if(_0x42bbc6[_0x2c2a5f(0x134)]){console[_0x2c2a5f(0x14a)](generateServiceHelp(_0x1152b3));return;}if(_0x46c038[_0x2c2a5f(0x13f)])_0xbbce6a=_0x46c038[_0x2c2a5f(0x13f)];else{console[_0x2c2a5f(0x14a)](generateServiceHelp(_0x1152b3));return;}}const _0x224537=findDefinition(_0x1152b3,_0xbbce6a);!_0x224537&&(console[_0x2c2a5f(0x14a)](generateServiceHelp(_0x1152b3)),handleError(CliErrors[_0x2c2a5f(0x13e)](_0x1152b3+'\x20'+_0xbbce6a)));if(_0x42bbc6[_0x2c2a5f(0x134)]){console[_0x2c2a5f(0x14a)](generateCommandHelp(_0x224537));return;}const _0xcdb0a5=buildConfigFromFlags(_0x42bbc6);await initGlobalEnvironment(_0xcdb0a5);const _0x4fbb85=createPipelineEnv(_0xcdb0a5,_0x42bbc6);_0x4fbb85[_0x2c2a5f(0x139)]=cli['input']['slice'](0x2),await runCommand(_0x224537,_0x4fbb85);}function handleError(_0x231606){const _0x2a71ba=a0_0x107d;if(_0x231606 instanceof CliError){_0x231606[_0x2a71ba(0x144)]===_0x2a71ba(0x13d)&&(process[_0x2a71ba(0x132)][_0x2a71ba(0x14d)](_0x2a71ba(0x133)),process['exit'](0x0));console[_0x2a71ba(0x14c)](_0x2a71ba(0x141)+_0x231606[_0x2a71ba(0x138)]);if(_0x231606[_0x2a71ba(0x155)])console[_0x2a71ba(0x14c)]('Hint:\x20'+_0x231606[_0x2a71ba(0x155)]);process[_0x2a71ba(0x140)](_0x231606[_0x2a71ba(0x12e)]);}isUserCancellation(_0x231606)&&(process[_0x2a71ba(0x132)]['write'](_0x2a71ba(0x133)),process[_0x2a71ba(0x140)](0x0)),console['error'](_0x2a71ba(0x135),_0x231606),process[_0x2a71ba(0x140)](0x1);}function isUserCancellation(_0x34116d){const _0x48fe54=a0_0x107d;if(!(_0x34116d instanceof Error))return![];if(_0x34116d[_0x48fe54(0x151)]===_0x48fe54(0x145))return!![];if(_0x34116d[_0x48fe54(0x144)]===_0x48fe54(0x130))return!![];if(_0x34116d[_0x48fe54(0x144)]===_0x48fe54(0x13b))return!![];return![];}
2
+ const a0_0x31dc9d=a0_0x594a;(function(_0x56db36,_0xb6316f){const _0x5d3d51=a0_0x594a,_0x1ffd75=_0x56db36();while(!![]){try{const _0x411b7f=-parseInt(_0x5d3d51(0xd0))/0x1*(parseInt(_0x5d3d51(0xc6))/0x2)+parseInt(_0x5d3d51(0xbd))/0x3*(-parseInt(_0x5d3d51(0xc7))/0x4)+parseInt(_0x5d3d51(0xb2))/0x5+parseInt(_0x5d3d51(0xdc))/0x6+-parseInt(_0x5d3d51(0xc5))/0x7*(parseInt(_0x5d3d51(0xce))/0x8)+parseInt(_0x5d3d51(0xd7))/0x9*(-parseInt(_0x5d3d51(0xb8))/0xa)+parseInt(_0x5d3d51(0xcc))/0xb;if(_0x411b7f===_0xb6316f)break;else _0x1ffd75['push'](_0x1ffd75['shift']());}catch(_0x26659f){_0x1ffd75['push'](_0x1ffd75['shift']());}}}(a0_0x3496,0x55e60));import{jsx as a0_0x2b44c2}from'react/jsx-runtime';import a0_0x2e0595 from'meow';import{render}from'ink';import{Help}from'./help.js';import{CliError,CliErrors}from'./errors.js';import{buildConfigFromFlags,initGlobalEnvironment}from'./context.js';function a0_0x3496(){const _0x25022c=['exit','input','log','code','./framework/preparse.js','30760tOrHtR','cancelled','definition','stderr','error','114198mSsxBS','exitCode','ERR_STREAM_DESTROYED','unknownCommand','flags','defaultCommand','handler','\x0aCancelled.\x0a','8939qlfPbN','17086jbpjUm','32TsXsre','slice','message','catch','ExitPromptError','9964680GHTLSG','args','2584JxHlUQ','Error:\x20','1MhiKHh','corrected','\x20->\x20--','write','[preparse]\x20','assign','original','1647xSZcMW','help',':\x20--','hint','Unexpected\x20error:','3685776JrTnuZ','600570slmgxb'];a0_0x3496=function(){return _0x25022c;};return a0_0x3496();}import{isKnownService,getServiceEntry,findDefinition,getAllDefinitions}from'./commands/registry.js';import{generateDynamicServiceHelp,resolveDynamicServiceCommand}from'./commands/service/dynamic.js';import{runCommand,createPipelineEnv}from'./framework/runner.js';function a0_0x594a(_0x222f4d,_0x367bd9){_0x222f4d=_0x222f4d-0xb2;const _0x34963f=a0_0x3496();let _0x594a7c=_0x34963f[_0x222f4d];return _0x594a7c;}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_0x2e0595(helpText,{'importMeta':import.meta,'flags':buildMeowFlags(),'version':getCliVersionDisplay()});void main()[a0_0x31dc9d(0xca)](handleError);async function main(){try{await run();}catch(_0x9d23b0){handleError(_0x9d23b0);}}async function run(){const _0x588ecc=a0_0x31dc9d;let _0x53005e=cli[_0x588ecc(0xb4)][0x0],_0x24cc2c=cli[_0x588ecc(0xb4)][0x1];const _0x2541c5=cli[_0x588ecc(0xc1)];try{const {correctFlags:_0x16e013}=await import(_0x588ecc(0xb7)),_0x4ec095=getAllDefinitions()['flatMap'](_0x5db88a=>_0x5db88a[_0x588ecc(0xc1)]??[]),{flags:_0xf4f12a,corrections:_0x2e9647}=_0x16e013(_0x2541c5,_0x4ec095);if(_0x2e9647['length']>0x0){for(const _0x4c67ea of _0x2e9647){process[_0x588ecc(0xbb)][_0x588ecc(0xd3)](_0x588ecc(0xd4)+_0x4c67ea[_0x588ecc(0xc3)]+_0x588ecc(0xd9)+_0x4c67ea[_0x588ecc(0xd6)]+_0x588ecc(0xd2)+_0x4c67ea[_0x588ecc(0xd1)]+'\x0a');}Object[_0x588ecc(0xd5)](_0x2541c5,_0xf4f12a);}}catch{}if(!_0x53005e){const {waitUntilExit:_0x16081d}=render(a0_0x2b44c2(Help,{}));await _0x16081d();return;}if(!isKnownService(_0x53005e)){const _0x45aa29=resolveDynamicServiceCommand(cli[_0x588ecc(0xb4)],_0x2541c5);if(_0x45aa29){if(_0x2541c5[_0x588ecc(0xd8)]){console[_0x588ecc(0xb5)](generateCommandHelp(_0x45aa29[_0x588ecc(0xba)]));return;}Object[_0x588ecc(0xd5)](_0x2541c5,_0x45aa29[_0x588ecc(0xc1)]);const _0x2859e7=buildConfigFromFlags(_0x2541c5);await initGlobalEnvironment(_0x2859e7);const _0x2341d6=createPipelineEnv(_0x2859e7,_0x2541c5);_0x2341d6[_0x588ecc(0xcd)]=_0x45aa29[_0x588ecc(0xcd)],await runCommand(_0x45aa29[_0x588ecc(0xba)],_0x2341d6);return;}if(_0x2541c5['help']){const _0x185e3a=generateDynamicServiceHelp(_0x53005e);if(_0x185e3a){console[_0x588ecc(0xb5)](_0x185e3a);return;}}const {waitUntilExit:_0x53464f}=render(a0_0x2b44c2(Help,{}));await _0x53464f();return;}const _0x5bb912=getServiceEntry(_0x53005e);if(!_0x24cc2c){if(_0x2541c5[_0x588ecc(0xd8)]){console[_0x588ecc(0xb5)](generateServiceHelp(_0x53005e));return;}if(_0x5bb912[_0x588ecc(0xc2)])_0x24cc2c=_0x5bb912[_0x588ecc(0xc2)];else{console[_0x588ecc(0xb5)](generateServiceHelp(_0x53005e));return;}}const _0x491366=findDefinition(_0x53005e,_0x24cc2c);!_0x491366&&(console[_0x588ecc(0xb5)](generateServiceHelp(_0x53005e)),handleError(CliErrors[_0x588ecc(0xc0)](_0x53005e+'\x20'+_0x24cc2c)));if(_0x2541c5['help']){console[_0x588ecc(0xb5)](generateCommandHelp(_0x491366));return;}const _0x40f700=buildConfigFromFlags(_0x2541c5);await initGlobalEnvironment(_0x40f700);const _0x5a868c=createPipelineEnv(_0x40f700,_0x2541c5);_0x5a868c['args']=cli[_0x588ecc(0xb4)][_0x588ecc(0xc8)](0x2),await runCommand(_0x491366,_0x5a868c);}function handleError(_0x39664c){const _0x1692e7=a0_0x31dc9d;if(_0x39664c instanceof CliError){_0x39664c[_0x1692e7(0xb6)]===_0x1692e7(0xb9)&&(process[_0x1692e7(0xbb)][_0x1692e7(0xd3)](_0x1692e7(0xc4)),process[_0x1692e7(0xb3)](0x0));console[_0x1692e7(0xbc)](_0x1692e7(0xcf)+_0x39664c[_0x1692e7(0xc9)]);if(_0x39664c[_0x1692e7(0xda)])console[_0x1692e7(0xbc)]('Hint:\x20'+_0x39664c[_0x1692e7(0xda)]);process[_0x1692e7(0xb3)](_0x39664c[_0x1692e7(0xbe)]);}isUserCancellation(_0x39664c)&&(process[_0x1692e7(0xbb)][_0x1692e7(0xd3)]('\x0aCancelled.\x0a'),process[_0x1692e7(0xb3)](0x0)),console[_0x1692e7(0xbc)](_0x1692e7(0xdb),_0x39664c),process['exit'](0x1);}function isUserCancellation(_0x35ba8e){const _0x31ca4e=a0_0x31dc9d;if(!(_0x35ba8e instanceof Error))return![];if(_0x35ba8e['name']===_0x31ca4e(0xcb))return!![];if(_0x35ba8e[_0x31ca4e(0xb6)]==='ERR_USE_AFTER_CLOSE')return!![];if(_0x35ba8e[_0x31ca4e(0xb6)]===_0x31ca4e(0xbf))return!![];return![];}
@@ -1 +1 @@
1
- const a1_0x5e65f7=a1_0x9585;function a1_0x418e(){const _0x5f5b47=['lovrabet\x20data\x20create\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22name\x22:\x22demo\x22}\x27','5066130tshNdh','code','Use\x20`having`\x20only\x20for\x20post-aggregation\x20filters.','3363590QEihiA','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:5}\x27','`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','/api/{appCode}/{datasetCode}/aggregate','32-character\x20dataset\x20code','toLowerCase','需要携带\x20where、orderBy、分页等条件读取业务数据时使用','分页获取数据集列表','summary','Filter\x20docs\x20by\x20category,\x20for\x20example\x20dataset','paging.totalCount\x20gives\x20total\x20rows','/api/dataset/getOneByCode?code={datasetCode}','keyword','path','执行自定义\x20SQL','已经知道记录\x20id,需要按数据集读取单条业务数据时使用','custom_sql','已经确认目标\x20sqlCode\x20存在,并需要实际执行该自定义\x20SQL\x20时使用','Filter\x20dataset\x20data','{\x22appCode\x22:\x22app-aa63b188\x22,\x22sqlCode\x22:\x22xxxxxxxx-xxxxxxxx\x22,\x22params\x22:{}}','获取数据集详情','read','Use\x20`where`,\x20`select`,\x20`orderBy`,\x20`currentPage`,\x20and\x20`pageSize`\x20to\x20inspect\x20live\x20data\x20shape.','whenToUse','dataset_data_create','/api/{appCode}/{datasetCode}/create','1043RAMTyj','42437Tphzul','If\x20SDK\x20usage\x20is\x20needed,\x20follow\x20with\x20`lovrabet\x20dataset\x20sdk-doc\x20--code\x20<datasetCode>`.','##\x20Filter\x20dataset\x20data','lovrabet\x20sql\x20exec\x20--sqlcode\x20<sqlCode>\x20--params\x20\x27{}\x27','{\x22appCode\x22:\x22app-aa63b188\x22,\x22currentPage\x22:1,\x22pageSize\x22:100}','##\x20Dataset\x20detail','{\x22fieldName\x22:\x22value\x22}','map','Show\x20runtime\x20API\x20documentation\x20by\x20code','/api/{appCode}/{datasetCode}/getOne','validation','/api/endpoint/{appCode}/functions','CLI\x20users\x20should\x20prefer\x20`lovrabet\x20dataset\x20list`\x20for\x20this\x20workflow.','dataset','str','创建数据','lovrabet\x20dataset\x20list\x20--appcode\x20<appCode>\x20--format\x20compress','result\x20rows\x20contain\x20aggregate\x20aliases','operations\x20describes\x20runtime\x20APIs','需要按数据集\x20code\x20获取字段、表信息或操作定义时使用','API\x20doc\x20code,\x20for\x20example\x20dataset_list','需要向指定数据集新增一条业务数据时使用','List\x20available\x20runtime\x20API\x20documentation\x20entries','Endpoint\x20function\x20name','dataset_data_filter','api-doc','##\x20Execute\x20BF\x20endpoint\x20function\x0a\x0aExecute\x20a\x20known\x20endpoint\x20script.','##\x20Get\x20one\x20dataset\x20record\x0a\x0aRead\x20one\x20record\x20by\x20id.','POST','/api/dataset/get-dataset-list-by-app-code','trim','List\x20datasets','/api/custom/executeSql','lovrabet\x20bff\x20exec\x20--name\x20<functionName>\x20--params\x20\x27{}\x27','##\x20Create\x20dataset\x20record\x0a\x0aCreate\x20one\x20data\x20record\x20in\x20a\x20dataset.','Aggregate\x20dataset\x20data','8zjUmJN','scriptName','{\x22id\x22:123}','Returns\x20script\x20business\x20payload','26Vvyurc','GET','This\x20is\x20a\x20write\x20operation;\x20use\x20dry-run\x20when\x20available\x20and\x20safe\x20fixtures\x20for\x20smoke\x20tests.','4226724LZxFqy','Returns\x20one\x20matching\x20business\x20record','Inspect\x20field\x20names\x20and\x20operation\x20metadata\x20for\x20a\x20known\x20dataset\x20code.','dataset_data_get_one','Execute\x20BF\x20endpoint\x20function','{\x22where\x22:{},\x22currentPage\x22:1,\x22pageSize\x22:20}','bf_function_list','##\x20List\x20datasets','dataset_detail','tableData\x20contains\x20dataset\x20id/code/name','{\x22aggregate\x22:[{\x22column\x22:\x20\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[]}','where\x20filters\x20before\x20aggregation','title','##\x20Aggregate\x20dataset\x20data','method','Use\x20read-only\x20data\x20commands\x20before\x20writing\x20Artifacts\x20that\x20display\x20real\x20data.','None','Current\x20app\x20code','detail','custom_sql_execute','appCode','/api/endpoint/{appCode}/{scriptName}','List\x20BF\x20endpoint\x20functions','datasetCode','6241468hfGZXB','Dataset\x20detail','16137738XWwQvp','55068nbCakG','lovrabet\x20data\x20aggregate\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}]}\x27','string','Use\x20this\x20API\x20or\x20`lovrabet\x20dataset\x20list`\x20to\x20discover\x20available\x20dataset\x20codes\x20before\x20reading\x20data.','需要按\x20groupBy\x20分组并做\x20count、sum、avg、max、min\x20等聚合统计时使用','join','category','需要按\x20appCode\x20分页获取运行态数据集列表,并优先收敛可用\x20datasetCode\x20时使用'];a1_0x418e=function(){return _0x5f5b47;};return a1_0x418e();}(function(_0x2d320d,_0x18d6ac){const _0x31a6bf=a1_0x9585,_0x388395=_0x2d320d();while(!![]){try{const _0x1ad81c=-parseInt(_0x31a6bf(0x23c))/0x1*(-parseInt(_0x31a6bf(0x1f7))/0x2)+parseInt(_0x31a6bf(0x1fa))/0x3+-parseInt(_0x31a6bf(0x212))/0x4+parseInt(_0x31a6bf(0x221))/0x5+parseInt(_0x31a6bf(0x215))/0x6*(-parseInt(_0x31a6bf(0x23b))/0x7)+parseInt(_0x31a6bf(0x1f3))/0x8*(parseInt(_0x31a6bf(0x214))/0x9)+-parseInt(_0x31a6bf(0x21e))/0xa;if(_0x1ad81c===_0x18d6ac)break;else _0x388395['push'](_0x388395['shift']());}catch(_0x88d275){_0x388395['push'](_0x388395['shift']());}}}(a1_0x418e,0xf228f));function a1_0x9585(_0x10db02,_0x36e4ce){_0x10db02=_0x10db02-0x1db;const _0x418e54=a1_0x418e();let _0x95851d=_0x418e54[_0x10db02];return _0x95851d;}import{CliErrors}from'../../errors.js';const CATEGORY_FLAG={'name':a1_0x5e65f7(0x21b),'type':a1_0x5e65f7(0x217),'description':a1_0x5e65f7(0x22a)},KEYWORD_FLAG={'name':a1_0x5e65f7(0x22d),'type':a1_0x5e65f7(0x217),'description':'Search\x20docs\x20by\x20code,\x20summary,\x20path,\x20or\x20usage\x20text'},DOC_CODE_FLAG={'name':a1_0x5e65f7(0x21f),'type':a1_0x5e65f7(0x217),'required':!![],'description':a1_0x5e65f7(0x1e3)},DOCS=[{'code':'dataset_list','category':a1_0x5e65f7(0x1dc),'title':a1_0x5e65f7(0x1ee),'method':a1_0x5e65f7(0x1eb),'path':a1_0x5e65f7(0x1ec),'summary':a1_0x5e65f7(0x228),'whenToUse':a1_0x5e65f7(0x21c),'pathParams':[],'queryParams':[],'bodySchema':a1_0x5e65f7(0x240),'responseHighlights':[a1_0x5e65f7(0x203),a1_0x5e65f7(0x22b)],'examples':[a1_0x5e65f7(0x1df)],'notes':[a1_0x5e65f7(0x1db)],'markdown':[a1_0x5e65f7(0x201),'',a1_0x5e65f7(0x218)][a1_0x5e65f7(0x21a)]('\x0a')},{'code':a1_0x5e65f7(0x202),'category':a1_0x5e65f7(0x1dc),'title':a1_0x5e65f7(0x213),'method':a1_0x5e65f7(0x1f8),'path':a1_0x5e65f7(0x22c),'summary':a1_0x5e65f7(0x235),'whenToUse':a1_0x5e65f7(0x1e2),'pathParams':[],'queryParams':[{'name':a1_0x5e65f7(0x21f),'description':a1_0x5e65f7(0x225)}],'bodySchema':a1_0x5e65f7(0x20a),'responseHighlights':['fields/properties\x20describe\x20data\x20shape',a1_0x5e65f7(0x1e1)],'examples':['lovrabet\x20dataset\x20detail\x20--code\x20<datasetCode>\x20--appcode\x20<appCode>'],'notes':[a1_0x5e65f7(0x23d)],'markdown':[a1_0x5e65f7(0x241),'',a1_0x5e65f7(0x1fc)]['join']('\x0a')},{'code':a1_0x5e65f7(0x1e7),'category':a1_0x5e65f7(0x1dc),'title':a1_0x5e65f7(0x233),'method':'POST','path':'/api/{appCode}/{datasetCode}/filter','summary':'条件过滤查询数据','whenToUse':a1_0x5e65f7(0x227),'pathParams':[{'name':a1_0x5e65f7(0x20e),'description':a1_0x5e65f7(0x20b)},{'name':a1_0x5e65f7(0x211),'description':'32-character\x20dataset\x20code'}],'queryParams':[],'bodySchema':a1_0x5e65f7(0x1ff),'responseHighlights':['tableData\x20contains\x20records','paging\x20contains\x20pagination'],'examples':[a1_0x5e65f7(0x222)],'notes':[a1_0x5e65f7(0x209)],'markdown':[a1_0x5e65f7(0x23e),'',a1_0x5e65f7(0x237)][a1_0x5e65f7(0x21a)]('\x0a')},{'code':'dataset_data_aggregate','category':a1_0x5e65f7(0x1dc),'title':a1_0x5e65f7(0x1f2),'method':a1_0x5e65f7(0x1eb),'path':a1_0x5e65f7(0x224),'summary':'聚合查询数据集数据','whenToUse':a1_0x5e65f7(0x219),'pathParams':[{'name':a1_0x5e65f7(0x20e),'description':a1_0x5e65f7(0x20b)},{'name':a1_0x5e65f7(0x211),'description':a1_0x5e65f7(0x225)}],'queryParams':[],'bodySchema':a1_0x5e65f7(0x204),'responseHighlights':[a1_0x5e65f7(0x1e0),a1_0x5e65f7(0x205)],'examples':[a1_0x5e65f7(0x216)],'notes':[a1_0x5e65f7(0x220),a1_0x5e65f7(0x223)],'markdown':[a1_0x5e65f7(0x207),'','Aggregate\x20supports\x20COUNT,\x20SUM,\x20AVG,\x20MAX,\x20and\x20MIN\x20definitions\x20in\x20the\x20`aggregate`\x20array.'][a1_0x5e65f7(0x21a)]('\x0a')},{'code':a1_0x5e65f7(0x1fd),'category':a1_0x5e65f7(0x1dc),'title':'Get\x20one\x20dataset\x20record','method':'POST','path':a1_0x5e65f7(0x245),'summary':'查询单条数据','whenToUse':a1_0x5e65f7(0x230),'pathParams':[{'name':a1_0x5e65f7(0x20e),'description':a1_0x5e65f7(0x20b)},{'name':a1_0x5e65f7(0x211),'description':a1_0x5e65f7(0x225)}],'queryParams':[],'bodySchema':a1_0x5e65f7(0x1f5),'responseHighlights':[a1_0x5e65f7(0x1fb)],'examples':['lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27'],'notes':['Prefer\x20`filter`\x20when\x20the\x20record\x20id\x20is\x20unknown.'],'markdown':a1_0x5e65f7(0x1ea)},{'code':a1_0x5e65f7(0x239),'category':a1_0x5e65f7(0x1dc),'title':'Create\x20dataset\x20record','method':a1_0x5e65f7(0x1eb),'path':a1_0x5e65f7(0x23a),'summary':a1_0x5e65f7(0x1de),'whenToUse':a1_0x5e65f7(0x1e4),'pathParams':[{'name':a1_0x5e65f7(0x20e),'description':a1_0x5e65f7(0x20b)},{'name':a1_0x5e65f7(0x211),'description':a1_0x5e65f7(0x225)}],'queryParams':[],'bodySchema':a1_0x5e65f7(0x242),'responseHighlights':['Returns\x20the\x20created\x20record\x20or\x20backend\x20operation\x20result'],'examples':[a1_0x5e65f7(0x21d)],'notes':[a1_0x5e65f7(0x1f9)],'markdown':a1_0x5e65f7(0x1f1)},{'code':a1_0x5e65f7(0x200),'category':'bf','title':a1_0x5e65f7(0x210),'method':a1_0x5e65f7(0x1f8),'path':a1_0x5e65f7(0x247),'summary':'获取应用下可调用的\x20BF\x20函数列表','whenToUse':'需要先确认当前应用有哪些可执行的\x20BF/ENDPOINT\x20函数,以及收敛可用\x20scriptName\x20时使用','pathParams':[{'name':a1_0x5e65f7(0x20e),'description':a1_0x5e65f7(0x20b)}],'queryParams':[],'bodySchema':a1_0x5e65f7(0x20a),'responseHighlights':['Returns\x20endpoint\x20functionName/id/description'],'examples':['lovrabet\x20bff\x20detail\x20--id\x20<scriptId>\x20--appcode\x20<appCode>'],'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':'bf_execute','category':'bf','title':a1_0x5e65f7(0x1fe),'method':a1_0x5e65f7(0x1eb),'path':a1_0x5e65f7(0x20f),'summary':'执行指定\x20BF\x20函数','whenToUse':'已经确认目标\x20BF\x20的\x20scriptName,且需要实际调用该\x20ENDPOINT\x20脚本完成业务操作时使用','pathParams':[{'name':'appCode','description':a1_0x5e65f7(0x20b)},{'name':a1_0x5e65f7(0x1f4),'description':a1_0x5e65f7(0x1e6)}],'queryParams':[],'bodySchema':'{\x22param\x22:\x22value\x22}','responseHighlights':[a1_0x5e65f7(0x1f6)],'examples':[a1_0x5e65f7(0x1f0)],'notes':['Script\x20behavior\x20may\x20have\x20side\x20effects;\x20inspect\x20detail\x20first.'],'markdown':a1_0x5e65f7(0x1e9)},{'code':a1_0x5e65f7(0x20d),'category':a1_0x5e65f7(0x231),'title':'Execute\x20custom\x20SQL','method':a1_0x5e65f7(0x1eb),'path':a1_0x5e65f7(0x1ef),'summary':a1_0x5e65f7(0x22f),'whenToUse':a1_0x5e65f7(0x232),'pathParams':[],'queryParams':[],'bodySchema':a1_0x5e65f7(0x234),'responseHighlights':['Returns\x20SQL\x20execution\x20payload'],'examples':[a1_0x5e65f7(0x23f)],'notes':['Use\x20`lovrabet\x20sql\x20detail`\x20before\x20execution.'],'markdown':'##\x20Execute\x20custom\x20SQL\x0a\x0aExecute\x20a\x20configured\x20SQL\x20script\x20by\x20sqlCode.'}];function entrySummary(_0x402dd4){const _0x399ab3=a1_0x5e65f7;return{'code':_0x402dd4[_0x399ab3(0x21f)],'category':_0x402dd4['category'],'method':_0x402dd4[_0x399ab3(0x208)],'path':_0x402dd4[_0x399ab3(0x22e)],'summary':_0x402dd4[_0x399ab3(0x229)],'whenToUse':_0x402dd4[_0x399ab3(0x238)]};}export function listApiDocEntries(_0x2efd07={}){const _0x1ebcc1=a1_0x5e65f7,_0x428596=String(_0x2efd07[_0x1ebcc1(0x21b)]||'')['trim'](),_0x283496=String(_0x2efd07['keyword']||'')[_0x1ebcc1(0x1ed)]()[_0x1ebcc1(0x226)]();return DOCS['filter'](_0x10e4f8=>{const _0x476334=_0x1ebcc1;if(_0x428596&&_0x10e4f8[_0x476334(0x21b)]!==_0x428596)return![];if(!_0x283496)return!![];return[_0x10e4f8[_0x476334(0x21f)],_0x10e4f8[_0x476334(0x21b)],_0x10e4f8['method'],_0x10e4f8['path'],_0x10e4f8['summary'],_0x10e4f8['whenToUse'],_0x10e4f8[_0x476334(0x206)]][_0x476334(0x21a)]('\x20')[_0x476334(0x226)]()['includes'](_0x283496);})[_0x1ebcc1(0x243)](entrySummary);}export function getApiDocDetail(_0x194d0d){const _0x3eb0dc=a1_0x5e65f7,_0x11f1bf=DOCS['find'](_0x37f6c2=>_0x37f6c2[_0x3eb0dc(0x21f)]===_0x194d0d);if(!_0x11f1bf)throw CliErrors[_0x3eb0dc(0x246)]('API\x20doc\x20code\x20not\x20found:\x20'+_0x194d0d);return{..._0x11f1bf};}const apiDocList={'service':a1_0x5e65f7(0x1e8),'command':'list','description':a1_0x5e65f7(0x1e5),'risk':a1_0x5e65f7(0x236),'requiresAppCode':![],'flags':[CATEGORY_FLAG,KEYWORD_FLAG],async 'execute'(_0x51c7e6){const _0x13ab31=a1_0x5e65f7,_0x3c06b1=listApiDocEntries({'category':_0x51c7e6[_0x13ab31(0x1dd)](_0x13ab31(0x21b)),'keyword':_0x51c7e6['str'](_0x13ab31(0x22d))});return{'ok':!![],'data':{'total':_0x3c06b1['length'],'items':_0x3c06b1}};}},apiDocDetail={'service':a1_0x5e65f7(0x1e8),'command':a1_0x5e65f7(0x20c),'description':a1_0x5e65f7(0x244),'risk':'read','requiresAppCode':![],'flags':[DOC_CODE_FLAG],async 'execute'(_0x2c0c71){const _0x522566=a1_0x5e65f7;return{'ok':!![],'data':getApiDocDetail(_0x2c0c71[_0x522566(0x1dd)](_0x522566(0x21f)))};}};export const apiDocDefinitions=[apiDocList,apiDocDetail];
1
+ const a1_0x37296f=a1_0x1494;(function(_0x4c4c41,_0x33329b){const _0x1870c4=a1_0x1494,_0x2518be=_0x4c4c41();while(!![]){try{const _0x35011a=-parseInt(_0x1870c4(0x20d))/0x1+-parseInt(_0x1870c4(0x204))/0x2+-parseInt(_0x1870c4(0x225))/0x3*(-parseInt(_0x1870c4(0x20f))/0x4)+parseInt(_0x1870c4(0x1ea))/0x5+-parseInt(_0x1870c4(0x23c))/0x6*(-parseInt(_0x1870c4(0x212))/0x7)+parseInt(_0x1870c4(0x200))/0x8*(parseInt(_0x1870c4(0x203))/0x9)+-parseInt(_0x1870c4(0x1eb))/0xa;if(_0x35011a===_0x33329b)break;else _0x2518be['push'](_0x2518be['shift']());}catch(_0x36baf3){_0x2518be['push'](_0x2518be['shift']());}}}(a1_0x2197,0xa11ea));import{CliErrors}from'../../errors.js';const CATEGORY_FLAG={'name':a1_0x37296f(0x22d),'type':'string','description':a1_0x37296f(0x1f3)},KEYWORD_FLAG={'name':a1_0x37296f(0x1f2),'type':'string','description':a1_0x37296f(0x22b)},DOC_CODE_FLAG={'name':a1_0x37296f(0x1fe),'type':a1_0x37296f(0x232),'required':!![],'description':a1_0x37296f(0x231)},DOCS=[{'code':a1_0x37296f(0x20e),'category':a1_0x37296f(0x1f4),'title':a1_0x37296f(0x224),'method':a1_0x37296f(0x1d6),'path':a1_0x37296f(0x22f),'summary':'分页获取数据集列表','whenToUse':a1_0x37296f(0x1ce),'pathParams':[],'queryParams':[],'bodySchema':a1_0x37296f(0x1fb),'responseHighlights':[a1_0x37296f(0x235),'paging.totalCount\x20gives\x20total\x20rows'],'examples':[a1_0x37296f(0x1c6)],'notes':[a1_0x37296f(0x21c)],'markdown':[a1_0x37296f(0x221),'',a1_0x37296f(0x1dd)]['join']('\x0a')},{'code':a1_0x37296f(0x213),'category':'dataset','title':'Dataset\x20detail','method':a1_0x37296f(0x214),'path':a1_0x37296f(0x1de),'summary':a1_0x37296f(0x21a),'whenToUse':'需要按数据集\x20code\x20获取字段、表信息或操作定义时使用','pathParams':[],'queryParams':[{'name':a1_0x37296f(0x1fe),'description':a1_0x37296f(0x1dc)}],'bodySchema':a1_0x37296f(0x1cf),'responseHighlights':[a1_0x37296f(0x233),a1_0x37296f(0x1d0)],'examples':[a1_0x37296f(0x209)],'notes':['If\x20SDK\x20usage\x20is\x20needed,\x20follow\x20with\x20`lovrabet\x20dataset\x20sdk-doc\x20--code\x20<datasetCode>`.'],'markdown':[a1_0x37296f(0x1d9),'',a1_0x37296f(0x21b)][a1_0x37296f(0x21e)]('\x0a')},{'code':a1_0x37296f(0x1e7),'category':a1_0x37296f(0x1f4),'title':a1_0x37296f(0x22c),'method':a1_0x37296f(0x1d6),'path':a1_0x37296f(0x239),'summary':'条件过滤查询数据','whenToUse':a1_0x37296f(0x227),'pathParams':[{'name':a1_0x37296f(0x1e2),'description':'Current\x20app\x20code'},{'name':'datasetCode','description':a1_0x37296f(0x1dc)}],'queryParams':[],'bodySchema':a1_0x37296f(0x1cd),'responseHighlights':[a1_0x37296f(0x218),'paging\x20contains\x20pagination'],'examples':[a1_0x37296f(0x1e6)],'notes':[a1_0x37296f(0x217)],'markdown':[a1_0x37296f(0x201),'',a1_0x37296f(0x1d8)][a1_0x37296f(0x21e)]('\x0a')},{'code':'dataset_data_aggregate','category':a1_0x37296f(0x1f4),'title':a1_0x37296f(0x210),'method':a1_0x37296f(0x1d6),'path':'/api/{appCode}/{datasetCode}/aggregate','summary':a1_0x37296f(0x1f7),'whenToUse':a1_0x37296f(0x1f9),'pathParams':[{'name':a1_0x37296f(0x1e2),'description':a1_0x37296f(0x206)},{'name':a1_0x37296f(0x1e0),'description':a1_0x37296f(0x1dc)}],'queryParams':[],'bodySchema':a1_0x37296f(0x1c9),'responseHighlights':[a1_0x37296f(0x1cb),a1_0x37296f(0x211)],'examples':['lovrabet\x20data\x20aggregate\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}]}\x27'],'notes':[a1_0x37296f(0x1d7),'`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.'],'markdown':[a1_0x37296f(0x1ee),'',a1_0x37296f(0x1f0)][a1_0x37296f(0x21e)]('\x0a')},{'code':a1_0x37296f(0x1fc),'category':'dataset','title':'Get\x20one\x20dataset\x20record','method':a1_0x37296f(0x1d6),'path':a1_0x37296f(0x215),'summary':a1_0x37296f(0x1e1),'whenToUse':a1_0x37296f(0x1ff),'pathParams':[{'name':a1_0x37296f(0x1e2),'description':'Current\x20app\x20code'},{'name':'datasetCode','description':a1_0x37296f(0x1dc)}],'queryParams':[],'bodySchema':a1_0x37296f(0x222),'responseHighlights':[a1_0x37296f(0x219)],'examples':[a1_0x37296f(0x220)],'notes':['Prefer\x20`filter`\x20when\x20the\x20record\x20id\x20is\x20unknown.'],'markdown':a1_0x37296f(0x1d3)},{'code':'dataset_data_create','category':'dataset','title':a1_0x37296f(0x1d2),'method':'POST','path':a1_0x37296f(0x1f5),'summary':a1_0x37296f(0x230),'whenToUse':a1_0x37296f(0x1f8),'pathParams':[{'name':a1_0x37296f(0x1e2),'description':a1_0x37296f(0x206)},{'name':'datasetCode','description':a1_0x37296f(0x1dc)}],'queryParams':[],'bodySchema':a1_0x37296f(0x1f6),'responseHighlights':[a1_0x37296f(0x1e9)],'examples':[a1_0x37296f(0x1e8)],'notes':[a1_0x37296f(0x1ef)],'markdown':a1_0x37296f(0x238)},{'code':a1_0x37296f(0x1e5),'category':'bf','title':a1_0x37296f(0x22a),'method':a1_0x37296f(0x214),'path':'/api/endpoint/{appCode}/functions','summary':a1_0x37296f(0x223),'whenToUse':a1_0x37296f(0x228),'pathParams':[{'name':'appCode','description':'Current\x20app\x20code'}],'queryParams':[],'bodySchema':a1_0x37296f(0x1cf),'responseHighlights':[a1_0x37296f(0x1da)],'examples':[a1_0x37296f(0x21f)],'notes':['CLI\x20has\x20typed\x20`bff\x20detail`\x20and\x20`bff\x20exec`\x20commands\x20for\x20endpoint\x20scripts.'],'markdown':a1_0x37296f(0x216)},{'code':a1_0x37296f(0x205),'category':'bf','title':a1_0x37296f(0x1df),'method':a1_0x37296f(0x1d6),'path':a1_0x37296f(0x237),'summary':'执行指定\x20BF\x20函数','whenToUse':'已经确认目标\x20BF\x20的\x20scriptName,且需要实际调用该\x20ENDPOINT\x20脚本完成业务操作时使用','pathParams':[{'name':a1_0x37296f(0x1e2),'description':'Current\x20app\x20code'},{'name':a1_0x37296f(0x23a),'description':a1_0x37296f(0x1d5)}],'queryParams':[],'bodySchema':'{\x22param\x22:\x22value\x22}','responseHighlights':[a1_0x37296f(0x1c8)],'examples':[a1_0x37296f(0x21d)],'notes':[a1_0x37296f(0x1ec)],'markdown':'##\x20Execute\x20BF\x20endpoint\x20function\x0a\x0aExecute\x20a\x20known\x20endpoint\x20script.'},{'code':a1_0x37296f(0x229),'category':'custom_sql','title':a1_0x37296f(0x20c),'method':a1_0x37296f(0x1d6),'path':a1_0x37296f(0x236),'summary':'执行自定义\x20SQL','whenToUse':a1_0x37296f(0x20a),'pathParams':[],'queryParams':[],'bodySchema':'{\x22appCode\x22:\x22app-aa63b188\x22,\x22sqlCode\x22:\x22xxxxxxxx-xxxxxxxx\x22,\x22params\x22:{}}','responseHighlights':[a1_0x37296f(0x1ed)],'examples':[a1_0x37296f(0x23b)],'notes':[a1_0x37296f(0x202)],'markdown':a1_0x37296f(0x1c7)}];function entrySummary(_0x5058e8){const _0x4d31b8=a1_0x37296f;return{'code':_0x5058e8[_0x4d31b8(0x1fe)],'category':_0x5058e8[_0x4d31b8(0x22d)],'method':_0x5058e8[_0x4d31b8(0x1e3)],'path':_0x5058e8[_0x4d31b8(0x23d)],'summary':_0x5058e8[_0x4d31b8(0x1c5)],'whenToUse':_0x5058e8[_0x4d31b8(0x234)]};}export function listApiDocEntries(_0x2760ba={}){const _0x174f89=a1_0x37296f,_0x44a2fb=String(_0x2760ba[_0x174f89(0x22d)]||'')[_0x174f89(0x1ca)](),_0x5981f6=String(_0x2760ba[_0x174f89(0x1f2)]||'')[_0x174f89(0x1ca)]()[_0x174f89(0x226)]();return DOCS[_0x174f89(0x1fa)](_0x1b9525=>{const _0x43456c=_0x174f89;if(_0x44a2fb&&_0x1b9525['category']!==_0x44a2fb)return![];if(!_0x5981f6)return!![];return[_0x1b9525[_0x43456c(0x1fe)],_0x1b9525[_0x43456c(0x22d)],_0x1b9525['method'],_0x1b9525[_0x43456c(0x23d)],_0x1b9525['summary'],_0x1b9525[_0x43456c(0x234)],_0x1b9525[_0x43456c(0x1db)]][_0x43456c(0x21e)]('\x20')[_0x43456c(0x226)]()['includes'](_0x5981f6);})[_0x174f89(0x207)](entrySummary);}export function getApiDocDetail(_0x2086b7){const _0x390caf=a1_0x37296f,_0x4f7c3f=DOCS['find'](_0x302965=>_0x302965[_0x390caf(0x1fe)]===_0x2086b7);if(!_0x4f7c3f)throw CliErrors[_0x390caf(0x1cc)](_0x390caf(0x1e4)+_0x2086b7);return{..._0x4f7c3f};}const apiDocList={'service':a1_0x37296f(0x208),'command':a1_0x37296f(0x1fd),'description':'List\x20available\x20runtime\x20API\x20documentation\x20entries','risk':a1_0x37296f(0x20b),'requiresAppCode':![],'flags':[CATEGORY_FLAG,KEYWORD_FLAG],async 'execute'(_0x1955cb){const _0x5178c9=a1_0x37296f,_0x249fdf=listApiDocEntries({'category':_0x1955cb[_0x5178c9(0x1f1)](_0x5178c9(0x22d)),'keyword':_0x1955cb['str'](_0x5178c9(0x1f2))});return{'ok':!![],'data':{'total':_0x249fdf[_0x5178c9(0x1d4)],'items':_0x249fdf}};}},apiDocDetail={'service':a1_0x37296f(0x208),'command':a1_0x37296f(0x22e),'description':a1_0x37296f(0x1d1),'risk':a1_0x37296f(0x20b),'requiresAppCode':![],'flags':[DOC_CODE_FLAG],async 'execute'(_0xe406fd){const _0x4a7b55=a1_0x37296f;return{'ok':!![],'data':getApiDocDetail(_0xe406fd[_0x4a7b55(0x1f1)]('code'))};}};export const apiDocDefinitions=[apiDocList,apiDocDetail];function a1_0x1494(_0xb0666a,_0x5ef1a5){_0xb0666a=_0xb0666a-0x1c5;const _0x2197e5=a1_0x2197();let _0x1494bf=_0x2197e5[_0xb0666a];return _0x1494bf;}function a1_0x2197(){const _0x270c81=['需要按\x20groupBy\x20分组并做\x20count、sum、avg、max、min\x20等聚合统计时使用','filter','{\x22appCode\x22:\x22app-aa63b188\x22,\x22currentPage\x22:1,\x22pageSize\x22:100}','dataset_data_get_one','list','code','已经知道记录\x20id,需要按数据集读取单条业务数据时使用','3558664gRzARJ','##\x20Filter\x20dataset\x20data','Use\x20`lovrabet\x20sql\x20detail`\x20before\x20execution.','9lxGOCn','1634470QbtYdK','bf_execute','Current\x20app\x20code','map','api-doc','lovrabet\x20dataset\x20detail\x20--code\x20<datasetCode>\x20--appcode\x20<appCode>','已经确认目标\x20sqlCode\x20存在,并需要实际执行该自定义\x20SQL\x20时使用','read','Execute\x20custom\x20SQL','561590ovigeF','dataset_list','4mpZgDt','Aggregate\x20dataset\x20data','where\x20filters\x20before\x20aggregation','91jOLHkw','dataset_detail','GET','/api/{appCode}/{datasetCode}/getOne','##\x20List\x20BF\x20endpoint\x20functions\x0a\x0aDiscover\x20executable\x20endpoint\x20functions.','Use\x20read-only\x20data\x20commands\x20before\x20writing\x20Artifacts\x20that\x20display\x20real\x20data.','tableData\x20contains\x20records','Returns\x20one\x20matching\x20business\x20record','获取数据集详情','Inspect\x20field\x20names\x20and\x20operation\x20metadata\x20for\x20a\x20known\x20dataset\x20code.','CLI\x20users\x20should\x20prefer\x20`lovrabet\x20dataset\x20list`\x20for\x20this\x20workflow.','lovrabet\x20bff\x20exec\x20--name\x20<functionName>\x20--params\x20\x27{}\x27','join','lovrabet\x20bff\x20detail\x20--id\x20<scriptId>\x20--appcode\x20<appCode>','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27','##\x20List\x20datasets','{\x22id\x22:123}','获取应用下可调用的\x20BF\x20函数列表','List\x20datasets','453012diKURP','toLowerCase','需要携带\x20where、orderBy、分页等条件读取业务数据时使用','需要先确认当前应用有哪些可执行的\x20BF/ENDPOINT\x20函数,以及收敛可用\x20scriptName\x20时使用','custom_sql_execute','List\x20BF\x20endpoint\x20functions','Search\x20docs\x20by\x20code,\x20summary,\x20path,\x20or\x20usage\x20text','Filter\x20dataset\x20data','category','detail','/api/dataset/get-dataset-list-by-app-code','创建数据','API\x20doc\x20code,\x20for\x20example\x20dataset_list','string','fields/properties\x20describe\x20data\x20shape','whenToUse','tableData\x20contains\x20dataset\x20id/code/name','/api/custom/executeSql','/api/endpoint/{appCode}/{scriptName}','##\x20Create\x20dataset\x20record\x0a\x0aCreate\x20one\x20data\x20record\x20in\x20a\x20dataset.','/api/{appCode}/{datasetCode}/filter','scriptName','lovrabet\x20sql\x20exec\x20--sqlcode\x20<sqlCode>\x20--params\x20\x27{}\x27','589830cFnfGX','path','summary','lovrabet\x20dataset\x20list\x20--appcode\x20<appCode>\x20--format\x20compress','##\x20Execute\x20custom\x20SQL\x0a\x0aExecute\x20a\x20configured\x20SQL\x20script\x20by\x20sqlCode.','Returns\x20script\x20business\x20payload','{\x22aggregate\x22:[{\x22column\x22:\x20\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[]}','trim','result\x20rows\x20contain\x20aggregate\x20aliases','validation','{\x22where\x22:{},\x22currentPage\x22:1,\x22pageSize\x22:20}','需要按\x20appCode\x20分页获取运行态数据集列表,并优先收敛可用\x20datasetCode\x20时使用','None','operations\x20describes\x20runtime\x20APIs','Show\x20runtime\x20API\x20documentation\x20by\x20code','Create\x20dataset\x20record','##\x20Get\x20one\x20dataset\x20record\x0a\x0aRead\x20one\x20record\x20by\x20id.','length','Endpoint\x20function\x20name','POST','Use\x20`having`\x20only\x20for\x20post-aggregation\x20filters.','Use\x20`where`,\x20`select`,\x20`orderBy`,\x20`currentPage`,\x20and\x20`pageSize`\x20to\x20inspect\x20live\x20data\x20shape.','##\x20Dataset\x20detail','Returns\x20endpoint\x20functionName/id/description','title','32-character\x20dataset\x20code','Use\x20this\x20API\x20or\x20`lovrabet\x20dataset\x20list`\x20to\x20discover\x20available\x20dataset\x20codes\x20before\x20reading\x20data.','/api/dataset/getOneByCode?code={datasetCode}','Execute\x20BF\x20endpoint\x20function','datasetCode','查询单条数据','appCode','method','API\x20doc\x20code\x20not\x20found:\x20','bf_function_list','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:5}\x27','dataset_data_filter','lovrabet\x20data\x20create\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22name\x22:\x22demo\x22}\x27','Returns\x20the\x20created\x20record\x20or\x20backend\x20operation\x20result','5716440mKDLHi','9783190xWxtug','Script\x20behavior\x20may\x20have\x20side\x20effects;\x20inspect\x20detail\x20first.','Returns\x20SQL\x20execution\x20payload','##\x20Aggregate\x20dataset\x20data','This\x20is\x20a\x20write\x20operation;\x20use\x20dry-run\x20when\x20available\x20and\x20safe\x20fixtures\x20for\x20smoke\x20tests.','Aggregate\x20supports\x20COUNT,\x20SUM,\x20AVG,\x20MAX,\x20and\x20MIN\x20definitions\x20in\x20the\x20`aggregate`\x20array.','str','keyword','Filter\x20docs\x20by\x20category,\x20for\x20example\x20dataset','dataset','/api/{appCode}/{datasetCode}/create','{\x22fieldName\x22:\x22value\x22}','聚合查询数据集数据','需要向指定数据集新增一条业务数据时使用'];a1_0x2197=function(){return _0x270c81;};return a1_0x2197();}
@@ -1 +1 @@
1
- (function(_0x40719a,_0x5582ad){const _0x48f4d9=a2_0x1847,_0x1033c8=_0x40719a();while(!![]){try{const _0x14cbca=-parseInt(_0x48f4d9(0x1c8))/0x1+parseInt(_0x48f4d9(0x1c3))/0x2*(parseInt(_0x48f4d9(0x1d7))/0x3)+-parseInt(_0x48f4d9(0x1d6))/0x4+-parseInt(_0x48f4d9(0x1cb))/0x5+-parseInt(_0x48f4d9(0x1d4))/0x6*(-parseInt(_0x48f4d9(0x1de))/0x7)+-parseInt(_0x48f4d9(0x1d0))/0x8+-parseInt(_0x48f4d9(0x1ce))/0x9*(-parseInt(_0x48f4d9(0x1d1))/0xa);if(_0x14cbca===_0x5582ad)break;else _0x1033c8['push'](_0x1033c8['shift']());}catch(_0x2916b9){_0x1033c8['push'](_0x1033c8['shift']());}}}(a2_0x1f8e,0xdeb3a));import{createHash}from'node:crypto';function a2_0x1847(_0x1b6389,_0x4bed30){_0x1b6389=_0x1b6389-0x1c3;const _0x1f8e33=a2_0x1f8e();let _0x1847ba=_0x1f8e33[_0x1b6389];return _0x1847ba;}import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{homedir}from'node:os';function a2_0x1f8e(){const _0x2941ee=['trim','1806375EQoGmy','code','isArray','1358430XmgQaF','slice','homeDirName','785412HJgHAv','EXDEV','5633344iLYLPv','250ojKbaO','EPERM','find','6NjPoDC','unknown','1089988XgSwDH','15FOPegV','cache','EACCES','items','my-apps.json','sha256','update','7967099TuxQiN','ak_','258822ouBzjx','.tmp','stringify','utf8'];a2_0x1f8e=function(){return _0x2941ee;};return a2_0x1f8e();}import{dirname,resolve}from'node:path';import{PRODUCT_CONFIG}from'../../constant/product.js';import{isRuntimeAccessibleApp}from'../../commands/app/eligibility.js';export function fingerprintAccessKey(_0x5d8a71){const _0x2c5c92=a2_0x1847,_0x1b7ff2=_0x5d8a71['trim'](),_0x1fc7c2=_0x1b7ff2[_0x2c5c92(0x1cc)](-0x6)||_0x2c5c92(0x1d5),_0x107f46=createHash(_0x2c5c92(0x1dc))[_0x2c5c92(0x1dd)](_0x1b7ff2)['digest']('hex')[_0x2c5c92(0x1cc)](0x0,0xc);return _0x2c5c92(0x1df)+_0x1fc7c2+'_'+_0x107f46;}export function getAppCacheFilePath(_0x5b8d0e,_0x775cfa){const _0x121605=a2_0x1847;return resolve(homedir(),PRODUCT_CONFIG[_0x121605(0x1cd)],_0x121605(0x1d8),_0x5b8d0e,fingerprintAccessKey(_0x775cfa),_0x121605(0x1db));}export function readCachedAppList(_0x550d4a,_0x51a0bc){const _0x3ef1a9=a2_0x1847;if(!_0x51a0bc?.[_0x3ef1a9(0x1c7)]())return null;const _0x3b1bd=getAppCacheFilePath(_0x550d4a,_0x51a0bc);if(!existsSync(_0x3b1bd))return null;try{const _0x5028e7=readFileSync(_0x3b1bd,_0x3ef1a9(0x1c6));if(!_0x5028e7[_0x3ef1a9(0x1c7)]())return null;const _0x5cd2e1=JSON['parse'](_0x5028e7);if(!Array[_0x3ef1a9(0x1ca)](_0x5cd2e1[_0x3ef1a9(0x1da)]))return null;return _0x5cd2e1;}catch{return null;}}export function writeCachedAppList(_0x1f5f1e,_0x2d6166,_0x353fa1){const _0x30f2cb=a2_0x1847,_0x2e82c3=getAppCacheFilePath(_0x1f5f1e,_0x2d6166),_0x1026f4=dirname(_0x2e82c3);!existsSync(_0x1026f4)&&mkdirSync(_0x1026f4,{'recursive':!![]});const _0x19d975=_0x2e82c3+_0x30f2cb(0x1c4);try{writeFileSync(_0x19d975,JSON[_0x30f2cb(0x1c5)](_0x353fa1,null,0x2)+'\x0a',{'encoding':_0x30f2cb(0x1c6),'mode':0x180});try{renameSync(_0x19d975,_0x2e82c3);}catch(_0x2fb9b0){if(_0x2fb9b0[_0x30f2cb(0x1c9)]===_0x30f2cb(0x1d2)||_0x2fb9b0[_0x30f2cb(0x1c9)]===_0x30f2cb(0x1cf)||_0x2fb9b0[_0x30f2cb(0x1c9)]===_0x30f2cb(0x1d9)){writeFileSync(_0x2e82c3,JSON['stringify'](_0x353fa1,null,0x2)+'\x0a',{'encoding':_0x30f2cb(0x1c6)});try{unlinkSync(_0x19d975);}catch{}}else throw _0x2fb9b0;}}catch(_0x4e4568){try{unlinkSync(_0x19d975);}catch{}throw _0x4e4568;}return _0x2e82c3;}export function resolveCachedAppCode(_0x1611ca,_0x2740c,_0x59c878){const _0x2e1d9f=a2_0x1847;if(!_0x1611ca)return undefined;const _0x37c031=readCachedAppList(_0x2740c,_0x59c878),_0x37b535=_0x37c031?.[_0x2e1d9f(0x1da)][_0x2e1d9f(0x1d3)](_0x4f4729=>_0x4f4729['appName']===_0x1611ca&&isRuntimeAccessibleApp(_0x4f4729));return _0x37b535?.['appCode']?.['trim']()||undefined;}
1
+ (function(_0x5a8793,_0x179d9e){const _0x2d1607=a2_0x1640,_0x4316c2=_0x5a8793();while(!![]){try{const _0x3ccdb6=-parseInt(_0x2d1607(0xce))/0x1+parseInt(_0x2d1607(0xdc))/0x2*(parseInt(_0x2d1607(0xd0))/0x3)+-parseInt(_0x2d1607(0xcf))/0x4*(-parseInt(_0x2d1607(0xda))/0x5)+-parseInt(_0x2d1607(0xd6))/0x6+parseInt(_0x2d1607(0xde))/0x7+parseInt(_0x2d1607(0xdf))/0x8+parseInt(_0x2d1607(0xe5))/0x9*(-parseInt(_0x2d1607(0xe1))/0xa);if(_0x3ccdb6===_0x179d9e)break;else _0x4316c2['push'](_0x4316c2['shift']());}catch(_0x186a8d){_0x4316c2['push'](_0x4316c2['shift']());}}}(a2_0x4002,0x954d6));import{createHash}from'node:crypto';import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{homedir}from'node:os';import{dirname,resolve}from'node:path';import{PRODUCT_CONFIG}from'../../constant/product.js';function a2_0x1640(_0xfc7218,_0x16160e){_0xfc7218=_0xfc7218-0xcb;const _0x40025c=a2_0x4002();let _0x16405b=_0x40025c[_0xfc7218];return _0x16405b;}import{isRuntimeAccessibleApp}from'../../commands/app/eligibility.js';export function fingerprintAccessKey(_0x462c12){const _0x1a17f2=a2_0x1640,_0x5b9d32=_0x462c12['trim'](),_0x277d78=_0x5b9d32[_0x1a17f2(0xd8)](-0x6)||'unknown',_0x362fd4=createHash(_0x1a17f2(0xd5))[_0x1a17f2(0xdd)](_0x5b9d32)[_0x1a17f2(0xd1)]('hex')[_0x1a17f2(0xd8)](0x0,0xc);return'ak_'+_0x277d78+'_'+_0x362fd4;}export function getAppCacheFilePath(_0x2c13bf,_0x3d4b9f){const _0x333865=a2_0x1640;return resolve(homedir(),PRODUCT_CONFIG[_0x333865(0xd2)],_0x333865(0xe4),_0x2c13bf,fingerprintAccessKey(_0x3d4b9f),_0x333865(0xe6));}export function readCachedAppList(_0x184398,_0x57ef91){const _0x83604=a2_0x1640;if(!_0x57ef91?.['trim']())return null;const _0x73eb1d=getAppCacheFilePath(_0x184398,_0x57ef91);if(!existsSync(_0x73eb1d))return null;try{const _0x1e295c=readFileSync(_0x73eb1d,'utf8');if(!_0x1e295c[_0x83604(0xdb)]())return null;const _0x274f30=JSON[_0x83604(0xcd)](_0x1e295c);if(!Array[_0x83604(0xe7)](_0x274f30[_0x83604(0xd3)]))return null;return _0x274f30;}catch{return null;}}export function writeCachedAppList(_0x5878bb,_0x12dd3f,_0x3a895d){const _0xb224e5=a2_0x1640,_0x2fc150=getAppCacheFilePath(_0x5878bb,_0x12dd3f),_0xaccaea=dirname(_0x2fc150);!existsSync(_0xaccaea)&&mkdirSync(_0xaccaea,{'recursive':!![]});const _0x3e5d18=_0x2fc150+'.tmp';try{writeFileSync(_0x3e5d18,JSON[_0xb224e5(0xd4)](_0x3a895d,null,0x2)+'\x0a',{'encoding':_0xb224e5(0xe2),'mode':0x180});try{renameSync(_0x3e5d18,_0x2fc150);}catch(_0x1f6a2b){if(_0x1f6a2b['code']===_0xb224e5(0xcc)||_0x1f6a2b[_0xb224e5(0xe3)]===_0xb224e5(0xcb)||_0x1f6a2b[_0xb224e5(0xe3)]===_0xb224e5(0xd9)){writeFileSync(_0x2fc150,JSON['stringify'](_0x3a895d,null,0x2)+'\x0a',{'encoding':_0xb224e5(0xe2)});try{unlinkSync(_0x3e5d18);}catch{}}else throw _0x1f6a2b;}}catch(_0x13dcd7){try{unlinkSync(_0x3e5d18);}catch{}throw _0x13dcd7;}return _0x2fc150;}export function resolveCachedAppCode(_0x78fbea,_0x5151aa,_0x41967c){const _0x3b4669=a2_0x1640;if(!_0x78fbea)return undefined;const _0x2c486c=readCachedAppList(_0x5151aa,_0x41967c),_0x364cbf=_0x2c486c?.[_0x3b4669(0xd3)][_0x3b4669(0xd7)](_0x1f2ef0=>_0x1f2ef0[_0x3b4669(0xe0)]===_0x78fbea&&isRuntimeAccessibleApp(_0x1f2ef0));return _0x364cbf?.['appCode']?.[_0x3b4669(0xdb)]()||undefined;}function a2_0x4002(){const _0x201329=['digest','homeDirName','items','stringify','sha256','722232YuWbcC','find','slice','EACCES','1067350xTjvUR','trim','1866cklWzQ','update','3915471AQfBHl','4882712YyLjmw','appName','3170IkzFzS','utf8','code','cache','23031szbrcg','my-apps.json','isArray','EXDEV','EPERM','parse','387716XTMpna','4cPiUup','1761ltnBmR'];a2_0x4002=function(){return _0x201329;};return a2_0x4002();}
@@ -1 +1 @@
1
- const a3_0x1287d3=a3_0x3295;(function(_0x19a661,_0x7d8a1b){const _0x3c5747=a3_0x3295,_0x359e8c=_0x19a661();while(!![]){try{const _0x3010de=-parseInt(_0x3c5747(0xda))/0x1+-parseInt(_0x3c5747(0xe1))/0x2*(-parseInt(_0x3c5747(0x95))/0x3)+parseInt(_0x3c5747(0x9b))/0x4+-parseInt(_0x3c5747(0x92))/0x5+parseInt(_0x3c5747(0xb9))/0x6*(parseInt(_0x3c5747(0x9e))/0x7)+parseInt(_0x3c5747(0xe2))/0x8+parseInt(_0x3c5747(0xcf))/0x9*(-parseInt(_0x3c5747(0xc8))/0xa);if(_0x3010de===_0x7d8a1b)break;else _0x359e8c['push'](_0x359e8c['shift']());}catch(_0xf0a07f){_0x359e8c['push'](_0x359e8c['shift']());}}}(a3_0x202f,0x5937d));import{CliErrors}from'../../errors.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';import{filterRuntimeAccessibleApps,findAppByCode,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../../commands/app/eligibility.js';const GLOBAL_FLAG={'name':a3_0x1287d3(0xc2),'type':a3_0x1287d3(0xe4),'description':a3_0x1287d3(0xaa),'default':![]};function a3_0x202f(){const _0x283482=['282FMLMmU','appCode','App\x20\x22','app','\x20app\x20list`\x20to\x20discover\x20remote\x20apps,\x20or\x20add\x20apps.','\x22\x20not\x20found.','539008iReAHx','i18nInfo','args','287MQlQnR','import','../../commands/app/cache.js','.\x20Local\x20aliases\x20can\x20be\x20added\x20under\x20apps.<alias>.appcode.','Usage:\x20','cache','name','Deprecated:\x20use\x20workspace\x20init\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','trim','source','Missing\x20app\x20name.','env','Use\x20global\x20config\x20scope','write','accessKey','production','Use\x20`','Refreshed\x20app\x20cache\x20with\x20','\x20workspace\x20use\x20--app\x20<name>\x20[--env\x20daily]','filter','langs','enableI18n','List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','projectPath','.appcode\x20to\x20.lovrabet.json.','string','fetchedAt','89730ADMLjS','`\x20instead.','join','appcode','defaultApp','str','init','isArray','push','global','Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','include-unpublished','project-default','appOwnerName','find','33590aIBvtt','\x20app\x20use\x20<name>\x20[--global]','envName','no-cache','bool','length','warn','90QMPqsS','Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','nonInteractive','Remote\x20app\x20name\x20to\x20activate','Read\x20from\x20local\x20cache\x20only','No\x20apps\x20found\x20on\x20the\x20platform.','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','Deprecated:\x20use\x20workspace\x20use\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','pull','appName','appPublishStatus','286707luIjXC','cachePath','items','use','local','../../context.js','map','12092hEWvEo','475576NrSCpS','validation','boolean','entries','../../commands/app/remote-source.js','3449720ViIvnY','\x20app\x20','Target\x20environment\x20(default:\x20current\x20env)'];a3_0x202f=function(){return _0x283482;};return a3_0x202f();}function a3_0x3295(_0x13936d,_0x266885){_0x13936d=_0x13936d-0x90;const _0x202ffb=a3_0x202f();let _0x329552=_0x202ffb[_0x13936d];return _0x329552;}function collectFlags(_0x458202,_0x51c9f1){const _0x37ca3e=a3_0x1287d3,_0x50a66e={};for(const _0x5cb4df of _0x51c9f1){const _0x3ff97c=_0x5cb4df['type']===_0x37ca3e(0xe4)?_0x458202[_0x37ca3e(0xcc)](_0x5cb4df['name']):_0x458202[_0x37ca3e(0xbe)](_0x5cb4df[_0x37ca3e(0xa4)]);if(_0x3ff97c!==''&&_0x3ff97c!==![])_0x50a66e[_0x5cb4df[_0x37ca3e(0xa4)]]=_0x3ff97c;}if(_0x458202[_0x37ca3e(0xd1)])_0x50a66e[_0x37ca3e(0xd1)]=!![];return _0x50a66e;}function normalizeLanguages(_0x588cdf){const _0xf4281b=a3_0x1287d3;if(!Array[_0xf4281b(0xc0)](_0x588cdf))return[];return _0x588cdf[_0xf4281b(0xb1)](_0x376a90=>typeof _0x376a90===_0xf4281b(0xb7))[_0xf4281b(0xe0)](_0x394fc4=>_0x394fc4[_0xf4281b(0xa6)]())[_0xf4281b(0xb1)](Boolean);}function buildRemoteAppI18nFields(_0x91e025){const _0x15be91=a3_0x1287d3,_0x431005=normalizeLanguages(_0x91e025[_0x15be91(0x9c)]?.[_0x15be91(0xb2)]);return{'enableI18n':typeof _0x91e025['enableI18n']===_0x15be91(0xe4)?_0x91e025[_0x15be91(0xb3)]:null,'languages':_0x431005,'i18nInfo':_0x91e025['i18nInfo']?{..._0x91e025['i18nInfo'],'langs':_0x431005['length']?_0x431005:null}:null};}const initDef={'service':a3_0x1287d3(0x98),'command':a3_0x1287d3(0xbf),'description':a3_0x1287d3(0xa5),'risk':a3_0x1287d3(0xab),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initCreateFlagDefs,async 'execute'(_0x302e01){const _0x3d11a5=a3_0x1287d3;return warnDeprecatedAppCommand(_0x3d11a5(0xbf),CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>\x20[--env\x20daily]'),await runInit(collectFlags(_0x302e01,initCreateFlagDefs)),{'ok':!![]};}},listDef={'service':a3_0x1287d3(0x98),'command':'list','description':a3_0x1287d3(0xb4),'risk':'read','requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':a3_0x1287d3(0xa9),'type':a3_0x1287d3(0xb7),'description':'Filter\x20by\x20environment\x20(default:\x20current\x20env)','enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0x1287d3(0xde),'type':'boolean','description':'Read\x20app\x20list\x20from\x20local\x20cache\x20only','default':![]},{'name':a3_0x1287d3(0xcb),'type':a3_0x1287d3(0xe4),'description':a3_0x1287d3(0xd5),'default':![]},{'name':a3_0x1287d3(0xc4),'type':a3_0x1287d3(0xe4),'description':'Include\x20unpublished\x20apps\x20for\x20diagnostics','default':![]}],async 'execute'(_0x5b1709){const _0x585876=a3_0x1287d3,_0x14e2c4=_0x5b1709[_0x585876(0xbe)]('env')||_0x5b1709['envName']||getEnv()||_0x585876(0xad),_0x16e647=_0x5b1709[_0x585876(0xcc)]('local'),_0x19361b=_0x5b1709[_0x585876(0xcc)](_0x585876(0xcb)),_0x476d7e=_0x5b1709['bool'](_0x585876(0xc4)),{readRawConfigWithLayers:_0x4007a6,resolveDefaultAppSource:_0x2dd664,getLocalAppAliases:_0xfdf2db}=await import(_0x585876(0xdf)),{getRemoteAppList:_0x5b0251}=await import(_0x585876(0x91)),{config:_0x254c43,layers:_0x29e314}=_0x4007a6(),_0x2a27be=_0x2dd664(_0x29e314),{defaultApp:_0x21cb26}=_0x254c43,_0xfb0d12=await _0x5b0251({'env':_0x14e2c4,'accessKey':_0x5b1709[_0x585876(0xac)],'localOnly':_0x16e647,'noCache':_0x19361b}),_0x340ec4=_0x476d7e?_0xfb0d12[_0x585876(0xdc)]:filterRuntimeAccessibleApps(_0xfb0d12[_0x585876(0xdc)]),_0x42c895=_0xfb0d12[_0x585876(0xdc)][_0x585876(0xcd)]-_0x340ec4['length'],_0x748b18=_0x340ec4[_0x585876(0xe0)](_0x519761=>{const _0x2c06fb=_0x585876;return{'name':_0x519761[_0x2c06fb(0xd8)],'appcode':_0x519761[_0x2c06fb(0x96)],'named':!![],'definedIn':'remote','isDefault':_0x519761[_0x2c06fb(0xd8)]===_0x21cb26,...buildAppProfileListFields(_0x14e2c4),...buildRemoteAppI18nFields(_0x519761),'source':_0xfb0d12[_0x2c06fb(0xa7)],'owner':_0x519761[_0x2c06fb(0xc6)]??null,'status':_0x519761[_0x2c06fb(0xd9)]??null,'cachedAt':_0xfb0d12[_0x2c06fb(0xb8)]};}),_0x3df384=_0xfdf2db(_0x254c43);let _0x334a92=0x0;for(const [_0x2cd460,_0x3e279e]of Object[_0x585876(0x90)](_0x3df384)){const _0x2c47cb=typeof _0x3e279e[_0x585876(0xbc)]===_0x585876(0xb7)?_0x3e279e[_0x585876(0xbc)][_0x585876(0xa6)]():'';if(!_0x2c47cb)continue;const _0x3881e0=findAppByCode(_0xfb0d12[_0x585876(0xdc)],_0x2c47cb);if(!_0x476d7e&&_0x3881e0&&!isRuntimeAccessibleApp(_0x3881e0))continue;_0x334a92+=0x1,_0x748b18[_0x585876(0xc1)]({'name':_0x2cd460,'appcode':_0x2c47cb,'named':!![],'definedIn':_0x585876(0xde),'isDefault':_0x2cd460===_0x21cb26,...buildAppProfileListFields(_0x14e2c4),'source':'config','owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0x748b18,_0x5b1709['mergedCli']);const _0x31fed6=_0x748b18['find'](_0x5d0774=>_0x5d0774['isCurrent']===!![]),_0xa6d327=_0x21cb26??_0x31fed6?.[_0x585876(0xa4)]??null,_0x468e9c={'env':_0x14e2c4,'source':_0xfb0d12[_0x585876(0xa7)],'fetchedAt':_0xfb0d12['fetchedAt'],'cachePath':_0xfb0d12[_0x585876(0xdb)],'globalPath':_0x29e314['globalPath']??null,'projectPath':_0x29e314[_0x585876(0xb5)]??null,'defaultApp':_0xa6d327,'defaultAppSource':_0x21cb26!=null?_0x2a27be:null,'localAliasCount':_0x334a92,'remoteTotal':_0xfb0d12[_0x585876(0xdc)][_0x585876(0xcd)],'hiddenUnpublishedCount':_0x42c895,'includeUnpublished':_0x476d7e};if(_0x748b18[_0x585876(0xcd)]===0x0)return{'ok':!![],'data':{'items':_0x748b18,'meta':_0x468e9c},'message':_0xfb0d12[_0x585876(0xa7)]===_0x585876(0xa3)?'No\x20cached\x20apps\x20found.':_0x585876(0xd4)};return{'ok':!![],'data':{'items':_0x748b18,'meta':_0x468e9c}};}},pullDef={'service':a3_0x1287d3(0x98),'command':a3_0x1287d3(0xd7),'description':a3_0x1287d3(0xc3),'risk':a3_0x1287d3(0xab),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a3_0x1287d3(0xa9),'type':a3_0x1287d3(0xb7),'description':a3_0x1287d3(0x94),'enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0x1287d3(0xde),'type':a3_0x1287d3(0xe4),'description':a3_0x1287d3(0xd3),'default':![]},{'name':'no-cache','type':a3_0x1287d3(0xe4),'description':a3_0x1287d3(0xd5),'default':![]}],async 'execute'(_0x3c5b0f){const _0x3ff0ea=a3_0x1287d3,_0x451bfb=_0x3c5b0f[_0x3ff0ea(0xbe)]('env')||_0x3c5b0f[_0x3ff0ea(0xca)]||getEnv()||_0x3ff0ea(0xad),_0x4a5bfb=_0x3c5b0f[_0x3ff0ea(0xcc)](_0x3ff0ea(0xde)),_0x4018f9=_0x3c5b0f[_0x3ff0ea(0xcc)](_0x3ff0ea(0xcb)),{getRemoteAppList:_0x1f5b5e}=await import(_0x3ff0ea(0x91)),_0x55a87c=await _0x1f5b5e({'env':_0x451bfb,'accessKey':_0x3c5b0f[_0x3ff0ea(0xac)],'localOnly':_0x4a5bfb,'noCache':_0x4018f9});return{'ok':!![],'data':{'total':_0x55a87c['items'][_0x3ff0ea(0xcd)],'env':_0x451bfb,'source':_0x55a87c[_0x3ff0ea(0xa7)],'fetchedAt':_0x55a87c[_0x3ff0ea(0xb8)],'cachePath':_0x55a87c[_0x3ff0ea(0xdb)]},'message':_0x55a87c[_0x3ff0ea(0xa7)]===_0x3ff0ea(0xa3)?'Loaded\x20'+_0x55a87c[_0x3ff0ea(0xdc)][_0x3ff0ea(0xcd)]+'\x20cached\x20app(s)\x20for\x20env=\x22'+_0x451bfb+'\x22.':_0x3ff0ea(0xaf)+_0x55a87c['items']['length']+'\x20app(s)\x20for\x20env=\x22'+_0x451bfb+'\x22.'};}},useDef={'service':a3_0x1287d3(0x98),'command':a3_0x1287d3(0xdd),'description':a3_0x1287d3(0xd6),'risk':a3_0x1287d3(0xab),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a3_0x1287d3(0xa4),'description':a3_0x1287d3(0xd2),'required':!![]}],'flags':[GLOBAL_FLAG],async 'validate'(_0x59e421){const _0x405b2c=a3_0x1287d3;if(!_0x59e421['args'][0x0])throw CliErrors[_0x405b2c(0xe3)](_0x405b2c(0xa8),_0x405b2c(0xa2)+CLI_BIN_NAME+_0x405b2c(0xc9));},async 'execute'(_0x50a381){const _0x1cd677=a3_0x1287d3;warnDeprecatedAppCommand('use',CLI_BIN_NAME+_0x1cd677(0xb0));const _0x3dd562=_0x50a381[_0x1cd677(0x9d)][0x0];if(!_0x3dd562)throw CliErrors['validation'](_0x1cd677(0xa8),'Usage:\x20'+CLI_BIN_NAME+'\x20app\x20use\x20<name>\x20[--global]');const {buildConfigFromFlags:_0x42bc6e,resolveLocalAppAliasCode:_0x5eab78}=await import(_0x1cd677(0xdf)),{readCachedAppList:_0x28c8af}=await import(_0x1cd677(0xa0)),_0x29514e=_0x50a381[_0x1cd677(0xbe)](_0x1cd677(0xa9)),_0x1e8015=_0x42bc6e(_0x29514e?{'env':_0x29514e}:{}),_0x7fd635=_0x28c8af(_0x1e8015[_0x1cd677(0xa9)],_0x1e8015[_0x1cd677(0xac)]),_0x30acc4=_0x7fd635?.[_0x1cd677(0xdc)][_0x1cd677(0xc7)](_0x5435aa=>_0x5435aa[_0x1cd677(0xd8)]===_0x3dd562),_0x5af50f=_0x5eab78(_0x1e8015['raw']??{},_0x3dd562);if(_0x30acc4&&!isRuntimeAccessibleApp(_0x30acc4))throw runtimeInaccessibleAppError(_0x30acc4,'\x22'+_0x3dd562+'\x22');if(_0x5af50f){const _0x467e36=_0x7fd635?.[_0x1cd677(0xdc)][_0x1cd677(0xc7)](_0xdf1a6b=>_0xdf1a6b[_0x1cd677(0x96)]?.[_0x1cd677(0xa6)]()===_0x5af50f);if(_0x467e36&&!isRuntimeAccessibleApp(_0x467e36))throw runtimeInaccessibleAppError(_0x467e36,'\x22'+_0x3dd562+'\x22');}if(!_0x30acc4&&!_0x5af50f&&_0x1e8015[_0x1cd677(0xbd)]!==_0x3dd562){const _0x532c47=[..._0x7fd635?.[_0x1cd677(0xdc)][_0x1cd677(0xe0)](_0x53c8af=>_0x53c8af['appName'])??[]],_0xb4b410=_0x532c47['length']===0x0?_0x1cd677(0xae)+CLI_BIN_NAME+_0x1cd677(0x99)+_0x3dd562+_0x1cd677(0xb6):'Available\x20remote\x20apps:\x20'+Array['from'](new Set(_0x532c47))[_0x1cd677(0xbb)](',\x20')+_0x1cd677(0xa1);throw CliErrors[_0x1cd677(0xe3)](_0x1cd677(0x97)+_0x3dd562+_0x1cd677(0x9a),_0xb4b410);}const _0x461400=_0x50a381['bool']('global');let _0x2d5cb7;if(_0x461400)_0x2d5cb7={'global':!![]};else{const {isInProject:_0x2fb10c}=await import(_0x1cd677(0xdf)),_0x1528c=_0x2fb10c();_0x2d5cb7=toScopeFlags(resolveConfigScope({'explicitGlobal':![],'policy':_0x1cd677(0xc5),'inProject':_0x1528c}));}const _0x17080f=readConfig(_0x2d5cb7);return _0x17080f['defaultApp']=_0x3dd562,writeConfig(_0x17080f,_0x2d5cb7),{'ok':!![],'message':'Default\x20app\x20candidate\x20set\x20to\x20\x22'+_0x3dd562+'\x22'+scopeLabel(_0x2d5cb7)+'.'};}};function warnDeprecatedAppCommand(_0x3306de,_0x5b2a83){const _0x86032a=a3_0x1287d3;console[_0x86032a(0xce)](CLI_BIN_NAME+_0x86032a(0x93)+_0x3306de+'\x20is\x20deprecated.\x20Use\x20`'+_0x5b2a83+_0x86032a(0xba));}const importDef={'service':a3_0x1287d3(0x98),'command':a3_0x1287d3(0x9f),'description':a3_0x1287d3(0xd0),'risk':a3_0x1287d3(0xab),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initImportFlagDefs,async 'execute'(_0x2ee12a){return await runInitImport(collectFlags(_0x2ee12a,initImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[initDef,listDef,pullDef,useDef,importDef];
1
+ const a3_0x54577e=a3_0x55ce;(function(_0x14381e,_0x5de3e4){const _0x38ad31=a3_0x55ce,_0x230a84=_0x14381e();while(!![]){try{const _0x4c4607=-parseInt(_0x38ad31(0x18c))/0x1+parseInt(_0x38ad31(0x16d))/0x2+-parseInt(_0x38ad31(0x1a9))/0x3+parseInt(_0x38ad31(0x187))/0x4*(parseInt(_0x38ad31(0x1ab))/0x5)+parseInt(_0x38ad31(0x171))/0x6*(parseInt(_0x38ad31(0x192))/0x7)+parseInt(_0x38ad31(0x1ae))/0x8+parseInt(_0x38ad31(0x1b5))/0x9;if(_0x4c4607===_0x5de3e4)break;else _0x230a84['push'](_0x230a84['shift']());}catch(_0x4190ae){_0x230a84['push'](_0x230a84['shift']());}}}(a3_0x54c4,0xef768));import{CliErrors}from'../../errors.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';function a3_0x54c4(){const _0x300dfc=['join','.\x20Local\x20aliases\x20can\x20be\x20added\x20under\x20apps.<alias>.appcode.','init','filter','app','args','push','use','import','Refreshed\x20app\x20cache\x20with\x20','source','\x20workspace\x20use\x20--app\x20<name>\x20[--env\x20daily]','4847022MJpxtI','nonInteractive','577585gSSRsP','string','mergedCli','5395912rPsGwq','../../commands/app/remote-source.js','Missing\x20app\x20name.','cachePath','entries','Deprecated:\x20use\x20workspace\x20init\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','Read\x20from\x20local\x20cache\x20only','21712572SgqrRb','\x22\x20not\x20found.','Target\x20environment\x20(default:\x20current\x20env)','raw','i18nInfo','isArray','include-unpublished','name','Use\x20`','defaultApp','local','production','Usage:\x20','items','Deprecated:\x20use\x20workspace\x20use\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','bool','pull','`\x20instead.','1641490XRwTEp','read','appOwnerName','write','36mNLbWZ','map','\x20app(s)\x20for\x20env=\x22','fetchedAt','.appcode\x20to\x20.lovrabet.json.','no-cache','\x20is\x20deprecated.\x20Use\x20`','Read\x20app\x20list\x20from\x20local\x20cache\x20only','appcode','from','Loaded\x20','../../context.js','env','\x20app\x20use\x20<name>\x20[--global]','../../commands/app/cache.js','\x20workspace\x20init\x20--appcode\x20<code>\x20[--env\x20daily]','Include\x20unpublished\x20apps\x20for\x20diagnostics','project-default','No\x20cached\x20apps\x20found.','str','isCurrent','Default\x20app\x20candidate\x20set\x20to\x20\x22','12qCXoyy','length','envName','enableI18n','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','1932777dmsbHd','remote','\x20app\x20','find','validation','global','320831ENBqpg','globalPath','appName','accessKey','trim','List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','Use\x20global\x20config\x20scope','Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','warn','Available\x20remote\x20apps:\x20','boolean'];a3_0x54c4=function(){return _0x300dfc;};return a3_0x54c4();}import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{filterRuntimeAccessibleApps,findAppByCode,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../../commands/app/eligibility.js';const GLOBAL_FLAG={'name':'global','type':'boolean','description':a3_0x54577e(0x198),'default':![]};function collectFlags(_0x50ed9a,_0x5c8575){const _0x35855f=a3_0x54577e,_0x37560c={};for(const _0x6d1457 of _0x5c8575){const _0x4a3b83=_0x6d1457['type']===_0x35855f(0x19c)?_0x50ed9a[_0x35855f(0x16a)](_0x6d1457[_0x35855f(0x162)]):_0x50ed9a[_0x35855f(0x184)](_0x6d1457[_0x35855f(0x162)]);if(_0x4a3b83!==''&&_0x4a3b83!==![])_0x37560c[_0x6d1457['name']]=_0x4a3b83;}if(_0x50ed9a[_0x35855f(0x1aa)])_0x37560c[_0x35855f(0x1aa)]=!![];return _0x37560c;}function a3_0x55ce(_0x2e9dd2,_0x4a0cad){_0x2e9dd2=_0x2e9dd2-0x162;const _0x54c468=a3_0x54c4();let _0x55ced1=_0x54c468[_0x2e9dd2];return _0x55ced1;}function normalizeLanguages(_0xfb15b0){const _0x1f58a2=a3_0x54577e;if(!Array[_0x1f58a2(0x1ba)](_0xfb15b0))return[];return _0xfb15b0['filter'](_0x3eecb1=>typeof _0x3eecb1==='string')['map'](_0x17f006=>_0x17f006[_0x1f58a2(0x196)]())[_0x1f58a2(0x1a0)](Boolean);}function buildRemoteAppI18nFields(_0x53d311){const _0x17aa0a=a3_0x54577e,_0x2d30b7=normalizeLanguages(_0x53d311[_0x17aa0a(0x1b9)]?.['langs']);return{'enableI18n':typeof _0x53d311[_0x17aa0a(0x18a)]==='boolean'?_0x53d311['enableI18n']:null,'languages':_0x2d30b7,'i18nInfo':_0x53d311[_0x17aa0a(0x1b9)]?{..._0x53d311[_0x17aa0a(0x1b9)],'langs':_0x2d30b7[_0x17aa0a(0x188)]?_0x2d30b7:null}:null};}const initDef={'service':a3_0x54577e(0x1a1),'command':a3_0x54577e(0x19f),'description':a3_0x54577e(0x1b3),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initCreateFlagDefs,async 'execute'(_0x2cf0f6){const _0x4e8a27=a3_0x54577e;return warnDeprecatedAppCommand(_0x4e8a27(0x19f),CLI_BIN_NAME+_0x4e8a27(0x180)),await runInit(collectFlags(_0x2cf0f6,initCreateFlagDefs)),{'ok':!![]};}},listDef={'service':a3_0x54577e(0x1a1),'command':'list','description':a3_0x54577e(0x197),'risk':a3_0x54577e(0x16e),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':a3_0x54577e(0x17d),'type':a3_0x54577e(0x1ac),'description':'Filter\x20by\x20environment\x20(default:\x20current\x20env)','enum':[...RUNTIME_ENV_VALUES]},{'name':'local','type':a3_0x54577e(0x19c),'description':a3_0x54577e(0x178),'default':![]},{'name':'no-cache','type':a3_0x54577e(0x19c),'description':'Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','default':![]},{'name':a3_0x54577e(0x1bb),'type':a3_0x54577e(0x19c),'description':a3_0x54577e(0x181),'default':![]}],async 'execute'(_0x11686b){const _0x259b6e=a3_0x54577e,_0x1b0ed3=_0x11686b[_0x259b6e(0x184)](_0x259b6e(0x17d))||_0x11686b[_0x259b6e(0x189)]||getEnv()||_0x259b6e(0x166),_0x2c0974=_0x11686b[_0x259b6e(0x16a)](_0x259b6e(0x165)),_0x4563a5=_0x11686b[_0x259b6e(0x16a)](_0x259b6e(0x176)),_0x9bffeb=_0x11686b[_0x259b6e(0x16a)](_0x259b6e(0x1bb)),{readRawConfigWithLayers:_0x207b6e,resolveDefaultAppSource:_0x57b96f,getLocalAppAliases:_0x2ed1cc}=await import(_0x259b6e(0x17c)),{getRemoteAppList:_0x1c80c8}=await import(_0x259b6e(0x1af)),{config:_0x219847,layers:_0x279360}=_0x207b6e(),_0x52d885=_0x57b96f(_0x279360),{defaultApp:_0x15023b}=_0x219847,_0x37d6be=await _0x1c80c8({'env':_0x1b0ed3,'accessKey':_0x11686b[_0x259b6e(0x195)],'localOnly':_0x2c0974,'noCache':_0x4563a5}),_0x3cc759=_0x9bffeb?_0x37d6be[_0x259b6e(0x168)]:filterRuntimeAccessibleApps(_0x37d6be['items']),_0xdb4f8e=_0x37d6be[_0x259b6e(0x168)]['length']-_0x3cc759[_0x259b6e(0x188)],_0x274577=_0x3cc759[_0x259b6e(0x172)](_0x768ca1=>{const _0x372c54=_0x259b6e;return{'name':_0x768ca1[_0x372c54(0x194)],'appcode':_0x768ca1['appCode'],'named':!![],'definedIn':_0x372c54(0x18d),'isDefault':_0x768ca1[_0x372c54(0x194)]===_0x15023b,...buildAppProfileListFields(_0x1b0ed3),...buildRemoteAppI18nFields(_0x768ca1),'source':_0x37d6be[_0x372c54(0x1a7)],'owner':_0x768ca1[_0x372c54(0x16f)]??null,'status':_0x768ca1['appPublishStatus']??null,'cachedAt':_0x37d6be[_0x372c54(0x174)]};}),_0x436227=_0x2ed1cc(_0x219847);let _0x28f491=0x0;for(const [_0x1a8d5c,_0x37b2d6]of Object[_0x259b6e(0x1b2)](_0x436227)){const _0x37a77f=typeof _0x37b2d6['appcode']==='string'?_0x37b2d6[_0x259b6e(0x179)][_0x259b6e(0x196)]():'';if(!_0x37a77f)continue;const _0x3441a4=findAppByCode(_0x37d6be[_0x259b6e(0x168)],_0x37a77f);if(!_0x9bffeb&&_0x3441a4&&!isRuntimeAccessibleApp(_0x3441a4))continue;_0x28f491+=0x1,_0x274577[_0x259b6e(0x1a3)]({'name':_0x1a8d5c,'appcode':_0x37a77f,'named':!![],'definedIn':_0x259b6e(0x165),'isDefault':_0x1a8d5c===_0x15023b,...buildAppProfileListFields(_0x1b0ed3),'source':'config','owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0x274577,_0x11686b[_0x259b6e(0x1ad)]);const _0x2067d5=_0x274577[_0x259b6e(0x18f)](_0x31c502=>_0x31c502[_0x259b6e(0x185)]===!![]),_0x180777=_0x15023b??_0x2067d5?.[_0x259b6e(0x162)]??null,_0x24c490={'env':_0x1b0ed3,'source':_0x37d6be['source'],'fetchedAt':_0x37d6be['fetchedAt'],'cachePath':_0x37d6be['cachePath'],'globalPath':_0x279360[_0x259b6e(0x193)]??null,'projectPath':_0x279360['projectPath']??null,'defaultApp':_0x180777,'defaultAppSource':_0x15023b!=null?_0x52d885:null,'localAliasCount':_0x28f491,'remoteTotal':_0x37d6be[_0x259b6e(0x168)]['length'],'hiddenUnpublishedCount':_0xdb4f8e,'includeUnpublished':_0x9bffeb};if(_0x274577[_0x259b6e(0x188)]===0x0)return{'ok':!![],'data':{'items':_0x274577,'meta':_0x24c490},'message':_0x37d6be[_0x259b6e(0x1a7)]==='cache'?_0x259b6e(0x183):'No\x20apps\x20found\x20on\x20the\x20platform.'};return{'ok':!![],'data':{'items':_0x274577,'meta':_0x24c490}};}},pullDef={'service':'app','command':a3_0x54577e(0x16b),'description':'Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','risk':a3_0x54577e(0x170),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a3_0x54577e(0x17d),'type':a3_0x54577e(0x1ac),'description':a3_0x54577e(0x1b7),'enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0x54577e(0x165),'type':a3_0x54577e(0x19c),'description':a3_0x54577e(0x1b4),'default':![]},{'name':a3_0x54577e(0x176),'type':a3_0x54577e(0x19c),'description':a3_0x54577e(0x18b),'default':![]}],async 'execute'(_0x2c0e12){const _0x4a170a=a3_0x54577e,_0x1abe90=_0x2c0e12[_0x4a170a(0x184)]('env')||_0x2c0e12[_0x4a170a(0x189)]||getEnv()||_0x4a170a(0x166),_0x2bd8d8=_0x2c0e12[_0x4a170a(0x16a)](_0x4a170a(0x165)),_0x51c255=_0x2c0e12[_0x4a170a(0x16a)](_0x4a170a(0x176)),{getRemoteAppList:_0x364769}=await import(_0x4a170a(0x1af)),_0x211607=await _0x364769({'env':_0x1abe90,'accessKey':_0x2c0e12[_0x4a170a(0x195)],'localOnly':_0x2bd8d8,'noCache':_0x51c255});return{'ok':!![],'data':{'total':_0x211607[_0x4a170a(0x168)]['length'],'env':_0x1abe90,'source':_0x211607[_0x4a170a(0x1a7)],'fetchedAt':_0x211607[_0x4a170a(0x174)],'cachePath':_0x211607[_0x4a170a(0x1b1)]},'message':_0x211607[_0x4a170a(0x1a7)]==='cache'?_0x4a170a(0x17b)+_0x211607['items'][_0x4a170a(0x188)]+'\x20cached\x20app(s)\x20for\x20env=\x22'+_0x1abe90+'\x22.':_0x4a170a(0x1a6)+_0x211607[_0x4a170a(0x168)][_0x4a170a(0x188)]+_0x4a170a(0x173)+_0x1abe90+'\x22.'};}},useDef={'service':a3_0x54577e(0x1a1),'command':'use','description':a3_0x54577e(0x169),'risk':a3_0x54577e(0x170),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a3_0x54577e(0x162),'description':'Remote\x20app\x20name\x20to\x20activate','required':!![]}],'flags':[GLOBAL_FLAG],async 'validate'(_0x32e485){const _0x50a91f=a3_0x54577e;if(!_0x32e485[_0x50a91f(0x1a2)][0x0])throw CliErrors[_0x50a91f(0x190)]('Missing\x20app\x20name.',_0x50a91f(0x167)+CLI_BIN_NAME+_0x50a91f(0x17e));},async 'execute'(_0x371bf5){const _0x4b4f36=a3_0x54577e;warnDeprecatedAppCommand(_0x4b4f36(0x1a4),CLI_BIN_NAME+_0x4b4f36(0x1a8));const _0x3134ac=_0x371bf5['args'][0x0];if(!_0x3134ac)throw CliErrors[_0x4b4f36(0x190)](_0x4b4f36(0x1b0),_0x4b4f36(0x167)+CLI_BIN_NAME+'\x20app\x20use\x20<name>\x20[--global]');const {buildConfigFromFlags:_0x1ff53e,resolveLocalAppAliasCode:_0x53aada}=await import(_0x4b4f36(0x17c)),{readCachedAppList:_0x28c7f3}=await import(_0x4b4f36(0x17f)),_0x15cb94=_0x371bf5[_0x4b4f36(0x184)](_0x4b4f36(0x17d)),_0x5e49e9=_0x1ff53e(_0x15cb94?{'env':_0x15cb94}:{}),_0x356c00=_0x28c7f3(_0x5e49e9[_0x4b4f36(0x17d)],_0x5e49e9[_0x4b4f36(0x195)]),_0x22d79e=_0x356c00?.[_0x4b4f36(0x168)][_0x4b4f36(0x18f)](_0x5e42eb=>_0x5e42eb[_0x4b4f36(0x194)]===_0x3134ac),_0x439048=_0x53aada(_0x5e49e9[_0x4b4f36(0x1b8)]??{},_0x3134ac);if(_0x22d79e&&!isRuntimeAccessibleApp(_0x22d79e))throw runtimeInaccessibleAppError(_0x22d79e,'\x22'+_0x3134ac+'\x22');if(_0x439048){const _0x11d64d=_0x356c00?.[_0x4b4f36(0x168)][_0x4b4f36(0x18f)](_0x4dd256=>_0x4dd256['appCode']?.['trim']()===_0x439048);if(_0x11d64d&&!isRuntimeAccessibleApp(_0x11d64d))throw runtimeInaccessibleAppError(_0x11d64d,'\x22'+_0x3134ac+'\x22');}if(!_0x22d79e&&!_0x439048&&_0x5e49e9[_0x4b4f36(0x164)]!==_0x3134ac){const _0x1801d7=[..._0x356c00?.['items'][_0x4b4f36(0x172)](_0x3c0b1f=>_0x3c0b1f[_0x4b4f36(0x194)])??[]],_0xd95d31=_0x1801d7[_0x4b4f36(0x188)]===0x0?_0x4b4f36(0x163)+CLI_BIN_NAME+'\x20app\x20list`\x20to\x20discover\x20remote\x20apps,\x20or\x20add\x20apps.'+_0x3134ac+_0x4b4f36(0x175):_0x4b4f36(0x19b)+Array[_0x4b4f36(0x17a)](new Set(_0x1801d7))[_0x4b4f36(0x19d)](',\x20')+_0x4b4f36(0x19e);throw CliErrors[_0x4b4f36(0x190)]('App\x20\x22'+_0x3134ac+_0x4b4f36(0x1b6),_0xd95d31);}const _0xd07488=_0x371bf5['bool'](_0x4b4f36(0x191));let _0x1034c6;if(_0xd07488)_0x1034c6={'global':!![]};else{const {isInProject:_0x339327}=await import(_0x4b4f36(0x17c)),_0x5e3a1b=_0x339327();_0x1034c6=toScopeFlags(resolveConfigScope({'explicitGlobal':![],'policy':_0x4b4f36(0x182),'inProject':_0x5e3a1b}));}const _0xaf7f12=readConfig(_0x1034c6);return _0xaf7f12[_0x4b4f36(0x164)]=_0x3134ac,writeConfig(_0xaf7f12,_0x1034c6),{'ok':!![],'message':_0x4b4f36(0x186)+_0x3134ac+'\x22'+scopeLabel(_0x1034c6)+'.'};}};function warnDeprecatedAppCommand(_0x5e9030,_0x3fc0fc){const _0x4486d0=a3_0x54577e;console[_0x4486d0(0x19a)](CLI_BIN_NAME+_0x4486d0(0x18e)+_0x5e9030+_0x4486d0(0x177)+_0x3fc0fc+_0x4486d0(0x16c));}const importDef={'service':a3_0x54577e(0x1a1),'command':a3_0x54577e(0x1a5),'description':a3_0x54577e(0x199),'risk':a3_0x54577e(0x170),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initImportFlagDefs,async 'execute'(_0x51dcd8){return await runInitImport(collectFlags(_0x51dcd8,initImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[initDef,listDef,pullDef,useDef,importDef];
@@ -1 +1 @@
1
- (function(_0x495996,_0x3ab11a){const _0xe7b8f0=a4_0x5927,_0x31dcd6=_0x495996();while(!![]){try{const _0x51174b=-parseInt(_0xe7b8f0(0x154))/0x1*(parseInt(_0xe7b8f0(0x14e))/0x2)+-parseInt(_0xe7b8f0(0x14c))/0x3+-parseInt(_0xe7b8f0(0x14b))/0x4+parseInt(_0xe7b8f0(0x146))/0x5+-parseInt(_0xe7b8f0(0x151))/0x6+parseInt(_0xe7b8f0(0x157))/0x7+parseInt(_0xe7b8f0(0x156))/0x8*(parseInt(_0xe7b8f0(0x155))/0x9);if(_0x51174b===_0x3ab11a)break;else _0x31dcd6['push'](_0x31dcd6['shift']());}catch(_0x5e3ddf){_0x31dcd6['push'](_0x31dcd6['shift']());}}}(a4_0x5258,0x63fa1));function a4_0x5258(){const _0x13f28a=['1196345oMqane','UNKNOWN','appName','find','Current\x20status:\x20','517356jDLwtY','2107158KEdZyS','\x20is\x20not\x20available\x20for\x20runtime\x20AI\x20access.','1678fGsrYM','App\x20','trim','530520nYTpfV','string','filter','848UAesJn','12535893JtQlbC','8yZbmgU','2862832CGmOBZ','validation','appPublishStatus','appCode','\x20dataset/data/sql/bff\x20commands,\x20or\x20choose\x20a\x20published\x20app.'];a4_0x5258=function(){return _0x13f28a;};return a4_0x5258();}import{CLI_BIN_NAME}from'../../constant/cli.js';import{RUNTIME_ACCESSIBLE_APP_STATUS}from'../../constant/app.js';import{CliErrors}from'../../errors.js';export function normalizeAppPublishStatus(_0x1add19){const _0x390ac1=a4_0x5927;if(typeof _0x1add19!==_0x390ac1(0x152))return null;const _0x306642=_0x1add19['trim']();return _0x306642?_0x306642['toUpperCase']():null;}function a4_0x5927(_0x3fa07b,_0x4ad593){_0x3fa07b=_0x3fa07b-0x145;const _0x52586e=a4_0x5258();let _0x59274d=_0x52586e[_0x3fa07b];return _0x59274d;}export function isRuntimeAccessibleApp(_0x7697cd){const _0x35f5bd=a4_0x5927;return normalizeAppPublishStatus(_0x7697cd[_0x35f5bd(0x159)])===RUNTIME_ACCESSIBLE_APP_STATUS;}export function filterRuntimeAccessibleApps(_0x45cbc3){const _0x3b53d1=a4_0x5927;return _0x45cbc3[_0x3b53d1(0x153)](isRuntimeAccessibleApp);}export function findAppByName(_0x167596,_0x3aefe2){const _0x3fd64f=a4_0x5927;return _0x167596[_0x3fd64f(0x149)](_0x584e6a=>_0x584e6a[_0x3fd64f(0x148)]===_0x3aefe2);}export function findAppByCode(_0x4e356a,_0x5b484a){const _0x9dd27b=a4_0x5927,_0x5532e8=_0x5b484a[_0x9dd27b(0x150)]();if(!_0x5532e8)return undefined;return _0x4e356a[_0x9dd27b(0x149)](_0x3471ff=>_0x3471ff[_0x9dd27b(0x15a)]?.[_0x9dd27b(0x150)]()===_0x5532e8);}export function runtimeInaccessibleAppError(_0x29ebf1,_0x49ae2d){const _0x20674b=a4_0x5927,_0x157034=normalizeAppPublishStatus(_0x29ebf1[_0x20674b(0x159)])??_0x20674b(0x147);return CliErrors[_0x20674b(0x158)](_0x20674b(0x14f)+_0x49ae2d+_0x20674b(0x14d),_0x20674b(0x14a)+_0x157034+'.\x20Publish\x20the\x20app\x20before\x20using\x20'+CLI_BIN_NAME+_0x20674b(0x145));}
1
+ (function(_0x32e36f,_0x1aead9){const _0x41d868=a4_0x47c5,_0x1198b7=_0x32e36f();while(!![]){try{const _0x4845b5=parseInt(_0x41d868(0x193))/0x1*(parseInt(_0x41d868(0x17c))/0x2)+parseInt(_0x41d868(0x17f))/0x3*(-parseInt(_0x41d868(0x18c))/0x4)+-parseInt(_0x41d868(0x183))/0x5*(-parseInt(_0x41d868(0x192))/0x6)+parseInt(_0x41d868(0x186))/0x7*(-parseInt(_0x41d868(0x18b))/0x8)+parseInt(_0x41d868(0x18f))/0x9+parseInt(_0x41d868(0x181))/0xa*(-parseInt(_0x41d868(0x18a))/0xb)+parseInt(_0x41d868(0x189))/0xc;if(_0x4845b5===_0x1aead9)break;else _0x1198b7['push'](_0x1198b7['shift']());}catch(_0x424d51){_0x1198b7['push'](_0x1198b7['shift']());}}}(a4_0x41d9,0x39c20));import{CLI_BIN_NAME}from'../../constant/cli.js';function a4_0x47c5(_0x1b761e,_0x4f355e){_0x1b761e=_0x1b761e-0x17b;const _0x41d982=a4_0x41d9();let _0x47c541=_0x41d982[_0x1b761e];return _0x47c541;}import{RUNTIME_ACCESSIBLE_APP_STATUS}from'../../constant/app.js';import{CliErrors}from'../../errors.js';export function normalizeAppPublishStatus(_0x1e0f23){const _0x51a792=a4_0x47c5;if(typeof _0x1e0f23!==_0x51a792(0x184))return null;const _0x5c6ca5=_0x1e0f23[_0x51a792(0x18d)]();return _0x5c6ca5?_0x5c6ca5[_0x51a792(0x18e)]():null;}export function isRuntimeAccessibleApp(_0x48f16b){const _0x5074e0=a4_0x47c5;return normalizeAppPublishStatus(_0x48f16b[_0x5074e0(0x17e)])===RUNTIME_ACCESSIBLE_APP_STATUS;}export function filterRuntimeAccessibleApps(_0x276c15){const _0x31375b=a4_0x47c5;return _0x276c15[_0x31375b(0x190)](isRuntimeAccessibleApp);}export function findAppByName(_0x229d4b,_0x41643a){const _0x29e956=a4_0x47c5;return _0x229d4b['find'](_0x28e92b=>_0x28e92b[_0x29e956(0x191)]===_0x41643a);}export function findAppByCode(_0x6e8f5f,_0x31d29c){const _0x24f13b=a4_0x47c5,_0x5e2c4d=_0x31d29c[_0x24f13b(0x18d)]();if(!_0x5e2c4d)return undefined;return _0x6e8f5f[_0x24f13b(0x180)](_0x45c075=>_0x45c075[_0x24f13b(0x194)]?.['trim']()===_0x5e2c4d);}export function runtimeInaccessibleAppError(_0x33d2b8,_0x1374fc){const _0x531725=a4_0x47c5,_0x342b44=normalizeAppPublishStatus(_0x33d2b8['appPublishStatus'])??_0x531725(0x17d);return CliErrors[_0x531725(0x185)](_0x531725(0x17b)+_0x1374fc+_0x531725(0x188),_0x531725(0x182)+_0x342b44+_0x531725(0x187)+CLI_BIN_NAME+'\x20dataset/data/sql/bff\x20commands,\x20or\x20choose\x20a\x20published\x20app.');}function a4_0x41d9(){const _0xa0158e=['filter','appName','312BmhIgr','21548DLuAMi','appCode','App\x20','2sCQhtO','UNKNOWN','appPublishStatus','811878LYyefK','find','1094660XPiHGl','Current\x20status:\x20','6455WLJBWT','string','validation','77BMwyin','.\x20Publish\x20the\x20app\x20before\x20using\x20','\x20is\x20not\x20available\x20for\x20runtime\x20AI\x20access.','9709188wzVcyZ','33OmLXpR','243472WUzPPH','4ZwWLxJ','trim','toUpperCase','2453355oNXtqW'];a4_0x41d9=function(){return _0xa0158e;};return a4_0x41d9();}
@@ -1 +1 @@
1
- function a5_0x58bc(_0x4ddc88,_0x21c723){_0x4ddc88=_0x4ddc88-0x1a5;const _0x492146=a5_0x4921();let _0x58bcfd=_0x492146[_0x4ddc88];return _0x58bcfd;}(function(_0xd9950a,_0x5699ef){const _0x283356=a5_0x58bc,_0x291d0b=_0xd9950a();while(!![]){try{const _0x254593=-parseInt(_0x283356(0x1b5))/0x1*(parseInt(_0x283356(0x1a7))/0x2)+-parseInt(_0x283356(0x1b2))/0x3+parseInt(_0x283356(0x1b1))/0x4+parseInt(_0x283356(0x1a9))/0x5*(-parseInt(_0x283356(0x1ab))/0x6)+-parseInt(_0x283356(0x1b8))/0x7*(parseInt(_0x283356(0x1a6))/0x8)+-parseInt(_0x283356(0x1a8))/0x9*(-parseInt(_0x283356(0x1ac))/0xa)+-parseInt(_0x283356(0x1ae))/0xb*(-parseInt(_0x283356(0x1ad))/0xc);if(_0x254593===_0x5699ef)break;else _0x291d0b['push'](_0x291d0b['shift']());}catch(_0x4dd392){_0x291d0b['push'](_0x291d0b['shift']());}}}(a5_0x4921,0x47507));import{fileURLToPath}from'url';import{dirname,join}from'path';import{readFileSync}from'fs';function a5_0x4921(){const _0x5a8985=['success','parse','3eBCSYg','../../../mock/app-list.json','Mock\x20API\x20error:\x20','259NrvrXE','utf-8','1000TAWraq','35212ncUxmm','4536045yoOotc','2095MiQvBG','data','1812gVEAkm','10hmthYe','28572nUXdHq','1661ZVLBOM','errorMsg','errorCode','636312NmloJm','1639590FluAHk'];a5_0x4921=function(){return _0x5a8985;};return a5_0x4921();}const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function loadMockAppList(){const _0x47917a=a5_0x58bc,_0x26ae7f=join(__dirname,_0x47917a(0x1b6)),_0x38d3a1=readFileSync(_0x26ae7f,_0x47917a(0x1a5));return JSON[_0x47917a(0x1b4)](_0x38d3a1);}let _cached=null;export function getMockAppList(){return!_cached&&(_cached=loadMockAppList()),_cached;}export function getMockRemoteAppItems(){const _0x5ce1dc=a5_0x58bc,_0x33270a=getMockAppList();if(!_0x33270a[_0x5ce1dc(0x1b3)])throw new Error(_0x5ce1dc(0x1b7)+_0x33270a[_0x5ce1dc(0x1af)]+'\x20('+_0x33270a[_0x5ce1dc(0x1b0)]+')');return _0x33270a[_0x5ce1dc(0x1aa)]['tableData'];}
1
+ (function(_0x48fe66,_0x4fee61){const _0x69e092=a5_0x3bd9,_0x33d6b6=_0x48fe66();while(!![]){try{const _0x227b42=-parseInt(_0x69e092(0x1b8))/0x1*(parseInt(_0x69e092(0x1c0))/0x2)+parseInt(_0x69e092(0x1bf))/0x3+parseInt(_0x69e092(0x1b1))/0x4+-parseInt(_0x69e092(0x1be))/0x5*(parseInt(_0x69e092(0x1b7))/0x6)+parseInt(_0x69e092(0x1af))/0x7+-parseInt(_0x69e092(0x1b2))/0x8*(parseInt(_0x69e092(0x1b5))/0x9)+parseInt(_0x69e092(0x1b0))/0xa*(parseInt(_0x69e092(0x1b6))/0xb);if(_0x227b42===_0x4fee61)break;else _0x33d6b6['push'](_0x33d6b6['shift']());}catch(_0x383a9c){_0x33d6b6['push'](_0x33d6b6['shift']());}}}(a5_0x5efc,0xefe2f));import{fileURLToPath}from'url';function a5_0x3bd9(_0xa39091,_0x12e8d8){_0xa39091=_0xa39091-0x1af;const _0x5efc85=a5_0x5efc();let _0x3bd9c8=_0x5efc85[_0xa39091];return _0x3bd9c8;}import{dirname,join}from'path';import{readFileSync}from'fs';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function loadMockAppList(){const _0x2c2107=a5_0x3bd9,_0x26965d=join(__dirname,_0x2c2107(0x1bd)),_0x2cc4ed=readFileSync(_0x26965d,_0x2c2107(0x1b9));return JSON[_0x2c2107(0x1ba)](_0x2cc4ed);}let _cached=null;export function getMockAppList(){return!_cached&&(_cached=loadMockAppList()),_cached;}export function getMockRemoteAppItems(){const _0x1e45dc=a5_0x3bd9,_0x530e0a=getMockAppList();if(!_0x530e0a[_0x1e45dc(0x1b4)])throw new Error(_0x1e45dc(0x1bb)+_0x530e0a['errorMsg']+'\x20('+_0x530e0a[_0x1e45dc(0x1b3)]+')');return _0x530e0a['data'][_0x1e45dc(0x1bc)];}function a5_0x5efc(){const _0x45a0cc=['success','239886nhDycw','22vrLrKg','6neXtop','514bAIYxc','utf-8','parse','Mock\x20API\x20error:\x20','tableData','../../../mock/app-list.json','866345kTUIYq','314610pMsaBx','3676cbCTiL','8339303pzKLjJ','2844070WbnZkB','4140732SadkZI','240RVxzOk','errorCode'];a5_0x5efc=function(){return _0x45a0cc;};return a5_0x5efc();}
@@ -1 +1 @@
1
- (function(_0x434706,_0xee4901){const _0x5780d0=a6_0x7915,_0x566780=_0x434706();while(!![]){try{const _0x2dd2b8=-parseInt(_0x5780d0(0x70))/0x1+-parseInt(_0x5780d0(0x6c))/0x2+parseInt(_0x5780d0(0x69))/0x3+-parseInt(_0x5780d0(0x72))/0x4*(parseInt(_0x5780d0(0x74))/0x5)+parseInt(_0x5780d0(0x68))/0x6+-parseInt(_0x5780d0(0x6d))/0x7+parseInt(_0x5780d0(0x76))/0x8;if(_0x2dd2b8===_0xee4901)break;else _0x566780['push'](_0x566780['shift']());}catch(_0x9e54f0){_0x566780['push'](_0x566780['shift']());}}}(a6_0x521b,0xcd01f));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 _0x38a702=a6_0x7915,_0x29127e=(productEnv(_0x38a702(0x73))||'')[_0x38a702(0x6a)]()[_0x38a702(0x6b)]();return _0x29127e==='mock';}export async function getRemoteAppItems(){if(shouldUseMockRemoteApps())return getMockRemoteAppItems();return getMyApps();}function a6_0x7915(_0x4976a7,_0x3ec995){_0x4976a7=_0x4976a7-0x67;const _0x521b1d=a6_0x521b();let _0x791563=_0x521b1d[_0x4976a7];return _0x791563;}function a6_0x521b(){const _0x3e4135=['1066605YpBCIn','trim','toLowerCase','1562316CqlmLo','6803902osNHNb','mock','items','1489149oUxxyA','fetchedAt','4YsAXpm','APP_LIST_SOURCE','6050615tQPtJF','cache','37431792MUSZuK','toISOString','1545708uKZvaa'];a6_0x521b=function(){return _0x3e4135;};return a6_0x521b();}export async function getRemoteAppList(_0x2d75ef){const _0x24a570=a6_0x7915,{env:_0x3d9cd3,accessKey:_0x47221d,localOnly:localOnly=![],noCache:noCache=![]}=_0x2d75ef,_0x5ab393=readCachedAppList(_0x3d9cd3,_0x47221d),_0x767281=_0x47221d?.[_0x24a570(0x6a)]()?getAppCacheFilePath(_0x3d9cd3,_0x47221d):null;if(localOnly)return{'items':_0x5ab393?.[_0x24a570(0x6f)]??[],'source':_0x24a570(0x75),'fetchedAt':_0x5ab393?.[_0x24a570(0x71)]??null,'cachePath':_0x767281};try{const _0x5e29fc=await getRemoteAppItems(),_0x21ba15=shouldUseMockRemoteApps()?_0x24a570(0x6e):'remote',_0x11e55e=new Date()[_0x24a570(0x67)](),_0x36bfa5=_0x47221d?.[_0x24a570(0x6a)]()?writeCachedAppList(_0x3d9cd3,_0x47221d,{'env':_0x3d9cd3,'fetchedAt':_0x11e55e,'source':_0x21ba15,'items':_0x5e29fc}):null;return{'items':_0x5e29fc,'source':_0x21ba15,'fetchedAt':_0x11e55e,'cachePath':_0x36bfa5};}catch(_0x472fa1){if(!noCache&&_0x5ab393)return{'items':_0x5ab393[_0x24a570(0x6f)],'source':'cache','fetchedAt':_0x5ab393[_0x24a570(0x71)],'cachePath':_0x767281};throw _0x472fa1;}}
1
+ (function(_0x551adb,_0x8575b2){const _0x2e4ed1=a6_0x3ec5,_0x549d99=_0x551adb();while(!![]){try{const _0x44ed9a=-parseInt(_0x2e4ed1(0x112))/0x1*(-parseInt(_0x2e4ed1(0x10e))/0x2)+parseInt(_0x2e4ed1(0x111))/0x3*(-parseInt(_0x2e4ed1(0x117))/0x4)+-parseInt(_0x2e4ed1(0x11a))/0x5+parseInt(_0x2e4ed1(0x10d))/0x6+-parseInt(_0x2e4ed1(0x110))/0x7+parseInt(_0x2e4ed1(0x10f))/0x8+parseInt(_0x2e4ed1(0x113))/0x9*(parseInt(_0x2e4ed1(0x116))/0xa);if(_0x44ed9a===_0x8575b2)break;else _0x549d99['push'](_0x549d99['shift']());}catch(_0x4babc5){_0x549d99['push'](_0x549d99['shift']());}}}(a6_0x3d21,0x41ad9));import{getMyApps}from'../../core/api-client.js';function a6_0x3d21(){const _0x3615b8=['484496rnZlTm','3260012ZDpFfc','38364giTaiy','71gWsxWD','794502HgtNtY','cache','items','90vWiPwc','4YrTLkU','APP_LIST_SOURCE','trim','2379470wFRwRp','fetchedAt','toISOString','1785384AqgOnr','1994aJMZsY'];a6_0x3d21=function(){return _0x3615b8;};return a6_0x3d21();}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 _0x34a7da=a6_0x3ec5,_0x4e4f86=(productEnv(_0x34a7da(0x118))||'')[_0x34a7da(0x119)]()['toLowerCase']();return _0x4e4f86==='mock';}function a6_0x3ec5(_0x326376,_0x3c06bc){_0x326376=_0x326376-0x10c;const _0x3d21b6=a6_0x3d21();let _0x3ec557=_0x3d21b6[_0x326376];return _0x3ec557;}export async function getRemoteAppItems(){if(shouldUseMockRemoteApps())return getMockRemoteAppItems();return getMyApps();}export async function getRemoteAppList(_0x53d72b){const _0x589c42=a6_0x3ec5,{env:_0x418bd0,accessKey:_0x177a44,localOnly:localOnly=![],noCache:noCache=![]}=_0x53d72b,_0x34f5f5=readCachedAppList(_0x418bd0,_0x177a44),_0x52ce02=_0x177a44?.['trim']()?getAppCacheFilePath(_0x418bd0,_0x177a44):null;if(localOnly)return{'items':_0x34f5f5?.[_0x589c42(0x115)]??[],'source':_0x589c42(0x114),'fetchedAt':_0x34f5f5?.[_0x589c42(0x11b)]??null,'cachePath':_0x52ce02};try{const _0x330d45=await getRemoteAppItems(),_0x33b0e7=shouldUseMockRemoteApps()?'mock':'remote',_0x5e7f89=new Date()[_0x589c42(0x10c)](),_0x218475=_0x177a44?.['trim']()?writeCachedAppList(_0x418bd0,_0x177a44,{'env':_0x418bd0,'fetchedAt':_0x5e7f89,'source':_0x33b0e7,'items':_0x330d45}):null;return{'items':_0x330d45,'source':_0x33b0e7,'fetchedAt':_0x5e7f89,'cachePath':_0x218475};}catch(_0x489995){if(!noCache&&_0x34f5f5)return{'items':_0x34f5f5['items'],'source':_0x589c42(0x114),'fetchedAt':_0x34f5f5[_0x589c42(0x11b)],'cachePath':_0x52ce02};throw _0x489995;}}
@@ -1 +1 @@
1
- (function(_0x19930d,_0x22391d){const _0x5f34d6=a7_0x1ac0,_0x44974d=_0x19930d();while(!![]){try{const _0x3df7d0=parseInt(_0x5f34d6(0x1d2))/0x1+parseInt(_0x5f34d6(0x1c6))/0x2*(-parseInt(_0x5f34d6(0x1cf))/0x3)+-parseInt(_0x5f34d6(0x1c8))/0x4*(-parseInt(_0x5f34d6(0x1c7))/0x5)+-parseInt(_0x5f34d6(0x1c9))/0x6+parseInt(_0x5f34d6(0x1d5))/0x7*(parseInt(_0x5f34d6(0x1d1))/0x8)+parseInt(_0x5f34d6(0x1d0))/0x9*(-parseInt(_0x5f34d6(0x1ce))/0xa)+parseInt(_0x5f34d6(0x1cc))/0xb;if(_0x3df7d0===_0x22391d)break;else _0x44974d['push'](_0x44974d['shift']());}catch(_0x3eddf3){_0x44974d['push'](_0x44974d['shift']());}}}(a7_0x37c2,0x96e03));import{CLI_BIN_NAME}from'../../constant/cli.js';function a7_0x37c2(){const _0x1d0e4b=['defaultApp','20209420reZdGz','appcode','10kkDpJP','3BFFHsx','8664327KyUujX','27080mSGGcu','178579yuGuwI','trim','name','518bJhRJI','find','global','currentApp','named','isCurrent','302982GKpfrF','295eiizJH','1268EYiTQA','3316866YYQYLL','appCode'];a7_0x37c2=function(){return _0x1d0e4b;};return a7_0x37c2();}function a7_0x1ac0(_0x363910,_0x480c38){_0x363910=_0x363910-0x1c4;const _0x37c2d6=a7_0x37c2();let _0x1ac087=_0x37c2d6[_0x363910];return _0x1ac087;}import{formatScopeLabel}from'../../commands/common/config-policy.js';export{CLI_BIN_NAME};export function enrichAppListItemsWithMergedSelection(_0x399e6c,_0x471a5d){const _0x4447ff=a7_0x1ac0;if(!_0x471a5d)return;const _0x48683f=!!(_0x471a5d[_0x4447ff(0x1d8)]??_0x471a5d['defaultApp']);for(const _0x45f02e of _0x399e6c){_0x45f02e[_0x4447ff(0x1c5)]=![];}const _0x539e85=_0x471a5d[_0x4447ff(0x1ca)]!=null?String(_0x471a5d[_0x4447ff(0x1ca)])[_0x4447ff(0x1d3)]():'';if(_0x48683f){const _0x59c52e=_0x471a5d['currentApp']??_0x471a5d[_0x4447ff(0x1cb)];if(_0x59c52e){const _0x2d8a22=_0x399e6c[_0x4447ff(0x1d6)](_0x2eb5f=>_0x2eb5f[_0x4447ff(0x1c4)]===!![]&&_0x2eb5f[_0x4447ff(0x1d4)]===_0x59c52e&&_0x2eb5f['definedIn']==='local'),_0x5b2507=_0x2d8a22??_0x399e6c[_0x4447ff(0x1d6)](_0x5c24fa=>_0x5c24fa[_0x4447ff(0x1c4)]===!![]&&_0x5c24fa[_0x4447ff(0x1d4)]===_0x59c52e);_0x5b2507&&(_0x5b2507[_0x4447ff(0x1c5)]=!![]);}return;}if(!_0x539e85)return;for(const _0x4d5f2f of _0x399e6c){String(_0x4d5f2f[_0x4447ff(0x1cd)]??'')['trim']()===_0x539e85&&(_0x4d5f2f[_0x4447ff(0x1c5)]=!![]);}}export{readScopedConfig as readConfig,writeScopedConfig as writeConfig,isInProject}from'../../context.js';export function scopeLabel(_0x33c4f7){const _0x384805=a7_0x1ac0;return formatScopeLabel(_0x33c4f7['global']?_0x384805(0x1d7):'project');}
1
+ (function(_0x4a100c,_0x39029d){const _0x2a7456=a7_0x5aff,_0x2d5826=_0x4a100c();while(!![]){try{const _0x31c4ed=-parseInt(_0x2a7456(0x113))/0x1*(-parseInt(_0x2a7456(0x101))/0x2)+-parseInt(_0x2a7456(0x10e))/0x3*(-parseInt(_0x2a7456(0x110))/0x4)+-parseInt(_0x2a7456(0x10b))/0x5*(parseInt(_0x2a7456(0x111))/0x6)+parseInt(_0x2a7456(0x114))/0x7+-parseInt(_0x2a7456(0x10c))/0x8*(parseInt(_0x2a7456(0xff))/0x9)+parseInt(_0x2a7456(0x100))/0xa+-parseInt(_0x2a7456(0x103))/0xb*(parseInt(_0x2a7456(0x104))/0xc);if(_0x31c4ed===_0x39029d)break;else _0x2d5826['push'](_0x2d5826['shift']());}catch(_0x195cb8){_0x2d5826['push'](_0x2d5826['shift']());}}}(a7_0x4e5c,0x1f4a6));import{CLI_BIN_NAME}from'../../constant/cli.js';function a7_0x4e5c(){const _0x1674d4=['399450KXaOOK','32SbwNTC','project','3714667ofGSXJ','12UJjKxE','appcode','definedIn','named','name','find','isCurrent','5FiHSQu','536SByWrd','currentApp','64431LkEVTd','defaultApp','4yyXFAD','150558mEnVBW','appCode','14620uAGxIz','1666175WCsZFc','trim','5697sqqxmV'];a7_0x4e5c=function(){return _0x1674d4;};return a7_0x4e5c();}import{formatScopeLabel}from'../../commands/common/config-policy.js';function a7_0x5aff(_0x1ce051,_0x1d2ef9){_0x1ce051=_0x1ce051-0xff;const _0x4e5c27=a7_0x4e5c();let _0x5affcf=_0x4e5c27[_0x1ce051];return _0x5affcf;}export{CLI_BIN_NAME};export function enrichAppListItemsWithMergedSelection(_0x148972,_0x2a5446){const _0x2dc5bf=a7_0x5aff;if(!_0x2a5446)return;const _0x569f0b=!!(_0x2a5446[_0x2dc5bf(0x10d)]??_0x2a5446['defaultApp']);for(const _0x301930 of _0x148972){_0x301930[_0x2dc5bf(0x10a)]=![];}const _0x10624d=_0x2a5446[_0x2dc5bf(0x112)]!=null?String(_0x2a5446[_0x2dc5bf(0x112)])[_0x2dc5bf(0x115)]():'';if(_0x569f0b){const _0x13a795=_0x2a5446[_0x2dc5bf(0x10d)]??_0x2a5446[_0x2dc5bf(0x10f)];if(_0x13a795){const _0x30b2eb=_0x148972['find'](_0xa940f6=>_0xa940f6[_0x2dc5bf(0x107)]===!![]&&_0xa940f6['name']===_0x13a795&&_0xa940f6[_0x2dc5bf(0x106)]==='local'),_0x5ac5de=_0x30b2eb??_0x148972[_0x2dc5bf(0x109)](_0xb87ea1=>_0xb87ea1['named']===!![]&&_0xb87ea1[_0x2dc5bf(0x108)]===_0x13a795);_0x5ac5de&&(_0x5ac5de[_0x2dc5bf(0x10a)]=!![]);}return;}if(!_0x10624d)return;for(const _0x3d9414 of _0x148972){String(_0x3d9414[_0x2dc5bf(0x105)]??'')['trim']()===_0x10624d&&(_0x3d9414[_0x2dc5bf(0x10a)]=!![]);}}export{readScopedConfig as readConfig,writeScopedConfig as writeConfig,isInProject}from'../../context.js';export function scopeLabel(_0x398791){const _0x361fe4=a7_0x5aff;return formatScopeLabel(_0x398791['global']?'global':_0x361fe4(0x102));}
@@ -1 +1 @@
1
- const a8_0x57082d=a8_0x3202;(function(_0x4941e7,_0x18d2f1){const _0x54db80=a8_0x3202,_0x529ab7=_0x4941e7();while(!![]){try{const _0x4c9ec4=parseInt(_0x54db80(0xc0))/0x1*(parseInt(_0x54db80(0xc1))/0x2)+parseInt(_0x54db80(0xf2))/0x3*(-parseInt(_0x54db80(0xb5))/0x4)+parseInt(_0x54db80(0xb3))/0x5*(-parseInt(_0x54db80(0xbd))/0x6)+parseInt(_0x54db80(0xc4))/0x7+-parseInt(_0x54db80(0xbf))/0x8*(-parseInt(_0x54db80(0xdc))/0x9)+-parseInt(_0x54db80(0xed))/0xa+parseInt(_0x54db80(0xfa))/0xb;if(_0x4c9ec4===_0x18d2f1)break;else _0x529ab7['push'](_0x529ab7['shift']());}catch(_0xf15ee5){_0x529ab7['push'](_0x529ab7['shift']());}}}(a8_0x3155,0x390ea));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=a8_0x57082d(0xfe),ARTIFACT_SOURCE_AGENT=a8_0x57082d(0xfc),ALLOWED_REACT_MODULE_IMPORTS=[a8_0x57082d(0xe6),a8_0x57082d(0xdb),a8_0x57082d(0x102),a8_0x57082d(0xf3),a8_0x57082d(0xb4),a8_0x57082d(0xda)];export const ALLOWED_REACT_MODULE_IMPORTS_TEXT=ALLOWED_REACT_MODULE_IMPORTS[a8_0x57082d(0xd1)](',\x20');function a8_0x3202(_0x47739b,_0x27d43d){_0x47739b=_0x47739b-0xb3;const _0x315536=a8_0x3155();let _0x32020c=_0x315536[_0x47739b];return _0x32020c;}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':a8_0x57082d(0xc6),'required':!![],'description':a8_0x57082d(0x105)},ARTIFACT_NAME_FLAG={'name':a8_0x57082d(0xb8),'type':a8_0x57082d(0xc6),'description':a8_0x57082d(0xcc)},METADATA_FLAG={'name':a8_0x57082d(0xf1),'type':'string','description':a8_0x57082d(0xc7)};function isPlainObject(_0x7e1847){const _0x35423=a8_0x57082d;return typeof _0x7e1847===_0x35423(0xe5)&&_0x7e1847!==null&&!Array[_0x35423(0x101)](_0x7e1847);}function readSourceFile(_0x5db997){const _0x4009fa=a8_0x57082d;if(!_0x5db997)throw CliErrors[_0x4009fa(0xf6)](_0x4009fa(0xcb));if(!existsSync(_0x5db997))throw CliErrors['validation'](_0x4009fa(0xee)+_0x5db997);if(!statSync(_0x5db997)['isFile']())throw CliErrors[_0x4009fa(0xf6)](_0x4009fa(0xd8)+_0x5db997);const _0xc5605e=readFileSync(_0x5db997,_0x4009fa(0xfb));return validateReactModuleSource(_0xc5605e),_0xc5605e;}function parseMetadata(_0x35e984){const _0x153174=a8_0x57082d;if(!_0x35e984)return undefined;let _0x51e8c7;try{_0x51e8c7=JSON['parse'](_0x35e984);}catch{throw CliErrors[_0x153174(0xf6)](_0x153174(0xd5)+_0x35e984);}if(!isPlainObject(_0x51e8c7))throw CliErrors[_0x153174(0xf6)](_0x153174(0xd4));const _0x116498={..._0x51e8c7};return delete _0x116498[_0x153174(0xb6)],_0x116498;}function getPackageName(_0x3aaa65){const _0x2bfa96=a8_0x57082d;if(_0x3aaa65[_0x2bfa96(0xd6)]('@')){const [_0x580fea,_0x52ec17]=_0x3aaa65[_0x2bfa96(0xcf)]('/');return _0x580fea&&_0x52ec17?_0x580fea+'/'+_0x52ec17:_0x3aaa65;}return _0x3aaa65[_0x2bfa96(0xcf)]('/')[0x0]||_0x3aaa65;}function validateAllowedImports(_0x15aa98){const _0x56b481=a8_0x57082d,_0x8f330d=new Set();for(const _0x24347e of IMPORT_SOURCE_PATTERNS){_0x24347e[_0x56b481(0xc5)]=0x0;let _0x4f3790;while((_0x4f3790=_0x24347e[_0x56b481(0x104)](_0x15aa98))!==null){const _0x4cd3ac=_0x4f3790[0x1]?.['trim']();_0x4cd3ac&&_0x8f330d[_0x56b481(0x100)](_0x4cd3ac);}}const _0x44f524=[..._0x8f330d][_0x56b481(0xdd)](getPackageName)[_0x56b481(0xe1)](_0x541492=>!ALLOWED_REACT_MODULE_IMPORTS['includes'](_0x541492));if(_0x44f524[_0x56b481(0xbb)]>0x0)throw CliErrors[_0x56b481(0xf6)]('react_module\x20imports\x20are\x20limited\x20to:\x20'+ALLOWED_REACT_MODULE_IMPORTS_TEXT+'.\x20Unsupported:\x20'+[...new Set(_0x44f524)][_0x56b481(0xd1)](',\x20'));}export function validateReactModuleSource(_0x4e81f5){const _0x92e618=a8_0x57082d;if(!_0x4e81f5[_0x92e618(0xea)]())throw CliErrors[_0x92e618(0xf6)](_0x92e618(0xf4));if(PAGE_LEVEL_PATTERNS['some'](_0x35b43f=>_0x35b43f[_0x92e618(0xca)](_0x4e81f5)))throw CliErrors[_0x92e618(0xf6)](_0x92e618(0xbe));validateAllowedImports(_0x4e81f5);}function buildArtifactInput(_0x13a345){const _0x2ace22=a8_0x57082d,_0x4ad700=readSourceFile(_0x13a345[_0x2ace22(0xde)]('file')),_0x55fc39=_0x13a345['str']('name')[_0x2ace22(0xea)](),_0x3261ab=parseMetadata(_0x13a345[_0x2ace22(0xde)](_0x2ace22(0xf1)));return{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x55fc39?{'name':_0x55fc39}:{},'content':_0x4ad700,..._0x3261ab?{'metadata':_0x3261ab}:{},'source':ARTIFACT_SOURCE_AGENT};}function summarizeArtifact(_0x2eaeda){const _0x3cb78b=a8_0x57082d;return{'id':_0x2eaeda['id'],'name':_0x2eaeda['name'],'artifactType':_0x2eaeda[_0x3cb78b(0xeb)],'source':_0x2eaeda[_0x3cb78b(0xb7)],'favorite':_0x2eaeda[_0x3cb78b(0xc9)],'deleted':_0x2eaeda[_0x3cb78b(0x103)],'createTime':_0x2eaeda[_0x3cb78b(0xc3)],'updateTime':_0x2eaeda['updateTime']};}function detailArtifact(_0x33c54c){const _0x46e5af=a8_0x57082d;return{'id':_0x33c54c['id'],'appCode':_0x33c54c[_0x46e5af(0xd7)],'name':_0x33c54c['name'],'artifactType':_0x33c54c[_0x46e5af(0xeb)],'source':_0x33c54c['source'],'favorite':_0x33c54c[_0x46e5af(0xc9)],'deleted':_0x33c54c['deleted'],'content':_0x33c54c[_0x46e5af(0xd9)]??'','compiledContent':_0x33c54c['compiledContent'],'metadata':_0x33c54c['metadata']??{},'createTime':_0x33c54c['createTime'],'updateTime':_0x33c54c[_0x46e5af(0xdf)]};}function readFavoriteFlag(_0x3d214b){const _0x3adea9=a8_0x57082d,_0x2350cc=_0x3d214b[_0x3adea9(0xcd)]('favorite');return _0x2350cc===undefined||_0x2350cc===null||_0x2350cc===''?undefined:_0x3d214b[_0x3adea9(0xf5)](_0x3adea9(0xc9));}function a8_0x3155(){const _0x1a7a75=['name','Preview:\x20create\x20react_module\x20Artifact','detail','length','Artifact\x20ID','6492kfsVYb','react_module\x20must\x20be\x20an\x20embeddable\x20React\x20module,\x20not\x20full\x20HTML\x20or\x20a\x20ReactDOM/createRoot\x20mount\x20entry.','8kRoTKj','4jyLiWE','199460ayATMT','Updated\x20Artifact\x20','createTime','95781SgHNkZ','lastIndex','string','Artifact\x20metadata\x20as\x20JSON\x20object;\x20compiledContent\x20is\x20stripped','/client/artifact/create','favorite','test','File\x20path\x20is\x20required.','Artifact\x20display\x20name','flag','boolean','split','body','join','list','POST','--metadata\x20must\x20be\x20a\x20JSON\x20object.','Invalid\x20JSON\x20for\x20--metadata:\x20','startsWith','appCode','File\x20is\x20not\x20a\x20regular\x20file:\x20','content','@ant-design/icons','react-dom','2531943PMBmaw','map','str','updateTime','Show\x20one\x20Artifact\x20by\x20id','filter','verbose','description','update','object','react','num','write','Create\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','trim','artifactType','Update\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','2355880sOStSL','File\x20not\x20found:\x20','List\x20current-app\x20react_module\x20Artifacts','Optional\x20source\x20filter,\x20for\x20example\x20AGENT','metadata','141oAoqXt','dayjs','Artifact\x20source\x20file\x20is\x20blank.','bool','validation','artifact','Created\x20Artifact\x20','read','3868502tgZBSM','utf8','AGENT','/client/artifact/','react_module','build','add','isArray','lodash','deleted','exec','Path\x20to\x20a\x20local\x20UTF-8\x20React\x20module\x20source\x20file','1900iPykzQ','antd','14056jZQKOp','compiledContent','source'];a8_0x3155=function(){return _0x1a7a75;};return a8_0x3155();}const artifactList={'service':a8_0x57082d(0xf7),'command':a8_0x57082d(0xd2),'description':a8_0x57082d(0xef),'risk':a8_0x57082d(0xf9),'flags':[{'name':'source','type':'string','description':a8_0x57082d(0xf0)},{'name':a8_0x57082d(0xc9),'type':a8_0x57082d(0xce),'description':'Optional\x20favorite-state\x20filter'},VERBOSE_FLAG],async 'execute'(_0x256a37){const _0x4be56b=a8_0x57082d,_0x4f81bf=await listRuntimeArtifacts(_0x256a37[_0x4be56b(0xd7)],{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x256a37[_0x4be56b(0xde)](_0x4be56b(0xb7))?{'source':_0x256a37[_0x4be56b(0xde)](_0x4be56b(0xb7))}:{},...readFavoriteFlag(_0x256a37)!==undefined?{'favorite':readFavoriteFlag(_0x256a37)}:{}});return{'ok':!![],'data':{'total':_0x4f81bf[_0x4be56b(0xbb)],'items':_0x256a37[_0x4be56b(0xf5)](_0x4be56b(0xe2))?_0x4f81bf:_0x4f81bf['map'](summarizeArtifact)}};}},artifactDetail={'service':a8_0x57082d(0xf7),'command':a8_0x57082d(0xba),'description':a8_0x57082d(0xe0),'risk':a8_0x57082d(0xf9),'flags':[{...ID_FLAG,'description':'Artifact\x20ID'}],async 'execute'(_0x15f83a){const _0x22ddef=a8_0x57082d,_0x23682d=await getRuntimeArtifact(_0x15f83a[_0x22ddef(0xe7)]('id'),_0x15f83a[_0x22ddef(0xd7)]);return{'ok':!![],'data':detailArtifact(_0x23682d)};}},artifactCreate={'service':a8_0x57082d(0xf7),'command':'create','description':a8_0x57082d(0xe9),'risk':a8_0x57082d(0xe8),'flags':[FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x130751){const _0x3c0c82=a8_0x57082d,_0x9d9ec7=buildArtifactInput(_0x130751),_0x20cac7=await createRuntimeArtifact(_0x130751[_0x3c0c82(0xd7)],_0x9d9ec7);return{'ok':!![],'data':detailArtifact(_0x20cac7),'message':_0x3c0c82(0xf8)+_0x20cac7['id']+(_0x20cac7[_0x3c0c82(0xb8)]?'\x20('+_0x20cac7[_0x3c0c82(0xb8)]+')':'')};},async 'dryRun'(_0x4527e7){const _0x40372d=a8_0x57082d,_0x3120dc=buildArtifactInput(_0x4527e7);return dryRun('POST',_0x40372d(0xc8))[_0x40372d(0xd0)]({'appCode':_0x4527e7[_0x40372d(0xd7)],..._0x3120dc})['description'](_0x40372d(0xb9))[_0x40372d(0xff)]();}},artifactUpdate={'service':'artifact','command':a8_0x57082d(0xe4),'description':a8_0x57082d(0xec),'risk':a8_0x57082d(0xe8),'flags':[{...ID_FLAG,'description':a8_0x57082d(0xbc)},FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x1fd00a){const _0x48449d=a8_0x57082d,_0x53392d=_0x1fd00a[_0x48449d(0xe7)]('id'),_0x120d15=buildArtifactInput(_0x1fd00a),_0x2190af=await updateRuntimeArtifact(_0x53392d,_0x1fd00a[_0x48449d(0xd7)],_0x120d15);return{'ok':!![],'data':detailArtifact(_0x2190af),'message':_0x48449d(0xc2)+_0x2190af['id']+(_0x2190af['name']?'\x20('+_0x2190af[_0x48449d(0xb8)]+')':'')};},async 'dryRun'(_0x260662){const _0x172e06=a8_0x57082d,_0x22663e=_0x260662[_0x172e06(0xe7)]('id'),_0x1c86c5=buildArtifactInput(_0x260662);return dryRun(_0x172e06(0xd3),_0x172e06(0xfd)+_0x22663e+'/update')[_0x172e06(0xd0)]({'appCode':_0x260662[_0x172e06(0xd7)],..._0x1c86c5})[_0x172e06(0xe3)]('Preview:\x20update\x20react_module\x20Artifact\x20'+_0x22663e)[_0x172e06(0xff)]();}};export const artifactDefinitions=[artifactList,artifactDetail,artifactCreate,artifactUpdate];
1
+ const a8_0x343c13=a8_0x1c0a;(function(_0x30a037,_0x8bf550){const _0x5079a7=a8_0x1c0a,_0x2502c5=_0x30a037();while(!![]){try{const _0x2c3c66=-parseInt(_0x5079a7(0xc5))/0x1*(parseInt(_0x5079a7(0xb2))/0x2)+parseInt(_0x5079a7(0xb1))/0x3+-parseInt(_0x5079a7(0xaa))/0x4+parseInt(_0x5079a7(0xce))/0x5+parseInt(_0x5079a7(0xb7))/0x6*(-parseInt(_0x5079a7(0xaf))/0x7)+parseInt(_0x5079a7(0xb9))/0x8+parseInt(_0x5079a7(0xe0))/0x9;if(_0x2c3c66===_0x8bf550)break;else _0x2502c5['push'](_0x2502c5['shift']());}catch(_0x3e75a6){_0x2502c5['push'](_0x2502c5['shift']());}}}(a8_0x2b79,0xd06bb));function a8_0x1c0a(_0x46eadd,_0x1ee405){_0x46eadd=_0x46eadd-0x95;const _0x2b79c1=a8_0x2b79();let _0x1c0acb=_0x2b79c1[_0x46eadd];return _0x1c0acb;}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=a8_0x343c13(0xde),ARTIFACT_SOURCE_AGENT=a8_0x343c13(0xc8),ALLOWED_REACT_MODULE_IMPORTS=[a8_0x343c13(0xc4),a8_0x343c13(0x95),'lodash',a8_0x343c13(0x96),a8_0x343c13(0xa3),'@ant-design/icons'];export const ALLOWED_REACT_MODULE_IMPORTS_TEXT=ALLOWED_REACT_MODULE_IMPORTS[a8_0x343c13(0xd4)](',\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':a8_0x343c13(0xc7),'type':a8_0x343c13(0x9a),'required':!![],'description':a8_0x343c13(0xdb)},ARTIFACT_NAME_FLAG={'name':a8_0x343c13(0xc3),'type':'string','description':'Artifact\x20display\x20name'},METADATA_FLAG={'name':a8_0x343c13(0xb5),'type':'string','description':a8_0x343c13(0xa6)};function isPlainObject(_0x58a384){const _0x4bf33c=a8_0x343c13;return typeof _0x58a384===_0x4bf33c(0xa1)&&_0x58a384!==null&&!Array[_0x4bf33c(0xd1)](_0x58a384);}function readSourceFile(_0x42738c){const _0x43cf88=a8_0x343c13;if(!_0x42738c)throw CliErrors[_0x43cf88(0xa8)]('File\x20path\x20is\x20required.');if(!existsSync(_0x42738c))throw CliErrors[_0x43cf88(0xa8)](_0x43cf88(0xdd)+_0x42738c);if(!statSync(_0x42738c)[_0x43cf88(0x9b)]())throw CliErrors[_0x43cf88(0xa8)](_0x43cf88(0xc9)+_0x42738c);const _0x384f8a=readFileSync(_0x42738c,'utf8');return validateReactModuleSource(_0x384f8a),_0x384f8a;}function parseMetadata(_0x1fa2d7){const _0x45a9f8=a8_0x343c13;if(!_0x1fa2d7)return undefined;let _0x350300;try{_0x350300=JSON[_0x45a9f8(0xd8)](_0x1fa2d7);}catch{throw CliErrors['validation'](_0x45a9f8(0xc1)+_0x1fa2d7);}if(!isPlainObject(_0x350300))throw CliErrors['validation'](_0x45a9f8(0xd5));const _0x19e17d={..._0x350300};return delete _0x19e17d[_0x45a9f8(0xcc)],_0x19e17d;}function getPackageName(_0x589a8c){const _0x1d4f15=a8_0x343c13;if(_0x589a8c[_0x1d4f15(0xc6)]('@')){const [_0x3dedde,_0x597c94]=_0x589a8c['split']('/');return _0x3dedde&&_0x597c94?_0x3dedde+'/'+_0x597c94:_0x589a8c;}return _0x589a8c[_0x1d4f15(0xd6)]('/')[0x0]||_0x589a8c;}function validateAllowedImports(_0x511ba6){const _0x4f198b=a8_0x343c13,_0x3c3829=new Set();for(const _0x18904d of IMPORT_SOURCE_PATTERNS){_0x18904d[_0x4f198b(0xbc)]=0x0;let _0x2c061d;while((_0x2c061d=_0x18904d[_0x4f198b(0xba)](_0x511ba6))!==null){const _0x32b47c=_0x2c061d[0x1]?.[_0x4f198b(0xac)]();_0x32b47c&&_0x3c3829[_0x4f198b(0xab)](_0x32b47c);}}const _0x35a303=[..._0x3c3829]['map'](getPackageName)[_0x4f198b(0xbd)](_0x26669c=>!ALLOWED_REACT_MODULE_IMPORTS['includes'](_0x26669c));if(_0x35a303[_0x4f198b(0xd7)]>0x0)throw CliErrors['validation'](_0x4f198b(0xa0)+ALLOWED_REACT_MODULE_IMPORTS_TEXT+'.\x20Unsupported:\x20'+[...new Set(_0x35a303)]['join'](',\x20'));}export function validateReactModuleSource(_0x4cab6b){const _0xb3b91c=a8_0x343c13;if(!_0x4cab6b['trim']())throw CliErrors[_0xb3b91c(0xa8)](_0xb3b91c(0xa7));if(PAGE_LEVEL_PATTERNS['some'](_0x492ab0=>_0x492ab0[_0xb3b91c(0xcf)](_0x4cab6b)))throw CliErrors['validation'](_0xb3b91c(0xb3));validateAllowedImports(_0x4cab6b);}function buildArtifactInput(_0xecb70d){const _0x39b9c5=a8_0x343c13,_0x452144=readSourceFile(_0xecb70d[_0x39b9c5(0xe3)](_0x39b9c5(0xc7))),_0x53f197=_0xecb70d[_0x39b9c5(0xe3)](_0x39b9c5(0xc3))[_0x39b9c5(0xac)](),_0x2999cb=parseMetadata(_0xecb70d[_0x39b9c5(0xe3)](_0x39b9c5(0xb5)));return{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x53f197?{'name':_0x53f197}:{},'content':_0x452144,..._0x2999cb?{'metadata':_0x2999cb}:{},'source':ARTIFACT_SOURCE_AGENT};}function summarizeArtifact(_0xb51520){const _0x178092=a8_0x343c13;return{'id':_0xb51520['id'],'name':_0xb51520[_0x178092(0xc3)],'artifactType':_0xb51520[_0x178092(0xca)],'source':_0xb51520[_0x178092(0xb8)],'favorite':_0xb51520[_0x178092(0xcd)],'deleted':_0xb51520[_0x178092(0xd3)],'createTime':_0xb51520['createTime'],'updateTime':_0xb51520[_0x178092(0xc2)]};}function detailArtifact(_0x2fce4d){const _0x5920ca=a8_0x343c13;return{'id':_0x2fce4d['id'],'appCode':_0x2fce4d[_0x5920ca(0xb6)],'name':_0x2fce4d[_0x5920ca(0xc3)],'artifactType':_0x2fce4d[_0x5920ca(0xca)],'source':_0x2fce4d[_0x5920ca(0xb8)],'favorite':_0x2fce4d[_0x5920ca(0xcd)],'deleted':_0x2fce4d[_0x5920ca(0xd3)],'content':_0x2fce4d[_0x5920ca(0xdf)]??'','compiledContent':_0x2fce4d[_0x5920ca(0xcc)],'metadata':_0x2fce4d['metadata']??{},'createTime':_0x2fce4d[_0x5920ca(0xb4)],'updateTime':_0x2fce4d['updateTime']};}function readFavoriteFlag(_0x452b5a){const _0x602934=a8_0x343c13,_0x3ede77=_0x452b5a[_0x602934(0x99)]('favorite');return _0x3ede77===undefined||_0x3ede77===null||_0x3ede77===''?undefined:_0x452b5a[_0x602934(0x9c)](_0x602934(0xcd));}const artifactList={'service':a8_0x343c13(0xc0),'command':a8_0x343c13(0xd0),'description':a8_0x343c13(0x97),'risk':'read','flags':[{'name':a8_0x343c13(0xb8),'type':'string','description':a8_0x343c13(0xd2)},{'name':a8_0x343c13(0xcd),'type':a8_0x343c13(0x98),'description':a8_0x343c13(0xa5)},VERBOSE_FLAG],async 'execute'(_0x293914){const _0x49bb7=a8_0x343c13,_0x5f47c0=await listRuntimeArtifacts(_0x293914[_0x49bb7(0xb6)],{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x293914['str'](_0x49bb7(0xb8))?{'source':_0x293914['str'](_0x49bb7(0xb8))}:{},...readFavoriteFlag(_0x293914)!==undefined?{'favorite':readFavoriteFlag(_0x293914)}:{}});return{'ok':!![],'data':{'total':_0x5f47c0[_0x49bb7(0xd7)],'items':_0x293914[_0x49bb7(0x9c)](_0x49bb7(0x9e))?_0x5f47c0:_0x5f47c0[_0x49bb7(0xae)](summarizeArtifact)}};}},artifactDetail={'service':'artifact','command':a8_0x343c13(0x9d),'description':a8_0x343c13(0xe2),'risk':a8_0x343c13(0xd9),'flags':[{...ID_FLAG,'description':a8_0x343c13(0xcb)}],async 'execute'(_0x35beca){const _0x4c7f10=a8_0x343c13,_0x1e5967=await getRuntimeArtifact(_0x35beca['num']('id'),_0x35beca[_0x4c7f10(0xb6)]);return{'ok':!![],'data':detailArtifact(_0x1e5967)};}},artifactCreate={'service':a8_0x343c13(0xc0),'command':a8_0x343c13(0xbb),'description':'Create\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','risk':a8_0x343c13(0xbe),'flags':[FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x73310b){const _0x4e3cb7=a8_0x343c13,_0x235ba7=buildArtifactInput(_0x73310b),_0x5ccee5=await createRuntimeArtifact(_0x73310b[_0x4e3cb7(0xb6)],_0x235ba7);return{'ok':!![],'data':detailArtifact(_0x5ccee5),'message':_0x4e3cb7(0xe4)+_0x5ccee5['id']+(_0x5ccee5[_0x4e3cb7(0xc3)]?'\x20('+_0x5ccee5[_0x4e3cb7(0xc3)]+')':'')};},async 'dryRun'(_0x3bdb4f){const _0x4bd965=a8_0x343c13,_0x5efe9d=buildArtifactInput(_0x3bdb4f);return dryRun(_0x4bd965(0xe1),_0x4bd965(0xbf))['body']({'appCode':_0x3bdb4f[_0x4bd965(0xb6)],..._0x5efe9d})[_0x4bd965(0xb0)](_0x4bd965(0xad))[_0x4bd965(0xa9)]();}},artifactUpdate={'service':a8_0x343c13(0xc0),'command':a8_0x343c13(0xdc),'description':a8_0x343c13(0xa2),'risk':'write','flags':[{...ID_FLAG,'description':a8_0x343c13(0xcb)},FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x4aec43){const _0x33fb7f=a8_0x343c13,_0x562f7d=_0x4aec43[_0x33fb7f(0x9f)]('id'),_0x401dc7=buildArtifactInput(_0x4aec43),_0xe5deb7=await updateRuntimeArtifact(_0x562f7d,_0x4aec43[_0x33fb7f(0xb6)],_0x401dc7);return{'ok':!![],'data':detailArtifact(_0xe5deb7),'message':'Updated\x20Artifact\x20'+_0xe5deb7['id']+(_0xe5deb7[_0x33fb7f(0xc3)]?'\x20('+_0xe5deb7[_0x33fb7f(0xc3)]+')':'')};},async 'dryRun'(_0x31f464){const _0x34ed4f=a8_0x343c13,_0x41f079=_0x31f464[_0x34ed4f(0x9f)]('id'),_0x43dd9b=buildArtifactInput(_0x31f464);return dryRun('POST',_0x34ed4f(0xda)+_0x41f079+'/update')['body']({'appCode':_0x31f464[_0x34ed4f(0xb6)],..._0x43dd9b})[_0x34ed4f(0xb0)](_0x34ed4f(0xa4)+_0x41f079)['build']();}};function a8_0x2b79(){const _0x43e63a=['name','react','391PbWENd','startsWith','file','AGENT','File\x20is\x20not\x20a\x20regular\x20file:\x20','artifactType','Artifact\x20ID','compiledContent','favorite','2195580RPiMFn','test','list','isArray','Optional\x20source\x20filter,\x20for\x20example\x20AGENT','deleted','join','--metadata\x20must\x20be\x20a\x20JSON\x20object.','split','length','parse','read','/client/artifact/','Path\x20to\x20a\x20local\x20UTF-8\x20React\x20module\x20source\x20file','update','File\x20not\x20found:\x20','react_module','content','13007709NCUgPO','POST','Show\x20one\x20Artifact\x20by\x20id','str','Created\x20Artifact\x20','react-dom','dayjs','List\x20current-app\x20react_module\x20Artifacts','boolean','flag','string','isFile','bool','detail','verbose','num','react_module\x20imports\x20are\x20limited\x20to:\x20','object','Update\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','antd','Preview:\x20update\x20react_module\x20Artifact\x20','Optional\x20favorite-state\x20filter','Artifact\x20metadata\x20as\x20JSON\x20object;\x20compiledContent\x20is\x20stripped','Artifact\x20source\x20file\x20is\x20blank.','validation','build','3579384DocEMI','add','trim','Preview:\x20create\x20react_module\x20Artifact','map','4268663QexZWn','description','63294OJNfao','42PONFgX','react_module\x20must\x20be\x20an\x20embeddable\x20React\x20module,\x20not\x20full\x20HTML\x20or\x20a\x20ReactDOM/createRoot\x20mount\x20entry.','createTime','metadata','appCode','12oNLjOH','source','8566808ambLRe','exec','create','lastIndex','filter','write','/client/artifact/create','artifact','Invalid\x20JSON\x20for\x20--metadata:\x20','updateTime'];a8_0x2b79=function(){return _0x43e63a;};return a8_0x2b79();}export const artifactDefinitions=[artifactList,artifactDetail,artifactCreate,artifactUpdate];
@@ -1 +1 @@
1
- const a9_0x39d6f7=a9_0x2842;(function(_0x30db9f,_0x347e08){const _0x4d4472=a9_0x2842,_0x563478=_0x30db9f();while(!![]){try{const _0x4bdf2f=-parseInt(_0x4d4472(0x1a5))/0x1+-parseInt(_0x4d4472(0x1a3))/0x2*(-parseInt(_0x4d4472(0x1c6))/0x3)+parseInt(_0x4d4472(0x194))/0x4+-parseInt(_0x4d4472(0x1ae))/0x5*(parseInt(_0x4d4472(0x1ec))/0x6)+parseInt(_0x4d4472(0x1c7))/0x7+-parseInt(_0x4d4472(0x1d5))/0x8+parseInt(_0x4d4472(0x1af))/0x9;if(_0x4bdf2f===_0x347e08)break;else _0x563478['push'](_0x563478['shift']());}catch(_0x38023d){_0x563478['push'](_0x563478['shift']());}}}(a9_0x2f2c,0xe37b6));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';function a9_0x2842(_0x45da5e,_0x2ff6ea){_0x45da5e=_0x45da5e-0x193;const _0x2f2cb8=a9_0x2f2c();let _0x2842be=_0x2f2cb8[_0x45da5e];return _0x2842be;}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 _0x29e45e=a9_0x2842;writeCliSideChannelLine(_0x29e45e(0x1a2)+PRODUCT_CONFIG[_0x29e45e(0x1c1)]+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine(_0x29e45e(0x1d2)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x29e45e(0x1d9));}function a9_0x2f2c(){const _0x185e44=['production','\x20auth\x20status','=ak_xxx','development','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','322tnZmVw','Option\x20C:\x20environment\x20variable','1076965zMvljB','nonInteractive','read','\x20(via\x20','daily','global','\x20doctor','Read\x20from\x20global\x20config\x20(default)','Then\x20verify\x20with:\x20','5TujGWm','17675001Zihtxa','trim','slice','logout','Auth\x20mode:\x20','\x20config.\x20Nothing\x20to\x20clear.','project','validation','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','Use\x20`','string','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','\x20Current\x20env:\x20','Clear\x20accessKey\x20from\x20config','test','AccessKey\x20cleared\x20from\x20','userCenterDisplayName','global-default','stdin','newConfigFileName','envName','10953GzuiAP','4795777aYZcTq','yes','AccessKey\x20saved\x20to\x20','Option\x20A:\x20','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','str','join','auth','accessKey','Clear\x20from\x20global\x20config\x20(default)','Invalid\x20accessKey\x20format:\x20\x22','Tip:\x20you\x20can\x20also\x20run:','Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config','\x20scope.','6918048bWDxiu','Show\x20current\x20authentication\x20status','isTTY','status','\x20auth\x20login\x20--access-key\x20<ak_xxx>','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','No\x20AccessKey\x20found\x20in\x20','AccessKey:\x20','AccessKey\x20(ak_xxx...)','info','access-key','Option\x20B:\x20apps\x20config\x20(','ClientAk','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','`auth\x20login`\x20does\x20not\x20support\x20--yes.','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','length','write','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','push','ACCESS_KEY','Missing\x20accessKey.','init','3041586fgsOzz','login','574428nqUsHF','Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','\x20Verify:\x20','Shorthand\x20for\x20--access-key','bool','Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','boolean','stdout','Write\x20to\x20global\x20config\x20(default)','env'];a9_0x2f2c=function(){return _0x185e44;};return a9_0x2f2c();}function buildAccessKeySetupGuide(){const _0x5b2084=a9_0x2842;return[_0x5b2084(0x1a2)+PRODUCT_CONFIG[_0x5b2084(0x1c1)]+':',USER_ACCESS_KEY_CREATE_URL,_0x5b2084(0x1bb)+CLI_BIN_NAME+_0x5b2084(0x1bc)]['join']('\x0a');}function canPromptForAccessKey(_0x538278){const _0x28faea=a9_0x2842;return!_0x538278[_0x28faea(0x1a6)]&&process[_0x28faea(0x1c3)][_0x28faea(0x1d7)]!==![]&&process[_0x28faea(0x19b)][_0x28faea(0x1d7)]!==![];}function resolveAuthScopeFlags(_0x1415f7){const _0x595014=a9_0x2842;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x1415f7['bool'](_0x595014(0x1aa)),'explicitProject':_0x1415f7[_0x595014(0x198)](_0x595014(0x1b5)),'policy':_0x595014(0x1c2)}));}async function resolveAuthWriteInput(_0x319c59){const _0x7ee59b=a9_0x2842;let _0x104baf=(_0x319c59[_0x7ee59b(0x1cc)](_0x7ee59b(0x1df))||_0x319c59[_0x7ee59b(0x1cc)]('ak')||'')[_0x7ee59b(0x1b0)]();const _0x83dec4=(_0x319c59['str'](_0x7ee59b(0x19d))||'')['trim']();if(!_0x104baf&&canPromptForAccessKey(_0x319c59))try{showAccessKeyCreateHint(),_0x104baf=await promptAccessKey('');}catch(_0x23acf2){if(isAbortPrompt(_0x23acf2))throw CliErrors['cancelled']();throw _0x23acf2;}if(!_0x104baf)throw CliErrors[_0x7ee59b(0x1b6)](_0x7ee59b(0x1ea),buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN[_0x7ee59b(0x1bf)](_0x104baf))throw CliErrors[_0x7ee59b(0x1b6)](_0x7ee59b(0x1d1)+_0x104baf+'\x22',_0x7ee59b(0x1e4));if(!_0x83dec4)return{'accessKey':_0x104baf};const _0x5d9e4c=normalizeEnv(_0x83dec4);return{'accessKey':_0x104baf,'env':isDaily(_0x5d9e4c)?_0x7ee59b(0x1a9):isDev(_0x5d9e4c)?_0x7ee59b(0x1a1):_0x7ee59b(0x19e)};}export const authDefinitions=[{'service':a9_0x39d6f7(0x1ce),'command':a9_0x39d6f7(0x193),'description':a9_0x39d6f7(0x199),'risk':a9_0x39d6f7(0x1e6),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a9_0x39d6f7(0x1df),'type':a9_0x39d6f7(0x1b9),'description':a9_0x39d6f7(0x1dd)},{'name':'ak','type':'string','description':a9_0x39d6f7(0x197)},{'name':a9_0x39d6f7(0x1aa),'type':a9_0x39d6f7(0x19a),'description':a9_0x39d6f7(0x19c),'default':!![]},{'name':a9_0x39d6f7(0x1b5),'type':a9_0x39d6f7(0x19a),'description':a9_0x39d6f7(0x1e2),'default':![]}],async 'execute'(_0x1b279a){const _0x901e8d=a9_0x39d6f7;if(_0x1b279a[_0x901e8d(0x198)](_0x901e8d(0x1c8)))throw CliErrors[_0x901e8d(0x1b6)](_0x901e8d(0x1e3),_0x901e8d(0x1b8)+CLI_BIN_NAME+_0x901e8d(0x1da)+CLI_BIN_NAME+'\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.');const _0xc32545=(_0x1b279a[_0x901e8d(0x1cc)](_0x901e8d(0x1df))||_0x1b279a['str']('ak')||'')['trim']();if(!_0xc32545&&_0x1b279a[_0x901e8d(0x1a6)])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x351426=await resolveAuthWriteInput(_0x1b279a),_0x5389df=resolveAuthScopeFlags(_0x1b279a),_0x4b5a4c=readScopedConfig(_0x5389df);_0x4b5a4c[_0x901e8d(0x1cf)]=_0x351426['accessKey'];_0x351426[_0x901e8d(0x19d)]&&(_0x4b5a4c['env']=_0x351426[_0x901e8d(0x19d)]);writeScopedConfig(_0x4b5a4c,_0x5389df);const _0x470076=_0x5389df[_0x901e8d(0x1aa)]?'global':'project',_0x3aa17f=_0x4b5a4c[_0x901e8d(0x19d)]?_0x901e8d(0x1bd)+_0x4b5a4c['env']+'.':'';return{'ok':!![],'message':_0x901e8d(0x1c9)+_0x470076+'\x20config.'+_0x3aa17f+_0x901e8d(0x196)+CLI_BIN_NAME+_0x901e8d(0x19f)};}},{'service':a9_0x39d6f7(0x1ce),'command':a9_0x39d6f7(0x1eb),'description':a9_0x39d6f7(0x195),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a9_0x39d6f7(0x1df),'type':'string','description':a9_0x39d6f7(0x1dd)},{'name':'ak','type':a9_0x39d6f7(0x1b9),'description':a9_0x39d6f7(0x197)},{'name':a9_0x39d6f7(0x19d),'type':a9_0x39d6f7(0x1b9),'description':a9_0x39d6f7(0x1d3)},{'name':a9_0x39d6f7(0x1aa),'type':'boolean','description':a9_0x39d6f7(0x19c),'default':!![]},{'name':'project','type':'boolean','description':'Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x5f5bba){const _0x2de273=a9_0x39d6f7,_0x37bf03=await resolveAuthWriteInput(_0x5f5bba),_0x3f9483=resolveAuthScopeFlags(_0x5f5bba),_0x54dc17={'accessKey':_0x37bf03['accessKey']};_0x37bf03[_0x2de273(0x19d)]&&(_0x54dc17[_0x2de273(0x19d)]=_0x37bf03[_0x2de273(0x19d)]);writeScopedConfig(_0x54dc17,_0x3f9483);const _0x306d0c=_0x3f9483[_0x2de273(0x1aa)]?_0x2de273(0x1aa):_0x2de273(0x1b5),_0x3e6fea=_0x54dc17[_0x2de273(0x19d)]?'\x20Current\x20env:\x20'+_0x54dc17['env']+'.':'';return{'ok':!![],'message':'Auth\x20config\x20reinitialized\x20in\x20'+_0x306d0c+_0x2de273(0x1d4)+_0x3e6fea+'\x20Verify:\x20'+CLI_BIN_NAME+_0x2de273(0x19f)};}},{'service':'auth','command':a9_0x39d6f7(0x1b2),'description':a9_0x39d6f7(0x1be),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a9_0x39d6f7(0x1aa),'type':a9_0x39d6f7(0x19a),'description':a9_0x39d6f7(0x1d0),'default':!![]},{'name':'project','type':a9_0x39d6f7(0x19a),'description':a9_0x39d6f7(0x1cb),'default':![]}],async 'execute'(_0x514cf4){const _0x3b2859=a9_0x39d6f7,_0x4a2f53=resolveAuthScopeFlags(_0x514cf4),_0x4fc939=readScopedConfig(_0x4a2f53),_0x410e87=!!_0x4fc939[_0x3b2859(0x1cf)];delete _0x4fc939[_0x3b2859(0x1cf)],writeScopedConfig(_0x4fc939,_0x4a2f53);const _0x2a7ba2=_0x4a2f53[_0x3b2859(0x1aa)]?_0x3b2859(0x1aa):_0x3b2859(0x1b5);if(_0x410e87)return{'ok':!![],'message':_0x3b2859(0x1c0)+_0x2a7ba2+'\x20config.'};return{'ok':!![],'message':_0x3b2859(0x1db)+_0x2a7ba2+_0x3b2859(0x1b4)};}},{'service':a9_0x39d6f7(0x1ce),'command':a9_0x39d6f7(0x1d8),'description':a9_0x39d6f7(0x1d6),'risk':a9_0x39d6f7(0x1a7),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a9_0x39d6f7(0x1aa),'type':'boolean','description':a9_0x39d6f7(0x1ac),'default':!![]},{'name':'project','type':a9_0x39d6f7(0x19a),'description':a9_0x39d6f7(0x1ba),'default':![]}],async 'execute'(_0x115b65){const _0x138a2e=a9_0x39d6f7,_0x3e22e3=resolveAuthScopeFlags(_0x115b65),_0x592ba3=readScopedConfig(_0x3e22e3),_0x372562=productEnvName(_0x138a2e(0x1e9)),_0xa759a2=productEnv('ACCESS_KEY')||undefined,_0x216999=_0x592ba3['accessKey']||undefined,_0x373497=_0xa759a2||_0x216999,_0x28f064=_0xa759a2?_0x372562+'\x20env\x20var':_0x216999?(_0x3e22e3[_0x138a2e(0x1aa)]?_0x138a2e(0x1aa):_0x138a2e(0x1b5))+'\x20config':null,_0x3ae3c2=[_0x138a2e(0x1b3)+AUTH_MODE[_0x138a2e(0x1e1)]];if(_0x373497){const _0xf184db=_0x373497[_0x138a2e(0x1e5)]>0x8?''+_0x373497[_0x138a2e(0x1b1)](0x0,0x8)+'*'['repeat'](_0x373497[_0x138a2e(0x1e5)]-0x8):_0x373497;_0x3ae3c2['push'](_0x138a2e(0x1dc)+_0xf184db+(_0x28f064?_0x138a2e(0x1a8)+_0x28f064+')':''));}return!_0x373497&&(_0x3ae3c2[_0x138a2e(0x1e8)](''),_0x3ae3c2['push']('No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:'),_0x3ae3c2[_0x138a2e(0x1e8)](''),_0x3ae3c2[_0x138a2e(0x1e8)](_0x138a2e(0x1ca)+CLI_BIN_NAME+'\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]'),_0x3ae3c2[_0x138a2e(0x1e8)](''),_0x3ae3c2[_0x138a2e(0x1e8)](_0x138a2e(0x1e0)+PRODUCT_CONFIG[_0x138a2e(0x1c4)]+')'),_0x3ae3c2[_0x138a2e(0x1e8)]('{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}'),_0x3ae3c2[_0x138a2e(0x1e8)](''),_0x3ae3c2[_0x138a2e(0x1e8)](_0x138a2e(0x1a4)),_0x3ae3c2['push']('\x20\x20export\x20'+_0x372562+_0x138a2e(0x1a0)),_0x3ae3c2[_0x138a2e(0x1e8)](''),_0x3ae3c2['push'](_0x138a2e(0x1ad)+CLI_BIN_NAME+_0x138a2e(0x19f)),_0x3ae3c2[_0x138a2e(0x1e8)](_0x138a2e(0x1b7)+CLI_BIN_NAME+_0x138a2e(0x1ab))),{'ok':!![],'message':_0x3ae3c2[_0x138a2e(0x1cd)]('\x0a')};}},{'service':a9_0x39d6f7(0x1ce),'command':a9_0x39d6f7(0x1de),'description':a9_0x39d6f7(0x1e7),'risk':a9_0x39d6f7(0x1a7),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x32ffe9){const _0x4a693e=a9_0x39d6f7,_0x3f1f46=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x3f1f46,'meta':{'env':_0x32ffe9[_0x4a693e(0x1c5)]??'production'}}};}}];
1
+ const a9_0x4d62a2=a9_0x27df;(function(_0x42958f,_0x2495f0){const _0x4e1936=a9_0x27df,_0x2cccf1=_0x42958f();while(!![]){try{const _0x5471c5=-parseInt(_0x4e1936(0x112))/0x1+parseInt(_0x4e1936(0x106))/0x2+parseInt(_0x4e1936(0x126))/0x3+parseInt(_0x4e1936(0x156))/0x4*(parseInt(_0x4e1936(0x146))/0x5)+parseInt(_0x4e1936(0x12c))/0x6+-parseInt(_0x4e1936(0x11b))/0x7+-parseInt(_0x4e1936(0x107))/0x8;if(_0x5471c5===_0x2495f0)break;else _0x2cccf1['push'](_0x2cccf1['shift']());}catch(_0x2fd6c7){_0x2cccf1['push'](_0x2cccf1['shift']());}}}(a9_0x85f7,0xb7dfb));import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a9_0x27df(_0x2e2051,_0x1f8c47){_0x2e2051=_0x2e2051-0x103;const _0x85f7e7=a9_0x85f7();let _0x27df95=_0x85f7e7[_0x2e2051];return _0x27df95;}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 _0x4c59f3=a9_0x27df;writeCliSideChannelLine(_0x4c59f3(0x12a)+PRODUCT_CONFIG[_0x4c59f3(0x147)]+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine(_0x4c59f3(0x150)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x4c59f3(0x127));}function a9_0x85f7(){const _0x455ed7=['\x20doctor','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','production','658805JKnnsg','yes','Then\x20verify\x20with:\x20','AccessKey:\x20','push','AccessKey\x20saved\x20to\x20','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','project','trim','10342283PhhpjY','Clear\x20accessKey\x20from\x20config','Clear\x20from\x20global\x20config\x20(default)','ACCESS_KEY','newConfigFileName','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','isTTY','global-default','validation','repeat','daily','3767976KOlFfW','\x20auth\x20login\x20--access-key\x20<ak_xxx>','No\x20AccessKey\x20found\x20in\x20','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','\x20config.','2403498jHtOlh','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','bool','\x20config.\x20Nothing\x20to\x20clear.','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','Shorthand\x20for\x20--access-key','init','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','Auth\x20mode:\x20','\x20scope.','write','stdout','env','boolean','\x20config','string','AccessKey\x20cleared\x20from\x20','cancelled','Write\x20to\x20global\x20config\x20(default)','Show\x20current\x20authentication\x20status','\x20Current\x20env:\x20','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','slice','Missing\x20accessKey.','status','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','40EgmPKp','userCenterDisplayName','read','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','login','Option\x20B:\x20apps\x20config\x20(','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','Option\x20C:\x20environment\x20variable','auth','info','Tip:\x20you\x20can\x20also\x20run:','access-key','\x20(via\x20','nonInteractive','ClientAk','development','555248Jiyabc','global','Use\x20`','\x20auth\x20status','accessKey','str','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','1499596TlYORo','5019584OKHFfP','logout','length','\x20Verify:\x20','join','AccessKey\x20(ak_xxx...)','\x20\x20export\x20','Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config'];a9_0x85f7=function(){return _0x455ed7;};return a9_0x85f7();}function buildAccessKeySetupGuide(){const _0x35ed9=a9_0x27df;return[_0x35ed9(0x12a)+PRODUCT_CONFIG[_0x35ed9(0x147)]+':',USER_ACCESS_KEY_CREATE_URL,_0x35ed9(0x118)+CLI_BIN_NAME+_0x35ed9(0x130)]['join']('\x0a');}function canPromptForAccessKey(_0x1b40ff){const _0x3a01c3=a9_0x27df;return!_0x1b40ff['nonInteractive']&&process['stdin'][_0x3a01c3(0x121)]!==![]&&process[_0x3a01c3(0x137)][_0x3a01c3(0x121)]!==![];}function resolveAuthScopeFlags(_0x525fde){const _0x3739e7=a9_0x27df;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x525fde[_0x3739e7(0x12e)](_0x3739e7(0x157)),'explicitProject':_0x525fde[_0x3739e7(0x12e)](_0x3739e7(0x119)),'policy':_0x3739e7(0x122)}));}async function resolveAuthWriteInput(_0xf6194b){const _0x57ac3e=a9_0x27df;let _0x4b01af=(_0xf6194b[_0x57ac3e(0x104)](_0x57ac3e(0x151))||_0xf6194b[_0x57ac3e(0x104)]('ak')||'')[_0x57ac3e(0x11a)]();const _0x320b90=(_0xf6194b[_0x57ac3e(0x104)](_0x57ac3e(0x138))||'')['trim']();if(!_0x4b01af&&canPromptForAccessKey(_0xf6194b))try{showAccessKeyCreateHint(),_0x4b01af=await promptAccessKey('');}catch(_0x5bbecb){if(isAbortPrompt(_0x5bbecb))throw CliErrors[_0x57ac3e(0x13d)]();throw _0x5bbecb;}if(!_0x4b01af)throw CliErrors[_0x57ac3e(0x123)](_0x57ac3e(0x143),buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN['test'](_0x4b01af))throw CliErrors[_0x57ac3e(0x123)]('Invalid\x20accessKey\x20format:\x20\x22'+_0x4b01af+'\x22',_0x57ac3e(0x145));if(!_0x320b90)return{'accessKey':_0x4b01af};const _0x23cc9e=normalizeEnv(_0x320b90);return{'accessKey':_0x4b01af,'env':isDaily(_0x23cc9e)?_0x57ac3e(0x125):isDev(_0x23cc9e)?_0x57ac3e(0x155):_0x57ac3e(0x111)};}export const authDefinitions=[{'service':a9_0x4d62a2(0x14e),'command':a9_0x4d62a2(0x14a),'description':'Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','risk':a9_0x4d62a2(0x136),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a9_0x4d62a2(0x151),'type':a9_0x4d62a2(0x13b),'description':a9_0x4d62a2(0x10c)},{'name':'ak','type':a9_0x4d62a2(0x13b),'description':'Shorthand\x20for\x20--access-key'},{'name':a9_0x4d62a2(0x157),'type':a9_0x4d62a2(0x139),'description':'Write\x20to\x20global\x20config\x20(default)','default':!![]},{'name':'project','type':a9_0x4d62a2(0x139),'description':a9_0x4d62a2(0x105),'default':![]}],async 'execute'(_0x356fc8){const _0x5d75b9=a9_0x4d62a2;if(_0x356fc8[_0x5d75b9(0x12e)](_0x5d75b9(0x113)))throw CliErrors[_0x5d75b9(0x123)]('`auth\x20login`\x20does\x20not\x20support\x20--yes.',_0x5d75b9(0x158)+CLI_BIN_NAME+_0x5d75b9(0x110)+CLI_BIN_NAME+_0x5d75b9(0x14c));const _0x7b0aa6=(_0x356fc8[_0x5d75b9(0x104)]('access-key')||_0x356fc8[_0x5d75b9(0x104)]('ak')||'')[_0x5d75b9(0x11a)]();if(!_0x7b0aa6&&_0x356fc8[_0x5d75b9(0x153)])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x58fcaf=await resolveAuthWriteInput(_0x356fc8),_0x3d0bb5=resolveAuthScopeFlags(_0x356fc8),_0x310ca8=readScopedConfig(_0x3d0bb5);_0x310ca8[_0x5d75b9(0x103)]=_0x58fcaf[_0x5d75b9(0x103)];_0x58fcaf[_0x5d75b9(0x138)]&&(_0x310ca8[_0x5d75b9(0x138)]=_0x58fcaf[_0x5d75b9(0x138)]);writeScopedConfig(_0x310ca8,_0x3d0bb5);const _0x315ba7=_0x3d0bb5[_0x5d75b9(0x157)]?'global':_0x5d75b9(0x119),_0xad2f6e=_0x310ca8[_0x5d75b9(0x138)]?'\x20Current\x20env:\x20'+_0x310ca8[_0x5d75b9(0x138)]+'.':'';return{'ok':!![],'message':_0x5d75b9(0x117)+_0x315ba7+_0x5d75b9(0x12b)+_0xad2f6e+_0x5d75b9(0x10a)+CLI_BIN_NAME+_0x5d75b9(0x159)};}},{'service':a9_0x4d62a2(0x14e),'command':a9_0x4d62a2(0x132),'description':'Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','risk':a9_0x4d62a2(0x136),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'access-key','type':a9_0x4d62a2(0x13b),'description':a9_0x4d62a2(0x10c)},{'name':'ak','type':a9_0x4d62a2(0x13b),'description':a9_0x4d62a2(0x131)},{'name':a9_0x4d62a2(0x138),'type':a9_0x4d62a2(0x13b),'description':a9_0x4d62a2(0x10e)},{'name':'global','type':'boolean','description':a9_0x4d62a2(0x13e),'default':!![]},{'name':a9_0x4d62a2(0x119),'type':a9_0x4d62a2(0x139),'description':a9_0x4d62a2(0x105),'default':![]}],async 'execute'(_0x10c899){const _0x130365=a9_0x4d62a2,_0x511e8c=await resolveAuthWriteInput(_0x10c899),_0x5d2fca=resolveAuthScopeFlags(_0x10c899),_0x58c7b9={'accessKey':_0x511e8c['accessKey']};_0x511e8c[_0x130365(0x138)]&&(_0x58c7b9[_0x130365(0x138)]=_0x511e8c[_0x130365(0x138)]);writeScopedConfig(_0x58c7b9,_0x5d2fca);const _0x5e1c35=_0x5d2fca[_0x130365(0x157)]?_0x130365(0x157):_0x130365(0x119),_0x86739d=_0x58c7b9[_0x130365(0x138)]?_0x130365(0x140)+_0x58c7b9[_0x130365(0x138)]+'.':'';return{'ok':!![],'message':'Auth\x20config\x20reinitialized\x20in\x20'+_0x5e1c35+_0x130365(0x135)+_0x86739d+'\x20Verify:\x20'+CLI_BIN_NAME+_0x130365(0x159)};}},{'service':a9_0x4d62a2(0x14e),'command':a9_0x4d62a2(0x108),'description':a9_0x4d62a2(0x11c),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a9_0x4d62a2(0x157),'type':'boolean','description':a9_0x4d62a2(0x11d),'default':!![]},{'name':'project','type':a9_0x4d62a2(0x139),'description':'Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x1dd38d){const _0x51b62c=a9_0x4d62a2,_0x548796=resolveAuthScopeFlags(_0x1dd38d),_0x23c9a3=readScopedConfig(_0x548796),_0x150364=!!_0x23c9a3[_0x51b62c(0x103)];delete _0x23c9a3[_0x51b62c(0x103)],writeScopedConfig(_0x23c9a3,_0x548796);const _0x1fcc04=_0x548796[_0x51b62c(0x157)]?_0x51b62c(0x157):_0x51b62c(0x119);if(_0x150364)return{'ok':!![],'message':_0x51b62c(0x13c)+_0x1fcc04+'\x20config.'};return{'ok':!![],'message':_0x51b62c(0x128)+_0x1fcc04+_0x51b62c(0x12f)};}},{'service':a9_0x4d62a2(0x14e),'command':a9_0x4d62a2(0x144),'description':a9_0x4d62a2(0x13f),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a9_0x4d62a2(0x157),'type':a9_0x4d62a2(0x139),'description':'Read\x20from\x20global\x20config\x20(default)','default':!![]},{'name':a9_0x4d62a2(0x119),'type':a9_0x4d62a2(0x139),'description':a9_0x4d62a2(0x12d),'default':![]}],async 'execute'(_0x308f88){const _0x5e7473=a9_0x4d62a2,_0x3ba1b1=resolveAuthScopeFlags(_0x308f88),_0x5c6f85=readScopedConfig(_0x3ba1b1),_0x261cf3=productEnvName(_0x5e7473(0x11e)),_0x40e34c=productEnv(_0x5e7473(0x11e))||undefined,_0x4b9e25=_0x5c6f85[_0x5e7473(0x103)]||undefined,_0x39e9e5=_0x40e34c||_0x4b9e25,_0x5f088d=_0x40e34c?_0x261cf3+'\x20env\x20var':_0x4b9e25?(_0x3ba1b1[_0x5e7473(0x157)]?_0x5e7473(0x157):_0x5e7473(0x119))+_0x5e7473(0x13a):null,_0x401d63=[_0x5e7473(0x134)+AUTH_MODE[_0x5e7473(0x154)]];if(_0x39e9e5){const _0x62d17c=_0x39e9e5[_0x5e7473(0x109)]>0x8?''+_0x39e9e5[_0x5e7473(0x142)](0x0,0x8)+'*'[_0x5e7473(0x124)](_0x39e9e5[_0x5e7473(0x109)]-0x8):_0x39e9e5;_0x401d63[_0x5e7473(0x116)](_0x5e7473(0x115)+_0x62d17c+(_0x5f088d?_0x5e7473(0x152)+_0x5f088d+')':''));}return!_0x39e9e5&&(_0x401d63[_0x5e7473(0x116)](''),_0x401d63[_0x5e7473(0x116)](_0x5e7473(0x129)),_0x401d63['push'](''),_0x401d63[_0x5e7473(0x116)]('Option\x20A:\x20'+CLI_BIN_NAME+_0x5e7473(0x149)),_0x401d63[_0x5e7473(0x116)](''),_0x401d63['push'](_0x5e7473(0x14b)+PRODUCT_CONFIG[_0x5e7473(0x11f)]+')'),_0x401d63[_0x5e7473(0x116)](_0x5e7473(0x133)),_0x401d63['push'](''),_0x401d63[_0x5e7473(0x116)](_0x5e7473(0x14d)),_0x401d63[_0x5e7473(0x116)](_0x5e7473(0x10d)+_0x261cf3+'=ak_xxx'),_0x401d63['push'](''),_0x401d63[_0x5e7473(0x116)](_0x5e7473(0x114)+CLI_BIN_NAME+_0x5e7473(0x159)),_0x401d63[_0x5e7473(0x116)](_0x5e7473(0x141)+CLI_BIN_NAME+_0x5e7473(0x10f))),{'ok':!![],'message':_0x401d63[_0x5e7473(0x10b)]('\x0a')};}},{'service':'auth','command':a9_0x4d62a2(0x14f),'description':a9_0x4d62a2(0x120),'risk':a9_0x4d62a2(0x148),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0xc3d289){const _0x286cd6=a9_0x4d62a2,_0x5a1e1f=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x5a1e1f,'meta':{'env':_0xc3d289['envName']??_0x286cd6(0x111)}}};}}];
@@ -1 +1 @@
1
- (function(_0x4e7170,_0xf14162){const _0x1cf076=a10_0x235b,_0x452ee7=_0x4e7170();while(!![]){try{const _0x1f7ffe=parseInt(_0x1cf076(0x1e6))/0x1+-parseInt(_0x1cf076(0x1d8))/0x2+parseInt(_0x1cf076(0x1e9))/0x3+-parseInt(_0x1cf076(0x1ea))/0x4+parseInt(_0x1cf076(0x1e0))/0x5*(-parseInt(_0x1cf076(0x1db))/0x6)+-parseInt(_0x1cf076(0x1dc))/0x7*(parseInt(_0x1cf076(0x1dd))/0x8)+parseInt(_0x1cf076(0x1d5))/0x9;if(_0x1f7ffe===_0xf14162)break;else _0x452ee7['push'](_0x452ee7['shift']());}catch(_0x634fac){_0x452ee7['push'](_0x452ee7['shift']());}}}(a10_0x426c,0xe82bf));import{createInterface}from'node:readline';class AbortPrompt extends Error{constructor(){const _0x5431bc=a10_0x235b;super(_0x5431bc(0x1e7)),this[_0x5431bc(0x1e3)]=_0x5431bc(0x1d4);}}function createSafeRl(){const _0x3b0829=a10_0x235b,_0x2eb2e6=createInterface({'input':process[_0x3b0829(0x1da)],'output':process[_0x3b0829(0x1df)]});let _0xc42984;const _0x1f2ffa=new Promise((_0x4b3b18,_0x5372fb)=>{const _0x89e9ec=_0x3b0829;_0xc42984=()=>{const _0x2b7aae=a10_0x235b;_0xc42984&&(_0x2eb2e6[_0x2b7aae(0x1e8)]('SIGINT',_0xc42984),_0xc42984=undefined);try{_0x2eb2e6[_0x2b7aae(0x1d9)]();}catch{}_0x5372fb(new AbortPrompt());},_0x2eb2e6[_0x89e9ec(0x1de)](_0x89e9ec(0x1d7),_0xc42984);}),_0x18d2fa=()=>{const _0x40f7ae=_0x3b0829;_0xc42984&&(_0x2eb2e6[_0x40f7ae(0x1e8)](_0x40f7ae(0x1d7),_0xc42984),_0xc42984=undefined);try{_0x2eb2e6[_0x40f7ae(0x1d9)]();}catch{}};return{'rl':_0x2eb2e6,'abortPromise':_0x1f2ffa,'disposeSuccess':_0x18d2fa};}function a10_0x426c(){const _0x296fa1=['AbortPrompt','16261407GYwaGy','race','SIGINT','1937342ynborm','close','stdin','126cHAuQO','1057672JeXGmu','64uAxLjk','once','stdout','9400XDuEQP','question','AccessKey\x20(','name','AccessKey\x20(paste\x20ak_...):\x20','):\x20','177245ZPZiFZ','User\x20aborted\x20prompt','removeListener','4854966nCMKuC','1737984vMpjkQ'];a10_0x426c=function(){return _0x296fa1;};return a10_0x426c();}function a10_0x235b(_0x4154c3,_0x200ce0){_0x4154c3=_0x4154c3-0x1d4;const _0x426c8f=a10_0x426c();let _0x235b87=_0x426c8f[_0x4154c3];return _0x235b87;}export async function promptAccessKey(_0x4c19b2=''){const _0x38c9ca=a10_0x235b,{rl:_0xe7d047,abortPromise:_0x3cbccd,disposeSuccess:_0x159a0d}=createSafeRl(),_0xa3e5a0=new Promise(_0x5aaa91=>{const _0x3953a5=a10_0x235b,_0x459e3c=_0x4c19b2?_0x3953a5(0x1e2)+_0x4c19b2+_0x3953a5(0x1e5):_0x3953a5(0x1e4);_0xe7d047[_0x3953a5(0x1e1)](_0x459e3c,_0x33fcb1=>{_0x159a0d(),_0x5aaa91(_0x33fcb1['trim']()||_0x4c19b2);});});return Promise[_0x38c9ca(0x1d6)]([_0xa3e5a0,_0x3cbccd]);}export function isAbortPrompt(_0x2dc2fa){const _0x1c6a3b=a10_0x235b;return _0x2dc2fa instanceof Error&&_0x2dc2fa[_0x1c6a3b(0x1e3)]===_0x1c6a3b(0x1d4);}
1
+ (function(_0x2c4766,_0x19bdcf){const _0x154798=a10_0x70af,_0x2eb4d5=_0x2c4766();while(!![]){try{const _0x57b104=parseInt(_0x154798(0xd1))/0x1+-parseInt(_0x154798(0xd8))/0x2*(-parseInt(_0x154798(0xc6))/0x3)+-parseInt(_0x154798(0xd9))/0x4+-parseInt(_0x154798(0xca))/0x5*(-parseInt(_0x154798(0xcf))/0x6)+parseInt(_0x154798(0xc8))/0x7+-parseInt(_0x154798(0xd6))/0x8+-parseInt(_0x154798(0xce))/0x9*(parseInt(_0x154798(0xc9))/0xa);if(_0x57b104===_0x19bdcf)break;else _0x2eb4d5['push'](_0x2eb4d5['shift']());}catch(_0x5da9ca){_0x2eb4d5['push'](_0x2eb4d5['shift']());}}}(a10_0x18ff,0x50615));function a10_0x70af(_0x510ec5,_0x12785f){_0x510ec5=_0x510ec5-0xc5;const _0x18ff78=a10_0x18ff();let _0x70afbd=_0x18ff78[_0x510ec5];return _0x70afbd;}import{createInterface}from'node:readline';function a10_0x18ff(){const _0x11bfb8=['6505bfQGVz','removeListener','User\x20aborted\x20prompt','trim','39222PKAThA','210VDVXDj','race','332473IKAfhU','AccessKey\x20(paste\x20ak_...):\x20','stdin','stdout','AbortPrompt','3632928PAwmMZ','question','138ZhOiPn','688000hYmEbq','close','AccessKey\x20(','name','26391mWPldo','SIGINT','1531306rBsEMu','570PCOUOP'];a10_0x18ff=function(){return _0x11bfb8;};return a10_0x18ff();}class AbortPrompt extends Error{constructor(){const _0x33f118=a10_0x70af;super(_0x33f118(0xcc)),this[_0x33f118(0xc5)]=_0x33f118(0xd5);}}function createSafeRl(){const _0x53e777=a10_0x70af,_0x539319=createInterface({'input':process[_0x53e777(0xd3)],'output':process[_0x53e777(0xd4)]});let _0x68e69b;const _0x79e2a6=new Promise((_0x21b6e1,_0x1b71bc)=>{const _0x7a76b6=_0x53e777;_0x68e69b=()=>{const _0x33010d=a10_0x70af;_0x68e69b&&(_0x539319[_0x33010d(0xcb)](_0x33010d(0xc7),_0x68e69b),_0x68e69b=undefined);try{_0x539319[_0x33010d(0xda)]();}catch{}_0x1b71bc(new AbortPrompt());},_0x539319['once'](_0x7a76b6(0xc7),_0x68e69b);}),_0x4f42f5=()=>{const _0x5ba51c=_0x53e777;_0x68e69b&&(_0x539319[_0x5ba51c(0xcb)](_0x5ba51c(0xc7),_0x68e69b),_0x68e69b=undefined);try{_0x539319['close']();}catch{}};return{'rl':_0x539319,'abortPromise':_0x79e2a6,'disposeSuccess':_0x4f42f5};}export async function promptAccessKey(_0x432ed2=''){const _0x55e14c=a10_0x70af,{rl:_0x2f3dd8,abortPromise:_0x43e8b6,disposeSuccess:_0x27a879}=createSafeRl(),_0x3f0d3b=new Promise(_0x1b11b4=>{const _0xd18645=a10_0x70af,_0x174a31=_0x432ed2?_0xd18645(0xdb)+_0x432ed2+'):\x20':_0xd18645(0xd2);_0x2f3dd8[_0xd18645(0xd7)](_0x174a31,_0x11826d=>{const _0x5b6ef9=_0xd18645;_0x27a879(),_0x1b11b4(_0x11826d[_0x5b6ef9(0xcd)]()||_0x432ed2);});});return Promise[_0x55e14c(0xd0)]([_0x3f0d3b,_0x43e8b6]);}export function isAbortPrompt(_0x313cda){const _0x11f813=a10_0x70af;return _0x313cda instanceof Error&&_0x313cda[_0x11f813(0xc5)]===_0x11f813(0xd5);}
@@ -1 +1 @@
1
- const a11_0x4e0185=a11_0x107f;(function(_0x1f88a0,_0x164c04){const _0x3614ef=a11_0x107f,_0x3bfb4a=_0x1f88a0();while(!![]){try{const _0x5a2d0d=parseInt(_0x3614ef(0xf3))/0x1+parseInt(_0x3614ef(0xf7))/0x2*(parseInt(_0x3614ef(0xf2))/0x3)+parseInt(_0x3614ef(0xfd))/0x4+parseInt(_0x3614ef(0xf9))/0x5*(-parseInt(_0x3614ef(0xea))/0x6)+parseInt(_0x3614ef(0xfe))/0x7+parseInt(_0x3614ef(0xee))/0x8+-parseInt(_0x3614ef(0xe9))/0x9*(parseInt(_0x3614ef(0xf4))/0xa);if(_0x5a2d0d===_0x164c04)break;else _0x3bfb4a['push'](_0x3bfb4a['shift']());}catch(_0x221897){_0x3bfb4a['push'](_0x3bfb4a['shift']());}}}(a11_0xa3c0,0xe9d6b));import{getBffScriptInfo}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';function a11_0xa3c0(){const _0x4c4a06=['6UHhrPZ','(none)','scriptType','num','5567576KVnhTJ','detail','createdTime','Script\x20ID','84qGcEyV','563096qyyaTP','3830IbuvmE','appCode','bff','57302jcfKRf','updatedTime','6098990BllMJB','verbose','functionName','description','6780920LFTbVh','11757648ACklOz','read','76572VxLypD'];a11_0xa3c0=function(){return _0x4c4a06;};return a11_0xa3c0();}function a11_0x107f(_0x17d3e0,_0x22e934){_0x17d3e0=_0x17d3e0-0xe8;const _0xa3c03a=a11_0xa3c0();let _0x107fad=_0xa3c03a[_0x17d3e0];return _0x107fad;}export const bffDetail={'service':a11_0x4e0185(0xf6),'command':a11_0x4e0185(0xef),'description':'Get\x20BFF\x20script\x20details\x20by\x20ID','risk':a11_0x4e0185(0xe8),'flags':[{...ID_FLAG,'description':a11_0x4e0185(0xf1)},VERBOSE_FLAG],async 'execute'(_0x236d7e){const _0x5a6914=a11_0x4e0185,_0x2049d0=await getBffScriptInfo(_0x236d7e[_0x5a6914(0xed)]('id')),_0x2dab63=_0x236d7e['bool'](_0x5a6914(0xfa));if(_0x2dab63)return{'ok':!![],'data':_0x2049d0};return{'ok':!![],'data':{'id':_0x2049d0['id'],'appCode':_0x2049d0[_0x5a6914(0xf5)],'functionName':_0x2049d0[_0x5a6914(0xfb)]??'','scriptType':_0x2049d0[_0x5a6914(0xec)],'description':_0x2049d0[_0x5a6914(0xfc)]||_0x5a6914(0xeb),'createdTime':_0x2049d0[_0x5a6914(0xf0)]??'','updatedTime':_0x2049d0[_0x5a6914(0xf8)]??''}};}};
1
+ const a11_0x26f35b=a11_0x1803;function a11_0x1803(_0x42dea5,_0x4b7e45){_0x42dea5=_0x42dea5-0x124;const _0x5047b8=a11_0x5047();let _0x180385=_0x5047b8[_0x42dea5];return _0x180385;}function a11_0x5047(){const _0x277c1d=['9691120foaRUG','7iXORBA','9mdOvUv','699138sLxIQx','145SnkPPc','21650OwXtCZ','functionName','verbose','read','11yrhKPM','15003096JBpKbn','updatedTime','1157396iQERmu','2316FscnYz','appCode','num','6018136RoYMEF','detail','scriptType','Script\x20ID','createdTime','(none)','8476aKaJev','bool'];a11_0x5047=function(){return _0x277c1d;};return a11_0x5047();}(function(_0x30c341,_0x2988bd){const _0x1d7f71=a11_0x1803,_0x588723=_0x30c341();while(!![]){try{const _0x1f39c9=parseInt(_0x1d7f71(0x126))/0x1*(parseInt(_0x1d7f71(0x138))/0x2)+-parseInt(_0x1d7f71(0x124))/0x3*(parseInt(_0x1d7f71(0x12e))/0x4)+-parseInt(_0x1d7f71(0x127))/0x5*(parseInt(_0x1d7f71(0x12f))/0x6)+-parseInt(_0x1d7f71(0x13b))/0x7*(-parseInt(_0x1d7f71(0x132))/0x8)+-parseInt(_0x1d7f71(0x125))/0x9+-parseInt(_0x1d7f71(0x13a))/0xa*(-parseInt(_0x1d7f71(0x12b))/0xb)+parseInt(_0x1d7f71(0x12c))/0xc;if(_0x1f39c9===_0x2988bd)break;else _0x588723['push'](_0x588723['shift']());}catch(_0xfc713c){_0x588723['push'](_0x588723['shift']());}}}(a11_0x5047,0xec94e));import{getBffScriptInfo}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';export const bffDetail={'service':'bff','command':a11_0x26f35b(0x133),'description':'Get\x20BFF\x20script\x20details\x20by\x20ID','risk':a11_0x26f35b(0x12a),'flags':[{...ID_FLAG,'description':a11_0x26f35b(0x135)},VERBOSE_FLAG],async 'execute'(_0x519e23){const _0x388a82=a11_0x26f35b,_0x24004c=await getBffScriptInfo(_0x519e23[_0x388a82(0x131)]('id')),_0x51ac74=_0x519e23[_0x388a82(0x139)](_0x388a82(0x129));if(_0x51ac74)return{'ok':!![],'data':_0x24004c};return{'ok':!![],'data':{'id':_0x24004c['id'],'appCode':_0x24004c[_0x388a82(0x130)],'functionName':_0x24004c[_0x388a82(0x128)]??'','scriptType':_0x24004c[_0x388a82(0x134)],'description':_0x24004c['description']||_0x388a82(0x137),'createdTime':_0x24004c[_0x388a82(0x136)]??'','updatedTime':_0x24004c[_0x388a82(0x12d)]??''}};}};
@@ -1 +1 @@
1
- const a12_0x4e27e0=a12_0x29fc;(function(_0x100b24,_0xbeebc0){const _0x2231b4=a12_0x29fc,_0x2ab87e=_0x100b24();while(!![]){try{const _0x588480=-parseInt(_0x2231b4(0x78))/0x1*(-parseInt(_0x2231b4(0x7a))/0x2)+-parseInt(_0x2231b4(0x72))/0x3*(parseInt(_0x2231b4(0x75))/0x4)+-parseInt(_0x2231b4(0x79))/0x5+parseInt(_0x2231b4(0x77))/0x6+-parseInt(_0x2231b4(0x76))/0x7+parseInt(_0x2231b4(0x70))/0x8+-parseInt(_0x2231b4(0x73))/0x9*(-parseInt(_0x2231b4(0x7c))/0xa);if(_0x588480===_0xbeebc0)break;else _0x2ab87e['push'](_0x2ab87e['shift']());}catch(_0x5792f7){_0x2ab87e['push'](_0x2ab87e['shift']());}}}(a12_0xf414,0xde3d3));function a12_0x29fc(_0x517ac9,_0xe922eb){_0x517ac9=_0x517ac9-0x6c;const _0xf41415=a12_0xf414();let _0x29fcc7=_0xf41415[_0x517ac9];return _0x29fcc7;}import{executeSdkBff}from'../../core/sdk-client.js';import{parseJsonParams}from'../../utils/params.js';import{NAME_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';function a12_0xf414(){const _0x595655=['now','280xZTcME','4499642JHFFtO','8498058xxMygy','1385815xqzJFK','5328610kQsDOG','2AXsVqv','read','5216480TkLAtH','exec','bff','BFF\x20function\x20name\x20to\x20execute','BFF\x20executed\x20in\x20','params','5116024oaUMIl','str','57621rDFyQv','9CGOZcn'];a12_0xf414=function(){return _0x595655;};return a12_0xf414();}export const bffExec={'service':a12_0x4e27e0(0x6c),'command':a12_0x4e27e0(0x7d),'description':'Execute\x20a\x20BFF\x20script\x20by\x20function\x20name','risk':a12_0x4e27e0(0x7b),'flags':[{...NAME_FLAG,'required':!![],'description':a12_0x4e27e0(0x6d)},PARAMS_FLAG],async 'execute'(_0x474e7d){const _0x19f327=a12_0x4e27e0,_0x5ed9e6=parseJsonParams(_0x474e7d[_0x19f327(0x71)](_0x19f327(0x6f))),_0x5dc8e9=Date[_0x19f327(0x74)](),_0x3f0c5b=await executeSdkBff(_0x474e7d[_0x19f327(0x71)]('name'),_0x5ed9e6),_0x99ec=Date[_0x19f327(0x74)]()-_0x5dc8e9;return{'ok':!![],'data':{'result':_0x3f0c5b,'elapsed':_0x99ec},'message':_0x19f327(0x6e)+_0x99ec+'ms'};}};
1
+ const a12_0x203353=a12_0xd29b;(function(_0x32a5d7,_0xe3e94f){const _0x1d29d4=a12_0xd29b,_0x4b3a3b=_0x32a5d7();while(!![]){try{const _0x2eb60b=-parseInt(_0x1d29d4(0xc7))/0x1*(parseInt(_0x1d29d4(0xbc))/0x2)+parseInt(_0x1d29d4(0xb5))/0x3+-parseInt(_0x1d29d4(0xc8))/0x4*(-parseInt(_0x1d29d4(0xc5))/0x5)+parseInt(_0x1d29d4(0xb8))/0x6*(-parseInt(_0x1d29d4(0xb7))/0x7)+parseInt(_0x1d29d4(0xc4))/0x8+parseInt(_0x1d29d4(0xbd))/0x9*(-parseInt(_0x1d29d4(0xb6))/0xa)+-parseInt(_0x1d29d4(0xbb))/0xb*(-parseInt(_0x1d29d4(0xc3))/0xc);if(_0x2eb60b===_0xe3e94f)break;else _0x4b3a3b['push'](_0x4b3a3b['shift']());}catch(_0x1e46e3){_0x4b3a3b['push'](_0x4b3a3b['shift']());}}}(a12_0x38f3,0x8ff5f));import{executeSdkBff}from'../../core/sdk-client.js';import{parseJsonParams}from'../../utils/params.js';function a12_0x38f3(){const _0x185632=['bff','Execute\x20a\x20BFF\x20script\x20by\x20function\x20name','now','BFF\x20function\x20name\x20to\x20execute','params','132XZYolO','2095848VwdHcz','2100620VAbeRJ','exec','1PFPHJg','4otxLpA','BFF\x20executed\x20in\x20','2068845keeIiq','310GTBJgm','39452xilDbU','132utpSmC','str','read','565147wbCfAl','1008706tRfDAG','208701xpoCIq'];a12_0x38f3=function(){return _0x185632;};return a12_0x38f3();}import{NAME_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';function a12_0xd29b(_0x599780,_0x4b1501){_0x599780=_0x599780-0xb4;const _0x38f37d=a12_0x38f3();let _0xd29bf1=_0x38f37d[_0x599780];return _0xd29bf1;}export const bffExec={'service':a12_0x203353(0xbe),'command':a12_0x203353(0xc6),'description':a12_0x203353(0xbf),'risk':a12_0x203353(0xba),'flags':[{...NAME_FLAG,'required':!![],'description':a12_0x203353(0xc1)},PARAMS_FLAG],async 'execute'(_0x3233f7){const _0x2d69b7=a12_0x203353,_0x18e037=parseJsonParams(_0x3233f7[_0x2d69b7(0xb9)](_0x2d69b7(0xc2))),_0x49725f=Date[_0x2d69b7(0xc0)](),_0x1768f9=await executeSdkBff(_0x3233f7['str']('name'),_0x18e037),_0x4f6de4=Date[_0x2d69b7(0xc0)]()-_0x49725f;return{'ok':!![],'data':{'result':_0x1768f9,'elapsed':_0x4f6de4},'message':_0x2d69b7(0xb4)+_0x4f6de4+'ms'};}};
@@ -1 +1 @@
1
- function a13_0x3b82(_0x1448a6,_0x427db4){_0x1448a6=_0x1448a6-0xa4;const _0x306853=a13_0x3068();let _0x3b8281=_0x306853[_0x1448a6];return _0x3b8281;}(function(_0x409dbe,_0xa3f120){const _0x439c78=a13_0x3b82,_0x4ee46a=_0x409dbe();while(!![]){try{const _0x152af2=parseInt(_0x439c78(0xa5))/0x1+-parseInt(_0x439c78(0xab))/0x2+-parseInt(_0x439c78(0xa6))/0x3*(parseInt(_0x439c78(0xa8))/0x4)+-parseInt(_0x439c78(0xac))/0x5*(-parseInt(_0x439c78(0xa9))/0x6)+parseInt(_0x439c78(0xa4))/0x7*(-parseInt(_0x439c78(0xad))/0x8)+parseInt(_0x439c78(0xaa))/0x9+parseInt(_0x439c78(0xa7))/0xa;if(_0x152af2===_0xa3f120)break;else _0x4ee46a['push'](_0x4ee46a['shift']());}catch(_0x27466d){_0x4ee46a['push'](_0x4ee46a['shift']());}}}(a13_0x3068,0xb0e86));function a13_0x3068(){const _0x5be911=['301836CfgTso','134511ARqGgD','25855140cFYNCL','108ZmcXAE','66caLaoX','9512721lgNkSS','2704758tSTlmh','345370fQDWjj','8jZxlUW','9915787bEiodN'];a13_0x3068=function(){return _0x5be911;};return a13_0x3068();}import{bffDetail}from'../../commands/bff/detail.js';import{bffExec}from'../../commands/bff/exec.js';export const bffDefinitions=[bffDetail,bffExec];
1
+ (function(_0x5c8768,_0x53bdcd){const _0x407b1e=a13_0x5551,_0x11283a=_0x5c8768();while(!![]){try{const _0x53ad4d=parseInt(_0x407b1e(0x17a))/0x1+-parseInt(_0x407b1e(0x17e))/0x2*(parseInt(_0x407b1e(0x180))/0x3)+-parseInt(_0x407b1e(0x17b))/0x4*(-parseInt(_0x407b1e(0x178))/0x5)+-parseInt(_0x407b1e(0x176))/0x6*(-parseInt(_0x407b1e(0x179))/0x7)+-parseInt(_0x407b1e(0x17d))/0x8+parseInt(_0x407b1e(0x17f))/0x9*(-parseInt(_0x407b1e(0x177))/0xa)+-parseInt(_0x407b1e(0x181))/0xb*(-parseInt(_0x407b1e(0x17c))/0xc);if(_0x53ad4d===_0x53bdcd)break;else _0x11283a['push'](_0x11283a['shift']());}catch(_0x1074c1){_0x11283a['push'](_0x11283a['shift']());}}}(a13_0xf960,0x2437b));function a13_0x5551(_0x4ba7e0,_0x60c05b){_0x4ba7e0=_0x4ba7e0-0x176;const _0xf96029=a13_0xf960();let _0x5551a0=_0xf96029[_0x4ba7e0];return _0x5551a0;}import{bffDetail}from'../../commands/bff/detail.js';function a13_0xf960(){const _0x27bb08=['7MLoIku','92983VaIFDE','356508fHhzQL','1124316AQkzqj','1877448ShBjqv','33958kFBCPP','18qPtWGk','12weRiOq','11KqhPny','530598jtEJks','457730OQyGEV','15EYDUDY'];a13_0xf960=function(){return _0x27bb08;};return a13_0xf960();}import{bffExec}from'../../commands/bff/exec.js';export const bffDefinitions=[bffDetail,bffExec];
@@ -1 +1 @@
1
- const a14_0x5a465f=a14_0x4fef;function a14_0x32a3(){const _0x2431cd=['error','=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.','59121ringkY','install','177765tmspRK','log','npx\x20skills\x20add\x20failed:\x20','Skipped\x20npx\x20(','cwd','unknown','cli-skill','CLI\x20Built-in\x20Skill\x20installed','write','../../skills/npx-skills-add.js','566145WxKXZC','566247aGFITU','2657885YIRohR','skipped','info','6pDCmwO','\x20-g\x20-y)...','nonInteractive','790UkBCyJ','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20(npx\x20skills\x20add\x20','inherit','10NeXOlS','Install\x20the\x20CLI\x20Built-in\x20Skill\x20required\x20by\x20Lovrabet\x20runtime','42960907VRlYkT','apiError','1443712rVJnHR','144TvIoVC'];a14_0x32a3=function(){return _0x2431cd;};return a14_0x32a3();}(function(_0x2b403a,_0x5e2a8a){const _0x5a41b6=a14_0x4fef,_0xa440f6=_0x2b403a();while(!![]){try{const _0x408f76=-parseInt(_0x5a41b6(0x1ab))/0x1+-parseInt(_0x5a41b6(0x1b6))/0x2*(parseInt(_0x5a41b6(0x1ac))/0x3)+-parseInt(_0x5a41b6(0x1ba))/0x4+parseInt(_0x5a41b6(0x1ad))/0x5*(-parseInt(_0x5a41b6(0x1b0))/0x6)+parseInt(_0x5a41b6(0x1a1))/0x7*(-parseInt(_0x5a41b6(0x1bb))/0x8)+-parseInt(_0x5a41b6(0x19f))/0x9*(parseInt(_0x5a41b6(0x1b3))/0xa)+parseInt(_0x5a41b6(0x1b8))/0xb;if(_0x408f76===_0x5e2a8a)break;else _0xa440f6['push'](_0xa440f6['shift']());}catch(_0x33a74b){_0xa440f6['push'](_0xa440f6['shift']());}}}(a14_0x32a3,0x80ae9));import{CliErrors}from'../../errors.js';import{logger}from'../../utils/logger.js';function a14_0x4fef(_0x2a425e,_0x35b2d9){_0x2a425e=_0x2a425e-0x19f;const _0x32a35f=a14_0x32a3();let _0x4fef35=_0x32a35f[_0x2a425e];return _0x4fef35;}export const cliSkillDefinitions=[{'service':a14_0x5a465f(0x1a7),'command':a14_0x5a465f(0x1a0),'description':a14_0x5a465f(0x1b7),'risk':a14_0x5a465f(0x1a9),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x15c36e){const _0x8349d9=a14_0x5a465f;logger['setLogPath'](process[_0x8349d9(0x1a5)]()),logger[_0x8349d9(0x1af)]('cli-skill-install',_0x8349d9(0x1be));const {LOVRABET_SKILL_SOURCE:_0x169106,LOVRABET_SKIP_NPX_SKILLS_ENV:_0x13929f,runNpxSkillsAddGlobal:_0x39ffb6}=await import(_0x8349d9(0x1aa)),_0x52ae60=_0x15c36e[_0x8349d9(0x1b2)]?'pipe':_0x8349d9(0x1b5);console[_0x8349d9(0x1a2)](_0x8349d9(0x1b4)+_0x169106+_0x8349d9(0x1b1));const _0x3eed98=_0x39ffb6(process[_0x8349d9(0x1a5)](),_0x169106,{'stdio':_0x52ae60});if(_0x3eed98[_0x8349d9(0x1ae)])console['log'](_0x8349d9(0x1a4)+_0x13929f+_0x8349d9(0x1bd));else{if(_0x3eed98['ok'])console[_0x8349d9(0x1a2)](_0x8349d9(0x1a8));else throw CliErrors[_0x8349d9(0x1b9)](_0x8349d9(0x1a3)+(_0x3eed98[_0x8349d9(0x1bc)]||_0x8349d9(0x1a6)),'Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20npx\x20skills\x20add\x20'+_0x169106+'\x20-g\x20-y');}return{'ok':!![]};}}];
1
+ function a14_0x4038(){const _0x1822f8=['2725144TUACxI','\x20-g\x20-y','1003654tcmAvN','1763988EcDIZB','cwd','setLogPath','Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20npx\x20skills\x20add\x20','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.','log','npx\x20skills\x20add\x20failed:\x20','9207JZtTic','inherit','Install\x20the\x20CLI\x20Built-in\x20Skill\x20required\x20by\x20Lovrabet\x20runtime','106204eTaiRO','info','124765RUCAaL','\x20-g\x20-y)...','pipe','=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.','132VBDvaA','install','4004550eAtDzP','39UKkAxR','CLI\x20Built-in\x20Skill\x20installed','error','7wxlrjO','skipped','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20(npx\x20skills\x20add\x20','nonInteractive','16870dVxaen','unknown'];a14_0x4038=function(){return _0x1822f8;};return a14_0x4038();}const a14_0x5741c9=a14_0x4685;(function(_0x2e97ab,_0x549b82){const _0x36fc5c=a14_0x4685,_0x459d6f=_0x2e97ab();while(!![]){try{const _0x4c5ce4=-parseInt(_0x36fc5c(0x16f))/0x1+parseInt(_0x36fc5c(0x17a))/0x2*(parseInt(_0x36fc5c(0x183))/0x3)+parseInt(_0x36fc5c(0x180))/0x4*(-parseInt(_0x36fc5c(0x17c))/0x5)+-parseInt(_0x36fc5c(0x170))/0x6*(-parseInt(_0x36fc5c(0x186))/0x7)+-parseInt(_0x36fc5c(0x16d))/0x8+parseInt(_0x36fc5c(0x182))/0x9+-parseInt(_0x36fc5c(0x16b))/0xa*(-parseInt(_0x36fc5c(0x177))/0xb);if(_0x4c5ce4===_0x549b82)break;else _0x459d6f['push'](_0x459d6f['shift']());}catch(_0x13036b){_0x459d6f['push'](_0x459d6f['shift']());}}}(a14_0x4038,0xa470b));function a14_0x4685(_0x8165c7,_0x4c734b){_0x8165c7=_0x8165c7-0x169;const _0x403844=a14_0x4038();let _0x4685ce=_0x403844[_0x8165c7];return _0x4685ce;}import{CliErrors}from'../../errors.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':'cli-skill','command':a14_0x5741c9(0x181),'description':a14_0x5741c9(0x179),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x509c60){const _0xe1d452=a14_0x5741c9;logger[_0xe1d452(0x172)](process[_0xe1d452(0x171)]()),logger[_0xe1d452(0x17b)]('cli-skill-install',_0xe1d452(0x174));const {LOVRABET_SKILL_SOURCE:_0x18fd02,LOVRABET_SKIP_NPX_SKILLS_ENV:_0x218772,runNpxSkillsAddGlobal:_0x1f7356}=await import('../../skills/npx-skills-add.js'),_0x5a6e3a=_0x509c60[_0xe1d452(0x16a)]?_0xe1d452(0x17e):_0xe1d452(0x178);console[_0xe1d452(0x175)](_0xe1d452(0x169)+_0x18fd02+_0xe1d452(0x17d));const _0x1f2f70=_0x1f7356(process[_0xe1d452(0x171)](),_0x18fd02,{'stdio':_0x5a6e3a});if(_0x1f2f70[_0xe1d452(0x187)])console[_0xe1d452(0x175)]('Skipped\x20npx\x20('+_0x218772+_0xe1d452(0x17f));else{if(_0x1f2f70['ok'])console[_0xe1d452(0x175)](_0xe1d452(0x184));else throw CliErrors['apiError'](_0xe1d452(0x176)+(_0x1f2f70[_0xe1d452(0x185)]||_0xe1d452(0x16c)),_0xe1d452(0x173)+_0x18fd02+_0xe1d452(0x16e));}return{'ok':!![]};}}];