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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (166) 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/app-config/get.js +1 -1
  10. package/lib/commands/app-config/index.js +1 -1
  11. package/lib/commands/artifact/index.js +1 -1
  12. package/lib/commands/auth/device.js +1 -1
  13. package/lib/commands/auth/index.js +1 -1
  14. package/lib/commands/auth/prompt.js +1 -1
  15. package/lib/commands/bff/detail.js +1 -1
  16. package/lib/commands/bff/exec.js +1 -1
  17. package/lib/commands/bff/index.js +1 -1
  18. package/lib/commands/cli-skill/index.js +1 -1
  19. package/lib/commands/common/config-policy.js +1 -1
  20. package/lib/commands/common/constraints.js +1 -1
  21. package/lib/commands/common/flags.js +1 -1
  22. package/lib/commands/common/local-file.js +1 -1
  23. package/lib/commands/config/definitions.js +1 -1
  24. package/lib/commands/config/init.js +1 -1
  25. package/lib/commands/config/shared.js +1 -1
  26. package/lib/commands/data/index.js +1 -1
  27. package/lib/commands/dataset/detail.js +1 -1
  28. package/lib/commands/dataset/index.js +1 -1
  29. package/lib/commands/dataset/list.js +1 -1
  30. package/lib/commands/dataset/sdk-doc.js +1 -1
  31. package/lib/commands/doctor.js +1 -1
  32. package/lib/commands/file/index.js +1 -1
  33. package/lib/commands/init.js +1 -1
  34. package/lib/commands/kb/index.js +1 -1
  35. package/lib/commands/logs/index.js +1 -1
  36. package/lib/commands/notification/config-list.js +1 -1
  37. package/lib/commands/notification/index.js +1 -1
  38. package/lib/commands/notification/shared.js +1 -1
  39. package/lib/commands/ocr/index.js +1 -1
  40. package/lib/commands/permit/dataset-get.js +1 -1
  41. package/lib/commands/permit/dataset-set.js +1 -1
  42. package/lib/commands/permit/index.js +1 -1
  43. package/lib/commands/permit/page-get.js +1 -1
  44. package/lib/commands/permit/page-set.js +1 -1
  45. package/lib/commands/permit/role-menus-set.js +1 -1
  46. package/lib/commands/permit/role-menus.js +1 -1
  47. package/lib/commands/permit/shared.js +1 -1
  48. package/lib/commands/personal-bff/index.js +1 -1
  49. package/lib/commands/registry.js +1 -1
  50. package/lib/commands/role/create.js +1 -1
  51. package/lib/commands/role/delete.js +1 -1
  52. package/lib/commands/role/detail.js +1 -1
  53. package/lib/commands/role/index.js +1 -1
  54. package/lib/commands/role/list.js +1 -1
  55. package/lib/commands/role/shared.js +1 -1
  56. package/lib/commands/role/update.js +1 -1
  57. package/lib/commands/role/user-add.js +1 -1
  58. package/lib/commands/role/user-remove.js +1 -1
  59. package/lib/commands/schedule/index.js +1 -1
  60. package/lib/commands/schema.js +1 -1
  61. package/lib/commands/service/dynamic.js +1 -1
  62. package/lib/commands/service/function-name-adapter.js +1 -1
  63. package/lib/commands/service/index.js +1 -1
  64. package/lib/commands/service/registry.js +1 -1
  65. package/lib/commands/skill/commands/create.js +1 -1
  66. package/lib/commands/skill/commands/diagram.js +1 -1
  67. package/lib/commands/skill/commands/install.js +1 -1
  68. package/lib/commands/skill/commands/list.js +1 -1
  69. package/lib/commands/skill/commands/push.js +1 -1
  70. package/lib/commands/skill/commands/validate.js +1 -1
  71. package/lib/commands/skill/diagram.js +1 -1
  72. package/lib/commands/skill/flags.js +1 -1
  73. package/lib/commands/skill/index.js +1 -1
  74. package/lib/commands/skill/manifest-helpers.js +1 -1
  75. package/lib/commands/skill/push-execute.js +1 -1
  76. package/lib/commands/skill/push-flow-helpers.js +1 -1
  77. package/lib/commands/skill/push-retarget.js +1 -1
  78. package/lib/commands/skill/scopes.js +1 -1
  79. package/lib/commands/skill/summary.js +1 -1
  80. package/lib/commands/skill/templates.js +1 -1
  81. package/lib/commands/skill/validate.js +1 -1
  82. package/lib/commands/sql/detail.js +1 -1
  83. package/lib/commands/sql/exec.js +1 -1
  84. package/lib/commands/sql/index.js +1 -1
  85. package/lib/commands/update.js +1 -1
  86. package/lib/commands/user-account/bind.js +1 -1
  87. package/lib/commands/user-account/index.js +1 -1
  88. package/lib/commands/workspace/index.js +1 -1
  89. package/lib/config/domain-config.js +1 -1
  90. package/lib/config/schema.js +1 -1
  91. package/lib/constant/app.js +1 -1
  92. package/lib/constant/auth-mode.js +1 -1
  93. package/lib/constant/cli.js +1 -1
  94. package/lib/constant/defaults.js +1 -1
  95. package/lib/constant/distribution.js +1 -1
  96. package/lib/constant/domain.js +1 -1
  97. package/lib/constant/env.js +1 -1
  98. package/lib/constant/output.js +1 -1
  99. package/lib/constant/product.js +1 -1
  100. package/lib/constant/region.js +1 -1
  101. package/lib/constant/risk.js +1 -1
  102. package/lib/constant/url.js +1 -1
  103. package/lib/context.js +1 -1
  104. package/lib/core/api-client.js +1 -1
  105. package/lib/core/db-resolver.js +1 -1
  106. package/lib/core/kb-search-client.js +1 -1
  107. package/lib/core/sdk-client.js +1 -1
  108. package/lib/errors.js +1 -1
  109. package/lib/framework/build-all-flags.js +1 -1
  110. package/lib/framework/dryrun.js +1 -1
  111. package/lib/framework/flags.js +1 -1
  112. package/lib/framework/help.js +1 -1
  113. package/lib/framework/index.js +1 -1
  114. package/lib/framework/output.js +1 -1
  115. package/lib/framework/preparse.js +1 -1
  116. package/lib/framework/rate-limit.js +1 -1
  117. package/lib/framework/raw-flags.js +1 -1
  118. package/lib/framework/response.js +1 -1
  119. package/lib/framework/runner-confirmation.js +1 -1
  120. package/lib/framework/runner-error.js +1 -1
  121. package/lib/framework/runner.js +1 -1
  122. package/lib/framework/schema-export.js +1 -1
  123. package/lib/framework/service-order.js +1 -1
  124. package/lib/framework/types.js +1 -1
  125. package/lib/generated/build-info.d.ts +4 -4
  126. package/lib/generated/build-info.js +1 -1
  127. package/lib/generated/official-routing.js +1 -1
  128. package/lib/generated/routing-contract.js +1 -1
  129. package/lib/help.js +1 -1
  130. package/lib/postinstall.js +1 -1
  131. package/lib/runtime/confirmation.js +1 -1
  132. package/lib/runtime/event.js +1 -1
  133. package/lib/runtime/index.js +1 -1
  134. package/lib/runtime/queue.js +1 -1
  135. package/lib/runtime/resolve.js +1 -1
  136. package/lib/skills/builtin-skill.js +1 -1
  137. package/lib/skills/npx-skills-add.js +1 -1
  138. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  139. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  140. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  141. package/lib/skills/runtime-skill-sync/install-target.js +1 -1
  142. package/lib/skills/runtime-skill-sync/links.js +1 -1
  143. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  144. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  145. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  146. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  147. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  148. package/lib/skills/runtime-skill-sync/push.js +1 -1
  149. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  150. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  151. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  152. package/lib/skills/runtime-skill-sync.js +1 -1
  153. package/lib/skills/skill-presence.js +1 -1
  154. package/lib/utils/access-key-redaction.js +1 -1
  155. package/lib/utils/apply-jq-filter.js +1 -1
  156. package/lib/utils/cli-version-check.js +1 -1
  157. package/lib/utils/cli-version-policy.js +1 -1
  158. package/lib/utils/logger.js +1 -1
  159. package/lib/utils/lossless-json.js +1 -1
  160. package/lib/utils/params.js +1 -1
  161. package/lib/utils/update-notice.js +1 -1
  162. package/lib/utils/version.js +1 -1
  163. package/lib/utils/write-cli-side-channel.js +1 -1
  164. package/package.json +1 -1
  165. package/skills/lovrabet/SKILL.md +1 -1
  166. package/skills/lovrabet.manifest.json +3 -3
package/lib/cli.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- (function(_0x2796c0,_0x88714a){const _0x4bfce8=a0_0x125a,_0x282114=_0x2796c0();while(!![]){try{const _0x1ce8e3=parseInt(_0x4bfce8(0xdd))/0x1+parseInt(_0x4bfce8(0xe7))/0x2*(parseInt(_0x4bfce8(0xcb))/0x3)+-parseInt(_0x4bfce8(0xc6))/0x4+parseInt(_0x4bfce8(0xd9))/0x5*(-parseInt(_0x4bfce8(0xd8))/0x6)+parseInt(_0x4bfce8(0xe4))/0x7+-parseInt(_0x4bfce8(0xcd))/0x8+parseInt(_0x4bfce8(0xdc))/0x9;if(_0x1ce8e3===_0x88714a)break;else _0x282114['push'](_0x282114['shift']());}catch(_0x2fc663){_0x282114['push'](_0x282114['shift']());}}}(a0_0x395e,0x2e37b));import{jsx as a0_0x1e8f93}from'react/jsx-runtime';import a0_0x16d4ad 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,resolveRemovedCommand}from'./commands/registry.js';import{generateDynamicServiceHelp,resolveDynamicServiceCommand}from'./commands/service/dynamic.js';import{runCommand,createPipelineEnv}from'./framework/runner.js';import{generateCommandHelp,generateServiceHelp,generateFullHelp}from'./framework/help.js';import{buildMeowFlags}from'./constant/cli.js';import{getCliVersionDisplay}from'./utils/version.js';function a0_0x395e(){const _0x7e151b=['19655bzUBqx','args','input','5163228OqdiYm','168399tLGCpr','name','slice','Error:\x20','Hint:\x20','error','ERR_STREAM_DESTROYED','403354SylduG','write','./framework/preparse.js','3754sAwWIJ','exit','stderr','message','log','defaultCommand','help','code',':\x20--','\x0aCancelled.\x0a','1328024zjpvTM','ERR_USE_AFTER_CLOSE','config','corrected','definition','501SXDess','flatMap','2785096iWhpub','exitCode','cancelled','original','hint','ExitPromptError','flags','unknownCommand','validation','\x20->\x20--','length','372geTFNE'];a0_0x395e=function(){return _0x7e151b;};return a0_0x395e();}const helpText=generateFullHelp(),cli=a0_0x16d4ad(helpText,{'importMeta':import.meta,'flags':buildMeowFlags(),'version':getCliVersionDisplay()});void main()['catch'](handleError);async function main(){try{await run();}catch(_0x425ff8){handleError(_0x425ff8);}}function a0_0x125a(_0x3b8237,_0x452a9c){_0x3b8237=_0x3b8237-0xc2;const _0x395e07=a0_0x395e();let _0x125a56=_0x395e07[_0x3b8237];return _0x125a56;}async function run(){const _0x4c14d9=a0_0x125a;let _0x2be105=cli[_0x4c14d9(0xdb)][0x0],_0x3b4a2e=cli[_0x4c14d9(0xdb)][0x1];const _0x3f25e3=cli['flags'];try{const {correctFlags:_0x76ff67}=await import(_0x4c14d9(0xe6)),_0x3842c0=getAllDefinitions()[_0x4c14d9(0xcc)](_0x2a47cb=>_0x2a47cb['flags']??[]),{flags:_0x1d3fa3,corrections:_0x5a7a9d}=_0x76ff67(_0x3f25e3,_0x3842c0);if(_0x5a7a9d[_0x4c14d9(0xd7)]>0x0){for(const _0x1921bf of _0x5a7a9d){process['stderr'][_0x4c14d9(0xe5)]('[preparse]\x20'+_0x1921bf['handler']+_0x4c14d9(0xc4)+_0x1921bf[_0x4c14d9(0xd0)]+_0x4c14d9(0xd6)+_0x1921bf[_0x4c14d9(0xc9)]+'\x0a');}Object['assign'](_0x3f25e3,_0x1d3fa3);}}catch{}if(!_0x2be105){const {waitUntilExit:_0x234055}=render(a0_0x1e8f93(Help,{}));await _0x234055();return;}const _0x58cc82=resolveRemovedCommand(_0x2be105,_0x3b4a2e);if(_0x58cc82)throw CliErrors[_0x4c14d9(0xd5)](_0x58cc82[_0x4c14d9(0xea)],_0x58cc82[_0x4c14d9(0xd1)]);if(!isKnownService(_0x2be105)){const _0x4af62b=resolveDynamicServiceCommand(cli['input'],_0x3f25e3);if(_0x4af62b){if(_0x3f25e3['help']){console['log'](generateCommandHelp(_0x4af62b[_0x4c14d9(0xca)]));return;}Object['assign'](_0x3f25e3,_0x4af62b[_0x4c14d9(0xd3)]);const _0x4a758d=buildConfigFromFlags(_0x3f25e3);await initGlobalEnvironment(_0x4a758d);const _0x284936=createPipelineEnv(_0x4a758d,_0x3f25e3);_0x284936[_0x4c14d9(0xda)]=_0x4af62b[_0x4c14d9(0xda)],await runCommand(_0x4af62b[_0x4c14d9(0xca)],_0x284936);return;}if(_0x3f25e3[_0x4c14d9(0xc2)]){const _0xd051d3=generateDynamicServiceHelp(_0x2be105);if(_0xd051d3){console[_0x4c14d9(0xeb)](_0xd051d3);return;}}const {waitUntilExit:_0xa042b9}=render(a0_0x1e8f93(Help,{}));await _0xa042b9();return;}const _0x5a4f22=getServiceEntry(_0x2be105);if(!_0x3b4a2e){if(_0x3f25e3[_0x4c14d9(0xc2)]){console[_0x4c14d9(0xeb)](generateServiceHelp(_0x2be105));return;}if(_0x5a4f22[_0x4c14d9(0xec)])_0x3b4a2e=_0x5a4f22[_0x4c14d9(0xec)];else{console[_0x4c14d9(0xeb)](generateServiceHelp(_0x2be105));return;}}const _0xf4f756=findDefinition(_0x2be105,_0x3b4a2e);!_0xf4f756&&(console[_0x4c14d9(0xeb)](generateServiceHelp(_0x2be105)),handleError(CliErrors[_0x4c14d9(0xd4)](_0x2be105+'\x20'+_0x3b4a2e)));if(_0x3f25e3[_0x4c14d9(0xc2)]){console['log'](generateCommandHelp(_0xf4f756));return;}const _0x1b3cd4=buildConfigFromFlags(_0x3f25e3);_0x2be105!==_0x4c14d9(0xc8)&&_0x2be105!=='doctor'&&await initGlobalEnvironment(_0x1b3cd4);const _0x484e57=createPipelineEnv(_0x1b3cd4,_0x3f25e3);_0x484e57[_0x4c14d9(0xda)]=cli[_0x4c14d9(0xdb)][_0x4c14d9(0xdf)](0x2),await runCommand(_0xf4f756,_0x484e57);}function handleError(_0x565e01){const _0x4194f8=a0_0x125a;if(_0x565e01 instanceof CliError){_0x565e01[_0x4194f8(0xc3)]===_0x4194f8(0xcf)&&(process[_0x4194f8(0xe9)][_0x4194f8(0xe5)]('\x0aCancelled.\x0a'),process['exit'](0x0));console[_0x4194f8(0xe2)](_0x4194f8(0xe0)+_0x565e01[_0x4194f8(0xea)]);if(_0x565e01['hint'])console[_0x4194f8(0xe2)](_0x4194f8(0xe1)+_0x565e01[_0x4194f8(0xd1)]);process[_0x4194f8(0xe8)](_0x565e01[_0x4194f8(0xce)]);}isUserCancellation(_0x565e01)&&(process['stderr'][_0x4194f8(0xe5)](_0x4194f8(0xc5)),process[_0x4194f8(0xe8)](0x0)),console[_0x4194f8(0xe2)]('Unexpected\x20error:',_0x565e01),process['exit'](0x1);}function isUserCancellation(_0x1e5557){const _0x42d7de=a0_0x125a;if(!(_0x1e5557 instanceof Error))return![];if(_0x1e5557[_0x42d7de(0xde)]===_0x42d7de(0xd2))return!![];if(_0x1e5557[_0x42d7de(0xc3)]===_0x42d7de(0xc7))return!![];if(_0x1e5557[_0x42d7de(0xc3)]===_0x42d7de(0xe3))return!![];return![];}
2
+ function a0_0x51ed(_0x1bf0ce,_0x11dc33){_0x1bf0ce=_0x1bf0ce-0x136;const _0x653da3=a0_0x653d();let _0x51ed2b=_0x653da3[_0x1bf0ce];return _0x51ed2b;}const a0_0x3446d2=a0_0x51ed;function a0_0x653d(){const _0x58d51d=['input','config','Hint:\x20','validation','definition','exit','unknownCommand','write','defaultCommand','handler','5REZOQM','\x20->\x20--',':\x20--','878572XvnMzr','doctor','log','stderr','380670gKUWyz','\x0aCancelled.\x0a','code','name','help','2703864xULLcY','517153VPtqeT','args','9nDkBcF','Unexpected\x20error:','Error:\x20','assign','./framework/preparse.js','flatMap','message','catch','3875624nXVyoC','21380072EsTlsh','[preparse]\x20','ExitPromptError','hint','3802568beFlxf','original','exitCode','error'];a0_0x653d=function(){return _0x58d51d;};return a0_0x653d();}(function(_0x4422bb,_0x2baeac){const _0x55ede7=a0_0x51ed,_0x39e624=_0x4422bb();while(!![]){try{const _0x5b8586=parseInt(_0x55ede7(0x13d))/0x1+parseInt(_0x55ede7(0x15d))/0x2+parseInt(_0x55ede7(0x13c))/0x3+parseInt(_0x55ede7(0x147))/0x4+-parseInt(_0x55ede7(0x15a))/0x5*(parseInt(_0x55ede7(0x137))/0x6)+parseInt(_0x55ede7(0x14c))/0x7+-parseInt(_0x55ede7(0x148))/0x8*(parseInt(_0x55ede7(0x13f))/0x9);if(_0x5b8586===_0x2baeac)break;else _0x39e624['push'](_0x39e624['shift']());}catch(_0x319f0f){_0x39e624['push'](_0x39e624['shift']());}}}(a0_0x653d,0x9ac2f));import{jsx as a0_0x22e728}from'react/jsx-runtime';import a0_0x2df275 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,resolveRemovedCommand}from'./commands/registry.js';import{generateDynamicServiceHelp,resolveDynamicServiceCommand}from'./commands/service/dynamic.js';import{runCommand,createPipelineEnv}from'./framework/runner.js';import{generateCommandHelp,generateServiceHelp,generateFullHelp}from'./framework/help.js';import{buildMeowFlags}from'./constant/cli.js';import{getCliVersionDisplay}from'./utils/version.js';const helpText=generateFullHelp(),cli=a0_0x2df275(helpText,{'importMeta':import.meta,'flags':buildMeowFlags(),'version':getCliVersionDisplay()});void main()[a0_0x3446d2(0x146)](handleError);async function main(){try{await run();}catch(_0x24a2bd){handleError(_0x24a2bd);}}async function run(){const _0x17ef2c=a0_0x3446d2;let _0x4cd8c8=cli[_0x17ef2c(0x150)][0x0],_0xdcf2=cli[_0x17ef2c(0x150)][0x1];const _0x266b4a=cli['flags'];try{const {correctFlags:_0x53fee9}=await import(_0x17ef2c(0x143)),_0x333982=getAllDefinitions()[_0x17ef2c(0x144)](_0x157ce1=>_0x157ce1['flags']??[]),{flags:_0x227c8b,corrections:_0x213881}=_0x53fee9(_0x266b4a,_0x333982);if(_0x213881['length']>0x0){for(const _0x19d28 of _0x213881){process[_0x17ef2c(0x136)][_0x17ef2c(0x157)](_0x17ef2c(0x149)+_0x19d28[_0x17ef2c(0x159)]+_0x17ef2c(0x15c)+_0x19d28[_0x17ef2c(0x14d)]+_0x17ef2c(0x15b)+_0x19d28['corrected']+'\x0a');}Object[_0x17ef2c(0x142)](_0x266b4a,_0x227c8b);}}catch{}if(!_0x4cd8c8){const {waitUntilExit:_0x34b4a0}=render(a0_0x22e728(Help,{}));await _0x34b4a0();return;}const _0x591373=resolveRemovedCommand(_0x4cd8c8,_0xdcf2);if(_0x591373)throw CliErrors[_0x17ef2c(0x153)](_0x591373[_0x17ef2c(0x145)],_0x591373[_0x17ef2c(0x14b)]);if(!isKnownService(_0x4cd8c8)){const _0x3d6eae=resolveDynamicServiceCommand(cli[_0x17ef2c(0x150)],_0x266b4a);if(_0x3d6eae){if(_0x266b4a[_0x17ef2c(0x13b)]){console['log'](generateCommandHelp(_0x3d6eae[_0x17ef2c(0x154)]));return;}Object[_0x17ef2c(0x142)](_0x266b4a,_0x3d6eae['flags']);const _0x4b9bc0=buildConfigFromFlags(_0x266b4a);await initGlobalEnvironment(_0x4b9bc0);const _0x28025b=createPipelineEnv(_0x4b9bc0,_0x266b4a);_0x28025b['args']=_0x3d6eae[_0x17ef2c(0x13e)],await runCommand(_0x3d6eae[_0x17ef2c(0x154)],_0x28025b);return;}if(_0x266b4a[_0x17ef2c(0x13b)]){const _0x448f33=generateDynamicServiceHelp(_0x4cd8c8);if(_0x448f33){console[_0x17ef2c(0x15f)](_0x448f33);return;}}const {waitUntilExit:_0x362585}=render(a0_0x22e728(Help,{}));await _0x362585();return;}const _0x13b4ad=getServiceEntry(_0x4cd8c8);if(!_0xdcf2){if(_0x266b4a[_0x17ef2c(0x13b)]){console[_0x17ef2c(0x15f)](generateServiceHelp(_0x4cd8c8));return;}if(_0x13b4ad[_0x17ef2c(0x158)])_0xdcf2=_0x13b4ad['defaultCommand'];else{console['log'](generateServiceHelp(_0x4cd8c8));return;}}const _0x8fca8=findDefinition(_0x4cd8c8,_0xdcf2);!_0x8fca8&&(console['log'](generateServiceHelp(_0x4cd8c8)),handleError(CliErrors[_0x17ef2c(0x156)](_0x4cd8c8+'\x20'+_0xdcf2)));if(_0x266b4a['help']){console[_0x17ef2c(0x15f)](generateCommandHelp(_0x8fca8));return;}const _0x2eaa57=buildConfigFromFlags(_0x266b4a);_0x4cd8c8!==_0x17ef2c(0x151)&&_0x4cd8c8!==_0x17ef2c(0x15e)&&await initGlobalEnvironment(_0x2eaa57);const _0x4ec468=createPipelineEnv(_0x2eaa57,_0x266b4a);_0x4ec468[_0x17ef2c(0x13e)]=cli[_0x17ef2c(0x150)]['slice'](0x2),await runCommand(_0x8fca8,_0x4ec468);}function handleError(_0x555124){const _0x116dac=a0_0x3446d2;if(_0x555124 instanceof CliError){_0x555124[_0x116dac(0x139)]==='cancelled'&&(process[_0x116dac(0x136)][_0x116dac(0x157)](_0x116dac(0x138)),process[_0x116dac(0x155)](0x0));console[_0x116dac(0x14f)](_0x116dac(0x141)+_0x555124[_0x116dac(0x145)]);if(_0x555124[_0x116dac(0x14b)])console['error'](_0x116dac(0x152)+_0x555124['hint']);process[_0x116dac(0x155)](_0x555124[_0x116dac(0x14e)]);}isUserCancellation(_0x555124)&&(process[_0x116dac(0x136)][_0x116dac(0x157)](_0x116dac(0x138)),process['exit'](0x0)),console['error'](_0x116dac(0x140),_0x555124),process[_0x116dac(0x155)](0x1);}function isUserCancellation(_0x58dbe1){const _0x2122cd=a0_0x3446d2;if(!(_0x58dbe1 instanceof Error))return![];if(_0x58dbe1[_0x2122cd(0x13a)]===_0x2122cd(0x14a))return!![];if(_0x58dbe1[_0x2122cd(0x139)]==='ERR_USE_AFTER_CLOSE')return!![];if(_0x58dbe1[_0x2122cd(0x139)]==='ERR_STREAM_DESTROYED')return!![];return![];}
@@ -1 +1 @@
1
- const a1_0x406f01=a1_0x1bcc;(function(_0x5b0fe2,_0x3e8290){const _0x345f9b=a1_0x1bcc,_0x30aa45=_0x5b0fe2();while(!![]){try{const _0x3cbfe9=parseInt(_0x345f9b(0x1a7))/0x1*(-parseInt(_0x345f9b(0x187))/0x2)+parseInt(_0x345f9b(0x1ae))/0x3*(parseInt(_0x345f9b(0x18d))/0x4)+-parseInt(_0x345f9b(0x1a0))/0x5*(-parseInt(_0x345f9b(0x17f))/0x6)+-parseInt(_0x345f9b(0x1e7))/0x7+-parseInt(_0x345f9b(0x1c9))/0x8*(parseInt(_0x345f9b(0x1d8))/0x9)+-parseInt(_0x345f9b(0x19e))/0xa*(parseInt(_0x345f9b(0x1d4))/0xb)+parseInt(_0x345f9b(0x1f6))/0xc*(parseInt(_0x345f9b(0x190))/0xd);if(_0x3cbfe9===_0x3e8290)break;else _0x30aa45['push'](_0x30aa45['shift']());}catch(_0x4c6936){_0x30aa45['push'](_0x30aa45['shift']());}}}(a1_0x5c72,0x6fd08));import{CliErrors}from'../../errors.js';function a1_0x1bcc(_0x5be030,_0x3a96ba){_0x5be030=_0x5be030-0x17c;const _0x5c722b=a1_0x5c72();let _0x1bcca9=_0x5c722b[_0x5be030];return _0x1bcca9;}const CATEGORY_FLAG={'name':a1_0x406f01(0x1b5),'type':a1_0x406f01(0x1b1),'description':'Filter\x20docs\x20by\x20category,\x20for\x20example\x20dataset'},KEYWORD_FLAG={'name':'keyword','type':a1_0x406f01(0x1b1),'description':'Search\x20docs\x20by\x20code,\x20summary,\x20path,\x20or\x20usage\x20text'},DOC_CODE_FLAG={'name':'code','type':'string','required':!![],'description':a1_0x406f01(0x1cf)},DOCS=[{'code':a1_0x406f01(0x1db),'category':a1_0x406f01(0x1e1),'title':'List\x20datasets','method':'POST','path':a1_0x406f01(0x1eb),'summary':'List\x20datasets\x20with\x20pagination','whenToUse':a1_0x406f01(0x197),'pathParams':[],'queryParams':[],'bodySchema':'{\x22appCode\x22:\x22app-aa63b188\x22,\x22currentPage\x22:1,\x22pageSize\x22:100}','responseHighlights':['tableData\x20contains\x20dataset\x20id/code/name','paging.totalCount\x20gives\x20total\x20rows'],'examples':['lovrabet\x20dataset\x20list\x20--appcode\x20<appCode>\x20--format\x20compress'],'notes':[a1_0x406f01(0x185)],'markdown':['##\x20List\x20datasets','','Use\x20this\x20API\x20or\x20`lovrabet\x20dataset\x20list`\x20to\x20discover\x20available\x20dataset\x20codes\x20before\x20reading\x20data.'][a1_0x406f01(0x1f8)]('\x0a')},{'code':a1_0x406f01(0x1b7),'category':a1_0x406f01(0x1e1),'title':a1_0x406f01(0x19d),'method':a1_0x406f01(0x1bf),'path':a1_0x406f01(0x1bd),'summary':a1_0x406f01(0x1ce),'whenToUse':a1_0x406f01(0x198),'pathParams':[],'queryParams':[{'name':'code','description':'32-character\x20dataset\x20code'}],'bodySchema':a1_0x406f01(0x1e6),'responseHighlights':['fields/properties\x20describe\x20data\x20shape',a1_0x406f01(0x1ef),a1_0x406f01(0x1e2)],'examples':[a1_0x406f01(0x1f0)],'notes':[a1_0x406f01(0x1c5)],'markdown':[a1_0x406f01(0x1f5),'',a1_0x406f01(0x193)][a1_0x406f01(0x1f8)]('\x0a')},{'code':a1_0x406f01(0x182),'category':a1_0x406f01(0x1e1),'title':'Filter\x20dataset\x20data','method':a1_0x406f01(0x1c0),'path':a1_0x406f01(0x18a),'summary':'Filter\x20dataset\x20records','whenToUse':a1_0x406f01(0x1d7),'pathParams':[{'name':a1_0x406f01(0x1d2),'description':a1_0x406f01(0x1a4)},{'name':a1_0x406f01(0x1ee),'description':a1_0x406f01(0x1a6)}],'queryParams':[],'bodySchema':'{\x22where\x22:{},\x22currentPage\x22:1,\x22pageSize\x22:20}','responseHighlights':[a1_0x406f01(0x1b6),a1_0x406f01(0x1bc)],'examples':[a1_0x406f01(0x1ca),a1_0x406f01(0x1b4)],'notes':['where,\x20select,\x20orderBy,\x20currentPage,\x20and\x20pageSize\x20belong\x20inside\x20one\x20--params\x20JSON\x20object;\x20they\x20are\x20not\x20standalone\x20CLI\x20flags.',a1_0x406f01(0x1ad),a1_0x406f01(0x194),'Use\x20read-only\x20data\x20commands\x20before\x20writing\x20Artifacts\x20that\x20display\x20real\x20data.'],'markdown':[a1_0x406f01(0x1be),'',a1_0x406f01(0x1d5)][a1_0x406f01(0x1f8)]('\x0a')},{'code':a1_0x406f01(0x1c2),'category':'dataset','title':a1_0x406f01(0x1b8),'method':'POST','path':a1_0x406f01(0x1e4),'summary':a1_0x406f01(0x1c8),'whenToUse':a1_0x406f01(0x1d6),'pathParams':[{'name':a1_0x406f01(0x1d2),'description':a1_0x406f01(0x1a4)},{'name':a1_0x406f01(0x1ee),'description':a1_0x406f01(0x1a6)}],'queryParams':[],'bodySchema':a1_0x406f01(0x199),'responseHighlights':[a1_0x406f01(0x17d),'where\x20filters\x20before\x20aggregation'],'examples':['lovrabet\x20data\x20aggregate\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}]}\x27'],'notes':['Use\x20`having`\x20only\x20for\x20post-aggregation\x20filters.',a1_0x406f01(0x1f4)],'markdown':['##\x20Aggregate\x20dataset\x20data','',a1_0x406f01(0x19c)][a1_0x406f01(0x1f8)]('\x0a')},{'code':'dataset_data_get_one','category':a1_0x406f01(0x1e1),'title':a1_0x406f01(0x19f),'method':a1_0x406f01(0x1c0),'path':'/api/{appCode}/{datasetCode}/getOne','summary':'Get\x20one\x20dataset\x20record','whenToUse':a1_0x406f01(0x1dc),'pathParams':[{'name':a1_0x406f01(0x1d2),'description':a1_0x406f01(0x1a4)},{'name':a1_0x406f01(0x1ee),'description':'32-character\x20dataset\x20code'}],'queryParams':[],'bodySchema':a1_0x406f01(0x1e5),'responseHighlights':[a1_0x406f01(0x1e3)],'examples':[a1_0x406f01(0x181)],'notes':[a1_0x406f01(0x1ac)],'markdown':a1_0x406f01(0x184)},{'code':a1_0x406f01(0x1c1),'category':a1_0x406f01(0x1e1),'title':a1_0x406f01(0x1dd),'method':'POST','path':a1_0x406f01(0x1ea),'summary':a1_0x406f01(0x1a9),'whenToUse':a1_0x406f01(0x1cd),'pathParams':[{'name':a1_0x406f01(0x1d2),'description':a1_0x406f01(0x1a4)},{'name':a1_0x406f01(0x1ee),'description':'32-character\x20dataset\x20code'}],'queryParams':[],'bodySchema':'{\x22fieldName\x22:\x22value\x22}','responseHighlights':[a1_0x406f01(0x1d3)],'examples':[a1_0x406f01(0x1b2)],'notes':['This\x20is\x20a\x20write\x20operation;\x20use\x20dry-run\x20when\x20available\x20and\x20safe\x20fixtures\x20for\x20smoke\x20tests.'],'markdown':a1_0x406f01(0x186)},{'code':'bf_detail','category':'bf','title':a1_0x406f01(0x18f),'method':'GET','path':a1_0x406f01(0x1d1),'summary':'Get\x20a\x20BF\x20endpoint\x20contract\x20by\x20app\x20and\x20function\x20name','whenToUse':'Use\x20when\x20the\x20function\x20name\x20is\x20already\x20confirmed\x20and\x20you\x20need\x20that\x20ENDPOINT\x27s\x20runtime\x20metadata','pathParams':[{'name':a1_0x406f01(0x1d2),'description':a1_0x406f01(0x1a4)},{'name':a1_0x406f01(0x1b9),'description':a1_0x406f01(0x1ec)}],'queryParams':[],'bodySchema':'None','responseHighlights':[a1_0x406f01(0x18c)],'examples':[a1_0x406f01(0x1b0)],'notes':[a1_0x406f01(0x1da)],'markdown':a1_0x406f01(0x1ed)},{'code':a1_0x406f01(0x195),'category':'bf','title':a1_0x406f01(0x1a5),'method':a1_0x406f01(0x1c0),'path':'/api/endpoint/{appCode}/{functionName}','summary':a1_0x406f01(0x183),'whenToUse':a1_0x406f01(0x1f1),'pathParams':[{'name':'appCode','description':'Current\x20app\x20code'},{'name':'functionName','description':a1_0x406f01(0x1e9)}],'queryParams':[],'bodySchema':a1_0x406f01(0x1af),'responseHighlights':[a1_0x406f01(0x1bb)],'examples':[a1_0x406f01(0x1e0)],'notes':['Script\x20behavior\x20may\x20have\x20side\x20effects;\x20inspect\x20detail\x20first.'],'markdown':'##\x20Execute\x20BF\x20endpoint\x20function\x0a\x0aExecute\x20a\x20known\x20endpoint\x20script.'},{'code':a1_0x406f01(0x1e8),'category':'bf','title':a1_0x406f01(0x18e),'method':'POST','path':a1_0x406f01(0x19a),'summary':'Execute\x20a\x20Personal\x20Backend\x20Function\x20by\x20script\x20ID','whenToUse':a1_0x406f01(0x196),'pathParams':[{'name':'id','description':a1_0x406f01(0x19b)}],'queryParams':[{'name':a1_0x406f01(0x1d2),'description':a1_0x406f01(0x1a4)}],'bodySchema':'{\x22param\x22:\x22value\x22}','responseHighlights':[a1_0x406f01(0x1bb)],'examples':[a1_0x406f01(0x18b)],'notes':[a1_0x406f01(0x1ba),a1_0x406f01(0x192)],'markdown':[a1_0x406f01(0x189),'','Execute\x20a\x20known\x20Personal\x20Backend\x20Function\x20script\x20through\x20its\x20runtime\x20execute\x20endpoint.']['join']('\x0a')},{'code':a1_0x406f01(0x1cc),'category':'custom_sql','title':a1_0x406f01(0x1ab),'method':a1_0x406f01(0x1c0),'path':a1_0x406f01(0x1c7),'summary':a1_0x406f01(0x1ab),'whenToUse':a1_0x406f01(0x17c),'pathParams':[],'queryParams':[],'bodySchema':a1_0x406f01(0x1cb),'responseHighlights':['Returns\x20SQL\x20execution\x20payload'],'examples':[a1_0x406f01(0x1a3)],'notes':['Use\x20`lovrabet\x20sql\x20detail`\x20before\x20execution.'],'markdown':a1_0x406f01(0x1f3)}];function entrySummary(_0x59f04d){const _0x474964=a1_0x406f01;return{'code':_0x59f04d[_0x474964(0x1a8)],'category':_0x59f04d[_0x474964(0x1b5)],'method':_0x59f04d[_0x474964(0x1df)],'path':_0x59f04d[_0x474964(0x1b3)],'summary':_0x59f04d[_0x474964(0x188)],'whenToUse':_0x59f04d['whenToUse']};}export function listApiDocEntries(_0x471920={}){const _0x2180bb=a1_0x406f01,_0x41a01d=String(_0x471920[_0x2180bb(0x1b5)]||'')['trim'](),_0x11d63e=String(_0x471920[_0x2180bb(0x17e)]||'')[_0x2180bb(0x1a1)]()[_0x2180bb(0x1d0)]();return DOCS['filter'](_0xf382ac=>{const _0x509a55=_0x2180bb;if(_0x41a01d&&_0xf382ac['category']!==_0x41a01d)return![];if(!_0x11d63e)return!![];return[_0xf382ac['code'],_0xf382ac['category'],_0xf382ac[_0x509a55(0x1df)],_0xf382ac['path'],_0xf382ac[_0x509a55(0x188)],_0xf382ac[_0x509a55(0x180)],_0xf382ac[_0x509a55(0x1de)]][_0x509a55(0x1f8)]('\x20')[_0x509a55(0x1d0)]()[_0x509a55(0x1c3)](_0x11d63e);})[_0x2180bb(0x1f7)](entrySummary);}function a1_0x5c72(){const _0x20b06c=['lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22orderBy\x22:[{\x22id\x22:\x22asc\x22}],\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','{\x22appCode\x22:\x22app-aa63b188\x22,\x22sqlCode\x22:\x22xxxxxxxx-xxxxxxxx\x22,\x22params\x22:{}}','custom_sql_execute','Use\x20when\x20you\x20need\x20to\x20insert\x20one\x20business\x20record\x20into\x20a\x20dataset','Get\x20dataset\x20detail','API\x20doc\x20code,\x20for\x20example\x20dataset_list','toLowerCase','/client/bff/endpoint/{appCode}/{functionName}','appCode','Returns\x20the\x20created\x20record\x20or\x20backend\x20operation\x20result','11WASIvr','Use\x20`where`,\x20`select`,\x20`orderBy`,\x20`currentPage`,\x20and\x20`pageSize`\x20to\x20inspect\x20live\x20data\x20shape.','Use\x20when\x20you\x20need\x20groupBy\x20plus\x20count,\x20sum,\x20avg,\x20max,\x20or\x20min\x20aggregates','Use\x20when\x20you\x20need\x20to\x20read\x20business\x20data\x20with\x20where,\x20orderBy,\x20pagination,\x20or\x20similar\x20filters','9TbXvAh','List\x20available\x20runtime\x20API\x20documentation\x20entries','This\x20is\x20an\x20exact\x20lookup\x20by\x20appCode\x20+\x20functionName.\x20The\x20CLI\x20does\x20not\x20enumerate\x20Backend\x20Function\x20definitions\x20or\x20expose\x20platform-only\x20fields.','dataset_list','Use\x20when\x20you\x20already\x20know\x20the\x20record\x20id\x20and\x20need\x20one\x20business\x20row\x20from\x20a\x20dataset','Create\x20dataset\x20record','title','method','lovrabet\x20bff\x20exec\x20--name\x20<functionName>\x20--params\x20\x27{}\x27','dataset','operations\x20describes\x20runtime\x20APIs','Returns\x20one\x20matching\x20business\x20record','/api/{appCode}/{datasetCode}/aggregate','{\x22id\x22:123}','None','3641687IVQEwv','personal_bf_execute','Endpoint\x20function\x20name','/api/{appCode}/{datasetCode}/create','/api/dataset/get-dataset-list-by-app-code','Exact\x20endpoint\x20function\x20name','##\x20Get\x20BF\x20endpoint\x20function\x20contract\x0a\x0aInspect\x20one\x20known\x20endpoint\x20function\x20through\x20the\x20AK-authenticated\x20exact\x20detail\x20API.','datasetCode','relations\x20contains\x20the\x20object-shaped\x20API\x20relations\x20value\x20when\x20returned','lovrabet\x20dataset\x20detail\x20--code\x20<datasetCode>\x20--appcode\x20<appCode>','Use\x20when\x20the\x20target\x20BF\x20functionName\x20is\x20confirmed\x20and\x20you\x20need\x20to\x20call\x20that\x20ENDPOINT','str','##\x20Execute\x20custom\x20SQL\x0a\x0aExecute\x20a\x20configured\x20SQL\x20script\x20by\x20sqlCode.','`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','##\x20Dataset\x20detail','1668jlasqy','map','join','Use\x20when\x20the\x20target\x20sqlCode\x20exists\x20and\x20you\x20need\x20to\x20execute\x20that\x20custom\x20SQL','result\x20rows\x20contain\x20aggregate\x20aliases','keyword','5241918SJGHfi','whenToUse','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27','dataset_data_filter','Execute\x20a\x20BF\x20endpoint\x20function','##\x20Get\x20one\x20dataset\x20record\x0a\x0aRead\x20one\x20record\x20by\x20id.','CLI\x20users\x20should\x20prefer\x20`lovrabet\x20dataset\x20list`\x20for\x20this\x20workflow.','##\x20Create\x20dataset\x20record\x0a\x0aCreate\x20one\x20data\x20record\x20in\x20a\x20dataset.','1490612tnmIxc','summary','##\x20Execute\x20Personal\x20Backend\x20Function','/api/{appCode}/{datasetCode}/filter','lovrabet\x20personal-bff\x20exec\x20--id\x20<id>\x20--params\x20\x27{}\x27','CLI\x20returns\x20appCode/functionName/description/version/gmtModified','8gZABmK','Execute\x20Personal\x20Backend\x20Function','Get\x20BF\x20endpoint\x20function\x20contract','133926PsdhSM','length','Function\x20execution\x20may\x20have\x20business\x20side\x20effects;\x20inspect\x20detail\x20before\x20execution.','Inspect\x20field\x20names,\x20relations,\x20and\x20operation\x20metadata\x20for\x20a\x20known\x20dataset\x20code.','Verify\x20tableData\x20and\x20paging\x20before\x20treating\x20the\x20response\x20as\x20a\x20business\x20fact.','bf_execute','Use\x20when\x20the\x20target\x20Personal\x20BFF\x20script\x20id\x20is\x20confirmed\x20under\x20the\x20current\x20user\x20and\x20you\x20need\x20to\x20execute\x20that\x20personal\x20script\x20with\x20optional\x20JSON\x20params','Use\x20when\x20you\x20need\x20a\x20paginated\x20runtime\x20dataset\x20list\x20by\x20appCode\x20and\x20want\x20to\x20collect\x20available\x20datasetCode\x20values','Use\x20when\x20you\x20need\x20fields,\x20table\x20info,\x20relations,\x20or\x20operation\x20definitions\x20for\x20a\x20dataset\x20code','{\x22aggregate\x22:[{\x22column\x22:\x20\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[]}','/api/runtime-bff/personal/{id}/execute','Personal\x20Backend\x20Function\x20script\x20ID,\x20for\x20example\x20123','Aggregate\x20supports\x20COUNT,\x20SUM,\x20AVG,\x20MAX,\x20and\x20MIN\x20definitions\x20in\x20the\x20`aggregate`\x20array.','Dataset\x20detail','5290510JpRXSv','Get\x20one\x20dataset\x20record','5GlJCvL','trim','Show\x20runtime\x20API\x20documentation\x20by\x20code','lovrabet\x20sql\x20exec\x20--sqlcode\x20<sqlCode>\x20--params\x20\x27{}\x27','Current\x20app\x20code','Execute\x20BF\x20endpoint\x20function','32-character\x20dataset\x20code','1gmJgal','code','Create\x20a\x20dataset\x20record','list','Execute\x20custom\x20SQL','Prefer\x20`filter`\x20when\x20the\x20record\x20id\x20is\x20unknown.','For\x20the\x20next\x20page,\x20keep\x20where/select/orderBy/pageSize\x20unchanged\x20and\x20increment\x20only\x20currentPage,\x20which\x20starts\x20at\x201.','70704xZfNtZ','{\x22param\x22:\x22value\x22}','lovrabet\x20bff\x20detail\x20--name\x20<functionName>','string','lovrabet\x20data\x20create\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22name\x22:\x22demo\x22}\x27','path','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22orderBy\x22:[{\x22id\x22:\x22asc\x22}],\x22currentPage\x22:2,\x22pageSize\x22:20}\x27','category','tableData\x20contains\x20records','dataset_detail','Aggregate\x20dataset\x20data','functionName','Personal\x20BFF\x20scripts\x20are\x20user-owned\x20and\x20scoped\x20per\x20app.','Returns\x20script\x20business\x20payload','paging\x20contains\x20pagination','/api/dataset/getOneByCode?code={datasetCode}','##\x20Filter\x20dataset\x20data','GET','POST','dataset_data_create','dataset_data_aggregate','includes','read','If\x20SDK\x20usage\x20is\x20needed,\x20follow\x20with\x20`lovrabet\x20dataset\x20sdk-doc\x20--code\x20<datasetCode>`.','api-doc','/api/custom/executeSql','Aggregate\x20dataset\x20records','801416ozQEvs'];a1_0x5c72=function(){return _0x20b06c;};return a1_0x5c72();}export function getApiDocDetail(_0x4b81cd){const _0x5b2f6a=DOCS['find'](_0x5b7f31=>_0x5b7f31['code']===_0x4b81cd);if(!_0x5b2f6a)throw CliErrors['validation']('API\x20doc\x20code\x20not\x20found:\x20'+_0x4b81cd);return{..._0x5b2f6a};}const apiDocList={'service':a1_0x406f01(0x1c6),'command':a1_0x406f01(0x1aa),'description':a1_0x406f01(0x1d9),'risk':'read','requiresAppCode':![],'flags':[CATEGORY_FLAG,KEYWORD_FLAG],async 'execute'(_0x4d4a57){const _0x2dc928=a1_0x406f01,_0xae3420=listApiDocEntries({'category':_0x4d4a57[_0x2dc928(0x1f2)](_0x2dc928(0x1b5)),'keyword':_0x4d4a57['str'](_0x2dc928(0x17e))});return{'ok':!![],'data':{'total':_0xae3420[_0x2dc928(0x191)],'items':_0xae3420}};}},apiDocDetail={'service':'api-doc','command':'detail','description':a1_0x406f01(0x1a2),'risk':a1_0x406f01(0x1c4),'requiresAppCode':![],'flags':[DOC_CODE_FLAG],async 'execute'(_0x31007b){const _0x33f2a6=a1_0x406f01;return{'ok':!![],'data':getApiDocDetail(_0x31007b[_0x33f2a6(0x1f2)]('code'))};}};export const apiDocDefinitions=[apiDocList,apiDocDetail];
1
+ const a1_0x59f586=a1_0x15d4;(function(_0x5d48a1,_0x587bc9){const _0xf01d31=a1_0x15d4,_0xeac44a=_0x5d48a1();while(!![]){try{const _0x5f421d=parseInt(_0xf01d31(0x258))/0x1+parseInt(_0xf01d31(0x201))/0x2*(parseInt(_0xf01d31(0x1f7))/0x3)+parseInt(_0xf01d31(0x243))/0x4+parseInt(_0xf01d31(0x1f0))/0x5+parseInt(_0xf01d31(0x1e8))/0x6*(parseInt(_0xf01d31(0x226))/0x7)+-parseInt(_0xf01d31(0x209))/0x8*(-parseInt(_0xf01d31(0x25d))/0x9)+-parseInt(_0xf01d31(0x246))/0xa;if(_0x5f421d===_0x587bc9)break;else _0xeac44a['push'](_0xeac44a['shift']());}catch(_0x55af75){_0xeac44a['push'](_0xeac44a['shift']());}}}(a1_0x39ee,0x57571));function a1_0x15d4(_0x469e95,_0x4f7558){_0x469e95=_0x469e95-0x1e2;const _0x39eec9=a1_0x39ee();let _0x15d4aa=_0x39eec9[_0x469e95];return _0x15d4aa;}import{CliErrors}from'../../errors.js';const CATEGORY_FLAG={'name':a1_0x59f586(0x22c),'type':a1_0x59f586(0x23c),'description':'Filter\x20docs\x20by\x20category,\x20for\x20example\x20dataset'},KEYWORD_FLAG={'name':a1_0x59f586(0x20a),'type':a1_0x59f586(0x23c),'description':a1_0x59f586(0x234)},DOC_CODE_FLAG={'name':'code','type':a1_0x59f586(0x23c),'required':!![],'description':a1_0x59f586(0x264)},DOCS=[{'code':a1_0x59f586(0x20d),'category':a1_0x59f586(0x202),'title':'List\x20datasets','method':a1_0x59f586(0x1f1),'path':'/api/dataset/get-dataset-list-by-app-code','summary':a1_0x59f586(0x1fa),'whenToUse':a1_0x59f586(0x20b),'pathParams':[],'queryParams':[],'bodySchema':a1_0x59f586(0x1e2),'responseHighlights':[a1_0x59f586(0x227),a1_0x59f586(0x21e)],'examples':[a1_0x59f586(0x1f9)],'notes':['CLI\x20users\x20should\x20prefer\x20`lovrabet\x20dataset\x20list`\x20for\x20this\x20workflow.'],'markdown':[a1_0x59f586(0x200),'',a1_0x59f586(0x231)][a1_0x59f586(0x20c)]('\x0a')},{'code':a1_0x59f586(0x232),'category':a1_0x59f586(0x202),'title':'Dataset\x20detail','method':a1_0x59f586(0x250),'path':a1_0x59f586(0x211),'summary':a1_0x59f586(0x1f3),'whenToUse':a1_0x59f586(0x1e7),'pathParams':[],'queryParams':[{'name':a1_0x59f586(0x237),'description':a1_0x59f586(0x1e3)}],'bodySchema':a1_0x59f586(0x23f),'responseHighlights':[a1_0x59f586(0x203),a1_0x59f586(0x244),a1_0x59f586(0x24e)],'examples':[a1_0x59f586(0x1ec)],'notes':[a1_0x59f586(0x26a)],'markdown':['##\x20Dataset\x20detail','',a1_0x59f586(0x24f)][a1_0x59f586(0x20c)]('\x0a')},{'code':'dataset_data_filter','category':a1_0x59f586(0x202),'title':'Filter\x20dataset\x20data','method':a1_0x59f586(0x1f1),'path':a1_0x59f586(0x220),'summary':'Filter\x20dataset\x20records','whenToUse':a1_0x59f586(0x233),'pathParams':[{'name':'appCode','description':a1_0x59f586(0x22e)},{'name':a1_0x59f586(0x267),'description':a1_0x59f586(0x1e3)}],'queryParams':[],'bodySchema':a1_0x59f586(0x251),'responseHighlights':[a1_0x59f586(0x205),a1_0x59f586(0x215)],'examples':[a1_0x59f586(0x262),a1_0x59f586(0x22f)],'notes':[a1_0x59f586(0x240),a1_0x59f586(0x263),'Verify\x20tableData\x20and\x20paging\x20before\x20treating\x20the\x20response\x20as\x20a\x20business\x20fact.',a1_0x59f586(0x1e6)],'markdown':[a1_0x59f586(0x1e9),'',a1_0x59f586(0x24a)]['join']('\x0a')},{'code':a1_0x59f586(0x228),'category':a1_0x59f586(0x202),'title':a1_0x59f586(0x25e),'method':a1_0x59f586(0x1f1),'path':'/api/{appCode}/{datasetCode}/aggregate','summary':a1_0x59f586(0x239),'whenToUse':'Use\x20when\x20you\x20need\x20groupBy\x20plus\x20count,\x20sum,\x20avg,\x20max,\x20or\x20min\x20aggregates','pathParams':[{'name':'appCode','description':'Current\x20app\x20code'},{'name':a1_0x59f586(0x267),'description':a1_0x59f586(0x1e3)}],'queryParams':[],'bodySchema':a1_0x59f586(0x1f5),'responseHighlights':[a1_0x59f586(0x242),'where\x20filters\x20before\x20aggregation'],'examples':[a1_0x59f586(0x204)],'notes':[a1_0x59f586(0x269),a1_0x59f586(0x1f6)],'markdown':[a1_0x59f586(0x23a),'','Aggregate\x20supports\x20COUNT,\x20SUM,\x20AVG,\x20MAX,\x20and\x20MIN\x20definitions\x20in\x20the\x20`aggregate`\x20array.'][a1_0x59f586(0x20c)]('\x0a')},{'code':a1_0x59f586(0x265),'category':a1_0x59f586(0x202),'title':a1_0x59f586(0x249),'method':'POST','path':'/api/{appCode}/{datasetCode}/getOne','summary':a1_0x59f586(0x249),'whenToUse':'Use\x20when\x20you\x20already\x20know\x20the\x20record\x20id\x20and\x20need\x20one\x20business\x20row\x20from\x20a\x20dataset','pathParams':[{'name':'appCode','description':a1_0x59f586(0x22e)},{'name':a1_0x59f586(0x267),'description':a1_0x59f586(0x1e3)}],'queryParams':[],'bodySchema':a1_0x59f586(0x245),'responseHighlights':[a1_0x59f586(0x230)],'examples':[a1_0x59f586(0x260)],'notes':[a1_0x59f586(0x219)],'markdown':a1_0x59f586(0x254)},{'code':'dataset_data_create','category':'dataset','title':a1_0x59f586(0x253),'method':'POST','path':a1_0x59f586(0x214),'summary':a1_0x59f586(0x229),'whenToUse':a1_0x59f586(0x1fb),'pathParams':[{'name':a1_0x59f586(0x24c),'description':a1_0x59f586(0x22e)},{'name':a1_0x59f586(0x267),'description':a1_0x59f586(0x1e3)}],'queryParams':[],'bodySchema':a1_0x59f586(0x21c),'responseHighlights':[a1_0x59f586(0x21b)],'examples':[a1_0x59f586(0x26b)],'notes':[a1_0x59f586(0x268)],'markdown':a1_0x59f586(0x252)},{'code':a1_0x59f586(0x266),'category':'bf','title':a1_0x59f586(0x222),'method':'GET','path':a1_0x59f586(0x1e4),'summary':a1_0x59f586(0x224),'whenToUse':'Use\x20when\x20the\x20function\x20name\x20is\x20already\x20confirmed\x20and\x20you\x20need\x20that\x20ENDPOINT\x27s\x20runtime\x20metadata','pathParams':[{'name':a1_0x59f586(0x24c),'description':a1_0x59f586(0x22e)},{'name':a1_0x59f586(0x236),'description':a1_0x59f586(0x24b)}],'queryParams':[],'bodySchema':a1_0x59f586(0x23f),'responseHighlights':['CLI\x20returns\x20appCode/functionName/description/version/gmtModified'],'examples':[a1_0x59f586(0x23e)],'notes':[a1_0x59f586(0x261)],'markdown':a1_0x59f586(0x22a)},{'code':a1_0x59f586(0x248),'category':'bf','title':a1_0x59f586(0x1f4),'method':a1_0x59f586(0x1f1),'path':a1_0x59f586(0x1eb),'summary':'Execute\x20a\x20BF\x20endpoint\x20function','whenToUse':a1_0x59f586(0x25a),'pathParams':[{'name':a1_0x59f586(0x24c),'description':'Current\x20app\x20code'},{'name':a1_0x59f586(0x236),'description':a1_0x59f586(0x1f8)}],'queryParams':[],'bodySchema':a1_0x59f586(0x1fd),'responseHighlights':[a1_0x59f586(0x217)],'examples':[a1_0x59f586(0x25f)],'notes':[a1_0x59f586(0x1ee)],'markdown':a1_0x59f586(0x1e5)},{'code':a1_0x59f586(0x241),'category':'bf','title':'Execute\x20Personal\x20Backend\x20Function','method':a1_0x59f586(0x1f1),'path':a1_0x59f586(0x221),'summary':'Execute\x20a\x20Personal\x20Backend\x20Function\x20by\x20script\x20ID','whenToUse':a1_0x59f586(0x23b),'pathParams':[{'name':'id','description':a1_0x59f586(0x1ef)}],'queryParams':[{'name':a1_0x59f586(0x24c),'description':a1_0x59f586(0x22e)}],'bodySchema':a1_0x59f586(0x1fd),'responseHighlights':[a1_0x59f586(0x217)],'examples':[a1_0x59f586(0x256)],'notes':[a1_0x59f586(0x238),a1_0x59f586(0x1f2)],'markdown':[a1_0x59f586(0x22b),'',a1_0x59f586(0x1ea)][a1_0x59f586(0x20c)]('\x0a')},{'code':a1_0x59f586(0x218),'category':a1_0x59f586(0x247),'title':'Execute\x20custom\x20SQL','method':a1_0x59f586(0x1f1),'path':a1_0x59f586(0x223),'summary':a1_0x59f586(0x259),'whenToUse':a1_0x59f586(0x23d),'pathParams':[],'queryParams':[],'bodySchema':a1_0x59f586(0x21a),'responseHighlights':[a1_0x59f586(0x257)],'examples':[a1_0x59f586(0x206)],'notes':[a1_0x59f586(0x1fc)],'markdown':'##\x20Execute\x20custom\x20SQL\x0a\x0aExecute\x20a\x20configured\x20SQL\x20script\x20by\x20sqlCode.'}];function entrySummary(_0x4d618d){const _0x33ad4b=a1_0x59f586;return{'code':_0x4d618d[_0x33ad4b(0x237)],'category':_0x4d618d[_0x33ad4b(0x22c)],'method':_0x4d618d[_0x33ad4b(0x225)],'path':_0x4d618d[_0x33ad4b(0x25c)],'summary':_0x4d618d[_0x33ad4b(0x216)],'whenToUse':_0x4d618d[_0x33ad4b(0x210)]};}export function listApiDocEntries(_0x4ad981={}){const _0x3e100a=a1_0x59f586,_0x32c60e=String(_0x4ad981[_0x3e100a(0x22c)]||'')[_0x3e100a(0x1ed)](),_0x40d4d6=String(_0x4ad981[_0x3e100a(0x20a)]||'')[_0x3e100a(0x1ed)]()[_0x3e100a(0x235)]();return DOCS[_0x3e100a(0x21f)](_0x3c6aac=>{const _0x121795=_0x3e100a;if(_0x32c60e&&_0x3c6aac[_0x121795(0x22c)]!==_0x32c60e)return![];if(!_0x40d4d6)return!![];return[_0x3c6aac[_0x121795(0x237)],_0x3c6aac['category'],_0x3c6aac[_0x121795(0x225)],_0x3c6aac[_0x121795(0x25c)],_0x3c6aac[_0x121795(0x216)],_0x3c6aac[_0x121795(0x210)],_0x3c6aac[_0x121795(0x22d)]][_0x121795(0x20c)]('\x20')[_0x121795(0x235)]()[_0x121795(0x20e)](_0x40d4d6);})[_0x3e100a(0x255)](entrySummary);}export function getApiDocDetail(_0x259280){const _0x13b84b=a1_0x59f586,_0x5ec7bb=DOCS[_0x13b84b(0x208)](_0x4d006c=>_0x4d006c['code']===_0x259280);if(!_0x5ec7bb)throw CliErrors[_0x13b84b(0x1ff)]('API\x20doc\x20code\x20not\x20found:\x20'+_0x259280);return{..._0x5ec7bb};}const apiDocList={'service':a1_0x59f586(0x20f),'command':a1_0x59f586(0x25b),'description':a1_0x59f586(0x1fe),'risk':a1_0x59f586(0x207),'requiresAppCode':![],'flags':[CATEGORY_FLAG,KEYWORD_FLAG],async 'execute'(_0xf8af2f){const _0x37797a=a1_0x59f586,_0x56fbeb=listApiDocEntries({'category':_0xf8af2f[_0x37797a(0x24d)]('category'),'keyword':_0xf8af2f[_0x37797a(0x24d)](_0x37797a(0x20a))});return{'ok':!![],'data':{'total':_0x56fbeb[_0x37797a(0x212)],'items':_0x56fbeb}};}},apiDocDetail={'service':a1_0x59f586(0x20f),'command':a1_0x59f586(0x21d),'description':a1_0x59f586(0x213),'risk':'read','requiresAppCode':![],'flags':[DOC_CODE_FLAG],async 'execute'(_0x195772){const _0x4097e1=a1_0x59f586;return{'ok':!![],'data':getApiDocDetail(_0x195772[_0x4097e1(0x24d)]('code'))};}};function a1_0x39ee(){const _0x2c351c=['category','title','Current\x20app\x20code','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22orderBy\x22:[{\x22id\x22:\x22asc\x22}],\x22currentPage\x22:2,\x22pageSize\x22:20}\x27','Returns\x20one\x20matching\x20business\x20record','Use\x20this\x20API\x20or\x20`lovrabet\x20dataset\x20list`\x20to\x20discover\x20available\x20dataset\x20codes\x20before\x20reading\x20data.','dataset_detail','Use\x20when\x20you\x20need\x20to\x20read\x20business\x20data\x20with\x20where,\x20orderBy,\x20pagination,\x20or\x20similar\x20filters','Search\x20docs\x20by\x20code,\x20summary,\x20path,\x20or\x20usage\x20text','toLowerCase','functionName','code','Personal\x20BFF\x20scripts\x20are\x20user-owned\x20and\x20scoped\x20per\x20app.','Aggregate\x20dataset\x20records','##\x20Aggregate\x20dataset\x20data','Use\x20when\x20the\x20target\x20Personal\x20BFF\x20script\x20id\x20is\x20confirmed\x20under\x20the\x20current\x20user\x20and\x20you\x20need\x20to\x20execute\x20that\x20personal\x20script\x20with\x20optional\x20JSON\x20params','string','Use\x20when\x20the\x20target\x20sqlCode\x20exists\x20and\x20you\x20need\x20to\x20execute\x20that\x20custom\x20SQL','lovrabet\x20bff\x20detail\x20--name\x20<functionName>','None','where,\x20select,\x20orderBy,\x20currentPage,\x20and\x20pageSize\x20belong\x20inside\x20one\x20--params\x20JSON\x20object;\x20they\x20are\x20not\x20standalone\x20CLI\x20flags.','personal_bf_execute','result\x20rows\x20contain\x20aggregate\x20aliases','392564DntICA','relations\x20contains\x20the\x20object-shaped\x20API\x20relations\x20value\x20when\x20returned','{\x22id\x22:123}','15868950UcDDAw','custom_sql','bf_execute','Get\x20one\x20dataset\x20record','Use\x20`where`,\x20`select`,\x20`orderBy`,\x20`currentPage`,\x20and\x20`pageSize`\x20to\x20inspect\x20live\x20data\x20shape.','Exact\x20endpoint\x20function\x20name','appCode','str','operations\x20describes\x20runtime\x20APIs','Inspect\x20field\x20names,\x20relations,\x20and\x20operation\x20metadata\x20for\x20a\x20known\x20dataset\x20code.','GET','{\x22where\x22:{},\x22currentPage\x22:1,\x22pageSize\x22:20}','##\x20Create\x20dataset\x20record\x0a\x0aCreate\x20one\x20data\x20record\x20in\x20a\x20dataset.','Create\x20dataset\x20record','##\x20Get\x20one\x20dataset\x20record\x0a\x0aRead\x20one\x20record\x20by\x20id.','map','lovrabet\x20personal-bff\x20exec\x20--id\x20<id>\x20--params\x20\x27{}\x27','Returns\x20SQL\x20execution\x20payload','551904zzSoJo','Execute\x20custom\x20SQL','Use\x20when\x20the\x20target\x20BF\x20functionName\x20is\x20confirmed\x20and\x20you\x20need\x20to\x20call\x20that\x20ENDPOINT','list','path','136494fQpYzv','Aggregate\x20dataset\x20data','lovrabet\x20bff\x20exec\x20--name\x20<functionName>\x20--params\x20\x27{}\x27','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27','This\x20is\x20an\x20exact\x20lookup\x20by\x20appCode\x20+\x20functionName.\x20The\x20CLI\x20does\x20not\x20enumerate\x20Backend\x20Function\x20definitions\x20or\x20expose\x20platform-only\x20fields.','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22orderBy\x22:[{\x22id\x22:\x22asc\x22}],\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','For\x20the\x20next\x20page,\x20keep\x20where/select/orderBy/pageSize\x20unchanged\x20and\x20increment\x20only\x20currentPage,\x20which\x20starts\x20at\x201.','API\x20doc\x20code,\x20for\x20example\x20dataset_list','dataset_data_get_one','bf_detail','datasetCode','This\x20is\x20a\x20write\x20operation;\x20use\x20dry-run\x20when\x20available\x20and\x20safe\x20fixtures\x20for\x20smoke\x20tests.','Use\x20`having`\x20only\x20for\x20post-aggregation\x20filters.','If\x20SDK\x20usage\x20is\x20needed,\x20follow\x20with\x20`lovrabet\x20dataset\x20sdk-doc\x20--code\x20<datasetCode>`.','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}','32-character\x20dataset\x20code','/client/bff/endpoint/{appCode}/{functionName}','##\x20Execute\x20BF\x20endpoint\x20function\x0a\x0aExecute\x20a\x20known\x20endpoint\x20script.','Use\x20read-only\x20data\x20commands\x20before\x20writing\x20Artifacts\x20that\x20display\x20real\x20data.','Use\x20when\x20you\x20need\x20fields,\x20table\x20info,\x20relations,\x20or\x20operation\x20definitions\x20for\x20a\x20dataset\x20code','510tnKjTl','##\x20Filter\x20dataset\x20data','Execute\x20a\x20known\x20Personal\x20Backend\x20Function\x20script\x20through\x20its\x20runtime\x20execute\x20endpoint.','/api/endpoint/{appCode}/{functionName}','lovrabet\x20dataset\x20detail\x20--code\x20<datasetCode>\x20--appcode\x20<appCode>','trim','Script\x20behavior\x20may\x20have\x20side\x20effects;\x20inspect\x20detail\x20first.','Personal\x20Backend\x20Function\x20script\x20ID,\x20for\x20example\x20123','1811280vzzrzc','POST','Function\x20execution\x20may\x20have\x20business\x20side\x20effects;\x20inspect\x20detail\x20before\x20execution.','Get\x20dataset\x20detail','Execute\x20BF\x20endpoint\x20function','{\x22aggregate\x22:[{\x22column\x22:\x20\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[]}','`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','287151UxmWoS','Endpoint\x20function\x20name','lovrabet\x20dataset\x20list\x20--appcode\x20<appCode>\x20--format\x20compress','List\x20datasets\x20with\x20pagination','Use\x20when\x20you\x20need\x20to\x20insert\x20one\x20business\x20record\x20into\x20a\x20dataset','Use\x20`lovrabet\x20sql\x20detail`\x20before\x20execution.','{\x22param\x22:\x22value\x22}','List\x20available\x20runtime\x20API\x20documentation\x20entries','validation','##\x20List\x20datasets','14NUyhpW','dataset','fields/properties\x20describe\x20data\x20shape','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','tableData\x20contains\x20records','lovrabet\x20sql\x20exec\x20--sqlcode\x20<sqlCode>\x20--params\x20\x27{}\x27','read','find','40ofioqz','keyword','Use\x20when\x20you\x20need\x20a\x20paginated\x20runtime\x20dataset\x20list\x20by\x20appCode\x20and\x20want\x20to\x20collect\x20available\x20datasetCode\x20values','join','dataset_list','includes','api-doc','whenToUse','/api/dataset/getOneByCode?code={datasetCode}','length','Show\x20runtime\x20API\x20documentation\x20by\x20code','/api/{appCode}/{datasetCode}/create','paging\x20contains\x20pagination','summary','Returns\x20script\x20business\x20payload','custom_sql_execute','Prefer\x20`filter`\x20when\x20the\x20record\x20id\x20is\x20unknown.','{\x22appCode\x22:\x22app-aa63b188\x22,\x22sqlCode\x22:\x22xxxxxxxx-xxxxxxxx\x22,\x22params\x22:{}}','Returns\x20the\x20created\x20record\x20or\x20backend\x20operation\x20result','{\x22fieldName\x22:\x22value\x22}','detail','paging.totalCount\x20gives\x20total\x20rows','filter','/api/{appCode}/{datasetCode}/filter','/api/runtime-bff/personal/{id}/execute','Get\x20BF\x20endpoint\x20function\x20contract','/api/custom/executeSql','Get\x20a\x20BF\x20endpoint\x20contract\x20by\x20app\x20and\x20function\x20name','method','15358UTjeZm','tableData\x20contains\x20dataset\x20id/code/name','dataset_data_aggregate','Create\x20a\x20dataset\x20record','##\x20Get\x20BF\x20endpoint\x20function\x20contract\x0a\x0aInspect\x20one\x20known\x20endpoint\x20function\x20through\x20the\x20AK-authenticated\x20exact\x20detail\x20API.','##\x20Execute\x20Personal\x20Backend\x20Function'];a1_0x39ee=function(){return _0x2c351c;};return a1_0x39ee();}export const apiDocDefinitions=[apiDocList,apiDocDetail];
@@ -1 +1 @@
1
- (function(_0x1e60de,_0xfbe128){const _0x6b8b3a=a2_0x4243,_0x19c81e=_0x1e60de();while(!![]){try{const _0x5efdd5=parseInt(_0x6b8b3a(0x12e))/0x1*(-parseInt(_0x6b8b3a(0x12c))/0x2)+-parseInt(_0x6b8b3a(0x11f))/0x3+parseInt(_0x6b8b3a(0x110))/0x4*(-parseInt(_0x6b8b3a(0x127))/0x5)+parseInt(_0x6b8b3a(0x11c))/0x6*(parseInt(_0x6b8b3a(0x129))/0x7)+-parseInt(_0x6b8b3a(0x11d))/0x8*(-parseInt(_0x6b8b3a(0x114))/0x9)+parseInt(_0x6b8b3a(0x128))/0xa+parseInt(_0x6b8b3a(0x121))/0xb*(parseInt(_0x6b8b3a(0x115))/0xc);if(_0x5efdd5===_0xfbe128)break;else _0x19c81e['push'](_0x19c81e['shift']());}catch(_0x535f38){_0x19c81e['push'](_0x19c81e['shift']());}}}(a2_0x4afb,0x492a8));function a2_0x4243(_0x4e2876,_0x40df4a){_0x4e2876=_0x4e2876-0x10e;const _0x4afbec=a2_0x4afb();let _0x4243fe=_0x4afbec[_0x4e2876];return _0x4243fe;}import{createHash}from'node:crypto';function a2_0x4afb(){const _0x4c771e=['.tmp','ak_','sha256','utf8','hex','2808798fujsRW','2984upvpor','trim','1755711uVyjIT','my-apps.json','396ejYMTq','appName','find','unknown','digest','cache','10OVjJIC','5649710pnzCmi','7pLdirx','EPERM','appCode','2qNdaKA','code','379339lsiVLG','items','homeDirName','481980zcHpcp','parse','slice','update','3222RbZbLG','112872vxHpwA','stringify'];a2_0x4afb=function(){return _0x4c771e;};return a2_0x4afb();}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';export function fingerprintAccessKey(_0x3d9ed4){const _0x518a07=a2_0x4243,_0x38bfff=_0x3d9ed4['trim'](),_0x992754=_0x38bfff[_0x518a07(0x112)](-0x6)||_0x518a07(0x124),_0x2abcf1=createHash(_0x518a07(0x119))[_0x518a07(0x113)](_0x38bfff)[_0x518a07(0x125)](_0x518a07(0x11b))['slice'](0x0,0xc);return _0x518a07(0x118)+_0x992754+'_'+_0x2abcf1;}export function getAppCacheFilePath(_0x56fa4f,_0x36c56b){const _0x1f3636=a2_0x4243;return resolve(homedir(),PRODUCT_CONFIG[_0x1f3636(0x10f)],_0x1f3636(0x126),_0x56fa4f,fingerprintAccessKey(_0x36c56b),_0x1f3636(0x120));}export function readCachedAppList(_0x388b89,_0x110468){const _0x43a8d7=a2_0x4243;if(!_0x110468?.['trim']())return null;const _0x2de22f=getAppCacheFilePath(_0x388b89,_0x110468);if(!existsSync(_0x2de22f))return null;try{const _0x5f48c7=readFileSync(_0x2de22f,_0x43a8d7(0x11a));if(!_0x5f48c7[_0x43a8d7(0x11e)]())return null;const _0x4cada2=JSON[_0x43a8d7(0x111)](_0x5f48c7);if(!Array['isArray'](_0x4cada2[_0x43a8d7(0x10e)]))return null;return _0x4cada2;}catch{return null;}}export function writeCachedAppList(_0x255693,_0xee9609,_0x4d4fd8){const _0x28a5b9=a2_0x4243,_0x3552da=getAppCacheFilePath(_0x255693,_0xee9609),_0x425abb=dirname(_0x3552da);!existsSync(_0x425abb)&&mkdirSync(_0x425abb,{'recursive':!![]});const _0x5b2f9e=_0x3552da+_0x28a5b9(0x117);try{writeFileSync(_0x5b2f9e,JSON[_0x28a5b9(0x116)](_0x4d4fd8,null,0x2)+'\x0a',{'encoding':_0x28a5b9(0x11a),'mode':0x180});try{renameSync(_0x5b2f9e,_0x3552da);}catch(_0x14271e){if(_0x14271e[_0x28a5b9(0x12d)]===_0x28a5b9(0x12a)||_0x14271e[_0x28a5b9(0x12d)]==='EXDEV'||_0x14271e['code']==='EACCES'){writeFileSync(_0x3552da,JSON[_0x28a5b9(0x116)](_0x4d4fd8,null,0x2)+'\x0a',{'encoding':_0x28a5b9(0x11a)});try{unlinkSync(_0x5b2f9e);}catch{}}else throw _0x14271e;}}catch(_0x3da208){try{unlinkSync(_0x5b2f9e);}catch{}throw _0x3da208;}return _0x3552da;}export function resolveCachedAppCode(_0xbbc7c0,_0x4ac912,_0x183586){const _0x2e0c5e=a2_0x4243;if(!_0xbbc7c0)return undefined;const _0x2de2cc=readCachedAppList(_0x4ac912,_0x183586),_0x523172=_0x2de2cc?.[_0x2e0c5e(0x10e)][_0x2e0c5e(0x123)](_0x25e626=>_0x25e626[_0x2e0c5e(0x122)]===_0xbbc7c0&&isRuntimeAccessibleApp(_0x25e626));return _0x523172?.[_0x2e0c5e(0x12b)]?.[_0x2e0c5e(0x11e)]()||undefined;}
1
+ (function(_0x574d6a,_0x49005b){const _0x5a0c29=a2_0x45ce,_0x15a8bb=_0x574d6a();while(!![]){try{const _0xf2ae73=parseInt(_0x5a0c29(0x1c3))/0x1*(-parseInt(_0x5a0c29(0x1d6))/0x2)+parseInt(_0x5a0c29(0x1cd))/0x3+-parseInt(_0x5a0c29(0x1ce))/0x4+-parseInt(_0x5a0c29(0x1dd))/0x5*(parseInt(_0x5a0c29(0x1d3))/0x6)+-parseInt(_0x5a0c29(0x1d1))/0x7*(parseInt(_0x5a0c29(0x1c5))/0x8)+parseInt(_0x5a0c29(0x1e0))/0x9+parseInt(_0x5a0c29(0x1d9))/0xa;if(_0xf2ae73===_0x49005b)break;else _0x15a8bb['push'](_0x15a8bb['shift']());}catch(_0x4bd1ea){_0x15a8bb['push'](_0x15a8bb['shift']());}}}(a2_0x1e79,0xc7561));import{createHash}from'node:crypto';import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{homedir}from'node:os';import{dirname,resolve}from'node:path';import{PRODUCT_CONFIG}from'../../constant/product.js';import{isRuntimeAccessibleApp}from'../../commands/app/eligibility.js';function a2_0x45ce(_0x3e7f85,_0x434b1d){_0x3e7f85=_0x3e7f85-0x1c2;const _0x1e79e9=a2_0x1e79();let _0x45cea6=_0x1e79e9[_0x3e7f85];return _0x45cea6;}export function fingerprintAccessKey(_0x50eea5){const _0x26c545=a2_0x45ce,_0x3b5328=_0x50eea5[_0x26c545(0x1db)](),_0x186706=_0x3b5328[_0x26c545(0x1d7)](-0x6)||_0x26c545(0x1d5),_0x30f9c0=createHash(_0x26c545(0x1ca))[_0x26c545(0x1d2)](_0x3b5328)['digest'](_0x26c545(0x1c6))[_0x26c545(0x1d7)](0x0,0xc);return _0x26c545(0x1dc)+_0x186706+'_'+_0x30f9c0;}function a2_0x1e79(){const _0xf8409f=['EACCES','utf8','7OSwfnI','my-apps.json','3875120EUDHqc','hex','cache','items','parse','sha256','EXDEV','code','3963525ApEUlc','6435856qjDDZT','isArray','stringify','21geTsnd','update','6GjfgSj','find','unknown','218812DNNqXO','slice','.tmp','38765780EsXpRz','homeDirName','trim','ak_','6308230bMhijf','appName','EPERM','6375150ldLedp'];a2_0x1e79=function(){return _0xf8409f;};return a2_0x1e79();}export function getAppCacheFilePath(_0x14b48c,_0x186813){const _0xefde0f=a2_0x45ce;return resolve(homedir(),PRODUCT_CONFIG[_0xefde0f(0x1da)],_0xefde0f(0x1c7),_0x14b48c,fingerprintAccessKey(_0x186813),_0xefde0f(0x1c4));}export function readCachedAppList(_0x9ef461,_0x3bd87a){const _0x3da4b3=a2_0x45ce;if(!_0x3bd87a?.[_0x3da4b3(0x1db)]())return null;const _0xb790d9=getAppCacheFilePath(_0x9ef461,_0x3bd87a);if(!existsSync(_0xb790d9))return null;try{const _0x4b63ad=readFileSync(_0xb790d9,_0x3da4b3(0x1c2));if(!_0x4b63ad['trim']())return null;const _0x4ea690=JSON[_0x3da4b3(0x1c9)](_0x4b63ad);if(!Array[_0x3da4b3(0x1cf)](_0x4ea690['items']))return null;return _0x4ea690;}catch{return null;}}export function writeCachedAppList(_0x4c651c,_0x2fe077,_0x4de126){const _0x5743c7=a2_0x45ce,_0x1c8e0f=getAppCacheFilePath(_0x4c651c,_0x2fe077),_0x561f74=dirname(_0x1c8e0f);!existsSync(_0x561f74)&&mkdirSync(_0x561f74,{'recursive':!![]});const _0x429160=_0x1c8e0f+_0x5743c7(0x1d8);try{writeFileSync(_0x429160,JSON[_0x5743c7(0x1d0)](_0x4de126,null,0x2)+'\x0a',{'encoding':_0x5743c7(0x1c2),'mode':0x180});try{renameSync(_0x429160,_0x1c8e0f);}catch(_0x534714){if(_0x534714[_0x5743c7(0x1cc)]===_0x5743c7(0x1df)||_0x534714['code']===_0x5743c7(0x1cb)||_0x534714[_0x5743c7(0x1cc)]===_0x5743c7(0x1e1)){writeFileSync(_0x1c8e0f,JSON['stringify'](_0x4de126,null,0x2)+'\x0a',{'encoding':_0x5743c7(0x1c2)});try{unlinkSync(_0x429160);}catch{}}else throw _0x534714;}}catch(_0x7adff2){try{unlinkSync(_0x429160);}catch{}throw _0x7adff2;}return _0x1c8e0f;}export function resolveCachedAppCode(_0x41d79c,_0xe9e057,_0x4542c4){const _0x38f0c6=a2_0x45ce;if(!_0x41d79c)return undefined;const _0x11adda=readCachedAppList(_0xe9e057,_0x4542c4),_0x5c938c=_0x11adda?.[_0x38f0c6(0x1c8)][_0x38f0c6(0x1d4)](_0x4e65a8=>_0x4e65a8[_0x38f0c6(0x1de)]===_0x41d79c&&isRuntimeAccessibleApp(_0x4e65a8));return _0x5c938c?.['appCode']?.[_0x38f0c6(0x1db)]()||undefined;}
@@ -1 +1 @@
1
- const a3_0x548faf=a3_0x3efa;(function(_0x3ea648,_0x5848aa){const _0xae2fa2=a3_0x3efa,_0x34f036=_0x3ea648();while(!![]){try{const _0x44a2c3=-parseInt(_0xae2fa2(0x157))/0x1*(parseInt(_0xae2fa2(0x16a))/0x2)+-parseInt(_0xae2fa2(0x15f))/0x3+parseInt(_0xae2fa2(0x13c))/0x4+parseInt(_0xae2fa2(0x169))/0x5+parseInt(_0xae2fa2(0x15e))/0x6+-parseInt(_0xae2fa2(0x14c))/0x7+parseInt(_0xae2fa2(0x156))/0x8;if(_0x44a2c3===_0x5848aa)break;else _0x34f036['push'](_0x34f036['shift']());}catch(_0x8932a4){_0x34f036['push'](_0x34f036['shift']());}}}(a3_0x5e3e,0xe7c94));import{appImportFlagDefs,runAppImport}from'../../commands/init.js';import{getEnv,RUNTIME_ENV_VALUES}from'../../constant/env.js';import{buildAppProfileListFields}from'../../config/schema.js';import{enrichAppListItemsWithMergedSelection}from'../../commands/app/shared.js';function a3_0x3efa(_0x3b1283,_0x56706d){_0x3b1283=_0x3b1283-0x12d;const _0x5e3e58=a3_0x5e3e();let _0x3efa07=_0x5e3e58[_0x3b1283];return _0x3efa07;}import{filterRuntimeAccessibleApps,findAppByCode,isRuntimeAccessibleApp}from'../../commands/app/eligibility.js';function collectFlags(_0x2be385,_0x373cff){const _0x32eaa4=a3_0x3efa,_0x519cdb={};for(const _0x32c066 of _0x373cff){const _0x56ef26=_0x32c066['type']===_0x32eaa4(0x15d)?_0x2be385[_0x32eaa4(0x148)](_0x32c066[_0x32eaa4(0x132)]):_0x2be385['str'](_0x32c066[_0x32eaa4(0x132)]);if(_0x56ef26!==''&&_0x56ef26!==![])_0x519cdb[_0x32c066[_0x32eaa4(0x132)]]=_0x56ef26;}if(_0x2be385['nonInteractive'])_0x519cdb[_0x32eaa4(0x12d)]=!![];return _0x519cdb;}function normalizeLanguages(_0x221229){const _0x5e535b=a3_0x3efa;if(!Array[_0x5e535b(0x131)](_0x221229))return[];return _0x221229['filter'](_0x485c2b=>typeof _0x485c2b==='string')[_0x5e535b(0x16b)](_0x403301=>_0x403301[_0x5e535b(0x141)]())[_0x5e535b(0x155)](Boolean);}function a3_0x5e3e(){const _0x1be9e6=['items','langs','string','cachePath','source','bool','../../context.js','enableI18n','i18nInfo','10917529SJmsBa','no-cache','config','env','Loaded\x20','write','list','\x20app(s)\x20for\x20env=\x22','appCode','filter','7283904xOGSQp','1FZRllI','\x20cached\x20app(s)\x20for\x20env=\x22','Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','appcode','appOwnerName','isCurrent','boolean','5045118otwixf','4220016hQTHem','Read\x20app\x20list\x20from\x20local\x20cache\x20only','No\x20apps\x20found\x20on\x20the\x20platform.','projectPath','appName','local','Reads\x20the\x20apps\x20available\x20to\x20the\x20current\x20account\x20and\x20overwrites\x20the\x20local\x20app\x20cache\x20for\x20that\x20environment.\x20Platform\x20apps\x20are\x20not\x20modified.','app','push','length','6645765siFPpb','1524294WBEsmS','map','globalPath','nonInteractive','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','str','accessKey','isArray','name','pull','envName','entries','import','List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','include-unpublished','cache','production','find','6389472pbuUWN','fetchedAt','read','Include\x20unpublished\x20apps\x20for\x20diagnostics','appPublishStatus','trim','../../commands/app/remote-source.js'];a3_0x5e3e=function(){return _0x1be9e6;};return a3_0x5e3e();}function buildRemoteAppI18nFields(_0x50da28){const _0x18d8c7=a3_0x3efa,_0x5ff710=normalizeLanguages(_0x50da28[_0x18d8c7(0x14b)]?.[_0x18d8c7(0x144)]);return{'enableI18n':typeof _0x50da28[_0x18d8c7(0x14a)]==='boolean'?_0x50da28[_0x18d8c7(0x14a)]:null,'languages':_0x5ff710,'i18nInfo':_0x50da28[_0x18d8c7(0x14b)]?{..._0x50da28['i18nInfo'],'langs':_0x5ff710['length']?_0x5ff710:null}:null};}const listDef={'service':a3_0x548faf(0x166),'command':a3_0x548faf(0x152),'description':a3_0x548faf(0x137),'risk':a3_0x548faf(0x13e),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':'env','type':a3_0x548faf(0x145),'description':'Filter\x20by\x20environment\x20(default:\x20current\x20env)','enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0x548faf(0x164),'type':a3_0x548faf(0x15d),'description':a3_0x548faf(0x160),'default':![]},{'name':'no-cache','type':a3_0x548faf(0x15d),'description':a3_0x548faf(0x12e),'default':![]},{'name':a3_0x548faf(0x138),'type':a3_0x548faf(0x15d),'description':a3_0x548faf(0x13f),'default':![]}],async 'execute'(_0x53757d){const _0x46af88=a3_0x548faf,_0x5b5fcd=_0x53757d[_0x46af88(0x12f)](_0x46af88(0x14f))||_0x53757d[_0x46af88(0x134)]||getEnv()||_0x46af88(0x13a),_0x190b3c=_0x53757d['bool']('local'),_0x52b006=_0x53757d[_0x46af88(0x148)]('no-cache'),_0x5f07ee=_0x53757d[_0x46af88(0x148)](_0x46af88(0x138)),{readRawConfigWithLayers:_0x1cee46,resolveDefaultAppSource:_0x2b66a6,getLocalAppAliases:_0x189833}=await import(_0x46af88(0x149)),{getRemoteAppList:_0x37a9b1}=await import(_0x46af88(0x142)),{config:_0x2b3dcd,layers:_0x5851f1}=_0x1cee46(),_0x4c3dcf=_0x2b66a6(_0x5851f1),{defaultApp:_0x10662d}=_0x2b3dcd,_0x4e5556=await _0x37a9b1({'env':_0x5b5fcd,'accessKey':_0x53757d[_0x46af88(0x130)],'localOnly':_0x190b3c,'noCache':_0x52b006}),_0x5dd34c=_0x5f07ee?_0x4e5556['items']:filterRuntimeAccessibleApps(_0x4e5556['items']),_0x372e19=_0x4e5556[_0x46af88(0x143)][_0x46af88(0x168)]-_0x5dd34c['length'],_0x5ed44f=_0x5dd34c[_0x46af88(0x16b)](_0x4a91eb=>{const _0x2a8e15=_0x46af88;return{'name':_0x4a91eb['appName'],'appcode':_0x4a91eb[_0x2a8e15(0x154)],'named':!![],'definedIn':'remote','isDefault':_0x4a91eb[_0x2a8e15(0x163)]===_0x10662d,...buildAppProfileListFields(_0x5b5fcd),...buildRemoteAppI18nFields(_0x4a91eb),'source':_0x4e5556['source'],'owner':_0x4a91eb[_0x2a8e15(0x15b)]??null,'status':_0x4a91eb[_0x2a8e15(0x140)]??null,'cachedAt':_0x4e5556[_0x2a8e15(0x13d)]};}),_0x5997ef=_0x189833(_0x2b3dcd);let _0x813f7c=0x0;for(const [_0x67cfcf,_0x31aee7]of Object[_0x46af88(0x135)](_0x5997ef)){const _0x5ea66e=typeof _0x31aee7[_0x46af88(0x15a)]===_0x46af88(0x145)?_0x31aee7[_0x46af88(0x15a)]['trim']():'';if(!_0x5ea66e)continue;const _0x5c957d=findAppByCode(_0x4e5556['items'],_0x5ea66e);if(!_0x5f07ee&&_0x5c957d&&!isRuntimeAccessibleApp(_0x5c957d))continue;_0x813f7c+=0x1,_0x5ed44f[_0x46af88(0x167)]({'name':_0x67cfcf,'appcode':_0x5ea66e,'named':!![],'definedIn':_0x46af88(0x164),'isDefault':_0x67cfcf===_0x10662d,...buildAppProfileListFields(_0x5b5fcd),'source':_0x46af88(0x14e),'owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0x5ed44f,_0x53757d['mergedCli']);const _0x552780=_0x5ed44f[_0x46af88(0x13b)](_0x3c0f60=>_0x3c0f60[_0x46af88(0x15c)]===!![]),_0x12afdf=_0x10662d??_0x552780?.[_0x46af88(0x132)]??null,_0x21f82c={'env':_0x5b5fcd,'source':_0x4e5556[_0x46af88(0x147)],'fetchedAt':_0x4e5556[_0x46af88(0x13d)],'cachePath':_0x4e5556[_0x46af88(0x146)],'globalPath':_0x5851f1[_0x46af88(0x16c)]??null,'projectPath':_0x5851f1[_0x46af88(0x162)]??null,'defaultApp':_0x12afdf,'defaultAppSource':_0x10662d!=null?_0x4c3dcf:null,'localAliasCount':_0x813f7c,'remoteTotal':_0x4e5556['items'][_0x46af88(0x168)],'hiddenUnpublishedCount':_0x372e19,'includeUnpublished':_0x5f07ee};if(_0x5ed44f['length']===0x0)return{'ok':!![],'data':{'items':_0x5ed44f,'meta':_0x21f82c},'message':_0x4e5556[_0x46af88(0x147)]===_0x46af88(0x139)?'No\x20cached\x20apps\x20found.':_0x46af88(0x161)};return{'ok':!![],'data':{'items':_0x5ed44f,'meta':_0x21f82c}};}},pullDef={'service':'app','command':a3_0x548faf(0x133),'description':'Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','risk':a3_0x548faf(0x151),'confirmationDescription':a3_0x548faf(0x165),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'env','type':a3_0x548faf(0x145),'description':'Target\x20environment\x20(default:\x20current\x20env)','enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0x548faf(0x164),'type':a3_0x548faf(0x15d),'description':'Read\x20from\x20local\x20cache\x20only','default':![]},{'name':a3_0x548faf(0x14d),'type':a3_0x548faf(0x15d),'description':'Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','default':![]}],async 'execute'(_0x383201){const _0x1e375c=a3_0x548faf,_0x529a5b=_0x383201[_0x1e375c(0x12f)](_0x1e375c(0x14f))||_0x383201[_0x1e375c(0x134)]||getEnv()||_0x1e375c(0x13a),_0x2f9be5=_0x383201[_0x1e375c(0x148)]('local'),_0x515852=_0x383201[_0x1e375c(0x148)](_0x1e375c(0x14d)),{getRemoteAppList:_0x349003}=await import(_0x1e375c(0x142)),_0x3851f4=await _0x349003({'env':_0x529a5b,'accessKey':_0x383201[_0x1e375c(0x130)],'localOnly':_0x2f9be5,'noCache':_0x515852});return{'ok':!![],'data':{'total':_0x3851f4[_0x1e375c(0x143)][_0x1e375c(0x168)],'env':_0x529a5b,'source':_0x3851f4[_0x1e375c(0x147)],'fetchedAt':_0x3851f4[_0x1e375c(0x13d)],'cachePath':_0x3851f4['cachePath']},'message':_0x3851f4[_0x1e375c(0x147)]==='cache'?_0x1e375c(0x150)+_0x3851f4[_0x1e375c(0x143)][_0x1e375c(0x168)]+_0x1e375c(0x158)+_0x529a5b+'\x22.':'Refreshed\x20app\x20cache\x20with\x20'+_0x3851f4[_0x1e375c(0x143)][_0x1e375c(0x168)]+_0x1e375c(0x153)+_0x529a5b+'\x22.'};}},importDef={'service':a3_0x548faf(0x166),'command':a3_0x548faf(0x136),'description':a3_0x548faf(0x159),'risk':a3_0x548faf(0x151),'confirmationDescription':'Reads\x20the\x20given\x20.rabetbase.json\x20and\x20imports\x20a\x20usable\x20default\x20app\x20into\x20local\x20.lovrabet.json.\x20Matching\x20keys\x20may\x20be\x20updated.','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':appImportFlagDefs,async 'execute'(_0x21f859){return await runAppImport(collectFlags(_0x21f859,appImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[listDef,pullDef,importDef];
1
+ const a3_0x3ed69c=a3_0x4b51;function a3_0x4b51(_0x3808c3,_0x3eb106){_0x3808c3=_0x3808c3-0x115;const _0x7c9c3b=a3_0x7c9c();let _0x4b510a=_0x7c9c3b[_0x3808c3];return _0x4b510a;}(function(_0x1f7643,_0x5d0dfb){const _0x4ea9b8=a3_0x4b51,_0x28a531=_0x1f7643();while(!![]){try{const _0x57fc4f=parseInt(_0x4ea9b8(0x14b))/0x1*(parseInt(_0x4ea9b8(0x12a))/0x2)+parseInt(_0x4ea9b8(0x120))/0x3*(-parseInt(_0x4ea9b8(0x11b))/0x4)+parseInt(_0x4ea9b8(0x14f))/0x5*(-parseInt(_0x4ea9b8(0x140))/0x6)+parseInt(_0x4ea9b8(0x128))/0x7*(-parseInt(_0x4ea9b8(0x138))/0x8)+-parseInt(_0x4ea9b8(0x14c))/0x9+-parseInt(_0x4ea9b8(0x135))/0xa+-parseInt(_0x4ea9b8(0x13a))/0xb*(-parseInt(_0x4ea9b8(0x11d))/0xc);if(_0x57fc4f===_0x5d0dfb)break;else _0x28a531['push'](_0x28a531['shift']());}catch(_0x41cfae){_0x28a531['push'](_0x28a531['shift']());}}}(a3_0x7c9c,0xe718c));import{appImportFlagDefs,runAppImport}from'../../commands/init.js';import{getEnv,RUNTIME_ENV_VALUES}from'../../constant/env.js';import{buildAppProfileListFields}from'../../config/schema.js';import{enrichAppListItemsWithMergedSelection}from'../../commands/app/shared.js';function a3_0x7c9c(){const _0x5ef7f2=['trim','../../context.js','164crhimL','env','12tNthGN','accessKey','app','97617uLfgOG','entries','langs','\x20cached\x20app(s)\x20for\x20env=\x22','items','cachePath','find','filter','266QwIIME','write','3188mTsYFm','enableI18n','appPublishStatus','appCode','\x20app(s)\x20for\x20env=\x22','Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','push','Reads\x20the\x20given\x20.rabetbase.json\x20and\x20imports\x20a\x20usable\x20default\x20app\x20into\x20local\x20.lovrabet.json.\x20Matching\x20keys\x20may\x20be\x20updated.','No\x20cached\x20apps\x20found.','isArray','length','9734460ScnFHa','projectPath','str','365536uqEufz','Read\x20app\x20list\x20from\x20local\x20cache\x20only','59907683ZgftHx','Read\x20from\x20local\x20cache\x20only','production','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','remote','7098WhCQyo','boolean','string','Include\x20unpublished\x20apps\x20for\x20diagnostics','name','include-unpublished','fetchedAt','appOwnerName','local','nonInteractive','source','797KnmLty','14822073YiKYsd','Target\x20environment\x20(default:\x20current\x20env)','../../commands/app/remote-source.js','335bkEwFs','mergedCli','isCurrent','import','Refreshed\x20app\x20cache\x20with\x20','appName','bool','i18nInfo','no-cache','Reads\x20the\x20apps\x20available\x20to\x20the\x20current\x20account\x20and\x20overwrites\x20the\x20local\x20app\x20cache\x20for\x20that\x20environment.\x20Platform\x20apps\x20are\x20not\x20modified.','No\x20apps\x20found\x20on\x20the\x20platform.','envName'];a3_0x7c9c=function(){return _0x5ef7f2;};return a3_0x7c9c();}import{filterRuntimeAccessibleApps,findAppByCode,isRuntimeAccessibleApp}from'../../commands/app/eligibility.js';function collectFlags(_0x16d561,_0x4da6ae){const _0x20c2b2=a3_0x4b51,_0x41b39f={};for(const _0x4da723 of _0x4da6ae){const _0x296f5e=_0x4da723['type']==='boolean'?_0x16d561[_0x20c2b2(0x155)](_0x4da723['name']):_0x16d561['str'](_0x4da723[_0x20c2b2(0x144)]);if(_0x296f5e!==''&&_0x296f5e!==![])_0x41b39f[_0x4da723[_0x20c2b2(0x144)]]=_0x296f5e;}if(_0x16d561[_0x20c2b2(0x149)])_0x41b39f[_0x20c2b2(0x149)]=!![];return _0x41b39f;}function normalizeLanguages(_0x4db762){const _0x2cc730=a3_0x4b51;if(!Array[_0x2cc730(0x133)](_0x4db762))return[];return _0x4db762['filter'](_0x53ef11=>typeof _0x53ef11===_0x2cc730(0x142))['map'](_0x5ca879=>_0x5ca879[_0x2cc730(0x119)]())[_0x2cc730(0x127)](Boolean);}function buildRemoteAppI18nFields(_0x3213ab){const _0x17e3ac=a3_0x4b51,_0x5a2fa0=normalizeLanguages(_0x3213ab[_0x17e3ac(0x156)]?.[_0x17e3ac(0x122)]);return{'enableI18n':typeof _0x3213ab[_0x17e3ac(0x12b)]==='boolean'?_0x3213ab[_0x17e3ac(0x12b)]:null,'languages':_0x5a2fa0,'i18nInfo':_0x3213ab['i18nInfo']?{..._0x3213ab[_0x17e3ac(0x156)],'langs':_0x5a2fa0[_0x17e3ac(0x134)]?_0x5a2fa0:null}:null};}const listDef={'service':a3_0x3ed69c(0x11f),'command':'list','description':a3_0x3ed69c(0x13e),'risk':'read','requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':'env','type':a3_0x3ed69c(0x142),'description':'Filter\x20by\x20environment\x20(default:\x20current\x20env)','enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0x3ed69c(0x148),'type':a3_0x3ed69c(0x141),'description':a3_0x3ed69c(0x139),'default':![]},{'name':'no-cache','type':a3_0x3ed69c(0x141),'description':a3_0x3ed69c(0x13d),'default':![]},{'name':'include-unpublished','type':a3_0x3ed69c(0x141),'description':a3_0x3ed69c(0x143),'default':![]}],async 'execute'(_0x5444ce){const _0x598e2b=a3_0x3ed69c,_0x1faacf=_0x5444ce[_0x598e2b(0x137)](_0x598e2b(0x11c))||_0x5444ce[_0x598e2b(0x118)]||getEnv()||_0x598e2b(0x13c),_0xf0b85c=_0x5444ce[_0x598e2b(0x155)](_0x598e2b(0x148)),_0x3dcc0d=_0x5444ce[_0x598e2b(0x155)](_0x598e2b(0x115)),_0x4ab656=_0x5444ce[_0x598e2b(0x155)](_0x598e2b(0x145)),{readRawConfigWithLayers:_0xeca037,resolveDefaultAppSource:_0x1872d7,getLocalAppAliases:_0xb7215b}=await import(_0x598e2b(0x11a)),{getRemoteAppList:_0x30cc23}=await import('../../commands/app/remote-source.js'),{config:_0x85b26a,layers:_0x4fc7de}=_0xeca037(),_0xf2edc5=_0x1872d7(_0x4fc7de),{defaultApp:_0x423ca2}=_0x85b26a,_0x133009=await _0x30cc23({'env':_0x1faacf,'accessKey':_0x5444ce[_0x598e2b(0x11e)],'localOnly':_0xf0b85c,'noCache':_0x3dcc0d}),_0x4c2c76=_0x4ab656?_0x133009[_0x598e2b(0x124)]:filterRuntimeAccessibleApps(_0x133009['items']),_0x2cf87a=_0x133009[_0x598e2b(0x124)][_0x598e2b(0x134)]-_0x4c2c76['length'],_0x429f5a=_0x4c2c76['map'](_0x518499=>{const _0x20a73f=_0x598e2b;return{'name':_0x518499[_0x20a73f(0x154)],'appcode':_0x518499[_0x20a73f(0x12d)],'named':!![],'definedIn':_0x20a73f(0x13f),'isDefault':_0x518499[_0x20a73f(0x154)]===_0x423ca2,...buildAppProfileListFields(_0x1faacf),...buildRemoteAppI18nFields(_0x518499),'source':_0x133009[_0x20a73f(0x14a)],'owner':_0x518499[_0x20a73f(0x147)]??null,'status':_0x518499[_0x20a73f(0x12c)]??null,'cachedAt':_0x133009[_0x20a73f(0x146)]};}),_0x99e728=_0xb7215b(_0x85b26a);let _0x3568b0=0x0;for(const [_0x1ca680,_0x321c1a]of Object[_0x598e2b(0x121)](_0x99e728)){const _0x3cd68c=typeof _0x321c1a['appcode']===_0x598e2b(0x142)?_0x321c1a['appcode']['trim']():'';if(!_0x3cd68c)continue;const _0x28c428=findAppByCode(_0x133009[_0x598e2b(0x124)],_0x3cd68c);if(!_0x4ab656&&_0x28c428&&!isRuntimeAccessibleApp(_0x28c428))continue;_0x3568b0+=0x1,_0x429f5a[_0x598e2b(0x130)]({'name':_0x1ca680,'appcode':_0x3cd68c,'named':!![],'definedIn':_0x598e2b(0x148),'isDefault':_0x1ca680===_0x423ca2,...buildAppProfileListFields(_0x1faacf),'source':'config','owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0x429f5a,_0x5444ce[_0x598e2b(0x150)]);const _0x517730=_0x429f5a[_0x598e2b(0x126)](_0x343be8=>_0x343be8[_0x598e2b(0x151)]===!![]),_0x41e80b=_0x423ca2??_0x517730?.[_0x598e2b(0x144)]??null,_0x64f1b7={'env':_0x1faacf,'source':_0x133009[_0x598e2b(0x14a)],'fetchedAt':_0x133009['fetchedAt'],'cachePath':_0x133009[_0x598e2b(0x125)],'globalPath':_0x4fc7de['globalPath']??null,'projectPath':_0x4fc7de[_0x598e2b(0x136)]??null,'defaultApp':_0x41e80b,'defaultAppSource':_0x423ca2!=null?_0xf2edc5:null,'localAliasCount':_0x3568b0,'remoteTotal':_0x133009[_0x598e2b(0x124)][_0x598e2b(0x134)],'hiddenUnpublishedCount':_0x2cf87a,'includeUnpublished':_0x4ab656};if(_0x429f5a[_0x598e2b(0x134)]===0x0)return{'ok':!![],'data':{'items':_0x429f5a,'meta':_0x64f1b7},'message':_0x133009[_0x598e2b(0x14a)]==='cache'?_0x598e2b(0x132):_0x598e2b(0x117)};return{'ok':!![],'data':{'items':_0x429f5a,'meta':_0x64f1b7}};}},pullDef={'service':a3_0x3ed69c(0x11f),'command':'pull','description':a3_0x3ed69c(0x12f),'risk':a3_0x3ed69c(0x129),'confirmationDescription':a3_0x3ed69c(0x116),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'env','type':'string','description':a3_0x3ed69c(0x14d),'enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0x3ed69c(0x148),'type':'boolean','description':a3_0x3ed69c(0x13b),'default':![]},{'name':a3_0x3ed69c(0x115),'type':a3_0x3ed69c(0x141),'description':a3_0x3ed69c(0x13d),'default':![]}],async 'execute'(_0x174861){const _0x2032c6=a3_0x3ed69c,_0x316041=_0x174861[_0x2032c6(0x137)]('env')||_0x174861[_0x2032c6(0x118)]||getEnv()||_0x2032c6(0x13c),_0x4bbc1c=_0x174861[_0x2032c6(0x155)](_0x2032c6(0x148)),_0x5604fd=_0x174861['bool']('no-cache'),{getRemoteAppList:_0x3031ac}=await import(_0x2032c6(0x14e)),_0x2db866=await _0x3031ac({'env':_0x316041,'accessKey':_0x174861[_0x2032c6(0x11e)],'localOnly':_0x4bbc1c,'noCache':_0x5604fd});return{'ok':!![],'data':{'total':_0x2db866[_0x2032c6(0x124)][_0x2032c6(0x134)],'env':_0x316041,'source':_0x2db866[_0x2032c6(0x14a)],'fetchedAt':_0x2db866[_0x2032c6(0x146)],'cachePath':_0x2db866[_0x2032c6(0x125)]},'message':_0x2db866[_0x2032c6(0x14a)]==='cache'?'Loaded\x20'+_0x2db866['items'][_0x2032c6(0x134)]+_0x2032c6(0x123)+_0x316041+'\x22.':_0x2032c6(0x153)+_0x2db866[_0x2032c6(0x124)][_0x2032c6(0x134)]+_0x2032c6(0x12e)+_0x316041+'\x22.'};}},importDef={'service':a3_0x3ed69c(0x11f),'command':a3_0x3ed69c(0x152),'description':'Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','risk':a3_0x3ed69c(0x129),'confirmationDescription':a3_0x3ed69c(0x131),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':appImportFlagDefs,async 'execute'(_0x214281){return await runAppImport(collectFlags(_0x214281,appImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[listDef,pullDef,importDef];
@@ -1 +1 @@
1
- (function(_0x17424b,_0x1fb819){const _0x8e40c6=a4_0x272f,_0x59fc34=_0x17424b();while(!![]){try{const _0x4029c5=-parseInt(_0x8e40c6(0x1eb))/0x1*(-parseInt(_0x8e40c6(0x1fc))/0x2)+parseInt(_0x8e40c6(0x1f2))/0x3+parseInt(_0x8e40c6(0x1ec))/0x4+parseInt(_0x8e40c6(0x1f7))/0x5*(-parseInt(_0x8e40c6(0x1f5))/0x6)+-parseInt(_0x8e40c6(0x1f0))/0x7+-parseInt(_0x8e40c6(0x1f3))/0x8+parseInt(_0x8e40c6(0x1fd))/0x9;if(_0x4029c5===_0x1fb819)break;else _0x59fc34['push'](_0x59fc34['shift']());}catch(_0x27937a){_0x59fc34['push'](_0x59fc34['shift']());}}}(a4_0xeef2,0x74611));import{CLI_BIN_NAME}from'../../constant/cli.js';import{RUNTIME_ACCESSIBLE_APP_STATUS}from'../../constant/app.js';import{CliErrors}from'../../errors.js';function a4_0xeef2(){const _0x5cca17=['find','Current\x20status:\x20','3417736VvGixF','appPublishStatus','455043iRJNjn','3903688VhGSJi','validation','1946832LgyZbo','\x20dataset/data/sql/bff\x20commands,\x20or\x20choose\x20a\x20published\x20app.','10jROlCI','appCode','trim','\x20is\x20not\x20available\x20for\x20runtime\x20AI\x20access.','string','948UTfbsw','11408877DoEGhb','.\x20Publish\x20the\x20app\x20before\x20using\x20','13ehmCAM','2705384CgjuBZ','App\x20'];a4_0xeef2=function(){return _0x5cca17;};return a4_0xeef2();}function a4_0x272f(_0x4e3889,_0x52ef09){_0x4e3889=_0x4e3889-0x1eb;const _0xeef298=a4_0xeef2();let _0x272f1c=_0xeef298[_0x4e3889];return _0x272f1c;}export function normalizeAppPublishStatus(_0xeafe11){const _0x383398=a4_0x272f;if(typeof _0xeafe11!==_0x383398(0x1fb))return null;const _0x226b98=_0xeafe11[_0x383398(0x1f9)]();return _0x226b98?_0x226b98['toUpperCase']():null;}export function isRuntimeAccessibleApp(_0x9d512b){return normalizeAppPublishStatus(_0x9d512b['appPublishStatus'])===RUNTIME_ACCESSIBLE_APP_STATUS;}export function filterRuntimeAccessibleApps(_0x55551f){return _0x55551f['filter'](isRuntimeAccessibleApp);}export function findAppByName(_0x26b4ba,_0xd04329){const _0x293c72=a4_0x272f;return _0x26b4ba[_0x293c72(0x1ee)](_0x1ede6a=>_0x1ede6a['appName']===_0xd04329);}export function findAppByCode(_0x45f382,_0x503549){const _0x418033=a4_0x272f,_0x1b2979=_0x503549[_0x418033(0x1f9)]();if(!_0x1b2979)return undefined;return _0x45f382[_0x418033(0x1ee)](_0x5f4302=>_0x5f4302[_0x418033(0x1f8)]?.[_0x418033(0x1f9)]()===_0x1b2979);}export function runtimeInaccessibleAppError(_0x2c0759,_0x1db133){const _0x3ded17=a4_0x272f,_0x41bc16=normalizeAppPublishStatus(_0x2c0759[_0x3ded17(0x1f1)])??'UNKNOWN';return CliErrors[_0x3ded17(0x1f4)](_0x3ded17(0x1ed)+_0x1db133+_0x3ded17(0x1fa),_0x3ded17(0x1ef)+_0x41bc16+_0x3ded17(0x1fe)+CLI_BIN_NAME+_0x3ded17(0x1f6));}
1
+ (function(_0x5adfd3,_0x5aa9bf){const _0x45746f=a4_0x5c8b,_0x58773e=_0x5adfd3();while(!![]){try{const _0x2df785=-parseInt(_0x45746f(0x206))/0x1*(parseInt(_0x45746f(0x1ff))/0x2)+-parseInt(_0x45746f(0x200))/0x3+parseInt(_0x45746f(0x201))/0x4*(parseInt(_0x45746f(0x1f6))/0x5)+-parseInt(_0x45746f(0x1fe))/0x6+-parseInt(_0x45746f(0x1fc))/0x7+parseInt(_0x45746f(0x203))/0x8+parseInt(_0x45746f(0x1f2))/0x9;if(_0x2df785===_0x5aa9bf)break;else _0x58773e['push'](_0x58773e['shift']());}catch(_0x1bffb9){_0x58773e['push'](_0x58773e['shift']());}}}(a4_0x461b,0x518dd));import{CLI_BIN_NAME}from'../../constant/cli.js';import{RUNTIME_ACCESSIBLE_APP_STATUS}from'../../constant/app.js';function a4_0x5c8b(_0x4fa378,_0x294596){_0x4fa378=_0x4fa378-0x1f1;const _0x461bd3=a4_0x461b();let _0x5c8bff=_0x461bd3[_0x4fa378];return _0x5c8bff;}import{CliErrors}from'../../errors.js';function a4_0x461b(){const _0x47035f=['UNKNOWN','appPublishStatus','trim','\x20is\x20not\x20available\x20for\x20runtime\x20AI\x20access.','1574097BymzyZ','App\x20','2062056EKzJwx','8158ZUqRuv','519225mfPYsT','1047028RnzTlQ','appCode','5250656eJmAga','find','Current\x20status:\x20','89UkUeAx','toUpperCase','4685481PJnFQx','validation','.\x20Publish\x20the\x20app\x20before\x20using\x20','filter','5MRHmAf','\x20dataset/data/sql/bff\x20commands,\x20or\x20choose\x20a\x20published\x20app.'];a4_0x461b=function(){return _0x47035f;};return a4_0x461b();}export function normalizeAppPublishStatus(_0x3329a0){const _0x307051=a4_0x5c8b;if(typeof _0x3329a0!=='string')return null;const _0x3ab547=_0x3329a0[_0x307051(0x1fa)]();return _0x3ab547?_0x3ab547[_0x307051(0x1f1)]():null;}export function isRuntimeAccessibleApp(_0x108c2a){const _0x2fe6b0=a4_0x5c8b;return normalizeAppPublishStatus(_0x108c2a[_0x2fe6b0(0x1f9)])===RUNTIME_ACCESSIBLE_APP_STATUS;}export function filterRuntimeAccessibleApps(_0x415a14){const _0x30e85f=a4_0x5c8b;return _0x415a14[_0x30e85f(0x1f5)](isRuntimeAccessibleApp);}export function findAppByName(_0x443355,_0x2d93b9){const _0x4bdc90=a4_0x5c8b;return _0x443355[_0x4bdc90(0x204)](_0x4252f2=>_0x4252f2['appName']===_0x2d93b9);}export function findAppByCode(_0x4b2e9d,_0x4eed0b){const _0x1514ff=a4_0x5c8b,_0x2db2d8=_0x4eed0b[_0x1514ff(0x1fa)]();if(!_0x2db2d8)return undefined;return _0x4b2e9d[_0x1514ff(0x204)](_0x45d7bb=>_0x45d7bb[_0x1514ff(0x202)]?.[_0x1514ff(0x1fa)]()===_0x2db2d8);}export function runtimeInaccessibleAppError(_0x1ebf36,_0x44b57e){const _0x3a214f=a4_0x5c8b,_0x371be5=normalizeAppPublishStatus(_0x1ebf36[_0x3a214f(0x1f9)])??_0x3a214f(0x1f8);return CliErrors[_0x3a214f(0x1f3)](_0x3a214f(0x1fd)+_0x44b57e+_0x3a214f(0x1fb),_0x3a214f(0x205)+_0x371be5+_0x3a214f(0x1f4)+CLI_BIN_NAME+_0x3a214f(0x1f7));}
@@ -1 +1 @@
1
- (function(_0x256acb,_0x1768ab){const _0x4d3e7f=a5_0x5b1f,_0x393b=_0x256acb();while(!![]){try{const _0x210e1f=-parseInt(_0x4d3e7f(0x11a))/0x1+-parseInt(_0x4d3e7f(0x119))/0x2+-parseInt(_0x4d3e7f(0x122))/0x3*(parseInt(_0x4d3e7f(0x11e))/0x4)+parseInt(_0x4d3e7f(0x12a))/0x5+-parseInt(_0x4d3e7f(0x124))/0x6*(-parseInt(_0x4d3e7f(0x121))/0x7)+-parseInt(_0x4d3e7f(0x11b))/0x8+-parseInt(_0x4d3e7f(0x125))/0x9*(-parseInt(_0x4d3e7f(0x126))/0xa);if(_0x210e1f===_0x1768ab)break;else _0x393b['push'](_0x393b['shift']());}catch(_0x1a4544){_0x393b['push'](_0x393b['shift']());}}}(a5_0x4e35,0x640c3));import{fileURLToPath}from'url';import{dirname,join}from'path';function a5_0x5b1f(_0x760933,_0x42b55f){_0x760933=_0x760933-0x119;const _0x4e3529=a5_0x4e35();let _0x5b1f04=_0x4e3529[_0x760933];return _0x5b1f04;}import{readFileSync}from'fs';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function loadMockAppList(){const _0x457ebc=a5_0x5b1f,_0x7e7bf4=join(__dirname,_0x457ebc(0x129)),_0x39a8ab=readFileSync(_0x7e7bf4,_0x457ebc(0x11f));return JSON[_0x457ebc(0x127)](_0x39a8ab);}let _cached=null;export function getMockAppList(){return!_cached&&(_cached=loadMockAppList()),_cached;}export function getMockRemoteAppItems(){const _0x2583fb=a5_0x5b1f,_0x5d584c=getMockAppList();if(!_0x5d584c[_0x2583fb(0x12b)])throw new Error(_0x2583fb(0x128)+_0x5d584c[_0x2583fb(0x11d)]+'\x20('+_0x5d584c[_0x2583fb(0x123)]+')');return _0x5d584c[_0x2583fb(0x11c)][_0x2583fb(0x120)];}function a5_0x4e35(){const _0x5271c9=['tableData','7YohSzk','105HpPkPe','errorCode','3172722IRmYUc','100809mnTNff','640EpCOfi','parse','Mock\x20API\x20error:\x20','../../../mock/app-list.json','1530595ObiQDF','success','463316SdwIYu','155012qQKSaN','1045560tRKmew','data','errorMsg','71384WRpCbp','utf-8'];a5_0x4e35=function(){return _0x5271c9;};return a5_0x4e35();}
1
+ (function(_0x311acf,_0x5381e8){const _0x1a082f=a5_0x3ecc,_0x30303b=_0x311acf();while(!![]){try{const _0x49ac1d=-parseInt(_0x1a082f(0xcb))/0x1*(parseInt(_0x1a082f(0xcf))/0x2)+-parseInt(_0x1a082f(0xd3))/0x3+parseInt(_0x1a082f(0xc9))/0x4+-parseInt(_0x1a082f(0xd2))/0x5*(-parseInt(_0x1a082f(0xc6))/0x6)+-parseInt(_0x1a082f(0xc7))/0x7*(-parseInt(_0x1a082f(0xc8))/0x8)+parseInt(_0x1a082f(0xc4))/0x9*(parseInt(_0x1a082f(0xcd))/0xa)+-parseInt(_0x1a082f(0xce))/0xb*(parseInt(_0x1a082f(0xd0))/0xc);if(_0x49ac1d===_0x5381e8)break;else _0x30303b['push'](_0x30303b['shift']());}catch(_0x3eb699){_0x30303b['push'](_0x30303b['shift']());}}}(a5_0xca55,0x51613));import{fileURLToPath}from'url';import{dirname,join}from'path';function a5_0xca55(){const _0x5ed37f=['1119041blOBPZ','1412SmfymB','84urYdXi','Mock\x20API\x20error:\x20','634575YOEEjs','1110960zaADhE','utf-8','errorCode','5444397CqXoMk','tableData','18WXtFrO','9352tEKeJb','1488kxKQoj','1390016RWFDcl','parse','235eRHNKm','errorMsg','10OAPatD'];a5_0xca55=function(){return _0x5ed37f;};return a5_0xca55();}import{readFileSync}from'fs';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function a5_0x3ecc(_0x5be788,_0x1e8763){_0x5be788=_0x5be788-0xc4;const _0xca557f=a5_0xca55();let _0x3ecc3a=_0xca557f[_0x5be788];return _0x3ecc3a;}function loadMockAppList(){const _0x1d4bb0=a5_0x3ecc,_0x1588a4=join(__dirname,'../../../mock/app-list.json'),_0x54ceca=readFileSync(_0x1588a4,_0x1d4bb0(0xd4));return JSON[_0x1d4bb0(0xca)](_0x54ceca);}let _cached=null;export function getMockAppList(){return!_cached&&(_cached=loadMockAppList()),_cached;}export function getMockRemoteAppItems(){const _0x36f18c=a5_0x3ecc,_0x4e0d95=getMockAppList();if(!_0x4e0d95['success'])throw new Error(_0x36f18c(0xd1)+_0x4e0d95[_0x36f18c(0xcc)]+'\x20('+_0x4e0d95[_0x36f18c(0xd5)]+')');return _0x4e0d95['data'][_0x36f18c(0xc5)];}
@@ -1 +1 @@
1
- function a6_0x5d90(){const _0x30bd1a=['2680176DoSIjc','fetchedAt','2066mPagAW','2995686ayqGEW','toISOString','toLowerCase','173610VToJer','trim','471epZBTm','items','cache','remote','75LDtKsz','1818553LgEnDD','30KAqHek','APP_LIST_SOURCE','7mnFiNE','157JXcIyT','1399176CEWhbc','6152epIfZh'];a6_0x5d90=function(){return _0x30bd1a;};return a6_0x5d90();}(function(_0x44b2ef,_0xde2321){const _0x21312a=a6_0x3c27,_0x27c2bf=_0x44b2ef();while(!![]){try{const _0x7ee7d6=-parseInt(_0x21312a(0x110))/0x1*(parseInt(_0x21312a(0x101))/0x2)+parseInt(_0x21312a(0x107))/0x3*(parseInt(_0x21312a(0x112))/0x4)+-parseInt(_0x21312a(0x10b))/0x5*(parseInt(_0x21312a(0x105))/0x6)+-parseInt(_0x21312a(0x10f))/0x7*(parseInt(_0x21312a(0x113))/0x8)+parseInt(_0x21312a(0x102))/0x9+parseInt(_0x21312a(0x10d))/0xa*(parseInt(_0x21312a(0x10c))/0xb)+parseInt(_0x21312a(0x111))/0xc;if(_0x7ee7d6===_0xde2321)break;else _0x27c2bf['push'](_0x27c2bf['shift']());}catch(_0x95a7d2){_0x27c2bf['push'](_0x27c2bf['shift']());}}}(a6_0x5d90,0x3e6ab));import{getMyApps}from'../../core/api-client.js';import{getMockRemoteAppItems}from'../../commands/app/mock-loader.js';import{getAppCacheFilePath,readCachedAppList,writeCachedAppList}from'../../commands/app/cache.js';import{productEnv}from'../../constant/product.js';function a6_0x3c27(_0x543720,_0x23923e){_0x543720=_0x543720-0x100;const _0x5d90d0=a6_0x5d90();let _0x3c27ac=_0x5d90d0[_0x543720];return _0x3c27ac;}export function shouldUseMockRemoteApps(){const _0x5c46a4=a6_0x3c27,_0x1a950e=(productEnv(_0x5c46a4(0x10e))||'')[_0x5c46a4(0x106)]()[_0x5c46a4(0x104)]();return _0x1a950e==='mock';}export async function getRemoteAppItems(){if(shouldUseMockRemoteApps())return getMockRemoteAppItems();return getMyApps();}export async function getRemoteAppList(_0x334618){const _0x3a367a=a6_0x3c27,{env:_0xa2310b,accessKey:_0xcf9374,localOnly:localOnly=![],noCache:noCache=![]}=_0x334618,_0x206791=readCachedAppList(_0xa2310b,_0xcf9374),_0x435be6=_0xcf9374?.[_0x3a367a(0x106)]()?getAppCacheFilePath(_0xa2310b,_0xcf9374):null;if(localOnly)return{'items':_0x206791?.[_0x3a367a(0x108)]??[],'source':_0x3a367a(0x109),'fetchedAt':_0x206791?.['fetchedAt']??null,'cachePath':_0x435be6};try{const _0x3702e2=await getRemoteAppItems(),_0x5b6b28=shouldUseMockRemoteApps()?'mock':_0x3a367a(0x10a),_0x589d7b=new Date()[_0x3a367a(0x103)](),_0x5af1cb=_0xcf9374?.[_0x3a367a(0x106)]()?writeCachedAppList(_0xa2310b,_0xcf9374,{'env':_0xa2310b,'fetchedAt':_0x589d7b,'source':_0x5b6b28,'items':_0x3702e2}):null;return{'items':_0x3702e2,'source':_0x5b6b28,'fetchedAt':_0x589d7b,'cachePath':_0x5af1cb};}catch(_0x482ee8){if(!noCache&&_0x206791)return{'items':_0x206791[_0x3a367a(0x108)],'source':_0x3a367a(0x109),'fetchedAt':_0x206791[_0x3a367a(0x100)],'cachePath':_0x435be6};throw _0x482ee8;}}
1
+ (function(_0x4e8669,_0x31efbe){const _0x121b2c=a6_0x1c2e,_0x124900=_0x4e8669();while(!![]){try{const _0x4b41be=parseInt(_0x121b2c(0xf6))/0x1*(parseInt(_0x121b2c(0xfd))/0x2)+parseInt(_0x121b2c(0xf1))/0x3*(parseInt(_0x121b2c(0xf2))/0x4)+parseInt(_0x121b2c(0x104))/0x5*(-parseInt(_0x121b2c(0xf4))/0x6)+parseInt(_0x121b2c(0xfe))/0x7*(-parseInt(_0x121b2c(0xf3))/0x8)+-parseInt(_0x121b2c(0xfb))/0x9*(-parseInt(_0x121b2c(0xf7))/0xa)+parseInt(_0x121b2c(0x102))/0xb*(parseInt(_0x121b2c(0xf8))/0xc)+-parseInt(_0x121b2c(0x101))/0xd;if(_0x4b41be===_0x31efbe)break;else _0x124900['push'](_0x124900['shift']());}catch(_0x35f583){_0x124900['push'](_0x124900['shift']());}}}(a6_0x3e3a,0x8d249));function a6_0x1c2e(_0x5d8984,_0x5271b0){_0x5d8984=_0x5d8984-0xf1;const _0x3e3ae7=a6_0x3e3a();let _0x1c2ed5=_0x3e3ae7[_0x5d8984];return _0x1c2ed5;}import{getMyApps}from'../../core/api-client.js';import{getMockRemoteAppItems}from'../../commands/app/mock-loader.js';import{getAppCacheFilePath,readCachedAppList,writeCachedAppList}from'../../commands/app/cache.js';import{productEnv}from'../../constant/product.js';export function shouldUseMockRemoteApps(){const _0x1b89c4=a6_0x1c2e,_0xd2cfa2=(productEnv(_0x1b89c4(0xfc))||'')[_0x1b89c4(0xfa)]()['toLowerCase']();return _0xd2cfa2===_0x1b89c4(0xf9);}export async function getRemoteAppItems(){if(shouldUseMockRemoteApps())return getMockRemoteAppItems();return getMyApps();}function a6_0x3e3a(){const _0x380b1d=['985kaBpJO','103990glmfSS','6755388pdNthz','mock','trim','621VHIKrb','APP_LIST_SOURCE','710CXcxKd','931BYmnou','items','fetchedAt','24665095OGeaMW','22ulngGR','cache','818070XdoiBc','278943tVngGb','44DEatUo','24856kOJDvU','12gdNYuf','remote'];a6_0x3e3a=function(){return _0x380b1d;};return a6_0x3e3a();}export async function getRemoteAppList(_0x3c9ef7){const _0x40830a=a6_0x1c2e,{env:_0x4d2040,accessKey:_0xae306f,localOnly:localOnly=![],noCache:noCache=![]}=_0x3c9ef7,_0x1474aa=readCachedAppList(_0x4d2040,_0xae306f),_0x135557=_0xae306f?.[_0x40830a(0xfa)]()?getAppCacheFilePath(_0x4d2040,_0xae306f):null;if(localOnly)return{'items':_0x1474aa?.[_0x40830a(0xff)]??[],'source':_0x40830a(0x103),'fetchedAt':_0x1474aa?.[_0x40830a(0x100)]??null,'cachePath':_0x135557};try{const _0x22a620=await getRemoteAppItems(),_0x26ffb1=shouldUseMockRemoteApps()?_0x40830a(0xf9):_0x40830a(0xf5),_0x406d45=new Date()['toISOString'](),_0x418a94=_0xae306f?.[_0x40830a(0xfa)]()?writeCachedAppList(_0x4d2040,_0xae306f,{'env':_0x4d2040,'fetchedAt':_0x406d45,'source':_0x26ffb1,'items':_0x22a620}):null;return{'items':_0x22a620,'source':_0x26ffb1,'fetchedAt':_0x406d45,'cachePath':_0x418a94};}catch(_0x2955ef){if(!noCache&&_0x1474aa)return{'items':_0x1474aa[_0x40830a(0xff)],'source':_0x40830a(0x103),'fetchedAt':_0x1474aa['fetchedAt'],'cachePath':_0x135557};throw _0x2955ef;}}
@@ -1 +1 @@
1
- (function(_0x589590,_0x422f33){const _0x2f4353=a7_0x366a,_0xce6d0=_0x589590();while(!![]){try{const _0x591e04=parseInt(_0x2f4353(0x19b))/0x1*(parseInt(_0x2f4353(0x1a1))/0x2)+parseInt(_0x2f4353(0x1b2))/0x3*(parseInt(_0x2f4353(0x1a0))/0x4)+parseInt(_0x2f4353(0x1b1))/0x5+-parseInt(_0x2f4353(0x1a2))/0x6*(-parseInt(_0x2f4353(0x1a7))/0x7)+parseInt(_0x2f4353(0x1a6))/0x8*(-parseInt(_0x2f4353(0x1aa))/0x9)+-parseInt(_0x2f4353(0x1af))/0xa*(parseInt(_0x2f4353(0x19e))/0xb)+parseInt(_0x2f4353(0x1ab))/0xc*(-parseInt(_0x2f4353(0x1a3))/0xd);if(_0x591e04===_0x422f33)break;else _0xce6d0['push'](_0xce6d0['shift']());}catch(_0x30cd47){_0xce6d0['push'](_0xce6d0['shift']());}}}(a7_0x32bc,0xe3b4c));function a7_0x366a(_0x5d9613,_0x2445fc){_0x5d9613=_0x5d9613-0x19b;const _0x32bcc8=a7_0x32bc();let _0x366a7d=_0x32bcc8[_0x5d9613];return _0x366a7d;}export function enrichAppListItemsWithMergedSelection(_0x2b8f23,_0x1cf56f){const _0x27ad1a=a7_0x366a;if(!_0x1cf56f)return;const _0xf96914=!!(_0x1cf56f['currentApp']??_0x1cf56f[_0x27ad1a(0x19d)]);for(const _0x24f07c of _0x2b8f23){_0x24f07c[_0x27ad1a(0x1a5)]=![];}const _0x5b883c=_0x1cf56f[_0x27ad1a(0x1ac)]!=null?String(_0x1cf56f[_0x27ad1a(0x1ac)])[_0x27ad1a(0x1b0)]():'';if(_0xf96914){const _0x4e867b=_0x1cf56f[_0x27ad1a(0x1ae)]??_0x1cf56f['defaultApp'];if(_0x4e867b){const _0x1af9f8=_0x2b8f23[_0x27ad1a(0x1ad)](_0xc5a25e=>_0xc5a25e['named']===!![]&&_0xc5a25e[_0x27ad1a(0x19f)]===_0x4e867b&&_0xc5a25e[_0x27ad1a(0x19c)]===_0x27ad1a(0x1a9)),_0x55f49d=_0x1af9f8??_0x2b8f23[_0x27ad1a(0x1ad)](_0x2cdeb9=>_0x2cdeb9[_0x27ad1a(0x1a4)]===!![]&&_0x2cdeb9[_0x27ad1a(0x19f)]===_0x4e867b);if(_0x55f49d){const _0x4379b8=String(_0x55f49d[_0x27ad1a(0x1a8)]??'')[_0x27ad1a(0x1b0)]();if(!_0x5b883c||_0x4379b8===_0x5b883c){_0x55f49d[_0x27ad1a(0x1a5)]=!![];return;}}}if(_0x5b883c){const _0x15bb19=_0x2b8f23[_0x27ad1a(0x1ad)](_0x4b304f=>String(_0x4b304f[_0x27ad1a(0x1a8)]??'')[_0x27ad1a(0x1b0)]()===_0x5b883c);_0x15bb19&&(_0x15bb19[_0x27ad1a(0x1a5)]=!![]);}return;}if(!_0x5b883c)return;for(const _0x5e56ad of _0x2b8f23){String(_0x5e56ad['appcode']??'')[_0x27ad1a(0x1b0)]()===_0x5b883c&&(_0x5e56ad[_0x27ad1a(0x1a5)]=!![]);}}function a7_0x32bc(){const _0x56815e=['1136097iLlwsV','5065332LUQEUq','appCode','find','currentApp','10oyakTt','trim','937440HyplsC','956463uvchdF','84415lgFDTq','definedIn','defaultApp','3617713vOFDnO','name','4CLrjKn','2QGRRit','9587316nOcmvr','13uwAjxz','named','isCurrent','32TECKxc','7FiLowU','appcode','local'];a7_0x32bc=function(){return _0x56815e;};return a7_0x32bc();}
1
+ function a7_0x15b6(_0x486a03,_0x386e8f){_0x486a03=_0x486a03-0x7b;const _0x4e5faf=a7_0x4e5f();let _0x15b6c5=_0x4e5faf[_0x486a03];return _0x15b6c5;}(function(_0x634307,_0x56b985){const _0x44bdfb=a7_0x15b6,_0x355984=_0x634307();while(!![]){try{const _0x375ac2=parseInt(_0x44bdfb(0x88))/0x1+parseInt(_0x44bdfb(0x8e))/0x2*(-parseInt(_0x44bdfb(0x7e))/0x3)+-parseInt(_0x44bdfb(0x8c))/0x4*(parseInt(_0x44bdfb(0x83))/0x5)+parseInt(_0x44bdfb(0x89))/0x6*(-parseInt(_0x44bdfb(0x81))/0x7)+parseInt(_0x44bdfb(0x7f))/0x8*(-parseInt(_0x44bdfb(0x90))/0x9)+-parseInt(_0x44bdfb(0x85))/0xa*(-parseInt(_0x44bdfb(0x8b))/0xb)+-parseInt(_0x44bdfb(0x92))/0xc*(-parseInt(_0x44bdfb(0x84))/0xd);if(_0x375ac2===_0x56b985)break;else _0x355984['push'](_0x355984['shift']());}catch(_0x3165a6){_0x355984['push'](_0x355984['shift']());}}}(a7_0x4e5f,0x4c94d));function a7_0x4e5f(){const _0xbb03b8=['currentApp','80hMKxtC','13lEiUCG','260eTnEuB','isCurrent','local','38074vVamHi','44028ReSGjC','find','124839IOUcFh','93680OYnVYR','name','112iLkYxq','named','9RFtoyT','trim','16034064ESmTFX','appcode','defaultApp','appCode','22653CXXqoY','3818792hJeBPN','definedIn','77MCYRDB'];a7_0x4e5f=function(){return _0xbb03b8;};return a7_0x4e5f();}export function enrichAppListItemsWithMergedSelection(_0x27682a,_0x4ad5de){const _0x4dbc28=a7_0x15b6;if(!_0x4ad5de)return;const _0x215423=!!(_0x4ad5de[_0x4dbc28(0x82)]??_0x4ad5de[_0x4dbc28(0x7c)]);for(const _0x39d795 of _0x27682a){_0x39d795['isCurrent']=![];}const _0x210edb=_0x4ad5de[_0x4dbc28(0x7d)]!=null?String(_0x4ad5de[_0x4dbc28(0x7d)])[_0x4dbc28(0x91)]():'';if(_0x215423){const _0x2034a6=_0x4ad5de[_0x4dbc28(0x82)]??_0x4ad5de[_0x4dbc28(0x7c)];if(_0x2034a6){const _0x3a32dc=_0x27682a['find'](_0xa840e2=>_0xa840e2[_0x4dbc28(0x8f)]===!![]&&_0xa840e2[_0x4dbc28(0x8d)]===_0x2034a6&&_0xa840e2[_0x4dbc28(0x80)]===_0x4dbc28(0x87)),_0x42d64f=_0x3a32dc??_0x27682a['find'](_0x5177ec=>_0x5177ec[_0x4dbc28(0x8f)]===!![]&&_0x5177ec[_0x4dbc28(0x8d)]===_0x2034a6);if(_0x42d64f){const _0x32930e=String(_0x42d64f['appcode']??'')[_0x4dbc28(0x91)]();if(!_0x210edb||_0x32930e===_0x210edb){_0x42d64f[_0x4dbc28(0x86)]=!![];return;}}}if(_0x210edb){const _0x300393=_0x27682a[_0x4dbc28(0x8a)](_0x228ffb=>String(_0x228ffb[_0x4dbc28(0x7b)]??'')[_0x4dbc28(0x91)]()===_0x210edb);_0x300393&&(_0x300393[_0x4dbc28(0x86)]=!![]);}return;}if(!_0x210edb)return;for(const _0x5e15ea of _0x27682a){String(_0x5e15ea[_0x4dbc28(0x7b)]??'')['trim']()===_0x210edb&&(_0x5e15ea['isCurrent']=!![]);}}
@@ -1 +1 @@
1
- const a8_0x4ea584=a8_0x3172;(function(_0x1b3d8d,_0x3e0f76){const _0x1fd4c1=a8_0x3172,_0x35e4b7=_0x1b3d8d();while(!![]){try{const _0x4534b8=parseInt(_0x1fd4c1(0xde))/0x1+-parseInt(_0x1fd4c1(0xd6))/0x2*(parseInt(_0x1fd4c1(0xd8))/0x3)+parseInt(_0x1fd4c1(0xd4))/0x4+parseInt(_0x1fd4c1(0xe1))/0x5*(-parseInt(_0x1fd4c1(0xdd))/0x6)+-parseInt(_0x1fd4c1(0xdc))/0x7+parseInt(_0x1fd4c1(0xe9))/0x8*(parseInt(_0x1fd4c1(0xda))/0x9)+parseInt(_0x1fd4c1(0xe3))/0xa*(-parseInt(_0x1fd4c1(0xe2))/0xb);if(_0x4534b8===_0x3e0f76)break;else _0x35e4b7['push'](_0x35e4b7['shift']());}catch(_0x33afcf){_0x35e4b7['push'](_0x35e4b7['shift']());}}}(a8_0x5553,0xd1c37));import{getRuntimeAppConfigByKey}from'../../core/api-client.js';function a8_0x3172(_0x22134c,_0x4ee12f){_0x22134c=_0x22134c-0xd3;const _0x55538e=a8_0x5553();let _0x317238=_0x55538e[_0x22134c];return _0x317238;}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const appConfigGet={'service':a8_0x4ea584(0xe5),'command':a8_0x4ea584(0xd5),'description':a8_0x4ea584(0xe7),'risk':a8_0x4ea584(0xdf),'args':[{'name':a8_0x4ea584(0xd3),'description':a8_0x4ea584(0xe8),'required':!![]}],'flags':[],async 'execute'(_0x3d601c){const _0x1ad2ff=a8_0x4ea584,_0x5c6c5a=_0x3d601c[_0x1ad2ff(0xe6)][0x0]?.['trim']();if(!_0x5c6c5a)throw CliErrors['validation']('Missing\x20app-config\x20key.','Usage:\x20'+CLI_BIN_NAME+_0x1ad2ff(0xd9));try{const _0x2d5c5d=await getRuntimeAppConfigByKey(_0x3d601c['appCode'],_0x5c6c5a);return{'ok':!![],'data':_0x2d5c5d};}catch{throw CliErrors[_0x1ad2ff(0xd7)](_0x1ad2ff(0xe0)+_0x5c6c5a+_0x1ad2ff(0xdb)+_0x3d601c[_0x1ad2ff(0xe4)],'Check\x20that\x20the\x20key\x20exists,\x20the\x20current\x20AccessKey\x20has\x20permission,\x20and\x20the\x20runtime\x20app-config\x20endpoint\x20is\x20available.');}}};function a8_0x5553(){const _0xe845b1=['Get\x20one\x20runtime\x20app-config\x20value\x20by\x20key','App\x20config\x20key','26312qLgGOF','key','994804naJrxx','get','68owrbwS','apiError','12876iLbgEP','\x20app-config\x20get\x20<key>','4545mYVZtd',',\x20appCode=','6520087SWVIkV','6WMyYyW','1437084MlqSpJ','read','Unable\x20to\x20get\x20app-config\x20value:\x20key=','981395vWITqv','11OStIJs','12138910uLSLdq','appCode','app-config','args'];a8_0x5553=function(){return _0xe845b1;};return a8_0x5553();}
1
+ const a8_0x51eb5d=a8_0x441c;(function(_0x4c9a4e,_0xaadaa6){const _0x3ba2b6=a8_0x441c,_0x354f85=_0x4c9a4e();while(!![]){try{const _0x412585=-parseInt(_0x3ba2b6(0xd3))/0x1+parseInt(_0x3ba2b6(0xcd))/0x2+parseInt(_0x3ba2b6(0xcc))/0x3+-parseInt(_0x3ba2b6(0xda))/0x4+-parseInt(_0x3ba2b6(0xc6))/0x5*(-parseInt(_0x3ba2b6(0xce))/0x6)+parseInt(_0x3ba2b6(0xd0))/0x7+parseInt(_0x3ba2b6(0xd4))/0x8*(parseInt(_0x3ba2b6(0xc5))/0x9);if(_0x412585===_0xaadaa6)break;else _0x354f85['push'](_0x354f85['shift']());}catch(_0x4f915b){_0x354f85['push'](_0x354f85['shift']());}}}(a8_0x2dc8,0xb3d7e));import{getRuntimeAppConfigByKey}from'../../core/api-client.js';function a8_0x2dc8(){const _0x8b11a=['2490btCecL','app-config','4168269YRKmrQ','apiError','trim','1201029iaZxUG','6254824ouJuel','args','Get\x20one\x20runtime\x20app-config\x20value\x20by\x20key','appCode','read','validation','5513904pXqrKL','9ygTpcp','75VSclBL','\x20app-config\x20get\x20<key>','Missing\x20app-config\x20key.',',\x20appCode=','Unable\x20to\x20get\x20app-config\x20value:\x20key=','get','1740897ixDQUu','2704598MYYVsF'];a8_0x2dc8=function(){return _0x8b11a;};return a8_0x2dc8();}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a8_0x441c(_0x308cc2,_0x12113f){_0x308cc2=_0x308cc2-0xc5;const _0x2dc8c9=a8_0x2dc8();let _0x441c10=_0x2dc8c9[_0x308cc2];return _0x441c10;}export const appConfigGet={'service':a8_0x51eb5d(0xcf),'command':a8_0x51eb5d(0xcb),'description':a8_0x51eb5d(0xd6),'risk':a8_0x51eb5d(0xd8),'args':[{'name':'key','description':'App\x20config\x20key','required':!![]}],'flags':[],async 'execute'(_0x5894d0){const _0x4d1018=a8_0x51eb5d,_0x24eb01=_0x5894d0[_0x4d1018(0xd5)][0x0]?.[_0x4d1018(0xd2)]();if(!_0x24eb01)throw CliErrors[_0x4d1018(0xd9)](_0x4d1018(0xc8),'Usage:\x20'+CLI_BIN_NAME+_0x4d1018(0xc7));try{const _0x4f72bd=await getRuntimeAppConfigByKey(_0x5894d0['appCode'],_0x24eb01);return{'ok':!![],'data':_0x4f72bd};}catch{throw CliErrors[_0x4d1018(0xd1)](_0x4d1018(0xca)+_0x24eb01+_0x4d1018(0xc9)+_0x5894d0[_0x4d1018(0xd7)],'Check\x20that\x20the\x20key\x20exists,\x20the\x20current\x20AccessKey\x20has\x20permission,\x20and\x20the\x20runtime\x20app-config\x20endpoint\x20is\x20available.');}}};
@@ -1 +1 @@
1
- function a9_0x1715(){const _0x213e3a=['4mlTZmt','669114FVvXTM','5579195GVIvZl','171roqxTq','260328yFVIYZ','7GCVDmB','22lVbSNT','11884XMEMiF','1263hjzsKg','6613730GRlBpj','609097smaSaJ','9234492oWfaMB'];a9_0x1715=function(){return _0x213e3a;};return a9_0x1715();}(function(_0x38af84,_0x183771){const _0x16a6fa=a9_0x49f2,_0x56cbdd=_0x38af84();while(!![]){try{const _0x1b6384=-parseInt(_0x16a6fa(0x168))/0x1*(-parseInt(_0x16a6fa(0x16a))/0x2)+-parseInt(_0x16a6fa(0x166))/0x3*(parseInt(_0x16a6fa(0x165))/0x4)+parseInt(_0x16a6fa(0x16c))/0x5+-parseInt(_0x16a6fa(0x16b))/0x6*(parseInt(_0x16a6fa(0x163))/0x7)+parseInt(_0x16a6fa(0x16e))/0x8*(parseInt(_0x16a6fa(0x16d))/0x9)+parseInt(_0x16a6fa(0x167))/0xa+parseInt(_0x16a6fa(0x164))/0xb*(-parseInt(_0x16a6fa(0x169))/0xc);if(_0x1b6384===_0x183771)break;else _0x56cbdd['push'](_0x56cbdd['shift']());}catch(_0x1cb6a9){_0x56cbdd['push'](_0x56cbdd['shift']());}}}(a9_0x1715,0xade65));import{appConfigGet}from'../../commands/app-config/get.js';function a9_0x49f2(_0x570b27,_0x27bc08){_0x570b27=_0x570b27-0x163;const _0x171591=a9_0x1715();let _0x49f235=_0x171591[_0x570b27];return _0x49f235;}export const appConfigDefinitions=[appConfigGet];
1
+ function a9_0x4c4e(){const _0x33ecc4=['6120jBlrGt','1190848xCCzqn','176TUnkGC','331495DJzkHP','1UaGWCy','12404UtzlLg','6201129PBCxcr','163648iWQOLr','5050RbUGgS','17220ensXuN','486LQaoBE'];a9_0x4c4e=function(){return _0x33ecc4;};return a9_0x4c4e();}function a9_0x3551(_0x17275f,_0x459347){_0x17275f=_0x17275f-0x153;const _0x4c4eda=a9_0x4c4e();let _0x355141=_0x4c4eda[_0x17275f];return _0x355141;}(function(_0x481e96,_0x3c0c05){const _0x201c9c=a9_0x3551,_0x58d864=_0x481e96();while(!![]){try{const _0x80698d=parseInt(_0x201c9c(0x15b))/0x1*(parseInt(_0x201c9c(0x153))/0x2)+parseInt(_0x201c9c(0x155))/0x3*(parseInt(_0x201c9c(0x159))/0x4)+-parseInt(_0x201c9c(0x15a))/0x5+parseInt(_0x201c9c(0x156))/0x6*(-parseInt(_0x201c9c(0x15c))/0x7)+-parseInt(_0x201c9c(0x158))/0x8+-parseInt(_0x201c9c(0x157))/0x9*(parseInt(_0x201c9c(0x154))/0xa)+parseInt(_0x201c9c(0x15d))/0xb;if(_0x80698d===_0x3c0c05)break;else _0x58d864['push'](_0x58d864['shift']());}catch(_0x46de29){_0x58d864['push'](_0x58d864['shift']());}}}(a9_0x4c4e,0x2fdc4));import{appConfigGet}from'../../commands/app-config/get.js';export const appConfigDefinitions=[appConfigGet];
@@ -1 +1 @@
1
- const a10_0x6af267=a10_0x4d6a;(function(_0x3f882e,_0x1db648){const _0x41a189=a10_0x4d6a,_0xe42f94=_0x3f882e();while(!![]){try{const _0x3b566a=-parseInt(_0x41a189(0x100))/0x1+-parseInt(_0x41a189(0x101))/0x2*(-parseInt(_0x41a189(0x12d))/0x3)+parseInt(_0x41a189(0xf6))/0x4+-parseInt(_0x41a189(0x119))/0x5*(-parseInt(_0x41a189(0xeb))/0x6)+-parseInt(_0x41a189(0x102))/0x7*(-parseInt(_0x41a189(0x117))/0x8)+parseInt(_0x41a189(0xe6))/0x9+-parseInt(_0x41a189(0x11f))/0xa;if(_0x3b566a===_0x1db648)break;else _0xe42f94['push'](_0xe42f94['shift']());}catch(_0x1ab373){_0xe42f94['push'](_0xe42f94['shift']());}}}(a10_0x3e87,0xd8a2e));import{existsSync,readFileSync,statSync}from'node:fs';import{createRuntimeArtifact,getRuntimeArtifact,listRuntimeArtifacts,updateRuntimeArtifact}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const ARTIFACT_TYPE_REACT_MODULE=a10_0x6af267(0x129),ARTIFACT_SOURCE_AGENT='AGENT',ALLOWED_REACT_MODULE_IMPORTS=['react',a10_0x6af267(0xf4),a10_0x6af267(0x120),a10_0x6af267(0x10b),a10_0x6af267(0x108),a10_0x6af267(0x131)];export const ALLOWED_REACT_MODULE_IMPORTS_TEXT=ALLOWED_REACT_MODULE_IMPORTS[a10_0x6af267(0xfe)](',\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':a10_0x6af267(0x11a),'type':a10_0x6af267(0xee),'required':!![],'description':a10_0x6af267(0xf9)},ARTIFACT_NAME_FLAG={'name':a10_0x6af267(0x123),'type':a10_0x6af267(0xee),'description':a10_0x6af267(0x109)},METADATA_FLAG={'name':a10_0x6af267(0x124),'type':'string','description':'Artifact\x20metadata\x20as\x20JSON\x20object;\x20compiledContent\x20is\x20stripped'};function isPlainObject(_0x45b61d){const _0x3729b6=a10_0x6af267;return typeof _0x45b61d===_0x3729b6(0xfb)&&_0x45b61d!==null&&!Array['isArray'](_0x45b61d);}function readSourceFile(_0xd4372d){const _0x5803fa=a10_0x6af267;if(!_0xd4372d)throw CliErrors[_0x5803fa(0x10d)](_0x5803fa(0x12b));if(!existsSync(_0xd4372d))throw CliErrors['validation'](_0x5803fa(0x10c)+_0xd4372d);if(!statSync(_0xd4372d)[_0x5803fa(0x130)]())throw CliErrors[_0x5803fa(0x10d)](_0x5803fa(0x105)+_0xd4372d);const _0x4332af=readFileSync(_0xd4372d,'utf8');return validateReactModuleSource(_0x4332af),_0x4332af;}function parseMetadata(_0x129047){const _0x28c15e=a10_0x6af267;if(!_0x129047)return undefined;let _0x50109f;try{_0x50109f=JSON[_0x28c15e(0x104)](_0x129047);}catch{throw CliErrors[_0x28c15e(0x10d)](_0x28c15e(0xf2)+_0x129047);}if(!isPlainObject(_0x50109f))throw CliErrors['validation']('--metadata\x20must\x20be\x20a\x20JSON\x20object.');const _0x4ab1c6={..._0x50109f};return delete _0x4ab1c6['compiledContent'],_0x4ab1c6;}function a10_0x4d6a(_0x44f4db,_0x37172f){_0x44f4db=_0x44f4db-0xe5;const _0x3e87ec=a10_0x3e87();let _0x4d6ae0=_0x3e87ec[_0x44f4db];return _0x4d6ae0;}function getPackageName(_0x5481f9){const _0x42d644=a10_0x6af267;if(_0x5481f9[_0x42d644(0xf1)]('@')){const [_0x5e7a2c,_0x590143]=_0x5481f9[_0x42d644(0xe5)]('/');return _0x5e7a2c&&_0x590143?_0x5e7a2c+'/'+_0x590143:_0x5481f9;}return _0x5481f9[_0x42d644(0xe5)]('/')[0x0]||_0x5481f9;}function validateAllowedImports(_0x3eee8b){const _0x2edddc=a10_0x6af267,_0x3d2ef9=new Set();for(const _0x5541f6 of IMPORT_SOURCE_PATTERNS){_0x5541f6[_0x2edddc(0x113)]=0x0;let _0x5a15d9;while((_0x5a15d9=_0x5541f6[_0x2edddc(0x127)](_0x3eee8b))!==null){const _0x5580d1=_0x5a15d9[0x1]?.[_0x2edddc(0x11e)]();_0x5580d1&&_0x3d2ef9[_0x2edddc(0x11b)](_0x5580d1);}}const _0x1f8f3e=[..._0x3d2ef9][_0x2edddc(0x111)](getPackageName)[_0x2edddc(0xe7)](_0xd24b16=>!ALLOWED_REACT_MODULE_IMPORTS[_0x2edddc(0x12f)](_0xd24b16));if(_0x1f8f3e[_0x2edddc(0x107)]>0x0)throw CliErrors[_0x2edddc(0x10d)](_0x2edddc(0xf8)+ALLOWED_REACT_MODULE_IMPORTS_TEXT+_0x2edddc(0xed)+[...new Set(_0x1f8f3e)]['join'](',\x20'));}export function validateReactModuleSource(_0x308a87){const _0x35f981=a10_0x6af267;if(!_0x308a87[_0x35f981(0x11e)]())throw CliErrors['validation']('Artifact\x20source\x20file\x20is\x20blank.');if(PAGE_LEVEL_PATTERNS[_0x35f981(0xea)](_0x255ff5=>_0x255ff5[_0x35f981(0x10a)](_0x308a87)))throw CliErrors[_0x35f981(0x10d)](_0x35f981(0xf3));validateAllowedImports(_0x308a87);}function a10_0x3e87(){const _0x58707b=['Optional\x20source\x20filter,\x20for\x20example\x20AGENT','includes','isFile','@ant-design/icons','artifactType','verbose','split','6985962LHxXcr','filter','Artifact\x20ID','/update','some','6nYWalf','boolean','.\x20Unsupported:\x20','string','/client/artifact/create','bool','startsWith','Invalid\x20JSON\x20for\x20--metadata:\x20','react_module\x20must\x20be\x20an\x20embeddable\x20React\x20module,\x20not\x20full\x20HTML\x20or\x20a\x20ReactDOM/createRoot\x20mount\x20entry.','react-dom','detail','1953016Ydugvi','Show\x20one\x20Artifact\x20by\x20id','react_module\x20imports\x20are\x20limited\x20to:\x20','Path\x20to\x20a\x20local\x20UTF-8\x20React\x20module\x20source\x20file','Update\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','object','read','source','join','num','579348RrEPzq','2rqSOpL','2534THyzym','body','parse','File\x20is\x20not\x20a\x20regular\x20file:\x20','appCode','length','antd','Artifact\x20display\x20name','test','dayjs','File\x20not\x20found:\x20','validation','Created\x20Artifact\x20','updateTime','description','map','artifact','lastIndex','build','flag','favorite','960xDSVzW','content','4632570dUPRnL','file','add','POST','deleted','trim','11874100kEgEPB','lodash','compiledContent','Updated\x20Artifact\x20','name','metadata','Optional\x20favorite-state\x20filter','Create\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','exec','str','react_module','update','File\x20path\x20is\x20required.','createTime','1259022wGYOTT'];a10_0x3e87=function(){return _0x58707b;};return a10_0x3e87();}function buildArtifactInput(_0x5199fb){const _0x3b5095=a10_0x6af267,_0x264ea8=readSourceFile(_0x5199fb[_0x3b5095(0x128)](_0x3b5095(0x11a))),_0x2bae1e=_0x5199fb[_0x3b5095(0x128)](_0x3b5095(0x123))[_0x3b5095(0x11e)](),_0x27b6cc=parseMetadata(_0x5199fb[_0x3b5095(0x128)](_0x3b5095(0x124)));return{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x2bae1e?{'name':_0x2bae1e}:{},'content':_0x264ea8,..._0x27b6cc?{'metadata':_0x27b6cc}:{},'source':ARTIFACT_SOURCE_AGENT};}function summarizeArtifact(_0x493f78){const _0x1a469b=a10_0x6af267;return{'id':_0x493f78['id'],'name':_0x493f78[_0x1a469b(0x123)],'artifactType':_0x493f78[_0x1a469b(0x132)],'source':_0x493f78[_0x1a469b(0xfd)],'favorite':_0x493f78[_0x1a469b(0x116)],'deleted':_0x493f78[_0x1a469b(0x11d)],'createTime':_0x493f78['createTime'],'updateTime':_0x493f78[_0x1a469b(0x10f)]};}function detailArtifact(_0x125783){const _0x36cd0d=a10_0x6af267;return{'id':_0x125783['id'],'appCode':_0x125783[_0x36cd0d(0x106)],'name':_0x125783[_0x36cd0d(0x123)],'artifactType':_0x125783[_0x36cd0d(0x132)],'source':_0x125783[_0x36cd0d(0xfd)],'favorite':_0x125783[_0x36cd0d(0x116)],'deleted':_0x125783[_0x36cd0d(0x11d)],'content':_0x125783[_0x36cd0d(0x118)]??'','compiledContent':_0x125783[_0x36cd0d(0x121)],'metadata':_0x125783['metadata']??{},'createTime':_0x125783[_0x36cd0d(0x12c)],'updateTime':_0x125783[_0x36cd0d(0x10f)]};}function readFavoriteFlag(_0x1deeb2){const _0x3eb271=a10_0x6af267,_0x86777c=_0x1deeb2[_0x3eb271(0x115)](_0x3eb271(0x116));return _0x86777c===undefined||_0x86777c===null||_0x86777c===''?undefined:_0x1deeb2[_0x3eb271(0xf0)](_0x3eb271(0x116));}const artifactList={'service':'artifact','command':'list','description':'List\x20current-app\x20react_module\x20Artifacts','risk':a10_0x6af267(0xfc),'flags':[{'name':a10_0x6af267(0xfd),'type':a10_0x6af267(0xee),'description':a10_0x6af267(0x12e)},{'name':a10_0x6af267(0x116),'type':a10_0x6af267(0xec),'description':a10_0x6af267(0x125)},VERBOSE_FLAG],async 'execute'(_0xffd7b0){const _0x5dd91c=a10_0x6af267,_0xd137f6=await listRuntimeArtifacts(_0xffd7b0[_0x5dd91c(0x106)],{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0xffd7b0[_0x5dd91c(0x128)]('source')?{'source':_0xffd7b0[_0x5dd91c(0x128)](_0x5dd91c(0xfd))}:{},...readFavoriteFlag(_0xffd7b0)!==undefined?{'favorite':readFavoriteFlag(_0xffd7b0)}:{}});return{'ok':!![],'data':{'total':_0xd137f6[_0x5dd91c(0x107)],'items':_0xffd7b0[_0x5dd91c(0xf0)](_0x5dd91c(0x133))?_0xd137f6:_0xd137f6[_0x5dd91c(0x111)](summarizeArtifact)}};}},artifactDetail={'service':a10_0x6af267(0x112),'command':a10_0x6af267(0xf5),'description':a10_0x6af267(0xf7),'risk':'read','flags':[{...ID_FLAG,'description':'Artifact\x20ID'}],async 'execute'(_0x15fc44){const _0x4afbf3=await getRuntimeArtifact(_0x15fc44['num']('id'),_0x15fc44['appCode']);return{'ok':!![],'data':detailArtifact(_0x4afbf3)};}},artifactCreate={'service':a10_0x6af267(0x112),'command':'create','description':a10_0x6af267(0x126),'risk':a10_0x6af267(0xfc),'flags':[FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x5496f0){const _0x4346db=a10_0x6af267,_0xa93204=buildArtifactInput(_0x5496f0),_0x58bd73=await createRuntimeArtifact(_0x5496f0[_0x4346db(0x106)],_0xa93204);return{'ok':!![],'data':detailArtifact(_0x58bd73),'message':_0x4346db(0x10e)+_0x58bd73['id']+(_0x58bd73[_0x4346db(0x123)]?'\x20('+_0x58bd73[_0x4346db(0x123)]+')':'')};},async 'dryRun'(_0x3873ab){const _0x32d775=a10_0x6af267,_0x5ccbdf=buildArtifactInput(_0x3873ab);return dryRun(_0x32d775(0x11c),_0x32d775(0xef))[_0x32d775(0x103)]({'appCode':_0x3873ab[_0x32d775(0x106)],..._0x5ccbdf})[_0x32d775(0x110)]('Preview:\x20create\x20react_module\x20Artifact')[_0x32d775(0x114)]();}},artifactUpdate={'service':a10_0x6af267(0x112),'command':a10_0x6af267(0x12a),'description':a10_0x6af267(0xfa),'risk':a10_0x6af267(0xfc),'flags':[{...ID_FLAG,'description':a10_0x6af267(0xe8)},FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x1b727b){const _0x29572d=a10_0x6af267,_0x4fbc59=_0x1b727b[_0x29572d(0xff)]('id'),_0x4e545d=buildArtifactInput(_0x1b727b),_0x43c36d=await updateRuntimeArtifact(_0x4fbc59,_0x1b727b[_0x29572d(0x106)],_0x4e545d);return{'ok':!![],'data':detailArtifact(_0x43c36d),'message':_0x29572d(0x122)+_0x43c36d['id']+(_0x43c36d[_0x29572d(0x123)]?'\x20('+_0x43c36d[_0x29572d(0x123)]+')':'')};},async 'dryRun'(_0x27d524){const _0x3bc8d1=a10_0x6af267,_0x173e4a=_0x27d524[_0x3bc8d1(0xff)]('id'),_0x177217=buildArtifactInput(_0x27d524);return dryRun('POST','/client/artifact/'+_0x173e4a+_0x3bc8d1(0xe9))[_0x3bc8d1(0x103)]({'appCode':_0x27d524[_0x3bc8d1(0x106)],..._0x177217})[_0x3bc8d1(0x110)]('Preview:\x20update\x20react_module\x20Artifact\x20'+_0x173e4a)['build']();}};export const artifactDefinitions=[artifactList,artifactDetail,artifactCreate,artifactUpdate];
1
+ const a10_0x1c799c=a10_0x38a5;(function(_0x3a31ca,_0x3df13a){const _0x1786ff=a10_0x38a5,_0x2937a9=_0x3a31ca();while(!![]){try{const _0x17ad03=-parseInt(_0x1786ff(0xd5))/0x1*(-parseInt(_0x1786ff(0xe6))/0x2)+parseInt(_0x1786ff(0xd6))/0x3+-parseInt(_0x1786ff(0xce))/0x4*(parseInt(_0x1786ff(0x101))/0x5)+-parseInt(_0x1786ff(0xf3))/0x6+-parseInt(_0x1786ff(0xd2))/0x7*(parseInt(_0x1786ff(0xe4))/0x8)+-parseInt(_0x1786ff(0xde))/0x9+parseInt(_0x1786ff(0xf9))/0xa;if(_0x17ad03===_0x3df13a)break;else _0x2937a9['push'](_0x2937a9['shift']());}catch(_0x2c8d55){_0x2937a9['push'](_0x2937a9['shift']());}}}(a10_0x43ed,0x4749e));import{existsSync,readFileSync,statSync}from'node:fs';import{createRuntimeArtifact,getRuntimeArtifact,listRuntimeArtifacts,updateRuntimeArtifact}from'../../core/api-client.js';function a10_0x43ed(){const _0x347457=['Artifact\x20source\x20file\x20is\x20blank.','Artifact\x20ID','includes','body','2773608DEoOqM','source','40jFcGeN','isArray','flag','List\x20current-app\x20react_module\x20Artifacts','detail','trim','artifactType','build','Preview:\x20create\x20react_module\x20Artifact','Artifact\x20display\x20name','add','isFile','/client/artifact/','844128BMejsm','content','file','Optional\x20source\x20filter,\x20for\x20example\x20AGENT','read','.\x20Unsupported:\x20','14498210xsAnyy','length','join','startsWith','split','POST','bool','verbose','85vzilOj','create','description','File\x20is\x20not\x20a\x20regular\x20file:\x20','some','validation','AGENT','react_module\x20must\x20be\x20an\x20embeddable\x20React\x20module,\x20not\x20full\x20HTML\x20or\x20a\x20ReactDOM/createRoot\x20mount\x20entry.','/client/artifact/create','react_module','exec','metadata','Update\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','react_module\x20imports\x20are\x20limited\x20to:\x20','test','str','filter','updateTime','deleted','parse','compiledContent','Optional\x20favorite-state\x20filter','update','artifact','dayjs','react','appCode','86556kAWiJi','@ant-design/icons','string','Invalid\x20JSON\x20for\x20--metadata:\x20','7URKYGE','num','boolean','985PYwgpq','15918nTWllB','createTime','--metadata\x20must\x20be\x20a\x20JSON\x20object.','list','name','favorite','Create\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','map','2948193vTGaoQ','utf8'];a10_0x43ed=function(){return _0x347457;};return a10_0x43ed();}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=a10_0x1c799c(0x10a),ARTIFACT_SOURCE_AGENT=a10_0x1c799c(0x107),ALLOWED_REACT_MODULE_IMPORTS=[a10_0x1c799c(0xcc),'react-dom','lodash',a10_0x1c799c(0xcb),'antd',a10_0x1c799c(0xcf)];export const ALLOWED_REACT_MODULE_IMPORTS_TEXT=ALLOWED_REACT_MODULE_IMPORTS[a10_0x1c799c(0xfb)](',\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':a10_0x1c799c(0xf5),'type':a10_0x1c799c(0xd0),'required':!![],'description':'Path\x20to\x20a\x20local\x20UTF-8\x20React\x20module\x20source\x20file'},ARTIFACT_NAME_FLAG={'name':a10_0x1c799c(0xda),'type':'string','description':a10_0x1c799c(0xef)},METADATA_FLAG={'name':a10_0x1c799c(0xbe),'type':a10_0x1c799c(0xd0),'description':'Artifact\x20metadata\x20as\x20JSON\x20object;\x20compiledContent\x20is\x20stripped'};function isPlainObject(_0x32c49d){const _0x1d116e=a10_0x1c799c;return typeof _0x32c49d==='object'&&_0x32c49d!==null&&!Array[_0x1d116e(0xe7)](_0x32c49d);}function readSourceFile(_0x32adab){const _0x14dbeb=a10_0x1c799c;if(!_0x32adab)throw CliErrors['validation']('File\x20path\x20is\x20required.');if(!existsSync(_0x32adab))throw CliErrors[_0x14dbeb(0x106)]('File\x20not\x20found:\x20'+_0x32adab);if(!statSync(_0x32adab)[_0x14dbeb(0xf1)]())throw CliErrors['validation'](_0x14dbeb(0x104)+_0x32adab);const _0x14f7a7=readFileSync(_0x32adab,_0x14dbeb(0xdf));return validateReactModuleSource(_0x14f7a7),_0x14f7a7;}function parseMetadata(_0x1cbfa3){const _0x50e60b=a10_0x1c799c;if(!_0x1cbfa3)return undefined;let _0x2fb5f0;try{_0x2fb5f0=JSON[_0x50e60b(0xc6)](_0x1cbfa3);}catch{throw CliErrors[_0x50e60b(0x106)](_0x50e60b(0xd1)+_0x1cbfa3);}if(!isPlainObject(_0x2fb5f0))throw CliErrors['validation'](_0x50e60b(0xd8));const _0x3bbb4b={..._0x2fb5f0};return delete _0x3bbb4b[_0x50e60b(0xc7)],_0x3bbb4b;}function a10_0x38a5(_0x16fdf6,_0x12892c){_0x16fdf6=_0x16fdf6-0xbd;const _0x43ed1f=a10_0x43ed();let _0x38a51b=_0x43ed1f[_0x16fdf6];return _0x38a51b;}function getPackageName(_0x1ec26c){const _0xf5926b=a10_0x1c799c;if(_0x1ec26c[_0xf5926b(0xfc)]('@')){const [_0x22f394,_0x2d1e28]=_0x1ec26c['split']('/');return _0x22f394&&_0x2d1e28?_0x22f394+'/'+_0x2d1e28:_0x1ec26c;}return _0x1ec26c[_0xf5926b(0xfd)]('/')[0x0]||_0x1ec26c;}function validateAllowedImports(_0x52356f){const _0x5914c4=a10_0x1c799c,_0x2440bc=new Set();for(const _0x1f578c of IMPORT_SOURCE_PATTERNS){_0x1f578c['lastIndex']=0x0;let _0x223c35;while((_0x223c35=_0x1f578c[_0x5914c4(0xbd)](_0x52356f))!==null){const _0x463d77=_0x223c35[0x1]?.[_0x5914c4(0xeb)]();_0x463d77&&_0x2440bc[_0x5914c4(0xf0)](_0x463d77);}}const _0x553dda=[..._0x2440bc]['map'](getPackageName)[_0x5914c4(0xc3)](_0x45bb64=>!ALLOWED_REACT_MODULE_IMPORTS[_0x5914c4(0xe2)](_0x45bb64));if(_0x553dda[_0x5914c4(0xfa)]>0x0)throw CliErrors[_0x5914c4(0x106)](_0x5914c4(0xc0)+ALLOWED_REACT_MODULE_IMPORTS_TEXT+_0x5914c4(0xf8)+[...new Set(_0x553dda)][_0x5914c4(0xfb)](',\x20'));}export function validateReactModuleSource(_0x1eda59){const _0x1ba9b1=a10_0x1c799c;if(!_0x1eda59[_0x1ba9b1(0xeb)]())throw CliErrors[_0x1ba9b1(0x106)](_0x1ba9b1(0xe0));if(PAGE_LEVEL_PATTERNS[_0x1ba9b1(0x105)](_0x498adf=>_0x498adf[_0x1ba9b1(0xc1)](_0x1eda59)))throw CliErrors[_0x1ba9b1(0x106)](_0x1ba9b1(0x108));validateAllowedImports(_0x1eda59);}function buildArtifactInput(_0x5f3994){const _0x483c0b=a10_0x1c799c,_0x3a0857=readSourceFile(_0x5f3994[_0x483c0b(0xc2)](_0x483c0b(0xf5))),_0xf5d8dd=_0x5f3994['str'](_0x483c0b(0xda))[_0x483c0b(0xeb)](),_0x400246=parseMetadata(_0x5f3994[_0x483c0b(0xc2)](_0x483c0b(0xbe)));return{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0xf5d8dd?{'name':_0xf5d8dd}:{},'content':_0x3a0857,..._0x400246?{'metadata':_0x400246}:{},'source':ARTIFACT_SOURCE_AGENT};}function summarizeArtifact(_0x46435a){const _0x4c15cb=a10_0x1c799c;return{'id':_0x46435a['id'],'name':_0x46435a[_0x4c15cb(0xda)],'artifactType':_0x46435a[_0x4c15cb(0xec)],'source':_0x46435a[_0x4c15cb(0xe5)],'favorite':_0x46435a[_0x4c15cb(0xdb)],'deleted':_0x46435a[_0x4c15cb(0xc5)],'createTime':_0x46435a[_0x4c15cb(0xd7)],'updateTime':_0x46435a['updateTime']};}function detailArtifact(_0x15b397){const _0x3d7531=a10_0x1c799c;return{'id':_0x15b397['id'],'appCode':_0x15b397['appCode'],'name':_0x15b397['name'],'artifactType':_0x15b397[_0x3d7531(0xec)],'source':_0x15b397['source'],'favorite':_0x15b397[_0x3d7531(0xdb)],'deleted':_0x15b397[_0x3d7531(0xc5)],'content':_0x15b397[_0x3d7531(0xf4)]??'','compiledContent':_0x15b397[_0x3d7531(0xc7)],'metadata':_0x15b397['metadata']??{},'createTime':_0x15b397['createTime'],'updateTime':_0x15b397[_0x3d7531(0xc4)]};}function readFavoriteFlag(_0x3e1ad2){const _0xace610=a10_0x1c799c,_0x3443f0=_0x3e1ad2[_0xace610(0xe8)](_0xace610(0xdb));return _0x3443f0===undefined||_0x3443f0===null||_0x3443f0===''?undefined:_0x3e1ad2[_0xace610(0xff)](_0xace610(0xdb));}const artifactList={'service':a10_0x1c799c(0xca),'command':a10_0x1c799c(0xd9),'description':a10_0x1c799c(0xe9),'risk':a10_0x1c799c(0xf7),'flags':[{'name':a10_0x1c799c(0xe5),'type':a10_0x1c799c(0xd0),'description':a10_0x1c799c(0xf6)},{'name':a10_0x1c799c(0xdb),'type':a10_0x1c799c(0xd4),'description':a10_0x1c799c(0xc8)},VERBOSE_FLAG],async 'execute'(_0x17909c){const _0x15fe4d=a10_0x1c799c,_0x48d871=await listRuntimeArtifacts(_0x17909c[_0x15fe4d(0xcd)],{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x17909c['str']('source')?{'source':_0x17909c[_0x15fe4d(0xc2)](_0x15fe4d(0xe5))}:{},...readFavoriteFlag(_0x17909c)!==undefined?{'favorite':readFavoriteFlag(_0x17909c)}:{}});return{'ok':!![],'data':{'total':_0x48d871['length'],'items':_0x17909c[_0x15fe4d(0xff)](_0x15fe4d(0x100))?_0x48d871:_0x48d871[_0x15fe4d(0xdd)](summarizeArtifact)}};}},artifactDetail={'service':a10_0x1c799c(0xca),'command':a10_0x1c799c(0xea),'description':'Show\x20one\x20Artifact\x20by\x20id','risk':a10_0x1c799c(0xf7),'flags':[{...ID_FLAG,'description':a10_0x1c799c(0xe1)}],async 'execute'(_0x147727){const _0x10a8c5=a10_0x1c799c,_0x1c024d=await getRuntimeArtifact(_0x147727[_0x10a8c5(0xd3)]('id'),_0x147727[_0x10a8c5(0xcd)]);return{'ok':!![],'data':detailArtifact(_0x1c024d)};}},artifactCreate={'service':a10_0x1c799c(0xca),'command':a10_0x1c799c(0x102),'description':a10_0x1c799c(0xdc),'risk':'read','flags':[FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x26c92e){const _0x7a0d9d=a10_0x1c799c,_0x5c3603=buildArtifactInput(_0x26c92e),_0x2f1cf3=await createRuntimeArtifact(_0x26c92e[_0x7a0d9d(0xcd)],_0x5c3603);return{'ok':!![],'data':detailArtifact(_0x2f1cf3),'message':'Created\x20Artifact\x20'+_0x2f1cf3['id']+(_0x2f1cf3[_0x7a0d9d(0xda)]?'\x20('+_0x2f1cf3[_0x7a0d9d(0xda)]+')':'')};},async 'dryRun'(_0x4f5665){const _0x32f654=a10_0x1c799c,_0x24134c=buildArtifactInput(_0x4f5665);return dryRun(_0x32f654(0xfe),_0x32f654(0x109))[_0x32f654(0xe3)]({'appCode':_0x4f5665[_0x32f654(0xcd)],..._0x24134c})[_0x32f654(0x103)](_0x32f654(0xee))[_0x32f654(0xed)]();}},artifactUpdate={'service':a10_0x1c799c(0xca),'command':a10_0x1c799c(0xc9),'description':a10_0x1c799c(0xbf),'risk':a10_0x1c799c(0xf7),'flags':[{...ID_FLAG,'description':a10_0x1c799c(0xe1)},FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x8b5ac6){const _0x3ac2f5=a10_0x1c799c,_0x368837=_0x8b5ac6['num']('id'),_0x1caf7c=buildArtifactInput(_0x8b5ac6),_0x1b7784=await updateRuntimeArtifact(_0x368837,_0x8b5ac6[_0x3ac2f5(0xcd)],_0x1caf7c);return{'ok':!![],'data':detailArtifact(_0x1b7784),'message':'Updated\x20Artifact\x20'+_0x1b7784['id']+(_0x1b7784[_0x3ac2f5(0xda)]?'\x20('+_0x1b7784[_0x3ac2f5(0xda)]+')':'')};},async 'dryRun'(_0x3a1494){const _0x111ff0=a10_0x1c799c,_0x5d53c1=_0x3a1494[_0x111ff0(0xd3)]('id'),_0x493251=buildArtifactInput(_0x3a1494);return dryRun('POST',_0x111ff0(0xf2)+_0x5d53c1+'/update')[_0x111ff0(0xe3)]({'appCode':_0x3a1494['appCode'],..._0x493251})['description']('Preview:\x20update\x20react_module\x20Artifact\x20'+_0x5d53c1)[_0x111ff0(0xed)]();}};export const artifactDefinitions=[artifactList,artifactDetail,artifactCreate,artifactUpdate];
@@ -1 +1 @@
1
- const a11_0x48c11=a11_0x2ca9;(function(_0xcddaad,_0x3d7103){const _0x1b03cf=a11_0x2ca9,_0x1f501c=_0xcddaad();while(!![]){try{const _0x5b2fec=parseInt(_0x1b03cf(0x1b2))/0x1*(-parseInt(_0x1b03cf(0x1b6))/0x2)+parseInt(_0x1b03cf(0x1d8))/0x3*(-parseInt(_0x1b03cf(0x1d2))/0x4)+parseInt(_0x1b03cf(0x1de))/0x5*(parseInt(_0x1b03cf(0x1dd))/0x6)+-parseInt(_0x1b03cf(0x1c1))/0x7*(-parseInt(_0x1b03cf(0x1cc))/0x8)+parseInt(_0x1b03cf(0x1db))/0x9*(parseInt(_0x1b03cf(0x1c3))/0xa)+-parseInt(_0x1b03cf(0x1cb))/0xb+parseInt(_0x1b03cf(0x1a4))/0xc;if(_0x5b2fec===_0x3d7103)break;else _0x1f501c['push'](_0x1f501c['shift']());}catch(_0x2cb30b){_0x1f501c['push'](_0x1f501c['shift']());}}}(a11_0x5b23,0x6ea31));import{existsSync,mkdirSync,readFileSync,unlinkSync,writeFileSync}from'node:fs';import{dirname}from'node:path';import{homedir}from'node:os';function a11_0x5b23(){const _0x589cda=['Invalid\x20access_key\x20returned\x20by\x20server.','log','1375800YYhiEI','\x0dWaiting\x20for\x20authorization...\x20','success','\x20auth\x20status','status','access_key','stderr','Already\x20authorized.\x20Use\x20`lovrabet\x20auth\x20status`\x20to\x20verify.','scope','global','Device\x20authorization\x20successful.','Open\x20this\x20URL\x20in\x20your\x20browser\x20to\x20authorize:','code','object','1709lrEVYB','Device\x20authorization\x20cancelled.','homeDirName','POST','234YHqImp','createdAt','project','/device-auth?code=','Device\x20authorization\x20URL\x20printed.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20re-run.','Write\x20to\x20global\x20config\x20(default)','lovrabet-cli','json','signal','After\x20authorizing,\x20re-run:\x20','floor','2930753GzhFpR','Device\x20auth\x20API\x20unreachable\x20after\x20multiple\x20retries.','4927830xyatQZ','toISOString','write','Device\x20auth\x20API\x20returned\x20HTTP\x20','global-default','string','data','aborted','3156626HudEmc','8KRktDo','url-only','Device\x20authorization\x20timed\x20out\x20after\x2010\x20minutes.\x20Run\x20`lovrabet\x20auth\x20device`\x20to\x20get\x20a\x20new\x20code.','networkError','trim','auth','156IXoKat','now','/api/device-auth/token','Invalid\x20device\x20auth\x20response','getTime','SIGINT','64023MBLjsj','Device\x20auth\x20API\x20error\x20(','\x20remaining','9tVKWUq','stringify','895530rVXgeC','25GDmnXs','padStart','boolean','accessKey','bool','utf8','cancelled','apiError','Verify:\x20','removeListener','str','source','Print\x20URL\x20to\x20stdout\x20and\x20exit\x20(for\x20WorkBuddy\x20integration)','validation','AccessKey\x20saved\x20to\x20','abort','test','name','Authorize\x20with\x20the\x20device-code\x20flow\x20(complete\x20in\x20the\x20browser;\x20no\x20copy-paste\x20required)'];a11_0x5b23=function(){return _0x589cda;};return a11_0x5b23();}import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG}from'../../constant/product.js';import{getUserDomain}from'../../constant/domain.js';import{CliErrors}from'../../errors.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';function resolveAuthScopeFlags(_0x335bb2){const _0x2a804e=a11_0x2ca9;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x335bb2[_0x2a804e(0x193)](_0x2a804e(0x1ad)),'explicitProject':_0x335bb2[_0x2a804e(0x193)](_0x2a804e(0x1b8)),'policy':_0x2a804e(0x1c7)}));}const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/,DEVICE_CODE_TTL_MS=0x927c0,POLL_INTERVAL_MS=0xbb8,MAX_POLLS=0xc8,MAX_CONSECUTIVE_NETWORK_ERRORS=0x5;function a11_0x2ca9(_0xd4190c,_0x33ffa6){_0xd4190c=_0xd4190c-0x191;const _0x5b23e4=a11_0x5b23();let _0x2ca9cf=_0x5b23e4[_0xd4190c];return _0x2ca9cf;}export function generateDeviceCode(){return crypto['randomUUID']();}export function buildDeviceAuthUrl(_0x1748d6,_0x29f141,_0x470891=a11_0x48c11(0x1bc)){const _0x1855cf=a11_0x48c11;return _0x1748d6+_0x1855cf(0x1b9)+encodeURIComponent(_0x29f141)+'&source='+encodeURIComponent(_0x470891);}export function getDeviceCodePath(){const _0x1ea22e=a11_0x48c11;return homedir()+'/'+PRODUCT_CONFIG[_0x1ea22e(0x1b4)]+'/.device-auth';}export function readStoredDeviceCode(){const _0x249a01=a11_0x48c11,_0x4ef2d9=getDeviceCodePath();if(!existsSync(_0x4ef2d9))return null;try{const _0x2297d2=readFileSync(_0x4ef2d9,{'encoding':'utf8'}),_0x130321=JSON['parse'](_0x2297d2);if(_0x130321&&typeof _0x130321[_0x249a01(0x1b0)]===_0x249a01(0x1c8)&&typeof _0x130321[_0x249a01(0x1b7)]===_0x249a01(0x1c8)&&(_0x130321[_0x249a01(0x1ac)]==='global'||_0x130321[_0x249a01(0x1ac)]===_0x249a01(0x1b8)))return _0x130321;}catch{}return null;}export function writeStoredDeviceCode(_0x2bd572,_0x9721cb){const _0x30f0fc=a11_0x48c11,_0x1b4d82=getDeviceCodePath(),_0x4e5508=dirname(_0x1b4d82);!existsSync(_0x4e5508)&&mkdirSync(_0x4e5508,{'recursive':!![]});const _0xedc929={'code':_0x2bd572,'createdAt':new Date()[_0x30f0fc(0x1c4)](),'scope':_0x9721cb};writeFileSync(_0x1b4d82,JSON[_0x30f0fc(0x1dc)](_0xedc929),{'encoding':_0x30f0fc(0x194),'mode':0x180});}export function deleteStoredDeviceCode(){const _0xce2cff=getDeviceCodePath();try{unlinkSync(_0xce2cff);}catch{}}export function isStoredDeviceCodeExpired(_0x52318a){const _0xa98fc0=a11_0x48c11;return Date[_0xa98fc0(0x1d3)]()-new Date(_0x52318a[_0xa98fc0(0x1b7)])[_0xa98fc0(0x1d6)]()>DEVICE_CODE_TTL_MS;}export async function fetchDeviceToken(_0x4b8288,_0x3ad25c){const _0x30cba6=a11_0x48c11,_0x142f0d=_0x4b8288+_0x30cba6(0x1d4),_0x3e9cdc=new AbortController(),_0x348a2c=setTimeout(()=>_0x3e9cdc[_0x30cba6(0x19e)](),0x2710),_0x43f184=await fetch(_0x142f0d,{'method':_0x30cba6(0x1b5),'headers':{'Content-Type':'application/json'},'body':JSON[_0x30cba6(0x1dc)]({'code':_0x3ad25c}),'signal':_0x3e9cdc[_0x30cba6(0x1be)]});clearTimeout(_0x348a2c);if(!_0x43f184['ok'])throw CliErrors['networkError'](_0x30cba6(0x1c6)+_0x43f184['status']);const _0x17df49=await _0x43f184[_0x30cba6(0x1bd)](),_0x4397ec=_0x17df49[_0x30cba6(0x1c9)]&&typeof _0x17df49[_0x30cba6(0x1c9)]===_0x30cba6(0x1b1)?_0x17df49['data']:_0x17df49;if(!_0x4397ec||typeof _0x4397ec[_0x30cba6(0x1a8)]!==_0x30cba6(0x1c8))throw CliErrors[_0x30cba6(0x196)](_0x30cba6(0x1d5));return{'status':_0x4397ec[_0x30cba6(0x1a8)],'access_key':typeof _0x4397ec[_0x30cba6(0x1a9)]==='string'?_0x4397ec[_0x30cba6(0x1a9)]:undefined};}export async function pollDeviceToken(_0x1e282a,_0x23398e,_0x18cd99){const _0xb80c0a=a11_0x48c11;let _0x385638=0x0;for(let _0x2b773a=0x0;_0x2b773a<MAX_POLLS;_0x2b773a++){if(_0x18cd99[_0xb80c0a(0x1ca)])throw CliErrors[_0xb80c0a(0x195)](_0xb80c0a(0x1b3));let _0x2cb572;try{_0x2cb572=await fetchDeviceToken(_0x1e282a,_0x23398e);}catch(_0x2a99c6){if(_0x2a99c6 instanceof Error&&_0x2a99c6[_0xb80c0a(0x1a0)]==='AbortError')throw CliErrors[_0xb80c0a(0x195)](_0xb80c0a(0x1b3));_0x385638++;if(_0x385638>=MAX_CONSECUTIVE_NETWORK_ERRORS)throw CliErrors[_0xb80c0a(0x1cf)](_0xb80c0a(0x1c2));writeCliSideChannelLine(_0xb80c0a(0x1d9)+_0x385638+'/'+MAX_CONSECUTIVE_NETWORK_ERRORS+'),\x20retrying...'),await sleep(POLL_INTERVAL_MS);continue;}_0x385638=0x0;if(_0x2cb572[_0xb80c0a(0x1a8)]===_0xb80c0a(0x1a6)){if(!_0x2cb572[_0xb80c0a(0x1a9)])throw CliErrors[_0xb80c0a(0x196)](_0xb80c0a(0x1a2));return _0x2cb572[_0xb80c0a(0x1a9)];}if(_0x2cb572['status']==='expired'){deleteStoredDeviceCode();throw CliErrors[_0xb80c0a(0x19c)]('Device\x20code\x20expired.\x20Run\x20`lovrabet\x20auth\x20device`\x20to\x20get\x20a\x20new\x20code.');}const _0x47e085=(_0x2b773a+0x1)*POLL_INTERVAL_MS,_0x2f74c3=DEVICE_CODE_TTL_MS-_0x47e085,_0x540152=Math[_0xb80c0a(0x1c0)](_0x2f74c3/0xea60),_0x4dd51b=Math[_0xb80c0a(0x1c0)](_0x2f74c3%0xea60/0x3e8);process['stderr'][_0xb80c0a(0x1c5)](_0xb80c0a(0x1a5)+_0x540152+':'+String(_0x4dd51b)[_0xb80c0a(0x1df)](0x2,'0')+_0xb80c0a(0x1da)),await sleep(POLL_INTERVAL_MS);}deleteStoredDeviceCode();throw CliErrors[_0xb80c0a(0x19c)](_0xb80c0a(0x1ce));}function sleep(_0x17c8cc){return new Promise(_0x584ece=>setTimeout(_0x584ece,_0x17c8cc));}export const authDeviceDefinition={'service':a11_0x48c11(0x1d1),'command':'device','description':a11_0x48c11(0x1a1),'risk':'write','confirmationDescription':'Starts\x20the\x20device-code\x20login\x20flow.\x20On\x20success,\x20the\x20AccessKey\x20is\x20saved\x20to\x20the\x20selected\x20Lovrabet\x20config.\x20The\x20confirmation\x20UI\x20does\x20not\x20show\x20the\x20device\x20code\x20or\x20secret.','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a11_0x48c11(0x1ad),'type':'boolean','description':a11_0x48c11(0x1bb),'default':!![]},{'name':a11_0x48c11(0x1b8),'type':a11_0x48c11(0x191),'description':'Write\x20to\x20project\x20config','default':![]},{'name':'source','type':a11_0x48c11(0x1c8),'description':'App\x20name\x20shown\x20on\x20authorization\x20page\x20(default:\x20lovrabet)','default':a11_0x48c11(0x1bc)},{'name':a11_0x48c11(0x1cd),'type':a11_0x48c11(0x191),'description':a11_0x48c11(0x19b),'default':![]}],async 'execute'(_0x3022c5){const _0x4d805e=a11_0x48c11,_0x536c21=resolveAuthScopeFlags(_0x3022c5),_0x5f50b5=_0x536c21[_0x4d805e(0x1ad)]?'global':_0x4d805e(0x1b8),_0x57d486=readScopedConfig(_0x536c21);if(_0x57d486[_0x4d805e(0x192)])return{'ok':!![],'message':_0x4d805e(0x1ab)};const _0x5a8d82=(_0x3022c5[_0x4d805e(0x199)](_0x4d805e(0x19a))||_0x4d805e(0x1bc))[_0x4d805e(0x1d0)](),_0x46217c=getUserDomain(),_0x35d09f=readStoredDeviceCode(),_0x580dc2=_0x35d09f&&!isStoredDeviceCodeExpired(_0x35d09f)?_0x35d09f[_0x4d805e(0x1b0)]:((()=>{const _0x3d5a40=generateDeviceCode();return writeStoredDeviceCode(_0x3d5a40,_0x5f50b5),_0x3d5a40;})()),_0x3ba015=buildDeviceAuthUrl(_0x46217c,_0x580dc2,_0x5a8d82);if(_0x3022c5[_0x4d805e(0x193)](_0x4d805e(0x1cd)))return console[_0x4d805e(0x1a3)](_0x3ba015),{'ok':!![]};writeCliSideChannelLine(_0x4d805e(0x1af)),writeCliSideChannelLine(''),writeCliSideChannelLine(_0x3ba015),writeCliSideChannelLine(''),writeCliSideChannelLine('The\x20device\x20code\x20is\x20valid\x20for\x2010\x20minutes.');if(_0x3022c5['nonInteractive'])return writeCliSideChannelLine(_0x4d805e(0x1bf)+CLI_BIN_NAME+'\x20auth\x20device'),{'ok':!![],'message':_0x4d805e(0x1ba)};writeCliSideChannelLine('Waiting\x20for\x20authorization\x20(timeout:\x2010\x20minutes,\x20Ctrl+C\x20to\x20cancel)...');const _0x51b0fe=new AbortController(),_0x1d1b24=()=>{const _0x39d731=_0x4d805e;_0x51b0fe[_0x39d731(0x19e)](),process[_0x39d731(0x198)](_0x39d731(0x1d7),_0x1d1b24);};process['once'](_0x4d805e(0x1d7),_0x1d1b24);let _0x4c41d6;try{_0x4c41d6=await pollDeviceToken(_0x46217c,_0x580dc2,_0x51b0fe[_0x4d805e(0x1be)]);}finally{process['removeListener'](_0x4d805e(0x1d7),_0x1d1b24);}if(!ACCESS_KEY_PATTERN[_0x4d805e(0x19f)](_0x4c41d6))throw CliErrors[_0x4d805e(0x196)](_0x4d805e(0x1a2));const _0x1c8644=readScopedConfig(_0x536c21);return _0x1c8644[_0x4d805e(0x192)]=_0x4c41d6,writeScopedConfig(_0x1c8644,_0x536c21),deleteStoredDeviceCode(),process[_0x4d805e(0x1aa)][_0x4d805e(0x1c5)]('\x0a'),writeCliSideChannelLine(_0x4d805e(0x19d)+_0x5f50b5+'\x20config.'),writeCliSideChannelLine(_0x4d805e(0x197)+CLI_BIN_NAME+_0x4d805e(0x1a7)),{'ok':!![],'message':_0x4d805e(0x1ae)};}};
1
+ const a11_0x3b1416=a11_0x21ec;(function(_0x1f7662,_0x4ed9d1){const _0x17ffd2=a11_0x21ec,_0x3c4c6e=_0x1f7662();while(!![]){try{const _0x87c5c7=parseInt(_0x17ffd2(0x165))/0x1+parseInt(_0x17ffd2(0x146))/0x2+-parseInt(_0x17ffd2(0x173))/0x3*(parseInt(_0x17ffd2(0x161))/0x4)+-parseInt(_0x17ffd2(0x189))/0x5+parseInt(_0x17ffd2(0x191))/0x6+parseInt(_0x17ffd2(0x15e))/0x7+parseInt(_0x17ffd2(0x18f))/0x8*(parseInt(_0x17ffd2(0x190))/0x9);if(_0x87c5c7===_0x4ed9d1)break;else _0x3c4c6e['push'](_0x3c4c6e['shift']());}catch(_0x444172){_0x3c4c6e['push'](_0x3c4c6e['shift']());}}}(a11_0x3629,0xe92b4));import{existsSync,mkdirSync,readFileSync,unlinkSync,writeFileSync}from'node:fs';import{dirname}from'node:path';import{homedir}from'node:os';function a11_0x21ec(_0x28e19f,_0x273b94){_0x28e19f=_0x28e19f-0x146;const _0x3629b5=a11_0x3629();let _0x21ecf7=_0x3629b5[_0x28e19f];return _0x21ecf7;}import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG}from'../../constant/product.js';import{getUserDomain}from'../../constant/domain.js';import{CliErrors}from'../../errors.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';function resolveAuthScopeFlags(_0x433a7a){const _0x624bdf=a11_0x21ec;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x433a7a[_0x624bdf(0x17c)]('global'),'explicitProject':_0x433a7a[_0x624bdf(0x17c)]('project'),'policy':_0x624bdf(0x14e)}));}const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/,DEVICE_CODE_TTL_MS=0x927c0,POLL_INTERVAL_MS=0xbb8,MAX_POLLS=0xc8,MAX_CONSECUTIVE_NETWORK_ERRORS=0x5;export function generateDeviceCode(){const _0x3d7921=a11_0x21ec;return crypto[_0x3d7921(0x14c)]();}export function buildDeviceAuthUrl(_0x5b6efb,_0x4a035b,_0x3bcb60='lovrabet-cli'){const _0x19f76f=a11_0x21ec;return _0x5b6efb+_0x19f76f(0x186)+encodeURIComponent(_0x4a035b)+'&source='+encodeURIComponent(_0x3bcb60);}export function getDeviceCodePath(){const _0x50675a=a11_0x21ec;return homedir()+'/'+PRODUCT_CONFIG['homeDirName']+_0x50675a(0x181);}export function readStoredDeviceCode(){const _0x13197f=a11_0x21ec,_0x5d6a2f=getDeviceCodePath();if(!existsSync(_0x5d6a2f))return null;try{const _0x2c781f=readFileSync(_0x5d6a2f,{'encoding':'utf8'}),_0x5ebfd3=JSON[_0x13197f(0x168)](_0x2c781f);if(_0x5ebfd3&&typeof _0x5ebfd3[_0x13197f(0x166)]==='string'&&typeof _0x5ebfd3[_0x13197f(0x17f)]==='string'&&(_0x5ebfd3['scope']===_0x13197f(0x172)||_0x5ebfd3[_0x13197f(0x152)]==='project'))return _0x5ebfd3;}catch{}return null;}export function writeStoredDeviceCode(_0x306108,_0x1755ac){const _0x9977b5=a11_0x21ec,_0x2f3bc6=getDeviceCodePath(),_0x522529=dirname(_0x2f3bc6);!existsSync(_0x522529)&&mkdirSync(_0x522529,{'recursive':!![]});const _0x36d320={'code':_0x306108,'createdAt':new Date()[_0x9977b5(0x179)](),'scope':_0x1755ac};writeFileSync(_0x2f3bc6,JSON['stringify'](_0x36d320),{'encoding':_0x9977b5(0x171),'mode':0x180});}export function deleteStoredDeviceCode(){const _0xe7e9bd=getDeviceCodePath();try{unlinkSync(_0xe7e9bd);}catch{}}function a11_0x3629(){const _0x5e8da7=['scope','lovrabet-cli','url-only','SIGINT','\x20auth\x20status','source','Invalid\x20access_key\x20returned\x20by\x20server.','Device\x20auth\x20API\x20returned\x20HTTP\x20','cancelled','floor','removeListener','str','4669686wwfwKC','Verify:\x20','accessKey','4FwUxmY','The\x20device\x20code\x20is\x20valid\x20for\x2010\x20minutes.','Device\x20authorization\x20cancelled.','device','1434919tnetoA','code','\x20auth\x20device','parse','validation','Print\x20URL\x20to\x20stdout\x20and\x20exit\x20(for\x20WorkBuddy\x20integration)','once','Invalid\x20device\x20auth\x20response','abort','stderr','apiError','string','utf8','global','5319717vvkzrI','auth','test','Device\x20authorization\x20timed\x20out\x20after\x2010\x20minutes.\x20Run\x20`lovrabet\x20auth\x20device`\x20to\x20get\x20a\x20new\x20code.','Waiting\x20for\x20authorization\x20(timeout:\x2010\x20minutes,\x20Ctrl+C\x20to\x20cancel)...','nonInteractive','toISOString','Write\x20to\x20project\x20config','/api/device-auth/token','bool','write','POST','createdAt','aborted','/.device-auth','now','Device\x20authorization\x20URL\x20printed.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20re-run.','stringify','status','/device-auth?code=','networkError','\x0dWaiting\x20for\x20authorization...\x20','5254235iyvVBu','Device\x20authorization\x20successful.','Open\x20this\x20URL\x20in\x20your\x20browser\x20to\x20authorize:','data','Authorize\x20with\x20the\x20device-code\x20flow\x20(complete\x20in\x20the\x20browser;\x20no\x20copy-paste\x20required)','\x20remaining','24HCQeAu','774369TZcHDn','8362068muQwMa','After\x20authorizing,\x20re-run:\x20','signal','50656WZuSoQ','AccessKey\x20saved\x20to\x20','\x20config.','name','boolean','json','randomUUID','success','global-default','project','log','access_key'];a11_0x3629=function(){return _0x5e8da7;};return a11_0x3629();}export function isStoredDeviceCodeExpired(_0x4b2300){const _0x11b795=a11_0x21ec;return Date[_0x11b795(0x182)]()-new Date(_0x4b2300[_0x11b795(0x17f)])['getTime']()>DEVICE_CODE_TTL_MS;}export async function fetchDeviceToken(_0x19df35,_0x1c1657){const _0x4b816f=a11_0x21ec,_0x34b600=_0x19df35+_0x4b816f(0x17b),_0x2de8d0=new AbortController(),_0x49caf2=setTimeout(()=>_0x2de8d0[_0x4b816f(0x16d)](),0x2710),_0x28592f=await fetch(_0x34b600,{'method':_0x4b816f(0x17e),'headers':{'Content-Type':'application/json'},'body':JSON[_0x4b816f(0x184)]({'code':_0x1c1657}),'signal':_0x2de8d0[_0x4b816f(0x193)]});clearTimeout(_0x49caf2);if(!_0x28592f['ok'])throw CliErrors[_0x4b816f(0x187)](_0x4b816f(0x159)+_0x28592f[_0x4b816f(0x185)]);const _0x1d0dd0=await _0x28592f[_0x4b816f(0x14b)](),_0x3ada3b=_0x1d0dd0[_0x4b816f(0x18c)]&&typeof _0x1d0dd0['data']==='object'?_0x1d0dd0[_0x4b816f(0x18c)]:_0x1d0dd0;if(!_0x3ada3b||typeof _0x3ada3b[_0x4b816f(0x185)]!==_0x4b816f(0x170))throw CliErrors[_0x4b816f(0x16f)](_0x4b816f(0x16c));return{'status':_0x3ada3b[_0x4b816f(0x185)],'access_key':typeof _0x3ada3b[_0x4b816f(0x151)]===_0x4b816f(0x170)?_0x3ada3b[_0x4b816f(0x151)]:undefined};}export async function pollDeviceToken(_0xc5f158,_0x426e38,_0x1ab395){const _0x2c3494=a11_0x21ec;let _0x24b105=0x0;for(let _0x5adf69=0x0;_0x5adf69<MAX_POLLS;_0x5adf69++){if(_0x1ab395[_0x2c3494(0x180)])throw CliErrors[_0x2c3494(0x15a)]('Device\x20authorization\x20cancelled.');let _0x2a43cc;try{_0x2a43cc=await fetchDeviceToken(_0xc5f158,_0x426e38);}catch(_0x2534eb){if(_0x2534eb instanceof Error&&_0x2534eb[_0x2c3494(0x149)]==='AbortError')throw CliErrors[_0x2c3494(0x15a)](_0x2c3494(0x163));_0x24b105++;if(_0x24b105>=MAX_CONSECUTIVE_NETWORK_ERRORS)throw CliErrors['networkError']('Device\x20auth\x20API\x20unreachable\x20after\x20multiple\x20retries.');writeCliSideChannelLine('Device\x20auth\x20API\x20error\x20('+_0x24b105+'/'+MAX_CONSECUTIVE_NETWORK_ERRORS+'),\x20retrying...'),await sleep(POLL_INTERVAL_MS);continue;}_0x24b105=0x0;if(_0x2a43cc[_0x2c3494(0x185)]===_0x2c3494(0x14d)){if(!_0x2a43cc[_0x2c3494(0x151)])throw CliErrors[_0x2c3494(0x16f)](_0x2c3494(0x158));return _0x2a43cc[_0x2c3494(0x151)];}if(_0x2a43cc[_0x2c3494(0x185)]==='expired'){deleteStoredDeviceCode();throw CliErrors[_0x2c3494(0x169)]('Device\x20code\x20expired.\x20Run\x20`lovrabet\x20auth\x20device`\x20to\x20get\x20a\x20new\x20code.');}const _0x1e30b5=(_0x5adf69+0x1)*POLL_INTERVAL_MS,_0x1b9f54=DEVICE_CODE_TTL_MS-_0x1e30b5,_0x4e8cc4=Math[_0x2c3494(0x15b)](_0x1b9f54/0xea60),_0x409351=Math['floor'](_0x1b9f54%0xea60/0x3e8);process['stderr']['write'](_0x2c3494(0x188)+_0x4e8cc4+':'+String(_0x409351)['padStart'](0x2,'0')+_0x2c3494(0x18e)),await sleep(POLL_INTERVAL_MS);}deleteStoredDeviceCode();throw CliErrors['validation'](_0x2c3494(0x176));}function sleep(_0x2f0d25){return new Promise(_0x195980=>setTimeout(_0x195980,_0x2f0d25));}export const authDeviceDefinition={'service':a11_0x3b1416(0x174),'command':a11_0x3b1416(0x164),'description':a11_0x3b1416(0x18d),'risk':a11_0x3b1416(0x17d),'confirmationDescription':'Starts\x20the\x20device-code\x20login\x20flow.\x20On\x20success,\x20the\x20AccessKey\x20is\x20saved\x20to\x20the\x20selected\x20Lovrabet\x20config.\x20The\x20confirmation\x20UI\x20does\x20not\x20show\x20the\x20device\x20code\x20or\x20secret.','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'global','type':a11_0x3b1416(0x14a),'description':'Write\x20to\x20global\x20config\x20(default)','default':!![]},{'name':a11_0x3b1416(0x14f),'type':a11_0x3b1416(0x14a),'description':a11_0x3b1416(0x17a),'default':![]},{'name':a11_0x3b1416(0x157),'type':a11_0x3b1416(0x170),'description':'App\x20name\x20shown\x20on\x20authorization\x20page\x20(default:\x20lovrabet)','default':a11_0x3b1416(0x153)},{'name':a11_0x3b1416(0x154),'type':'boolean','description':a11_0x3b1416(0x16a),'default':![]}],async 'execute'(_0xbbb3fd){const _0x494a51=a11_0x3b1416,_0xe60088=resolveAuthScopeFlags(_0xbbb3fd),_0x4ddd2b=_0xe60088['global']?_0x494a51(0x172):_0x494a51(0x14f),_0x429bad=readScopedConfig(_0xe60088);if(_0x429bad['accessKey'])return{'ok':!![],'message':'Already\x20authorized.\x20Use\x20`lovrabet\x20auth\x20status`\x20to\x20verify.'};const _0x33030b=(_0xbbb3fd[_0x494a51(0x15d)](_0x494a51(0x157))||_0x494a51(0x153))['trim'](),_0xbdd84d=getUserDomain(),_0x482e52=readStoredDeviceCode(),_0x627ef=_0x482e52&&!isStoredDeviceCodeExpired(_0x482e52)?_0x482e52[_0x494a51(0x166)]:((()=>{const _0x2b594b=generateDeviceCode();return writeStoredDeviceCode(_0x2b594b,_0x4ddd2b),_0x2b594b;})()),_0x58b02c=buildDeviceAuthUrl(_0xbdd84d,_0x627ef,_0x33030b);if(_0xbbb3fd[_0x494a51(0x17c)](_0x494a51(0x154)))return console[_0x494a51(0x150)](_0x58b02c),{'ok':!![]};writeCliSideChannelLine(_0x494a51(0x18b)),writeCliSideChannelLine(''),writeCliSideChannelLine(_0x58b02c),writeCliSideChannelLine(''),writeCliSideChannelLine(_0x494a51(0x162));if(_0xbbb3fd[_0x494a51(0x178)])return writeCliSideChannelLine(_0x494a51(0x192)+CLI_BIN_NAME+_0x494a51(0x167)),{'ok':!![],'message':_0x494a51(0x183)};writeCliSideChannelLine(_0x494a51(0x177));const _0x538e30=new AbortController(),_0x1dbd96=()=>{const _0x1bc4f9=_0x494a51;_0x538e30[_0x1bc4f9(0x16d)](),process[_0x1bc4f9(0x15c)]('SIGINT',_0x1dbd96);};process[_0x494a51(0x16b)](_0x494a51(0x155),_0x1dbd96);let _0x120520;try{_0x120520=await pollDeviceToken(_0xbdd84d,_0x627ef,_0x538e30[_0x494a51(0x193)]);}finally{process[_0x494a51(0x15c)](_0x494a51(0x155),_0x1dbd96);}if(!ACCESS_KEY_PATTERN[_0x494a51(0x175)](_0x120520))throw CliErrors[_0x494a51(0x16f)](_0x494a51(0x158));const _0x1c30a4=readScopedConfig(_0xe60088);return _0x1c30a4[_0x494a51(0x160)]=_0x120520,writeScopedConfig(_0x1c30a4,_0xe60088),deleteStoredDeviceCode(),process[_0x494a51(0x16e)]['write']('\x0a'),writeCliSideChannelLine(_0x494a51(0x147)+_0x4ddd2b+_0x494a51(0x148)),writeCliSideChannelLine(_0x494a51(0x15f)+CLI_BIN_NAME+_0x494a51(0x156)),{'ok':!![],'message':_0x494a51(0x18a)};}};