@lovrabet/lovrabet-cli 2.1.2 → 2.1.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 (108) 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/commands/create.js +1 -0
  37. package/lib/commands/skill/commands/install.js +1 -0
  38. package/lib/commands/skill/commands/list.js +1 -0
  39. package/lib/commands/skill/commands/push.js +1 -0
  40. package/lib/commands/skill/commands/validate.js +1 -0
  41. package/lib/commands/skill/flags.js +1 -0
  42. package/lib/commands/skill/index.js +1 -1
  43. package/lib/commands/skill/manifest-helpers.js +1 -0
  44. package/lib/commands/skill/scopes.js +1 -0
  45. package/lib/commands/skill/summary.js +1 -0
  46. package/lib/commands/skill/templates.js +1 -1
  47. package/lib/commands/skill/validate.js +1 -1
  48. package/lib/commands/sql/detail.js +1 -1
  49. package/lib/commands/sql/exec.js +1 -1
  50. package/lib/commands/sql/index.js +1 -1
  51. package/lib/commands/update.js +1 -1
  52. package/lib/commands/workspace/index.js +1 -1
  53. package/lib/config/schema.js +1 -1
  54. package/lib/constant/app.js +1 -1
  55. package/lib/constant/auth-mode.js +1 -1
  56. package/lib/constant/cli.js +1 -1
  57. package/lib/constant/defaults.js +1 -1
  58. package/lib/constant/distribution.js +1 -1
  59. package/lib/constant/domain.js +1 -1
  60. package/lib/constant/env.js +1 -1
  61. package/lib/constant/output.js +1 -1
  62. package/lib/constant/product.js +1 -1
  63. package/lib/constant/risk.js +1 -1
  64. package/lib/constant/url.js +1 -1
  65. package/lib/context.js +1 -1
  66. package/lib/core/api-client.js +1 -1
  67. package/lib/core/db-resolver.js +1 -1
  68. package/lib/core/sdk-client.js +1 -1
  69. package/lib/errors.js +1 -1
  70. package/lib/framework/build-all-flags.js +1 -1
  71. package/lib/framework/dryrun.js +1 -1
  72. package/lib/framework/flags.js +1 -1
  73. package/lib/framework/help.js +1 -1
  74. package/lib/framework/index.js +1 -1
  75. package/lib/framework/output.js +1 -1
  76. package/lib/framework/preparse.js +1 -1
  77. package/lib/framework/response.js +1 -1
  78. package/lib/framework/runner-confirmation.js +1 -1
  79. package/lib/framework/runner-error.js +1 -1
  80. package/lib/framework/runner.js +1 -1
  81. package/lib/framework/schema-export.js +1 -1
  82. package/lib/framework/types.js +1 -1
  83. package/lib/generated/build-info.js +1 -1
  84. package/lib/help.js +1 -1
  85. package/lib/skills/npx-skills-add.js +1 -1
  86. package/lib/skills/runtime-skill-sync/constants.js +1 -0
  87. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -0
  88. package/lib/skills/runtime-skill-sync/hashing.js +1 -0
  89. package/lib/skills/runtime-skill-sync/links.js +1 -0
  90. package/lib/skills/runtime-skill-sync/list-local.js +1 -0
  91. package/lib/skills/runtime-skill-sync/local-files.js +1 -0
  92. package/lib/skills/runtime-skill-sync/materialize.js +1 -0
  93. package/lib/skills/runtime-skill-sync/metadata.js +1 -0
  94. package/lib/skills/runtime-skill-sync/paths.js +1 -0
  95. package/lib/skills/runtime-skill-sync/push.js +1 -0
  96. package/lib/skills/runtime-skill-sync/scopes.js +1 -0
  97. package/lib/skills/runtime-skill-sync/types.js +1 -0
  98. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -0
  99. package/lib/skills/runtime-skill-sync/zip-package.js +1 -0
  100. package/lib/skills/runtime-skill-sync.js +1 -1
  101. package/lib/utils/apply-jq-filter.js +1 -1
  102. package/lib/utils/logger.js +1 -1
  103. package/lib/utils/params.js +1 -1
  104. package/lib/utils/platform.js +1 -1
  105. package/lib/utils/update-notice.js +1 -1
  106. package/lib/utils/version.js +1 -1
  107. package/lib/utils/write-cli-side-channel.js +1 -1
  108. package/package.json +4 -1
package/lib/cli.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- (function(_0x267235,_0x1c7411){const _0x7fc836=a0_0x2829,_0xc475=_0x267235();while(!![]){try{const _0x29c7db=parseInt(_0x7fc836(0xa9))/0x1+parseInt(_0x7fc836(0xa6))/0x2+-parseInt(_0x7fc836(0xc1))/0x3*(-parseInt(_0x7fc836(0xb0))/0x4)+parseInt(_0x7fc836(0xc2))/0x5*(parseInt(_0x7fc836(0xac))/0x6)+-parseInt(_0x7fc836(0xa7))/0x7*(parseInt(_0x7fc836(0xc0))/0x8)+parseInt(_0x7fc836(0xb9))/0x9*(-parseInt(_0x7fc836(0xa2))/0xa)+-parseInt(_0x7fc836(0xaa))/0xb;if(_0x29c7db===_0x1c7411)break;else _0xc475['push'](_0xc475['shift']());}catch(_0xa67af1){_0xc475['push'](_0xc475['shift']());}}}(a0_0x8e56,0xcf477));import{jsx as a0_0x5c34dd}from'react/jsx-runtime';import a0_0x3ed35c from'meow';import{render}from'ink';import{Help}from'./help.js';import{CliError,CliErrors}from'./errors.js';import{buildConfigFromFlags,initGlobalEnvironment}from'./context.js';import{isKnownService,getServiceEntry,findDefinition,getAllDefinitions}from'./commands/registry.js';import{generateDynamicServiceHelp,resolveDynamicServiceCommand}from'./commands/service/dynamic.js';function a0_0x2829(_0x28dc30,_0x15c4a1){_0x28dc30=_0x28dc30-0x9b;const _0x8e5604=a0_0x8e56();let _0x28293d=_0x8e5604[_0x28dc30];return _0x28293d;}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';function a0_0x8e56(){const _0x703969=['defaultCommand','length','9179577yPxNHt','[preparse]\x20','error','ExitPromptError','name','flatMap','handler','407072RVckSF','15945OBPfrn','886955RuGnBf','definition','input','flags','log','ERR_STREAM_DESTROYED','exitCode','args','Hint:\x20','help',':\x20--','original','10HEYZSt','stderr','corrected','code','1060262IkxhxH','7pIjEXw','Unexpected\x20error:','1304694djVMCY','12986776iifNvk','slice','18ctmnJm','cancelled','unknownCommand','message','552mFDGnp','\x0aCancelled.\x0a','exit','hint','write','assign','\x20->\x20--'];a0_0x8e56=function(){return _0x703969;};return a0_0x8e56();}const helpText=generateFullHelp(),cli=a0_0x3ed35c(helpText,{'importMeta':import.meta,'flags':buildMeowFlags(),'version':getCliVersionDisplay()});void main()['catch'](handleError);async function main(){try{await run();}catch(_0x46304a){handleError(_0x46304a);}}async function run(){const _0x520d97=a0_0x2829;let _0x2148bd=cli['input'][0x0],_0x1cd0a6=cli[_0x520d97(0xc4)][0x1];const _0x4e0999=cli['flags'];try{const {correctFlags:_0x511860}=await import('./framework/preparse.js'),_0x5a6c5b=getAllDefinitions()[_0x520d97(0xbe)](_0x134dfd=>_0x134dfd[_0x520d97(0xc5)]??[]),{flags:_0x79065f,corrections:_0x3aa6aa}=_0x511860(_0x4e0999,_0x5a6c5b);if(_0x3aa6aa[_0x520d97(0xb8)]>0x0){for(const _0x32d8a7 of _0x3aa6aa){process[_0x520d97(0xa3)][_0x520d97(0xb4)](_0x520d97(0xba)+_0x32d8a7[_0x520d97(0xbf)]+_0x520d97(0xa0)+_0x32d8a7[_0x520d97(0xa1)]+_0x520d97(0xb6)+_0x32d8a7[_0x520d97(0xa4)]+'\x0a');}Object[_0x520d97(0xb5)](_0x4e0999,_0x79065f);}}catch{}if(!_0x2148bd){const {waitUntilExit:_0xddd691}=render(a0_0x5c34dd(Help,{}));await _0xddd691();return;}if(!isKnownService(_0x2148bd)){const _0x310fc1=resolveDynamicServiceCommand(cli['input'],_0x4e0999);if(_0x310fc1){if(_0x4e0999[_0x520d97(0x9f)]){console['log'](generateCommandHelp(_0x310fc1[_0x520d97(0xc3)]));return;}Object[_0x520d97(0xb5)](_0x4e0999,_0x310fc1[_0x520d97(0xc5)]);const _0x240ab1=buildConfigFromFlags(_0x4e0999);await initGlobalEnvironment(_0x240ab1);const _0x557d8b=createPipelineEnv(_0x240ab1,_0x4e0999);_0x557d8b[_0x520d97(0x9d)]=_0x310fc1[_0x520d97(0x9d)],await runCommand(_0x310fc1[_0x520d97(0xc3)],_0x557d8b);return;}if(_0x4e0999[_0x520d97(0x9f)]){const _0x1693e5=generateDynamicServiceHelp(_0x2148bd);if(_0x1693e5){console[_0x520d97(0xc6)](_0x1693e5);return;}}const {waitUntilExit:_0x527f51}=render(a0_0x5c34dd(Help,{}));await _0x527f51();return;}const _0x2062df=getServiceEntry(_0x2148bd);if(!_0x1cd0a6){if(_0x4e0999[_0x520d97(0x9f)]){console['log'](generateServiceHelp(_0x2148bd));return;}if(_0x2062df[_0x520d97(0xb7)])_0x1cd0a6=_0x2062df['defaultCommand'];else{console[_0x520d97(0xc6)](generateServiceHelp(_0x2148bd));return;}}const _0x2fb0a5=findDefinition(_0x2148bd,_0x1cd0a6);!_0x2fb0a5&&(console[_0x520d97(0xc6)](generateServiceHelp(_0x2148bd)),handleError(CliErrors[_0x520d97(0xae)](_0x2148bd+'\x20'+_0x1cd0a6)));if(_0x4e0999[_0x520d97(0x9f)]){console[_0x520d97(0xc6)](generateCommandHelp(_0x2fb0a5));return;}const _0x2cad80=buildConfigFromFlags(_0x4e0999);await initGlobalEnvironment(_0x2cad80);const _0x356026=createPipelineEnv(_0x2cad80,_0x4e0999);_0x356026[_0x520d97(0x9d)]=cli[_0x520d97(0xc4)][_0x520d97(0xab)](0x2),await runCommand(_0x2fb0a5,_0x356026);}function handleError(_0x528240){const _0x3cfe65=a0_0x2829;if(_0x528240 instanceof CliError){_0x528240[_0x3cfe65(0xa5)]===_0x3cfe65(0xad)&&(process[_0x3cfe65(0xa3)]['write']('\x0aCancelled.\x0a'),process[_0x3cfe65(0xb2)](0x0));console[_0x3cfe65(0xbb)]('Error:\x20'+_0x528240[_0x3cfe65(0xaf)]);if(_0x528240[_0x3cfe65(0xb3)])console[_0x3cfe65(0xbb)](_0x3cfe65(0x9e)+_0x528240[_0x3cfe65(0xb3)]);process[_0x3cfe65(0xb2)](_0x528240[_0x3cfe65(0x9c)]);}isUserCancellation(_0x528240)&&(process[_0x3cfe65(0xa3)][_0x3cfe65(0xb4)](_0x3cfe65(0xb1)),process[_0x3cfe65(0xb2)](0x0)),console[_0x3cfe65(0xbb)](_0x3cfe65(0xa8),_0x528240),process[_0x3cfe65(0xb2)](0x1);}function isUserCancellation(_0x15adf6){const _0xe42d1=a0_0x2829;if(!(_0x15adf6 instanceof Error))return![];if(_0x15adf6[_0xe42d1(0xbd)]===_0xe42d1(0xbc))return!![];if(_0x15adf6['code']==='ERR_USE_AFTER_CLOSE')return!![];if(_0x15adf6[_0xe42d1(0xa5)]===_0xe42d1(0x9b))return!![];return![];}
2
+ const a0_0xab42e1=a0_0x6d87;(function(_0x40a921,_0x2a3125){const _0x2ae57f=a0_0x6d87,_0x470a39=_0x40a921();while(!![]){try{const _0x599aaf=-parseInt(_0x2ae57f(0x113))/0x1*(-parseInt(_0x2ae57f(0x138))/0x2)+-parseInt(_0x2ae57f(0x12d))/0x3*(parseInt(_0x2ae57f(0x121))/0x4)+parseInt(_0x2ae57f(0x13b))/0x5*(-parseInt(_0x2ae57f(0x123))/0x6)+parseInt(_0x2ae57f(0x11a))/0x7*(parseInt(_0x2ae57f(0x129))/0x8)+-parseInt(_0x2ae57f(0x11d))/0x9+parseInt(_0x2ae57f(0x131))/0xa*(-parseInt(_0x2ae57f(0x117))/0xb)+parseInt(_0x2ae57f(0x111))/0xc*(parseInt(_0x2ae57f(0x127))/0xd);if(_0x599aaf===_0x2a3125)break;else _0x470a39['push'](_0x470a39['shift']());}catch(_0xd8f841){_0x470a39['push'](_0x470a39['shift']());}}}(a0_0x43ca,0x8aeb7));import{jsx as a0_0x2a4735}from'react/jsx-runtime';import a0_0x49b41b from'meow';import{render}from'ink';function a0_0x43ca(){const _0x1e77bf=['handler','92733zZJccc','Unexpected\x20error:','write','args','139770XEaIBO','error','ERR_STREAM_DESTROYED','flatMap','help','length','ExitPromptError','812930IURCoT','hint','Hint:\x20','165CYzynp','defaultCommand','definition','12uILuhk','Error:\x20','1ANBsgg','assign','code','unknownCommand','825xoBNaO','corrected','name','808227ktfzUE','stderr','\x0aCancelled.\x0a','962622EQxCoQ','catch',':\x20--','flags','124DXXNXB','original','164364zNdUtE','\x20->\x20--','log','exitCode','30833387rRTYPU','./framework/preparse.js','56MCnIaG','input','exit'];a0_0x43ca=function(){return _0x1e77bf;};return a0_0x43ca();}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';function a0_0x6d87(_0x4c1d70,_0x4c6446){_0x4c1d70=_0x4c1d70-0x10f;const _0x43cafa=a0_0x43ca();let _0x6d87a0=_0x43cafa[_0x4c1d70];return _0x6d87a0;}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_0x49b41b(helpText,{'importMeta':import.meta,'flags':buildMeowFlags(),'version':getCliVersionDisplay()});void main()[a0_0xab42e1(0x11e)](handleError);async function main(){try{await run();}catch(_0x54fff3){handleError(_0x54fff3);}}async function run(){const _0x60d953=a0_0xab42e1;let _0x3fe846=cli[_0x60d953(0x12a)][0x0],_0x1a6260=cli[_0x60d953(0x12a)][0x1];const _0x10f15b=cli[_0x60d953(0x120)];try{const {correctFlags:_0x291c54}=await import(_0x60d953(0x128)),_0x313525=getAllDefinitions()[_0x60d953(0x134)](_0x1efdb8=>_0x1efdb8['flags']??[]),{flags:_0x3aa6a8,corrections:_0x18341f}=_0x291c54(_0x10f15b,_0x313525);if(_0x18341f[_0x60d953(0x136)]>0x0){for(const _0xcfc6c0 of _0x18341f){process[_0x60d953(0x11b)][_0x60d953(0x12f)]('[preparse]\x20'+_0xcfc6c0[_0x60d953(0x12c)]+_0x60d953(0x11f)+_0xcfc6c0[_0x60d953(0x122)]+_0x60d953(0x124)+_0xcfc6c0[_0x60d953(0x118)]+'\x0a');}Object[_0x60d953(0x114)](_0x10f15b,_0x3aa6a8);}}catch{}if(!_0x3fe846){const {waitUntilExit:_0x5212b2}=render(a0_0x2a4735(Help,{}));await _0x5212b2();return;}if(!isKnownService(_0x3fe846)){const _0x305b0e=resolveDynamicServiceCommand(cli['input'],_0x10f15b);if(_0x305b0e){if(_0x10f15b[_0x60d953(0x135)]){console['log'](generateCommandHelp(_0x305b0e[_0x60d953(0x110)]));return;}Object['assign'](_0x10f15b,_0x305b0e['flags']);const _0x29b9ea=buildConfigFromFlags(_0x10f15b);await initGlobalEnvironment(_0x29b9ea);const _0x8ada72=createPipelineEnv(_0x29b9ea,_0x10f15b);_0x8ada72[_0x60d953(0x130)]=_0x305b0e['args'],await runCommand(_0x305b0e[_0x60d953(0x110)],_0x8ada72);return;}if(_0x10f15b[_0x60d953(0x135)]){const _0x2281d1=generateDynamicServiceHelp(_0x3fe846);if(_0x2281d1){console[_0x60d953(0x125)](_0x2281d1);return;}}const {waitUntilExit:_0x4309fc}=render(a0_0x2a4735(Help,{}));await _0x4309fc();return;}const _0x5dfe72=getServiceEntry(_0x3fe846);if(!_0x1a6260){if(_0x10f15b[_0x60d953(0x135)]){console[_0x60d953(0x125)](generateServiceHelp(_0x3fe846));return;}if(_0x5dfe72[_0x60d953(0x10f)])_0x1a6260=_0x5dfe72[_0x60d953(0x10f)];else{console['log'](generateServiceHelp(_0x3fe846));return;}}const _0x16a183=findDefinition(_0x3fe846,_0x1a6260);!_0x16a183&&(console['log'](generateServiceHelp(_0x3fe846)),handleError(CliErrors[_0x60d953(0x116)](_0x3fe846+'\x20'+_0x1a6260)));if(_0x10f15b[_0x60d953(0x135)]){console[_0x60d953(0x125)](generateCommandHelp(_0x16a183));return;}const _0x916769=buildConfigFromFlags(_0x10f15b);await initGlobalEnvironment(_0x916769);const _0x2b8579=createPipelineEnv(_0x916769,_0x10f15b);_0x2b8579[_0x60d953(0x130)]=cli[_0x60d953(0x12a)]['slice'](0x2),await runCommand(_0x16a183,_0x2b8579);}function handleError(_0x1a8fd6){const _0x125516=a0_0xab42e1;if(_0x1a8fd6 instanceof CliError){_0x1a8fd6['code']==='cancelled'&&(process['stderr'][_0x125516(0x12f)](_0x125516(0x11c)),process[_0x125516(0x12b)](0x0));console[_0x125516(0x132)](_0x125516(0x112)+_0x1a8fd6['message']);if(_0x1a8fd6[_0x125516(0x139)])console[_0x125516(0x132)](_0x125516(0x13a)+_0x1a8fd6[_0x125516(0x139)]);process[_0x125516(0x12b)](_0x1a8fd6[_0x125516(0x126)]);}isUserCancellation(_0x1a8fd6)&&(process[_0x125516(0x11b)][_0x125516(0x12f)](_0x125516(0x11c)),process[_0x125516(0x12b)](0x0)),console[_0x125516(0x132)](_0x125516(0x12e),_0x1a8fd6),process[_0x125516(0x12b)](0x1);}function isUserCancellation(_0x10ad04){const _0x2b2975=a0_0xab42e1;if(!(_0x10ad04 instanceof Error))return![];if(_0x10ad04[_0x2b2975(0x119)]===_0x2b2975(0x137))return!![];if(_0x10ad04[_0x2b2975(0x115)]==='ERR_USE_AFTER_CLOSE')return!![];if(_0x10ad04[_0x2b2975(0x115)]===_0x2b2975(0x133))return!![];return![];}
@@ -1 +1 @@
1
- const a1_0x1a6a50=a1_0x426e;function a1_0x426e(_0x3b4e61,_0x5d7166){_0x3b4e61=_0x3b4e61-0x7f;const _0x3362a8=a1_0x3362();let _0x426e70=_0x3362a8[_0x3b4e61];return _0x426e70;}(function(_0x1943db,_0x3599f7){const _0x31fdc3=a1_0x426e,_0x2b0e2b=_0x1943db();while(!![]){try{const _0x1c2940=parseInt(_0x31fdc3(0xa8))/0x1*(-parseInt(_0x31fdc3(0x9f))/0x2)+parseInt(_0x31fdc3(0xee))/0x3+-parseInt(_0x31fdc3(0xb7))/0x4*(-parseInt(_0x31fdc3(0xf1))/0x5)+-parseInt(_0x31fdc3(0xe4))/0x6+-parseInt(_0x31fdc3(0xa3))/0x7*(-parseInt(_0x31fdc3(0xd5))/0x8)+parseInt(_0x31fdc3(0xc1))/0x9*(parseInt(_0x31fdc3(0xe6))/0xa)+-parseInt(_0x31fdc3(0xc3))/0xb*(-parseInt(_0x31fdc3(0xc4))/0xc);if(_0x1c2940===_0x3599f7)break;else _0x2b0e2b['push'](_0x2b0e2b['shift']());}catch(_0x12a26a){_0x2b0e2b['push'](_0x2b0e2b['shift']());}}}(a1_0x3362,0xf22c8));import{CliErrors}from'../../errors.js';const CATEGORY_FLAG={'name':a1_0x1a6a50(0xa1),'type':a1_0x1a6a50(0xc0),'description':'Filter\x20docs\x20by\x20category,\x20for\x20example\x20dataset'},KEYWORD_FLAG={'name':a1_0x1a6a50(0xdf),'type':'string','description':a1_0x1a6a50(0x88)},DOC_CODE_FLAG={'name':a1_0x1a6a50(0x84),'type':'string','required':!![],'description':a1_0x1a6a50(0xa5)},DOCS=[{'code':a1_0x1a6a50(0xe9),'category':a1_0x1a6a50(0xce),'title':a1_0x1a6a50(0xed),'method':a1_0x1a6a50(0x91),'path':a1_0x1a6a50(0x98),'summary':a1_0x1a6a50(0xac),'whenToUse':a1_0x1a6a50(0xaf),'pathParams':[],'queryParams':[],'bodySchema':a1_0x1a6a50(0x89),'responseHighlights':[a1_0x1a6a50(0xec),'paging.totalCount\x20gives\x20total\x20rows'],'examples':[a1_0x1a6a50(0x9e)],'notes':[a1_0x1a6a50(0xb9)],'markdown':[a1_0x1a6a50(0xf5),'',a1_0x1a6a50(0xa9)]['join']('\x0a')},{'code':'dataset_detail','category':a1_0x1a6a50(0xce),'title':a1_0x1a6a50(0xb1),'method':a1_0x1a6a50(0xba),'path':a1_0x1a6a50(0xc9),'summary':'获取数据集详情','whenToUse':a1_0x1a6a50(0xde),'pathParams':[],'queryParams':[{'name':a1_0x1a6a50(0x84),'description':a1_0x1a6a50(0xa4)}],'bodySchema':a1_0x1a6a50(0xb4),'responseHighlights':[a1_0x1a6a50(0xc6),a1_0x1a6a50(0xca)],'examples':[a1_0x1a6a50(0x85)],'notes':[a1_0x1a6a50(0xcf)],'markdown':[a1_0x1a6a50(0xe0),'',a1_0x1a6a50(0x8a)]['join']('\x0a')},{'code':a1_0x1a6a50(0xad),'category':a1_0x1a6a50(0xce),'title':a1_0x1a6a50(0xaa),'method':'POST','path':a1_0x1a6a50(0x9a),'summary':'条件过滤查询数据','whenToUse':a1_0x1a6a50(0xe1),'pathParams':[{'name':a1_0x1a6a50(0xf3),'description':'Current\x20app\x20code'},{'name':a1_0x1a6a50(0xc5),'description':a1_0x1a6a50(0xa4)}],'queryParams':[],'bodySchema':a1_0x1a6a50(0xb8),'responseHighlights':[a1_0x1a6a50(0xcd),a1_0x1a6a50(0x95)],'examples':['lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:5}\x27'],'notes':['Use\x20read-only\x20data\x20commands\x20before\x20writing\x20Artifacts\x20that\x20display\x20real\x20data.'],'markdown':['##\x20Filter\x20dataset\x20data','','Use\x20`where`,\x20`select`,\x20`orderBy`,\x20`currentPage`,\x20and\x20`pageSize`\x20to\x20inspect\x20live\x20data\x20shape.'][a1_0x1a6a50(0xb3)]('\x0a')},{'code':a1_0x1a6a50(0x9c),'category':'dataset','title':a1_0x1a6a50(0xf0),'method':a1_0x1a6a50(0x91),'path':'/api/{appCode}/{datasetCode}/aggregate','summary':'聚合查询数据集数据','whenToUse':'需要按\x20groupBy\x20分组并做\x20count、sum、avg、max、min\x20等聚合统计时使用','pathParams':[{'name':a1_0x1a6a50(0xf3),'description':a1_0x1a6a50(0xe2)},{'name':a1_0x1a6a50(0xc5),'description':a1_0x1a6a50(0xa4)}],'queryParams':[],'bodySchema':a1_0x1a6a50(0xf8),'responseHighlights':[a1_0x1a6a50(0x9d),a1_0x1a6a50(0xe5)],'examples':[a1_0x1a6a50(0xbb)],'notes':[a1_0x1a6a50(0xb5),a1_0x1a6a50(0xd2)],'markdown':[a1_0x1a6a50(0xa0),'',a1_0x1a6a50(0xdd)][a1_0x1a6a50(0xb3)]('\x0a')},{'code':'dataset_data_get_one','category':a1_0x1a6a50(0xce),'title':a1_0x1a6a50(0xd9),'method':a1_0x1a6a50(0x91),'path':a1_0x1a6a50(0x87),'summary':a1_0x1a6a50(0x86),'whenToUse':'已经知道记录\x20id,需要按数据集读取单条业务数据时使用','pathParams':[{'name':a1_0x1a6a50(0xf3),'description':a1_0x1a6a50(0xe2)},{'name':a1_0x1a6a50(0xc5),'description':a1_0x1a6a50(0xa4)}],'queryParams':[],'bodySchema':a1_0x1a6a50(0xd0),'responseHighlights':[a1_0x1a6a50(0xf7)],'examples':[a1_0x1a6a50(0xe8)],'notes':['Prefer\x20`filter`\x20when\x20the\x20record\x20id\x20is\x20unknown.'],'markdown':a1_0x1a6a50(0x7f)},{'code':'dataset_data_create','category':a1_0x1a6a50(0xce),'title':a1_0x1a6a50(0x81),'method':a1_0x1a6a50(0x91),'path':a1_0x1a6a50(0xc8),'summary':'创建数据','whenToUse':a1_0x1a6a50(0x8f),'pathParams':[{'name':a1_0x1a6a50(0xf3),'description':a1_0x1a6a50(0xe2)},{'name':a1_0x1a6a50(0xc5),'description':a1_0x1a6a50(0xa4)}],'queryParams':[],'bodySchema':a1_0x1a6a50(0xa7),'responseHighlights':[a1_0x1a6a50(0xd8)],'examples':[a1_0x1a6a50(0xb6)],'notes':[a1_0x1a6a50(0xcb)],'markdown':a1_0x1a6a50(0x92)},{'code':a1_0x1a6a50(0xea),'category':'bf','title':a1_0x1a6a50(0xf6),'method':a1_0x1a6a50(0xba),'path':a1_0x1a6a50(0xf4),'summary':a1_0x1a6a50(0x99),'whenToUse':a1_0x1a6a50(0xd4),'pathParams':[{'name':'appCode','description':'Current\x20app\x20code'}],'queryParams':[],'bodySchema':a1_0x1a6a50(0xb4),'responseHighlights':[a1_0x1a6a50(0x82)],'examples':[a1_0x1a6a50(0xc7)],'notes':[a1_0x1a6a50(0x8b)],'markdown':'##\x20List\x20BF\x20endpoint\x20functions\x0a\x0aDiscover\x20executable\x20endpoint\x20functions.'},{'code':a1_0x1a6a50(0xae),'category':'bf','title':a1_0x1a6a50(0xd6),'method':a1_0x1a6a50(0x91),'path':a1_0x1a6a50(0xd7),'summary':'执行指定\x20BF\x20函数','whenToUse':a1_0x1a6a50(0xa6),'pathParams':[{'name':a1_0x1a6a50(0xf3),'description':a1_0x1a6a50(0xe2)},{'name':'scriptName','description':a1_0x1a6a50(0xd3)}],'queryParams':[],'bodySchema':a1_0x1a6a50(0xeb),'responseHighlights':['Returns\x20script\x20business\x20payload'],'examples':[a1_0x1a6a50(0xbf)],'notes':[a1_0x1a6a50(0xbd)],'markdown':'##\x20Execute\x20BF\x20endpoint\x20function\x0a\x0aExecute\x20a\x20known\x20endpoint\x20script.'},{'code':'custom_sql_execute','category':'custom_sql','title':a1_0x1a6a50(0xb2),'method':'POST','path':a1_0x1a6a50(0x8e),'summary':a1_0x1a6a50(0x96),'whenToUse':a1_0x1a6a50(0xbe),'pathParams':[],'queryParams':[],'bodySchema':a1_0x1a6a50(0x97),'responseHighlights':[a1_0x1a6a50(0x8d)],'examples':[a1_0x1a6a50(0xef)],'notes':['Use\x20`lovrabet\x20sql\x20detail`\x20before\x20execution.'],'markdown':a1_0x1a6a50(0x8c)}];function entrySummary(_0x99dac0){const _0x4143f4=a1_0x1a6a50;return{'code':_0x99dac0['code'],'category':_0x99dac0[_0x4143f4(0xa1)],'method':_0x99dac0[_0x4143f4(0x9b)],'path':_0x99dac0[_0x4143f4(0xe3)],'summary':_0x99dac0[_0x4143f4(0xda)],'whenToUse':_0x99dac0[_0x4143f4(0xd1)]};}export function listApiDocEntries(_0xf5d9d={}){const _0xd75550=a1_0x1a6a50,_0xabf31b=String(_0xf5d9d[_0xd75550(0xa1)]||'')[_0xd75550(0xc2)](),_0x1f5503=String(_0xf5d9d[_0xd75550(0xdf)]||'')[_0xd75550(0xc2)]()[_0xd75550(0x83)]();return DOCS[_0xd75550(0x93)](_0x208267=>{const _0xc40e7c=_0xd75550;if(_0xabf31b&&_0x208267[_0xc40e7c(0xa1)]!==_0xabf31b)return![];if(!_0x1f5503)return!![];return[_0x208267[_0xc40e7c(0x84)],_0x208267['category'],_0x208267[_0xc40e7c(0x9b)],_0x208267[_0xc40e7c(0xe3)],_0x208267[_0xc40e7c(0xda)],_0x208267[_0xc40e7c(0xd1)],_0x208267['title']][_0xc40e7c(0xb3)]('\x20')[_0xc40e7c(0x83)]()[_0xc40e7c(0x94)](_0x1f5503);})[_0xd75550(0xf2)](entrySummary);}export function getApiDocDetail(_0x99dc6e){const _0xa4cd8c=a1_0x1a6a50,_0x35dd24=DOCS[_0xa4cd8c(0xab)](_0x34f5b3=>_0x34f5b3[_0xa4cd8c(0x84)]===_0x99dc6e);if(!_0x35dd24)throw CliErrors[_0xa4cd8c(0xdc)](_0xa4cd8c(0xb0)+_0x99dc6e);return{..._0x35dd24};}const apiDocList={'service':a1_0x1a6a50(0x90),'command':a1_0x1a6a50(0xcc),'description':a1_0x1a6a50(0x80),'risk':a1_0x1a6a50(0xa2),'requiresAppCode':![],'flags':[CATEGORY_FLAG,KEYWORD_FLAG],async 'execute'(_0x16ece5){const _0x4983f1=a1_0x1a6a50,_0x4849ca=listApiDocEntries({'category':_0x16ece5[_0x4983f1(0xdb)](_0x4983f1(0xa1)),'keyword':_0x16ece5[_0x4983f1(0xdb)]('keyword')});return{'ok':!![],'data':{'total':_0x4849ca['length'],'items':_0x4849ca}};}},apiDocDetail={'service':a1_0x1a6a50(0x90),'command':a1_0x1a6a50(0xbc),'description':a1_0x1a6a50(0xe7),'risk':a1_0x1a6a50(0xa2),'requiresAppCode':![],'flags':[DOC_CODE_FLAG],async 'execute'(_0x58dc76){const _0xd361cc=a1_0x1a6a50;return{'ok':!![],'data':getApiDocDetail(_0x58dc76[_0xd361cc(0xdb)](_0xd361cc(0x84)))};}};export const apiDocDefinitions=[apiDocList,apiDocDetail];function a1_0x3362(){const _0x17bcfa=['Inspect\x20field\x20names\x20and\x20operation\x20metadata\x20for\x20a\x20known\x20dataset\x20code.','CLI\x20has\x20typed\x20`bff\x20detail`\x20and\x20`bff\x20exec`\x20commands\x20for\x20endpoint\x20scripts.','##\x20Execute\x20custom\x20SQL\x0a\x0aExecute\x20a\x20configured\x20SQL\x20script\x20by\x20sqlCode.','Returns\x20SQL\x20execution\x20payload','/api/custom/executeSql','需要向指定数据集新增一条业务数据时使用','api-doc','POST','##\x20Create\x20dataset\x20record\x0a\x0aCreate\x20one\x20data\x20record\x20in\x20a\x20dataset.','filter','includes','paging\x20contains\x20pagination','执行自定义\x20SQL','{\x22appCode\x22:\x22app-aa63b188\x22,\x22sqlCode\x22:\x22xxxxxxxx-xxxxxxxx\x22,\x22params\x22:{}}','/api/dataset/get-dataset-list-by-app-code','获取应用下可调用的\x20BF\x20函数列表','/api/{appCode}/{datasetCode}/filter','method','dataset_data_aggregate','result\x20rows\x20contain\x20aggregate\x20aliases','lovrabet\x20dataset\x20list\x20--appcode\x20<appCode>\x20--format\x20compress','10156rizVls','##\x20Aggregate\x20dataset\x20data','category','read','17570QsMysC','32-character\x20dataset\x20code','API\x20doc\x20code,\x20for\x20example\x20dataset_list','已经确认目标\x20BF\x20的\x20scriptName,且需要实际调用该\x20ENDPOINT\x20脚本完成业务操作时使用','{\x22fieldName\x22:\x22value\x22}','133LRtCLJ','Use\x20this\x20API\x20or\x20`lovrabet\x20dataset\x20list`\x20to\x20discover\x20available\x20dataset\x20codes\x20before\x20reading\x20data.','Filter\x20dataset\x20data','find','分页获取数据集列表','dataset_data_filter','bf_execute','需要按\x20appCode\x20分页获取运行态数据集列表,并优先收敛可用\x20datasetCode\x20时使用','API\x20doc\x20code\x20not\x20found:\x20','Dataset\x20detail','Execute\x20custom\x20SQL','join','None','Use\x20`having`\x20only\x20for\x20post-aggregation\x20filters.','lovrabet\x20data\x20create\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22name\x22:\x22demo\x22}\x27','132776qBOFfF','{\x22where\x22:{},\x22currentPage\x22:1,\x22pageSize\x22:20}','CLI\x20users\x20should\x20prefer\x20`lovrabet\x20dataset\x20list`\x20for\x20this\x20workflow.','GET','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','detail','Script\x20behavior\x20may\x20have\x20side\x20effects;\x20inspect\x20detail\x20first.','已经确认目标\x20sqlCode\x20存在,并需要实际执行该自定义\x20SQL\x20时使用','lovrabet\x20bff\x20exec\x20--name\x20<functionName>\x20--params\x20\x27{}\x27','string','9KiONHJ','trim','9878uEDkqi','384hcnzvO','datasetCode','fields/properties\x20describe\x20data\x20shape','lovrabet\x20bff\x20detail\x20--id\x20<scriptId>\x20--appcode\x20<appCode>','/api/{appCode}/{datasetCode}/create','/api/dataset/getOneByCode?code={datasetCode}','operations\x20describes\x20runtime\x20APIs','This\x20is\x20a\x20write\x20operation;\x20use\x20dry-run\x20when\x20available\x20and\x20safe\x20fixtures\x20for\x20smoke\x20tests.','list','tableData\x20contains\x20records','dataset','If\x20SDK\x20usage\x20is\x20needed,\x20follow\x20with\x20`lovrabet\x20dataset\x20sdk-doc\x20--code\x20<datasetCode>`.','{\x22id\x22:123}','whenToUse','`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','Endpoint\x20function\x20name','需要先确认当前应用有哪些可执行的\x20BF/ENDPOINT\x20函数,以及收敛可用\x20scriptName\x20时使用','1264Fxdcun','Execute\x20BF\x20endpoint\x20function','/api/endpoint/{appCode}/{scriptName}','Returns\x20the\x20created\x20record\x20or\x20backend\x20operation\x20result','Get\x20one\x20dataset\x20record','summary','str','validation','Aggregate\x20supports\x20COUNT,\x20SUM,\x20AVG,\x20MAX,\x20and\x20MIN\x20definitions\x20in\x20the\x20`aggregate`\x20array.','需要按数据集\x20code\x20获取字段、表信息或操作定义时使用','keyword','##\x20Dataset\x20detail','需要携带\x20where、orderBy、分页等条件读取业务数据时使用','Current\x20app\x20code','path','10635684Pgbafs','where\x20filters\x20before\x20aggregation','9854990flxWfM','Show\x20runtime\x20API\x20documentation\x20by\x20code','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27','dataset_list','bf_function_list','{\x22param\x22:\x22value\x22}','tableData\x20contains\x20dataset\x20id/code/name','List\x20datasets','1406997WvpxlL','lovrabet\x20sql\x20exec\x20--sqlcode\x20<sqlCode>\x20--params\x20\x27{}\x27','Aggregate\x20dataset\x20data','235uqLwHu','map','appCode','/api/endpoint/{appCode}/functions','##\x20List\x20datasets','List\x20BF\x20endpoint\x20functions','Returns\x20one\x20matching\x20business\x20record','{\x22aggregate\x22:[{\x22column\x22:\x20\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[]}','##\x20Get\x20one\x20dataset\x20record\x0a\x0aRead\x20one\x20record\x20by\x20id.','List\x20available\x20runtime\x20API\x20documentation\x20entries','Create\x20dataset\x20record','Returns\x20endpoint\x20functionName/id/description','toLowerCase','code','lovrabet\x20dataset\x20detail\x20--code\x20<datasetCode>\x20--appcode\x20<appCode>','查询单条数据','/api/{appCode}/{datasetCode}/getOne','Search\x20docs\x20by\x20code,\x20summary,\x20path,\x20or\x20usage\x20text','{\x22appCode\x22:\x22app-aa63b188\x22,\x22currentPage\x22:1,\x22pageSize\x22:100}'];a1_0x3362=function(){return _0x17bcfa;};return a1_0x3362();}
1
+ function a1_0x4191(){const _0x2fc06b=['需要向指定数据集新增一条业务数据时使用','validation','/api/endpoint/{appCode}/{scriptName}','str','dataset','Filter\x20docs\x20by\x20category,\x20for\x20example\x20dataset','查询单条数据','list','1555128TSUmpF','/api/dataset/getOneByCode?code={datasetCode}','Execute\x20BF\x20endpoint\x20function','code','{\x22id\x22:123}','toLowerCase','/api/{appCode}/{datasetCode}/getOne','需要按数据集\x20code\x20获取字段、表信息或操作定义时使用','read','Returns\x20the\x20created\x20record\x20or\x20backend\x20operation\x20result','length','32-character\x20dataset\x20code','获取数据集详情','api-doc','Search\x20docs\x20by\x20code,\x20summary,\x20path,\x20or\x20usage\x20text','`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','{\x22param\x22:\x22value\x22}','GET','需要按\x20appCode\x20分页获取运行态数据集列表,并优先收敛可用\x20datasetCode\x20时使用','POST','{\x22appCode\x22:\x22app-aa63b188\x22,\x22sqlCode\x22:\x22xxxxxxxx-xxxxxxxx\x22,\x22params\x22:{}}','If\x20SDK\x20usage\x20is\x20needed,\x20follow\x20with\x20`lovrabet\x20dataset\x20sdk-doc\x20--code\x20<datasetCode>`.','string','dataset_data_get_one','List\x20BF\x20endpoint\x20functions','lovrabet\x20bff\x20exec\x20--name\x20<functionName>\x20--params\x20\x27{}\x27','Dataset\x20detail','已经知道记录\x20id,需要按数据集读取单条业务数据时使用','lovrabet\x20dataset\x20list\x20--appcode\x20<appCode>\x20--format\x20compress','聚合查询数据集数据','472040kmARly','执行指定\x20BF\x20函数','result\x20rows\x20contain\x20aggregate\x20aliases','1749576HiWmMO','title','dataset_data_aggregate','Returns\x20SQL\x20execution\x20payload','trim','15NfunJd','datasetCode','bf_execute','1333904fkXGCd','dataset_data_filter','dataset_detail','whenToUse','filter','API\x20doc\x20code\x20not\x20found:\x20','join','创建数据','需要按\x20groupBy\x20分组并做\x20count、sum、avg、max、min\x20等聚合统计时使用','1396192itUiBC','1Jlgorm','appCode','/api/{appCode}/{datasetCode}/aggregate','{\x22fieldName\x22:\x22value\x22}','已经确认目标\x20BF\x20的\x20scriptName,且需要实际调用该\x20ENDPOINT\x20脚本完成业务操作时使用','fields/properties\x20describe\x20data\x20shape','##\x20List\x20datasets','custom_sql','获取应用下可调用的\x20BF\x20函数列表','category','List\x20available\x20runtime\x20API\x20documentation\x20entries','Prefer\x20`filter`\x20when\x20the\x20record\x20id\x20is\x20unknown.','method','Use\x20`having`\x20only\x20for\x20post-aggregation\x20filters.','/api/endpoint/{appCode}/functions','List\x20datasets','Use\x20`where`,\x20`select`,\x20`orderBy`,\x20`currentPage`,\x20and\x20`pageSize`\x20to\x20inspect\x20live\x20data\x20shape.','Aggregate\x20dataset\x20data','tableData\x20contains\x20records','CLI\x20users\x20should\x20prefer\x20`lovrabet\x20dataset\x20list`\x20for\x20this\x20workflow.','8118531MiKfeX','lovrabet\x20sql\x20exec\x20--sqlcode\x20<sqlCode>\x20--params\x20\x27{}\x27','paging.totalCount\x20gives\x20total\x20rows','716118sGrxvx','dataset_list','find','/api/{appCode}/{datasetCode}/filter','scriptName','35hxqtFN','CLI\x20has\x20typed\x20`bff\x20detail`\x20and\x20`bff\x20exec`\x20commands\x20for\x20endpoint\x20scripts.','Endpoint\x20function\x20name','lovrabet\x20data\x20create\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22name\x22:\x22demo\x22}\x27','{\x22appCode\x22:\x22app-aa63b188\x22,\x22currentPage\x22:1,\x22pageSize\x22:100}','map','path','已经确认目标\x20sqlCode\x20存在,并需要实际执行该自定义\x20SQL\x20时使用','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','##\x20Create\x20dataset\x20record\x0a\x0aCreate\x20one\x20data\x20record\x20in\x20a\x20dataset.','Current\x20app\x20code','{\x22where\x22:{},\x22currentPage\x22:1,\x22pageSize\x22:20}','##\x20Execute\x20custom\x20SQL\x0a\x0aExecute\x20a\x20configured\x20SQL\x20script\x20by\x20sqlCode.','Use\x20this\x20API\x20or\x20`lovrabet\x20dataset\x20list`\x20to\x20discover\x20available\x20dataset\x20codes\x20before\x20reading\x20data.','条件过滤查询数据','tableData\x20contains\x20dataset\x20id/code/name','Returns\x20one\x20matching\x20business\x20record','Create\x20dataset\x20record','paging\x20contains\x20pagination','##\x20Dataset\x20detail','summary','This\x20is\x20a\x20write\x20operation;\x20use\x20dry-run\x20when\x20available\x20and\x20safe\x20fixtures\x20for\x20smoke\x20tests.','Use\x20read-only\x20data\x20commands\x20before\x20writing\x20Artifacts\x20that\x20display\x20real\x20data.','Script\x20behavior\x20may\x20have\x20side\x20effects;\x20inspect\x20detail\x20first.','keyword','/api/custom/executeSql'];a1_0x4191=function(){return _0x2fc06b;};return a1_0x4191();}const a1_0x1f3e0f=a1_0x21de;(function(_0x26ccc1,_0x68a4b){const _0xeb741a=a1_0x21de,_0x2ea71d=_0x26ccc1();while(!![]){try{const _0x43e7dc=parseInt(_0xeb741a(0x9f))/0x1*(parseInt(_0xeb741a(0xb6))/0x2)+-parseInt(_0xeb741a(0x8d))/0x3+-parseInt(_0xeb741a(0x95))/0x4+parseInt(_0xeb741a(0x92))/0x5*(-parseInt(_0xeb741a(0xdd))/0x6)+-parseInt(_0xeb741a(0xbb))/0x7*(-parseInt(_0xeb741a(0x9e))/0x8)+parseInt(_0xeb741a(0xb3))/0x9+parseInt(_0xeb741a(0x8a))/0xa;if(_0x43e7dc===_0x68a4b)break;else _0x2ea71d['push'](_0x2ea71d['shift']());}catch(_0x1123c4){_0x2ea71d['push'](_0x2ea71d['shift']());}}}(a1_0x4191,0x7694e));import{CliErrors}from'../../errors.js';function a1_0x21de(_0x3758ab,_0x2191cf){_0x3758ab=_0x3758ab-0x6e;const _0x419139=a1_0x4191();let _0x21dea2=_0x419139[_0x3758ab];return _0x21dea2;}const CATEGORY_FLAG={'name':a1_0x1f3e0f(0xa8),'type':a1_0x1f3e0f(0x82),'description':a1_0x1f3e0f(0xda)},KEYWORD_FLAG={'name':a1_0x1f3e0f(0xd3),'type':a1_0x1f3e0f(0x82),'description':a1_0x1f3e0f(0x7a)},DOC_CODE_FLAG={'name':a1_0x1f3e0f(0x6f),'type':a1_0x1f3e0f(0x82),'required':!![],'description':'API\x20doc\x20code,\x20for\x20example\x20dataset_list'},DOCS=[{'code':a1_0x1f3e0f(0xb7),'category':a1_0x1f3e0f(0xd9),'title':a1_0x1f3e0f(0xae),'method':a1_0x1f3e0f(0x7f),'path':'/api/dataset/get-dataset-list-by-app-code','summary':'分页获取数据集列表','whenToUse':a1_0x1f3e0f(0x7e),'pathParams':[],'queryParams':[],'bodySchema':a1_0x1f3e0f(0xbf),'responseHighlights':[a1_0x1f3e0f(0xca),a1_0x1f3e0f(0xb5)],'examples':[a1_0x1f3e0f(0x88)],'notes':[a1_0x1f3e0f(0xb2)],'markdown':[a1_0x1f3e0f(0xa5),'',a1_0x1f3e0f(0xc8)][a1_0x1f3e0f(0x9b)]('\x0a')},{'code':a1_0x1f3e0f(0x97),'category':a1_0x1f3e0f(0xd9),'title':a1_0x1f3e0f(0x86),'method':a1_0x1f3e0f(0x7d),'path':a1_0x1f3e0f(0xde),'summary':a1_0x1f3e0f(0x78),'whenToUse':a1_0x1f3e0f(0x73),'pathParams':[],'queryParams':[{'name':a1_0x1f3e0f(0x6f),'description':a1_0x1f3e0f(0x77)}],'bodySchema':'None','responseHighlights':[a1_0x1f3e0f(0xa4),'operations\x20describes\x20runtime\x20APIs'],'examples':['lovrabet\x20dataset\x20detail\x20--code\x20<datasetCode>\x20--appcode\x20<appCode>'],'notes':[a1_0x1f3e0f(0x81)],'markdown':[a1_0x1f3e0f(0xce),'','Inspect\x20field\x20names\x20and\x20operation\x20metadata\x20for\x20a\x20known\x20dataset\x20code.'][a1_0x1f3e0f(0x9b)]('\x0a')},{'code':a1_0x1f3e0f(0x96),'category':'dataset','title':'Filter\x20dataset\x20data','method':'POST','path':a1_0x1f3e0f(0xb9),'summary':a1_0x1f3e0f(0xc9),'whenToUse':'需要携带\x20where、orderBy、分页等条件读取业务数据时使用','pathParams':[{'name':a1_0x1f3e0f(0xa0),'description':a1_0x1f3e0f(0xc5)},{'name':'datasetCode','description':a1_0x1f3e0f(0x77)}],'queryParams':[],'bodySchema':a1_0x1f3e0f(0xc6),'responseHighlights':[a1_0x1f3e0f(0xb1),a1_0x1f3e0f(0xcd)],'examples':['lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:5}\x27'],'notes':[a1_0x1f3e0f(0xd1)],'markdown':['##\x20Filter\x20dataset\x20data','',a1_0x1f3e0f(0xaf)]['join']('\x0a')},{'code':a1_0x1f3e0f(0x8f),'category':'dataset','title':a1_0x1f3e0f(0xb0),'method':a1_0x1f3e0f(0x7f),'path':a1_0x1f3e0f(0xa1),'summary':a1_0x1f3e0f(0x89),'whenToUse':a1_0x1f3e0f(0x9d),'pathParams':[{'name':'appCode','description':a1_0x1f3e0f(0xc5)},{'name':a1_0x1f3e0f(0x93),'description':a1_0x1f3e0f(0x77)}],'queryParams':[],'bodySchema':'{\x22aggregate\x22:[{\x22column\x22:\x20\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[]}','responseHighlights':[a1_0x1f3e0f(0x8c),'where\x20filters\x20before\x20aggregation'],'examples':[a1_0x1f3e0f(0xc3)],'notes':[a1_0x1f3e0f(0xac),a1_0x1f3e0f(0x7b)],'markdown':['##\x20Aggregate\x20dataset\x20data','','Aggregate\x20supports\x20COUNT,\x20SUM,\x20AVG,\x20MAX,\x20and\x20MIN\x20definitions\x20in\x20the\x20`aggregate`\x20array.'][a1_0x1f3e0f(0x9b)]('\x0a')},{'code':a1_0x1f3e0f(0x83),'category':'dataset','title':'Get\x20one\x20dataset\x20record','method':'POST','path':a1_0x1f3e0f(0x72),'summary':a1_0x1f3e0f(0xdb),'whenToUse':a1_0x1f3e0f(0x87),'pathParams':[{'name':a1_0x1f3e0f(0xa0),'description':a1_0x1f3e0f(0xc5)},{'name':'datasetCode','description':a1_0x1f3e0f(0x77)}],'queryParams':[],'bodySchema':a1_0x1f3e0f(0x70),'responseHighlights':[a1_0x1f3e0f(0xcb)],'examples':['lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27'],'notes':[a1_0x1f3e0f(0xaa)],'markdown':'##\x20Get\x20one\x20dataset\x20record\x0a\x0aRead\x20one\x20record\x20by\x20id.'},{'code':'dataset_data_create','category':a1_0x1f3e0f(0xd9),'title':a1_0x1f3e0f(0xcc),'method':'POST','path':'/api/{appCode}/{datasetCode}/create','summary':a1_0x1f3e0f(0x9c),'whenToUse':a1_0x1f3e0f(0xd5),'pathParams':[{'name':'appCode','description':a1_0x1f3e0f(0xc5)},{'name':a1_0x1f3e0f(0x93),'description':'32-character\x20dataset\x20code'}],'queryParams':[],'bodySchema':a1_0x1f3e0f(0xa2),'responseHighlights':[a1_0x1f3e0f(0x75)],'examples':[a1_0x1f3e0f(0xbe)],'notes':[a1_0x1f3e0f(0xd0)],'markdown':a1_0x1f3e0f(0xc4)},{'code':'bf_function_list','category':'bf','title':a1_0x1f3e0f(0x84),'method':a1_0x1f3e0f(0x7d),'path':a1_0x1f3e0f(0xad),'summary':a1_0x1f3e0f(0xa7),'whenToUse':'需要先确认当前应用有哪些可执行的\x20BF/ENDPOINT\x20函数,以及收敛可用\x20scriptName\x20时使用','pathParams':[{'name':a1_0x1f3e0f(0xa0),'description':a1_0x1f3e0f(0xc5)}],'queryParams':[],'bodySchema':'None','responseHighlights':['Returns\x20endpoint\x20functionName/id/description'],'examples':['lovrabet\x20bff\x20detail\x20--id\x20<scriptId>\x20--appcode\x20<appCode>'],'notes':[a1_0x1f3e0f(0xbc)],'markdown':'##\x20List\x20BF\x20endpoint\x20functions\x0a\x0aDiscover\x20executable\x20endpoint\x20functions.'},{'code':a1_0x1f3e0f(0x94),'category':'bf','title':a1_0x1f3e0f(0x6e),'method':a1_0x1f3e0f(0x7f),'path':a1_0x1f3e0f(0xd7),'summary':a1_0x1f3e0f(0x8b),'whenToUse':a1_0x1f3e0f(0xa3),'pathParams':[{'name':'appCode','description':a1_0x1f3e0f(0xc5)},{'name':a1_0x1f3e0f(0xba),'description':a1_0x1f3e0f(0xbd)}],'queryParams':[],'bodySchema':a1_0x1f3e0f(0x7c),'responseHighlights':['Returns\x20script\x20business\x20payload'],'examples':[a1_0x1f3e0f(0x85)],'notes':[a1_0x1f3e0f(0xd2)],'markdown':'##\x20Execute\x20BF\x20endpoint\x20function\x0a\x0aExecute\x20a\x20known\x20endpoint\x20script.'},{'code':'custom_sql_execute','category':a1_0x1f3e0f(0xa6),'title':'Execute\x20custom\x20SQL','method':'POST','path':a1_0x1f3e0f(0xd4),'summary':'执行自定义\x20SQL','whenToUse':a1_0x1f3e0f(0xc2),'pathParams':[],'queryParams':[],'bodySchema':a1_0x1f3e0f(0x80),'responseHighlights':[a1_0x1f3e0f(0x90)],'examples':[a1_0x1f3e0f(0xb4)],'notes':['Use\x20`lovrabet\x20sql\x20detail`\x20before\x20execution.'],'markdown':a1_0x1f3e0f(0xc7)}];function entrySummary(_0x2f0d42){const _0x237d3e=a1_0x1f3e0f;return{'code':_0x2f0d42[_0x237d3e(0x6f)],'category':_0x2f0d42[_0x237d3e(0xa8)],'method':_0x2f0d42['method'],'path':_0x2f0d42['path'],'summary':_0x2f0d42['summary'],'whenToUse':_0x2f0d42[_0x237d3e(0x98)]};}export function listApiDocEntries(_0x9ea4b3={}){const _0x8e1641=a1_0x1f3e0f,_0x122d3e=String(_0x9ea4b3[_0x8e1641(0xa8)]||'')[_0x8e1641(0x91)](),_0x2106c5=String(_0x9ea4b3['keyword']||'')['trim']()[_0x8e1641(0x71)]();return DOCS[_0x8e1641(0x99)](_0x11bcad=>{const _0x587229=_0x8e1641;if(_0x122d3e&&_0x11bcad['category']!==_0x122d3e)return![];if(!_0x2106c5)return!![];return[_0x11bcad[_0x587229(0x6f)],_0x11bcad[_0x587229(0xa8)],_0x11bcad[_0x587229(0xab)],_0x11bcad[_0x587229(0xc1)],_0x11bcad[_0x587229(0xcf)],_0x11bcad['whenToUse'],_0x11bcad[_0x587229(0x8e)]][_0x587229(0x9b)]('\x20')[_0x587229(0x71)]()['includes'](_0x2106c5);})[_0x8e1641(0xc0)](entrySummary);}export function getApiDocDetail(_0x1ddc24){const _0x546235=a1_0x1f3e0f,_0x1fac25=DOCS[_0x546235(0xb8)](_0x34a263=>_0x34a263['code']===_0x1ddc24);if(!_0x1fac25)throw CliErrors[_0x546235(0xd6)](_0x546235(0x9a)+_0x1ddc24);return{..._0x1fac25};}const apiDocList={'service':'api-doc','command':a1_0x1f3e0f(0xdc),'description':a1_0x1f3e0f(0xa9),'risk':'read','requiresAppCode':![],'flags':[CATEGORY_FLAG,KEYWORD_FLAG],async 'execute'(_0x46fdda){const _0x4e976c=a1_0x1f3e0f,_0x283903=listApiDocEntries({'category':_0x46fdda[_0x4e976c(0xd8)](_0x4e976c(0xa8)),'keyword':_0x46fdda['str'](_0x4e976c(0xd3))});return{'ok':!![],'data':{'total':_0x283903[_0x4e976c(0x76)],'items':_0x283903}};}},apiDocDetail={'service':a1_0x1f3e0f(0x79),'command':'detail','description':'Show\x20runtime\x20API\x20documentation\x20by\x20code','risk':a1_0x1f3e0f(0x74),'requiresAppCode':![],'flags':[DOC_CODE_FLAG],async 'execute'(_0x8a3e22){const _0x2a34f1=a1_0x1f3e0f;return{'ok':!![],'data':getApiDocDetail(_0x8a3e22[_0x2a34f1(0xd8)](_0x2a34f1(0x6f)))};}};export const apiDocDefinitions=[apiDocList,apiDocDetail];
@@ -1 +1 @@
1
- (function(_0xd53fa1,_0x44afc9){const _0x1c25e3=a2_0x5abf,_0x2dab57=_0xd53fa1();while(!![]){try{const _0x56ff80=parseInt(_0x1c25e3(0x1e1))/0x1+-parseInt(_0x1c25e3(0x1dc))/0x2+parseInt(_0x1c25e3(0x1cc))/0x3*(parseInt(_0x1c25e3(0x1e4))/0x4)+parseInt(_0x1c25e3(0x1da))/0x5*(parseInt(_0x1c25e3(0x1cf))/0x6)+parseInt(_0x1c25e3(0x1d1))/0x7+-parseInt(_0x1c25e3(0x1d9))/0x8+-parseInt(_0x1c25e3(0x1d5))/0x9*(parseInt(_0x1c25e3(0x1dd))/0xa);if(_0x56ff80===_0x44afc9)break;else _0x2dab57['push'](_0x2dab57['shift']());}catch(_0x4454b5){_0x2dab57['push'](_0x2dab57['shift']());}}}(a2_0x221c,0x7ed2b));import{createHash}from'node:crypto';function a2_0x221c(){const _0x5955ef=['371339TDPROK','utf8','digest','12QQSqPE','isArray','items','658551HZTVOd','cache','sha256','18aGNCoX','EPERM','1087723VUHVUA','slice','hex','ak_','126BtmXyf','my-apps.json','find','code','586352DGQnGU','1406245amLWdt','trim','122566tQlPCB','982130SiPOwb','homeDirName','.tmp','stringify'];a2_0x221c=function(){return _0x5955ef;};return a2_0x221c();}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';import{isRuntimeAccessibleApp}from'../../commands/app/eligibility.js';function a2_0x5abf(_0x39ed03,_0x43fb96){_0x39ed03=_0x39ed03-0x1cb;const _0x221c3=a2_0x221c();let _0x5abf37=_0x221c3[_0x39ed03];return _0x5abf37;}export function fingerprintAccessKey(_0x4c6d57){const _0x4e29c9=a2_0x5abf,_0x902822=_0x4c6d57[_0x4e29c9(0x1db)](),_0x4f5fd5=_0x902822['slice'](-0x6)||'unknown',_0x3cd46a=createHash(_0x4e29c9(0x1ce))['update'](_0x902822)[_0x4e29c9(0x1e3)](_0x4e29c9(0x1d3))[_0x4e29c9(0x1d2)](0x0,0xc);return _0x4e29c9(0x1d4)+_0x4f5fd5+'_'+_0x3cd46a;}export function getAppCacheFilePath(_0x591f32,_0x5e3c46){const _0x11c0b3=a2_0x5abf;return resolve(homedir(),PRODUCT_CONFIG[_0x11c0b3(0x1de)],_0x11c0b3(0x1cd),_0x591f32,fingerprintAccessKey(_0x5e3c46),_0x11c0b3(0x1d6));}export function readCachedAppList(_0x135612,_0x26b1bd){const _0x2bc100=a2_0x5abf;if(!_0x26b1bd?.['trim']())return null;const _0x2456f9=getAppCacheFilePath(_0x135612,_0x26b1bd);if(!existsSync(_0x2456f9))return null;try{const _0x30ed3b=readFileSync(_0x2456f9,'utf8');if(!_0x30ed3b[_0x2bc100(0x1db)]())return null;const _0xac8ced=JSON['parse'](_0x30ed3b);if(!Array[_0x2bc100(0x1e5)](_0xac8ced[_0x2bc100(0x1cb)]))return null;return _0xac8ced;}catch{return null;}}export function writeCachedAppList(_0x2994f,_0x419b8b,_0x273af3){const _0x12cd4f=a2_0x5abf,_0x1d69a7=getAppCacheFilePath(_0x2994f,_0x419b8b),_0x44de58=dirname(_0x1d69a7);!existsSync(_0x44de58)&&mkdirSync(_0x44de58,{'recursive':!![]});const _0x30fb17=_0x1d69a7+_0x12cd4f(0x1df);try{writeFileSync(_0x30fb17,JSON[_0x12cd4f(0x1e0)](_0x273af3,null,0x2)+'\x0a',{'encoding':_0x12cd4f(0x1e2),'mode':0x180});try{renameSync(_0x30fb17,_0x1d69a7);}catch(_0x4a16b7){if(_0x4a16b7[_0x12cd4f(0x1d8)]===_0x12cd4f(0x1d0)||_0x4a16b7[_0x12cd4f(0x1d8)]==='EXDEV'||_0x4a16b7[_0x12cd4f(0x1d8)]==='EACCES'){writeFileSync(_0x1d69a7,JSON['stringify'](_0x273af3,null,0x2)+'\x0a',{'encoding':_0x12cd4f(0x1e2)});try{unlinkSync(_0x30fb17);}catch{}}else throw _0x4a16b7;}}catch(_0x128df3){try{unlinkSync(_0x30fb17);}catch{}throw _0x128df3;}return _0x1d69a7;}export function resolveCachedAppCode(_0x379d32,_0x1ebb1c,_0x23d2be){const _0x188f70=a2_0x5abf;if(!_0x379d32)return undefined;const _0x1ddedf=readCachedAppList(_0x1ebb1c,_0x23d2be),_0x137617=_0x1ddedf?.[_0x188f70(0x1cb)][_0x188f70(0x1d7)](_0x5dd162=>_0x5dd162['appName']===_0x379d32&&isRuntimeAccessibleApp(_0x5dd162));return _0x137617?.['appCode']?.[_0x188f70(0x1db)]()||undefined;}
1
+ (function(_0x40025f,_0x1c08a7){const _0x59ea02=a2_0x120a,_0x38d06f=_0x40025f();while(!![]){try{const _0x38b141=parseInt(_0x59ea02(0x73))/0x1*(parseInt(_0x59ea02(0x71))/0x2)+-parseInt(_0x59ea02(0x77))/0x3*(-parseInt(_0x59ea02(0x82))/0x4)+parseInt(_0x59ea02(0x69))/0x5+parseInt(_0x59ea02(0x7a))/0x6+-parseInt(_0x59ea02(0x72))/0x7*(parseInt(_0x59ea02(0x7e))/0x8)+parseInt(_0x59ea02(0x6a))/0x9+-parseInt(_0x59ea02(0x75))/0xa;if(_0x38b141===_0x1c08a7)break;else _0x38d06f['push'](_0x38d06f['shift']());}catch(_0x5a94f7){_0x38d06f['push'](_0x38d06f['shift']());}}}(a2_0x3484,0x5358e));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';function a2_0x120a(_0x44b471,_0x1b9af1){_0x44b471=_0x44b471-0x68;const _0x348475=a2_0x3484();let _0x120a3b=_0x348475[_0x44b471];return _0x120a3b;}import{PRODUCT_CONFIG}from'../../constant/product.js';import{isRuntimeAccessibleApp}from'../../commands/app/eligibility.js';export function fingerprintAccessKey(_0x17c659){const _0x57eaf7=a2_0x120a,_0x4d38ad=_0x17c659[_0x57eaf7(0x80)](),_0x2e565b=_0x4d38ad['slice'](-0x6)||'unknown',_0x1bb2ec=createHash(_0x57eaf7(0x6d))[_0x57eaf7(0x6b)](_0x4d38ad)[_0x57eaf7(0x76)](_0x57eaf7(0x7c))[_0x57eaf7(0x74)](0x0,0xc);return _0x57eaf7(0x6c)+_0x2e565b+'_'+_0x1bb2ec;}export function getAppCacheFilePath(_0x2ebe28,_0x4d4edb){const _0x43767a=a2_0x120a;return resolve(homedir(),PRODUCT_CONFIG['homeDirName'],_0x43767a(0x78),_0x2ebe28,fingerprintAccessKey(_0x4d4edb),'my-apps.json');}export function readCachedAppList(_0x300533,_0x309b78){const _0x31fe12=a2_0x120a;if(!_0x309b78?.[_0x31fe12(0x80)]())return null;const _0x577f75=getAppCacheFilePath(_0x300533,_0x309b78);if(!existsSync(_0x577f75))return null;try{const _0x2167d5=readFileSync(_0x577f75,_0x31fe12(0x6f));if(!_0x2167d5[_0x31fe12(0x80)]())return null;const _0x28d5b1=JSON['parse'](_0x2167d5);if(!Array[_0x31fe12(0x7b)](_0x28d5b1[_0x31fe12(0x68)]))return null;return _0x28d5b1;}catch{return null;}}function a2_0x3484(){const _0xaa8e2e=['digest','32358rLrPHt','cache','find','2015874uqMwmP','isArray','hex','stringify','2232jNeCnd','EPERM','trim','.tmp','232REsMxy','appName','code','items','433450woaGCY','2837655wjojnT','update','ak_','sha256','appCode','utf8','EACCES','2502DdclNj','12817iQoJsh','110onChup','slice','6489230ZxSWwv'];a2_0x3484=function(){return _0xaa8e2e;};return a2_0x3484();}export function writeCachedAppList(_0x1988a6,_0x2ab2ae,_0x282aa0){const _0x3b65cd=a2_0x120a,_0x5a5da1=getAppCacheFilePath(_0x1988a6,_0x2ab2ae),_0x27a815=dirname(_0x5a5da1);!existsSync(_0x27a815)&&mkdirSync(_0x27a815,{'recursive':!![]});const _0x3b1a90=_0x5a5da1+_0x3b65cd(0x81);try{writeFileSync(_0x3b1a90,JSON['stringify'](_0x282aa0,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180});try{renameSync(_0x3b1a90,_0x5a5da1);}catch(_0x1b3c56){if(_0x1b3c56['code']===_0x3b65cd(0x7f)||_0x1b3c56[_0x3b65cd(0x84)]==='EXDEV'||_0x1b3c56['code']===_0x3b65cd(0x70)){writeFileSync(_0x5a5da1,JSON[_0x3b65cd(0x7d)](_0x282aa0,null,0x2)+'\x0a',{'encoding':_0x3b65cd(0x6f)});try{unlinkSync(_0x3b1a90);}catch{}}else throw _0x1b3c56;}}catch(_0xa57669){try{unlinkSync(_0x3b1a90);}catch{}throw _0xa57669;}return _0x5a5da1;}export function resolveCachedAppCode(_0x357185,_0x6eaa48,_0x27d85d){const _0x108af4=a2_0x120a;if(!_0x357185)return undefined;const _0x49664f=readCachedAppList(_0x6eaa48,_0x27d85d),_0x5b06ff=_0x49664f?.[_0x108af4(0x68)][_0x108af4(0x79)](_0x17f08e=>_0x17f08e[_0x108af4(0x83)]===_0x357185&&isRuntimeAccessibleApp(_0x17f08e));return _0x5b06ff?.[_0x108af4(0x6e)]?.['trim']()||undefined;}
@@ -1 +1 @@
1
- const a3_0x197a9c=a3_0x2d89;(function(_0x490b87,_0x3a3225){const _0x174d32=a3_0x2d89,_0x242dbd=_0x490b87();while(!![]){try{const _0x5a5fd4=parseInt(_0x174d32(0x16b))/0x1+-parseInt(_0x174d32(0x148))/0x2*(parseInt(_0x174d32(0x158))/0x3)+-parseInt(_0x174d32(0x136))/0x4*(parseInt(_0x174d32(0x12b))/0x5)+-parseInt(_0x174d32(0x138))/0x6+parseInt(_0x174d32(0x152))/0x7*(-parseInt(_0x174d32(0x147))/0x8)+parseInt(_0x174d32(0x133))/0x9*(parseInt(_0x174d32(0x162))/0xa)+parseInt(_0x174d32(0x178))/0xb;if(_0x5a5fd4===_0x3a3225)break;else _0x242dbd['push'](_0x242dbd['shift']());}catch(_0x25c75f){_0x242dbd['push'](_0x242dbd['shift']());}}}(a3_0x5733,0xeb10d));import{CliErrors}from'../../errors.js';function a3_0x2d89(_0x329d35,_0xf22bab){_0x329d35=_0x329d35-0x120;const _0x5733ee=a3_0x5733();let _0x2d89d8=_0x5733ee[_0x329d35];return _0x2d89d8;}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_0x197a9c(0x163),'type':a3_0x197a9c(0x126),'description':a3_0x197a9c(0x15c),'default':![]};function a3_0x5733(){const _0x39c95c=['Target\x20environment\x20(default:\x20current\x20env)','Use\x20global\x20config\x20scope','string','local','Use\x20`','defaultApp','read','10XfSZQW','global','Deprecated:\x20use\x20workspace\x20init\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','validation','../../context.js','items','appName','Loaded\x20','\x20workspace\x20use\x20--app\x20<name>\x20[--env\x20daily]','12184NncHYd','length','str','no-cache','trim','pull','envName','production','App\x20\x22','entries','isCurrent','Default\x20app\x20candidate\x20set\x20to\x20\x22','projectPath','26760833WVRxpO','join','mergedCli','\x20app\x20','appcode','cachePath','\x22\x20not\x20found.','No\x20cached\x20apps\x20found.','\x20app\x20list`\x20to\x20discover\x20remote\x20apps,\x20or\x20add\x20apps.','boolean','Deprecated:\x20use\x20workspace\x20use\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','No\x20apps\x20found\x20on\x20the\x20platform.','fetchedAt','50145nXIDKW','Read\x20from\x20local\x20cache\x20only','use','source','`\x20instead.','args','env','../../commands/app/remote-source.js','14973399oovGee','i18nInfo','Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','32zAnKhc','app','2853504yXLtBf','enableI18n','\x20app\x20use\x20<name>\x20[--global]','bool','init','appOwnerName','list','from','find','Filter\x20by\x20environment\x20(default:\x20current\x20env)','map','accessKey','\x20cached\x20app(s)\x20for\x20env=\x22','push','raw','6326296BPSrNu','2016958IAIzsP','isArray','\x20workspace\x20init\x20--appcode\x20<code>\x20[--env\x20daily]','Read\x20app\x20list\x20from\x20local\x20cache\x20only','\x20app(s)\x20for\x20env=\x22','filter','Remote\x20app\x20name\x20to\x20activate','include-unpublished','remote','Refreshed\x20app\x20cache\x20with\x20','14EuLlYc','name','appCode','../../commands/app/cache.js','warn','nonInteractive','3CjwddT','Missing\x20app\x20name.','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache'];a3_0x5733=function(){return _0x39c95c;};return a3_0x5733();}function collectFlags(_0x204f27,_0x1d7b83){const _0x31bb1e=a3_0x197a9c,_0x5ee2e0={};for(const _0x55e21c of _0x1d7b83){const _0x4c687f=_0x55e21c['type']===_0x31bb1e(0x126)?_0x204f27[_0x31bb1e(0x13b)](_0x55e21c[_0x31bb1e(0x153)]):_0x204f27[_0x31bb1e(0x16d)](_0x55e21c[_0x31bb1e(0x153)]);if(_0x4c687f!==''&&_0x4c687f!==![])_0x5ee2e0[_0x55e21c[_0x31bb1e(0x153)]]=_0x4c687f;}if(_0x204f27[_0x31bb1e(0x157)])_0x5ee2e0['nonInteractive']=!![];return _0x5ee2e0;}function normalizeLanguages(_0x520856){const _0x2aa14c=a3_0x197a9c;if(!Array[_0x2aa14c(0x149)](_0x520856))return[];return _0x520856[_0x2aa14c(0x14d)](_0x391db3=>typeof _0x391db3===_0x2aa14c(0x15d))['map'](_0x2de3d1=>_0x2de3d1['trim']())[_0x2aa14c(0x14d)](Boolean);}function buildRemoteAppI18nFields(_0x51a391){const _0x32407f=a3_0x197a9c,_0x3be8fb=normalizeLanguages(_0x51a391['i18nInfo']?.['langs']);return{'enableI18n':typeof _0x51a391[_0x32407f(0x139)]===_0x32407f(0x126)?_0x51a391[_0x32407f(0x139)]:null,'languages':_0x3be8fb,'i18nInfo':_0x51a391[_0x32407f(0x134)]?{..._0x51a391['i18nInfo'],'langs':_0x3be8fb[_0x32407f(0x16c)]?_0x3be8fb:null}:null};}const initDef={'service':a3_0x197a9c(0x137),'command':a3_0x197a9c(0x13c),'description':a3_0x197a9c(0x164),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initCreateFlagDefs,async 'execute'(_0x3341b9){const _0x2301b8=a3_0x197a9c;return warnDeprecatedAppCommand('init',CLI_BIN_NAME+_0x2301b8(0x14a)),await runInit(collectFlags(_0x3341b9,initCreateFlagDefs)),{'ok':!![]};}},listDef={'service':a3_0x197a9c(0x137),'command':a3_0x197a9c(0x13e),'description':'List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','risk':a3_0x197a9c(0x161),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':a3_0x197a9c(0x131),'type':a3_0x197a9c(0x15d),'description':a3_0x197a9c(0x141),'enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0x197a9c(0x15e),'type':a3_0x197a9c(0x126),'description':a3_0x197a9c(0x14b),'default':![]},{'name':a3_0x197a9c(0x16e),'type':a3_0x197a9c(0x126),'description':a3_0x197a9c(0x15a),'default':![]},{'name':a3_0x197a9c(0x14f),'type':a3_0x197a9c(0x126),'description':'Include\x20unpublished\x20apps\x20for\x20diagnostics','default':![]}],async 'execute'(_0x2475bc){const _0x51408c=a3_0x197a9c,_0x5bcdba=_0x2475bc['str'](_0x51408c(0x131))||_0x2475bc[_0x51408c(0x171)]||getEnv()||_0x51408c(0x172),_0x53eb9e=_0x2475bc[_0x51408c(0x13b)](_0x51408c(0x15e)),_0x390e16=_0x2475bc[_0x51408c(0x13b)]('no-cache'),_0x4f9419=_0x2475bc[_0x51408c(0x13b)](_0x51408c(0x14f)),{readRawConfigWithLayers:_0xa2182d,resolveDefaultAppSource:_0x44adbf,getLocalAppAliases:_0x5c0ac2}=await import(_0x51408c(0x166)),{getRemoteAppList:_0x1d90d1}=await import(_0x51408c(0x132)),{config:_0x55b3cf,layers:_0x5a713f}=_0xa2182d(),_0x5c733c=_0x44adbf(_0x5a713f),{defaultApp:_0x1c0ac5}=_0x55b3cf,_0x2b5e8a=await _0x1d90d1({'env':_0x5bcdba,'accessKey':_0x2475bc[_0x51408c(0x143)],'localOnly':_0x53eb9e,'noCache':_0x390e16}),_0x1b3df9=_0x4f9419?_0x2b5e8a[_0x51408c(0x167)]:filterRuntimeAccessibleApps(_0x2b5e8a[_0x51408c(0x167)]),_0xce6ad1=_0x2b5e8a[_0x51408c(0x167)]['length']-_0x1b3df9['length'],_0xea81b4=_0x1b3df9[_0x51408c(0x142)](_0x4cefa4=>{const _0xaffa65=_0x51408c;return{'name':_0x4cefa4[_0xaffa65(0x168)],'appcode':_0x4cefa4['appCode'],'named':!![],'definedIn':_0xaffa65(0x150),'isDefault':_0x4cefa4[_0xaffa65(0x168)]===_0x1c0ac5,...buildAppProfileListFields(_0x5bcdba),...buildRemoteAppI18nFields(_0x4cefa4),'source':_0x2b5e8a[_0xaffa65(0x12e)],'owner':_0x4cefa4[_0xaffa65(0x13d)]??null,'status':_0x4cefa4['appPublishStatus']??null,'cachedAt':_0x2b5e8a[_0xaffa65(0x12a)]};}),_0x2394f7=_0x5c0ac2(_0x55b3cf);let _0x5e0e3f=0x0;for(const [_0x372f07,_0x38b37d]of Object[_0x51408c(0x174)](_0x2394f7)){const _0x2683bf=typeof _0x38b37d[_0x51408c(0x121)]==='string'?_0x38b37d['appcode'][_0x51408c(0x16f)]():'';if(!_0x2683bf)continue;const _0x3d0b36=findAppByCode(_0x2b5e8a[_0x51408c(0x167)],_0x2683bf);if(!_0x4f9419&&_0x3d0b36&&!isRuntimeAccessibleApp(_0x3d0b36))continue;_0x5e0e3f+=0x1,_0xea81b4[_0x51408c(0x145)]({'name':_0x372f07,'appcode':_0x2683bf,'named':!![],'definedIn':'local','isDefault':_0x372f07===_0x1c0ac5,...buildAppProfileListFields(_0x5bcdba),'source':'config','owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0xea81b4,_0x2475bc[_0x51408c(0x17a)]);const _0x582e2c=_0xea81b4[_0x51408c(0x140)](_0x545853=>_0x545853[_0x51408c(0x175)]===!![]),_0x44b197=_0x1c0ac5??_0x582e2c?.['name']??null,_0x3ef7ca={'env':_0x5bcdba,'source':_0x2b5e8a[_0x51408c(0x12e)],'fetchedAt':_0x2b5e8a[_0x51408c(0x12a)],'cachePath':_0x2b5e8a[_0x51408c(0x122)],'globalPath':_0x5a713f['globalPath']??null,'projectPath':_0x5a713f[_0x51408c(0x177)]??null,'defaultApp':_0x44b197,'defaultAppSource':_0x1c0ac5!=null?_0x5c733c:null,'localAliasCount':_0x5e0e3f,'remoteTotal':_0x2b5e8a[_0x51408c(0x167)][_0x51408c(0x16c)],'hiddenUnpublishedCount':_0xce6ad1,'includeUnpublished':_0x4f9419};if(_0xea81b4[_0x51408c(0x16c)]===0x0)return{'ok':!![],'data':{'items':_0xea81b4,'meta':_0x3ef7ca},'message':_0x2b5e8a[_0x51408c(0x12e)]==='cache'?_0x51408c(0x124):_0x51408c(0x129)};return{'ok':!![],'data':{'items':_0xea81b4,'meta':_0x3ef7ca}};}},pullDef={'service':a3_0x197a9c(0x137),'command':a3_0x197a9c(0x170),'description':a3_0x197a9c(0x135),'risk':'write','requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'env','type':a3_0x197a9c(0x15d),'description':a3_0x197a9c(0x15b),'enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0x197a9c(0x15e),'type':a3_0x197a9c(0x126),'description':a3_0x197a9c(0x12c),'default':![]},{'name':a3_0x197a9c(0x16e),'type':a3_0x197a9c(0x126),'description':'Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','default':![]}],async 'execute'(_0x554718){const _0x230413=a3_0x197a9c,_0x43e7f9=_0x554718[_0x230413(0x16d)](_0x230413(0x131))||_0x554718[_0x230413(0x171)]||getEnv()||_0x230413(0x172),_0x18196f=_0x554718[_0x230413(0x13b)](_0x230413(0x15e)),_0x4a9a44=_0x554718[_0x230413(0x13b)](_0x230413(0x16e)),{getRemoteAppList:_0x342e97}=await import(_0x230413(0x132)),_0x5e42cb=await _0x342e97({'env':_0x43e7f9,'accessKey':_0x554718[_0x230413(0x143)],'localOnly':_0x18196f,'noCache':_0x4a9a44});return{'ok':!![],'data':{'total':_0x5e42cb['items'][_0x230413(0x16c)],'env':_0x43e7f9,'source':_0x5e42cb[_0x230413(0x12e)],'fetchedAt':_0x5e42cb['fetchedAt'],'cachePath':_0x5e42cb[_0x230413(0x122)]},'message':_0x5e42cb[_0x230413(0x12e)]==='cache'?_0x230413(0x169)+_0x5e42cb[_0x230413(0x167)][_0x230413(0x16c)]+_0x230413(0x144)+_0x43e7f9+'\x22.':_0x230413(0x151)+_0x5e42cb['items'][_0x230413(0x16c)]+_0x230413(0x14c)+_0x43e7f9+'\x22.'};}},useDef={'service':a3_0x197a9c(0x137),'command':'use','description':a3_0x197a9c(0x127),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a3_0x197a9c(0x153),'description':a3_0x197a9c(0x14e),'required':!![]}],'flags':[GLOBAL_FLAG],async 'validate'(_0x1795cf){const _0x1f85ae=a3_0x197a9c;if(!_0x1795cf[_0x1f85ae(0x130)][0x0])throw CliErrors[_0x1f85ae(0x165)]('Missing\x20app\x20name.','Usage:\x20'+CLI_BIN_NAME+_0x1f85ae(0x13a));},async 'execute'(_0x3eaa3d){const _0x3bccee=a3_0x197a9c;warnDeprecatedAppCommand(_0x3bccee(0x12d),CLI_BIN_NAME+_0x3bccee(0x16a));const _0x58fe8f=_0x3eaa3d[_0x3bccee(0x130)][0x0];if(!_0x58fe8f)throw CliErrors[_0x3bccee(0x165)](_0x3bccee(0x159),'Usage:\x20'+CLI_BIN_NAME+'\x20app\x20use\x20<name>\x20[--global]');const {buildConfigFromFlags:_0x42fcd5,resolveLocalAppAliasCode:_0x39dbeb}=await import(_0x3bccee(0x166)),{readCachedAppList:_0x5e849d}=await import(_0x3bccee(0x155)),_0x3e357e=_0x3eaa3d['str'](_0x3bccee(0x131)),_0x32d67e=_0x42fcd5(_0x3e357e?{'env':_0x3e357e}:{}),_0x3a460d=_0x5e849d(_0x32d67e['env'],_0x32d67e[_0x3bccee(0x143)]),_0x41aade=_0x3a460d?.[_0x3bccee(0x167)][_0x3bccee(0x140)](_0x3aa151=>_0x3aa151['appName']===_0x58fe8f),_0x4200ba=_0x39dbeb(_0x32d67e[_0x3bccee(0x146)]??{},_0x58fe8f);if(_0x41aade&&!isRuntimeAccessibleApp(_0x41aade))throw runtimeInaccessibleAppError(_0x41aade,'\x22'+_0x58fe8f+'\x22');if(_0x4200ba){const _0x485c48=_0x3a460d?.[_0x3bccee(0x167)][_0x3bccee(0x140)](_0x42ee64=>_0x42ee64[_0x3bccee(0x154)]?.[_0x3bccee(0x16f)]()===_0x4200ba);if(_0x485c48&&!isRuntimeAccessibleApp(_0x485c48))throw runtimeInaccessibleAppError(_0x485c48,'\x22'+_0x58fe8f+'\x22');}if(!_0x41aade&&!_0x4200ba&&_0x32d67e[_0x3bccee(0x160)]!==_0x58fe8f){const _0x3c8a7d=[..._0x3a460d?.['items'][_0x3bccee(0x142)](_0x2cf3c2=>_0x2cf3c2[_0x3bccee(0x168)])??[]],_0x4e310b=_0x3c8a7d[_0x3bccee(0x16c)]===0x0?_0x3bccee(0x15f)+CLI_BIN_NAME+_0x3bccee(0x125)+_0x58fe8f+'.appcode\x20to\x20.lovrabet.json.':'Available\x20remote\x20apps:\x20'+Array[_0x3bccee(0x13f)](new Set(_0x3c8a7d))[_0x3bccee(0x179)](',\x20')+'.\x20Local\x20aliases\x20can\x20be\x20added\x20under\x20apps.<alias>.appcode.';throw CliErrors['validation'](_0x3bccee(0x173)+_0x58fe8f+_0x3bccee(0x123),_0x4e310b);}const _0x47de31=_0x3eaa3d['bool'](_0x3bccee(0x163));let _0x4f0b84;if(_0x47de31)_0x4f0b84={'global':!![]};else{const {isInProject:_0x432928}=await import(_0x3bccee(0x166)),_0x13be11=_0x432928();_0x4f0b84=toScopeFlags(resolveConfigScope({'explicitGlobal':![],'policy':'project-default','inProject':_0x13be11}));}const _0x5f1c70=readConfig(_0x4f0b84);return _0x5f1c70['defaultApp']=_0x58fe8f,writeConfig(_0x5f1c70,_0x4f0b84),{'ok':!![],'message':_0x3bccee(0x176)+_0x58fe8f+'\x22'+scopeLabel(_0x4f0b84)+'.'};}};function warnDeprecatedAppCommand(_0x37bc48,_0x503065){const _0x593781=a3_0x197a9c;console[_0x593781(0x156)](CLI_BIN_NAME+_0x593781(0x120)+_0x37bc48+'\x20is\x20deprecated.\x20Use\x20`'+_0x503065+_0x593781(0x12f));}const importDef={'service':a3_0x197a9c(0x137),'command':'import','description':a3_0x197a9c(0x128),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initImportFlagDefs,async 'execute'(_0x40f987){return await runInitImport(collectFlags(_0x40f987,initImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[initDef,listDef,pullDef,useDef,importDef];
1
+ const a3_0x421e23=a3_0x4d3a;(function(_0x390462,_0x1b198f){const _0x6833d4=a3_0x4d3a,_0x341ee3=_0x390462();while(!![]){try{const _0x927a6f=-parseInt(_0x6833d4(0x1d7))/0x1*(parseInt(_0x6833d4(0x211))/0x2)+parseInt(_0x6833d4(0x205))/0x3+-parseInt(_0x6833d4(0x1dc))/0x4*(-parseInt(_0x6833d4(0x1df))/0x5)+-parseInt(_0x6833d4(0x1d0))/0x6+-parseInt(_0x6833d4(0x1ef))/0x7+parseInt(_0x6833d4(0x21a))/0x8*(-parseInt(_0x6833d4(0x1c7))/0x9)+-parseInt(_0x6833d4(0x1cb))/0xa*(-parseInt(_0x6833d4(0x1f0))/0xb);if(_0x927a6f===_0x1b198f)break;else _0x341ee3['push'](_0x341ee3['shift']());}catch(_0x235d18){_0x341ee3['push'](_0x341ee3['shift']());}}}(a3_0x4f61,0x4998b));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_0x421e23(0x1ee),'type':a3_0x421e23(0x20d),'description':a3_0x421e23(0x1ec),'default':![]};function collectFlags(_0x569130,_0x1625d2){const _0xc9d03=a3_0x421e23,_0x45ff29={};for(const _0x14a847 of _0x1625d2){const _0x1a197f=_0x14a847[_0xc9d03(0x1e6)]===_0xc9d03(0x20d)?_0x569130[_0xc9d03(0x1fd)](_0x14a847['name']):_0x569130[_0xc9d03(0x1fe)](_0x14a847[_0xc9d03(0x204)]);if(_0x1a197f!==''&&_0x1a197f!==![])_0x45ff29[_0x14a847['name']]=_0x1a197f;}if(_0x569130['nonInteractive'])_0x45ff29[_0xc9d03(0x213)]=!![];return _0x45ff29;}function normalizeLanguages(_0x4d9b3b){const _0x13b02a=a3_0x421e23;if(!Array[_0x13b02a(0x1d5)](_0x4d9b3b))return[];return _0x4d9b3b[_0x13b02a(0x1f5)](_0xd540c8=>typeof _0xd540c8===_0x13b02a(0x1d3))[_0x13b02a(0x1e7)](_0x206cd7=>_0x206cd7[_0x13b02a(0x20f)]())[_0x13b02a(0x1f5)](Boolean);}function buildRemoteAppI18nFields(_0x2ddc6c){const _0x3cccc7=a3_0x421e23,_0x2cc61d=normalizeLanguages(_0x2ddc6c['i18nInfo']?.[_0x3cccc7(0x1c4)]);return{'enableI18n':typeof _0x2ddc6c[_0x3cccc7(0x215)]===_0x3cccc7(0x20d)?_0x2ddc6c[_0x3cccc7(0x215)]:null,'languages':_0x2cc61d,'i18nInfo':_0x2ddc6c[_0x3cccc7(0x1ce)]?{..._0x2ddc6c[_0x3cccc7(0x1ce)],'langs':_0x2cc61d[_0x3cccc7(0x1f9)]?_0x2cc61d:null}:null};}function a3_0x4f61(){const _0x3cf326=['find','appCode','type','map','list','validation','raw','args','Use\x20global\x20config\x20scope','entries','global','419713DkdXOP','187TqqGtY','Loaded\x20','local','cachePath','production','filter','No\x20apps\x20found\x20on\x20the\x20platform.','Remote\x20app\x20name\x20to\x20activate','No\x20cached\x20apps\x20found.','length','Refreshed\x20app\x20cache\x20with\x20','cache','\x20workspace\x20init\x20--appcode\x20<code>\x20[--env\x20daily]','bool','str','.\x20Local\x20aliases\x20can\x20be\x20added\x20under\x20apps.<alias>.appcode.','appName','Target\x20environment\x20(default:\x20current\x20env)','push','../../commands/app/cache.js','name','1604148zkiAGE','\x20is\x20deprecated.\x20Use\x20`','Filter\x20by\x20environment\x20(default:\x20current\x20env)','fetchedAt','appcode','items','\x20cached\x20app(s)\x20for\x20env=\x22','from','boolean','.appcode\x20to\x20.lovrabet.json.','trim','globalPath','1198oYJKKd','Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','nonInteractive','read','enableI18n','no-cache','import','defaultApp','`\x20instead.','4435448iAfErQ','\x20app\x20use\x20<name>\x20[--global]','Usage:\x20','isCurrent','langs','init','Available\x20remote\x20apps:\x20','9NJvOty','env','Default\x20app\x20candidate\x20set\x20to\x20\x22','\x20app\x20list`\x20to\x20discover\x20remote\x20apps,\x20or\x20add\x20apps.','563480NApRbp','\x20app(s)\x20for\x20env=\x22','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','i18nInfo','appOwnerName','2739906vEDtvj','Deprecated:\x20use\x20workspace\x20use\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','app','string','Missing\x20app\x20name.','isArray','use','713drkfNG','write','accessKey','Include\x20unpublished\x20apps\x20for\x20diagnostics','project-default','4sxnrFL','source','config','1534735SxNjpk','../../context.js','projectPath','\x22\x20not\x20found.','../../commands/app/remote-source.js'];a3_0x4f61=function(){return _0x3cf326;};return a3_0x4f61();}const initDef={'service':a3_0x421e23(0x1d2),'command':'init','description':'Deprecated:\x20use\x20workspace\x20init\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initCreateFlagDefs,async 'execute'(_0x594fda){const _0x1941d5=a3_0x421e23;return warnDeprecatedAppCommand(_0x1941d5(0x1c5),CLI_BIN_NAME+_0x1941d5(0x1fc)),await runInit(collectFlags(_0x594fda,initCreateFlagDefs)),{'ok':!![]};}},listDef={'service':a3_0x421e23(0x1d2),'command':a3_0x421e23(0x1e8),'description':'List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','risk':a3_0x421e23(0x214),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':'env','type':'string','description':a3_0x421e23(0x207),'enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0x421e23(0x1f2),'type':a3_0x421e23(0x20d),'description':'Read\x20app\x20list\x20from\x20local\x20cache\x20only','default':![]},{'name':'no-cache','type':a3_0x421e23(0x20d),'description':'Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','default':![]},{'name':'include-unpublished','type':'boolean','description':a3_0x421e23(0x1da),'default':![]}],async 'execute'(_0x4e0341){const _0x330333=a3_0x421e23,_0x5232c8=_0x4e0341[_0x330333(0x1fe)]('env')||_0x4e0341['envName']||getEnv()||_0x330333(0x1f4),_0x13f5be=_0x4e0341['bool'](_0x330333(0x1f2)),_0x496c34=_0x4e0341[_0x330333(0x1fd)](_0x330333(0x216)),_0x40faaf=_0x4e0341['bool']('include-unpublished'),{readRawConfigWithLayers:_0x29f7da,resolveDefaultAppSource:_0x5e416d,getLocalAppAliases:_0x200873}=await import(_0x330333(0x1e0)),{getRemoteAppList:_0xeb79da}=await import(_0x330333(0x1e3)),{config:_0x1cc404,layers:_0x514367}=_0x29f7da(),_0x703c54=_0x5e416d(_0x514367),{defaultApp:_0x72a673}=_0x1cc404,_0x360151=await _0xeb79da({'env':_0x5232c8,'accessKey':_0x4e0341[_0x330333(0x1d9)],'localOnly':_0x13f5be,'noCache':_0x496c34}),_0x29c06d=_0x40faaf?_0x360151[_0x330333(0x20a)]:filterRuntimeAccessibleApps(_0x360151[_0x330333(0x20a)]),_0x10aa86=_0x360151[_0x330333(0x20a)][_0x330333(0x1f9)]-_0x29c06d[_0x330333(0x1f9)],_0x3662a5=_0x29c06d[_0x330333(0x1e7)](_0x5ee692=>{const _0x5f5187=_0x330333;return{'name':_0x5ee692[_0x5f5187(0x200)],'appcode':_0x5ee692['appCode'],'named':!![],'definedIn':'remote','isDefault':_0x5ee692[_0x5f5187(0x200)]===_0x72a673,...buildAppProfileListFields(_0x5232c8),...buildRemoteAppI18nFields(_0x5ee692),'source':_0x360151[_0x5f5187(0x1dd)],'owner':_0x5ee692[_0x5f5187(0x1cf)]??null,'status':_0x5ee692['appPublishStatus']??null,'cachedAt':_0x360151[_0x5f5187(0x208)]};}),_0x1c650b=_0x200873(_0x1cc404);let _0x457aa0=0x0;for(const [_0x1e9a3a,_0x41f21f]of Object[_0x330333(0x1ed)](_0x1c650b)){const _0x28f650=typeof _0x41f21f[_0x330333(0x209)]==='string'?_0x41f21f['appcode'][_0x330333(0x20f)]():'';if(!_0x28f650)continue;const _0x7828d2=findAppByCode(_0x360151[_0x330333(0x20a)],_0x28f650);if(!_0x40faaf&&_0x7828d2&&!isRuntimeAccessibleApp(_0x7828d2))continue;_0x457aa0+=0x1,_0x3662a5[_0x330333(0x202)]({'name':_0x1e9a3a,'appcode':_0x28f650,'named':!![],'definedIn':_0x330333(0x1f2),'isDefault':_0x1e9a3a===_0x72a673,...buildAppProfileListFields(_0x5232c8),'source':_0x330333(0x1de),'owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0x3662a5,_0x4e0341['mergedCli']);const _0x4abe8b=_0x3662a5['find'](_0x452042=>_0x452042[_0x330333(0x1c3)]===!![]),_0x338f50=_0x72a673??_0x4abe8b?.[_0x330333(0x204)]??null,_0x4a746e={'env':_0x5232c8,'source':_0x360151[_0x330333(0x1dd)],'fetchedAt':_0x360151[_0x330333(0x208)],'cachePath':_0x360151[_0x330333(0x1f3)],'globalPath':_0x514367[_0x330333(0x210)]??null,'projectPath':_0x514367[_0x330333(0x1e1)]??null,'defaultApp':_0x338f50,'defaultAppSource':_0x72a673!=null?_0x703c54:null,'localAliasCount':_0x457aa0,'remoteTotal':_0x360151[_0x330333(0x20a)][_0x330333(0x1f9)],'hiddenUnpublishedCount':_0x10aa86,'includeUnpublished':_0x40faaf};if(_0x3662a5['length']===0x0)return{'ok':!![],'data':{'items':_0x3662a5,'meta':_0x4a746e},'message':_0x360151[_0x330333(0x1dd)]==='cache'?_0x330333(0x1f8):_0x330333(0x1f6)};return{'ok':!![],'data':{'items':_0x3662a5,'meta':_0x4a746e}};}},pullDef={'service':'app','command':'pull','description':'Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','risk':a3_0x421e23(0x1d8),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a3_0x421e23(0x1c8),'type':a3_0x421e23(0x1d3),'description':a3_0x421e23(0x201),'enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0x421e23(0x1f2),'type':a3_0x421e23(0x20d),'description':'Read\x20from\x20local\x20cache\x20only','default':![]},{'name':'no-cache','type':a3_0x421e23(0x20d),'description':a3_0x421e23(0x1cd),'default':![]}],async 'execute'(_0x2ffba4){const _0xb237a8=a3_0x421e23,_0x1409e2=_0x2ffba4[_0xb237a8(0x1fe)]('env')||_0x2ffba4['envName']||getEnv()||_0xb237a8(0x1f4),_0x5f2740=_0x2ffba4['bool'](_0xb237a8(0x1f2)),_0x49a990=_0x2ffba4[_0xb237a8(0x1fd)]('no-cache'),{getRemoteAppList:_0x3497e2}=await import(_0xb237a8(0x1e3)),_0x1f2420=await _0x3497e2({'env':_0x1409e2,'accessKey':_0x2ffba4[_0xb237a8(0x1d9)],'localOnly':_0x5f2740,'noCache':_0x49a990});return{'ok':!![],'data':{'total':_0x1f2420[_0xb237a8(0x20a)][_0xb237a8(0x1f9)],'env':_0x1409e2,'source':_0x1f2420['source'],'fetchedAt':_0x1f2420[_0xb237a8(0x208)],'cachePath':_0x1f2420['cachePath']},'message':_0x1f2420[_0xb237a8(0x1dd)]===_0xb237a8(0x1fb)?_0xb237a8(0x1f1)+_0x1f2420['items']['length']+_0xb237a8(0x20b)+_0x1409e2+'\x22.':_0xb237a8(0x1fa)+_0x1f2420[_0xb237a8(0x20a)][_0xb237a8(0x1f9)]+_0xb237a8(0x1cc)+_0x1409e2+'\x22.'};}},useDef={'service':a3_0x421e23(0x1d2),'command':a3_0x421e23(0x1d6),'description':a3_0x421e23(0x1d1),'risk':a3_0x421e23(0x1d8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a3_0x421e23(0x204),'description':a3_0x421e23(0x1f7),'required':!![]}],'flags':[GLOBAL_FLAG],async 'validate'(_0xf9ae6e){const _0x3ce7ed=a3_0x421e23;if(!_0xf9ae6e[_0x3ce7ed(0x1eb)][0x0])throw CliErrors[_0x3ce7ed(0x1e9)](_0x3ce7ed(0x1d4),_0x3ce7ed(0x1c2)+CLI_BIN_NAME+_0x3ce7ed(0x21b));},async 'execute'(_0x2dc3c1){const _0x36a14e=a3_0x421e23;warnDeprecatedAppCommand(_0x36a14e(0x1d6),CLI_BIN_NAME+'\x20workspace\x20use\x20--app\x20<name>\x20[--env\x20daily]');const _0x551556=_0x2dc3c1[_0x36a14e(0x1eb)][0x0];if(!_0x551556)throw CliErrors['validation'](_0x36a14e(0x1d4),'Usage:\x20'+CLI_BIN_NAME+_0x36a14e(0x21b));const {buildConfigFromFlags:_0x38806d,resolveLocalAppAliasCode:_0x24680b}=await import(_0x36a14e(0x1e0)),{readCachedAppList:_0x5af830}=await import(_0x36a14e(0x203)),_0x54b5f2=_0x2dc3c1['str'](_0x36a14e(0x1c8)),_0x2decc2=_0x38806d(_0x54b5f2?{'env':_0x54b5f2}:{}),_0x3a037b=_0x5af830(_0x2decc2['env'],_0x2decc2[_0x36a14e(0x1d9)]),_0x5928b2=_0x3a037b?.[_0x36a14e(0x20a)]['find'](_0x34ec35=>_0x34ec35['appName']===_0x551556),_0x202426=_0x24680b(_0x2decc2[_0x36a14e(0x1ea)]??{},_0x551556);if(_0x5928b2&&!isRuntimeAccessibleApp(_0x5928b2))throw runtimeInaccessibleAppError(_0x5928b2,'\x22'+_0x551556+'\x22');if(_0x202426){const _0xa1a5fd=_0x3a037b?.[_0x36a14e(0x20a)][_0x36a14e(0x1e4)](_0x5e7b7d=>_0x5e7b7d[_0x36a14e(0x1e5)]?.[_0x36a14e(0x20f)]()===_0x202426);if(_0xa1a5fd&&!isRuntimeAccessibleApp(_0xa1a5fd))throw runtimeInaccessibleAppError(_0xa1a5fd,'\x22'+_0x551556+'\x22');}if(!_0x5928b2&&!_0x202426&&_0x2decc2[_0x36a14e(0x218)]!==_0x551556){const _0x548560=[..._0x3a037b?.['items']['map'](_0x2007f1=>_0x2007f1[_0x36a14e(0x200)])??[]],_0x31c33d=_0x548560[_0x36a14e(0x1f9)]===0x0?'Use\x20`'+CLI_BIN_NAME+_0x36a14e(0x1ca)+_0x551556+_0x36a14e(0x20e):_0x36a14e(0x1c6)+Array[_0x36a14e(0x20c)](new Set(_0x548560))['join'](',\x20')+_0x36a14e(0x1ff);throw CliErrors[_0x36a14e(0x1e9)]('App\x20\x22'+_0x551556+_0x36a14e(0x1e2),_0x31c33d);}const _0x1eef67=_0x2dc3c1['bool']('global');let _0x5ee2b0;if(_0x1eef67)_0x5ee2b0={'global':!![]};else{const {isInProject:_0x11411b}=await import(_0x36a14e(0x1e0)),_0x595f10=_0x11411b();_0x5ee2b0=toScopeFlags(resolveConfigScope({'explicitGlobal':![],'policy':_0x36a14e(0x1db),'inProject':_0x595f10}));}const _0x110fe8=readConfig(_0x5ee2b0);return _0x110fe8['defaultApp']=_0x551556,writeConfig(_0x110fe8,_0x5ee2b0),{'ok':!![],'message':_0x36a14e(0x1c9)+_0x551556+'\x22'+scopeLabel(_0x5ee2b0)+'.'};}};function warnDeprecatedAppCommand(_0x35bfe8,_0x5ee860){const _0x4dd4f3=a3_0x421e23;console['warn'](CLI_BIN_NAME+'\x20app\x20'+_0x35bfe8+_0x4dd4f3(0x206)+_0x5ee860+_0x4dd4f3(0x219));}const importDef={'service':'app','command':a3_0x421e23(0x217),'description':a3_0x421e23(0x212),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initImportFlagDefs,async 'execute'(_0x309e54){return await runInitImport(collectFlags(_0x309e54,initImportFlagDefs)),{'ok':!![]};}};function a3_0x4d3a(_0xc3ee9e,_0x2bbd2d){_0xc3ee9e=_0xc3ee9e-0x1c2;const _0x4f613a=a3_0x4f61();let _0x4d3a5b=_0x4f613a[_0xc3ee9e];return _0x4d3a5b;}export const appDefinitions=[initDef,listDef,pullDef,useDef,importDef];
@@ -1 +1 @@
1
- (function(_0x27838c,_0x40b3d2){const _0x47601b=a4_0x5911,_0x505d71=_0x27838c();while(!![]){try{const _0x172048=-parseInt(_0x47601b(0x81))/0x1+parseInt(_0x47601b(0x7f))/0x2+parseInt(_0x47601b(0x87))/0x3*(-parseInt(_0x47601b(0x84))/0x4)+-parseInt(_0x47601b(0x8e))/0x5*(parseInt(_0x47601b(0x8c))/0x6)+parseInt(_0x47601b(0x7c))/0x7*(-parseInt(_0x47601b(0x7e))/0x8)+-parseInt(_0x47601b(0x85))/0x9+parseInt(_0x47601b(0x79))/0xa;if(_0x172048===_0x40b3d2)break;else _0x505d71['push'](_0x505d71['shift']());}catch(_0x43ef37){_0x505d71['push'](_0x505d71['shift']());}}}(a4_0x31a9,0x19c82));import{CLI_BIN_NAME}from'../../constant/cli.js';import{RUNTIME_ACCESSIBLE_APP_STATUS}from'../../constant/app.js';function a4_0x5911(_0x16f1d5,_0x430d59){_0x16f1d5=_0x16f1d5-0x79;const _0x31a948=a4_0x31a9();let _0x591139=_0x31a948[_0x16f1d5];return _0x591139;}import{CliErrors}from'../../errors.js';export function normalizeAppPublishStatus(_0x3c8caa){const _0xd1e74e=a4_0x5911;if(typeof _0x3c8caa!==_0xd1e74e(0x90))return null;const _0x559b49=_0x3c8caa[_0xd1e74e(0x8b)]();return _0x559b49?_0x559b49[_0xd1e74e(0x8a)]():null;}export function isRuntimeAccessibleApp(_0x16743f){const _0x320f79=a4_0x5911;return normalizeAppPublishStatus(_0x16743f[_0x320f79(0x88)])===RUNTIME_ACCESSIBLE_APP_STATUS;}export function filterRuntimeAccessibleApps(_0x4ae1ce){const _0x5971c1=a4_0x5911;return _0x4ae1ce[_0x5971c1(0x7b)](isRuntimeAccessibleApp);}export function findAppByName(_0x22ea06,_0x4adf26){const _0x45cb2a=a4_0x5911;return _0x22ea06[_0x45cb2a(0x82)](_0x36a360=>_0x36a360['appName']===_0x4adf26);}function a4_0x31a9(){const _0x3c3402=['.\x20Publish\x20the\x20app\x20before\x20using\x20','toUpperCase','trim','444084QLMffS','Current\x20status:\x20','5UPHrkT','App\x20','string','3838400KVbDZv','\x20is\x20not\x20available\x20for\x20runtime\x20AI\x20access.','filter','28161gxGVEb','validation','136dgpSMJ','387124ZhbOIH','UNKNOWN','81660Tymisu','find','\x20dataset/data/sql/bff\x20commands,\x20or\x20choose\x20a\x20published\x20app.','32344mZajdz','992457sXfAJf','appCode','51BcbCpb','appPublishStatus'];a4_0x31a9=function(){return _0x3c3402;};return a4_0x31a9();}export function findAppByCode(_0x189154,_0x3b0637){const _0x49c5ab=a4_0x5911,_0x1bd554=_0x3b0637[_0x49c5ab(0x8b)]();if(!_0x1bd554)return undefined;return _0x189154[_0x49c5ab(0x82)](_0x40187f=>_0x40187f[_0x49c5ab(0x86)]?.[_0x49c5ab(0x8b)]()===_0x1bd554);}export function runtimeInaccessibleAppError(_0x4a12f6,_0x9cd047){const _0x32d55b=a4_0x5911,_0x5f4912=normalizeAppPublishStatus(_0x4a12f6[_0x32d55b(0x88)])??_0x32d55b(0x80);return CliErrors[_0x32d55b(0x7d)](_0x32d55b(0x8f)+_0x9cd047+_0x32d55b(0x7a),_0x32d55b(0x8d)+_0x5f4912+_0x32d55b(0x89)+CLI_BIN_NAME+_0x32d55b(0x83));}
1
+ function a4_0x3559(){const _0x2dbcf9=['8385419epUAXL','find','.\x20Publish\x20the\x20app\x20before\x20using\x20','toUpperCase','trim','10372528wUhgnN','603674XHPTAT','6033318xuhtMP','11373290hnJkzN','appCode','14946732GRRRmi','string','\x20is\x20not\x20available\x20for\x20runtime\x20AI\x20access.','1ImSdNb','appPublishStatus','appName','UNKNOWN','2251677TtUfdR','5NiXSSJ','validation','4PYMPjs'];a4_0x3559=function(){return _0x2dbcf9;};return a4_0x3559();}(function(_0x36498f,_0x3fd017){const _0x41ecc0=a4_0x3ec3,_0x5721a5=_0x36498f();while(!![]){try{const _0x3ed803=-parseInt(_0x41ecc0(0x196))/0x1*(parseInt(_0x41ecc0(0x18f))/0x2)+parseInt(_0x41ecc0(0x185))/0x3*(-parseInt(_0x41ecc0(0x188))/0x4)+parseInt(_0x41ecc0(0x186))/0x5*(-parseInt(_0x41ecc0(0x190))/0x6)+-parseInt(_0x41ecc0(0x189))/0x7+parseInt(_0x41ecc0(0x18e))/0x8+parseInt(_0x41ecc0(0x193))/0x9+parseInt(_0x41ecc0(0x191))/0xa;if(_0x3ed803===_0x3fd017)break;else _0x5721a5['push'](_0x5721a5['shift']());}catch(_0xe79ac1){_0x5721a5['push'](_0x5721a5['shift']());}}}(a4_0x3559,0xccc79));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(_0x5870c4){const _0x1d6f9a=a4_0x3ec3;if(typeof _0x5870c4!==_0x1d6f9a(0x194))return null;const _0x297759=_0x5870c4[_0x1d6f9a(0x18d)]();return _0x297759?_0x297759[_0x1d6f9a(0x18c)]():null;}function a4_0x3ec3(_0x1bc1b6,_0x4965eb){_0x1bc1b6=_0x1bc1b6-0x182;const _0x3559bd=a4_0x3559();let _0x3ec34e=_0x3559bd[_0x1bc1b6];return _0x3ec34e;}export function isRuntimeAccessibleApp(_0x4d626d){const _0x4452df=a4_0x3ec3;return normalizeAppPublishStatus(_0x4d626d[_0x4452df(0x182)])===RUNTIME_ACCESSIBLE_APP_STATUS;}export function filterRuntimeAccessibleApps(_0x20ef41){return _0x20ef41['filter'](isRuntimeAccessibleApp);}export function findAppByName(_0x7dd7fa,_0x130c92){const _0x132a3a=a4_0x3ec3;return _0x7dd7fa[_0x132a3a(0x18a)](_0x4e6df0=>_0x4e6df0[_0x132a3a(0x183)]===_0x130c92);}export function findAppByCode(_0x500323,_0x3c69cf){const _0x275275=a4_0x3ec3,_0x27d0d2=_0x3c69cf[_0x275275(0x18d)]();if(!_0x27d0d2)return undefined;return _0x500323[_0x275275(0x18a)](_0x38f8b3=>_0x38f8b3[_0x275275(0x192)]?.[_0x275275(0x18d)]()===_0x27d0d2);}export function runtimeInaccessibleAppError(_0x3b9f98,_0x2efa06){const _0x21540d=a4_0x3ec3,_0x2d03e4=normalizeAppPublishStatus(_0x3b9f98[_0x21540d(0x182)])??_0x21540d(0x184);return CliErrors[_0x21540d(0x187)]('App\x20'+_0x2efa06+_0x21540d(0x195),'Current\x20status:\x20'+_0x2d03e4+_0x21540d(0x18b)+CLI_BIN_NAME+'\x20dataset/data/sql/bff\x20commands,\x20or\x20choose\x20a\x20published\x20app.');}
@@ -1 +1 @@
1
- (function(_0x1bf86c,_0x4305a8){const _0x4e5456=a5_0x5e20,_0x5b3a04=_0x1bf86c();while(!![]){try{const _0x13011c=parseInt(_0x4e5456(0x9f))/0x1*(-parseInt(_0x4e5456(0xa8))/0x2)+parseInt(_0x4e5456(0x9a))/0x3*(-parseInt(_0x4e5456(0xa0))/0x4)+-parseInt(_0x4e5456(0xa5))/0x5+parseInt(_0x4e5456(0xa6))/0x6+-parseInt(_0x4e5456(0xa2))/0x7*(-parseInt(_0x4e5456(0xa4))/0x8)+parseInt(_0x4e5456(0xa9))/0x9+parseInt(_0x4e5456(0x98))/0xa;if(_0x13011c===_0x4305a8)break;else _0x5b3a04['push'](_0x5b3a04['shift']());}catch(_0x28f768){_0x5b3a04['push'](_0x5b3a04['shift']());}}}(a5_0x48c5,0x4d9c6));import{fileURLToPath}from'url';import{dirname,join}from'path';import{readFileSync}from'fs';function a5_0x5e20(_0x48398f,_0xa1371c){_0x48398f=_0x48398f-0x98;const _0x48c588=a5_0x48c5();let _0x5e2019=_0x48c588[_0x48398f];return _0x5e2019;}function a5_0x48c5(){const _0x564a21=['data','201418BNeQqF','3727584ayzhtp','8874800NpflVD','parse','1006770RXzLXh','Mock\x20API\x20error:\x20','tableData','../../../mock/app-list.json','errorCode','6bnUnkL','4egUVyG','errorMsg','7GLxcnq','success','2817272stjblk','2779705fboUqu','959184trMKQJ'];a5_0x48c5=function(){return _0x564a21;};return a5_0x48c5();}const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function loadMockAppList(){const _0x44d237=a5_0x5e20,_0x5bb519=join(__dirname,_0x44d237(0x9d)),_0x20c13d=readFileSync(_0x5bb519,'utf-8');return JSON[_0x44d237(0x99)](_0x20c13d);}let _cached=null;export function getMockAppList(){return!_cached&&(_cached=loadMockAppList()),_cached;}export function getMockRemoteAppItems(){const _0x2b359a=a5_0x5e20,_0x4866b0=getMockAppList();if(!_0x4866b0[_0x2b359a(0xa3)])throw new Error(_0x2b359a(0x9b)+_0x4866b0[_0x2b359a(0xa1)]+'\x20('+_0x4866b0[_0x2b359a(0x9e)]+')');return _0x4866b0[_0x2b359a(0xa7)][_0x2b359a(0x9c)];}
1
+ (function(_0x3cf8c8,_0x152363){const _0x1c9dfd=a5_0x2b8a,_0x3407a5=_0x3cf8c8();while(!![]){try{const _0x479cb2=-parseInt(_0x1c9dfd(0x1b6))/0x1+parseInt(_0x1c9dfd(0x1be))/0x2*(parseInt(_0x1c9dfd(0x1bc))/0x3)+parseInt(_0x1c9dfd(0x1c1))/0x4+parseInt(_0x1c9dfd(0x1b5))/0x5*(-parseInt(_0x1c9dfd(0x1b4))/0x6)+parseInt(_0x1c9dfd(0x1bb))/0x7+-parseInt(_0x1c9dfd(0x1ba))/0x8+-parseInt(_0x1c9dfd(0x1b7))/0x9*(-parseInt(_0x1c9dfd(0x1bd))/0xa);if(_0x479cb2===_0x152363)break;else _0x3407a5['push'](_0x3407a5['shift']());}catch(_0xb78e59){_0x3407a5['push'](_0x3407a5['shift']());}}}(a5_0x3639,0xbc60b));function a5_0x2b8a(_0x449697,_0x3c5538){_0x449697=_0x449697-0x1b4;const _0x36397c=a5_0x3639();let _0x2b8af8=_0x36397c[_0x449697];return _0x2b8af8;}import{fileURLToPath}from'url';import{dirname,join}from'path';function a5_0x3639(){const _0x20818e=['6vFWGxG','2372905gXTGtC','783490pRWThV','9rTIncC','../../../mock/app-list.json','tableData','3967096MXeraQ','1049454NnFfIW','6QxWZeO','11504690qSKSXj','378052uGvVbw','utf-8','data','3388440dNeuem','parse','errorMsg'];a5_0x3639=function(){return _0x20818e;};return a5_0x3639();}import{readFileSync}from'fs';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function loadMockAppList(){const _0x368bbd=a5_0x2b8a,_0x2f0df8=join(__dirname,_0x368bbd(0x1b8)),_0x15fe86=readFileSync(_0x2f0df8,_0x368bbd(0x1bf));return JSON[_0x368bbd(0x1c2)](_0x15fe86);}let _cached=null;export function getMockAppList(){return!_cached&&(_cached=loadMockAppList()),_cached;}export function getMockRemoteAppItems(){const _0x46cb3f=a5_0x2b8a,_0x4d8835=getMockAppList();if(!_0x4d8835['success'])throw new Error('Mock\x20API\x20error:\x20'+_0x4d8835[_0x46cb3f(0x1c3)]+'\x20('+_0x4d8835['errorCode']+')');return _0x4d8835[_0x46cb3f(0x1c0)][_0x46cb3f(0x1b9)];}
@@ -1 +1 @@
1
- (function(_0x4d95c0,_0x5501a8){const _0x3c6fb9=a6_0x5be3,_0x311a7d=_0x4d95c0();while(!![]){try{const _0x13f8ce=-parseInt(_0x3c6fb9(0x1c9))/0x1*(-parseInt(_0x3c6fb9(0x1ce))/0x2)+parseInt(_0x3c6fb9(0x1c0))/0x3*(-parseInt(_0x3c6fb9(0x1ca))/0x4)+-parseInt(_0x3c6fb9(0x1c1))/0x5+parseInt(_0x3c6fb9(0x1c7))/0x6*(parseInt(_0x3c6fb9(0x1c3))/0x7)+parseInt(_0x3c6fb9(0x1cb))/0x8+-parseInt(_0x3c6fb9(0x1d1))/0x9*(-parseInt(_0x3c6fb9(0x1c6))/0xa)+-parseInt(_0x3c6fb9(0x1cd))/0xb;if(_0x13f8ce===_0x5501a8)break;else _0x311a7d['push'](_0x311a7d['shift']());}catch(_0xd85afa){_0x311a7d['push'](_0x311a7d['shift']());}}}(a6_0x314b,0x5806b));import{getMyApps}from'../../core/api-client.js';import{getMockRemoteAppItems}from'../../commands/app/mock-loader.js';import{getAppCacheFilePath,readCachedAppList,writeCachedAppList}from'../../commands/app/cache.js';function a6_0x314b(){const _0x28ef68=['trim','9kZImIC','items','18qhtBnj','17765AHkgFJ','remote','560fqfhjK','APP_LIST_SOURCE','cache','5077100JlZcbQ','30486FbfBEZ','toLowerCase','580amnRjm','217348DgWcZQ','2358144jhkUZJ','toISOString','9911528xFucdT','1318fpptRU','fetchedAt'];a6_0x314b=function(){return _0x28ef68;};return a6_0x314b();}function a6_0x5be3(_0x2b229a,_0x1e6335){_0x2b229a=_0x2b229a-0x1bf;const _0x314bc5=a6_0x314b();let _0x5be30a=_0x314bc5[_0x2b229a];return _0x5be30a;}import{productEnv}from'../../constant/product.js';export function shouldUseMockRemoteApps(){const _0x369ce6=a6_0x5be3,_0x2847f6=(productEnv(_0x369ce6(0x1c4))||'')[_0x369ce6(0x1d0)]()[_0x369ce6(0x1c8)]();return _0x2847f6==='mock';}export async function getRemoteAppItems(){if(shouldUseMockRemoteApps())return getMockRemoteAppItems();return getMyApps();}export async function getRemoteAppList(_0x378f6c){const _0x403dc0=a6_0x5be3,{env:_0x3bc679,accessKey:_0x3f1ce7,localOnly:localOnly=![],noCache:noCache=![]}=_0x378f6c,_0xee8a5a=readCachedAppList(_0x3bc679,_0x3f1ce7),_0x2626a7=_0x3f1ce7?.[_0x403dc0(0x1d0)]()?getAppCacheFilePath(_0x3bc679,_0x3f1ce7):null;if(localOnly)return{'items':_0xee8a5a?.[_0x403dc0(0x1bf)]??[],'source':'cache','fetchedAt':_0xee8a5a?.[_0x403dc0(0x1cf)]??null,'cachePath':_0x2626a7};try{const _0x34caa8=await getRemoteAppItems(),_0x2fd20d=shouldUseMockRemoteApps()?'mock':_0x403dc0(0x1c2),_0x2ccef4=new Date()[_0x403dc0(0x1cc)](),_0x59f198=_0x3f1ce7?.[_0x403dc0(0x1d0)]()?writeCachedAppList(_0x3bc679,_0x3f1ce7,{'env':_0x3bc679,'fetchedAt':_0x2ccef4,'source':_0x2fd20d,'items':_0x34caa8}):null;return{'items':_0x34caa8,'source':_0x2fd20d,'fetchedAt':_0x2ccef4,'cachePath':_0x59f198};}catch(_0x4f0aa4){if(!noCache&&_0xee8a5a)return{'items':_0xee8a5a[_0x403dc0(0x1bf)],'source':_0x403dc0(0x1c5),'fetchedAt':_0xee8a5a[_0x403dc0(0x1cf)],'cachePath':_0x2626a7};throw _0x4f0aa4;}}
1
+ function a6_0x407b(_0x14134b,_0x55a77a){_0x14134b=_0x14134b-0x157;const _0x350526=a6_0x3505();let _0x407b2e=_0x350526[_0x14134b];return _0x407b2e;}(function(_0x3273b4,_0x179c7a){const _0x28cd10=a6_0x407b,_0x5ced7c=_0x3273b4();while(!![]){try{const _0x5586ad=-parseInt(_0x28cd10(0x15e))/0x1*(-parseInt(_0x28cd10(0x15d))/0x2)+-parseInt(_0x28cd10(0x162))/0x3*(parseInt(_0x28cd10(0x158))/0x4)+-parseInt(_0x28cd10(0x163))/0x5+-parseInt(_0x28cd10(0x168))/0x6*(parseInt(_0x28cd10(0x159))/0x7)+-parseInt(_0x28cd10(0x15c))/0x8*(parseInt(_0x28cd10(0x157))/0x9)+parseInt(_0x28cd10(0x166))/0xa+parseInt(_0x28cd10(0x164))/0xb;if(_0x5586ad===_0x179c7a)break;else _0x5ced7c['push'](_0x5ced7c['shift']());}catch(_0x384912){_0x5ced7c['push'](_0x5ced7c['shift']());}}}(a6_0x3505,0x2a2a4));import{getMyApps}from'../../core/api-client.js';import{getMockRemoteAppItems}from'../../commands/app/mock-loader.js';function a6_0x3505(){const _0x5de835=['toISOString','2504870pfuOYd','remote','357354aEiZxt','36gTqyom','163256DHXNit','14zatKBp','mock','items','567064kfkXNu','268hgphTb','871WFRgYu','cache','trim','APP_LIST_SOURCE','21yxlNSz','1657245bQkpKT','9078344vFWCxi'];a6_0x3505=function(){return _0x5de835;};return a6_0x3505();}import{getAppCacheFilePath,readCachedAppList,writeCachedAppList}from'../../commands/app/cache.js';import{productEnv}from'../../constant/product.js';export function shouldUseMockRemoteApps(){const _0x20ab4c=a6_0x407b,_0x127b38=(productEnv(_0x20ab4c(0x161))||'')[_0x20ab4c(0x160)]()['toLowerCase']();return _0x127b38==='mock';}export async function getRemoteAppItems(){if(shouldUseMockRemoteApps())return getMockRemoteAppItems();return getMyApps();}export async function getRemoteAppList(_0x5cf414){const _0x58d698=a6_0x407b,{env:_0x3c562c,accessKey:_0xeeb0d5,localOnly:localOnly=![],noCache:noCache=![]}=_0x5cf414,_0x4daa02=readCachedAppList(_0x3c562c,_0xeeb0d5),_0x417966=_0xeeb0d5?.[_0x58d698(0x160)]()?getAppCacheFilePath(_0x3c562c,_0xeeb0d5):null;if(localOnly)return{'items':_0x4daa02?.[_0x58d698(0x15b)]??[],'source':_0x58d698(0x15f),'fetchedAt':_0x4daa02?.['fetchedAt']??null,'cachePath':_0x417966};try{const _0x53d51b=await getRemoteAppItems(),_0x4b2bf4=shouldUseMockRemoteApps()?_0x58d698(0x15a):_0x58d698(0x167),_0x559f1f=new Date()[_0x58d698(0x165)](),_0x8816f4=_0xeeb0d5?.[_0x58d698(0x160)]()?writeCachedAppList(_0x3c562c,_0xeeb0d5,{'env':_0x3c562c,'fetchedAt':_0x559f1f,'source':_0x4b2bf4,'items':_0x53d51b}):null;return{'items':_0x53d51b,'source':_0x4b2bf4,'fetchedAt':_0x559f1f,'cachePath':_0x8816f4};}catch(_0x52d1ab){if(!noCache&&_0x4daa02)return{'items':_0x4daa02[_0x58d698(0x15b)],'source':_0x58d698(0x15f),'fetchedAt':_0x4daa02['fetchedAt'],'cachePath':_0x417966};throw _0x52d1ab;}}
@@ -1 +1 @@
1
- (function(_0x39b289,_0x4572a3){const _0x254bcc=a7_0x1878,_0x3d5a8f=_0x39b289();while(!![]){try{const _0x42dc6a=-parseInt(_0x254bcc(0x128))/0x1*(parseInt(_0x254bcc(0x134))/0x2)+-parseInt(_0x254bcc(0x130))/0x3+-parseInt(_0x254bcc(0x133))/0x4*(-parseInt(_0x254bcc(0x12a))/0x5)+parseInt(_0x254bcc(0x129))/0x6*(-parseInt(_0x254bcc(0x135))/0x7)+parseInt(_0x254bcc(0x13a))/0x8*(-parseInt(_0x254bcc(0x131))/0x9)+parseInt(_0x254bcc(0x12e))/0xa+parseInt(_0x254bcc(0x132))/0xb*(parseInt(_0x254bcc(0x12f))/0xc);if(_0x42dc6a===_0x4572a3)break;else _0x3d5a8f['push'](_0x3d5a8f['shift']());}catch(_0x2eb8f8){_0x3d5a8f['push'](_0x3d5a8f['shift']());}}}(a7_0x3fc3,0x8d5c0));function a7_0x3fc3(){const _0x2e309a=['defaultApp','definedIn','trim','named','appcode','397303BPBhte','2918688pyayTj','30hkFMzy','project','appCode','currentApp','5644450XFPpTE','666012DNjFJN','265560EyMRWx','15012AtHxkX','352BPGfKI','87692lCkXkT','2THkeRA','7keLzjA','local','name','find','isCurrent','4416vpUxtL','global'];a7_0x3fc3=function(){return _0x2e309a;};return a7_0x3fc3();}function a7_0x1878(_0x18fff0,_0x15965c){_0x18fff0=_0x18fff0-0x128;const _0x3fc316=a7_0x3fc3();let _0x18785e=_0x3fc316[_0x18fff0];return _0x18785e;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{formatScopeLabel}from'../../commands/common/config-policy.js';export{CLI_BIN_NAME};export function enrichAppListItemsWithMergedSelection(_0x59a5f4,_0x4cda69){const _0x5e2efe=a7_0x1878;if(!_0x4cda69)return;const _0x58f2ff=!!(_0x4cda69[_0x5e2efe(0x12d)]??_0x4cda69[_0x5e2efe(0x13c)]);for(const _0x1eeabe of _0x59a5f4){_0x1eeabe[_0x5e2efe(0x139)]=![];}const _0x401fdd=_0x4cda69['appCode']!=null?String(_0x4cda69[_0x5e2efe(0x12c)])[_0x5e2efe(0x13e)]():'';if(_0x58f2ff){const _0x3f04c7=_0x4cda69['currentApp']??_0x4cda69[_0x5e2efe(0x13c)];if(_0x3f04c7){const _0x244e84=_0x59a5f4[_0x5e2efe(0x138)](_0x299b55=>_0x299b55['named']===!![]&&_0x299b55[_0x5e2efe(0x137)]===_0x3f04c7&&_0x299b55[_0x5e2efe(0x13d)]===_0x5e2efe(0x136)),_0x49ffaf=_0x244e84??_0x59a5f4['find'](_0x30e2a2=>_0x30e2a2[_0x5e2efe(0x13f)]===!![]&&_0x30e2a2[_0x5e2efe(0x137)]===_0x3f04c7);_0x49ffaf&&(_0x49ffaf[_0x5e2efe(0x139)]=!![]);}return;}if(!_0x401fdd)return;for(const _0x3b79cd of _0x59a5f4){String(_0x3b79cd[_0x5e2efe(0x140)]??'')[_0x5e2efe(0x13e)]()===_0x401fdd&&(_0x3b79cd['isCurrent']=!![]);}}export{readScopedConfig as readConfig,writeScopedConfig as writeConfig,isInProject}from'../../context.js';export function scopeLabel(_0x15b58c){const _0xecf9f=a7_0x1878;return formatScopeLabel(_0x15b58c[_0xecf9f(0x13b)]?_0xecf9f(0x13b):_0xecf9f(0x12b));}
1
+ (function(_0x465492,_0x808dd){const _0x4286cb=a7_0x1230,_0x2dedc5=_0x465492();while(!![]){try{const _0x61bbfc=parseInt(_0x4286cb(0x78))/0x1+parseInt(_0x4286cb(0x76))/0x2*(parseInt(_0x4286cb(0x87))/0x3)+parseInt(_0x4286cb(0x84))/0x4+-parseInt(_0x4286cb(0x70))/0x5*(-parseInt(_0x4286cb(0x71))/0x6)+parseInt(_0x4286cb(0x73))/0x7+parseInt(_0x4286cb(0x7f))/0x8*(parseInt(_0x4286cb(0x7c))/0x9)+parseInt(_0x4286cb(0x77))/0xa*(-parseInt(_0x4286cb(0x80))/0xb);if(_0x61bbfc===_0x808dd)break;else _0x2dedc5['push'](_0x2dedc5['shift']());}catch(_0x4d7eba){_0x2dedc5['push'](_0x2dedc5['shift']());}}}(a7_0x25b6,0xcd84e));import{CLI_BIN_NAME}from'../../constant/cli.js';import{formatScopeLabel}from'../../commands/common/config-policy.js';export{CLI_BIN_NAME};export function enrichAppListItemsWithMergedSelection(_0x4d37a9,_0x35128a){const _0x336c6c=a7_0x1230;if(!_0x35128a)return;const _0x4222bb=!!(_0x35128a[_0x336c6c(0x7b)]??_0x35128a['defaultApp']);for(const _0x1abffa of _0x4d37a9){_0x1abffa[_0x336c6c(0x79)]=![];}const _0x2386f3=_0x35128a[_0x336c6c(0x81)]!=null?String(_0x35128a[_0x336c6c(0x81)])[_0x336c6c(0x7a)]():'';if(_0x4222bb){const _0x5a25d2=_0x35128a[_0x336c6c(0x7b)]??_0x35128a[_0x336c6c(0x74)];if(_0x5a25d2){const _0x3f1f86=_0x4d37a9['find'](_0x447e80=>_0x447e80[_0x336c6c(0x83)]===!![]&&_0x447e80['name']===_0x5a25d2&&_0x447e80[_0x336c6c(0x75)]===_0x336c6c(0x85)),_0x4a1125=_0x3f1f86??_0x4d37a9[_0x336c6c(0x72)](_0x1389b3=>_0x1389b3[_0x336c6c(0x83)]===!![]&&_0x1389b3[_0x336c6c(0x86)]===_0x5a25d2);_0x4a1125&&(_0x4a1125[_0x336c6c(0x79)]=!![]);}return;}if(!_0x2386f3)return;for(const _0x8ff3e of _0x4d37a9){String(_0x8ff3e[_0x336c6c(0x7e)]??'')[_0x336c6c(0x7a)]()===_0x2386f3&&(_0x8ff3e[_0x336c6c(0x79)]=!![]);}}function a7_0x1230(_0x3f49a3,_0x3d371a){_0x3f49a3=_0x3f49a3-0x70;const _0x25b68e=a7_0x25b6();let _0x1230e3=_0x25b68e[_0x3f49a3];return _0x1230e3;}export{readScopedConfig as readConfig,writeScopedConfig as writeConfig,isInProject}from'../../context.js';export function scopeLabel(_0x1a16a3){const _0x3d95e2=a7_0x1230;return formatScopeLabel(_0x1a16a3['global']?_0x3d95e2(0x82):_0x3d95e2(0x7d));}function a7_0x25b6(){const _0x178814=['find','8229249GLZLjA','defaultApp','definedIn','217858mdfnof','50NIwUlD','1195453kbVhIQ','isCurrent','trim','currentApp','2394NudLvL','project','appcode','15040ZHYMQg','11886171tvYVuV','appCode','global','named','4503312jOyZDA','local','name','27LPSghG','186365QtpxLS','204MRZGPS'];a7_0x25b6=function(){return _0x178814;};return a7_0x25b6();}
@@ -1 +1 @@
1
- const a8_0x10fad2=a8_0x4c18;(function(_0x25d1aa,_0x28b7ad){const _0x5c0742=a8_0x4c18,_0x30bf8f=_0x25d1aa();while(!![]){try{const _0x46b49c=-parseInt(_0x5c0742(0x1ab))/0x1+parseInt(_0x5c0742(0x1d2))/0x2+parseInt(_0x5c0742(0x1c1))/0x3+parseInt(_0x5c0742(0x1c6))/0x4*(-parseInt(_0x5c0742(0x1a9))/0x5)+-parseInt(_0x5c0742(0x19d))/0x6+parseInt(_0x5c0742(0x1ca))/0x7*(-parseInt(_0x5c0742(0x1cf))/0x8)+parseInt(_0x5c0742(0x1dc))/0x9;if(_0x46b49c===_0x28b7ad)break;else _0x30bf8f['push'](_0x30bf8f['shift']());}catch(_0x460cb9){_0x30bf8f['push'](_0x30bf8f['shift']());}}}(a8_0x2eda,0x31da4));function a8_0x2eda(){const _0x2bf7f6=['body','Artifact\x20display\x20name','artifactType','lastIndex','createTime','Optional\x20source\x20filter,\x20for\x20example\x20AGENT','Show\x20one\x20Artifact\x20by\x20id','description','5699277EZqXpm','/update','some','Artifact\x20source\x20file\x20is\x20blank.','boolean','deleted','file','File\x20not\x20found:\x20','compiledContent','split','Optional\x20favorite-state\x20filter','filter','updateTime','228774dGGJPJ','antd','File\x20is\x20not\x20a\x20regular\x20file:\x20','--metadata\x20must\x20be\x20a\x20JSON\x20object.','lodash','artifact','num','Update\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','appCode','source','react-dom','AGENT','765TwMxnO','react_module\x20must\x20be\x20an\x20embeddable\x20React\x20module,\x20not\x20full\x20HTML\x20or\x20a\x20ReactDOM/createRoot\x20mount\x20entry.','249704RaRWVz','/client/artifact/create','react_module','write','bool','Path\x20to\x20a\x20local\x20UTF-8\x20React\x20module\x20source\x20file','favorite','trim','exec','build','flag','Artifact\x20metadata\x20as\x20JSON\x20object;\x20compiledContent\x20is\x20stripped','.\x20Unsupported:\x20','isArray','verbose','read','join','/client/artifact/','list','map','name','POST','477990VybEqD','includes','Preview:\x20create\x20react_module\x20Artifact','List\x20current-app\x20react_module\x20Artifacts','File\x20path\x20is\x20required.','7408jMHccB','detail','string','metadata','1351BZyFNg','react_module\x20imports\x20are\x20limited\x20to:\x20','Artifact\x20ID','startsWith','length','3440yDPnTx','validation','add','131584kZjoKc','str'];a8_0x2eda=function(){return _0x2bf7f6;};return a8_0x2eda();}import{existsSync,readFileSync,statSync}from'node:fs';import{createRuntimeArtifact,getRuntimeArtifact,listRuntimeArtifacts,updateRuntimeArtifact}from'../../core/api-client.js';function a8_0x4c18(_0x448777,_0x341f1a){_0x448777=_0x448777-0x19d;const _0x2eda32=a8_0x2eda();let _0x4c18f9=_0x2eda32[_0x448777];return _0x4c18f9;}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_0x10fad2(0x1ad),ARTIFACT_SOURCE_AGENT=a8_0x10fad2(0x1a8),ALLOWED_REACT_MODULE_IMPORTS=['react',a8_0x10fad2(0x1a7),a8_0x10fad2(0x1a1),'dayjs',a8_0x10fad2(0x19e),'@ant-design/icons'];export const ALLOWED_REACT_MODULE_IMPORTS_TEXT=ALLOWED_REACT_MODULE_IMPORTS['join'](',\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_0x10fad2(0x1e2),'type':a8_0x10fad2(0x1c8),'required':!![],'description':a8_0x10fad2(0x1b0)},ARTIFACT_NAME_FLAG={'name':a8_0x10fad2(0x1bf),'type':a8_0x10fad2(0x1c8),'description':a8_0x10fad2(0x1d5)},METADATA_FLAG={'name':a8_0x10fad2(0x1c9),'type':'string','description':a8_0x10fad2(0x1b6)};function isPlainObject(_0x3e8f6b){const _0x3ad7f7=a8_0x10fad2;return typeof _0x3e8f6b==='object'&&_0x3e8f6b!==null&&!Array[_0x3ad7f7(0x1b8)](_0x3e8f6b);}function readSourceFile(_0x20605d){const _0x238277=a8_0x10fad2;if(!_0x20605d)throw CliErrors['validation'](_0x238277(0x1c5));if(!existsSync(_0x20605d))throw CliErrors['validation'](_0x238277(0x1e3)+_0x20605d);if(!statSync(_0x20605d)['isFile']())throw CliErrors['validation'](_0x238277(0x19f)+_0x20605d);const _0x1dee79=readFileSync(_0x20605d,'utf8');return validateReactModuleSource(_0x1dee79),_0x1dee79;}function parseMetadata(_0x17fed8){const _0xfc1f49=a8_0x10fad2;if(!_0x17fed8)return undefined;let _0x40cc57;try{_0x40cc57=JSON['parse'](_0x17fed8);}catch{throw CliErrors[_0xfc1f49(0x1d0)]('Invalid\x20JSON\x20for\x20--metadata:\x20'+_0x17fed8);}if(!isPlainObject(_0x40cc57))throw CliErrors['validation'](_0xfc1f49(0x1a0));const _0x4f2c11={..._0x40cc57};return delete _0x4f2c11[_0xfc1f49(0x1e4)],_0x4f2c11;}function getPackageName(_0xa72780){const _0x1b574e=a8_0x10fad2;if(_0xa72780[_0x1b574e(0x1cd)]('@')){const [_0x47a543,_0x3c3ec2]=_0xa72780[_0x1b574e(0x1e5)]('/');return _0x47a543&&_0x3c3ec2?_0x47a543+'/'+_0x3c3ec2:_0xa72780;}return _0xa72780[_0x1b574e(0x1e5)]('/')[0x0]||_0xa72780;}function validateAllowedImports(_0x1c0640){const _0x21bc41=a8_0x10fad2,_0x5939d2=new Set();for(const _0x2f3471 of IMPORT_SOURCE_PATTERNS){_0x2f3471[_0x21bc41(0x1d7)]=0x0;let _0xa1acf2;while((_0xa1acf2=_0x2f3471[_0x21bc41(0x1b3)](_0x1c0640))!==null){const _0x183021=_0xa1acf2[0x1]?.[_0x21bc41(0x1b2)]();_0x183021&&_0x5939d2[_0x21bc41(0x1d1)](_0x183021);}}const _0x520533=[..._0x5939d2][_0x21bc41(0x1be)](getPackageName)[_0x21bc41(0x1e7)](_0x3d6a73=>!ALLOWED_REACT_MODULE_IMPORTS[_0x21bc41(0x1c2)](_0x3d6a73));if(_0x520533[_0x21bc41(0x1ce)]>0x0)throw CliErrors[_0x21bc41(0x1d0)](_0x21bc41(0x1cb)+ALLOWED_REACT_MODULE_IMPORTS_TEXT+_0x21bc41(0x1b7)+[...new Set(_0x520533)][_0x21bc41(0x1bb)](',\x20'));}export function validateReactModuleSource(_0x237999){const _0x4379ad=a8_0x10fad2;if(!_0x237999[_0x4379ad(0x1b2)]())throw CliErrors[_0x4379ad(0x1d0)](_0x4379ad(0x1df));if(PAGE_LEVEL_PATTERNS[_0x4379ad(0x1de)](_0x277cba=>_0x277cba['test'](_0x237999)))throw CliErrors[_0x4379ad(0x1d0)](_0x4379ad(0x1aa));validateAllowedImports(_0x237999);}function buildArtifactInput(_0x7c8f1){const _0x533e50=a8_0x10fad2,_0x29697a=readSourceFile(_0x7c8f1['str'](_0x533e50(0x1e2))),_0x25bffb=_0x7c8f1[_0x533e50(0x1d3)]('name')[_0x533e50(0x1b2)](),_0x519b2b=parseMetadata(_0x7c8f1[_0x533e50(0x1d3)](_0x533e50(0x1c9)));return{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x25bffb?{'name':_0x25bffb}:{},'content':_0x29697a,..._0x519b2b?{'metadata':_0x519b2b}:{},'source':ARTIFACT_SOURCE_AGENT};}function summarizeArtifact(_0x5d3180){const _0x477a73=a8_0x10fad2;return{'id':_0x5d3180['id'],'name':_0x5d3180[_0x477a73(0x1bf)],'artifactType':_0x5d3180[_0x477a73(0x1d6)],'source':_0x5d3180['source'],'favorite':_0x5d3180[_0x477a73(0x1b1)],'deleted':_0x5d3180[_0x477a73(0x1e1)],'createTime':_0x5d3180[_0x477a73(0x1d8)],'updateTime':_0x5d3180['updateTime']};}function detailArtifact(_0x57e9d9){const _0x488ecc=a8_0x10fad2;return{'id':_0x57e9d9['id'],'appCode':_0x57e9d9[_0x488ecc(0x1a5)],'name':_0x57e9d9[_0x488ecc(0x1bf)],'artifactType':_0x57e9d9[_0x488ecc(0x1d6)],'source':_0x57e9d9['source'],'favorite':_0x57e9d9[_0x488ecc(0x1b1)],'deleted':_0x57e9d9[_0x488ecc(0x1e1)],'content':_0x57e9d9['content']??'','compiledContent':_0x57e9d9[_0x488ecc(0x1e4)],'metadata':_0x57e9d9['metadata']??{},'createTime':_0x57e9d9[_0x488ecc(0x1d8)],'updateTime':_0x57e9d9[_0x488ecc(0x1e8)]};}function readFavoriteFlag(_0x4b3d3a){const _0x1bb03f=a8_0x10fad2,_0x3090c7=_0x4b3d3a[_0x1bb03f(0x1b5)]('favorite');return _0x3090c7===undefined||_0x3090c7===null||_0x3090c7===''?undefined:_0x4b3d3a[_0x1bb03f(0x1af)]('favorite');}const artifactList={'service':a8_0x10fad2(0x1a2),'command':a8_0x10fad2(0x1bd),'description':a8_0x10fad2(0x1c4),'risk':a8_0x10fad2(0x1ba),'flags':[{'name':a8_0x10fad2(0x1a6),'type':a8_0x10fad2(0x1c8),'description':a8_0x10fad2(0x1d9)},{'name':a8_0x10fad2(0x1b1),'type':a8_0x10fad2(0x1e0),'description':a8_0x10fad2(0x1e6)},VERBOSE_FLAG],async 'execute'(_0x44c3d3){const _0x4e004f=a8_0x10fad2,_0x3909a1=await listRuntimeArtifacts(_0x44c3d3[_0x4e004f(0x1a5)],{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x44c3d3['str'](_0x4e004f(0x1a6))?{'source':_0x44c3d3[_0x4e004f(0x1d3)](_0x4e004f(0x1a6))}:{},...readFavoriteFlag(_0x44c3d3)!==undefined?{'favorite':readFavoriteFlag(_0x44c3d3)}:{}});return{'ok':!![],'data':{'total':_0x3909a1['length'],'items':_0x44c3d3['bool'](_0x4e004f(0x1b9))?_0x3909a1:_0x3909a1[_0x4e004f(0x1be)](summarizeArtifact)}};}},artifactDetail={'service':'artifact','command':a8_0x10fad2(0x1c7),'description':a8_0x10fad2(0x1da),'risk':'read','flags':[{...ID_FLAG,'description':a8_0x10fad2(0x1cc)}],async 'execute'(_0x242051){const _0x57813e=a8_0x10fad2,_0x569f96=await getRuntimeArtifact(_0x242051[_0x57813e(0x1a3)]('id'),_0x242051[_0x57813e(0x1a5)]);return{'ok':!![],'data':detailArtifact(_0x569f96)};}},artifactCreate={'service':a8_0x10fad2(0x1a2),'command':'create','description':'Create\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','risk':a8_0x10fad2(0x1ae),'flags':[FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x4aa4fc){const _0x968101=a8_0x10fad2,_0x1d479a=buildArtifactInput(_0x4aa4fc),_0x2daf9a=await createRuntimeArtifact(_0x4aa4fc[_0x968101(0x1a5)],_0x1d479a);return{'ok':!![],'data':detailArtifact(_0x2daf9a),'message':'Created\x20Artifact\x20'+_0x2daf9a['id']+(_0x2daf9a['name']?'\x20('+_0x2daf9a[_0x968101(0x1bf)]+')':'')};},async 'dryRun'(_0x9f6f4d){const _0x3c0dff=a8_0x10fad2,_0x558406=buildArtifactInput(_0x9f6f4d);return dryRun(_0x3c0dff(0x1c0),_0x3c0dff(0x1ac))['body']({'appCode':_0x9f6f4d[_0x3c0dff(0x1a5)],..._0x558406})[_0x3c0dff(0x1db)](_0x3c0dff(0x1c3))[_0x3c0dff(0x1b4)]();}},artifactUpdate={'service':a8_0x10fad2(0x1a2),'command':'update','description':a8_0x10fad2(0x1a4),'risk':a8_0x10fad2(0x1ae),'flags':[{...ID_FLAG,'description':a8_0x10fad2(0x1cc)},FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x6b7b0f){const _0x529f08=a8_0x10fad2,_0x2e9f6b=_0x6b7b0f['num']('id'),_0x15634d=buildArtifactInput(_0x6b7b0f),_0x1b9048=await updateRuntimeArtifact(_0x2e9f6b,_0x6b7b0f[_0x529f08(0x1a5)],_0x15634d);return{'ok':!![],'data':detailArtifact(_0x1b9048),'message':'Updated\x20Artifact\x20'+_0x1b9048['id']+(_0x1b9048[_0x529f08(0x1bf)]?'\x20('+_0x1b9048[_0x529f08(0x1bf)]+')':'')};},async 'dryRun'(_0x5ad951){const _0x1a6d8=a8_0x10fad2,_0x449542=_0x5ad951['num']('id'),_0x4bd781=buildArtifactInput(_0x5ad951);return dryRun('POST',_0x1a6d8(0x1bc)+_0x449542+_0x1a6d8(0x1dd))[_0x1a6d8(0x1d4)]({'appCode':_0x5ad951[_0x1a6d8(0x1a5)],..._0x4bd781})['description']('Preview:\x20update\x20react_module\x20Artifact\x20'+_0x449542)[_0x1a6d8(0x1b4)]();}};export const artifactDefinitions=[artifactList,artifactDetail,artifactCreate,artifactUpdate];
1
+ const a8_0x1f6234=a8_0x32a6;(function(_0x3be5b4,_0x4745b1){const _0x2bd276=a8_0x32a6,_0x27311e=_0x3be5b4();while(!![]){try{const _0x3981d0=parseInt(_0x2bd276(0xe5))/0x1+-parseInt(_0x2bd276(0xea))/0x2+parseInt(_0x2bd276(0x102))/0x3+-parseInt(_0x2bd276(0xf3))/0x4+-parseInt(_0x2bd276(0x112))/0x5*(parseInt(_0x2bd276(0x106))/0x6)+parseInt(_0x2bd276(0x12c))/0x7*(-parseInt(_0x2bd276(0xeb))/0x8)+-parseInt(_0x2bd276(0x117))/0x9*(-parseInt(_0x2bd276(0x111))/0xa);if(_0x3981d0===_0x4745b1)break;else _0x27311e['push'](_0x27311e['shift']());}catch(_0x4866d1){_0x27311e['push'](_0x27311e['shift']());}}}(a8_0x5c6d,0xaf337));import{existsSync,readFileSync,statSync}from'node:fs';import{createRuntimeArtifact,getRuntimeArtifact,listRuntimeArtifacts,updateRuntimeArtifact}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';function a8_0x5c6d(){const _0x5421c8=['55694lwAJAb','1064144YdBdMX','write','Invalid\x20JSON\x20for\x20--metadata:\x20','trim','lodash','utf8','file','File\x20path\x20is\x20required.','3949808ALMnON','content','POST','Created\x20Artifact\x20','Artifact\x20source\x20file\x20is\x20blank.','react','map','boolean','bool','dayjs','deleted','/client/artifact/create','join','filter','str','2333193HJrFhU','name','verbose','Optional\x20favorite-state\x20filter','14118zGPWXn','/client/artifact/','react-dom','Optional\x20source\x20filter,\x20for\x20example\x20AGENT','string','source','AGENT','includes','validation','Artifact\x20metadata\x20as\x20JSON\x20object;\x20compiledContent\x20is\x20stripped','antd','6712980eHQiMc','1905zdsdqd','Show\x20one\x20Artifact\x20by\x20id','list','Preview:\x20create\x20react_module\x20Artifact','Artifact\x20display\x20name','18xiHgIo','detail','Path\x20to\x20a\x20local\x20UTF-8\x20React\x20module\x20source\x20file','File\x20is\x20not\x20a\x20regular\x20file:\x20','split','create','length','@ant-design/icons','Update\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','/update','File\x20not\x20found:\x20','favorite','Artifact\x20ID','metadata','react_module','artifact','Preview:\x20update\x20react_module\x20Artifact\x20','updateTime','react_module\x20imports\x20are\x20limited\x20to:\x20','build','react_module\x20must\x20be\x20an\x20embeddable\x20React\x20module,\x20not\x20full\x20HTML\x20or\x20a\x20ReactDOM/createRoot\x20mount\x20entry.','28wBERaI','compiledContent','appCode','artifactType','parse','read','flag','List\x20current-app\x20react_module\x20Artifacts','1041160DWSNwC','isFile','body','object','num'];a8_0x5c6d=function(){return _0x5421c8;};return a8_0x5c6d();}import{dryRun}from'../../framework/dryrun.js';const ARTIFACT_TYPE_REACT_MODULE=a8_0x1f6234(0x125),ARTIFACT_SOURCE_AGENT=a8_0x1f6234(0x10c),ALLOWED_REACT_MODULE_IMPORTS=[a8_0x1f6234(0xf8),a8_0x1f6234(0x108),a8_0x1f6234(0xef),a8_0x1f6234(0xfc),a8_0x1f6234(0x110),a8_0x1f6234(0x11e)];export const ALLOWED_REACT_MODULE_IMPORTS_TEXT=ALLOWED_REACT_MODULE_IMPORTS[a8_0x1f6234(0xff)](',\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_0x1f6234(0xf1),'type':a8_0x1f6234(0x10a),'required':!![],'description':a8_0x1f6234(0x119)},ARTIFACT_NAME_FLAG={'name':a8_0x1f6234(0x103),'type':a8_0x1f6234(0x10a),'description':a8_0x1f6234(0x116)},METADATA_FLAG={'name':a8_0x1f6234(0x124),'type':'string','description':a8_0x1f6234(0x10f)};function isPlainObject(_0x2fde95){const _0x40be0b=a8_0x1f6234;return typeof _0x2fde95===_0x40be0b(0xe8)&&_0x2fde95!==null&&!Array['isArray'](_0x2fde95);}function readSourceFile(_0x16d1bf){const _0x183d04=a8_0x1f6234;if(!_0x16d1bf)throw CliErrors[_0x183d04(0x10e)](_0x183d04(0xf2));if(!existsSync(_0x16d1bf))throw CliErrors['validation'](_0x183d04(0x121)+_0x16d1bf);if(!statSync(_0x16d1bf)[_0x183d04(0xe6)]())throw CliErrors[_0x183d04(0x10e)](_0x183d04(0x11a)+_0x16d1bf);const _0x3d8082=readFileSync(_0x16d1bf,_0x183d04(0xf0));return validateReactModuleSource(_0x3d8082),_0x3d8082;}function parseMetadata(_0x3d8705){const _0x3bdf51=a8_0x1f6234;if(!_0x3d8705)return undefined;let _0x456407;try{_0x456407=JSON[_0x3bdf51(0xe1)](_0x3d8705);}catch{throw CliErrors[_0x3bdf51(0x10e)](_0x3bdf51(0xed)+_0x3d8705);}if(!isPlainObject(_0x456407))throw CliErrors[_0x3bdf51(0x10e)]('--metadata\x20must\x20be\x20a\x20JSON\x20object.');const _0x4181fc={..._0x456407};return delete _0x4181fc['compiledContent'],_0x4181fc;}function getPackageName(_0x16a6ce){const _0x47aef2=a8_0x1f6234;if(_0x16a6ce['startsWith']('@')){const [_0x59c75a,_0x2a8d33]=_0x16a6ce['split']('/');return _0x59c75a&&_0x2a8d33?_0x59c75a+'/'+_0x2a8d33:_0x16a6ce;}return _0x16a6ce[_0x47aef2(0x11b)]('/')[0x0]||_0x16a6ce;}function validateAllowedImports(_0x433e78){const _0xbd3e43=a8_0x1f6234,_0x2d0d88=new Set();for(const _0x16041a of IMPORT_SOURCE_PATTERNS){_0x16041a['lastIndex']=0x0;let _0x10d02a;while((_0x10d02a=_0x16041a['exec'](_0x433e78))!==null){const _0x69eaf4=_0x10d02a[0x1]?.[_0xbd3e43(0xee)]();_0x69eaf4&&_0x2d0d88['add'](_0x69eaf4);}}const _0x49cfc7=[..._0x2d0d88][_0xbd3e43(0xf9)](getPackageName)[_0xbd3e43(0x100)](_0x2f9daf=>!ALLOWED_REACT_MODULE_IMPORTS[_0xbd3e43(0x10d)](_0x2f9daf));if(_0x49cfc7[_0xbd3e43(0x11d)]>0x0)throw CliErrors[_0xbd3e43(0x10e)](_0xbd3e43(0x129)+ALLOWED_REACT_MODULE_IMPORTS_TEXT+'.\x20Unsupported:\x20'+[...new Set(_0x49cfc7)][_0xbd3e43(0xff)](',\x20'));}export function validateReactModuleSource(_0x188c0d){const _0x5c5013=a8_0x1f6234;if(!_0x188c0d[_0x5c5013(0xee)]())throw CliErrors['validation'](_0x5c5013(0xf7));if(PAGE_LEVEL_PATTERNS['some'](_0x51dea1=>_0x51dea1['test'](_0x188c0d)))throw CliErrors[_0x5c5013(0x10e)](_0x5c5013(0x12b));validateAllowedImports(_0x188c0d);}function buildArtifactInput(_0x1b3c23){const _0x348b5e=a8_0x1f6234,_0x4af1b8=readSourceFile(_0x1b3c23[_0x348b5e(0x101)]('file')),_0x313f1c=_0x1b3c23['str'](_0x348b5e(0x103))['trim'](),_0x1214ab=parseMetadata(_0x1b3c23['str']('metadata'));return{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x313f1c?{'name':_0x313f1c}:{},'content':_0x4af1b8,..._0x1214ab?{'metadata':_0x1214ab}:{},'source':ARTIFACT_SOURCE_AGENT};}function summarizeArtifact(_0x26f566){const _0x199167=a8_0x1f6234;return{'id':_0x26f566['id'],'name':_0x26f566[_0x199167(0x103)],'artifactType':_0x26f566[_0x199167(0x12f)],'source':_0x26f566[_0x199167(0x10b)],'favorite':_0x26f566[_0x199167(0x122)],'deleted':_0x26f566[_0x199167(0xfd)],'createTime':_0x26f566['createTime'],'updateTime':_0x26f566[_0x199167(0x128)]};}function detailArtifact(_0x33a180){const _0x1eb7a0=a8_0x1f6234;return{'id':_0x33a180['id'],'appCode':_0x33a180[_0x1eb7a0(0x12e)],'name':_0x33a180[_0x1eb7a0(0x103)],'artifactType':_0x33a180[_0x1eb7a0(0x12f)],'source':_0x33a180[_0x1eb7a0(0x10b)],'favorite':_0x33a180['favorite'],'deleted':_0x33a180[_0x1eb7a0(0xfd)],'content':_0x33a180[_0x1eb7a0(0xf4)]??'','compiledContent':_0x33a180[_0x1eb7a0(0x12d)],'metadata':_0x33a180[_0x1eb7a0(0x124)]??{},'createTime':_0x33a180['createTime'],'updateTime':_0x33a180[_0x1eb7a0(0x128)]};}function readFavoriteFlag(_0x5a1ac6){const _0x1ea41e=a8_0x1f6234,_0x2714be=_0x5a1ac6[_0x1ea41e(0xe3)](_0x1ea41e(0x122));return _0x2714be===undefined||_0x2714be===null||_0x2714be===''?undefined:_0x5a1ac6['bool'](_0x1ea41e(0x122));}function a8_0x32a6(_0x1c35e1,_0x19e4cf){_0x1c35e1=_0x1c35e1-0xe1;const _0x5c6ded=a8_0x5c6d();let _0x32a6e1=_0x5c6ded[_0x1c35e1];return _0x32a6e1;}const artifactList={'service':a8_0x1f6234(0x126),'command':a8_0x1f6234(0x114),'description':a8_0x1f6234(0xe4),'risk':a8_0x1f6234(0xe2),'flags':[{'name':a8_0x1f6234(0x10b),'type':'string','description':a8_0x1f6234(0x109)},{'name':a8_0x1f6234(0x122),'type':a8_0x1f6234(0xfa),'description':a8_0x1f6234(0x105)},VERBOSE_FLAG],async 'execute'(_0x4b75de){const _0x5c7a60=a8_0x1f6234,_0x37997e=await listRuntimeArtifacts(_0x4b75de[_0x5c7a60(0x12e)],{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x4b75de[_0x5c7a60(0x101)]('source')?{'source':_0x4b75de['str']('source')}:{},...readFavoriteFlag(_0x4b75de)!==undefined?{'favorite':readFavoriteFlag(_0x4b75de)}:{}});return{'ok':!![],'data':{'total':_0x37997e[_0x5c7a60(0x11d)],'items':_0x4b75de[_0x5c7a60(0xfb)](_0x5c7a60(0x104))?_0x37997e:_0x37997e[_0x5c7a60(0xf9)](summarizeArtifact)}};}},artifactDetail={'service':a8_0x1f6234(0x126),'command':a8_0x1f6234(0x118),'description':a8_0x1f6234(0x113),'risk':'read','flags':[{...ID_FLAG,'description':a8_0x1f6234(0x123)}],async 'execute'(_0x3cfa99){const _0x3d8d28=a8_0x1f6234,_0x143067=await getRuntimeArtifact(_0x3cfa99[_0x3d8d28(0xe9)]('id'),_0x3cfa99[_0x3d8d28(0x12e)]);return{'ok':!![],'data':detailArtifact(_0x143067)};}},artifactCreate={'service':'artifact','command':a8_0x1f6234(0x11c),'description':'Create\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','risk':'write','flags':[FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x3f71e8){const _0x3bfaf6=a8_0x1f6234,_0x56bca3=buildArtifactInput(_0x3f71e8),_0x153fa4=await createRuntimeArtifact(_0x3f71e8[_0x3bfaf6(0x12e)],_0x56bca3);return{'ok':!![],'data':detailArtifact(_0x153fa4),'message':_0x3bfaf6(0xf6)+_0x153fa4['id']+(_0x153fa4[_0x3bfaf6(0x103)]?'\x20('+_0x153fa4[_0x3bfaf6(0x103)]+')':'')};},async 'dryRun'(_0x5ea585){const _0x176852=a8_0x1f6234,_0x1effdb=buildArtifactInput(_0x5ea585);return dryRun('POST',_0x176852(0xfe))['body']({'appCode':_0x5ea585[_0x176852(0x12e)],..._0x1effdb})['description'](_0x176852(0x115))[_0x176852(0x12a)]();}},artifactUpdate={'service':a8_0x1f6234(0x126),'command':'update','description':a8_0x1f6234(0x11f),'risk':a8_0x1f6234(0xec),'flags':[{...ID_FLAG,'description':a8_0x1f6234(0x123)},FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x2947bd){const _0x1ae503=a8_0x1f6234,_0x119ae6=_0x2947bd[_0x1ae503(0xe9)]('id'),_0x283050=buildArtifactInput(_0x2947bd),_0x660656=await updateRuntimeArtifact(_0x119ae6,_0x2947bd['appCode'],_0x283050);return{'ok':!![],'data':detailArtifact(_0x660656),'message':'Updated\x20Artifact\x20'+_0x660656['id']+(_0x660656[_0x1ae503(0x103)]?'\x20('+_0x660656[_0x1ae503(0x103)]+')':'')};},async 'dryRun'(_0x31fb74){const _0x2d6e69=a8_0x1f6234,_0x3efe93=_0x31fb74[_0x2d6e69(0xe9)]('id'),_0x591461=buildArtifactInput(_0x31fb74);return dryRun(_0x2d6e69(0xf5),_0x2d6e69(0x107)+_0x3efe93+_0x2d6e69(0x120))[_0x2d6e69(0xe7)]({'appCode':_0x31fb74[_0x2d6e69(0x12e)],..._0x591461})['description'](_0x2d6e69(0x127)+_0x3efe93)['build']();}};export const artifactDefinitions=[artifactList,artifactDetail,artifactCreate,artifactUpdate];
@@ -1 +1 @@
1
- const a9_0x93ac11=a9_0x5bbc;(function(_0x12d324,_0x40abed){const _0x37d24f=a9_0x5bbc,_0x5e45cc=_0x12d324();while(!![]){try{const _0x4f4447=parseInt(_0x37d24f(0xa4))/0x1*(-parseInt(_0x37d24f(0x7e))/0x2)+parseInt(_0x37d24f(0xc4))/0x3+-parseInt(_0x37d24f(0xa2))/0x4*(-parseInt(_0x37d24f(0x74))/0x5)+-parseInt(_0x37d24f(0x98))/0x6+-parseInt(_0x37d24f(0x90))/0x7+-parseInt(_0x37d24f(0xb8))/0x8*(-parseInt(_0x37d24f(0x7d))/0x9)+parseInt(_0x37d24f(0xc7))/0xa;if(_0x4f4447===_0x40abed)break;else _0x5e45cc['push'](_0x5e45cc['shift']());}catch(_0x5af968){_0x5e45cc['push'](_0x5e45cc['shift']());}}}(a9_0x4c96,0xe4459));import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../../constant/product.js';import{AUTH_MODE}from'../../constant/auth-mode.js';import{normalizeEnv,isDaily,isDev}from'../../constant/env.js';import{USER_ACCESS_KEY_CREATE_URL}from'../../constant/url.js';function a9_0x5bbc(_0x5f2d73,_0x1dfd94){_0x5f2d73=_0x5f2d73-0x71;const _0x4c96c3=a9_0x4c96();let _0x5bbce9=_0x4c96c3[_0x5f2d73];return _0x5bbce9;}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 _0x10406f=a9_0x5bbc;writeCliSideChannelLine(_0x10406f(0xb2)+PRODUCT_CONFIG[_0x10406f(0x8f)]+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine('Tip:\x20you\x20can\x20also\x20run:'),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x10406f(0xba));}function a9_0x4c96(){const _0x15a448=['bool','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','Shorthand\x20for\x20--access-key','40NlnZYp','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','\x20auth\x20login\x20--access-key\x20<ak_xxx>','global','string','join','write','Write\x20to\x20global\x20config\x20(default)','Option\x20A:\x20','project','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','slice','5166333Ldmdjg','\x20Verify:\x20','access-key','512740EPhdtN','No\x20AccessKey\x20found\x20in\x20','Show\x20current\x20authentication\x20status','Auth\x20config\x20reinitialized\x20in\x20','10WDpBtd','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','newConfigFileName','accessKey','Invalid\x20accessKey\x20format:\x20\x22','\x20(via\x20','Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config','Then\x20verify\x20with:\x20','\x20config.','1727343PkTbFp','14jQONJD','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','\x20\x20export\x20','cancelled','env','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','Auth\x20mode:\x20','length','\x20env\x20var','init','Clear\x20accessKey\x20from\x20config','\x20auth\x20status','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','AccessKey\x20saved\x20to\x20','envName','validation','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','userCenterDisplayName','12957966QRgbBq','AccessKey\x20cleared\x20from\x20','AccessKey\x20(ak_xxx...)','\x20config','isTTY','\x20doctor','stdout','Option\x20B:\x20apps\x20config\x20(','2588178ibeMzt','Read\x20from\x20global\x20config\x20(default)','info','Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','Clear\x20from\x20global\x20config\x20(default)','status','Missing\x20accessKey.','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','str','1605712icuabc','Use\x20`','45482cDGlME','push','ACCESS_KEY','=ak_xxx','logout','auth','trim','\x20scope.','test','Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','boolean','production','nonInteractive','global-default','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','stdin'];a9_0x4c96=function(){return _0x15a448;};return a9_0x4c96();}function buildAccessKeySetupGuide(){const _0x5b1cf3=a9_0x5bbc;return[_0x5b1cf3(0xb2)+PRODUCT_CONFIG[_0x5b1cf3(0x8f)]+':',USER_ACCESS_KEY_CREATE_URL,_0x5b1cf3(0xb3)+CLI_BIN_NAME+_0x5b1cf3(0x7f)][_0x5b1cf3(0xbd)]('\x0a');}function canPromptForAccessKey(_0x194930){const _0x4ac954=a9_0x5bbc;return!_0x194930['nonInteractive']&&process[_0x4ac954(0xb4)][_0x4ac954(0x94)]!==![]&&process[_0x4ac954(0x96)][_0x4ac954(0x94)]!==![];}function resolveAuthScopeFlags(_0xce5019){const _0x56ac6a=a9_0x5bbc;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0xce5019[_0x56ac6a(0xb5)](_0x56ac6a(0xbb)),'explicitProject':_0xce5019['bool'](_0x56ac6a(0xc1)),'policy':_0x56ac6a(0xb1)}));}async function resolveAuthWriteInput(_0x749b2d){const _0x9afd3a=a9_0x5bbc;let _0x59662b=(_0x749b2d[_0x9afd3a(0xa1)](_0x9afd3a(0xc6))||_0x749b2d[_0x9afd3a(0xa1)]('ak')||'')[_0x9afd3a(0xaa)]();const _0x1d3a5f=(_0x749b2d['str'](_0x9afd3a(0x82))||'')[_0x9afd3a(0xaa)]();if(!_0x59662b&&canPromptForAccessKey(_0x749b2d))try{showAccessKeyCreateHint(),_0x59662b=await promptAccessKey('');}catch(_0xae81fc){if(isAbortPrompt(_0xae81fc))throw CliErrors[_0x9afd3a(0x81)]();throw _0xae81fc;}if(!_0x59662b)throw CliErrors[_0x9afd3a(0x8d)](_0x9afd3a(0x9f),buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN[_0x9afd3a(0xac)](_0x59662b))throw CliErrors[_0x9afd3a(0x8d)](_0x9afd3a(0x78)+_0x59662b+'\x22','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars');if(!_0x1d3a5f)return{'accessKey':_0x59662b};const _0x1a91b7=normalizeEnv(_0x1d3a5f);return{'accessKey':_0x59662b,'env':isDaily(_0x1a91b7)?'daily':isDev(_0x1a91b7)?'development':_0x9afd3a(0xaf)};}export const authDefinitions=[{'service':a9_0x93ac11(0xa9),'command':'login','description':a9_0x93ac11(0xad),'risk':a9_0x93ac11(0xbe),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a9_0x93ac11(0xc6),'type':a9_0x93ac11(0xbc),'description':'AccessKey\x20(ak_xxx...)'},{'name':'ak','type':'string','description':'Shorthand\x20for\x20--access-key'},{'name':a9_0x93ac11(0xbb),'type':a9_0x93ac11(0xae),'description':a9_0x93ac11(0xbf),'default':!![]},{'name':a9_0x93ac11(0xc1),'type':a9_0x93ac11(0xae),'description':a9_0x93ac11(0x9c),'default':![]}],async 'execute'(_0x251096){const _0x274824=a9_0x93ac11;if(_0x251096[_0x274824(0xb5)]('yes'))throw CliErrors[_0x274824(0x8d)]('`auth\x20login`\x20does\x20not\x20support\x20--yes.',_0x274824(0xa3)+CLI_BIN_NAME+_0x274824(0x75)+CLI_BIN_NAME+_0x274824(0xb9));const _0x2acf28=(_0x251096[_0x274824(0xa1)](_0x274824(0xc6))||_0x251096[_0x274824(0xa1)]('ak')||'')['trim']();if(!_0x2acf28&&_0x251096[_0x274824(0xb0)])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x3d4183=await resolveAuthWriteInput(_0x251096),_0x192c82=resolveAuthScopeFlags(_0x251096),_0x397c29=readScopedConfig(_0x192c82);_0x397c29[_0x274824(0x77)]=_0x3d4183[_0x274824(0x77)];_0x3d4183[_0x274824(0x82)]&&(_0x397c29[_0x274824(0x82)]=_0x3d4183['env']);writeScopedConfig(_0x397c29,_0x192c82);const _0x46a482=_0x192c82['global']?_0x274824(0xbb):_0x274824(0xc1),_0x9cf828=_0x397c29['env']?'\x20Current\x20env:\x20'+_0x397c29[_0x274824(0x82)]+'.':'';return{'ok':!![],'message':_0x274824(0x8b)+_0x46a482+'\x20config.'+_0x9cf828+_0x274824(0xc5)+CLI_BIN_NAME+_0x274824(0x89)};}},{'service':a9_0x93ac11(0xa9),'command':a9_0x93ac11(0x87),'description':a9_0x93ac11(0x9b),'risk':a9_0x93ac11(0xbe),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'access-key','type':'string','description':a9_0x93ac11(0x92)},{'name':'ak','type':a9_0x93ac11(0xbc),'description':a9_0x93ac11(0xb7)},{'name':a9_0x93ac11(0x82),'type':a9_0x93ac11(0xbc),'description':a9_0x93ac11(0x7a)},{'name':a9_0x93ac11(0xbb),'type':'boolean','description':a9_0x93ac11(0xbf),'default':!![]},{'name':a9_0x93ac11(0xc1),'type':a9_0x93ac11(0xae),'description':'Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x1038ec){const _0x36b93a=a9_0x93ac11,_0x49a5c5=await resolveAuthWriteInput(_0x1038ec),_0x24be58=resolveAuthScopeFlags(_0x1038ec),_0xb3e4b={'accessKey':_0x49a5c5[_0x36b93a(0x77)]};_0x49a5c5[_0x36b93a(0x82)]&&(_0xb3e4b['env']=_0x49a5c5[_0x36b93a(0x82)]);writeScopedConfig(_0xb3e4b,_0x24be58);const _0x5979a2=_0x24be58[_0x36b93a(0xbb)]?'global':_0x36b93a(0xc1),_0x4122db=_0xb3e4b[_0x36b93a(0x82)]?'\x20Current\x20env:\x20'+_0xb3e4b[_0x36b93a(0x82)]+'.':'';return{'ok':!![],'message':_0x36b93a(0x73)+_0x5979a2+_0x36b93a(0xab)+_0x4122db+_0x36b93a(0xc5)+CLI_BIN_NAME+_0x36b93a(0x89)};}},{'service':'auth','command':a9_0x93ac11(0xa8),'description':a9_0x93ac11(0x88),'risk':a9_0x93ac11(0xbe),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'global','type':a9_0x93ac11(0xae),'description':a9_0x93ac11(0x9d),'default':!![]},{'name':a9_0x93ac11(0xc1),'type':a9_0x93ac11(0xae),'description':a9_0x93ac11(0xc2),'default':![]}],async 'execute'(_0x31303f){const _0x497f60=a9_0x93ac11,_0x293ced=resolveAuthScopeFlags(_0x31303f),_0x12b033=readScopedConfig(_0x293ced),_0x473728=!!_0x12b033['accessKey'];delete _0x12b033['accessKey'],writeScopedConfig(_0x12b033,_0x293ced);const _0x493ed0=_0x293ced[_0x497f60(0xbb)]?_0x497f60(0xbb):_0x497f60(0xc1);if(_0x473728)return{'ok':!![],'message':_0x497f60(0x91)+_0x493ed0+_0x497f60(0x7c)};return{'ok':!![],'message':_0x497f60(0x71)+_0x493ed0+'\x20config.\x20Nothing\x20to\x20clear.'};}},{'service':'auth','command':a9_0x93ac11(0x9e),'description':a9_0x93ac11(0x72),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'global','type':a9_0x93ac11(0xae),'description':a9_0x93ac11(0x99),'default':!![]},{'name':a9_0x93ac11(0xc1),'type':a9_0x93ac11(0xae),'description':a9_0x93ac11(0x8a),'default':![]}],async 'execute'(_0x13cfe0){const _0x189218=a9_0x93ac11,_0x19489a=resolveAuthScopeFlags(_0x13cfe0),_0x1f1260=readScopedConfig(_0x19489a),_0x3f6904=productEnvName(_0x189218(0xa6)),_0x48953a=productEnv('ACCESS_KEY')||undefined,_0x101b82=_0x1f1260[_0x189218(0x77)]||undefined,_0x4772a9=_0x48953a||_0x101b82,_0x483213=_0x48953a?_0x3f6904+_0x189218(0x86):_0x101b82?(_0x19489a[_0x189218(0xbb)]?_0x189218(0xbb):_0x189218(0xc1))+_0x189218(0x93):null,_0x4c5d72=[_0x189218(0x84)+AUTH_MODE['ClientAk']];if(_0x4772a9){const _0x13d353=_0x4772a9[_0x189218(0x85)]>0x8?''+_0x4772a9[_0x189218(0xc3)](0x0,0x8)+'*'['repeat'](_0x4772a9[_0x189218(0x85)]-0x8):_0x4772a9;_0x4c5d72[_0x189218(0xa5)]('AccessKey:\x20'+_0x13d353+(_0x483213?_0x189218(0x79)+_0x483213+')':''));}return!_0x4772a9&&(_0x4c5d72[_0x189218(0xa5)](''),_0x4c5d72[_0x189218(0xa5)](_0x189218(0x83)),_0x4c5d72['push'](''),_0x4c5d72[_0x189218(0xa5)](_0x189218(0xc0)+CLI_BIN_NAME+'\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]'),_0x4c5d72[_0x189218(0xa5)](''),_0x4c5d72[_0x189218(0xa5)](_0x189218(0x97)+PRODUCT_CONFIG[_0x189218(0x76)]+')'),_0x4c5d72[_0x189218(0xa5)](_0x189218(0xa0)),_0x4c5d72['push'](''),_0x4c5d72['push']('Option\x20C:\x20environment\x20variable'),_0x4c5d72[_0x189218(0xa5)](_0x189218(0x80)+_0x3f6904+_0x189218(0xa7)),_0x4c5d72[_0x189218(0xa5)](''),_0x4c5d72['push'](_0x189218(0x7b)+CLI_BIN_NAME+_0x189218(0x89)),_0x4c5d72[_0x189218(0xa5)](_0x189218(0xb6)+CLI_BIN_NAME+_0x189218(0x95))),{'ok':!![],'message':_0x4c5d72[_0x189218(0xbd)]('\x0a')};}},{'service':'auth','command':a9_0x93ac11(0x9a),'description':a9_0x93ac11(0x8e),'risk':'read','requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x229b2e){const _0xf48a14=a9_0x93ac11,_0x4b7d3e=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x4b7d3e,'meta':{'env':_0x229b2e[_0xf48a14(0x8c)]??'production'}}};}}];
1
+ const a9_0x15a80a=a9_0x3fc1;function a9_0x323d(){const _0x1e9a5b=['11457HzeYiX','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','1264dxZdJu','AccessKey:\x20','status','project','Missing\x20accessKey.','\x20env\x20var','Use\x20`','access-key','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','\x20(via\x20','stdout','string','`auth\x20login`\x20does\x20not\x20support\x20--yes.','str','Write\x20to\x20global\x20config\x20(default)','trim','Invalid\x20accessKey\x20format:\x20\x22','global-default','production','nonInteractive','slice','\x20\x20export\x20','global','accessKey','4iahgrU','login','Clear\x20accessKey\x20from\x20config','70UfpGip','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','push','boolean','ACCESS_KEY','userCenterDisplayName','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','Shorthand\x20for\x20--access-key','\x20config','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','\x20Current\x20env:\x20','yes','595347AEpCAZ','=ak_xxx','\x20config.','logout','env','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','276iRPOSD','1267Bmpkip','No\x20AccessKey\x20found\x20in\x20','21703SQzVOi','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','write','length','Auth\x20config\x20reinitialized\x20in\x20','\x20Verify:\x20','development','ClientAk','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','newConfigFileName','Option\x20B:\x20apps\x20config\x20(','init','isTTY','auth','\x20scope.','test','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','validation','bool','Option\x20A:\x20','132202IdAuKE','stdin','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','\x20auth\x20status','Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','Auth\x20mode:\x20','join','AccessKey\x20cleared\x20from\x20','Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config','185188tjkpOF','cancelled','\x20auth\x20login\x20--access-key\x20<ak_xxx>','Option\x20C:\x20environment\x20variable','Show\x20current\x20authentication\x20status','Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','Read\x20from\x20global\x20config\x20(default)','read','182760kydXKV'];a9_0x323d=function(){return _0x1e9a5b;};return a9_0x323d();}(function(_0x1cba2b,_0x4ad4dc){const _0x281ab5=a9_0x3fc1,_0x3198be=_0x1cba2b();while(!![]){try{const _0x3724cd=parseInt(_0x281ab5(0x11f))/0x1+-parseInt(_0x281ab5(0x116))/0x2+-parseInt(_0x281ab5(0xf9))/0x3*(parseInt(_0x281ab5(0x142))/0x4)+-parseInt(_0x281ab5(0x127))/0x5+-parseInt(_0x281ab5(0xff))/0x6*(-parseInt(_0x281ab5(0x100))/0x7)+-parseInt(_0x281ab5(0x12a))/0x8*(-parseInt(_0x281ab5(0x128))/0x9)+parseInt(_0x281ab5(0xed))/0xa*(parseInt(_0x281ab5(0x102))/0xb);if(_0x3724cd===_0x4ad4dc)break;else _0x3198be['push'](_0x3198be['shift']());}catch(_0x10d5d7){_0x3198be['push'](_0x3198be['shift']());}}}(a9_0x323d,0x1a35d));import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../../constant/product.js';function a9_0x3fc1(_0x366dbd,_0x4dfea1){_0x366dbd=_0x366dbd-0xeb;const _0x323dfc=a9_0x323d();let _0x3fc1c7=_0x323dfc[_0x366dbd];return _0x3fc1c7;}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 _0x43a149=a9_0x3fc1;writeCliSideChannelLine(_0x43a149(0xfe)+PRODUCT_CONFIG[_0x43a149(0xf2)]+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine('Tip:\x20you\x20can\x20also\x20run:'),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x43a149(0x121));}function buildAccessKeySetupGuide(){const _0x264340=a9_0x3fc1;return['AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20'+PRODUCT_CONFIG['userCenterDisplayName']+':',USER_ACCESS_KEY_CREATE_URL,'Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20'+CLI_BIN_NAME+_0x264340(0x129)][_0x264340(0x11c)]('\x0a');}function canPromptForAccessKey(_0x5b836f){const _0x4afba4=a9_0x3fc1;return!_0x5b836f['nonInteractive']&&process[_0x4afba4(0x117)]['isTTY']!==![]&&process[_0x4afba4(0x134)][_0x4afba4(0x10e)]!==![];}function resolveAuthScopeFlags(_0x4b80e7){const _0x56faee=a9_0x3fc1;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x4b80e7[_0x56faee(0x114)](_0x56faee(0x140)),'explicitProject':_0x4b80e7[_0x56faee(0x114)](_0x56faee(0x12d)),'policy':_0x56faee(0x13b)}));}async function resolveAuthWriteInput(_0x386ee9){const _0x3dc688=a9_0x3fc1;let _0x1ce189=(_0x386ee9[_0x3dc688(0x137)](_0x3dc688(0x131))||_0x386ee9[_0x3dc688(0x137)]('ak')||'')['trim']();const _0x783f40=(_0x386ee9[_0x3dc688(0x137)]('env')||'')['trim']();if(!_0x1ce189&&canPromptForAccessKey(_0x386ee9))try{showAccessKeyCreateHint(),_0x1ce189=await promptAccessKey('');}catch(_0x1f8d23){if(isAbortPrompt(_0x1f8d23))throw CliErrors[_0x3dc688(0x120)]();throw _0x1f8d23;}if(!_0x1ce189)throw CliErrors[_0x3dc688(0x113)](_0x3dc688(0x12e),buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN[_0x3dc688(0x111)](_0x1ce189))throw CliErrors[_0x3dc688(0x113)](_0x3dc688(0x13a)+_0x1ce189+'\x22',_0x3dc688(0x132));if(!_0x783f40)return{'accessKey':_0x1ce189};const _0x5cb2dc=normalizeEnv(_0x783f40);return{'accessKey':_0x1ce189,'env':isDaily(_0x5cb2dc)?'daily':isDev(_0x5cb2dc)?_0x3dc688(0x108):_0x3dc688(0x13c)};}export const authDefinitions=[{'service':a9_0x15a80a(0x10f),'command':a9_0x15a80a(0xeb),'description':a9_0x15a80a(0x124),'risk':a9_0x15a80a(0x104),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'access-key','type':a9_0x15a80a(0x135),'description':'AccessKey\x20(ak_xxx...)'},{'name':'ak','type':a9_0x15a80a(0x135),'description':a9_0x15a80a(0xf4)},{'name':a9_0x15a80a(0x140),'type':a9_0x15a80a(0xf0),'description':a9_0x15a80a(0x138),'default':!![]},{'name':a9_0x15a80a(0x12d),'type':a9_0x15a80a(0xf0),'description':a9_0x15a80a(0x112),'default':![]}],async 'execute'(_0x15ff29){const _0x2ce4b5=a9_0x15a80a;if(_0x15ff29[_0x2ce4b5(0x114)](_0x2ce4b5(0xf8)))throw CliErrors[_0x2ce4b5(0x113)](_0x2ce4b5(0x136),_0x2ce4b5(0x130)+CLI_BIN_NAME+_0x2ce4b5(0xee)+CLI_BIN_NAME+'\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.');const _0x4dd601=(_0x15ff29[_0x2ce4b5(0x137)](_0x2ce4b5(0x131))||_0x15ff29[_0x2ce4b5(0x137)]('ak')||'')[_0x2ce4b5(0x139)]();if(!_0x4dd601&&_0x15ff29[_0x2ce4b5(0x13d)])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x50f889=await resolveAuthWriteInput(_0x15ff29),_0x5ad57d=resolveAuthScopeFlags(_0x15ff29),_0x48fc74=readScopedConfig(_0x5ad57d);_0x48fc74['accessKey']=_0x50f889[_0x2ce4b5(0x141)];_0x50f889[_0x2ce4b5(0xfd)]&&(_0x48fc74['env']=_0x50f889[_0x2ce4b5(0xfd)]);writeScopedConfig(_0x48fc74,_0x5ad57d);const _0xc5b088=_0x5ad57d[_0x2ce4b5(0x140)]?_0x2ce4b5(0x140):'project',_0x48340f=_0x48fc74[_0x2ce4b5(0xfd)]?_0x2ce4b5(0xf7)+_0x48fc74[_0x2ce4b5(0xfd)]+'.':'';return{'ok':!![],'message':'AccessKey\x20saved\x20to\x20'+_0xc5b088+_0x2ce4b5(0xfb)+_0x48340f+_0x2ce4b5(0x107)+CLI_BIN_NAME+_0x2ce4b5(0x119)};}},{'service':a9_0x15a80a(0x10f),'command':a9_0x15a80a(0x10d),'description':a9_0x15a80a(0x11a),'risk':a9_0x15a80a(0x104),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'access-key','type':a9_0x15a80a(0x135),'description':'AccessKey\x20(ak_xxx...)'},{'name':'ak','type':'string','description':a9_0x15a80a(0xf4)},{'name':a9_0x15a80a(0xfd),'type':a9_0x15a80a(0x135),'description':a9_0x15a80a(0x11e)},{'name':'global','type':a9_0x15a80a(0xf0),'description':a9_0x15a80a(0x138),'default':!![]},{'name':a9_0x15a80a(0x12d),'type':a9_0x15a80a(0xf0),'description':a9_0x15a80a(0x112),'default':![]}],async 'execute'(_0x39a1b3){const _0x3d031c=a9_0x15a80a,_0x458694=await resolveAuthWriteInput(_0x39a1b3),_0x5f329d=resolveAuthScopeFlags(_0x39a1b3),_0x5d0cc3={'accessKey':_0x458694['accessKey']};_0x458694[_0x3d031c(0xfd)]&&(_0x5d0cc3[_0x3d031c(0xfd)]=_0x458694[_0x3d031c(0xfd)]);writeScopedConfig(_0x5d0cc3,_0x5f329d);const _0x3dd150=_0x5f329d[_0x3d031c(0x140)]?_0x3d031c(0x140):_0x3d031c(0x12d),_0x5e9b98=_0x5d0cc3['env']?_0x3d031c(0xf7)+_0x5d0cc3[_0x3d031c(0xfd)]+'.':'';return{'ok':!![],'message':_0x3d031c(0x106)+_0x3dd150+_0x3d031c(0x110)+_0x5e9b98+'\x20Verify:\x20'+CLI_BIN_NAME+_0x3d031c(0x119)};}},{'service':a9_0x15a80a(0x10f),'command':a9_0x15a80a(0xfc),'description':a9_0x15a80a(0xec),'risk':a9_0x15a80a(0x104),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a9_0x15a80a(0x140),'type':a9_0x15a80a(0xf0),'description':'Clear\x20from\x20global\x20config\x20(default)','default':!![]},{'name':'project','type':'boolean','description':'Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x56ec6a){const _0x470c2f=a9_0x15a80a,_0x4014c7=resolveAuthScopeFlags(_0x56ec6a),_0x16576d=readScopedConfig(_0x4014c7),_0x1e043d=!!_0x16576d['accessKey'];delete _0x16576d[_0x470c2f(0x141)],writeScopedConfig(_0x16576d,_0x4014c7);const _0x2396b0=_0x4014c7[_0x470c2f(0x140)]?_0x470c2f(0x140):_0x470c2f(0x12d);if(_0x1e043d)return{'ok':!![],'message':_0x470c2f(0x11d)+_0x2396b0+_0x470c2f(0xfb)};return{'ok':!![],'message':_0x470c2f(0x101)+_0x2396b0+'\x20config.\x20Nothing\x20to\x20clear.'};}},{'service':a9_0x15a80a(0x10f),'command':a9_0x15a80a(0x12c),'description':a9_0x15a80a(0x123),'risk':a9_0x15a80a(0x126),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'global','type':a9_0x15a80a(0xf0),'description':a9_0x15a80a(0x125),'default':!![]},{'name':a9_0x15a80a(0x12d),'type':a9_0x15a80a(0xf0),'description':a9_0x15a80a(0x10a),'default':![]}],async 'execute'(_0x34ed53){const _0x4fe425=a9_0x15a80a,_0x20e901=resolveAuthScopeFlags(_0x34ed53),_0x3f1445=readScopedConfig(_0x20e901),_0x2b4e2f=productEnvName(_0x4fe425(0xf1)),_0x1e82cb=productEnv('ACCESS_KEY')||undefined,_0x2d819b=_0x3f1445[_0x4fe425(0x141)]||undefined,_0x571ffd=_0x1e82cb||_0x2d819b,_0x4abc30=_0x1e82cb?_0x2b4e2f+_0x4fe425(0x12f):_0x2d819b?(_0x20e901[_0x4fe425(0x140)]?_0x4fe425(0x140):_0x4fe425(0x12d))+_0x4fe425(0xf5):null,_0x138f25=[_0x4fe425(0x11b)+AUTH_MODE[_0x4fe425(0x109)]];if(_0x571ffd){const _0x4acfe5=_0x571ffd[_0x4fe425(0x105)]>0x8?''+_0x571ffd[_0x4fe425(0x13e)](0x0,0x8)+'*'['repeat'](_0x571ffd[_0x4fe425(0x105)]-0x8):_0x571ffd;_0x138f25[_0x4fe425(0xef)](_0x4fe425(0x12b)+_0x4acfe5+(_0x4abc30?_0x4fe425(0x133)+_0x4abc30+')':''));}return!_0x571ffd&&(_0x138f25[_0x4fe425(0xef)](''),_0x138f25[_0x4fe425(0xef)](_0x4fe425(0xf6)),_0x138f25[_0x4fe425(0xef)](''),_0x138f25[_0x4fe425(0xef)](_0x4fe425(0x115)+CLI_BIN_NAME+_0x4fe425(0xf3)),_0x138f25[_0x4fe425(0xef)](''),_0x138f25[_0x4fe425(0xef)](_0x4fe425(0x10c)+PRODUCT_CONFIG[_0x4fe425(0x10b)]+')'),_0x138f25[_0x4fe425(0xef)](_0x4fe425(0x103)),_0x138f25[_0x4fe425(0xef)](''),_0x138f25[_0x4fe425(0xef)](_0x4fe425(0x122)),_0x138f25[_0x4fe425(0xef)](_0x4fe425(0x13f)+_0x2b4e2f+_0x4fe425(0xfa)),_0x138f25[_0x4fe425(0xef)](''),_0x138f25['push']('Then\x20verify\x20with:\x20'+CLI_BIN_NAME+_0x4fe425(0x119)),_0x138f25[_0x4fe425(0xef)]('If\x20command\x20execution\x20still\x20fails,\x20run:\x20'+CLI_BIN_NAME+'\x20doctor')),{'ok':!![],'message':_0x138f25[_0x4fe425(0x11c)]('\x0a')};}},{'service':'auth','command':'info','description':a9_0x15a80a(0x118),'risk':'read','requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x3b43d7){const _0x2f55e7=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x2f55e7,'meta':{'env':_0x3b43d7['envName']??'production'}}};}}];
@@ -1 +1 @@
1
- function a10_0x1cf6(_0x5af2a3,_0x4fe22f){_0x5af2a3=_0x5af2a3-0x68;const _0x526902=a10_0x5269();let _0x1cf6bb=_0x526902[_0x5af2a3];return _0x1cf6bb;}(function(_0x20123f,_0x90bf3e){const _0x121c82=a10_0x1cf6,_0x5e368a=_0x20123f();while(!![]){try{const _0x499aa0=-parseInt(_0x121c82(0x6c))/0x1+parseInt(_0x121c82(0x78))/0x2*(parseInt(_0x121c82(0x7e))/0x3)+-parseInt(_0x121c82(0x68))/0x4+parseInt(_0x121c82(0x70))/0x5*(-parseInt(_0x121c82(0x6a))/0x6)+parseInt(_0x121c82(0x74))/0x7*(parseInt(_0x121c82(0x6b))/0x8)+parseInt(_0x121c82(0x6f))/0x9*(-parseInt(_0x121c82(0x7d))/0xa)+parseInt(_0x121c82(0x76))/0xb;if(_0x499aa0===_0x90bf3e)break;else _0x5e368a['push'](_0x5e368a['shift']());}catch(_0x2be3ea){_0x5e368a['push'](_0x5e368a['shift']());}}}(a10_0x5269,0xd7a26));import{createInterface}from'node:readline';class AbortPrompt extends Error{constructor(){const _0x4dcc04=a10_0x1cf6;super(_0x4dcc04(0x6e)),this['name']=_0x4dcc04(0x73);}}function a10_0x5269(){const _0x59c1be=['race','):\x20','stdout','AccessKey\x20(paste\x20ak_...):\x20','4470rnzRzO','3xuLVlT','question','967000kWRITc','once','4042974Zlpwsy','1209976goAnBp','5357DqYFQL','removeListener','User\x20aborted\x20prompt','15993kthCiD','5THXpEg','stdin','close','AbortPrompt','14LPszWW','AccessKey\x20(','16211140nOUvJz','SIGINT','1644518hsxNPG'];a10_0x5269=function(){return _0x59c1be;};return a10_0x5269();}function createSafeRl(){const _0x162286=a10_0x1cf6,_0x311eca=createInterface({'input':process[_0x162286(0x71)],'output':process[_0x162286(0x7b)]});let _0x2eaabf;const _0x22bf51=new Promise((_0x33771e,_0x139245)=>{const _0x4b1377=_0x162286;_0x2eaabf=()=>{const _0x573677=a10_0x1cf6;_0x2eaabf&&(_0x311eca[_0x573677(0x6d)]('SIGINT',_0x2eaabf),_0x2eaabf=undefined);try{_0x311eca[_0x573677(0x72)]();}catch{}_0x139245(new AbortPrompt());},_0x311eca[_0x4b1377(0x69)](_0x4b1377(0x77),_0x2eaabf);}),_0xf0a348=()=>{const _0x516ef8=_0x162286;_0x2eaabf&&(_0x311eca[_0x516ef8(0x6d)](_0x516ef8(0x77),_0x2eaabf),_0x2eaabf=undefined);try{_0x311eca[_0x516ef8(0x72)]();}catch{}};return{'rl':_0x311eca,'abortPromise':_0x22bf51,'disposeSuccess':_0xf0a348};}export async function promptAccessKey(_0x34d62d=''){const _0x445c63=a10_0x1cf6,{rl:_0x218810,abortPromise:_0x338a3c,disposeSuccess:_0x35b729}=createSafeRl(),_0x36dcf2=new Promise(_0x27cc46=>{const _0x470826=a10_0x1cf6,_0x2494e5=_0x34d62d?_0x470826(0x75)+_0x34d62d+_0x470826(0x7a):_0x470826(0x7c);_0x218810[_0x470826(0x7f)](_0x2494e5,_0x9ffeef=>{_0x35b729(),_0x27cc46(_0x9ffeef['trim']()||_0x34d62d);});});return Promise[_0x445c63(0x79)]([_0x36dcf2,_0x338a3c]);}export function isAbortPrompt(_0x3ca81f){const _0x2bb2aa=a10_0x1cf6;return _0x3ca81f instanceof Error&&_0x3ca81f['name']===_0x2bb2aa(0x73);}
1
+ function a10_0x1e79(){const _0x30f60a=['name','question','36LsBaxG','stdout','18fssXxv','once','stdin','1328129Pnqvym','1153592qVntQC','SIGINT','334386AjItKy','481875QlSrcz','removeListener','7nMswnf','User\x20aborted\x20prompt','AbortPrompt','10VpCIHl','45978cOKEoZ','close','1633782rRGiGa','race','23872zZdHgc'];a10_0x1e79=function(){return _0x30f60a;};return a10_0x1e79();}(function(_0x5ce7bc,_0x3471de){const _0x2aca18=a10_0x4f45,_0x1cef48=_0x5ce7bc();while(!![]){try{const _0x5ce4bc=-parseInt(_0x2aca18(0x13d))/0x1*(-parseInt(_0x2aca18(0x138))/0x2)+-parseInt(_0x2aca18(0x14a))/0x3*(parseInt(_0x2aca18(0x13b))/0x4)+parseInt(_0x2aca18(0x144))/0x5+parseInt(_0x2aca18(0x136))/0x6*(parseInt(_0x2aca18(0x146))/0x7)+-parseInt(_0x2aca18(0x141))/0x8+-parseInt(_0x2aca18(0x143))/0x9*(-parseInt(_0x2aca18(0x149))/0xa)+-parseInt(_0x2aca18(0x140))/0xb;if(_0x5ce4bc===_0x3471de)break;else _0x1cef48['push'](_0x1cef48['shift']());}catch(_0x1afdd8){_0x1cef48['push'](_0x1cef48['shift']());}}}(a10_0x1e79,0x352ca));import{createInterface}from'node:readline';class AbortPrompt extends Error{constructor(){const _0x8ebea3=a10_0x4f45;super(_0x8ebea3(0x147)),this[_0x8ebea3(0x139)]=_0x8ebea3(0x148);}}function createSafeRl(){const _0x19e52f=a10_0x4f45,_0x1a5245=createInterface({'input':process[_0x19e52f(0x13f)],'output':process[_0x19e52f(0x13c)]});let _0x2c0ebd;const _0x210d88=new Promise((_0x38674e,_0x4c910b)=>{const _0x8dcdde=_0x19e52f;_0x2c0ebd=()=>{const _0x422bab=a10_0x4f45;_0x2c0ebd&&(_0x1a5245[_0x422bab(0x145)](_0x422bab(0x142),_0x2c0ebd),_0x2c0ebd=undefined);try{_0x1a5245[_0x422bab(0x14b)]();}catch{}_0x4c910b(new AbortPrompt());},_0x1a5245[_0x8dcdde(0x13e)](_0x8dcdde(0x142),_0x2c0ebd);}),_0x84c886=()=>{const _0x10b59a=_0x19e52f;_0x2c0ebd&&(_0x1a5245['removeListener']('SIGINT',_0x2c0ebd),_0x2c0ebd=undefined);try{_0x1a5245[_0x10b59a(0x14b)]();}catch{}};return{'rl':_0x1a5245,'abortPromise':_0x210d88,'disposeSuccess':_0x84c886};}export async function promptAccessKey(_0xc9095=''){const _0x548cc4=a10_0x4f45,{rl:_0x3f2786,abortPromise:_0x464ea5,disposeSuccess:_0x3ac2b4}=createSafeRl(),_0x5edebb=new Promise(_0x249018=>{const _0x530b82=a10_0x4f45,_0x2af1ba=_0xc9095?'AccessKey\x20('+_0xc9095+'):\x20':'AccessKey\x20(paste\x20ak_...):\x20';_0x3f2786[_0x530b82(0x13a)](_0x2af1ba,_0x11bcee=>{_0x3ac2b4(),_0x249018(_0x11bcee['trim']()||_0xc9095);});});return Promise[_0x548cc4(0x137)]([_0x5edebb,_0x464ea5]);}function a10_0x4f45(_0x1d5d15,_0x573720){_0x1d5d15=_0x1d5d15-0x136;const _0x1e791b=a10_0x1e79();let _0x4f45a4=_0x1e791b[_0x1d5d15];return _0x4f45a4;}export function isAbortPrompt(_0x168d7c){const _0x1c620d=a10_0x4f45;return _0x168d7c instanceof Error&&_0x168d7c[_0x1c620d(0x139)]===_0x1c620d(0x148);}
@@ -1 +1 @@
1
- const a11_0xb447d5=a11_0x10f6;(function(_0x21eefa,_0x5329c5){const _0x286371=a11_0x10f6,_0x494885=_0x21eefa();while(!![]){try{const _0xec0081=-parseInt(_0x286371(0xc0))/0x1*(-parseInt(_0x286371(0xc5))/0x2)+-parseInt(_0x286371(0xcd))/0x3+parseInt(_0x286371(0xc7))/0x4+-parseInt(_0x286371(0xc3))/0x5+parseInt(_0x286371(0xbf))/0x6*(-parseInt(_0x286371(0xca))/0x7)+-parseInt(_0x286371(0xd4))/0x8*(-parseInt(_0x286371(0xce))/0x9)+-parseInt(_0x286371(0xd3))/0xa*(-parseInt(_0x286371(0xc9))/0xb);if(_0xec0081===_0x5329c5)break;else _0x494885['push'](_0x494885['shift']());}catch(_0x41f8e1){_0x494885['push'](_0x494885['shift']());}}}(a11_0x50f7,0x7ab4b));function a11_0x50f7(){const _0x119e49=['2250450Dmfjny','31446BdVkxj','description','updatedTime','appCode','read','10yDYIye','152SMnGSg','5526RHLSxx','37473REshdL','Script\x20ID','bool','2248530epijdy','bff','24SvWtYe','(none)','1090064wzFKqf','detail','11298804kcgEll','861dgNcgS','Get\x20BFF\x20script\x20details\x20by\x20ID','createdTime'];a11_0x50f7=function(){return _0x119e49;};return a11_0x50f7();}import{getBffScriptInfo}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';function a11_0x10f6(_0x2363c4,_0x542132){_0x2363c4=_0x2363c4-0xbf;const _0x50f74a=a11_0x50f7();let _0x10f691=_0x50f74a[_0x2363c4];return _0x10f691;}export const bffDetail={'service':a11_0xb447d5(0xc4),'command':a11_0xb447d5(0xc8),'description':a11_0xb447d5(0xcb),'risk':a11_0xb447d5(0xd2),'flags':[{...ID_FLAG,'description':a11_0xb447d5(0xc1)},VERBOSE_FLAG],async 'execute'(_0xce27c7){const _0x43a458=a11_0xb447d5,_0xe9ea66=await getBffScriptInfo(_0xce27c7['num']('id')),_0x4f76b5=_0xce27c7[_0x43a458(0xc2)]('verbose');if(_0x4f76b5)return{'ok':!![],'data':_0xe9ea66};return{'ok':!![],'data':{'id':_0xe9ea66['id'],'appCode':_0xe9ea66[_0x43a458(0xd1)],'functionName':_0xe9ea66['functionName']??'','scriptType':_0xe9ea66['scriptType'],'description':_0xe9ea66[_0x43a458(0xcf)]||_0x43a458(0xc6),'createdTime':_0xe9ea66[_0x43a458(0xcc)]??'','updatedTime':_0xe9ea66[_0x43a458(0xd0)]??''}};}};
1
+ const a11_0x41ebb8=a11_0x46a2;(function(_0x42f8b0,_0x474378){const _0x46404=a11_0x46a2,_0x57c70b=_0x42f8b0();while(!![]){try{const _0x27bfdb=-parseInt(_0x46404(0x18f))/0x1*(parseInt(_0x46404(0x184))/0x2)+-parseInt(_0x46404(0x187))/0x3+-parseInt(_0x46404(0x193))/0x4+-parseInt(_0x46404(0x18d))/0x5+-parseInt(_0x46404(0x188))/0x6*(parseInt(_0x46404(0x194))/0x7)+-parseInt(_0x46404(0x192))/0x8*(-parseInt(_0x46404(0x180))/0x9)+parseInt(_0x46404(0x18b))/0xa*(parseInt(_0x46404(0x17e))/0xb);if(_0x27bfdb===_0x474378)break;else _0x57c70b['push'](_0x57c70b['shift']());}catch(_0x45852c){_0x57c70b['push'](_0x57c70b['shift']());}}}(a11_0x5057,0x66474));function a11_0x46a2(_0x160ee6,_0x3e912c){_0x160ee6=_0x160ee6-0x17e;const _0x50572d=a11_0x5057();let _0x46a273=_0x50572d[_0x160ee6];return _0x46a273;}import{getBffScriptInfo}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';export const bffDetail={'service':a11_0x41ebb8(0x185),'command':a11_0x41ebb8(0x189),'description':a11_0x41ebb8(0x18c),'risk':'read','flags':[{...ID_FLAG,'description':'Script\x20ID'},VERBOSE_FLAG],async 'execute'(_0x533896){const _0x2e7bf3=a11_0x41ebb8,_0xfb0fab=await getBffScriptInfo(_0x533896[_0x2e7bf3(0x190)]('id')),_0x45405b=_0x533896[_0x2e7bf3(0x186)](_0x2e7bf3(0x182));if(_0x45405b)return{'ok':!![],'data':_0xfb0fab};return{'ok':!![],'data':{'id':_0xfb0fab['id'],'appCode':_0xfb0fab[_0x2e7bf3(0x181)],'functionName':_0xfb0fab['functionName']??'','scriptType':_0xfb0fab[_0x2e7bf3(0x17f)],'description':_0xfb0fab[_0x2e7bf3(0x18e)]||_0x2e7bf3(0x191),'createdTime':_0xfb0fab[_0x2e7bf3(0x18a)]??'','updatedTime':_0xfb0fab[_0x2e7bf3(0x183)]??''}};}};function a11_0x5057(){const _0x5e3f2a=['bool','1992348einXyL','2160JtftXT','detail','createdTime','1672610iUXjBL','Get\x20BFF\x20script\x20details\x20by\x20ID','2861765QoHhCB','description','247aeiXKB','num','(none)','17560XUrDrW','1002764KTmvml','126QqjGxC','176acRqqL','scriptType','279uICnnv','appCode','verbose','updatedTime','6734GzfhAO','bff'];a11_0x5057=function(){return _0x5e3f2a;};return a11_0x5057();}
@@ -1 +1 @@
1
- const a12_0x413039=a12_0x496d;function a12_0x496d(_0x545d02,_0x2d57fe){_0x545d02=_0x545d02-0x185;const _0x497819=a12_0x4978();let _0x496df5=_0x497819[_0x545d02];return _0x496df5;}(function(_0x5ca6e4,_0x44ee31){const _0x33e0e1=a12_0x496d,_0xb1005d=_0x5ca6e4();while(!![]){try{const _0x128ceb=parseInt(_0x33e0e1(0x196))/0x1+-parseInt(_0x33e0e1(0x18f))/0x2+-parseInt(_0x33e0e1(0x195))/0x3*(parseInt(_0x33e0e1(0x191))/0x4)+parseInt(_0x33e0e1(0x18e))/0x5*(-parseInt(_0x33e0e1(0x197))/0x6)+-parseInt(_0x33e0e1(0x18c))/0x7+-parseInt(_0x33e0e1(0x190))/0x8*(parseInt(_0x33e0e1(0x18d))/0x9)+parseInt(_0x33e0e1(0x185))/0xa*(parseInt(_0x33e0e1(0x194))/0xb);if(_0x128ceb===_0x44ee31)break;else _0xb1005d['push'](_0xb1005d['shift']());}catch(_0x4477c1){_0xb1005d['push'](_0xb1005d['shift']());}}}(a12_0x4978,0x4044e));import{executeSdkBff}from'../../core/sdk-client.js';import{parseJsonParams}from'../../utils/params.js';import{NAME_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';export const bffExec={'service':a12_0x413039(0x187),'command':a12_0x413039(0x193),'description':a12_0x413039(0x186),'risk':'read','flags':[{...NAME_FLAG,'required':!![],'description':a12_0x413039(0x18a)},PARAMS_FLAG],async 'execute'(_0x5d67b8){const _0xa83af=a12_0x413039,_0x466252=parseJsonParams(_0x5d67b8[_0xa83af(0x18b)]('params')),_0x3c57c6=Date[_0xa83af(0x189)](),_0x33ee9b=await executeSdkBff(_0x5d67b8[_0xa83af(0x18b)](_0xa83af(0x188)),_0x466252),_0x21bd61=Date['now']()-_0x3c57c6;return{'ok':!![],'data':{'result':_0x33ee9b,'elapsed':_0x21bd61},'message':_0xa83af(0x192)+_0x21bd61+'ms'};}};function a12_0x4978(){const _0x320641=['1056678RijPzE','10KVHqsf','Execute\x20a\x20BFF\x20script\x20by\x20function\x20name','bff','name','now','BFF\x20function\x20name\x20to\x20execute','str','1138809yPepEG','9nODqBw','10HIqzfH','877944zpxGQg','3540512RlmLdy','44lmaCdK','BFF\x20executed\x20in\x20','exec','19216681fhSwEu','24333kgCzju','1945ssMmoH'];a12_0x4978=function(){return _0x320641;};return a12_0x4978();}
1
+ function a12_0x47bd(){const _0x2d2039=['528130NJpnhh','101511EaejvS','2425360zIortH','now','name','303635vVHoMb','params','str','BFF\x20executed\x20in\x20','46OlTgOu','30iTtjUz','bff','6186141NNdGJB','3919818BEWbtG','read','3504824MxEkkH'];a12_0x47bd=function(){return _0x2d2039;};return a12_0x47bd();}const a12_0x2aaf28=a12_0x5bbd;(function(_0x2a5dd6,_0x923973){const _0x51dd3d=a12_0x5bbd,_0x1e7cc9=_0x2a5dd6();while(!![]){try{const _0x3436bf=-parseInt(_0x51dd3d(0x1b8))/0x1+-parseInt(_0x51dd3d(0x1bc))/0x2*(parseInt(_0x51dd3d(0x1b4))/0x3)+parseInt(_0x51dd3d(0x1c2))/0x4+parseInt(_0x51dd3d(0x1b3))/0x5*(parseInt(_0x51dd3d(0x1bd))/0x6)+parseInt(_0x51dd3d(0x1c0))/0x7+parseInt(_0x51dd3d(0x1b5))/0x8+-parseInt(_0x51dd3d(0x1bf))/0x9;if(_0x3436bf===_0x923973)break;else _0x1e7cc9['push'](_0x1e7cc9['shift']());}catch(_0x4c41de){_0x1e7cc9['push'](_0x1e7cc9['shift']());}}}(a12_0x47bd,0x79a45));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_0x5bbd(_0x49448f,_0x566460){_0x49448f=_0x49448f-0x1b3;const _0x47bd09=a12_0x47bd();let _0x5bbd76=_0x47bd09[_0x49448f];return _0x5bbd76;}export const bffExec={'service':a12_0x2aaf28(0x1be),'command':'exec','description':'Execute\x20a\x20BFF\x20script\x20by\x20function\x20name','risk':a12_0x2aaf28(0x1c1),'flags':[{...NAME_FLAG,'required':!![],'description':'BFF\x20function\x20name\x20to\x20execute'},PARAMS_FLAG],async 'execute'(_0x37bf3a){const _0xedf7ff=a12_0x2aaf28,_0x40c449=parseJsonParams(_0x37bf3a['str'](_0xedf7ff(0x1b9))),_0x5f0aad=Date[_0xedf7ff(0x1b6)](),_0xac218d=await executeSdkBff(_0x37bf3a[_0xedf7ff(0x1ba)](_0xedf7ff(0x1b7)),_0x40c449),_0x2c32ce=Date[_0xedf7ff(0x1b6)]()-_0x5f0aad;return{'ok':!![],'data':{'result':_0xac218d,'elapsed':_0x2c32ce},'message':_0xedf7ff(0x1bb)+_0x2c32ce+'ms'};}};
@@ -1 +1 @@
1
- function a13_0x8655(_0x4a148d,_0x2f737a){_0x4a148d=_0x4a148d-0x6e;const _0x4f9202=a13_0x4f92();let _0x86555c=_0x4f9202[_0x4a148d];return _0x86555c;}function a13_0x4f92(){const _0x88014a=['653766zaZxEf','6839693pcHPix','838625AknfuZ','128lppHlK','1709878iSwsKq','43167gZSOGY','11961144ttHxGu','5163765SlchGy'];a13_0x4f92=function(){return _0x88014a;};return a13_0x4f92();}(function(_0x461a38,_0x525cb1){const _0x2ec372=a13_0x8655,_0x46ff68=_0x461a38();while(!![]){try{const _0x7e14fa=parseInt(_0x2ec372(0x75))/0x1+parseInt(_0x2ec372(0x6f))/0x2+-parseInt(_0x2ec372(0x70))/0x3*(-parseInt(_0x2ec372(0x6e))/0x4)+parseInt(_0x2ec372(0x72))/0x5+-parseInt(_0x2ec372(0x73))/0x6+-parseInt(_0x2ec372(0x74))/0x7+-parseInt(_0x2ec372(0x71))/0x8;if(_0x7e14fa===_0x525cb1)break;else _0x46ff68['push'](_0x46ff68['shift']());}catch(_0x564af6){_0x46ff68['push'](_0x46ff68['shift']());}}}(a13_0x4f92,0x93d7a));import{bffDetail}from'../../commands/bff/detail.js';import{bffExec}from'../../commands/bff/exec.js';export const bffDefinitions=[bffDetail,bffExec];
1
+ (function(_0x51cf1b,_0x4ee372){const _0x1074b8=a13_0x3d28,_0x178bdb=_0x51cf1b();while(!![]){try{const _0x145495=parseInt(_0x1074b8(0x8e))/0x1*(-parseInt(_0x1074b8(0x94))/0x2)+-parseInt(_0x1074b8(0x8f))/0x3*(parseInt(_0x1074b8(0x96))/0x4)+-parseInt(_0x1074b8(0x8d))/0x5*(parseInt(_0x1074b8(0x97))/0x6)+parseInt(_0x1074b8(0x91))/0x7*(-parseInt(_0x1074b8(0x90))/0x8)+parseInt(_0x1074b8(0x95))/0x9*(-parseInt(_0x1074b8(0x8c))/0xa)+-parseInt(_0x1074b8(0x93))/0xb+parseInt(_0x1074b8(0x92))/0xc;if(_0x145495===_0x4ee372)break;else _0x178bdb['push'](_0x178bdb['shift']());}catch(_0x25895f){_0x178bdb['push'](_0x178bdb['shift']());}}}(a13_0x2af9,0x6697c));import{bffDetail}from'../../commands/bff/detail.js';import{bffExec}from'../../commands/bff/exec.js';function a13_0x3d28(_0x4b8768,_0x3b6495){_0x4b8768=_0x4b8768-0x8c;const _0x2af985=a13_0x2af9();let _0x3d28d6=_0x2af985[_0x4b8768];return _0x3d28d6;}function a13_0x2af9(){const _0xe18a35=['2XcMUEw','9zAgXGK','4Dbcxzp','2882562vsagkS','2819360LMCEsA','5OXSDXY','302015PsrKWe','1164969DBSFsD','3677816LIKRFb','7RSiJww','30084984mnWlwx','1918774gwBXjc'];a13_0x2af9=function(){return _0xe18a35;};return a13_0x2af9();}export const bffDefinitions=[bffDetail,bffExec];
@@ -1 +1 @@
1
- const a14_0x2e0b8a=a14_0x10a5;function a14_0x10a5(_0x366a5b,_0x3de6fd){_0x366a5b=_0x366a5b-0xd2;const _0x4e1a21=a14_0x4e1a();let _0x10a5d0=_0x4e1a21[_0x366a5b];return _0x10a5d0;}function a14_0x4e1a(){const _0x3a5b29=['cli-skill-install','115932LxKxoe','4yylAqA','setLogPath','inherit','388592OPNTuA','1514949kZjPmU','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20(npx\x20skills\x20add\x20','install','32kiyBJi','info','write','Install\x20the\x20CLI\x20Built-in\x20Skill\x20required\x20by\x20Lovrabet\x20runtime','4893084vPWoQA','59784xjNzaL','11Nuwrfe','109895bZabaT','pipe','log','Skipped\x20npx\x20(','cwd','117aBWdFT','npx\x20skills\x20add\x20failed:\x20','Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20npx\x20skills\x20add\x20','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.','skipped','../../skills/npx-skills-add.js','\x20-g\x20-y','7284230troByV','unknown','apiError','cli-skill'];a14_0x4e1a=function(){return _0x3a5b29;};return a14_0x4e1a();}(function(_0x1baac6,_0x11b59d){const _0x538e38=a14_0x10a5,_0x36cf83=_0x1baac6();while(!![]){try{const _0x201f15=parseInt(_0x538e38(0xd5))/0x1*(parseInt(_0x538e38(0xd8))/0x2)+-parseInt(_0x538e38(0xd9))/0x3+parseInt(_0x538e38(0xdc))/0x4*(parseInt(_0x538e38(0xe3))/0x5)+parseInt(_0x538e38(0xd4))/0x6+-parseInt(_0x538e38(0xe0))/0x7+-parseInt(_0x538e38(0xe1))/0x8*(parseInt(_0x538e38(0xe8))/0x9)+-parseInt(_0x538e38(0xef))/0xa*(-parseInt(_0x538e38(0xe2))/0xb);if(_0x201f15===_0x11b59d)break;else _0x36cf83['push'](_0x36cf83['shift']());}catch(_0x56524f){_0x36cf83['push'](_0x36cf83['shift']());}}}(a14_0x4e1a,0x61901));import{CliErrors}from'../../errors.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a14_0x2e0b8a(0xd2),'command':a14_0x2e0b8a(0xdb),'description':a14_0x2e0b8a(0xdf),'risk':a14_0x2e0b8a(0xde),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0xe7aa37){const _0x5e2932=a14_0x2e0b8a;logger[_0x5e2932(0xd6)](process[_0x5e2932(0xe7)]()),logger[_0x5e2932(0xdd)](_0x5e2932(0xd3),_0x5e2932(0xeb));const {LOVRABET_SKILL_SOURCE:_0x36ccbc,LOVRABET_SKIP_NPX_SKILLS_ENV:_0x2a73d4,runNpxSkillsAddGlobal:_0x535210}=await import(_0x5e2932(0xed)),_0x4e72a8=_0xe7aa37['nonInteractive']?_0x5e2932(0xe4):_0x5e2932(0xd7);console[_0x5e2932(0xe5)](_0x5e2932(0xda)+_0x36ccbc+'\x20-g\x20-y)...');const _0x32b813=_0x535210(process[_0x5e2932(0xe7)](),_0x36ccbc,{'stdio':_0x4e72a8});if(_0x32b813[_0x5e2932(0xec)])console[_0x5e2932(0xe5)](_0x5e2932(0xe6)+_0x2a73d4+'=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.');else{if(_0x32b813['ok'])console[_0x5e2932(0xe5)]('CLI\x20Built-in\x20Skill\x20installed');else throw CliErrors[_0x5e2932(0xf1)](_0x5e2932(0xe9)+(_0x32b813['error']||_0x5e2932(0xf0)),_0x5e2932(0xea)+_0x36ccbc+_0x5e2932(0xee));}return{'ok':!![]};}}];
1
+ const a14_0x12d173=a14_0x2e00;function a14_0x2e00(_0x51586c,_0x45e232){_0x51586c=_0x51586c-0x192;const _0xaef444=a14_0xaef4();let _0x2e0083=_0xaef444[_0x51586c];return _0x2e0083;}(function(_0x144dda,_0x1ab48f){const _0x5ec035=a14_0x2e00,_0x298bac=_0x144dda();while(!![]){try{const _0x48c4e9=-parseInt(_0x5ec035(0x1aa))/0x1+-parseInt(_0x5ec035(0x19e))/0x2+parseInt(_0x5ec035(0x1a5))/0x3*(parseInt(_0x5ec035(0x19d))/0x4)+parseInt(_0x5ec035(0x196))/0x5+-parseInt(_0x5ec035(0x193))/0x6*(parseInt(_0x5ec035(0x1b0))/0x7)+parseInt(_0x5ec035(0x1a9))/0x8*(parseInt(_0x5ec035(0x1a8))/0x9)+-parseInt(_0x5ec035(0x1a3))/0xa*(-parseInt(_0x5ec035(0x1ae))/0xb);if(_0x48c4e9===_0x1ab48f)break;else _0x298bac['push'](_0x298bac['shift']());}catch(_0x4bddc2){_0x298bac['push'](_0x298bac['shift']());}}}(a14_0xaef4,0xe70d8));function a14_0xaef4(){const _0x40cc59=['skipped','cli-skill','5108lQCWXf','2076048sfJfJM','cli-skill-install','CLI\x20Built-in\x20Skill\x20installed','error','nonInteractive','270XavarF','unknown','3693VJXRZb','../../skills/npx-skills-add.js','log','350505dVGRBO','136lnddIp','1000452zmqFIB','inherit','\x20-g\x20-y)...','Skipped\x20npx\x20(','525767DbcPRH','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.','7mnLVeK','apiError','=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.','9581646yXsKDL','cwd','pipe','5286190AqBJAr','install','info','npx\x20skills\x20add\x20failed:\x20','Install\x20the\x20CLI\x20Built-in\x20Skill\x20required\x20by\x20Lovrabet\x20runtime'];a14_0xaef4=function(){return _0x40cc59;};return a14_0xaef4();}import{CliErrors}from'../../errors.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a14_0x12d173(0x19c),'command':a14_0x12d173(0x197),'description':a14_0x12d173(0x19a),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x588113){const _0x3baaaf=a14_0x12d173;logger['setLogPath'](process[_0x3baaaf(0x194)]()),logger[_0x3baaaf(0x198)](_0x3baaaf(0x19f),_0x3baaaf(0x1af));const {LOVRABET_SKILL_SOURCE:_0x5ee644,LOVRABET_SKIP_NPX_SKILLS_ENV:_0x1bddf3,runNpxSkillsAddGlobal:_0x235548}=await import(_0x3baaaf(0x1a6)),_0x101684=_0x588113[_0x3baaaf(0x1a2)]?_0x3baaaf(0x195):_0x3baaaf(0x1ab);console[_0x3baaaf(0x1a7)]('Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20(npx\x20skills\x20add\x20'+_0x5ee644+_0x3baaaf(0x1ac));const _0x394944=_0x235548(process['cwd'](),_0x5ee644,{'stdio':_0x101684});if(_0x394944[_0x3baaaf(0x19b)])console[_0x3baaaf(0x1a7)](_0x3baaaf(0x1ad)+_0x1bddf3+_0x3baaaf(0x192));else{if(_0x394944['ok'])console[_0x3baaaf(0x1a7)](_0x3baaaf(0x1a0));else throw CliErrors[_0x3baaaf(0x1b1)](_0x3baaaf(0x199)+(_0x394944[_0x3baaaf(0x1a1)]||_0x3baaaf(0x1a4)),'Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20npx\x20skills\x20add\x20'+_0x5ee644+'\x20-g\x20-y');}return{'ok':!![]};}}];