@lovrabet/lovrabet-cli 2.3.8 → 2.3.9-beta.1

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 (185) 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/approval/index.js +1 -1
  12. package/lib/commands/artifact/index.js +1 -1
  13. package/lib/commands/auth/device.js +1 -1
  14. package/lib/commands/auth/index.js +1 -1
  15. package/lib/commands/auth/prompt.js +1 -1
  16. package/lib/commands/bff/detail.js +1 -1
  17. package/lib/commands/bff/exec.js +1 -1
  18. package/lib/commands/bff/index.js +1 -1
  19. package/lib/commands/cli-skill/index.js +1 -1
  20. package/lib/commands/common/config-policy.js +1 -1
  21. package/lib/commands/common/constraints.js +1 -1
  22. package/lib/commands/common/flags.js +1 -1
  23. package/lib/commands/common/local-file.js +1 -1
  24. package/lib/commands/config/definitions.js +1 -1
  25. package/lib/commands/config/init.js +1 -1
  26. package/lib/commands/config/shared.js +1 -1
  27. package/lib/commands/data/import-excel.js +1 -1
  28. package/lib/commands/data/index.js +1 -1
  29. package/lib/commands/dataset/detail.js +1 -1
  30. package/lib/commands/dataset/index.js +1 -1
  31. package/lib/commands/dataset/list.js +1 -1
  32. package/lib/commands/dataset/sdk-doc.js +1 -1
  33. package/lib/commands/doctor.js +1 -1
  34. package/lib/commands/file/index.js +1 -1
  35. package/lib/commands/init.js +1 -1
  36. package/lib/commands/issue/context.js +1 -1
  37. package/lib/commands/issue/index.js +1 -1
  38. package/lib/commands/issue/report.js +1 -1
  39. package/lib/commands/kb/index.js +1 -1
  40. package/lib/commands/logs/index.js +1 -1
  41. package/lib/commands/notification/config-list.js +1 -1
  42. package/lib/commands/notification/index.js +1 -1
  43. package/lib/commands/notification/shared.js +1 -1
  44. package/lib/commands/ocr/index.js +1 -1
  45. package/lib/commands/permit/dataset-get.js +1 -1
  46. package/lib/commands/permit/dataset-set.js +1 -1
  47. package/lib/commands/permit/index.js +1 -1
  48. package/lib/commands/permit/page-get.js +1 -1
  49. package/lib/commands/permit/page-set.js +1 -1
  50. package/lib/commands/permit/role-menus-set.js +1 -1
  51. package/lib/commands/permit/role-menus.js +1 -1
  52. package/lib/commands/permit/shared.js +1 -1
  53. package/lib/commands/personal-bff/index.js +1 -1
  54. package/lib/commands/registry.js +1 -1
  55. package/lib/commands/role/create.js +1 -1
  56. package/lib/commands/role/delete.js +1 -1
  57. package/lib/commands/role/detail.js +1 -1
  58. package/lib/commands/role/index.js +1 -1
  59. package/lib/commands/role/list.js +1 -1
  60. package/lib/commands/role/shared.js +1 -1
  61. package/lib/commands/role/update.js +1 -1
  62. package/lib/commands/role/user-add.js +1 -1
  63. package/lib/commands/role/user-remove.js +1 -1
  64. package/lib/commands/schedule/index.js +1 -1
  65. package/lib/commands/schema.js +1 -1
  66. package/lib/commands/service/dynamic.js +1 -1
  67. package/lib/commands/service/function-name-adapter.js +1 -1
  68. package/lib/commands/service/index.js +1 -1
  69. package/lib/commands/service/registry.js +1 -1
  70. package/lib/commands/skill/commands/create.js +1 -1
  71. package/lib/commands/skill/commands/diagram.js +1 -1
  72. package/lib/commands/skill/commands/install.js +1 -1
  73. package/lib/commands/skill/commands/list.js +1 -1
  74. package/lib/commands/skill/commands/push.js +1 -1
  75. package/lib/commands/skill/commands/validate.js +1 -1
  76. package/lib/commands/skill/diagram.js +1 -1
  77. package/lib/commands/skill/flags.js +1 -1
  78. package/lib/commands/skill/index.js +1 -1
  79. package/lib/commands/skill/manifest-helpers.js +1 -1
  80. package/lib/commands/skill/push-execute.js +1 -1
  81. package/lib/commands/skill/push-flow-helpers.js +1 -1
  82. package/lib/commands/skill/push-retarget.js +1 -1
  83. package/lib/commands/skill/scopes.js +1 -1
  84. package/lib/commands/skill/summary.js +1 -1
  85. package/lib/commands/skill/templates.js +1 -1
  86. package/lib/commands/skill/validate.js +1 -1
  87. package/lib/commands/sql/detail.js +1 -1
  88. package/lib/commands/sql/exec.js +1 -1
  89. package/lib/commands/sql/index.js +1 -1
  90. package/lib/commands/update.js +1 -1
  91. package/lib/commands/user-account/bind.js +1 -1
  92. package/lib/commands/user-account/index.js +1 -1
  93. package/lib/commands/workspace/index.js +1 -1
  94. package/lib/config/domain-config.js +1 -1
  95. package/lib/config/schema.js +1 -1
  96. package/lib/constant/app.js +1 -1
  97. package/lib/constant/auth-mode.js +1 -1
  98. package/lib/constant/cli.js +1 -1
  99. package/lib/constant/defaults.js +1 -1
  100. package/lib/constant/distribution.js +1 -1
  101. package/lib/constant/domain.js +1 -1
  102. package/lib/constant/env.js +1 -1
  103. package/lib/constant/output.js +1 -1
  104. package/lib/constant/product.js +1 -1
  105. package/lib/constant/region.js +1 -1
  106. package/lib/constant/risk.js +1 -1
  107. package/lib/constant/url.js +1 -1
  108. package/lib/context.js +1 -1
  109. package/lib/core/api-client.js +1 -1
  110. package/lib/core/db-resolver.js +1 -1
  111. package/lib/core/kb-management-client.js +1 -1
  112. package/lib/core/kb-sdk-errors.js +1 -1
  113. package/lib/core/kb-search-client.js +1 -1
  114. package/lib/core/sdk-client.js +1 -1
  115. package/lib/errors.js +1 -1
  116. package/lib/framework/access-error.js +1 -1
  117. package/lib/framework/build-all-flags.js +1 -1
  118. package/lib/framework/dryrun.js +1 -1
  119. package/lib/framework/flags.js +1 -1
  120. package/lib/framework/help.js +1 -1
  121. package/lib/framework/index.js +1 -1
  122. package/lib/framework/output.js +1 -1
  123. package/lib/framework/preparse.js +1 -1
  124. package/lib/framework/rate-limit.js +1 -1
  125. package/lib/framework/raw-flags.js +1 -1
  126. package/lib/framework/response.js +1 -1
  127. package/lib/framework/runner-confirmation.js +1 -1
  128. package/lib/framework/runner-error.js +1 -1
  129. package/lib/framework/runner.js +1 -1
  130. package/lib/framework/schema-export.js +1 -1
  131. package/lib/framework/service-order.js +1 -1
  132. package/lib/framework/types.js +1 -1
  133. package/lib/generated/build-info.d.ts +4 -4
  134. package/lib/generated/build-info.js +1 -1
  135. package/lib/generated/official-routing.js +1 -1
  136. package/lib/generated/routing-contract.js +1 -1
  137. package/lib/help.js +1 -1
  138. package/lib/postinstall.js +1 -1
  139. package/lib/runtime/confirmation.js +1 -1
  140. package/lib/runtime/event.js +1 -1
  141. package/lib/runtime/index.js +1 -1
  142. package/lib/runtime/queue.js +1 -1
  143. package/lib/runtime/resolve.js +1 -1
  144. package/lib/services/dataset-import/auto-id-runner.js +1 -1
  145. package/lib/services/dataset-import/excel-reader.js +1 -1
  146. package/lib/services/dataset-import/image-bytes.js +1 -1
  147. package/lib/services/dataset-import/image-ooxml.js +1 -1
  148. package/lib/services/dataset-import/image-runner.js +1 -1
  149. package/lib/services/dataset-import/metadata.js +1 -1
  150. package/lib/services/dataset-import/preview.js +1 -1
  151. package/lib/services/dataset-import/runner.js +1 -1
  152. package/lib/skills/builtin-skill.js +1 -1
  153. package/lib/skills/npx-skills-add.js +1 -1
  154. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  155. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  156. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  157. package/lib/skills/runtime-skill-sync/install-target.js +1 -1
  158. package/lib/skills/runtime-skill-sync/links.js +1 -1
  159. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  160. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  161. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  162. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  163. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  164. package/lib/skills/runtime-skill-sync/push.js +1 -1
  165. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  166. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  167. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  168. package/lib/skills/runtime-skill-sync.js +1 -1
  169. package/lib/skills/skill-presence.js +1 -1
  170. package/lib/utils/access-key-redaction.js +1 -1
  171. package/lib/utils/apply-jq-filter.js +1 -1
  172. package/lib/utils/cli-version-check.js +1 -1
  173. package/lib/utils/cli-version-policy.js +1 -1
  174. package/lib/utils/logger.js +1 -1
  175. package/lib/utils/lossless-json.js +1 -1
  176. package/lib/utils/params.js +1 -1
  177. package/lib/utils/positive-safe-integer.js +1 -1
  178. package/lib/utils/redaction.js +1 -1
  179. package/lib/utils/runtime-user-id.js +1 -1
  180. package/lib/utils/update-notice.js +1 -1
  181. package/lib/utils/version.js +1 -1
  182. package/lib/utils/write-cli-side-channel.js +1 -1
  183. package/package.json +1 -1
  184. package/skills/lovrabet/SKILL.md +1 -1
  185. package/skills/lovrabet.manifest.json +3 -3
package/lib/cli.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- (function(_0x555474,_0x53d3e4){const _0x35864c=a0_0x142d,_0x59bcb0=_0x555474();while(!![]){try{const _0x5add3f=-parseInt(_0x35864c(0xe0))/0x1*(parseInt(_0x35864c(0xd3))/0x2)+-parseInt(_0x35864c(0xce))/0x3+parseInt(_0x35864c(0xb9))/0x4*(-parseInt(_0x35864c(0xbf))/0x5)+-parseInt(_0x35864c(0xb8))/0x6*(-parseInt(_0x35864c(0xb0))/0x7)+parseInt(_0x35864c(0xcd))/0x8*(parseInt(_0x35864c(0xcb))/0x9)+-parseInt(_0x35864c(0xb7))/0xa*(-parseInt(_0x35864c(0xd4))/0xb)+parseInt(_0x35864c(0xcc))/0xc;if(_0x5add3f===_0x53d3e4)break;else _0x59bcb0['push'](_0x59bcb0['shift']());}catch(_0x171958){_0x59bcb0['push'](_0x59bcb0['shift']());}}}(a0_0x5f46,0xcf6f7));import{jsx as a0_0x21d426}from'react/jsx-runtime';import a0_0x5b55ca 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_0x5b55ca(helpText,{'importMeta':import.meta,'flags':buildMeowFlags(),'version':getCliVersionDisplay()});void main()['catch'](handleError);function a0_0x142d(_0x1d80d8,_0x1a45dc){_0x1d80d8=_0x1d80d8-0xb0;const _0x5f4621=a0_0x5f46();let _0x142dc7=_0x5f4621[_0x1d80d8];return _0x142dc7;}async function main(){try{await run();}catch(_0x4cf869){handleError(_0x4cf869);}}function a0_0x5f46(){const _0x4c14bd=['exitCode','hint','assign','47017KQukUJ','7yjELJM','ERR_USE_AFTER_CLOSE','\x20->\x20--','ERR_STREAM_DESTROYED','write','./framework/preparse.js','message','30LIGYoJ','5392920UveLSL','256sXYeXk','flatMap','help','validation','input','error','48010AaDScp','original','length','handler','definition','name','unknownCommand','log','Hint:\x20','Error:\x20','stderr','args','22509lzbYVD','475152LaLhlJ','664FzKYdh','771375YEqBuO','doctor','flags','cancelled','config','20qmWWuJ','3833423AxKeqd','exit','defaultCommand','\x0aCancelled.\x0a',':\x20--','Unexpected\x20error:','[preparse]\x20','ExitPromptError','code'];a0_0x5f46=function(){return _0x4c14bd;};return a0_0x5f46();}async function run(){const _0x282b0b=a0_0x142d;let _0x1af662=cli['input'][0x0],_0x46508c=cli[_0x282b0b(0xbd)][0x1];const _0x13ca4c=cli[_0x282b0b(0xd0)];try{const {correctFlags:_0xcb1bc8}=await import(_0x282b0b(0xb5)),_0x595f9f=getAllDefinitions()[_0x282b0b(0xba)](_0x5ed13f=>_0x5ed13f['flags']??[]),{flags:_0xc5b345,corrections:_0x5d1ae8}=_0xcb1bc8(_0x13ca4c,_0x595f9f);if(_0x5d1ae8[_0x282b0b(0xc1)]>0x0){for(const _0xce4627 of _0x5d1ae8){process[_0x282b0b(0xc9)][_0x282b0b(0xb4)](_0x282b0b(0xda)+_0xce4627[_0x282b0b(0xc2)]+_0x282b0b(0xd8)+_0xce4627[_0x282b0b(0xc0)]+_0x282b0b(0xb2)+_0xce4627['corrected']+'\x0a');}Object[_0x282b0b(0xdf)](_0x13ca4c,_0xc5b345);}}catch{}if(!_0x1af662){const {waitUntilExit:_0x5cd497}=render(a0_0x21d426(Help,{}));await _0x5cd497();return;}const _0x256f3b=resolveRemovedCommand(_0x1af662,_0x46508c);if(_0x256f3b)throw CliErrors[_0x282b0b(0xbc)](_0x256f3b[_0x282b0b(0xb6)],_0x256f3b[_0x282b0b(0xde)]);if(!isKnownService(_0x1af662)){const _0x3e9507=resolveDynamicServiceCommand(cli['input'],_0x13ca4c);if(_0x3e9507){if(_0x13ca4c[_0x282b0b(0xbb)]){console['log'](generateCommandHelp(_0x3e9507[_0x282b0b(0xc3)]));return;}Object[_0x282b0b(0xdf)](_0x13ca4c,_0x3e9507[_0x282b0b(0xd0)]);const _0x2781b9=buildConfigFromFlags(_0x13ca4c);await initGlobalEnvironment(_0x2781b9);const _0x254a40=createPipelineEnv(_0x2781b9,_0x13ca4c);_0x254a40['args']=_0x3e9507['args'],await runCommand(_0x3e9507[_0x282b0b(0xc3)],_0x254a40);return;}if(_0x13ca4c[_0x282b0b(0xbb)]){const _0x23faa4=generateDynamicServiceHelp(_0x1af662);if(_0x23faa4){console['log'](_0x23faa4);return;}}const {waitUntilExit:_0x1cd89e}=render(a0_0x21d426(Help,{}));await _0x1cd89e();return;}const _0x5bb4ea=getServiceEntry(_0x1af662);if(!_0x46508c){if(_0x13ca4c['help']){console[_0x282b0b(0xc6)](generateServiceHelp(_0x1af662));return;}if(_0x5bb4ea[_0x282b0b(0xd6)])_0x46508c=_0x5bb4ea[_0x282b0b(0xd6)];else{console[_0x282b0b(0xc6)](generateServiceHelp(_0x1af662));return;}}const _0x35c1cb=findDefinition(_0x1af662,_0x46508c);!_0x35c1cb&&(console[_0x282b0b(0xc6)](generateServiceHelp(_0x1af662)),handleError(CliErrors[_0x282b0b(0xc5)](_0x1af662+'\x20'+_0x46508c)));if(_0x13ca4c[_0x282b0b(0xbb)]){console[_0x282b0b(0xc6)](generateCommandHelp(_0x35c1cb));return;}const _0xc54aa4=buildConfigFromFlags(_0x13ca4c);_0x1af662!==_0x282b0b(0xd2)&&_0x1af662!==_0x282b0b(0xcf)&&await initGlobalEnvironment(_0xc54aa4);const _0xeb736c=createPipelineEnv(_0xc54aa4,_0x13ca4c);_0xeb736c[_0x282b0b(0xca)]=cli[_0x282b0b(0xbd)]['slice'](0x2),await runCommand(_0x35c1cb,_0xeb736c);}function handleError(_0x29b879){const _0x45aa65=a0_0x142d;if(_0x29b879 instanceof CliError){_0x29b879[_0x45aa65(0xdc)]===_0x45aa65(0xd1)&&(process[_0x45aa65(0xc9)]['write']('\x0aCancelled.\x0a'),process[_0x45aa65(0xd5)](0x0));console['error'](_0x45aa65(0xc8)+_0x29b879['message']);if(_0x29b879['hint'])console['error'](_0x45aa65(0xc7)+_0x29b879[_0x45aa65(0xde)]);process[_0x45aa65(0xd5)](_0x29b879[_0x45aa65(0xdd)]);}isUserCancellation(_0x29b879)&&(process['stderr'][_0x45aa65(0xb4)](_0x45aa65(0xd7)),process[_0x45aa65(0xd5)](0x0)),console[_0x45aa65(0xbe)](_0x45aa65(0xd9),_0x29b879),process[_0x45aa65(0xd5)](0x1);}function isUserCancellation(_0x58c095){const _0x2c90d7=a0_0x142d;if(!(_0x58c095 instanceof Error))return![];if(_0x58c095[_0x2c90d7(0xc4)]===_0x2c90d7(0xdb))return!![];if(_0x58c095[_0x2c90d7(0xdc)]===_0x2c90d7(0xb1))return!![];if(_0x58c095[_0x2c90d7(0xdc)]===_0x2c90d7(0xb3))return!![];return![];}
2
+ const a0_0x19860b=a0_0x4a5f;(function(_0x20f05e,_0x4f3cda){const _0x3bd195=a0_0x4a5f,_0x14f60e=_0x20f05e();while(!![]){try{const _0x3a6faa=parseInt(_0x3bd195(0x11c))/0x1+parseInt(_0x3bd195(0x115))/0x2+-parseInt(_0x3bd195(0x11b))/0x3+-parseInt(_0x3bd195(0x11f))/0x4+parseInt(_0x3bd195(0x12e))/0x5+-parseInt(_0x3bd195(0x130))/0x6+parseInt(_0x3bd195(0x11d))/0x7;if(_0x3a6faa===_0x4f3cda)break;else _0x14f60e['push'](_0x14f60e['shift']());}catch(_0x1bb41d){_0x14f60e['push'](_0x14f60e['shift']());}}}(a0_0x2206,0x734c8));import{jsx as a0_0x3b62ac}from'react/jsx-runtime';function a0_0x2206(){const _0x8e01f6=['name','write','help','definition','defaultCommand','original','cancelled','241085NrDQBl','flatMap','1592514ZucEsG','hint','Hint:\x20','ERR_USE_AFTER_CLOSE','corrected','exit','./framework/preparse.js','[preparse]\x20','error','Unexpected\x20error:','validation','flags','\x20->\x20--','message','config','catch','329902JKgcJZ','ExitPromptError','args','\x0aCancelled.\x0a','input','handler','584793yajKmP','20939ubcTGw','6884801FxugPP','assign','1140144zKWYnt','length','stderr','Error:\x20',':\x20--','code','log','doctor'];a0_0x2206=function(){return _0x8e01f6;};return a0_0x2206();}import a0_0x44cf7c from'meow';import{render}from'ink';function a0_0x4a5f(_0x11aec0,_0x37c686){_0x11aec0=_0x11aec0-0x10f;const _0x22064c=a0_0x2206();let _0x4a5f2e=_0x22064c[_0x11aec0];return _0x4a5f2e;}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_0x44cf7c(helpText,{'importMeta':import.meta,'flags':buildMeowFlags(),'version':getCliVersionDisplay()});void main()[a0_0x19860b(0x114)](handleError);async function main(){try{await run();}catch(_0x33423f){handleError(_0x33423f);}}async function run(){const _0x2451d9=a0_0x19860b;let _0x3b2554=cli[_0x2451d9(0x119)][0x0],_0xd04318=cli['input'][0x1];const _0x488e43=cli['flags'];try{const {correctFlags:_0x2086b2}=await import(_0x2451d9(0x136)),_0x31c14e=getAllDefinitions()[_0x2451d9(0x12f)](_0x2b980b=>_0x2b980b['flags']??[]),{flags:_0x49018d,corrections:_0x4f83cf}=_0x2086b2(_0x488e43,_0x31c14e);if(_0x4f83cf[_0x2451d9(0x120)]>0x0){for(const _0x175a92 of _0x4f83cf){process['stderr'][_0x2451d9(0x128)](_0x2451d9(0x137)+_0x175a92[_0x2451d9(0x11a)]+_0x2451d9(0x123)+_0x175a92[_0x2451d9(0x12c)]+_0x2451d9(0x111)+_0x175a92[_0x2451d9(0x134)]+'\x0a');}Object['assign'](_0x488e43,_0x49018d);}}catch{}if(!_0x3b2554){const {waitUntilExit:_0x23e62c}=render(a0_0x3b62ac(Help,{}));await _0x23e62c();return;}const _0x3110c5=resolveRemovedCommand(_0x3b2554,_0xd04318);if(_0x3110c5)throw CliErrors[_0x2451d9(0x10f)](_0x3110c5[_0x2451d9(0x112)],_0x3110c5[_0x2451d9(0x131)]);if(!isKnownService(_0x3b2554)){const _0x2d7f05=resolveDynamicServiceCommand(cli['input'],_0x488e43);if(_0x2d7f05){if(_0x488e43[_0x2451d9(0x129)]){console[_0x2451d9(0x125)](generateCommandHelp(_0x2d7f05['definition']));return;}Object[_0x2451d9(0x11e)](_0x488e43,_0x2d7f05[_0x2451d9(0x110)]);const _0x35d7af=buildConfigFromFlags(_0x488e43);await initGlobalEnvironment(_0x35d7af);const _0x194e48=createPipelineEnv(_0x35d7af,_0x488e43);_0x194e48[_0x2451d9(0x117)]=_0x2d7f05[_0x2451d9(0x117)],await runCommand(_0x2d7f05[_0x2451d9(0x12a)],_0x194e48);return;}if(_0x488e43[_0x2451d9(0x129)]){const _0x251e5b=generateDynamicServiceHelp(_0x3b2554);if(_0x251e5b){console[_0x2451d9(0x125)](_0x251e5b);return;}}const {waitUntilExit:_0x495279}=render(a0_0x3b62ac(Help,{}));await _0x495279();return;}const _0x3a0737=getServiceEntry(_0x3b2554);if(!_0xd04318){if(_0x488e43['help']){console[_0x2451d9(0x125)](generateServiceHelp(_0x3b2554));return;}if(_0x3a0737[_0x2451d9(0x12b)])_0xd04318=_0x3a0737[_0x2451d9(0x12b)];else{console[_0x2451d9(0x125)](generateServiceHelp(_0x3b2554));return;}}const _0xf26681=findDefinition(_0x3b2554,_0xd04318);!_0xf26681&&(console[_0x2451d9(0x125)](generateServiceHelp(_0x3b2554)),handleError(CliErrors['unknownCommand'](_0x3b2554+'\x20'+_0xd04318)));if(_0x488e43[_0x2451d9(0x129)]){console[_0x2451d9(0x125)](generateCommandHelp(_0xf26681));return;}const _0x2d9f0d=buildConfigFromFlags(_0x488e43);_0x3b2554!==_0x2451d9(0x113)&&_0x3b2554!==_0x2451d9(0x126)&&await initGlobalEnvironment(_0x2d9f0d);const _0x28a8a8=createPipelineEnv(_0x2d9f0d,_0x488e43);_0x28a8a8[_0x2451d9(0x117)]=cli['input']['slice'](0x2),await runCommand(_0xf26681,_0x28a8a8);}function handleError(_0x169b5d){const _0x576ded=a0_0x19860b;if(_0x169b5d instanceof CliError){_0x169b5d[_0x576ded(0x124)]===_0x576ded(0x12d)&&(process[_0x576ded(0x121)][_0x576ded(0x128)](_0x576ded(0x118)),process[_0x576ded(0x135)](0x0));console[_0x576ded(0x138)](_0x576ded(0x122)+_0x169b5d[_0x576ded(0x112)]);if(_0x169b5d['hint'])console[_0x576ded(0x138)](_0x576ded(0x132)+_0x169b5d[_0x576ded(0x131)]);process[_0x576ded(0x135)](_0x169b5d['exitCode']);}isUserCancellation(_0x169b5d)&&(process[_0x576ded(0x121)]['write'](_0x576ded(0x118)),process[_0x576ded(0x135)](0x0)),console[_0x576ded(0x138)](_0x576ded(0x139),_0x169b5d),process[_0x576ded(0x135)](0x1);}function isUserCancellation(_0xd61685){const _0xca7121=a0_0x19860b;if(!(_0xd61685 instanceof Error))return![];if(_0xd61685[_0xca7121(0x127)]===_0xca7121(0x116))return!![];if(_0xd61685[_0xca7121(0x124)]===_0xca7121(0x133))return!![];if(_0xd61685[_0xca7121(0x124)]==='ERR_STREAM_DESTROYED')return!![];return![];}
@@ -1 +1 @@
1
- const a1_0x3875a7=a1_0x3542;(function(_0x5b9408,_0xa934){const _0x4db471=a1_0x3542,_0x3d6ef1=_0x5b9408();while(!![]){try{const _0x5999b1=-parseInt(_0x4db471(0x178))/0x1+-parseInt(_0x4db471(0x1eb))/0x2*(-parseInt(_0x4db471(0x1e2))/0x3)+-parseInt(_0x4db471(0x1e8))/0x4*(-parseInt(_0x4db471(0x1d5))/0x5)+parseInt(_0x4db471(0x1f1))/0x6*(-parseInt(_0x4db471(0x1b7))/0x7)+parseInt(_0x4db471(0x1bf))/0x8*(parseInt(_0x4db471(0x1a6))/0x9)+parseInt(_0x4db471(0x1b9))/0xa*(parseInt(_0x4db471(0x18c))/0xb)+parseInt(_0x4db471(0x17f))/0xc*(parseInt(_0x4db471(0x1c5))/0xd);if(_0x5999b1===_0xa934)break;else _0x3d6ef1['push'](_0x3d6ef1['shift']());}catch(_0x5210a6){_0x3d6ef1['push'](_0x3d6ef1['shift']());}}}(a1_0x1061,0x35f0f));import{CliErrors}from'../../errors.js';const CATEGORY_FLAG={'name':a1_0x3875a7(0x17d),'type':'string','description':a1_0x3875a7(0x179)},KEYWORD_FLAG={'name':a1_0x3875a7(0x1d7),'type':'string','description':a1_0x3875a7(0x1dc)},DOC_CODE_FLAG={'name':a1_0x3875a7(0x1f2),'type':'string','required':!![],'description':a1_0x3875a7(0x199)},DOCS=[{'code':a1_0x3875a7(0x180),'category':a1_0x3875a7(0x187),'title':a1_0x3875a7(0x19e),'method':a1_0x3875a7(0x1a3),'path':a1_0x3875a7(0x1de),'summary':'List\x20datasets\x20with\x20pagination','whenToUse':'Use\x20when\x20you\x20need\x20a\x20paginated\x20runtime\x20dataset\x20list\x20by\x20appCode\x20and\x20want\x20to\x20collect\x20available\x20datasetCode\x20values','pathParams':[],'queryParams':[],'bodySchema':a1_0x3875a7(0x1da),'responseHighlights':[a1_0x3875a7(0x1e9),'paging.totalCount\x20gives\x20total\x20rows'],'examples':[a1_0x3875a7(0x196)],'notes':[a1_0x3875a7(0x1c4)],'markdown':[a1_0x3875a7(0x1d6),'',a1_0x3875a7(0x1b8)][a1_0x3875a7(0x1e1)]('\x0a')},{'code':a1_0x3875a7(0x19d),'category':'dataset','title':a1_0x3875a7(0x1f7),'method':a1_0x3875a7(0x1b0),'path':'/api/dataset/getOneByCode?code={datasetCode}','summary':'Get\x20dataset\x20detail','whenToUse':a1_0x3875a7(0x1bd),'pathParams':[],'queryParams':[{'name':a1_0x3875a7(0x1f2),'description':'32-character\x20dataset\x20code'}],'bodySchema':a1_0x3875a7(0x1c3),'responseHighlights':['fields/properties\x20describe\x20data\x20shape',a1_0x3875a7(0x1a4),a1_0x3875a7(0x192)],'examples':['lovrabet\x20dataset\x20detail\x20--code\x20<datasetCode>\x20--appcode\x20<appCode>'],'notes':[a1_0x3875a7(0x1fe)],'markdown':['##\x20Dataset\x20detail','','Inspect\x20field\x20names,\x20relations,\x20and\x20operation\x20metadata\x20for\x20a\x20known\x20dataset\x20code.'][a1_0x3875a7(0x1e1)]('\x0a')},{'code':a1_0x3875a7(0x17a),'category':a1_0x3875a7(0x187),'title':'Filter\x20dataset\x20data','method':a1_0x3875a7(0x1a3),'path':a1_0x3875a7(0x1df),'summary':a1_0x3875a7(0x1dd),'whenToUse':a1_0x3875a7(0x1ca),'pathParams':[{'name':a1_0x3875a7(0x200),'description':a1_0x3875a7(0x1b2)},{'name':a1_0x3875a7(0x17e),'description':'32-character\x20dataset\x20code'}],'queryParams':[],'bodySchema':'{\x22where\x22:{},\x22currentPage\x22:1,\x22pageSize\x22:20}','responseHighlights':['tableData\x20contains\x20records',a1_0x3875a7(0x18e)],'examples':[a1_0x3875a7(0x1ab),a1_0x3875a7(0x1ed)],'notes':[a1_0x3875a7(0x1a2),'For\x20the\x20next\x20page,\x20keep\x20where/select/orderBy/pageSize\x20unchanged\x20and\x20increment\x20only\x20currentPage,\x20which\x20starts\x20at\x201.',a1_0x3875a7(0x182),a1_0x3875a7(0x1cc)],'markdown':[a1_0x3875a7(0x1d0),'',a1_0x3875a7(0x190)]['join']('\x0a')},{'code':'dataset_data_aggregate','category':'dataset','title':a1_0x3875a7(0x1ac),'method':a1_0x3875a7(0x1a3),'path':a1_0x3875a7(0x1fa),'summary':a1_0x3875a7(0x185),'whenToUse':a1_0x3875a7(0x1c6),'pathParams':[{'name':a1_0x3875a7(0x200),'description':a1_0x3875a7(0x1b2)},{'name':a1_0x3875a7(0x17e),'description':'32-character\x20dataset\x20code'}],'queryParams':[],'bodySchema':a1_0x3875a7(0x19f),'responseHighlights':[a1_0x3875a7(0x1fc),a1_0x3875a7(0x186)],'examples':[a1_0x3875a7(0x1c0)],'notes':[a1_0x3875a7(0x1a9),'`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.'],'markdown':[a1_0x3875a7(0x18d),'',a1_0x3875a7(0x1b6)]['join']('\x0a')},{'code':a1_0x3875a7(0x1f5),'category':a1_0x3875a7(0x187),'title':a1_0x3875a7(0x1b4),'method':a1_0x3875a7(0x1a3),'path':a1_0x3875a7(0x189),'summary':a1_0x3875a7(0x1b4),'whenToUse':a1_0x3875a7(0x18f),'pathParams':[{'name':a1_0x3875a7(0x200),'description':'Current\x20app\x20code'},{'name':a1_0x3875a7(0x17e),'description':a1_0x3875a7(0x1e3)}],'queryParams':[],'bodySchema':a1_0x3875a7(0x1ea),'responseHighlights':['Returns\x20one\x20matching\x20business\x20record'],'examples':[a1_0x3875a7(0x1e0)],'notes':[a1_0x3875a7(0x1a8)],'markdown':a1_0x3875a7(0x181)},{'code':a1_0x3875a7(0x1c7),'category':a1_0x3875a7(0x187),'title':a1_0x3875a7(0x1e4),'method':a1_0x3875a7(0x1a3),'path':a1_0x3875a7(0x1a1),'summary':a1_0x3875a7(0x1f0),'whenToUse':a1_0x3875a7(0x201),'pathParams':[{'name':a1_0x3875a7(0x200),'description':'Current\x20app\x20code'},{'name':a1_0x3875a7(0x17e),'description':a1_0x3875a7(0x1e3)}],'queryParams':[],'bodySchema':a1_0x3875a7(0x1ec),'responseHighlights':[a1_0x3875a7(0x1cd)],'examples':['lovrabet\x20data\x20create\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22name\x22:\x22demo\x22}\x27'],'notes':[a1_0x3875a7(0x1aa)],'markdown':a1_0x3875a7(0x17c)},{'code':a1_0x3875a7(0x17b),'category':'bf','title':a1_0x3875a7(0x1d4),'method':a1_0x3875a7(0x1b0),'path':a1_0x3875a7(0x1d8),'summary':a1_0x3875a7(0x1d3),'whenToUse':a1_0x3875a7(0x1a7),'pathParams':[{'name':'appCode','description':a1_0x3875a7(0x1b2)},{'name':'functionName','description':a1_0x3875a7(0x1c8)}],'queryParams':[],'bodySchema':a1_0x3875a7(0x1c3),'responseHighlights':['CLI\x20returns\x20appCode/functionName/description/version/gmtModified'],'examples':['lovrabet\x20bff\x20detail\x20--name\x20<functionName>'],'notes':[a1_0x3875a7(0x1b3)],'markdown':a1_0x3875a7(0x194)},{'code':a1_0x3875a7(0x1fd),'category':'bf','title':a1_0x3875a7(0x1ef),'method':a1_0x3875a7(0x1a3),'path':a1_0x3875a7(0x1ff),'summary':'Execute\x20a\x20BF\x20endpoint\x20function','whenToUse':a1_0x3875a7(0x1bb),'pathParams':[{'name':a1_0x3875a7(0x200),'description':a1_0x3875a7(0x1b2)},{'name':a1_0x3875a7(0x1ba),'description':a1_0x3875a7(0x18a)}],'queryParams':[],'bodySchema':a1_0x3875a7(0x183),'responseHighlights':['Returns\x20script\x20business\x20payload'],'examples':[a1_0x3875a7(0x1f4)],'notes':[a1_0x3875a7(0x1ce)],'markdown':'##\x20Execute\x20BF\x20endpoint\x20function\x0a\x0aExecute\x20a\x20known\x20endpoint\x20script.'},{'code':'personal_bf_execute','category':'bf','title':a1_0x3875a7(0x198),'method':a1_0x3875a7(0x1a3),'path':'/api/runtime-bff/personal/{id}/execute','summary':a1_0x3875a7(0x1f8),'whenToUse':a1_0x3875a7(0x1ad),'pathParams':[{'name':'id','description':a1_0x3875a7(0x188)}],'queryParams':[{'name':a1_0x3875a7(0x200),'description':a1_0x3875a7(0x1b2)}],'bodySchema':a1_0x3875a7(0x183),'responseHighlights':[a1_0x3875a7(0x1b1)],'examples':[a1_0x3875a7(0x195)],'notes':[a1_0x3875a7(0x1cb),a1_0x3875a7(0x1af)],'markdown':[a1_0x3875a7(0x193),'',a1_0x3875a7(0x1ae)][a1_0x3875a7(0x1e1)]('\x0a')},{'code':'custom_sql_execute','category':a1_0x3875a7(0x1c1),'title':a1_0x3875a7(0x1fb),'method':a1_0x3875a7(0x1a3),'path':a1_0x3875a7(0x1cf),'summary':a1_0x3875a7(0x1fb),'whenToUse':a1_0x3875a7(0x1bc),'pathParams':[],'queryParams':[],'bodySchema':'{\x22appCode\x22:\x22app-aa63b188\x22,\x22sqlCode\x22:\x22xxxxxxxx-xxxxxxxx\x22,\x22params\x22:{}}','responseHighlights':[a1_0x3875a7(0x1b5)],'examples':[a1_0x3875a7(0x1f9)],'notes':[a1_0x3875a7(0x1c2)],'markdown':a1_0x3875a7(0x1e7)}];function entrySummary(_0x27147d){const _0x471731=a1_0x3875a7;return{'code':_0x27147d[_0x471731(0x1f2)],'category':_0x27147d[_0x471731(0x17d)],'method':_0x27147d[_0x471731(0x184)],'path':_0x27147d[_0x471731(0x18b)],'summary':_0x27147d[_0x471731(0x1e6)],'whenToUse':_0x27147d[_0x471731(0x197)]};}export function listApiDocEntries(_0x4b354d={}){const _0x4ab062=a1_0x3875a7,_0x520b23=String(_0x4b354d[_0x4ab062(0x17d)]||'')[_0x4ab062(0x1c9)](),_0x41bc81=String(_0x4b354d[_0x4ab062(0x1d7)]||'')['trim']()[_0x4ab062(0x1a0)]();return DOCS[_0x4ab062(0x1e5)](_0x20e871=>{const _0x2c7614=_0x4ab062;if(_0x520b23&&_0x20e871['category']!==_0x520b23)return![];if(!_0x41bc81)return!![];return[_0x20e871[_0x2c7614(0x1f2)],_0x20e871[_0x2c7614(0x17d)],_0x20e871[_0x2c7614(0x184)],_0x20e871[_0x2c7614(0x18b)],_0x20e871[_0x2c7614(0x1e6)],_0x20e871[_0x2c7614(0x197)],_0x20e871[_0x2c7614(0x19b)]][_0x2c7614(0x1e1)]('\x20')[_0x2c7614(0x1a0)]()[_0x2c7614(0x191)](_0x41bc81);})[_0x4ab062(0x1ee)](entrySummary);}function a1_0x1061(){const _0x2dc511=['##\x20Get\x20BF\x20endpoint\x20function\x20contract\x0a\x0aInspect\x20one\x20known\x20endpoint\x20function\x20through\x20the\x20AK-authenticated\x20exact\x20detail\x20API.','lovrabet\x20personal-bff\x20exec\x20--id\x20<id>\x20--params\x20\x27{}\x27','lovrabet\x20dataset\x20list\x20--appcode\x20<appCode>\x20--format\x20compress','whenToUse','Execute\x20Personal\x20Backend\x20Function','API\x20doc\x20code,\x20for\x20example\x20dataset_list','detail','title','length','dataset_detail','List\x20datasets','{\x22aggregate\x22:[{\x22column\x22:\x20\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[]}','toLowerCase','/api/{appCode}/{datasetCode}/create','where,\x20select,\x20orderBy,\x20currentPage,\x20and\x20pageSize\x20belong\x20inside\x20one\x20--params\x20JSON\x20object;\x20they\x20are\x20not\x20standalone\x20CLI\x20flags.','POST','relations\x20contains\x20the\x20object-shaped\x20API\x20relations\x20value\x20when\x20returned','Show\x20runtime\x20API\x20documentation\x20by\x20code','9tuqwoq','Use\x20when\x20the\x20function\x20name\x20is\x20already\x20confirmed\x20and\x20you\x20need\x20that\x20ENDPOINT\x27s\x20runtime\x20metadata','Prefer\x20`filter`\x20when\x20the\x20record\x20id\x20is\x20unknown.','Use\x20`having`\x20only\x20for\x20post-aggregation\x20filters.','This\x20is\x20a\x20write\x20operation;\x20use\x20dry-run\x20when\x20available\x20and\x20safe\x20fixtures\x20for\x20smoke\x20tests.','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','Aggregate\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','Execute\x20a\x20known\x20Personal\x20Backend\x20Function\x20script\x20through\x20its\x20runtime\x20execute\x20endpoint.','Function\x20execution\x20may\x20have\x20business\x20side\x20effects;\x20inspect\x20detail\x20before\x20execution.','GET','Returns\x20script\x20business\x20payload','Current\x20app\x20code','This\x20is\x20an\x20exact\x20lookup\x20by\x20appCode\x20+\x20functionName.\x20The\x20CLI\x20does\x20not\x20enumerate\x20Backend\x20Function\x20definitions\x20or\x20expose\x20platform-only\x20fields.','Get\x20one\x20dataset\x20record','Returns\x20SQL\x20execution\x20payload','Aggregate\x20supports\x20COUNT,\x20SUM,\x20AVG,\x20MAX,\x20and\x20MIN\x20definitions\x20in\x20the\x20`aggregate`\x20array.','2761087LVxBNv','Use\x20this\x20API\x20or\x20`lovrabet\x20dataset\x20list`\x20to\x20discover\x20available\x20dataset\x20codes\x20before\x20reading\x20data.','860vhKmiu','functionName','Use\x20when\x20the\x20target\x20BF\x20functionName\x20is\x20confirmed\x20and\x20you\x20need\x20to\x20call\x20that\x20ENDPOINT','Use\x20when\x20the\x20target\x20sqlCode\x20exists\x20and\x20you\x20need\x20to\x20execute\x20that\x20custom\x20SQL','Use\x20when\x20you\x20need\x20fields,\x20table\x20info,\x20relations,\x20or\x20operation\x20definitions\x20for\x20a\x20dataset\x20code','find','1195912oekliK','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','custom_sql','Use\x20`lovrabet\x20sql\x20detail`\x20before\x20execution.','None','CLI\x20users\x20should\x20prefer\x20`lovrabet\x20dataset\x20list`\x20for\x20this\x20workflow.','395135VaojeZ','Use\x20when\x20you\x20need\x20groupBy\x20plus\x20count,\x20sum,\x20avg,\x20max,\x20or\x20min\x20aggregates','dataset_data_create','Exact\x20endpoint\x20function\x20name','trim','Use\x20when\x20you\x20need\x20to\x20read\x20business\x20data\x20with\x20where,\x20orderBy,\x20pagination,\x20or\x20similar\x20filters','Personal\x20BFF\x20scripts\x20are\x20user-owned\x20and\x20scoped\x20per\x20app.','Use\x20read-only\x20data\x20commands\x20before\x20writing\x20Artifacts\x20that\x20display\x20real\x20data.','Returns\x20the\x20created\x20record\x20or\x20backend\x20operation\x20result','Script\x20behavior\x20may\x20have\x20side\x20effects;\x20inspect\x20detail\x20first.','/api/custom/executeSql','##\x20Filter\x20dataset\x20data','api-doc','List\x20available\x20runtime\x20API\x20documentation\x20entries','Get\x20a\x20BF\x20endpoint\x20contract\x20by\x20app\x20and\x20function\x20name','Get\x20BF\x20endpoint\x20function\x20contract','5IbuNVE','##\x20List\x20datasets','keyword','/client/bff/endpoint/{appCode}/{functionName}','list','{\x22appCode\x22:\x22app-aa63b188\x22,\x22currentPage\x22:1,\x22pageSize\x22:100}','str','Search\x20docs\x20by\x20code,\x20summary,\x20path,\x20or\x20usage\x20text','Filter\x20dataset\x20records','/api/dataset/get-dataset-list-by-app-code','/api/{appCode}/{datasetCode}/filter','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27','join','3qkdpOi','32-character\x20dataset\x20code','Create\x20dataset\x20record','filter','summary','##\x20Execute\x20custom\x20SQL\x0a\x0aExecute\x20a\x20configured\x20SQL\x20script\x20by\x20sqlCode.','683404yKxeOF','tableData\x20contains\x20dataset\x20id/code/name','{\x22id\x22:123}','326398QtVXBB','{\x22fieldName\x22:\x22value\x22}','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','map','Execute\x20BF\x20endpoint\x20function','Create\x20a\x20dataset\x20record','6hPESZu','code','API\x20doc\x20code\x20not\x20found:\x20','lovrabet\x20bff\x20exec\x20--name\x20<functionName>\x20--params\x20\x27{}\x27','dataset_data_get_one','read','Dataset\x20detail','Execute\x20a\x20Personal\x20Backend\x20Function\x20by\x20script\x20ID','lovrabet\x20sql\x20exec\x20--sqlcode\x20<sqlCode>\x20--params\x20\x27{}\x27','/api/{appCode}/{datasetCode}/aggregate','Execute\x20custom\x20SQL','result\x20rows\x20contain\x20aggregate\x20aliases','bf_execute','If\x20SDK\x20usage\x20is\x20needed,\x20follow\x20with\x20`lovrabet\x20dataset\x20sdk-doc\x20--code\x20<datasetCode>`.','/api/endpoint/{appCode}/{functionName}','appCode','Use\x20when\x20you\x20need\x20to\x20insert\x20one\x20business\x20record\x20into\x20a\x20dataset','339128fibSvX','Filter\x20docs\x20by\x20category,\x20for\x20example\x20dataset','dataset_data_filter','bf_detail','##\x20Create\x20dataset\x20record\x0a\x0aCreate\x20one\x20data\x20record\x20in\x20a\x20dataset.','category','datasetCode','12JnnASy','dataset_list','##\x20Get\x20one\x20dataset\x20record\x0a\x0aRead\x20one\x20record\x20by\x20id.','Verify\x20tableData\x20and\x20paging\x20before\x20treating\x20the\x20response\x20as\x20a\x20business\x20fact.','{\x22param\x22:\x22value\x22}','method','Aggregate\x20dataset\x20records','where\x20filters\x20before\x20aggregation','dataset','Personal\x20Backend\x20Function\x20script\x20ID,\x20for\x20example\x20123','/api/{appCode}/{datasetCode}/getOne','Endpoint\x20function\x20name','path','56353PQUhOV','##\x20Aggregate\x20dataset\x20data','paging\x20contains\x20pagination','Use\x20when\x20you\x20already\x20know\x20the\x20record\x20id\x20and\x20need\x20one\x20business\x20row\x20from\x20a\x20dataset','Use\x20`where`,\x20`select`,\x20`orderBy`,\x20`currentPage`,\x20and\x20`pageSize`\x20to\x20inspect\x20live\x20data\x20shape.','includes','operations\x20describes\x20runtime\x20APIs','##\x20Execute\x20Personal\x20Backend\x20Function'];a1_0x1061=function(){return _0x2dc511;};return a1_0x1061();}export function getApiDocDetail(_0x5e0a54){const _0x35009b=a1_0x3875a7,_0x80d357=DOCS[_0x35009b(0x1be)](_0x4c790c=>_0x4c790c['code']===_0x5e0a54);if(!_0x80d357)throw CliErrors['validation'](_0x35009b(0x1f3)+_0x5e0a54);return{..._0x80d357};}const apiDocList={'service':a1_0x3875a7(0x1d1),'command':a1_0x3875a7(0x1d9),'description':a1_0x3875a7(0x1d2),'risk':a1_0x3875a7(0x1f6),'requiresAppCode':![],'flags':[CATEGORY_FLAG,KEYWORD_FLAG],async 'execute'(_0x24925c){const _0x361761=a1_0x3875a7,_0x22d083=listApiDocEntries({'category':_0x24925c[_0x361761(0x1db)](_0x361761(0x17d)),'keyword':_0x24925c['str'](_0x361761(0x1d7))});return{'ok':!![],'data':{'total':_0x22d083[_0x361761(0x19c)],'items':_0x22d083}};}},apiDocDetail={'service':a1_0x3875a7(0x1d1),'command':a1_0x3875a7(0x19a),'description':a1_0x3875a7(0x1a5),'risk':a1_0x3875a7(0x1f6),'requiresAppCode':![],'flags':[DOC_CODE_FLAG],async 'execute'(_0x3312eb){const _0x31cfaa=a1_0x3875a7;return{'ok':!![],'data':getApiDocDetail(_0x3312eb['str'](_0x31cfaa(0x1f2)))};}};function a1_0x3542(_0x54c694,_0x18407c){_0x54c694=_0x54c694-0x178;const _0x106120=a1_0x1061();let _0x354291=_0x106120[_0x54c694];return _0x354291;}export const apiDocDefinitions=[apiDocList,apiDocDetail];
1
+ const a1_0x24ac76=a1_0x5c68;function a1_0x284b(){const _0x455116=['datasetCode','dataset_list','str','Use\x20when\x20the\x20target\x20BF\x20functionName\x20is\x20confirmed\x20and\x20you\x20need\x20to\x20call\x20that\x20ENDPOINT','tableData\x20contains\x20dataset\x20id/code/name','API\x20doc\x20code\x20not\x20found:\x20','Execute\x20custom\x20SQL','Use\x20when\x20you\x20need\x20fields,\x20table\x20info,\x20relations,\x20or\x20operation\x20definitions\x20for\x20a\x20dataset\x20code','25809NKRjOs','##\x20Get\x20one\x20dataset\x20record\x0a\x0aRead\x20one\x20record\x20by\x20id.','Use\x20`where`,\x20`select`,\x20`orderBy`,\x20`currentPage`,\x20and\x20`pageSize`\x20to\x20inspect\x20live\x20data\x20shape.','/api/{appCode}/{datasetCode}/filter','string','##\x20Execute\x20Personal\x20Backend\x20Function','{\x22appCode\x22:\x22app-aa63b188\x22,\x22currentPage\x22:1,\x22pageSize\x22:100}','appCode','/api/dataset/get-dataset-list-by-app-code','keyword','Use\x20read-only\x20data\x20commands\x20before\x20writing\x20Artifacts\x20that\x20display\x20real\x20data.','Use\x20when\x20you\x20already\x20know\x20the\x20record\x20id\x20and\x20need\x20one\x20business\x20row\x20from\x20a\x20dataset','POST','operations\x20describes\x20runtime\x20APIs','fields/properties\x20describe\x20data\x20shape','Returns\x20script\x20business\x20payload','GET','code','list','where,\x20select,\x20orderBy,\x20currentPage,\x20and\x20pageSize\x20belong\x20inside\x20one\x20--params\x20JSON\x20object;\x20they\x20are\x20not\x20standalone\x20CLI\x20flags.','Dataset\x20detail','/api/custom/executeSql','This\x20is\x20a\x20write\x20operation;\x20use\x20dry-run\x20when\x20available\x20and\x20safe\x20fixtures\x20for\x20smoke\x20tests.','Personal\x20BFF\x20scripts\x20are\x20user-owned\x20and\x20scoped\x20per\x20app.','Get\x20dataset\x20detail','34909028juelaU','result\x20rows\x20contain\x20aggregate\x20aliases','dataset_data_get_one','lovrabet\x20sql\x20exec\x20--sqlcode\x20<sqlCode>\x20--params\x20\x27{}\x27','paging.totalCount\x20gives\x20total\x20rows','custom_sql_execute','5845ZgvQRp','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','656622MhIuWX','Returns\x20the\x20created\x20record\x20or\x20backend\x20operation\x20result','Use\x20when\x20you\x20need\x20a\x20paginated\x20runtime\x20dataset\x20list\x20by\x20appCode\x20and\x20want\x20to\x20collect\x20available\x20datasetCode\x20values','1845614rLpHeG','lovrabet\x20bff\x20exec\x20--name\x20<functionName>\x20--params\x20\x27{}\x27','Prefer\x20`filter`\x20when\x20the\x20record\x20id\x20is\x20unknown.','lovrabet\x20data\x20create\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22name\x22:\x22demo\x22}\x27','32-character\x20dataset\x20code','dataset_data_aggregate','Get\x20BF\x20endpoint\x20function\x20contract','{\x22param\x22:\x22value\x22}','paging\x20contains\x20pagination','Verify\x20tableData\x20and\x20paging\x20before\x20treating\x20the\x20response\x20as\x20a\x20business\x20fact.','7019464VWEvNm','4488lduSVZ','##\x20List\x20datasets','Execute\x20a\x20known\x20Personal\x20Backend\x20Function\x20script\x20through\x20its\x20runtime\x20execute\x20endpoint.','Execute\x20BF\x20endpoint\x20function','Get\x20a\x20BF\x20endpoint\x20contract\x20by\x20app\x20and\x20function\x20name','/api/{appCode}/{datasetCode}/create','Aggregate\x20dataset\x20records','##\x20Dataset\x20detail','{\x22aggregate\x22:[{\x22column\x22:\x20\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[]}','10NjwIKJ','relations\x20contains\x20the\x20object-shaped\x20API\x20relations\x20value\x20when\x20returned','find','Use\x20when\x20you\x20need\x20groupBy\x20plus\x20count,\x20sum,\x20avg,\x20max,\x20or\x20min\x20aggregates','Function\x20execution\x20may\x20have\x20business\x20side\x20effects;\x20inspect\x20detail\x20before\x20execution.','{\x22where\x22:{},\x22currentPage\x22:1,\x22pageSize\x22:20}','For\x20the\x20next\x20page,\x20keep\x20where/select/orderBy/pageSize\x20unchanged\x20and\x20increment\x20only\x20currentPage,\x20which\x20starts\x20at\x201.','api-doc','This\x20is\x20an\x20exact\x20lookup\x20by\x20appCode\x20+\x20functionName.\x20The\x20CLI\x20does\x20not\x20enumerate\x20Backend\x20Function\x20definitions\x20or\x20expose\x20platform-only\x20fields.','map','##\x20Aggregate\x20dataset\x20data','path','join','74URpyGW','trim','method','Aggregate\x20dataset\x20data','/api/endpoint/{appCode}/{functionName}','Personal\x20Backend\x20Function\x20script\x20ID,\x20for\x20example\x20123','lovrabet\x20dataset\x20list\x20--appcode\x20<appCode>\x20--format\x20compress','`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','List\x20datasets\x20with\x20pagination','whenToUse','where\x20filters\x20before\x20aggregation','Current\x20app\x20code','title','Exact\x20endpoint\x20function\x20name','{\x22id\x22:123}','Script\x20behavior\x20may\x20have\x20side\x20effects;\x20inspect\x20detail\x20first.','read','personal_bf_execute','/api/runtime-bff/personal/{id}/execute','Use\x20`having`\x20only\x20for\x20post-aggregation\x20filters.','functionName','Execute\x20a\x20Personal\x20Backend\x20Function\x20by\x20script\x20ID','68466MeGSiH','Returns\x20one\x20matching\x20business\x20record','lovrabet\x20personal-bff\x20exec\x20--id\x20<id>\x20--params\x20\x27{}\x27','lovrabet\x20bff\x20detail\x20--name\x20<functionName>','##\x20Get\x20BF\x20endpoint\x20function\x20contract\x0a\x0aInspect\x20one\x20known\x20endpoint\x20function\x20through\x20the\x20AK-authenticated\x20exact\x20detail\x20API.','List\x20available\x20runtime\x20API\x20documentation\x20entries','toLowerCase','category','summary','dataset','##\x20Filter\x20dataset\x20data','/api/dataset/getOneByCode?code={datasetCode}','Execute\x20a\x20BF\x20endpoint\x20function','Endpoint\x20function\x20name','Get\x20one\x20dataset\x20record','/api/{appCode}/{datasetCode}/getOne','Use\x20when\x20the\x20function\x20name\x20is\x20already\x20confirmed\x20and\x20you\x20need\x20that\x20ENDPOINT\x27s\x20runtime\x20metadata','##\x20Create\x20dataset\x20record\x0a\x0aCreate\x20one\x20data\x20record\x20in\x20a\x20dataset.','CLI\x20users\x20should\x20prefer\x20`lovrabet\x20dataset\x20list`\x20for\x20this\x20workflow.','detail','API\x20doc\x20code,\x20for\x20example\x20dataset_list','Show\x20runtime\x20API\x20documentation\x20by\x20code','None','CLI\x20returns\x20appCode/functionName/description/version/gmtModified','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','bf_execute','1384XcmARq','bf_detail','{\x22appCode\x22:\x22app-aa63b188\x22,\x22sqlCode\x22:\x22xxxxxxxx-xxxxxxxx\x22,\x22params\x22:{}}','Inspect\x20field\x20names,\x20relations,\x20and\x20operation\x20metadata\x20for\x20a\x20known\x20dataset\x20code.','custom_sql','lovrabet\x20dataset\x20detail\x20--code\x20<datasetCode>\x20--appcode\x20<appCode>','Filter\x20dataset\x20data','dataset_detail','Use\x20when\x20the\x20target\x20sqlCode\x20exists\x20and\x20you\x20need\x20to\x20execute\x20that\x20custom\x20SQL','Use\x20this\x20API\x20or\x20`lovrabet\x20dataset\x20list`\x20to\x20discover\x20available\x20dataset\x20codes\x20before\x20reading\x20data.'];a1_0x284b=function(){return _0x455116;};return a1_0x284b();}function a1_0x5c68(_0xff386e,_0x2db477){_0xff386e=_0xff386e-0x1d4;const _0x284b24=a1_0x284b();let _0x5c6855=_0x284b24[_0xff386e];return _0x5c6855;}(function(_0x473ec8,_0x40cf3d){const _0x3806b7=a1_0x5c68,_0x3bdd23=_0x473ec8();while(!![]){try{const _0x5ded71=parseInt(_0x3806b7(0x200))/0x1+parseInt(_0x3806b7(0x221))/0x2*(parseInt(_0x3806b7(0x237))/0x3)+parseInt(_0x3806b7(0x20a))/0x4+parseInt(_0x3806b7(0x1fb))/0x5*(-parseInt(_0x3806b7(0x20b))/0x6)+parseInt(_0x3806b7(0x1dc))/0x7*(parseInt(_0x3806b7(0x251))/0x8)+parseInt(_0x3806b7(0x1fd))/0x9*(-parseInt(_0x3806b7(0x214))/0xa)+-parseInt(_0x3806b7(0x1f5))/0xb;if(_0x5ded71===_0x40cf3d)break;else _0x3bdd23['push'](_0x3bdd23['shift']());}catch(_0x958d9a){_0x3bdd23['push'](_0x3bdd23['shift']());}}}(a1_0x284b,0xead23));import{CliErrors}from'../../errors.js';const CATEGORY_FLAG={'name':a1_0x24ac76(0x23e),'type':'string','description':'Filter\x20docs\x20by\x20category,\x20for\x20example\x20dataset'},KEYWORD_FLAG={'name':'keyword','type':a1_0x24ac76(0x1e0),'description':'Search\x20docs\x20by\x20code,\x20summary,\x20path,\x20or\x20usage\x20text'},DOC_CODE_FLAG={'name':a1_0x24ac76(0x1ed),'type':a1_0x24ac76(0x1e0),'required':!![],'description':a1_0x24ac76(0x24b)},DOCS=[{'code':a1_0x24ac76(0x1d5),'category':a1_0x24ac76(0x240),'title':'List\x20datasets','method':'POST','path':a1_0x24ac76(0x1e4),'summary':a1_0x24ac76(0x229),'whenToUse':a1_0x24ac76(0x1ff),'pathParams':[],'queryParams':[],'bodySchema':a1_0x24ac76(0x1e2),'responseHighlights':[a1_0x24ac76(0x1d8),a1_0x24ac76(0x1f9)],'examples':[a1_0x24ac76(0x227)],'notes':[a1_0x24ac76(0x249)],'markdown':[a1_0x24ac76(0x20c),'',a1_0x24ac76(0x25a)][a1_0x24ac76(0x220)]('\x0a')},{'code':a1_0x24ac76(0x258),'category':a1_0x24ac76(0x240),'title':a1_0x24ac76(0x1f0),'method':'GET','path':a1_0x24ac76(0x242),'summary':a1_0x24ac76(0x1f4),'whenToUse':a1_0x24ac76(0x1db),'pathParams':[],'queryParams':[{'name':a1_0x24ac76(0x1ed),'description':a1_0x24ac76(0x204)}],'bodySchema':a1_0x24ac76(0x24d),'responseHighlights':[a1_0x24ac76(0x1ea),a1_0x24ac76(0x215),a1_0x24ac76(0x1e9)],'examples':[a1_0x24ac76(0x256)],'notes':['If\x20SDK\x20usage\x20is\x20needed,\x20follow\x20with\x20`lovrabet\x20dataset\x20sdk-doc\x20--code\x20<datasetCode>`.'],'markdown':[a1_0x24ac76(0x212),'',a1_0x24ac76(0x254)][a1_0x24ac76(0x220)]('\x0a')},{'code':'dataset_data_filter','category':a1_0x24ac76(0x240),'title':a1_0x24ac76(0x257),'method':a1_0x24ac76(0x1e8),'path':a1_0x24ac76(0x1df),'summary':'Filter\x20dataset\x20records','whenToUse':'Use\x20when\x20you\x20need\x20to\x20read\x20business\x20data\x20with\x20where,\x20orderBy,\x20pagination,\x20or\x20similar\x20filters','pathParams':[{'name':a1_0x24ac76(0x1e3),'description':'Current\x20app\x20code'},{'name':a1_0x24ac76(0x1d4),'description':'32-character\x20dataset\x20code'}],'queryParams':[],'bodySchema':a1_0x24ac76(0x219),'responseHighlights':['tableData\x20contains\x20records',a1_0x24ac76(0x208)],'examples':['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',a1_0x24ac76(0x24f)],'notes':[a1_0x24ac76(0x1ef),a1_0x24ac76(0x21a),a1_0x24ac76(0x209),a1_0x24ac76(0x1e6)],'markdown':[a1_0x24ac76(0x241),'',a1_0x24ac76(0x1de)][a1_0x24ac76(0x220)]('\x0a')},{'code':a1_0x24ac76(0x205),'category':a1_0x24ac76(0x240),'title':a1_0x24ac76(0x224),'method':'POST','path':'/api/{appCode}/{datasetCode}/aggregate','summary':a1_0x24ac76(0x211),'whenToUse':a1_0x24ac76(0x217),'pathParams':[{'name':a1_0x24ac76(0x1e3),'description':a1_0x24ac76(0x22c)},{'name':'datasetCode','description':a1_0x24ac76(0x204)}],'queryParams':[],'bodySchema':a1_0x24ac76(0x213),'responseHighlights':[a1_0x24ac76(0x1f6),a1_0x24ac76(0x22b)],'examples':[a1_0x24ac76(0x1fc)],'notes':[a1_0x24ac76(0x234),a1_0x24ac76(0x228)],'markdown':[a1_0x24ac76(0x21e),'','Aggregate\x20supports\x20COUNT,\x20SUM,\x20AVG,\x20MAX,\x20and\x20MIN\x20definitions\x20in\x20the\x20`aggregate`\x20array.'][a1_0x24ac76(0x220)]('\x0a')},{'code':a1_0x24ac76(0x1f7),'category':a1_0x24ac76(0x240),'title':a1_0x24ac76(0x245),'method':'POST','path':a1_0x24ac76(0x246),'summary':a1_0x24ac76(0x245),'whenToUse':a1_0x24ac76(0x1e7),'pathParams':[{'name':a1_0x24ac76(0x1e3),'description':'Current\x20app\x20code'},{'name':a1_0x24ac76(0x1d4),'description':a1_0x24ac76(0x204)}],'queryParams':[],'bodySchema':a1_0x24ac76(0x22f),'responseHighlights':[a1_0x24ac76(0x238)],'examples':['lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27'],'notes':[a1_0x24ac76(0x202)],'markdown':a1_0x24ac76(0x1dd)},{'code':'dataset_data_create','category':a1_0x24ac76(0x240),'title':'Create\x20dataset\x20record','method':a1_0x24ac76(0x1e8),'path':a1_0x24ac76(0x210),'summary':'Create\x20a\x20dataset\x20record','whenToUse':'Use\x20when\x20you\x20need\x20to\x20insert\x20one\x20business\x20record\x20into\x20a\x20dataset','pathParams':[{'name':a1_0x24ac76(0x1e3),'description':'Current\x20app\x20code'},{'name':'datasetCode','description':a1_0x24ac76(0x204)}],'queryParams':[],'bodySchema':'{\x22fieldName\x22:\x22value\x22}','responseHighlights':[a1_0x24ac76(0x1fe)],'examples':[a1_0x24ac76(0x203)],'notes':[a1_0x24ac76(0x1f2)],'markdown':a1_0x24ac76(0x248)},{'code':a1_0x24ac76(0x252),'category':'bf','title':a1_0x24ac76(0x206),'method':a1_0x24ac76(0x1ec),'path':'/client/bff/endpoint/{appCode}/{functionName}','summary':a1_0x24ac76(0x20f),'whenToUse':a1_0x24ac76(0x247),'pathParams':[{'name':'appCode','description':a1_0x24ac76(0x22c)},{'name':a1_0x24ac76(0x235),'description':a1_0x24ac76(0x22e)}],'queryParams':[],'bodySchema':'None','responseHighlights':[a1_0x24ac76(0x24e)],'examples':[a1_0x24ac76(0x23a)],'notes':[a1_0x24ac76(0x21c)],'markdown':a1_0x24ac76(0x23b)},{'code':a1_0x24ac76(0x250),'category':'bf','title':a1_0x24ac76(0x20e),'method':a1_0x24ac76(0x1e8),'path':a1_0x24ac76(0x225),'summary':a1_0x24ac76(0x243),'whenToUse':a1_0x24ac76(0x1d7),'pathParams':[{'name':a1_0x24ac76(0x1e3),'description':'Current\x20app\x20code'},{'name':a1_0x24ac76(0x235),'description':a1_0x24ac76(0x244)}],'queryParams':[],'bodySchema':a1_0x24ac76(0x207),'responseHighlights':['Returns\x20script\x20business\x20payload'],'examples':[a1_0x24ac76(0x201)],'notes':[a1_0x24ac76(0x230)],'markdown':'##\x20Execute\x20BF\x20endpoint\x20function\x0a\x0aExecute\x20a\x20known\x20endpoint\x20script.'},{'code':a1_0x24ac76(0x232),'category':'bf','title':'Execute\x20Personal\x20Backend\x20Function','method':'POST','path':a1_0x24ac76(0x233),'summary':a1_0x24ac76(0x236),'whenToUse':'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','pathParams':[{'name':'id','description':a1_0x24ac76(0x226)}],'queryParams':[{'name':a1_0x24ac76(0x1e3),'description':a1_0x24ac76(0x22c)}],'bodySchema':a1_0x24ac76(0x207),'responseHighlights':[a1_0x24ac76(0x1eb)],'examples':[a1_0x24ac76(0x239)],'notes':[a1_0x24ac76(0x1f3),a1_0x24ac76(0x218)],'markdown':[a1_0x24ac76(0x1e1),'',a1_0x24ac76(0x20d)][a1_0x24ac76(0x220)]('\x0a')},{'code':a1_0x24ac76(0x1fa),'category':a1_0x24ac76(0x255),'title':'Execute\x20custom\x20SQL','method':a1_0x24ac76(0x1e8),'path':a1_0x24ac76(0x1f1),'summary':a1_0x24ac76(0x1da),'whenToUse':a1_0x24ac76(0x259),'pathParams':[],'queryParams':[],'bodySchema':a1_0x24ac76(0x253),'responseHighlights':['Returns\x20SQL\x20execution\x20payload'],'examples':[a1_0x24ac76(0x1f8)],'notes':['Use\x20`lovrabet\x20sql\x20detail`\x20before\x20execution.'],'markdown':'##\x20Execute\x20custom\x20SQL\x0a\x0aExecute\x20a\x20configured\x20SQL\x20script\x20by\x20sqlCode.'}];function entrySummary(_0xb92013){const _0x37920e=a1_0x24ac76;return{'code':_0xb92013[_0x37920e(0x1ed)],'category':_0xb92013[_0x37920e(0x23e)],'method':_0xb92013['method'],'path':_0xb92013[_0x37920e(0x21f)],'summary':_0xb92013[_0x37920e(0x23f)],'whenToUse':_0xb92013[_0x37920e(0x22a)]};}export function listApiDocEntries(_0x5e61d8={}){const _0x3a42ff=a1_0x24ac76,_0x15e15c=String(_0x5e61d8[_0x3a42ff(0x23e)]||'')[_0x3a42ff(0x222)](),_0x3a6378=String(_0x5e61d8[_0x3a42ff(0x1e5)]||'')[_0x3a42ff(0x222)]()[_0x3a42ff(0x23d)]();return DOCS['filter'](_0x2de6c6=>{const _0x2afd0c=_0x3a42ff;if(_0x15e15c&&_0x2de6c6[_0x2afd0c(0x23e)]!==_0x15e15c)return![];if(!_0x3a6378)return!![];return[_0x2de6c6[_0x2afd0c(0x1ed)],_0x2de6c6[_0x2afd0c(0x23e)],_0x2de6c6[_0x2afd0c(0x223)],_0x2de6c6[_0x2afd0c(0x21f)],_0x2de6c6[_0x2afd0c(0x23f)],_0x2de6c6[_0x2afd0c(0x22a)],_0x2de6c6[_0x2afd0c(0x22d)]][_0x2afd0c(0x220)]('\x20')[_0x2afd0c(0x23d)]()['includes'](_0x3a6378);})[_0x3a42ff(0x21d)](entrySummary);}export function getApiDocDetail(_0x1ace92){const _0x67dcc1=a1_0x24ac76,_0x263c5f=DOCS[_0x67dcc1(0x216)](_0x4f9d5d=>_0x4f9d5d[_0x67dcc1(0x1ed)]===_0x1ace92);if(!_0x263c5f)throw CliErrors['validation'](_0x67dcc1(0x1d9)+_0x1ace92);return{..._0x263c5f};}const apiDocList={'service':'api-doc','command':a1_0x24ac76(0x1ee),'description':a1_0x24ac76(0x23c),'risk':a1_0x24ac76(0x231),'requiresAppCode':![],'flags':[CATEGORY_FLAG,KEYWORD_FLAG],async 'execute'(_0x7e11d6){const _0x505ee4=a1_0x24ac76,_0x1e7bc7=listApiDocEntries({'category':_0x7e11d6[_0x505ee4(0x1d6)](_0x505ee4(0x23e)),'keyword':_0x7e11d6[_0x505ee4(0x1d6)](_0x505ee4(0x1e5))});return{'ok':!![],'data':{'total':_0x1e7bc7['length'],'items':_0x1e7bc7}};}},apiDocDetail={'service':a1_0x24ac76(0x21b),'command':a1_0x24ac76(0x24a),'description':a1_0x24ac76(0x24c),'risk':'read','requiresAppCode':![],'flags':[DOC_CODE_FLAG],async 'execute'(_0x1e023d){return{'ok':!![],'data':getApiDocDetail(_0x1e023d['str']('code'))};}};export const apiDocDefinitions=[apiDocList,apiDocDetail];
@@ -1 +1 @@
1
- (function(_0x2d1351,_0x426039){const _0x38ee30=a2_0x1111,_0x211a23=_0x2d1351();while(!![]){try{const _0x2e55ef=parseInt(_0x38ee30(0xa9))/0x1*(-parseInt(_0x38ee30(0xaa))/0x2)+-parseInt(_0x38ee30(0xa5))/0x3+parseInt(_0x38ee30(0xad))/0x4*(parseInt(_0x38ee30(0xa4))/0x5)+parseInt(_0x38ee30(0xa1))/0x6+parseInt(_0x38ee30(0xab))/0x7+-parseInt(_0x38ee30(0xa6))/0x8+-parseInt(_0x38ee30(0xb4))/0x9*(-parseInt(_0x38ee30(0xb8))/0xa);if(_0x2e55ef===_0x426039)break;else _0x211a23['push'](_0x211a23['shift']());}catch(_0x31bcbd){_0x211a23['push'](_0x211a23['shift']());}}}(a2_0x549b,0x7c725));import{createHash}from'node:crypto';function a2_0x549b(){const _0x36d8cb=['items','parse','appName','4839492BBRHpf','unknown','my-apps.json','3199865MVjwcA','1470330RFgXjH','854320CFHaYA','EACCES','trim','8mDavkH','155048MvquLJ','1060633lqednP','.tmp','4mfaAYB','sha256','utf8','find','homeDirName','isArray','ak_','165537FtryzH','cache','code','slice','70qqzVMB','stringify'];a2_0x549b=function(){return _0x36d8cb;};return a2_0x549b();}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(_0x1a2c70){const _0xd12708=a2_0x1111,_0x148b7a=_0x1a2c70[_0xd12708(0xa8)](),_0x42169f=_0x148b7a['slice'](-0x6)||_0xd12708(0xa2),_0xf93273=createHash(_0xd12708(0xae))['update'](_0x148b7a)['digest']('hex')[_0xd12708(0xb7)](0x0,0xc);return _0xd12708(0xb3)+_0x42169f+'_'+_0xf93273;}function a2_0x1111(_0x4b51db,_0xeb453b){_0x4b51db=_0x4b51db-0xa0;const _0x549b18=a2_0x549b();let _0x111122=_0x549b18[_0x4b51db];return _0x111122;}export function getAppCacheFilePath(_0x1fe8d5,_0x1d27d2){const _0x5422c6=a2_0x1111;return resolve(homedir(),PRODUCT_CONFIG[_0x5422c6(0xb1)],_0x5422c6(0xb5),_0x1fe8d5,fingerprintAccessKey(_0x1d27d2),_0x5422c6(0xa3));}export function readCachedAppList(_0x113edf,_0x4d264d){const _0x5f2f68=a2_0x1111;if(!_0x4d264d?.['trim']())return null;const _0x2f4e16=getAppCacheFilePath(_0x113edf,_0x4d264d);if(!existsSync(_0x2f4e16))return null;try{const _0x5d9282=readFileSync(_0x2f4e16,_0x5f2f68(0xaf));if(!_0x5d9282['trim']())return null;const _0x1b471a=JSON[_0x5f2f68(0xbb)](_0x5d9282);if(!Array[_0x5f2f68(0xb2)](_0x1b471a[_0x5f2f68(0xba)]))return null;return _0x1b471a;}catch{return null;}}export function writeCachedAppList(_0x44547a,_0x7436d5,_0x351912){const _0x378d43=a2_0x1111,_0xcd1a11=getAppCacheFilePath(_0x44547a,_0x7436d5),_0x29b8c2=dirname(_0xcd1a11);!existsSync(_0x29b8c2)&&mkdirSync(_0x29b8c2,{'recursive':!![]});const _0x3bd9ef=_0xcd1a11+_0x378d43(0xac);try{writeFileSync(_0x3bd9ef,JSON['stringify'](_0x351912,null,0x2)+'\x0a',{'encoding':_0x378d43(0xaf),'mode':0x180});try{renameSync(_0x3bd9ef,_0xcd1a11);}catch(_0x5269c1){if(_0x5269c1['code']==='EPERM'||_0x5269c1[_0x378d43(0xb6)]==='EXDEV'||_0x5269c1[_0x378d43(0xb6)]===_0x378d43(0xa7)){writeFileSync(_0xcd1a11,JSON[_0x378d43(0xb9)](_0x351912,null,0x2)+'\x0a',{'encoding':_0x378d43(0xaf)});try{unlinkSync(_0x3bd9ef);}catch{}}else throw _0x5269c1;}}catch(_0x40f368){try{unlinkSync(_0x3bd9ef);}catch{}throw _0x40f368;}return _0xcd1a11;}export function resolveCachedAppCode(_0x3d1015,_0x1f1c3b,_0x55dfa8){const _0x98d407=a2_0x1111;if(!_0x3d1015)return undefined;const _0x21e256=readCachedAppList(_0x1f1c3b,_0x55dfa8),_0x2181c5=_0x21e256?.[_0x98d407(0xba)][_0x98d407(0xb0)](_0xae9465=>_0xae9465[_0x98d407(0xa0)]===_0x3d1015&&isRuntimeAccessibleApp(_0xae9465));return _0x2181c5?.['appCode']?.[_0x98d407(0xa8)]()||undefined;}
1
+ (function(_0x549e4e,_0xcb9ce8){const _0x2cdd6e=a2_0x313d,_0x3cc19e=_0x549e4e();while(!![]){try{const _0x57e7b3=parseInt(_0x2cdd6e(0x12c))/0x1+parseInt(_0x2cdd6e(0x131))/0x2+-parseInt(_0x2cdd6e(0x140))/0x3+parseInt(_0x2cdd6e(0x139))/0x4*(-parseInt(_0x2cdd6e(0x133))/0x5)+-parseInt(_0x2cdd6e(0x12d))/0x6+-parseInt(_0x2cdd6e(0x13f))/0x7+parseInt(_0x2cdd6e(0x13b))/0x8;if(_0x57e7b3===_0xcb9ce8)break;else _0x3cc19e['push'](_0x3cc19e['shift']());}catch(_0x25d4c9){_0x3cc19e['push'](_0x3cc19e['shift']());}}}(a2_0x54a6,0x4e0ed));import{createHash}from'node:crypto';function a2_0x54a6(){const _0x38d69f=['hex','homeDirName','EACCES','slice','259120COfevD','738072zSlxSB','.tmp','appName','EPERM','694932cyNfaM','update','219005rKypbf','items','trim','isArray','ak_','stringify','16HQxsBG','my-apps.json','4931656ohrqgs','utf8','parse','appCode','1522661NDfqmu','1162737Bxvkvh','find','EXDEV'];a2_0x54a6=function(){return _0x38d69f;};return a2_0x54a6();}import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';function a2_0x313d(_0x18706e,_0x4180a9){_0x18706e=_0x18706e-0x128;const _0x54a6f3=a2_0x54a6();let _0x313ddb=_0x54a6f3[_0x18706e];return _0x313ddb;}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(_0x324543){const _0x12ee92=a2_0x313d,_0x20e69f=_0x324543[_0x12ee92(0x135)](),_0x294f8e=_0x20e69f[_0x12ee92(0x12b)](-0x6)||'unknown',_0x38fa99=createHash('sha256')[_0x12ee92(0x132)](_0x20e69f)['digest'](_0x12ee92(0x128))[_0x12ee92(0x12b)](0x0,0xc);return _0x12ee92(0x137)+_0x294f8e+'_'+_0x38fa99;}export function getAppCacheFilePath(_0x112961,_0x35868b){const _0x26b0ef=a2_0x313d;return resolve(homedir(),PRODUCT_CONFIG[_0x26b0ef(0x129)],'cache',_0x112961,fingerprintAccessKey(_0x35868b),_0x26b0ef(0x13a));}export function readCachedAppList(_0x8b1db4,_0x15f5e7){const _0x4f7136=a2_0x313d;if(!_0x15f5e7?.[_0x4f7136(0x135)]())return null;const _0x494775=getAppCacheFilePath(_0x8b1db4,_0x15f5e7);if(!existsSync(_0x494775))return null;try{const _0x2308ab=readFileSync(_0x494775,'utf8');if(!_0x2308ab[_0x4f7136(0x135)]())return null;const _0x232fb4=JSON[_0x4f7136(0x13d)](_0x2308ab);if(!Array[_0x4f7136(0x136)](_0x232fb4[_0x4f7136(0x134)]))return null;return _0x232fb4;}catch{return null;}}export function writeCachedAppList(_0xdea76a,_0x85a820,_0x389e51){const _0x4d4aa8=a2_0x313d,_0x254634=getAppCacheFilePath(_0xdea76a,_0x85a820),_0x4bbdba=dirname(_0x254634);!existsSync(_0x4bbdba)&&mkdirSync(_0x4bbdba,{'recursive':!![]});const _0x34a0fa=_0x254634+_0x4d4aa8(0x12e);try{writeFileSync(_0x34a0fa,JSON[_0x4d4aa8(0x138)](_0x389e51,null,0x2)+'\x0a',{'encoding':_0x4d4aa8(0x13c),'mode':0x180});try{renameSync(_0x34a0fa,_0x254634);}catch(_0x2fa358){if(_0x2fa358['code']===_0x4d4aa8(0x130)||_0x2fa358['code']===_0x4d4aa8(0x142)||_0x2fa358['code']===_0x4d4aa8(0x12a)){writeFileSync(_0x254634,JSON[_0x4d4aa8(0x138)](_0x389e51,null,0x2)+'\x0a',{'encoding':_0x4d4aa8(0x13c)});try{unlinkSync(_0x34a0fa);}catch{}}else throw _0x2fa358;}}catch(_0x39783e){try{unlinkSync(_0x34a0fa);}catch{}throw _0x39783e;}return _0x254634;}export function resolveCachedAppCode(_0xdd5ca4,_0x360d8e,_0x1dcc74){const _0x430d20=a2_0x313d;if(!_0xdd5ca4)return undefined;const _0x4d74fa=readCachedAppList(_0x360d8e,_0x1dcc74),_0x58b350=_0x4d74fa?.[_0x430d20(0x134)][_0x430d20(0x141)](_0x283840=>_0x283840[_0x430d20(0x12f)]===_0xdd5ca4&&isRuntimeAccessibleApp(_0x283840));return _0x58b350?.[_0x430d20(0x13e)]?.[_0x430d20(0x135)]()||undefined;}
@@ -1 +1 @@
1
- const a3_0x27317c=a3_0x343f;(function(_0x218196,_0xd24bcb){const _0x2eff27=a3_0x343f,_0x4969fa=_0x218196();while(!![]){try{const _0x374a99=-parseInt(_0x2eff27(0x176))/0x1+-parseInt(_0x2eff27(0x13a))/0x2+-parseInt(_0x2eff27(0x152))/0x3*(parseInt(_0x2eff27(0x172))/0x4)+parseInt(_0x2eff27(0x175))/0x5+-parseInt(_0x2eff27(0x158))/0x6*(-parseInt(_0x2eff27(0x15e))/0x7)+-parseInt(_0x2eff27(0x156))/0x8+-parseInt(_0x2eff27(0x142))/0x9*(-parseInt(_0x2eff27(0x153))/0xa);if(_0x374a99===_0xd24bcb)break;else _0x4969fa['push'](_0x4969fa['shift']());}catch(_0x4a5a6f){_0x4969fa['push'](_0x4969fa['shift']());}}}(a3_0x2aa8,0x9e22a));import{appImportFlagDefs,runAppImport}from'../../commands/init.js';import{getEnv,RUNTIME_ENV_VALUES}from'../../constant/env.js';import{buildAppProfileListFields}from'../../config/schema.js';function a3_0x2aa8(){const _0x36baf5=['config','boolean','Reads\x20the\x20apps\x20available\x20to\x20the\x20current\x20account\x20and\x20overwrites\x20the\x20local\x20app\x20cache\x20for\x20that\x20environment.\x20Platform\x20apps\x20are\x20not\x20modified.','fetchedAt','str','cachePath','remote','entries','env','../../commands/app/remote-source.js','23601dIrUKc','1670RcVnJI','appcode','No\x20apps\x20found\x20on\x20the\x20platform.','8763416PMMXPL','nonInteractive','1157508cralve','map','appName','app','\x20cached\x20app(s)\x20for\x20env=\x22','appPublishStatus','7QiWzwF','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','i18nInfo','list','bool','type','langs','Refreshed\x20app\x20cache\x20with\x20','projectPath','No\x20cached\x20apps\x20found.','Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','appCode','envName','Read\x20app\x20list\x20from\x20local\x20cache\x20only','isCurrent','globalPath','push','name','List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','no-cache','228pnCVuF','items','source','1045750YqBZMx','95463DNZakE','Include\x20unpublished\x20apps\x20for\x20diagnostics','cache','filter','read','local','length','1588102kOAFFl','Filter\x20by\x20environment\x20(default:\x20current\x20env)','Target\x20environment\x20(default:\x20current\x20env)','accessKey','appOwnerName','find','Reads\x20the\x20given\x20.rabetbase.json\x20and\x20imports\x20a\x20usable\x20default\x20app\x20into\x20local\x20.lovrabet.json.\x20Matching\x20keys\x20may\x20be\x20updated.','string','144378euyfGF','enableI18n','Read\x20from\x20local\x20cache\x20only','../../context.js','production','\x20app(s)\x20for\x20env=\x22'];a3_0x2aa8=function(){return _0x36baf5;};return a3_0x2aa8();}import{enrichAppListItemsWithMergedSelection}from'../../commands/app/shared.js';function a3_0x343f(_0x558d6e,_0x1d8e47){_0x558d6e=_0x558d6e-0x13a;const _0x2aa895=a3_0x2aa8();let _0x343ff9=_0x2aa895[_0x558d6e];return _0x343ff9;}import{filterRuntimeAccessibleApps,findAppByCode,isRuntimeAccessibleApp}from'../../commands/app/eligibility.js';function collectFlags(_0x3b0c13,_0x42c29c){const _0x29b1e5=a3_0x343f,_0x347d23={};for(const _0x4fbf4b of _0x42c29c){const _0x358bea=_0x4fbf4b[_0x29b1e5(0x163)]===_0x29b1e5(0x149)?_0x3b0c13[_0x29b1e5(0x162)](_0x4fbf4b['name']):_0x3b0c13[_0x29b1e5(0x14c)](_0x4fbf4b[_0x29b1e5(0x16f)]);if(_0x358bea!==''&&_0x358bea!==![])_0x347d23[_0x4fbf4b['name']]=_0x358bea;}if(_0x3b0c13[_0x29b1e5(0x157)])_0x347d23[_0x29b1e5(0x157)]=!![];return _0x347d23;}function normalizeLanguages(_0x28b376){const _0x49d4fe=a3_0x343f;if(!Array['isArray'](_0x28b376))return[];return _0x28b376[_0x49d4fe(0x179)](_0x1520d0=>typeof _0x1520d0==='string')[_0x49d4fe(0x159)](_0x42c66d=>_0x42c66d['trim']())[_0x49d4fe(0x179)](Boolean);}function buildRemoteAppI18nFields(_0x5a334e){const _0x32d9b0=a3_0x343f,_0x4e6f13=normalizeLanguages(_0x5a334e['i18nInfo']?.[_0x32d9b0(0x164)]);return{'enableI18n':typeof _0x5a334e[_0x32d9b0(0x143)]===_0x32d9b0(0x149)?_0x5a334e[_0x32d9b0(0x143)]:null,'languages':_0x4e6f13,'i18nInfo':_0x5a334e['i18nInfo']?{..._0x5a334e[_0x32d9b0(0x160)],'langs':_0x4e6f13['length']?_0x4e6f13:null}:null};}const listDef={'service':a3_0x27317c(0x15b),'command':a3_0x27317c(0x161),'description':a3_0x27317c(0x170),'risk':a3_0x27317c(0x17a),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':a3_0x27317c(0x150),'type':a3_0x27317c(0x141),'description':a3_0x27317c(0x13b),'enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0x27317c(0x17b),'type':a3_0x27317c(0x149),'description':a3_0x27317c(0x16b),'default':![]},{'name':a3_0x27317c(0x171),'type':a3_0x27317c(0x149),'description':a3_0x27317c(0x15f),'default':![]},{'name':'include-unpublished','type':'boolean','description':a3_0x27317c(0x177),'default':![]}],async 'execute'(_0x1f7195){const _0x2dc113=a3_0x27317c,_0x55fa5c=_0x1f7195['str'](_0x2dc113(0x150))||_0x1f7195[_0x2dc113(0x16a)]||getEnv()||_0x2dc113(0x146),_0x561b76=_0x1f7195['bool'](_0x2dc113(0x17b)),_0x23a770=_0x1f7195[_0x2dc113(0x162)](_0x2dc113(0x171)),_0x4e4b4a=_0x1f7195[_0x2dc113(0x162)]('include-unpublished'),{readRawConfigWithLayers:_0x497605,resolveDefaultAppSource:_0x426651,getLocalAppAliases:_0x53f729}=await import(_0x2dc113(0x145)),{getRemoteAppList:_0x1b8d9f}=await import(_0x2dc113(0x151)),{config:_0x11a966,layers:_0x1976bc}=_0x497605(),_0x49822f=_0x426651(_0x1976bc),{defaultApp:_0x46163f}=_0x11a966,_0x543dcf=await _0x1b8d9f({'env':_0x55fa5c,'accessKey':_0x1f7195[_0x2dc113(0x13d)],'localOnly':_0x561b76,'noCache':_0x23a770}),_0x4c280e=_0x4e4b4a?_0x543dcf[_0x2dc113(0x173)]:filterRuntimeAccessibleApps(_0x543dcf['items']),_0x6e29bd=_0x543dcf[_0x2dc113(0x173)][_0x2dc113(0x17c)]-_0x4c280e[_0x2dc113(0x17c)],_0x4ac593=_0x4c280e[_0x2dc113(0x159)](_0x766173=>{const _0x5140b8=_0x2dc113;return{'name':_0x766173[_0x5140b8(0x15a)],'appcode':_0x766173[_0x5140b8(0x169)],'named':!![],'definedIn':_0x5140b8(0x14e),'isDefault':_0x766173[_0x5140b8(0x15a)]===_0x46163f,...buildAppProfileListFields(_0x55fa5c),...buildRemoteAppI18nFields(_0x766173),'source':_0x543dcf[_0x5140b8(0x174)],'owner':_0x766173[_0x5140b8(0x13e)]??null,'status':_0x766173[_0x5140b8(0x15d)]??null,'cachedAt':_0x543dcf[_0x5140b8(0x14b)]};}),_0x215119=_0x53f729(_0x11a966);let _0x392034=0x0;for(const [_0x5a0f2a,_0x22db71]of Object[_0x2dc113(0x14f)](_0x215119)){const _0x239eae=typeof _0x22db71[_0x2dc113(0x154)]==='string'?_0x22db71['appcode']['trim']():'';if(!_0x239eae)continue;const _0xc58b24=findAppByCode(_0x543dcf['items'],_0x239eae);if(!_0x4e4b4a&&_0xc58b24&&!isRuntimeAccessibleApp(_0xc58b24))continue;_0x392034+=0x1,_0x4ac593[_0x2dc113(0x16e)]({'name':_0x5a0f2a,'appcode':_0x239eae,'named':!![],'definedIn':_0x2dc113(0x17b),'isDefault':_0x5a0f2a===_0x46163f,...buildAppProfileListFields(_0x55fa5c),'source':_0x2dc113(0x148),'owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0x4ac593,_0x1f7195['mergedCli']);const _0x566319=_0x4ac593[_0x2dc113(0x13f)](_0x1c380e=>_0x1c380e[_0x2dc113(0x16c)]===!![]),_0x430515=_0x46163f??_0x566319?.['name']??null,_0x91f14={'env':_0x55fa5c,'source':_0x543dcf[_0x2dc113(0x174)],'fetchedAt':_0x543dcf[_0x2dc113(0x14b)],'cachePath':_0x543dcf[_0x2dc113(0x14d)],'globalPath':_0x1976bc[_0x2dc113(0x16d)]??null,'projectPath':_0x1976bc[_0x2dc113(0x166)]??null,'defaultApp':_0x430515,'defaultAppSource':_0x46163f!=null?_0x49822f:null,'localAliasCount':_0x392034,'remoteTotal':_0x543dcf[_0x2dc113(0x173)][_0x2dc113(0x17c)],'hiddenUnpublishedCount':_0x6e29bd,'includeUnpublished':_0x4e4b4a};if(_0x4ac593[_0x2dc113(0x17c)]===0x0)return{'ok':!![],'data':{'items':_0x4ac593,'meta':_0x91f14},'message':_0x543dcf[_0x2dc113(0x174)]===_0x2dc113(0x178)?_0x2dc113(0x167):_0x2dc113(0x155)};return{'ok':!![],'data':{'items':_0x4ac593,'meta':_0x91f14}};}},pullDef={'service':'app','command':'pull','description':a3_0x27317c(0x168),'risk':'write','confirmationDescription':a3_0x27317c(0x14a),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'env','type':a3_0x27317c(0x141),'description':a3_0x27317c(0x13c),'enum':[...RUNTIME_ENV_VALUES]},{'name':'local','type':a3_0x27317c(0x149),'description':a3_0x27317c(0x144),'default':![]},{'name':a3_0x27317c(0x171),'type':'boolean','description':'Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','default':![]}],async 'execute'(_0x4e5885){const _0x137b5c=a3_0x27317c,_0x4bfcc2=_0x4e5885[_0x137b5c(0x14c)](_0x137b5c(0x150))||_0x4e5885[_0x137b5c(0x16a)]||getEnv()||'production',_0x4908ad=_0x4e5885[_0x137b5c(0x162)](_0x137b5c(0x17b)),_0x2d2013=_0x4e5885[_0x137b5c(0x162)]('no-cache'),{getRemoteAppList:_0x3d3974}=await import(_0x137b5c(0x151)),_0x515945=await _0x3d3974({'env':_0x4bfcc2,'accessKey':_0x4e5885[_0x137b5c(0x13d)],'localOnly':_0x4908ad,'noCache':_0x2d2013});return{'ok':!![],'data':{'total':_0x515945['items'][_0x137b5c(0x17c)],'env':_0x4bfcc2,'source':_0x515945[_0x137b5c(0x174)],'fetchedAt':_0x515945[_0x137b5c(0x14b)],'cachePath':_0x515945[_0x137b5c(0x14d)]},'message':_0x515945[_0x137b5c(0x174)]===_0x137b5c(0x178)?'Loaded\x20'+_0x515945['items'][_0x137b5c(0x17c)]+_0x137b5c(0x15c)+_0x4bfcc2+'\x22.':_0x137b5c(0x165)+_0x515945[_0x137b5c(0x173)][_0x137b5c(0x17c)]+_0x137b5c(0x147)+_0x4bfcc2+'\x22.'};}},importDef={'service':a3_0x27317c(0x15b),'command':'import','description':'Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','risk':'write','confirmationDescription':a3_0x27317c(0x140),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':appImportFlagDefs,async 'execute'(_0x14423f){return await runAppImport(collectFlags(_0x14423f,appImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[listDef,pullDef,importDef];
1
+ const a3_0x35f587=a3_0x1d83;(function(_0xd784b3,_0x1597e2){const _0x286c23=a3_0x1d83,_0x42a614=_0xd784b3();while(!![]){try{const _0x545a83=parseInt(_0x286c23(0xbf))/0x1*(parseInt(_0x286c23(0xad))/0x2)+parseInt(_0x286c23(0x97))/0x3+parseInt(_0x286c23(0x8b))/0x4*(-parseInt(_0x286c23(0xba))/0x5)+-parseInt(_0x286c23(0xbe))/0x6+parseInt(_0x286c23(0xc9))/0x7+parseInt(_0x286c23(0xab))/0x8+parseInt(_0x286c23(0xc4))/0x9*(-parseInt(_0x286c23(0xc1))/0xa);if(_0x545a83===_0x1597e2)break;else _0x42a614['push'](_0x42a614['shift']());}catch(_0x1394dd){_0x42a614['push'](_0x42a614['shift']());}}}(a3_0x41b0,0x66df8));import{appImportFlagDefs,runAppImport}from'../../commands/init.js';import{getEnv,RUNTIME_ENV_VALUES}from'../../constant/env.js';function a3_0x1d83(_0x3c06f2,_0x550116){_0x3c06f2=_0x3c06f2-0x86;const _0x41b058=a3_0x41b0();let _0x1d83e0=_0x41b058[_0x3c06f2];return _0x1d83e0;}import{buildAppProfileListFields}from'../../config/schema.js';import{enrichAppListItemsWithMergedSelection}from'../../commands/app/shared.js';import{filterRuntimeAccessibleApps,findAppByCode,isRuntimeAccessibleApp}from'../../commands/app/eligibility.js';function collectFlags(_0x519d46,_0x259b60){const _0x5669cb=a3_0x1d83,_0x56551={};for(const _0x107c46 of _0x259b60){const _0xcbaea8=_0x107c46[_0x5669cb(0xaa)]===_0x5669cb(0xac)?_0x519d46[_0x5669cb(0xc5)](_0x107c46[_0x5669cb(0x91)]):_0x519d46[_0x5669cb(0x99)](_0x107c46[_0x5669cb(0x91)]);if(_0xcbaea8!==''&&_0xcbaea8!==![])_0x56551[_0x107c46[_0x5669cb(0x91)]]=_0xcbaea8;}if(_0x519d46[_0x5669cb(0xb3)])_0x56551['nonInteractive']=!![];return _0x56551;}function normalizeLanguages(_0x57c287){const _0x594d47=a3_0x1d83;if(!Array['isArray'](_0x57c287))return[];return _0x57c287[_0x594d47(0x9d)](_0x127809=>typeof _0x127809===_0x594d47(0x8f))['map'](_0xac0695=>_0xac0695[_0x594d47(0xc0)]())[_0x594d47(0x9d)](Boolean);}function buildRemoteAppI18nFields(_0x22e8ba){const _0x2477b8=a3_0x1d83,_0x3dfccd=normalizeLanguages(_0x22e8ba['i18nInfo']?.[_0x2477b8(0xb5)]);return{'enableI18n':typeof _0x22e8ba[_0x2477b8(0xaf)]===_0x2477b8(0xac)?_0x22e8ba[_0x2477b8(0xaf)]:null,'languages':_0x3dfccd,'i18nInfo':_0x22e8ba[_0x2477b8(0xa6)]?{..._0x22e8ba['i18nInfo'],'langs':_0x3dfccd[_0x2477b8(0xa9)]?_0x3dfccd:null}:null};}const listDef={'service':a3_0x35f587(0x96),'command':a3_0x35f587(0x86),'description':a3_0x35f587(0xb4),'risk':a3_0x35f587(0x9c),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':a3_0x35f587(0x9f),'type':'string','description':a3_0x35f587(0xae),'enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0x35f587(0xbb),'type':a3_0x35f587(0xac),'description':a3_0x35f587(0xb9),'default':![]},{'name':a3_0x35f587(0xb6),'type':a3_0x35f587(0xac),'description':a3_0x35f587(0x9e),'default':![]},{'name':a3_0x35f587(0x90),'type':a3_0x35f587(0xac),'description':a3_0x35f587(0xb1),'default':![]}],async 'execute'(_0xe52495){const _0x3f5444=a3_0x35f587,_0x57b516=_0xe52495[_0x3f5444(0x99)](_0x3f5444(0x9f))||_0xe52495[_0x3f5444(0xa1)]||getEnv()||_0x3f5444(0xc2),_0x4dfa13=_0xe52495[_0x3f5444(0xc5)]('local'),_0x18510f=_0xe52495[_0x3f5444(0xc5)](_0x3f5444(0xb6)),_0x7abe11=_0xe52495[_0x3f5444(0xc5)](_0x3f5444(0x90)),{readRawConfigWithLayers:_0x34ac9b,resolveDefaultAppSource:_0x5ef7a6,getLocalAppAliases:_0xe2ea39}=await import('../../context.js'),{getRemoteAppList:_0x58de70}=await import(_0x3f5444(0x9b)),{config:_0x585687,layers:_0x1cce55}=_0x34ac9b(),_0x1582be=_0x5ef7a6(_0x1cce55),{defaultApp:_0x1117a2}=_0x585687,_0x53d4d3=await _0x58de70({'env':_0x57b516,'accessKey':_0xe52495[_0x3f5444(0x94)],'localOnly':_0x4dfa13,'noCache':_0x18510f}),_0x25ef05=_0x7abe11?_0x53d4d3['items']:filterRuntimeAccessibleApps(_0x53d4d3[_0x3f5444(0xb0)]),_0x3b9bb=_0x53d4d3[_0x3f5444(0xb0)]['length']-_0x25ef05[_0x3f5444(0xa9)],_0x2a5844=_0x25ef05[_0x3f5444(0x93)](_0x132a0c=>{const _0x40e72b=_0x3f5444;return{'name':_0x132a0c[_0x40e72b(0xc3)],'appcode':_0x132a0c[_0x40e72b(0xa4)],'named':!![],'definedIn':_0x40e72b(0xb8),'isDefault':_0x132a0c[_0x40e72b(0xc3)]===_0x1117a2,...buildAppProfileListFields(_0x57b516),...buildRemoteAppI18nFields(_0x132a0c),'source':_0x53d4d3[_0x40e72b(0xc8)],'owner':_0x132a0c[_0x40e72b(0x8a)]??null,'status':_0x132a0c[_0x40e72b(0xa8)]??null,'cachedAt':_0x53d4d3[_0x40e72b(0x95)]};}),_0x1ac6e7=_0xe2ea39(_0x585687);let _0x559fea=0x0;for(const [_0x5322ad,_0x5212f8]of Object[_0x3f5444(0xa7)](_0x1ac6e7)){const _0x24f3e1=typeof _0x5212f8[_0x3f5444(0xa2)]===_0x3f5444(0x8f)?_0x5212f8['appcode']['trim']():'';if(!_0x24f3e1)continue;const _0x237a69=findAppByCode(_0x53d4d3[_0x3f5444(0xb0)],_0x24f3e1);if(!_0x7abe11&&_0x237a69&&!isRuntimeAccessibleApp(_0x237a69))continue;_0x559fea+=0x1,_0x2a5844[_0x3f5444(0x8e)]({'name':_0x5322ad,'appcode':_0x24f3e1,'named':!![],'definedIn':'local','isDefault':_0x5322ad===_0x1117a2,...buildAppProfileListFields(_0x57b516),'source':_0x3f5444(0xb7),'owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0x2a5844,_0xe52495[_0x3f5444(0xbc)]);const _0x3c09a9=_0x2a5844[_0x3f5444(0xa0)](_0x563cc5=>_0x563cc5[_0x3f5444(0xc6)]===!![]),_0x3b0015=_0x1117a2??_0x3c09a9?.['name']??null,_0x3232d0={'env':_0x57b516,'source':_0x53d4d3[_0x3f5444(0xc8)],'fetchedAt':_0x53d4d3['fetchedAt'],'cachePath':_0x53d4d3[_0x3f5444(0xa5)],'globalPath':_0x1cce55['globalPath']??null,'projectPath':_0x1cce55[_0x3f5444(0x98)]??null,'defaultApp':_0x3b0015,'defaultAppSource':_0x1117a2!=null?_0x1582be:null,'localAliasCount':_0x559fea,'remoteTotal':_0x53d4d3[_0x3f5444(0xb0)][_0x3f5444(0xa9)],'hiddenUnpublishedCount':_0x3b9bb,'includeUnpublished':_0x7abe11};if(_0x2a5844[_0x3f5444(0xa9)]===0x0)return{'ok':!![],'data':{'items':_0x2a5844,'meta':_0x3232d0},'message':_0x53d4d3[_0x3f5444(0xc8)]===_0x3f5444(0x8d)?_0x3f5444(0x9a):_0x3f5444(0xbd)};return{'ok':!![],'data':{'items':_0x2a5844,'meta':_0x3232d0}};}},pullDef={'service':a3_0x35f587(0x96),'command':'pull','description':'Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','risk':a3_0x35f587(0xc7),'confirmationDescription':'Reads\x20the\x20apps\x20available\x20to\x20the\x20current\x20account\x20and\x20overwrites\x20the\x20local\x20app\x20cache\x20for\x20that\x20environment.\x20Platform\x20apps\x20are\x20not\x20modified.','requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a3_0x35f587(0x9f),'type':a3_0x35f587(0x8f),'description':a3_0x35f587(0xb2),'enum':[...RUNTIME_ENV_VALUES]},{'name':'local','type':a3_0x35f587(0xac),'description':'Read\x20from\x20local\x20cache\x20only','default':![]},{'name':'no-cache','type':a3_0x35f587(0xac),'description':a3_0x35f587(0x9e),'default':![]}],async 'execute'(_0x3f65cc){const _0x45338b=a3_0x35f587,_0x4d4930=_0x3f65cc['str'](_0x45338b(0x9f))||_0x3f65cc[_0x45338b(0xa1)]||getEnv()||_0x45338b(0xc2),_0x136d06=_0x3f65cc[_0x45338b(0xc5)](_0x45338b(0xbb)),_0xa24966=_0x3f65cc[_0x45338b(0xc5)](_0x45338b(0xb6)),{getRemoteAppList:_0x46376a}=await import('../../commands/app/remote-source.js'),_0x424b3d=await _0x46376a({'env':_0x4d4930,'accessKey':_0x3f65cc[_0x45338b(0x94)],'localOnly':_0x136d06,'noCache':_0xa24966});return{'ok':!![],'data':{'total':_0x424b3d['items'][_0x45338b(0xa9)],'env':_0x4d4930,'source':_0x424b3d[_0x45338b(0xc8)],'fetchedAt':_0x424b3d[_0x45338b(0x95)],'cachePath':_0x424b3d[_0x45338b(0xa5)]},'message':_0x424b3d['source']===_0x45338b(0x8d)?_0x45338b(0x89)+_0x424b3d[_0x45338b(0xb0)][_0x45338b(0xa9)]+_0x45338b(0x8c)+_0x4d4930+'\x22.':'Refreshed\x20app\x20cache\x20with\x20'+_0x424b3d[_0x45338b(0xb0)]['length']+_0x45338b(0x88)+_0x4d4930+'\x22.'};}},importDef={'service':a3_0x35f587(0x96),'command':a3_0x35f587(0xa3),'description':a3_0x35f587(0x92),'risk':'write','confirmationDescription':a3_0x35f587(0x87),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':appImportFlagDefs,async 'execute'(_0x1f69f4){return await runAppImport(collectFlags(_0x1f69f4,appImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[listDef,pullDef,importDef];function a3_0x41b0(){const _0x3f486a=['appOwnerName','4336CofKZk','\x20cached\x20app(s)\x20for\x20env=\x22','cache','push','string','include-unpublished','name','Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','map','accessKey','fetchedAt','app','603879UrpYvo','projectPath','str','No\x20cached\x20apps\x20found.','../../commands/app/remote-source.js','read','filter','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','env','find','envName','appcode','import','appCode','cachePath','i18nInfo','entries','appPublishStatus','length','type','6676136TqThpp','boolean','118sPIxPi','Filter\x20by\x20environment\x20(default:\x20current\x20env)','enableI18n','items','Include\x20unpublished\x20apps\x20for\x20diagnostics','Target\x20environment\x20(default:\x20current\x20env)','nonInteractive','List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','langs','no-cache','config','remote','Read\x20app\x20list\x20from\x20local\x20cache\x20only','80jUErbX','local','mergedCli','No\x20apps\x20found\x20on\x20the\x20platform.','1375026RnFUtS','9343GYLUgx','trim','12663410tMPTWJ','production','appName','9ekWfwi','bool','isCurrent','write','source','2430239VPldYP','list','Reads\x20the\x20given\x20.rabetbase.json\x20and\x20imports\x20a\x20usable\x20default\x20app\x20into\x20local\x20.lovrabet.json.\x20Matching\x20keys\x20may\x20be\x20updated.','\x20app(s)\x20for\x20env=\x22','Loaded\x20'];a3_0x41b0=function(){return _0x3f486a;};return a3_0x41b0();}
@@ -1 +1 @@
1
- (function(_0x3d49e7,_0x30cc31){const _0x412eb3=a4_0x20a2,_0x5416c7=_0x3d49e7();while(!![]){try{const _0x14c4b5=parseInt(_0x412eb3(0x16e))/0x1+-parseInt(_0x412eb3(0x167))/0x2+parseInt(_0x412eb3(0x16a))/0x3*(parseInt(_0x412eb3(0x169))/0x4)+parseInt(_0x412eb3(0x175))/0x5+-parseInt(_0x412eb3(0x160))/0x6*(parseInt(_0x412eb3(0x170))/0x7)+-parseInt(_0x412eb3(0x174))/0x8*(parseInt(_0x412eb3(0x16d))/0x9)+-parseInt(_0x412eb3(0x16c))/0xa*(-parseInt(_0x412eb3(0x161))/0xb);if(_0x14c4b5===_0x30cc31)break;else _0x5416c7['push'](_0x5416c7['shift']());}catch(_0x407acd){_0x5416c7['push'](_0x5416c7['shift']());}}}(a4_0x3eaa,0x21b60));import{CLI_BIN_NAME}from'../../constant/cli.js';function a4_0x20a2(_0x1fe847,_0x23e3f2){_0x1fe847=_0x1fe847-0x15f;const _0x3eaa80=a4_0x3eaa();let _0x20a220=_0x3eaa80[_0x1fe847];return _0x20a220;}function a4_0x3eaa(){const _0x3019af=['appPublishStatus','validation','104stmTVe','1235970OJIZiQ','App\x20','filter','3714MCfVEW','11HUUxJR','trim','Current\x20status:\x20','string','UNKNOWN','toUpperCase','94422aMCsXd','\x20dataset/data/sql/bff\x20commands,\x20or\x20choose\x20a\x20published\x20app.','10900RCjNdU','33cveAgm','find','382940faaENB','107181tLllVp','88402wlSzKu','.\x20Publish\x20the\x20app\x20before\x20using\x20','721hwnyWj','appCode'];a4_0x3eaa=function(){return _0x3019af;};return a4_0x3eaa();}import{RUNTIME_ACCESSIBLE_APP_STATUS}from'../../constant/app.js';import{CliErrors}from'../../errors.js';export function normalizeAppPublishStatus(_0x1730fb){const _0x5c9fd1=a4_0x20a2;if(typeof _0x1730fb!==_0x5c9fd1(0x164))return null;const _0x136b74=_0x1730fb['trim']();return _0x136b74?_0x136b74[_0x5c9fd1(0x166)]():null;}export function isRuntimeAccessibleApp(_0x236a63){const _0xfb694=a4_0x20a2;return normalizeAppPublishStatus(_0x236a63[_0xfb694(0x172)])===RUNTIME_ACCESSIBLE_APP_STATUS;}export function filterRuntimeAccessibleApps(_0x5d4c6c){const _0x2ca44b=a4_0x20a2;return _0x5d4c6c[_0x2ca44b(0x15f)](isRuntimeAccessibleApp);}export function findAppByName(_0x5ae424,_0x1ceeb8){const _0x1f68cd=a4_0x20a2;return _0x5ae424[_0x1f68cd(0x16b)](_0x3cbc40=>_0x3cbc40['appName']===_0x1ceeb8);}export function findAppByCode(_0xb807ba,_0x5a3f6c){const _0x4e9c79=a4_0x20a2,_0x1b6fe8=_0x5a3f6c[_0x4e9c79(0x162)]();if(!_0x1b6fe8)return undefined;return _0xb807ba[_0x4e9c79(0x16b)](_0x468b4f=>_0x468b4f[_0x4e9c79(0x171)]?.[_0x4e9c79(0x162)]()===_0x1b6fe8);}export function runtimeInaccessibleAppError(_0x3c5593,_0x368a6c){const _0x3cc50a=a4_0x20a2,_0x1d899f=normalizeAppPublishStatus(_0x3c5593[_0x3cc50a(0x172)])??_0x3cc50a(0x165);return CliErrors[_0x3cc50a(0x173)](_0x3cc50a(0x176)+_0x368a6c+'\x20is\x20not\x20available\x20for\x20runtime\x20AI\x20access.',_0x3cc50a(0x163)+_0x1d899f+_0x3cc50a(0x16f)+CLI_BIN_NAME+_0x3cc50a(0x168));}
1
+ (function(_0x1f526c,_0x12ecf9){const _0x57ce37=a4_0xf3b5,_0xece316=_0x1f526c();while(!![]){try{const _0x546de4=-parseInt(_0x57ce37(0x9d))/0x1+-parseInt(_0x57ce37(0xa0))/0x2*(parseInt(_0x57ce37(0xa5))/0x3)+-parseInt(_0x57ce37(0xa2))/0x4*(parseInt(_0x57ce37(0xa3))/0x5)+parseInt(_0x57ce37(0x9a))/0x6*(parseInt(_0x57ce37(0xa9))/0x7)+-parseInt(_0x57ce37(0x9c))/0x8+parseInt(_0x57ce37(0xa1))/0x9+-parseInt(_0x57ce37(0x9b))/0xa*(-parseInt(_0x57ce37(0xa7))/0xb);if(_0x546de4===_0x12ecf9)break;else _0xece316['push'](_0xece316['shift']());}catch(_0x41423b){_0xece316['push'](_0xece316['shift']());}}}(a4_0x4d8a,0xb2277));import{CLI_BIN_NAME}from'../../constant/cli.js';import{RUNTIME_ACCESSIBLE_APP_STATUS}from'../../constant/app.js';import{CliErrors}from'../../errors.js';export function normalizeAppPublishStatus(_0x4def25){const _0x13aca9=a4_0xf3b5;if(typeof _0x4def25!=='string')return null;const _0x56ae35=_0x4def25[_0x13aca9(0x9f)]();return _0x56ae35?_0x56ae35[_0x13aca9(0xa8)]():null;}export function isRuntimeAccessibleApp(_0x8d5e37){const _0x3a7a6c=a4_0xf3b5;return normalizeAppPublishStatus(_0x8d5e37[_0x3a7a6c(0xad)])===RUNTIME_ACCESSIBLE_APP_STATUS;}export function filterRuntimeAccessibleApps(_0x309efe){const _0x4bb2a1=a4_0xf3b5;return _0x309efe[_0x4bb2a1(0xab)](isRuntimeAccessibleApp);}function a4_0xf3b5(_0x3ac288,_0x1ced37){_0x3ac288=_0x3ac288-0x9a;const _0x4d8aae=a4_0x4d8a();let _0xf3b515=_0x4d8aae[_0x3ac288];return _0xf3b515;}export function findAppByName(_0x5e2827,_0x2e0757){const _0x432b01=a4_0xf3b5;return _0x5e2827[_0x432b01(0x9e)](_0x5f1d8d=>_0x5f1d8d['appName']===_0x2e0757);}export function findAppByCode(_0x3a31cb,_0x27034c){const _0x34cfea=a4_0xf3b5,_0x426ff2=_0x27034c[_0x34cfea(0x9f)]();if(!_0x426ff2)return undefined;return _0x3a31cb['find'](_0x1998b0=>_0x1998b0['appCode']?.[_0x34cfea(0x9f)]()===_0x426ff2);}export function runtimeInaccessibleAppError(_0x15e66e,_0x1f4992){const _0x492c96=a4_0xf3b5,_0x3f4c6b=normalizeAppPublishStatus(_0x15e66e[_0x492c96(0xad)])??'UNKNOWN';return CliErrors[_0x492c96(0xaa)](_0x492c96(0xac)+_0x1f4992+_0x492c96(0xa6),'Current\x20status:\x20'+_0x3f4c6b+_0x492c96(0xa4)+CLI_BIN_NAME+'\x20dataset/data/sql/bff\x20commands,\x20or\x20choose\x20a\x20published\x20app.');}function a4_0x4d8a(){const _0x3b5a26=['\x20is\x20not\x20available\x20for\x20runtime\x20AI\x20access.','11oltHom','toUpperCase','7oxeSqg','validation','filter','App\x20','appPublishStatus','5414718wlzLwm','12111060mrvECz','9980512uQLgqb','808767SRnzTJ','find','trim','2veNDLC','10548486UQCbQP','12ipBhHZ','241765Ecddwu','.\x20Publish\x20the\x20app\x20before\x20using\x20','1063512SFILIT'];a4_0x4d8a=function(){return _0x3b5a26;};return a4_0x4d8a();}
@@ -1 +1 @@
1
- function a5_0x3110(){const _0x49658e=['Mock\x20API\x20error:\x20','4uXJWQM','10xIrfmu','5vRhaqJ','../../../mock/app-list.json','data','8155698JrZABA','16vIQyEh','success','utf-8','1510495vDDxCH','errorCode','31301172jbHwtq','errorMsg','tableData','13963914UqZNxk','3650018bSAdjB','18298181aJZADf','1178409lKJukR','1hJeLLC'];a5_0x3110=function(){return _0x49658e;};return a5_0x3110();}(function(_0x432f49,_0x125d25){const _0x216115=a5_0x13b2,_0x22c12c=_0x432f49();while(!![]){try{const _0x2f7803=-parseInt(_0x216115(0x1db))/0x1*(parseInt(_0x216115(0x1d8))/0x2)+-parseInt(_0x216115(0x1da))/0x3*(-parseInt(_0x216115(0x1dd))/0x4)+parseInt(_0x216115(0x1df))/0x5*(parseInt(_0x216115(0x1e2))/0x6)+-parseInt(_0x216115(0x1e6))/0x7*(-parseInt(_0x216115(0x1e3))/0x8)+parseInt(_0x216115(0x1eb))/0x9+parseInt(_0x216115(0x1de))/0xa*(parseInt(_0x216115(0x1d9))/0xb)+-parseInt(_0x216115(0x1e8))/0xc;if(_0x2f7803===_0x125d25)break;else _0x22c12c['push'](_0x22c12c['shift']());}catch(_0x22d66f){_0x22c12c['push'](_0x22c12c['shift']());}}}(a5_0x3110,0xeba71));import{fileURLToPath}from'url';import{dirname,join}from'path';import{readFileSync}from'fs';function a5_0x13b2(_0x480e28,_0x14fda6){_0x480e28=_0x480e28-0x1d8;const _0x3110e6=a5_0x3110();let _0x13b2b0=_0x3110e6[_0x480e28];return _0x13b2b0;}const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function loadMockAppList(){const _0xca359d=a5_0x13b2,_0x49803e=join(__dirname,_0xca359d(0x1e0)),_0x5b93aa=readFileSync(_0x49803e,_0xca359d(0x1e5));return JSON['parse'](_0x5b93aa);}let _cached=null;export function getMockAppList(){return!_cached&&(_cached=loadMockAppList()),_cached;}export function getMockRemoteAppItems(){const _0x3bcf63=a5_0x13b2,_0x1e7dee=getMockAppList();if(!_0x1e7dee[_0x3bcf63(0x1e4)])throw new Error(_0x3bcf63(0x1dc)+_0x1e7dee[_0x3bcf63(0x1e9)]+'\x20('+_0x1e7dee[_0x3bcf63(0x1e7)]+')');return _0x1e7dee[_0x3bcf63(0x1e1)][_0x3bcf63(0x1ea)];}
1
+ (function(_0x5b7eda,_0x831877){const _0x262d0e=a5_0x4e0a,_0x48573c=_0x5b7eda();while(!![]){try{const _0x55b6bd=parseInt(_0x262d0e(0x149))/0x1*(parseInt(_0x262d0e(0x13f))/0x2)+parseInt(_0x262d0e(0x148))/0x3*(parseInt(_0x262d0e(0x146))/0x4)+-parseInt(_0x262d0e(0x14a))/0x5+-parseInt(_0x262d0e(0x13b))/0x6*(parseInt(_0x262d0e(0x142))/0x7)+-parseInt(_0x262d0e(0x13e))/0x8+parseInt(_0x262d0e(0x147))/0x9+-parseInt(_0x262d0e(0x13d))/0xa*(-parseInt(_0x262d0e(0x13c))/0xb);if(_0x55b6bd===_0x831877)break;else _0x48573c['push'](_0x48573c['shift']());}catch(_0x2215ef){_0x48573c['push'](_0x48573c['shift']());}}}(a5_0x2bb4,0x64f02));function a5_0x4e0a(_0x4cf4f2,_0x586a33){_0x4cf4f2=_0x4cf4f2-0x138;const _0x2bb4d5=a5_0x2bb4();let _0x4e0a73=_0x2bb4d5[_0x4cf4f2];return _0x4e0a73;}import{fileURLToPath}from'url';import{dirname,join}from'path';import{readFileSync}from'fs';function a5_0x2bb4(){const _0x377c05=['success','utf-8','parse','36SyEMJx','528aKftFt','200080eYODda','3159576TctPJQ','22SjkNDl','errorCode','../../../mock/app-list.json','820589voevnt','Mock\x20API\x20error:\x20','data','errorMsg','4ZEiIUh','4325166KwAosu','1513038njJvqZ','31951VQiqIg','3925070Yvkhvq'];a5_0x2bb4=function(){return _0x377c05;};return a5_0x2bb4();}const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function loadMockAppList(){const _0x5136dd=a5_0x4e0a,_0x13424c=join(__dirname,_0x5136dd(0x141)),_0x274cab=readFileSync(_0x13424c,_0x5136dd(0x139));return JSON[_0x5136dd(0x13a)](_0x274cab);}let _cached=null;export function getMockAppList(){return!_cached&&(_cached=loadMockAppList()),_cached;}export function getMockRemoteAppItems(){const _0x24b70f=a5_0x4e0a,_0x6f91b2=getMockAppList();if(!_0x6f91b2[_0x24b70f(0x138)])throw new Error(_0x24b70f(0x143)+_0x6f91b2[_0x24b70f(0x145)]+'\x20('+_0x6f91b2[_0x24b70f(0x140)]+')');return _0x6f91b2[_0x24b70f(0x144)]['tableData'];}
@@ -1 +1 @@
1
- (function(_0x1979d7,_0x19f7c3){const _0x54574f=a6_0x4d11,_0xb6a9a1=_0x1979d7();while(!![]){try{const _0x181b59=-parseInt(_0x54574f(0x1e5))/0x1*(parseInt(_0x54574f(0x1e3))/0x2)+parseInt(_0x54574f(0x1eb))/0x3*(parseInt(_0x54574f(0x1e6))/0x4)+parseInt(_0x54574f(0x1df))/0x5+parseInt(_0x54574f(0x1e9))/0x6+-parseInt(_0x54574f(0x1ed))/0x7*(-parseInt(_0x54574f(0x1e0))/0x8)+-parseInt(_0x54574f(0x1ea))/0x9*(parseInt(_0x54574f(0x1ef))/0xa)+-parseInt(_0x54574f(0x1e7))/0xb*(parseInt(_0x54574f(0x1f0))/0xc);if(_0x181b59===_0x19f7c3)break;else _0xb6a9a1['push'](_0xb6a9a1['shift']());}catch(_0x3e61a2){_0xb6a9a1['push'](_0xb6a9a1['shift']());}}}(a6_0x253f,0x40060));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 _0x5f54d8=a6_0x4d11,_0x2791fc=(productEnv('APP_LIST_SOURCE')||'')[_0x5f54d8(0x1ee)]()['toLowerCase']();return _0x2791fc===_0x5f54d8(0x1e4);}export async function getRemoteAppItems(){if(shouldUseMockRemoteApps())return getMockRemoteAppItems();return getMyApps();}function a6_0x4d11(_0x23efbd,_0x4fd60a){_0x23efbd=_0x23efbd-0x1df;const _0x253fe7=a6_0x253f();let _0x4d1188=_0x253fe7[_0x23efbd];return _0x4d1188;}function a6_0x253f(){const _0x4ec7ba=['523726wYjVpZ','trim','10cdkfNn','12vEKhdQ','2325740AthGKy','56EWNmWG','fetchedAt','items','92tgunVy','mock','1213CTBaHq','1856bplHjy','14360533yMGNui','toISOString','2278902ILXBkJ','1869822KSlPmv','2991hXYpKl','cache'];a6_0x253f=function(){return _0x4ec7ba;};return a6_0x253f();}export async function getRemoteAppList(_0x11774f){const _0x12864a=a6_0x4d11,{env:_0xcc3e92,accessKey:_0x12762e,localOnly:localOnly=![],noCache:noCache=![]}=_0x11774f,_0x1326af=readCachedAppList(_0xcc3e92,_0x12762e),_0x31ae51=_0x12762e?.[_0x12864a(0x1ee)]()?getAppCacheFilePath(_0xcc3e92,_0x12762e):null;if(localOnly)return{'items':_0x1326af?.[_0x12864a(0x1e2)]??[],'source':_0x12864a(0x1ec),'fetchedAt':_0x1326af?.[_0x12864a(0x1e1)]??null,'cachePath':_0x31ae51};try{const _0x46082d=await getRemoteAppItems(),_0x135a6a=shouldUseMockRemoteApps()?'mock':'remote',_0x204d2a=new Date()[_0x12864a(0x1e8)](),_0x516e64=_0x12762e?.[_0x12864a(0x1ee)]()?writeCachedAppList(_0xcc3e92,_0x12762e,{'env':_0xcc3e92,'fetchedAt':_0x204d2a,'source':_0x135a6a,'items':_0x46082d}):null;return{'items':_0x46082d,'source':_0x135a6a,'fetchedAt':_0x204d2a,'cachePath':_0x516e64};}catch(_0x4002b0){if(!noCache&&_0x1326af)return{'items':_0x1326af['items'],'source':_0x12864a(0x1ec),'fetchedAt':_0x1326af[_0x12864a(0x1e1)],'cachePath':_0x31ae51};throw _0x4002b0;}}
1
+ (function(_0x5c1490,_0x1d5a07){const _0xb3fbc5=a6_0x5e17,_0x12df2d=_0x5c1490();while(!![]){try{const _0x1e5735=parseInt(_0xb3fbc5(0x11b))/0x1+-parseInt(_0xb3fbc5(0x11f))/0x2*(-parseInt(_0xb3fbc5(0x11d))/0x3)+-parseInt(_0xb3fbc5(0x119))/0x4*(parseInt(_0xb3fbc5(0x111))/0x5)+parseInt(_0xb3fbc5(0x120))/0x6*(parseInt(_0xb3fbc5(0x116))/0x7)+parseInt(_0xb3fbc5(0x10f))/0x8*(parseInt(_0xb3fbc5(0x114))/0x9)+parseInt(_0xb3fbc5(0x11c))/0xa*(-parseInt(_0xb3fbc5(0x121))/0xb)+-parseInt(_0xb3fbc5(0x11e))/0xc;if(_0x1e5735===_0x1d5a07)break;else _0x12df2d['push'](_0x12df2d['shift']());}catch(_0x46161a){_0x12df2d['push'](_0x12df2d['shift']());}}}(a6_0x124e,0x43427));import{getMyApps}from'../../core/api-client.js';import{getMockRemoteAppItems}from'../../commands/app/mock-loader.js';function a6_0x124e(){const _0x348e2c=['APP_LIST_SOURCE','7JHaPvz','trim','fetchedAt','2908wGwHnq','cache','412824MentAS','890wjdIYc','20655MgTYKt','4387656oROVOH','102TmyCIf','1273224cXNzHf','62425FVAtuz','mock','472XUQEEx','toISOString','495NFqHcb','items','toLowerCase','36918KumKpS'];a6_0x124e=function(){return _0x348e2c;};return a6_0x124e();}import{getAppCacheFilePath,readCachedAppList,writeCachedAppList}from'../../commands/app/cache.js';function a6_0x5e17(_0x4797d9,_0x588479){_0x4797d9=_0x4797d9-0x10f;const _0x124e93=a6_0x124e();let _0x5e17a4=_0x124e93[_0x4797d9];return _0x5e17a4;}import{productEnv}from'../../constant/product.js';export function shouldUseMockRemoteApps(){const _0x372c4e=a6_0x5e17,_0x2352c6=(productEnv(_0x372c4e(0x115))||'')[_0x372c4e(0x117)]()[_0x372c4e(0x113)]();return _0x2352c6==='mock';}export async function getRemoteAppItems(){if(shouldUseMockRemoteApps())return getMockRemoteAppItems();return getMyApps();}export async function getRemoteAppList(_0xb0cb1c){const _0x16c7ad=a6_0x5e17,{env:_0x102509,accessKey:_0x5dc14d,localOnly:localOnly=![],noCache:noCache=![]}=_0xb0cb1c,_0x4ab164=readCachedAppList(_0x102509,_0x5dc14d),_0x4b216a=_0x5dc14d?.[_0x16c7ad(0x117)]()?getAppCacheFilePath(_0x102509,_0x5dc14d):null;if(localOnly)return{'items':_0x4ab164?.['items']??[],'source':_0x16c7ad(0x11a),'fetchedAt':_0x4ab164?.[_0x16c7ad(0x118)]??null,'cachePath':_0x4b216a};try{const _0x341a1a=await getRemoteAppItems(),_0x4c5418=shouldUseMockRemoteApps()?_0x16c7ad(0x122):'remote',_0x44f80b=new Date()[_0x16c7ad(0x110)](),_0x3056f1=_0x5dc14d?.['trim']()?writeCachedAppList(_0x102509,_0x5dc14d,{'env':_0x102509,'fetchedAt':_0x44f80b,'source':_0x4c5418,'items':_0x341a1a}):null;return{'items':_0x341a1a,'source':_0x4c5418,'fetchedAt':_0x44f80b,'cachePath':_0x3056f1};}catch(_0x409d59){if(!noCache&&_0x4ab164)return{'items':_0x4ab164[_0x16c7ad(0x112)],'source':_0x16c7ad(0x11a),'fetchedAt':_0x4ab164['fetchedAt'],'cachePath':_0x4b216a};throw _0x409d59;}}
@@ -1 +1 @@
1
- function a7_0x4c34(){const _0x3a0578=['2zyscas','5366340JVHCBz','1166730UuBIbX','appcode','defaultApp','5001438WXQplQ','named','local','appCode','isCurrent','765615XeSPzG','1154340VgLNjy','currentApp','name','trim','960440RFHvbA','2619872bORXIO','find'];a7_0x4c34=function(){return _0x3a0578;};return a7_0x4c34();}function a7_0x2f79(_0x156f8b,_0x8fbe3d){_0x156f8b=_0x156f8b-0x6e;const _0x4c3412=a7_0x4c34();let _0x2f7936=_0x4c3412[_0x156f8b];return _0x2f7936;}(function(_0x21dd8c,_0x2cae52){const _0x3ffe0f=a7_0x2f79,_0x1b55a5=_0x21dd8c();while(!![]){try{const _0x46ef6e=-parseInt(_0x3ffe0f(0x74))/0x1*(-parseInt(_0x3ffe0f(0x72))/0x2)+parseInt(_0x3ffe0f(0x7c))/0x3+parseInt(_0x3ffe0f(0x70))/0x4+parseInt(_0x3ffe0f(0x7d))/0x5+-parseInt(_0x3ffe0f(0x77))/0x6+-parseInt(_0x3ffe0f(0x73))/0x7+-parseInt(_0x3ffe0f(0x6f))/0x8;if(_0x46ef6e===_0x2cae52)break;else _0x1b55a5['push'](_0x1b55a5['shift']());}catch(_0x4ab2bd){_0x1b55a5['push'](_0x1b55a5['shift']());}}}(a7_0x4c34,0x8f703));export function enrichAppListItemsWithMergedSelection(_0x5b3ddf,_0x580ecc){const _0x2361f2=a7_0x2f79;if(!_0x580ecc)return;const _0x3a758a=!!(_0x580ecc[_0x2361f2(0x7e)]??_0x580ecc[_0x2361f2(0x76)]);for(const _0x50386c of _0x5b3ddf){_0x50386c['isCurrent']=![];}const _0x538387=_0x580ecc[_0x2361f2(0x7a)]!=null?String(_0x580ecc[_0x2361f2(0x7a)])[_0x2361f2(0x6e)]():'';if(_0x3a758a){const _0x33d511=_0x580ecc[_0x2361f2(0x7e)]??_0x580ecc[_0x2361f2(0x76)];if(_0x33d511){const _0x4605f4=_0x5b3ddf[_0x2361f2(0x71)](_0x3ab730=>_0x3ab730[_0x2361f2(0x78)]===!![]&&_0x3ab730[_0x2361f2(0x7f)]===_0x33d511&&_0x3ab730['definedIn']===_0x2361f2(0x79)),_0x1de49e=_0x4605f4??_0x5b3ddf['find'](_0x36964c=>_0x36964c[_0x2361f2(0x78)]===!![]&&_0x36964c[_0x2361f2(0x7f)]===_0x33d511);if(_0x1de49e){const _0x496a18=String(_0x1de49e[_0x2361f2(0x75)]??'')[_0x2361f2(0x6e)]();if(!_0x538387||_0x496a18===_0x538387){_0x1de49e['isCurrent']=!![];return;}}}if(_0x538387){const _0x1473b3=_0x5b3ddf[_0x2361f2(0x71)](_0x477c12=>String(_0x477c12[_0x2361f2(0x75)]??'')['trim']()===_0x538387);_0x1473b3&&(_0x1473b3[_0x2361f2(0x7b)]=!![]);}return;}if(!_0x538387)return;for(const _0x23952f of _0x5b3ddf){String(_0x23952f[_0x2361f2(0x75)]??'')[_0x2361f2(0x6e)]()===_0x538387&&(_0x23952f[_0x2361f2(0x7b)]=!![]);}}
1
+ function a7_0x3a71(_0x1079b7,_0x2ec80e){_0x1079b7=_0x1079b7-0xb8;const _0x302e8b=a7_0x302e();let _0x3a71bc=_0x302e8b[_0x1079b7];return _0x3a71bc;}(function(_0x3f2997,_0x1ad525){const _0x1101ca=a7_0x3a71,_0x24f181=_0x3f2997();while(!![]){try{const _0x5b56b7=parseInt(_0x1101ca(0xbd))/0x1+-parseInt(_0x1101ca(0xbe))/0x2*(parseInt(_0x1101ca(0xb8))/0x3)+parseInt(_0x1101ca(0xc4))/0x4*(parseInt(_0x1101ca(0xc8))/0x5)+parseInt(_0x1101ca(0xc2))/0x6+parseInt(_0x1101ca(0xbb))/0x7+parseInt(_0x1101ca(0xc1))/0x8*(-parseInt(_0x1101ca(0xc7))/0x9)+parseInt(_0x1101ca(0xc0))/0xa;if(_0x5b56b7===_0x1ad525)break;else _0x24f181['push'](_0x24f181['shift']());}catch(_0x4cb3df){_0x24f181['push'](_0x24f181['shift']());}}}(a7_0x302e,0x75989));function a7_0x302e(){const _0x5b1df5=['trim','appCode','6cYYdTb','name','definedIn','2044574tVcrGc','defaultApp','374031wxlVnk','722508qQmott','currentApp','6691710OKobTh','24bsnilk','1366842criPys','appcode','71476YRkCar','named','isCurrent','1130337XOxJiM','5rbBkQK'];a7_0x302e=function(){return _0x5b1df5;};return a7_0x302e();}export function enrichAppListItemsWithMergedSelection(_0x45bb10,_0x3fa13a){const _0xcef9de=a7_0x3a71;if(!_0x3fa13a)return;const _0x341ccc=!!(_0x3fa13a[_0xcef9de(0xbf)]??_0x3fa13a['defaultApp']);for(const _0x30a56b of _0x45bb10){_0x30a56b['isCurrent']=![];}const _0x110b81=_0x3fa13a[_0xcef9de(0xca)]!=null?String(_0x3fa13a['appCode'])[_0xcef9de(0xc9)]():'';if(_0x341ccc){const _0x29b5b2=_0x3fa13a[_0xcef9de(0xbf)]??_0x3fa13a[_0xcef9de(0xbc)];if(_0x29b5b2){const _0x2449b5=_0x45bb10['find'](_0x3b0aab=>_0x3b0aab[_0xcef9de(0xc5)]===!![]&&_0x3b0aab[_0xcef9de(0xb9)]===_0x29b5b2&&_0x3b0aab[_0xcef9de(0xba)]==='local'),_0x346f26=_0x2449b5??_0x45bb10['find'](_0x33602e=>_0x33602e[_0xcef9de(0xc5)]===!![]&&_0x33602e[_0xcef9de(0xb9)]===_0x29b5b2);if(_0x346f26){const _0x310ef9=String(_0x346f26['appcode']??'')[_0xcef9de(0xc9)]();if(!_0x110b81||_0x310ef9===_0x110b81){_0x346f26['isCurrent']=!![];return;}}}if(_0x110b81){const _0x417c7e=_0x45bb10['find'](_0x30ee65=>String(_0x30ee65[_0xcef9de(0xc3)]??'')[_0xcef9de(0xc9)]()===_0x110b81);_0x417c7e&&(_0x417c7e[_0xcef9de(0xc6)]=!![]);}return;}if(!_0x110b81)return;for(const _0x100b92 of _0x45bb10){String(_0x100b92[_0xcef9de(0xc3)]??'')[_0xcef9de(0xc9)]()===_0x110b81&&(_0x100b92[_0xcef9de(0xc6)]=!![]);}}
@@ -1 +1 @@
1
- function a8_0x2a82(_0x49291c,_0x3c9539){_0x49291c=_0x49291c-0x13c;const _0x2f1e1d=a8_0x2f1e();let _0x2a824c=_0x2f1e1d[_0x49291c];return _0x2a824c;}const a8_0x3954dd=a8_0x2a82;(function(_0x3b2a80,_0x1bda7b){const _0x47e464=a8_0x2a82,_0x3a4f47=_0x3b2a80();while(!![]){try{const _0x14ea94=parseInt(_0x47e464(0x140))/0x1+-parseInt(_0x47e464(0x145))/0x2*(-parseInt(_0x47e464(0x14d))/0x3)+parseInt(_0x47e464(0x14e))/0x4+-parseInt(_0x47e464(0x14b))/0x5*(-parseInt(_0x47e464(0x152))/0x6)+-parseInt(_0x47e464(0x13f))/0x7*(-parseInt(_0x47e464(0x143))/0x8)+parseInt(_0x47e464(0x14a))/0x9+parseInt(_0x47e464(0x148))/0xa*(-parseInt(_0x47e464(0x13d))/0xb);if(_0x14ea94===_0x1bda7b)break;else _0x3a4f47['push'](_0x3a4f47['shift']());}catch(_0x4db06c){_0x3a4f47['push'](_0x3a4f47['shift']());}}}(a8_0x2f1e,0x9497e));import{getRuntimeAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const appConfigGet={'service':a8_0x3954dd(0x144),'command':a8_0x3954dd(0x146),'description':a8_0x3954dd(0x13c),'risk':a8_0x3954dd(0x149),'args':[{'name':a8_0x3954dd(0x14c),'description':'App\x20config\x20key','required':!![]}],'flags':[],async 'execute'(_0x4d017f){const _0x7243a5=a8_0x3954dd,_0x2d8c82=_0x4d017f['args'][0x0]?.[_0x7243a5(0x142)]();if(!_0x2d8c82)throw CliErrors[_0x7243a5(0x147)]('Missing\x20app-config\x20key.',_0x7243a5(0x151)+CLI_BIN_NAME+_0x7243a5(0x153));try{const _0x4aaef7=await getRuntimeAppConfigByKey(_0x4d017f[_0x7243a5(0x141)],_0x2d8c82);return{'ok':!![],'data':_0x4aaef7};}catch{throw CliErrors['apiError'](_0x7243a5(0x13e)+_0x2d8c82+_0x7243a5(0x150)+_0x4d017f[_0x7243a5(0x141)],_0x7243a5(0x14f));}}};function a8_0x2f1e(){const _0x4ccdda=['appCode','trim','371024AvDawa','app-config','19666brbiKA','get','validation','20AUEBSi','read','5275989yLCWEn','5MUElkt','key','33SyZEjA','2167284iSdAdO','Check\x20that\x20the\x20key\x20exists,\x20the\x20current\x20AccessKey\x20has\x20permission,\x20and\x20the\x20runtime\x20app-config\x20endpoint\x20is\x20available.',',\x20appCode=','Usage:\x20','593724bbKbrH','\x20app-config\x20get\x20<key>','Get\x20one\x20runtime\x20app-config\x20value\x20by\x20key','7597579yVSsaQ','Unable\x20to\x20get\x20app-config\x20value:\x20key=','21GCxBzr','515723kfnRED'];a8_0x2f1e=function(){return _0x4ccdda;};return a8_0x2f1e();}
1
+ const a8_0x1ffceb=a8_0x11f3;(function(_0x694cb2,_0xb2e396){const _0x3282d4=a8_0x11f3,_0x3986c2=_0x694cb2();while(!![]){try{const _0x50d952=-parseInt(_0x3282d4(0xfa))/0x1+parseInt(_0x3282d4(0x103))/0x2+-parseInt(_0x3282d4(0x106))/0x3+parseInt(_0x3282d4(0x102))/0x4+-parseInt(_0x3282d4(0x104))/0x5+parseInt(_0x3282d4(0x107))/0x6+parseInt(_0x3282d4(0xf7))/0x7;if(_0x50d952===_0xb2e396)break;else _0x3986c2['push'](_0x3986c2['shift']());}catch(_0x29827d){_0x3986c2['push'](_0x3986c2['shift']());}}}(a8_0x2c3c,0x7a820));import{getRuntimeAppConfigByKey}from'../../core/api-client.js';function a8_0x2c3c(){const _0xbe6a98=['appCode','243558WIAJMG','Get\x20one\x20runtime\x20app-config\x20value\x20by\x20key','args','594514dlGRSw','trim','key','apiError','validation','App\x20config\x20key','Usage:\x20',',\x20appCode=','1087208afYoOe','1751724dhjHQD','29990BIlXcy','get','1069803cywucz','1658682kuxShs','app-config','Unable\x20to\x20get\x20app-config\x20value:\x20key=','Check\x20that\x20the\x20key\x20exists,\x20the\x20current\x20AccessKey\x20has\x20permission,\x20and\x20the\x20runtime\x20app-config\x20endpoint\x20is\x20available.','Missing\x20app-config\x20key.','\x20app-config\x20get\x20<key>'];a8_0x2c3c=function(){return _0xbe6a98;};return a8_0x2c3c();}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a8_0x11f3(_0x1a64c1,_0x4a8512){_0x1a64c1=_0x1a64c1-0xf7;const _0x2c3cb4=a8_0x2c3c();let _0x11f3b2=_0x2c3cb4[_0x1a64c1];return _0x11f3b2;}export const appConfigGet={'service':a8_0x1ffceb(0x108),'command':a8_0x1ffceb(0x105),'description':a8_0x1ffceb(0xf8),'risk':'read','args':[{'name':a8_0x1ffceb(0xfc),'description':a8_0x1ffceb(0xff),'required':!![]}],'flags':[],async 'execute'(_0x5bb96c){const _0x117f08=a8_0x1ffceb,_0x4d3361=_0x5bb96c[_0x117f08(0xf9)][0x0]?.[_0x117f08(0xfb)]();if(!_0x4d3361)throw CliErrors[_0x117f08(0xfe)](_0x117f08(0x10b),_0x117f08(0x100)+CLI_BIN_NAME+_0x117f08(0x10c));try{const _0x408761=await getRuntimeAppConfigByKey(_0x5bb96c['appCode'],_0x4d3361);return{'ok':!![],'data':_0x408761};}catch{throw CliErrors[_0x117f08(0xfd)](_0x117f08(0x109)+_0x4d3361+_0x117f08(0x101)+_0x5bb96c[_0x117f08(0x10d)],_0x117f08(0x10a));}}};
@@ -1 +1 @@
1
- (function(_0x49ce40,_0xaf2c02){const _0x2b66e4=a9_0x4f26,_0x3c267e=_0x49ce40();while(!![]){try{const _0x20b4be=parseInt(_0x2b66e4(0x1ea))/0x1*(parseInt(_0x2b66e4(0x1ec))/0x2)+parseInt(_0x2b66e4(0x1eb))/0x3+parseInt(_0x2b66e4(0x1e9))/0x4+-parseInt(_0x2b66e4(0x1e5))/0x5+-parseInt(_0x2b66e4(0x1e6))/0x6+parseInt(_0x2b66e4(0x1e7))/0x7+parseInt(_0x2b66e4(0x1e8))/0x8*(-parseInt(_0x2b66e4(0x1e4))/0x9);if(_0x20b4be===_0xaf2c02)break;else _0x3c267e['push'](_0x3c267e['shift']());}catch(_0x251495){_0x3c267e['push'](_0x3c267e['shift']());}}}(a9_0x13ed,0xe65f6));function a9_0x13ed(){const _0x3f270b=['2529vrDHzy','8587115XpAtmG','5294550VZvDCQ','10986598rJYfpP','9208IePBgi','601260BDgBJj','682697lcTxgU','2344986Yropzp','4zXPGJI'];a9_0x13ed=function(){return _0x3f270b;};return a9_0x13ed();}import{appConfigGet}from'../../commands/app-config/get.js';function a9_0x4f26(_0x53957d,_0x2cdd96){_0x53957d=_0x53957d-0x1e4;const _0x13ed3c=a9_0x13ed();let _0x4f26c7=_0x13ed3c[_0x53957d];return _0x4f26c7;}export const appConfigDefinitions=[appConfigGet];
1
+ (function(_0x43f409,_0x53d6b3){const _0x5346d6=a9_0x4dc6,_0x36d1de=_0x43f409();while(!![]){try{const _0x12ffd6=-parseInt(_0x5346d6(0x100))/0x1*(parseInt(_0x5346d6(0xff))/0x2)+parseInt(_0x5346d6(0xfd))/0x3*(parseInt(_0x5346d6(0x103))/0x4)+parseInt(_0x5346d6(0x107))/0x5+parseInt(_0x5346d6(0x105))/0x6*(parseInt(_0x5346d6(0x106))/0x7)+-parseInt(_0x5346d6(0x109))/0x8*(-parseInt(_0x5346d6(0x101))/0x9)+parseInt(_0x5346d6(0x104))/0xa*(parseInt(_0x5346d6(0x102))/0xb)+parseInt(_0x5346d6(0xfe))/0xc*(-parseInt(_0x5346d6(0x108))/0xd);if(_0x12ffd6===_0x53d6b3)break;else _0x36d1de['push'](_0x36d1de['shift']());}catch(_0x458024){_0x36d1de['push'](_0x36d1de['shift']());}}}(a9_0x33e3,0xeeaa1));import{appConfigGet}from'../../commands/app-config/get.js';function a9_0x4dc6(_0x58ac12,_0x24b362){_0x58ac12=_0x58ac12-0xfd;const _0x33e3db=a9_0x33e3();let _0x4dc6d1=_0x33e3db[_0x58ac12];return _0x4dc6d1;}export const appConfigDefinitions=[appConfigGet];function a9_0x33e3(){const _0x31f4e0=['6578815mxGTEl','120341Hswyab','8LQmAuN','6915oZjJoR','4668NKqrOr','522762EGDKIl','3qmIKwx','2229471OkQCoK','11wkAoXk','2428VLImFM','7848490RMFNdR','366sabOOh','185353SVDNtW'];a9_0x33e3=function(){return _0x31f4e0;};return a9_0x33e3();}
@@ -1 +1 @@
1
- const a10_0x34c502=a10_0x3ab1;(function(_0x1f6de9,_0x5067d1){const _0x533054=a10_0x3ab1,_0x3e7bfe=_0x1f6de9();while(!![]){try{const _0x3becd9=-parseInt(_0x533054(0x112))/0x1+-parseInt(_0x533054(0x11b))/0x2+parseInt(_0x533054(0x149))/0x3+parseInt(_0x533054(0x121))/0x4+parseInt(_0x533054(0x125))/0x5+parseInt(_0x533054(0x143))/0x6+parseInt(_0x533054(0x11e))/0x7*(-parseInt(_0x533054(0x122))/0x8);if(_0x3becd9===_0x5067d1)break;else _0x3e7bfe['push'](_0x3e7bfe['shift']());}catch(_0x3f5582){_0x3e7bfe['push'](_0x3e7bfe['shift']());}}}(a10_0x2e5f,0xb66ed));import{readFileSync}from'node:fs';import{resolve}from'node:path';import{approveApprovalTask,getApprovalTaskDetail,listApprovalTodo,transferApprovalTask}from'../../core/api-client.js';function a10_0x2e5f(){const _0x16ce56=['559689yWXNsA','Preview:\x20transfer\x20an\x20approval\x20task','/client/flow/task/transfer','build','Preview:\x20approve\x20an\x20approval\x20task','Reject\x20a\x20pending\x20Runtime\x20task','Application\x20code\x20(falls\x20back\x20to\x20the\x20active\x20workspace\x20app)','1104112dOspag','Set\x20--app-code,\x20--appcode,\x20or\x20an\x20active\x20app\x20in\x20the\x20workspace\x20configuration.','Transfers\x20the\x20pending\x20Runtime\x20task\x20to\x20the\x20selected\x20eligible\x20user.\x20The\x20current\x20handler\x20may\x20lose\x20permission\x20to\x20process\x20the\x20task.','string','Number\x20of\x20todo\x20records\x20per\x20page','--page-size\x20must\x20be\x20a\x20positive\x20integer.','--page\x20must\x20be\x20a\x20positive\x20integer.','taskId','approve','566200WFqhrA','POST','--variables\x20must\x20contain\x20valid\x20JSON.','3403505yxucXw','body','num','4921808ZZuVpi','8HHyNQJ','str','page','4171835XyRkFG','number','todo','app-code','reject','trim','description','object','appCode','Workflow\x20variables\x20as\x20JSON\x20or\x20@path/to/variables.json','/client/flow/approve','approval','utf8','isSafeInteger','Approval\x20or\x20transfer\x20comment','Rejects\x20the\x20pending\x20Runtime\x20task\x20and\x20applies\x20the\x20workflow\x20rejection\x20path.\x20This\x20action\x20may\x20end\x20the\x20workflow\x20or\x20trigger\x20downstream\x20business\x20side\x20effects.','comment','variables','mergedCli','validation','target-user-id','high-risk-write','Rejected\x20approval\x20task\x20','startsWith','--target-user-id\x20must\x20not\x20be\x20blank.','Approves\x20the\x20pending\x20Runtime\x20task\x20and\x20advances\x20its\x20workflow.\x20This\x20action\x20may\x20trigger\x20downstream\x20nodes\x20and\x20business\x20side\x20effects.','isArray','Approve\x20a\x20pending\x20Runtime\x20task','page-size','Transferred\x20approval\x20task\x20','2215740YkVjXM','slice','--task-id\x20must\x20not\x20be\x20blank.','read','Runtime\x20approval\x20task\x20ID','task-detail'];a10_0x2e5f=function(){return _0x16ce56;};return a10_0x2e5f();}import{CliErrors}from'../../errors.js';import{dryRun as a10_0x432b60}from'../../framework/dryrun.js';import{redactSensitiveValue}from'../../utils/redaction.js';import{parseLosslessJson}from'../../utils/lossless-json.js';const APP_CODE_FLAG={'name':a10_0x34c502(0x128),'type':a10_0x34c502(0x115),'description':a10_0x34c502(0x111)},PAGE_FLAG={'name':a10_0x34c502(0x124),'type':a10_0x34c502(0x126),'default':0x1,'description':'One-based\x20todo\x20page\x20number'},PAGE_SIZE_FLAG={'name':a10_0x34c502(0x141),'type':a10_0x34c502(0x126),'default':0x14,'description':a10_0x34c502(0x116)},TASK_ID_FLAG={'name':'task-id','type':'string','required':!![],'description':a10_0x34c502(0x147)},COMMENT_FLAG={'name':'comment','type':a10_0x34c502(0x115),'description':a10_0x34c502(0x133)},VARIABLES_FLAG={'name':a10_0x34c502(0x136),'type':'string','description':a10_0x34c502(0x12e)},TARGET_USER_ID_FLAG={'name':a10_0x34c502(0x139),'type':a10_0x34c502(0x115),'required':!![],'description':'Target\x20user\x20ID\x20selected\x20from\x20Runtime\x20transfer\x20candidates'};function requireApprovalAppCode(_0x50c8dc){const _0x16035a=a10_0x34c502,_0x38d8e6=(_0x50c8dc[_0x16035a(0x123)](_0x16035a(0x128))||_0x50c8dc[_0x16035a(0x137)]?.[_0x16035a(0x12d)]||_0x50c8dc[_0x16035a(0x12d)]||'')['trim']();if(!_0x38d8e6)throw CliErrors['configMissing'](_0x16035a(0x113));return _0x38d8e6;}function requireTaskId(_0x5ac877){const _0x1918e0=a10_0x34c502,_0x4d366f=_0x5ac877[_0x1918e0(0x123)]('task-id')[_0x1918e0(0x12a)]();if(!_0x4d366f)throw CliErrors[_0x1918e0(0x138)](_0x1918e0(0x145));return _0x4d366f;}function validatePage(_0x1e2518){const _0x48b416=a10_0x34c502,_0x2dfd13=_0x1e2518['num'](_0x48b416(0x124),0x1),_0x1b5f54=_0x1e2518[_0x48b416(0x120)](_0x48b416(0x141),0x14);if(!Number[_0x48b416(0x132)](_0x2dfd13)||_0x2dfd13<0x1)throw CliErrors[_0x48b416(0x138)](_0x48b416(0x118));if(!Number['isSafeInteger'](_0x1b5f54)||_0x1b5f54<0x1)throw CliErrors[_0x48b416(0x138)](_0x48b416(0x117));}function readVariables(_0x46bf74){const _0x35860b=a10_0x34c502,_0x3c25ed=_0x46bf74[_0x35860b(0x123)](_0x35860b(0x136))[_0x35860b(0x12a)]();if(!_0x3c25ed)return undefined;let _0xa7624a=_0x3c25ed;if(_0x3c25ed[_0x35860b(0x13c)]('@')){const _0x14847a=_0x3c25ed[_0x35860b(0x144)](0x1)[_0x35860b(0x12a)]();if(!_0x14847a)throw CliErrors[_0x35860b(0x138)]('--variables\x20@file\x20path\x20must\x20not\x20be\x20blank.');try{_0xa7624a=readFileSync(resolve(_0x14847a),_0x35860b(0x131));}catch{throw CliErrors[_0x35860b(0x138)]('Unable\x20to\x20read\x20--variables\x20file.');}}let _0x2da804;try{_0x2da804=parseLosslessJson(_0xa7624a);}catch{throw CliErrors[_0x35860b(0x138)](_0x35860b(0x11d));}if(!_0x2da804||typeof _0x2da804!==_0x35860b(0x12c)||Array[_0x35860b(0x13f)](_0x2da804))throw CliErrors[_0x35860b(0x138)]('--variables\x20must\x20be\x20a\x20JSON\x20object.');return _0x2da804;}function approvalBody(_0x3a1ced,_0x34a65b){const _0xdb8590=a10_0x34c502,_0x3796c2={'appCode':requireApprovalAppCode(_0x3a1ced),'taskId':requireTaskId(_0x3a1ced),'approved':_0x34a65b},_0x216929=_0x3a1ced[_0xdb8590(0x123)](_0xdb8590(0x135)),_0xd70b14=readVariables(_0x3a1ced);if(_0x216929)_0x3796c2[_0xdb8590(0x135)]=_0x216929;if(_0xd70b14!==undefined)_0x3796c2[_0xdb8590(0x136)]=_0xd70b14;return _0x3796c2;}function transferBody(_0x3b0635){const _0x5ce1db=a10_0x34c502,_0x51bad3=requireTaskId(_0x3b0635),_0x318d55=_0x3b0635['str'](_0x5ce1db(0x139))[_0x5ce1db(0x12a)]();if(!_0x318d55)throw CliErrors['validation'](_0x5ce1db(0x13d));const _0x2bdabe={'appCode':requireApprovalAppCode(_0x3b0635),'taskId':_0x51bad3,'targetUserId':_0x318d55},_0x3f5673=_0x3b0635[_0x5ce1db(0x123)]('comment');if(_0x3f5673)_0x2bdabe[_0x5ce1db(0x135)]=_0x3f5673;return _0x2bdabe;}function sanitized(_0x275db3){return redactSensitiveValue(_0x275db3);}const approvalTodo={'service':'approval','command':a10_0x34c502(0x127),'description':'List\x20the\x20current\x20user\x27s\x20approval\x20todo\x20tasks','risk':a10_0x34c502(0x146),'requiresAppCode':![],'flags':[APP_CODE_FLAG,PAGE_FLAG,PAGE_SIZE_FLAG],async 'validate'(_0x43123b){requireApprovalAppCode(_0x43123b),validatePage(_0x43123b);},async 'execute'(_0x1e78dd){const _0xeef71e=a10_0x34c502,_0x4a473b=requireApprovalAppCode(_0x1e78dd),_0x56301c=await listApprovalTodo(_0x4a473b,_0x1e78dd['num'](_0xeef71e(0x124),0x1),_0x1e78dd[_0xeef71e(0x120)]('page-size',0x14));return{'ok':!![],'data':sanitized(_0x56301c)};}},approvalTaskDetail={'service':a10_0x34c502(0x130),'command':a10_0x34c502(0x148),'description':'Show\x20an\x20approval\x20task\x20and\x20its\x20current\x20handling\x20permissions','risk':'read','requiresAppCode':![],'flags':[APP_CODE_FLAG,TASK_ID_FLAG],async 'validate'(_0x213566){requireApprovalAppCode(_0x213566),requireTaskId(_0x213566);},async 'execute'(_0x196321){const _0x3c3ded=requireTaskId(_0x196321),_0x36e216=await getApprovalTaskDetail(_0x3c3ded,requireApprovalAppCode(_0x196321));return{'ok':!![],'data':sanitized(_0x36e216)};}},approvalApprove={'service':a10_0x34c502(0x130),'command':a10_0x34c502(0x11a),'description':a10_0x34c502(0x140),'risk':'high-risk-write','confirmationDescription':a10_0x34c502(0x13e),'requiresAppCode':![],'flags':[APP_CODE_FLAG,TASK_ID_FLAG,COMMENT_FLAG,VARIABLES_FLAG],async 'validate'(_0x3d4704){approvalBody(_0x3d4704,!![]);},async 'execute'(_0x2c2462){const _0x1a0257=a10_0x34c502,_0x1b9d4a=approvalBody(_0x2c2462,!![]),_0x1229cc=await approveApprovalTask(_0x1b9d4a);return{'ok':!![],'data':sanitized(_0x1229cc),'message':'Approved\x20approval\x20task\x20'+_0x1b9d4a[_0x1a0257(0x119)]};},async 'dryRun'(_0x160150){const _0x76fb0c=a10_0x34c502,_0x5e1f72=approvalBody(_0x160150,!![]);return a10_0x432b60(_0x76fb0c(0x11c),'/client/flow/approve')[_0x76fb0c(0x11f)](sanitized(_0x5e1f72))[_0x76fb0c(0x12b)](_0x76fb0c(0x10f))[_0x76fb0c(0x10e)]();}},approvalReject={'service':a10_0x34c502(0x130),'command':a10_0x34c502(0x129),'description':a10_0x34c502(0x110),'risk':a10_0x34c502(0x13a),'confirmationDescription':a10_0x34c502(0x134),'requiresAppCode':![],'flags':[APP_CODE_FLAG,TASK_ID_FLAG,COMMENT_FLAG,VARIABLES_FLAG],async 'validate'(_0xb03be9){approvalBody(_0xb03be9,![]);},async 'execute'(_0x521fc6){const _0x36bb08=a10_0x34c502,_0x1f307e=approvalBody(_0x521fc6,![]),_0x151610=await approveApprovalTask(_0x1f307e);return{'ok':!![],'data':sanitized(_0x151610),'message':_0x36bb08(0x13b)+_0x1f307e[_0x36bb08(0x119)]};},async 'dryRun'(_0x319194){const _0x37fe2c=a10_0x34c502,_0x3394d4=approvalBody(_0x319194,![]);return a10_0x432b60(_0x37fe2c(0x11c),_0x37fe2c(0x12f))[_0x37fe2c(0x11f)](sanitized(_0x3394d4))['description']('Preview:\x20reject\x20an\x20approval\x20task')[_0x37fe2c(0x10e)]();}},approvalTransfer={'service':'approval','command':'transfer','description':'Transfer\x20a\x20pending\x20Runtime\x20task\x20to\x20an\x20allowed\x20user','risk':a10_0x34c502(0x13a),'confirmationDescription':a10_0x34c502(0x114),'requiresAppCode':![],'flags':[APP_CODE_FLAG,TASK_ID_FLAG,TARGET_USER_ID_FLAG,COMMENT_FLAG],async 'validate'(_0x1f6bf7){transferBody(_0x1f6bf7);},async 'execute'(_0x5f2e6a){const _0x4c1218=a10_0x34c502,_0x26a25c=transferBody(_0x5f2e6a),_0x40b41e=await transferApprovalTask(_0x26a25c);return{'ok':!![],'data':sanitized(_0x40b41e),'message':_0x4c1218(0x142)+_0x26a25c[_0x4c1218(0x119)]};},async 'dryRun'(_0xd68175){const _0x5eabd7=a10_0x34c502,_0xfe3629=transferBody(_0xd68175);return a10_0x432b60(_0x5eabd7(0x11c),_0x5eabd7(0x10d))['body'](sanitized(_0xfe3629))[_0x5eabd7(0x12b)](_0x5eabd7(0x14a))['build']();}};export const approvalDefinitions=[approvalTodo,approvalTaskDetail,approvalApprove,approvalReject,approvalTransfer];function a10_0x3ab1(_0x226cff,_0x5cadcc){_0x226cff=_0x226cff-0x10d;const _0x2e5f8e=a10_0x2e5f();let _0x3ab1f5=_0x2e5f8e[_0x226cff];return _0x3ab1f5;}export{approvalApprove,approvalReject,approvalTaskDetail,approvalTodo,approvalTransfer};
1
+ const a10_0x2a9a43=a10_0x3d8f;(function(_0x4b9df2,_0x17faf2){const _0x436699=a10_0x3d8f,_0x177ef3=_0x4b9df2();while(!![]){try{const _0x892d77=-parseInt(_0x436699(0xcd))/0x1+parseInt(_0x436699(0xad))/0x2*(-parseInt(_0x436699(0xba))/0x3)+-parseInt(_0x436699(0xda))/0x4*(-parseInt(_0x436699(0xb6))/0x5)+-parseInt(_0x436699(0xa8))/0x6+-parseInt(_0x436699(0xd8))/0x7*(parseInt(_0x436699(0xd1))/0x8)+-parseInt(_0x436699(0xb9))/0x9+-parseInt(_0x436699(0xce))/0xa*(-parseInt(_0x436699(0xb2))/0xb);if(_0x892d77===_0x17faf2)break;else _0x177ef3['push'](_0x177ef3['shift']());}catch(_0x4a5edd){_0x177ef3['push'](_0x177ef3['shift']());}}}(a10_0x1468,0xbd951));import{readFileSync}from'node:fs';import{resolve}from'node:path';import{approveApprovalTask,getApprovalTaskDetail,listApprovalTodo,transferApprovalTask}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun as a10_0x13c9cd}from'../../framework/dryrun.js';function a10_0x1468(){const _0x40006f=['startsWith','Approves\x20the\x20pending\x20Runtime\x20task\x20and\x20advances\x20its\x20workflow.\x20This\x20action\x20may\x20trigger\x20downstream\x20nodes\x20and\x20business\x20side\x20effects.','page','target-user-id','--variables\x20must\x20contain\x20valid\x20JSON.','--target-user-id\x20must\x20not\x20be\x20blank.','Transferred\x20approval\x20task\x20','Approve\x20a\x20pending\x20Runtime\x20task','validation','page-size','830815TCvXJc','29797990GycRzU','description','read','146632eDxBKe','configMissing','POST','Runtime\x20approval\x20task\x20ID','app-code','Show\x20an\x20approval\x20task\x20and\x20its\x20current\x20handling\x20permissions','--page-size\x20must\x20be\x20a\x20positive\x20integer.','7zXsNKY','appCode','42260HqdUuS','variables','--variables\x20must\x20be\x20a\x20JSON\x20object.','comment','str','approval','--page\x20must\x20be\x20a\x20positive\x20integer.','isArray','mergedCli','Transfers\x20the\x20pending\x20Runtime\x20task\x20to\x20the\x20selected\x20eligible\x20user.\x20The\x20current\x20handler\x20may\x20lose\x20permission\x20to\x20process\x20the\x20task.','body','--task-id\x20must\x20not\x20be\x20blank.','reject','Rejected\x20approval\x20task\x20','isSafeInteger','todo','/client/flow/task/transfer','--variables\x20@file\x20path\x20must\x20not\x20be\x20blank.','141792oIJWig','Approval\x20or\x20transfer\x20comment','task-id','utf8','Rejects\x20the\x20pending\x20Runtime\x20task\x20and\x20applies\x20the\x20workflow\x20rejection\x20path.\x20This\x20action\x20may\x20end\x20the\x20workflow\x20or\x20trigger\x20downstream\x20business\x20side\x20effects.','94VdjmbK','build','high-risk-write','Preview:\x20approve\x20an\x20approval\x20task','Workflow\x20variables\x20as\x20JSON\x20or\x20@path/to/variables.json','11WPKfuV','taskId','trim','object','20rDUJhA','string','Approved\x20approval\x20task\x20','7192917CQEiLz','36609deLGaP','Application\x20code\x20(falls\x20back\x20to\x20the\x20active\x20workspace\x20app)','/client/flow/approve','Set\x20--app-code,\x20--appcode,\x20or\x20an\x20active\x20app\x20in\x20the\x20workspace\x20configuration.','Reject\x20a\x20pending\x20Runtime\x20task','List\x20the\x20current\x20user\x27s\x20approval\x20todo\x20tasks','Transfer\x20a\x20pending\x20Runtime\x20task\x20to\x20an\x20allowed\x20user','Unable\x20to\x20read\x20--variables\x20file.','number'];a10_0x1468=function(){return _0x40006f;};return a10_0x1468();}function a10_0x3d8f(_0x32efd,_0x8bcd59){_0x32efd=_0x32efd-0xa8;const _0x146892=a10_0x1468();let _0x3d8f9c=_0x146892[_0x32efd];return _0x3d8f9c;}import{redactSensitiveValue}from'../../utils/redaction.js';import{parseLosslessJson}from'../../utils/lossless-json.js';const APP_CODE_FLAG={'name':a10_0x2a9a43(0xd5),'type':a10_0x2a9a43(0xb7),'description':a10_0x2a9a43(0xbb)},PAGE_FLAG={'name':a10_0x2a9a43(0xc5),'type':a10_0x2a9a43(0xc2),'default':0x1,'description':'One-based\x20todo\x20page\x20number'},PAGE_SIZE_FLAG={'name':a10_0x2a9a43(0xcc),'type':a10_0x2a9a43(0xc2),'default':0x14,'description':'Number\x20of\x20todo\x20records\x20per\x20page'},TASK_ID_FLAG={'name':a10_0x2a9a43(0xaa),'type':'string','required':!![],'description':a10_0x2a9a43(0xd4)},COMMENT_FLAG={'name':a10_0x2a9a43(0xdd),'type':'string','description':a10_0x2a9a43(0xa9)},VARIABLES_FLAG={'name':'variables','type':a10_0x2a9a43(0xb7),'description':a10_0x2a9a43(0xb1)},TARGET_USER_ID_FLAG={'name':a10_0x2a9a43(0xc6),'type':a10_0x2a9a43(0xb7),'required':!![],'description':'Target\x20user\x20ID\x20selected\x20from\x20Runtime\x20transfer\x20candidates'};function requireApprovalAppCode(_0x247ce0){const _0x35617a=a10_0x2a9a43,_0x588a09=(_0x247ce0[_0x35617a(0xde)](_0x35617a(0xd5))||_0x247ce0[_0x35617a(0xe2)]?.['appCode']||_0x247ce0[_0x35617a(0xd9)]||'')[_0x35617a(0xb4)]();if(!_0x588a09)throw CliErrors[_0x35617a(0xd2)](_0x35617a(0xbd));return _0x588a09;}function requireTaskId(_0x9eded){const _0x5ec2b0=a10_0x2a9a43,_0x4c4a2f=_0x9eded['str'](_0x5ec2b0(0xaa))[_0x5ec2b0(0xb4)]();if(!_0x4c4a2f)throw CliErrors[_0x5ec2b0(0xcb)](_0x5ec2b0(0xe5));return _0x4c4a2f;}function validatePage(_0x445f33){const _0xb1102c=a10_0x2a9a43,_0x3c178f=_0x445f33['num'](_0xb1102c(0xc5),0x1),_0x517e82=_0x445f33['num'](_0xb1102c(0xcc),0x14);if(!Number['isSafeInteger'](_0x3c178f)||_0x3c178f<0x1)throw CliErrors['validation'](_0xb1102c(0xe0));if(!Number[_0xb1102c(0xe8)](_0x517e82)||_0x517e82<0x1)throw CliErrors['validation'](_0xb1102c(0xd7));}function readVariables(_0x381fb1){const _0x531f1b=a10_0x2a9a43,_0x32cd0d=_0x381fb1[_0x531f1b(0xde)](_0x531f1b(0xdb))['trim']();if(!_0x32cd0d)return undefined;let _0x1381dd=_0x32cd0d;if(_0x32cd0d[_0x531f1b(0xc3)]('@')){const _0xc3ebaa=_0x32cd0d['slice'](0x1)[_0x531f1b(0xb4)]();if(!_0xc3ebaa)throw CliErrors[_0x531f1b(0xcb)](_0x531f1b(0xeb));try{_0x1381dd=readFileSync(resolve(_0xc3ebaa),_0x531f1b(0xab));}catch{throw CliErrors[_0x531f1b(0xcb)](_0x531f1b(0xc1));}}let _0x2e8426;try{_0x2e8426=parseLosslessJson(_0x1381dd);}catch{throw CliErrors['validation'](_0x531f1b(0xc7));}if(!_0x2e8426||typeof _0x2e8426!==_0x531f1b(0xb5)||Array[_0x531f1b(0xe1)](_0x2e8426))throw CliErrors[_0x531f1b(0xcb)](_0x531f1b(0xdc));return _0x2e8426;}function approvalBody(_0x4d9ebc,_0x17053e){const _0x3b9aae=a10_0x2a9a43,_0x1c4401={'appCode':requireApprovalAppCode(_0x4d9ebc),'taskId':requireTaskId(_0x4d9ebc),'approved':_0x17053e},_0x441a9d=_0x4d9ebc[_0x3b9aae(0xde)](_0x3b9aae(0xdd)),_0x5dee35=readVariables(_0x4d9ebc);if(_0x441a9d)_0x1c4401[_0x3b9aae(0xdd)]=_0x441a9d;if(_0x5dee35!==undefined)_0x1c4401['variables']=_0x5dee35;return _0x1c4401;}function transferBody(_0x4ef652){const _0x2e8d2e=a10_0x2a9a43,_0x2106b4=requireTaskId(_0x4ef652),_0x4debd5=_0x4ef652[_0x2e8d2e(0xde)]('target-user-id')[_0x2e8d2e(0xb4)]();if(!_0x4debd5)throw CliErrors[_0x2e8d2e(0xcb)](_0x2e8d2e(0xc8));const _0x4fe1c3={'appCode':requireApprovalAppCode(_0x4ef652),'taskId':_0x2106b4,'targetUserId':_0x4debd5},_0x2b6f4a=_0x4ef652[_0x2e8d2e(0xde)](_0x2e8d2e(0xdd));if(_0x2b6f4a)_0x4fe1c3['comment']=_0x2b6f4a;return _0x4fe1c3;}function sanitized(_0x985f7e){return redactSensitiveValue(_0x985f7e);}const approvalTodo={'service':'approval','command':a10_0x2a9a43(0xe9),'description':a10_0x2a9a43(0xbf),'risk':a10_0x2a9a43(0xd0),'requiresAppCode':![],'flags':[APP_CODE_FLAG,PAGE_FLAG,PAGE_SIZE_FLAG],async 'validate'(_0x24970d){requireApprovalAppCode(_0x24970d),validatePage(_0x24970d);},async 'execute'(_0xc80765){const _0x35729d=a10_0x2a9a43,_0x5e0a5c=requireApprovalAppCode(_0xc80765),_0x59b6a7=await listApprovalTodo(_0x5e0a5c,_0xc80765['num'](_0x35729d(0xc5),0x1),_0xc80765['num'](_0x35729d(0xcc),0x14));return{'ok':!![],'data':sanitized(_0x59b6a7)};}},approvalTaskDetail={'service':'approval','command':'task-detail','description':a10_0x2a9a43(0xd6),'risk':a10_0x2a9a43(0xd0),'requiresAppCode':![],'flags':[APP_CODE_FLAG,TASK_ID_FLAG],async 'validate'(_0x371a69){requireApprovalAppCode(_0x371a69),requireTaskId(_0x371a69);},async 'execute'(_0x36721a){const _0x5580d=requireTaskId(_0x36721a),_0x27906b=await getApprovalTaskDetail(_0x5580d,requireApprovalAppCode(_0x36721a));return{'ok':!![],'data':sanitized(_0x27906b)};}},approvalApprove={'service':'approval','command':'approve','description':a10_0x2a9a43(0xca),'risk':a10_0x2a9a43(0xaf),'confirmationDescription':a10_0x2a9a43(0xc4),'requiresAppCode':![],'flags':[APP_CODE_FLAG,TASK_ID_FLAG,COMMENT_FLAG,VARIABLES_FLAG],async 'validate'(_0x3e4688){approvalBody(_0x3e4688,!![]);},async 'execute'(_0x654d96){const _0x5e6955=a10_0x2a9a43,_0x199b2a=approvalBody(_0x654d96,!![]),_0x1a063e=await approveApprovalTask(_0x199b2a);return{'ok':!![],'data':sanitized(_0x1a063e),'message':_0x5e6955(0xb8)+_0x199b2a[_0x5e6955(0xb3)]};},async 'dryRun'(_0x29ad39){const _0x491b53=a10_0x2a9a43,_0x335077=approvalBody(_0x29ad39,!![]);return a10_0x13c9cd(_0x491b53(0xd3),_0x491b53(0xbc))[_0x491b53(0xe4)](sanitized(_0x335077))[_0x491b53(0xcf)](_0x491b53(0xb0))[_0x491b53(0xae)]();}},approvalReject={'service':a10_0x2a9a43(0xdf),'command':a10_0x2a9a43(0xe6),'description':a10_0x2a9a43(0xbe),'risk':'high-risk-write','confirmationDescription':a10_0x2a9a43(0xac),'requiresAppCode':![],'flags':[APP_CODE_FLAG,TASK_ID_FLAG,COMMENT_FLAG,VARIABLES_FLAG],async 'validate'(_0x37a012){approvalBody(_0x37a012,![]);},async 'execute'(_0x43a50b){const _0x137124=a10_0x2a9a43,_0x1f0c96=approvalBody(_0x43a50b,![]),_0x461e29=await approveApprovalTask(_0x1f0c96);return{'ok':!![],'data':sanitized(_0x461e29),'message':_0x137124(0xe7)+_0x1f0c96[_0x137124(0xb3)]};},async 'dryRun'(_0x1f8e76){const _0x18a5aa=a10_0x2a9a43,_0x59d749=approvalBody(_0x1f8e76,![]);return a10_0x13c9cd(_0x18a5aa(0xd3),_0x18a5aa(0xbc))[_0x18a5aa(0xe4)](sanitized(_0x59d749))[_0x18a5aa(0xcf)]('Preview:\x20reject\x20an\x20approval\x20task')[_0x18a5aa(0xae)]();}},approvalTransfer={'service':'approval','command':'transfer','description':a10_0x2a9a43(0xc0),'risk':a10_0x2a9a43(0xaf),'confirmationDescription':a10_0x2a9a43(0xe3),'requiresAppCode':![],'flags':[APP_CODE_FLAG,TASK_ID_FLAG,TARGET_USER_ID_FLAG,COMMENT_FLAG],async 'validate'(_0x48f669){transferBody(_0x48f669);},async 'execute'(_0x15400b){const _0x8d3320=a10_0x2a9a43,_0x2ab8ab=transferBody(_0x15400b),_0x5bba32=await transferApprovalTask(_0x2ab8ab);return{'ok':!![],'data':sanitized(_0x5bba32),'message':_0x8d3320(0xc9)+_0x2ab8ab[_0x8d3320(0xb3)]};},async 'dryRun'(_0x3bbe6b){const _0x41094b=a10_0x2a9a43,_0x54f483=transferBody(_0x3bbe6b);return a10_0x13c9cd(_0x41094b(0xd3),_0x41094b(0xea))[_0x41094b(0xe4)](sanitized(_0x54f483))[_0x41094b(0xcf)]('Preview:\x20transfer\x20an\x20approval\x20task')[_0x41094b(0xae)]();}};export const approvalDefinitions=[approvalTodo,approvalTaskDetail,approvalApprove,approvalReject,approvalTransfer];export{approvalApprove,approvalReject,approvalTaskDetail,approvalTodo,approvalTransfer};
@@ -1 +1 @@
1
- const a11_0x2e603b=a11_0x1c26;(function(_0x1f95d8,_0x1bb49f){const _0x5ae193=a11_0x1c26,_0x2d7590=_0x1f95d8();while(!![]){try{const _0x5ec134=parseInt(_0x5ae193(0x1e6))/0x1+-parseInt(_0x5ae193(0x20b))/0x2+-parseInt(_0x5ae193(0x1f2))/0x3+parseInt(_0x5ae193(0x1d4))/0x4*(parseInt(_0x5ae193(0x20e))/0x5)+parseInt(_0x5ae193(0x1d2))/0x6*(parseInt(_0x5ae193(0x1ea))/0x7)+parseInt(_0x5ae193(0x1fe))/0x8*(-parseInt(_0x5ae193(0x1e8))/0x9)+-parseInt(_0x5ae193(0x1f8))/0xa;if(_0x5ec134===_0x1bb49f)break;else _0x2d7590['push'](_0x2d7590['shift']());}catch(_0x20db9f){_0x2d7590['push'](_0x2d7590['shift']());}}}(a11_0x2793,0x70676));import{existsSync,readFileSync,statSync}from'node:fs';function a11_0x2793(){const _0x4a8e6e=['POST','Create\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','string','react','17088BZwRKN','Artifact\x20ID','136dCxJpQ','create','.\x20Unsupported:\x20','lastIndex','str','react-dom','Invalid\x20JSON\x20for\x20--metadata:\x20','isFile','Preview:\x20update\x20react_module\x20Artifact\x20','name','validation','body','react_module\x20imports\x20are\x20limited\x20to:\x20','artifact','--metadata\x20must\x20be\x20a\x20JSON\x20object.','Optional\x20source\x20filter,\x20for\x20example\x20AGENT','exec','split','906591eIcKUW','length','3991077tmtzPY','filter','1008NCBtIN','update','react_module\x20must\x20be\x20an\x20embeddable\x20React\x20module,\x20not\x20full\x20HTML\x20or\x20a\x20ReactDOM/createRoot\x20mount\x20entry.','read','metadata','test','file','Artifact\x20source\x20file\x20is\x20blank.','869403nCqkGn','Created\x20Artifact\x20','File\x20not\x20found:\x20','antd','Optional\x20favorite-state\x20filter','utf8','2709180ucAYah','react_module','join','some','Preview:\x20create\x20react_module\x20Artifact','Artifact\x20metadata\x20as\x20JSON\x20object;\x20compiledContent\x20is\x20stripped','8owKQnT','File\x20is\x20not\x20a\x20regular\x20file:\x20','favorite','AGENT','createTime','isArray','dayjs','appCode','num','trim','updateTime','bool','object','1215346cEuEcj','deleted','lodash','111110RWwFmt','artifactType','/client/artifact/create','detail','Path\x20to\x20a\x20local\x20UTF-8\x20React\x20module\x20source\x20file','list','@ant-design/icons','compiledContent','includes','map','/update','source','File\x20path\x20is\x20required.','Updated\x20Artifact\x20','build'];a11_0x2793=function(){return _0x4a8e6e;};return a11_0x2793();}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=a11_0x2e603b(0x1f9),ARTIFACT_SOURCE_AGENT=a11_0x2e603b(0x201),ALLOWED_REACT_MODULE_IMPORTS=[a11_0x2e603b(0x1d1),a11_0x2e603b(0x1d9),a11_0x2e603b(0x20d),a11_0x2e603b(0x204),a11_0x2e603b(0x1f5),a11_0x2e603b(0x1c5)];export const ALLOWED_REACT_MODULE_IMPORTS_TEXT=ALLOWED_REACT_MODULE_IMPORTS['join'](',\x20');const IMPORT_SOURCE_PATTERNS=[/\bimport\s+(?:type\s+)?(?:[^'";]*?\s+from\s+)?["']([^"']+)["']/g,/\bexport\s+(?:type\s+)?[^'";]*?\s+from\s+["']([^"']+)["']/g,/\bimport\s*\(\s*["']([^"']+)["']\s*\)/g,/\brequire\s*\(\s*["']([^"']+)["']\s*\)/g],PAGE_LEVEL_PATTERNS=[/<!doctype\s+html/i,/<\s*html\b/i,/\bcreateRoot\s*\(/,/\bReactDOM\s*\.\s*render\s*\(/,/\bReactDOM\s*\.\s*createRoot\s*\(/],FILE_FLAG={'name':a11_0x2e603b(0x1f0),'type':'string','required':!![],'description':a11_0x2e603b(0x1c3)},ARTIFACT_NAME_FLAG={'name':a11_0x2e603b(0x1dd),'type':a11_0x2e603b(0x1d0),'description':'Artifact\x20display\x20name'},METADATA_FLAG={'name':'metadata','type':a11_0x2e603b(0x1d0),'description':a11_0x2e603b(0x1fd)};function isPlainObject(_0x2c770a){const _0x1c230e=a11_0x2e603b;return typeof _0x2c770a===_0x1c230e(0x20a)&&_0x2c770a!==null&&!Array[_0x1c230e(0x203)](_0x2c770a);}function readSourceFile(_0x238e13){const _0x223e6b=a11_0x2e603b;if(!_0x238e13)throw CliErrors[_0x223e6b(0x1de)](_0x223e6b(0x1cb));if(!existsSync(_0x238e13))throw CliErrors[_0x223e6b(0x1de)](_0x223e6b(0x1f4)+_0x238e13);if(!statSync(_0x238e13)[_0x223e6b(0x1db)]())throw CliErrors['validation'](_0x223e6b(0x1ff)+_0x238e13);const _0x7311c2=readFileSync(_0x238e13,_0x223e6b(0x1f7));return validateReactModuleSource(_0x7311c2),_0x7311c2;}function parseMetadata(_0x26799b){const _0x1aab0e=a11_0x2e603b;if(!_0x26799b)return undefined;let _0x5df76a;try{_0x5df76a=JSON['parse'](_0x26799b);}catch{throw CliErrors[_0x1aab0e(0x1de)](_0x1aab0e(0x1da)+_0x26799b);}if(!isPlainObject(_0x5df76a))throw CliErrors['validation'](_0x1aab0e(0x1e2));const _0x3f1146={..._0x5df76a};return delete _0x3f1146[_0x1aab0e(0x1c6)],_0x3f1146;}function a11_0x1c26(_0xf85fb2,_0x51be32){_0xf85fb2=_0xf85fb2-0x1c1;const _0x279329=a11_0x2793();let _0x1c26ce=_0x279329[_0xf85fb2];return _0x1c26ce;}function getPackageName(_0x2c995c){const _0x49b376=a11_0x2e603b;if(_0x2c995c['startsWith']('@')){const [_0xef50df,_0x7752b4]=_0x2c995c[_0x49b376(0x1e5)]('/');return _0xef50df&&_0x7752b4?_0xef50df+'/'+_0x7752b4:_0x2c995c;}return _0x2c995c[_0x49b376(0x1e5)]('/')[0x0]||_0x2c995c;}function validateAllowedImports(_0x2ed920){const _0x460a5e=a11_0x2e603b,_0x45bb31=new Set();for(const _0x2736f1 of IMPORT_SOURCE_PATTERNS){_0x2736f1[_0x460a5e(0x1d7)]=0x0;let _0x10afd5;while((_0x10afd5=_0x2736f1[_0x460a5e(0x1e4)](_0x2ed920))!==null){const _0x640de7=_0x10afd5[0x1]?.[_0x460a5e(0x207)]();_0x640de7&&_0x45bb31['add'](_0x640de7);}}const _0x5f0c5b=[..._0x45bb31][_0x460a5e(0x1c8)](getPackageName)[_0x460a5e(0x1e9)](_0x9ae971=>!ALLOWED_REACT_MODULE_IMPORTS[_0x460a5e(0x1c7)](_0x9ae971));if(_0x5f0c5b[_0x460a5e(0x1e7)]>0x0)throw CliErrors[_0x460a5e(0x1de)](_0x460a5e(0x1e0)+ALLOWED_REACT_MODULE_IMPORTS_TEXT+_0x460a5e(0x1d6)+[...new Set(_0x5f0c5b)][_0x460a5e(0x1fa)](',\x20'));}export function validateReactModuleSource(_0x3fc558){const _0x5ad47b=a11_0x2e603b;if(!_0x3fc558['trim']())throw CliErrors['validation'](_0x5ad47b(0x1f1));if(PAGE_LEVEL_PATTERNS[_0x5ad47b(0x1fb)](_0x47f6e3=>_0x47f6e3[_0x5ad47b(0x1ef)](_0x3fc558)))throw CliErrors[_0x5ad47b(0x1de)](_0x5ad47b(0x1ec));validateAllowedImports(_0x3fc558);}function buildArtifactInput(_0x4558a6){const _0xfa6f57=a11_0x2e603b,_0x20546e=readSourceFile(_0x4558a6[_0xfa6f57(0x1d8)](_0xfa6f57(0x1f0))),_0x4547a1=_0x4558a6[_0xfa6f57(0x1d8)](_0xfa6f57(0x1dd))[_0xfa6f57(0x207)](),_0x2413e2=parseMetadata(_0x4558a6['str']('metadata'));return{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x4547a1?{'name':_0x4547a1}:{},'content':_0x20546e,..._0x2413e2?{'metadata':_0x2413e2}:{},'source':ARTIFACT_SOURCE_AGENT};}function summarizeArtifact(_0x470e74){const _0x556f26=a11_0x2e603b;return{'id':_0x470e74['id'],'name':_0x470e74['name'],'artifactType':_0x470e74[_0x556f26(0x20f)],'source':_0x470e74['source'],'favorite':_0x470e74[_0x556f26(0x200)],'deleted':_0x470e74[_0x556f26(0x20c)],'createTime':_0x470e74[_0x556f26(0x202)],'updateTime':_0x470e74[_0x556f26(0x208)]};}function detailArtifact(_0x5cf639){const _0x21b332=a11_0x2e603b;return{'id':_0x5cf639['id'],'appCode':_0x5cf639[_0x21b332(0x205)],'name':_0x5cf639['name'],'artifactType':_0x5cf639[_0x21b332(0x20f)],'source':_0x5cf639['source'],'favorite':_0x5cf639[_0x21b332(0x200)],'deleted':_0x5cf639[_0x21b332(0x20c)],'content':_0x5cf639['content']??'','compiledContent':_0x5cf639[_0x21b332(0x1c6)],'metadata':_0x5cf639[_0x21b332(0x1ee)]??{},'createTime':_0x5cf639[_0x21b332(0x202)],'updateTime':_0x5cf639['updateTime']};}function readFavoriteFlag(_0x14ef08){const _0x339ebd=a11_0x2e603b,_0x26506f=_0x14ef08['flag'](_0x339ebd(0x200));return _0x26506f===undefined||_0x26506f===null||_0x26506f===''?undefined:_0x14ef08[_0x339ebd(0x209)](_0x339ebd(0x200));}const artifactList={'service':a11_0x2e603b(0x1e1),'command':a11_0x2e603b(0x1c4),'description':'List\x20current-app\x20react_module\x20Artifacts','risk':a11_0x2e603b(0x1ed),'flags':[{'name':a11_0x2e603b(0x1ca),'type':'string','description':a11_0x2e603b(0x1e3)},{'name':a11_0x2e603b(0x200),'type':'boolean','description':a11_0x2e603b(0x1f6)},VERBOSE_FLAG],async 'execute'(_0x172f1a){const _0x318805=a11_0x2e603b,_0x22f2fd=await listRuntimeArtifacts(_0x172f1a['appCode'],{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x172f1a[_0x318805(0x1d8)](_0x318805(0x1ca))?{'source':_0x172f1a[_0x318805(0x1d8)](_0x318805(0x1ca))}:{},...readFavoriteFlag(_0x172f1a)!==undefined?{'favorite':readFavoriteFlag(_0x172f1a)}:{}});return{'ok':!![],'data':{'total':_0x22f2fd[_0x318805(0x1e7)],'items':_0x172f1a[_0x318805(0x209)]('verbose')?_0x22f2fd:_0x22f2fd[_0x318805(0x1c8)](summarizeArtifact)}};}},artifactDetail={'service':a11_0x2e603b(0x1e1),'command':a11_0x2e603b(0x1c2),'description':'Show\x20one\x20Artifact\x20by\x20id','risk':'read','flags':[{...ID_FLAG,'description':a11_0x2e603b(0x1d3)}],async 'execute'(_0xbda5b5){const _0x5bf613=a11_0x2e603b,_0x2acc08=await getRuntimeArtifact(_0xbda5b5[_0x5bf613(0x206)]('id'),_0xbda5b5['appCode']);return{'ok':!![],'data':detailArtifact(_0x2acc08)};}},artifactCreate={'service':a11_0x2e603b(0x1e1),'command':a11_0x2e603b(0x1d5),'description':a11_0x2e603b(0x1cf),'risk':a11_0x2e603b(0x1ed),'flags':[FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x262877){const _0x185739=a11_0x2e603b,_0x3f1ee3=buildArtifactInput(_0x262877),_0xd0fc19=await createRuntimeArtifact(_0x262877[_0x185739(0x205)],_0x3f1ee3);return{'ok':!![],'data':detailArtifact(_0xd0fc19),'message':_0x185739(0x1f3)+_0xd0fc19['id']+(_0xd0fc19[_0x185739(0x1dd)]?'\x20('+_0xd0fc19['name']+')':'')};},async 'dryRun'(_0x57beeb){const _0x29497b=a11_0x2e603b,_0x513376=buildArtifactInput(_0x57beeb);return dryRun(_0x29497b(0x1ce),_0x29497b(0x1c1))[_0x29497b(0x1df)]({'appCode':_0x57beeb[_0x29497b(0x205)],..._0x513376})['description'](_0x29497b(0x1fc))[_0x29497b(0x1cd)]();}},artifactUpdate={'service':a11_0x2e603b(0x1e1),'command':a11_0x2e603b(0x1eb),'description':'Update\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','risk':a11_0x2e603b(0x1ed),'flags':[{...ID_FLAG,'description':a11_0x2e603b(0x1d3)},FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x592870){const _0x3acd57=a11_0x2e603b,_0x4b82ec=_0x592870[_0x3acd57(0x206)]('id'),_0xedb078=buildArtifactInput(_0x592870),_0x504d91=await updateRuntimeArtifact(_0x4b82ec,_0x592870[_0x3acd57(0x205)],_0xedb078);return{'ok':!![],'data':detailArtifact(_0x504d91),'message':_0x3acd57(0x1cc)+_0x504d91['id']+(_0x504d91[_0x3acd57(0x1dd)]?'\x20('+_0x504d91['name']+')':'')};},async 'dryRun'(_0x50088f){const _0x32a09b=a11_0x2e603b,_0x62b89=_0x50088f[_0x32a09b(0x206)]('id'),_0xe9e10=buildArtifactInput(_0x50088f);return dryRun(_0x32a09b(0x1ce),'/client/artifact/'+_0x62b89+_0x32a09b(0x1c9))[_0x32a09b(0x1df)]({'appCode':_0x50088f[_0x32a09b(0x205)],..._0xe9e10})['description'](_0x32a09b(0x1dc)+_0x62b89)[_0x32a09b(0x1cd)]();}};export const artifactDefinitions=[artifactList,artifactDetail,artifactCreate,artifactUpdate];
1
+ const a11_0x14832a=a11_0x4071;(function(_0x1246f5,_0x799bdb){const _0x1be389=a11_0x4071,_0x4c1c0e=_0x1246f5();while(!![]){try{const _0x48bc20=parseInt(_0x1be389(0xf3))/0x1+-parseInt(_0x1be389(0xfc))/0x2*(parseInt(_0x1be389(0x110))/0x3)+-parseInt(_0x1be389(0xe2))/0x4+-parseInt(_0x1be389(0xe9))/0x5+parseInt(_0x1be389(0x121))/0x6*(-parseInt(_0x1be389(0xf8))/0x7)+parseInt(_0x1be389(0x11c))/0x8+-parseInt(_0x1be389(0xdf))/0x9*(-parseInt(_0x1be389(0xf4))/0xa);if(_0x48bc20===_0x799bdb)break;else _0x4c1c0e['push'](_0x4c1c0e['shift']());}catch(_0x41e373){_0x4c1c0e['push'](_0x4c1c0e['shift']());}}}(a11_0xd865,0x396a7));import{existsSync,readFileSync,statSync}from'node:fs';import{createRuntimeArtifact,getRuntimeArtifact,listRuntimeArtifacts,updateRuntimeArtifact}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const ARTIFACT_TYPE_REACT_MODULE='react_module',ARTIFACT_SOURCE_AGENT=a11_0x14832a(0xe5),ALLOWED_REACT_MODULE_IMPORTS=['react','react-dom',a11_0x14832a(0xf0),'dayjs',a11_0x14832a(0xff),a11_0x14832a(0xe1)];export const ALLOWED_REACT_MODULE_IMPORTS_TEXT=ALLOWED_REACT_MODULE_IMPORTS[a11_0x14832a(0xf5)](',\x20');const IMPORT_SOURCE_PATTERNS=[/\bimport\s+(?:type\s+)?(?:[^'";]*?\s+from\s+)?["']([^"']+)["']/g,/\bexport\s+(?:type\s+)?[^'";]*?\s+from\s+["']([^"']+)["']/g,/\bimport\s*\(\s*["']([^"']+)["']\s*\)/g,/\brequire\s*\(\s*["']([^"']+)["']\s*\)/g],PAGE_LEVEL_PATTERNS=[/<!doctype\s+html/i,/<\s*html\b/i,/\bcreateRoot\s*\(/,/\bReactDOM\s*\.\s*render\s*\(/,/\bReactDOM\s*\.\s*createRoot\s*\(/],FILE_FLAG={'name':'file','type':a11_0x14832a(0xea),'required':!![],'description':a11_0x14832a(0xef)},ARTIFACT_NAME_FLAG={'name':a11_0x14832a(0x115),'type':a11_0x14832a(0xea),'description':a11_0x14832a(0xe3)},METADATA_FLAG={'name':'metadata','type':'string','description':a11_0x14832a(0xdd)};function isPlainObject(_0x1a5661){const _0x5c9218=a11_0x14832a;return typeof _0x1a5661===_0x5c9218(0x10c)&&_0x1a5661!==null&&!Array[_0x5c9218(0xf9)](_0x1a5661);}function readSourceFile(_0x39eaf7){const _0x1207de=a11_0x14832a;if(!_0x39eaf7)throw CliErrors[_0x1207de(0x10b)](_0x1207de(0x119));if(!existsSync(_0x39eaf7))throw CliErrors[_0x1207de(0x10b)](_0x1207de(0x105)+_0x39eaf7);if(!statSync(_0x39eaf7)[_0x1207de(0xee)]())throw CliErrors['validation']('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x39eaf7);const _0x4702eb=readFileSync(_0x39eaf7,_0x1207de(0x107));return validateReactModuleSource(_0x4702eb),_0x4702eb;}function parseMetadata(_0x43d1f7){const _0x2924e1=a11_0x14832a;if(!_0x43d1f7)return undefined;let _0x6190a6;try{_0x6190a6=JSON['parse'](_0x43d1f7);}catch{throw CliErrors[_0x2924e1(0x10b)](_0x2924e1(0x11f)+_0x43d1f7);}if(!isPlainObject(_0x6190a6))throw CliErrors[_0x2924e1(0x10b)]('--metadata\x20must\x20be\x20a\x20JSON\x20object.');const _0x5b9289={..._0x6190a6};return delete _0x5b9289['compiledContent'],_0x5b9289;}function a11_0x4071(_0xd6e0d2,_0x5a5e76){_0xd6e0d2=_0xd6e0d2-0xdb;const _0xd86523=a11_0xd865();let _0x40712e=_0xd86523[_0xd6e0d2];return _0x40712e;}function getPackageName(_0x7e529){const _0x1a3409=a11_0x14832a;if(_0x7e529[_0x1a3409(0xec)]('@')){const [_0x5d4df9,_0x5d1cfd]=_0x7e529[_0x1a3409(0x117)]('/');return _0x5d4df9&&_0x5d1cfd?_0x5d4df9+'/'+_0x5d1cfd:_0x7e529;}return _0x7e529['split']('/')[0x0]||_0x7e529;}function validateAllowedImports(_0x1c1608){const _0x46d87b=a11_0x14832a,_0x29a0de=new Set();for(const _0x1b309d of IMPORT_SOURCE_PATTERNS){_0x1b309d[_0x46d87b(0xe0)]=0x0;let _0x5543f6;while((_0x5543f6=_0x1b309d[_0x46d87b(0x11b)](_0x1c1608))!==null){const _0x4cfe06=_0x5543f6[0x1]?.['trim']();_0x4cfe06&&_0x29a0de['add'](_0x4cfe06);}}const _0x386af0=[..._0x29a0de][_0x46d87b(0x113)](getPackageName)[_0x46d87b(0xdb)](_0x4b33d7=>!ALLOWED_REACT_MODULE_IMPORTS[_0x46d87b(0x116)](_0x4b33d7));if(_0x386af0[_0x46d87b(0x11a)]>0x0)throw CliErrors[_0x46d87b(0x10b)]('react_module\x20imports\x20are\x20limited\x20to:\x20'+ALLOWED_REACT_MODULE_IMPORTS_TEXT+'.\x20Unsupported:\x20'+[...new Set(_0x386af0)][_0x46d87b(0xf5)](',\x20'));}export function validateReactModuleSource(_0x1654a1){const _0x4e48b2=a11_0x14832a;if(!_0x1654a1['trim']())throw CliErrors[_0x4e48b2(0x10b)](_0x4e48b2(0x123));if(PAGE_LEVEL_PATTERNS[_0x4e48b2(0xe7)](_0x57c72b=>_0x57c72b[_0x4e48b2(0x122)](_0x1654a1)))throw CliErrors[_0x4e48b2(0x10b)]('react_module\x20must\x20be\x20an\x20embeddable\x20React\x20module,\x20not\x20full\x20HTML\x20or\x20a\x20ReactDOM/createRoot\x20mount\x20entry.');validateAllowedImports(_0x1654a1);}function buildArtifactInput(_0x1b0627){const _0x146189=a11_0x14832a,_0x5ead92=readSourceFile(_0x1b0627[_0x146189(0xf7)]('file')),_0x120c9b=_0x1b0627[_0x146189(0xf7)]('name')[_0x146189(0x118)](),_0x556a4e=parseMetadata(_0x1b0627[_0x146189(0xf7)](_0x146189(0xe8)));return{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x120c9b?{'name':_0x120c9b}:{},'content':_0x5ead92,..._0x556a4e?{'metadata':_0x556a4e}:{},'source':ARTIFACT_SOURCE_AGENT};}function summarizeArtifact(_0x5cc23e){const _0x5195f9=a11_0x14832a;return{'id':_0x5cc23e['id'],'name':_0x5cc23e[_0x5195f9(0x115)],'artifactType':_0x5cc23e[_0x5195f9(0x114)],'source':_0x5cc23e['source'],'favorite':_0x5cc23e[_0x5195f9(0x125)],'deleted':_0x5cc23e['deleted'],'createTime':_0x5cc23e[_0x5195f9(0xe4)],'updateTime':_0x5cc23e[_0x5195f9(0x111)]};}function detailArtifact(_0x2a32fc){const _0x183007=a11_0x14832a;return{'id':_0x2a32fc['id'],'appCode':_0x2a32fc[_0x183007(0x103)],'name':_0x2a32fc[_0x183007(0x115)],'artifactType':_0x2a32fc[_0x183007(0x114)],'source':_0x2a32fc[_0x183007(0xed)],'favorite':_0x2a32fc[_0x183007(0x125)],'deleted':_0x2a32fc['deleted'],'content':_0x2a32fc['content']??'','compiledContent':_0x2a32fc[_0x183007(0x10e)],'metadata':_0x2a32fc[_0x183007(0xe8)]??{},'createTime':_0x2a32fc[_0x183007(0xe4)],'updateTime':_0x2a32fc['updateTime']};}function readFavoriteFlag(_0x111437){const _0x3faf4d=a11_0x14832a,_0x200bcd=_0x111437[_0x3faf4d(0x11e)](_0x3faf4d(0x125));return _0x200bcd===undefined||_0x200bcd===null||_0x200bcd===''?undefined:_0x111437[_0x3faf4d(0xf6)](_0x3faf4d(0x125));}const artifactList={'service':a11_0x14832a(0xf2),'command':a11_0x14832a(0x102),'description':a11_0x14832a(0xdc),'risk':a11_0x14832a(0x10a),'flags':[{'name':'source','type':a11_0x14832a(0xea),'description':a11_0x14832a(0xe6)},{'name':a11_0x14832a(0x125),'type':'boolean','description':a11_0x14832a(0x106)},VERBOSE_FLAG],async 'execute'(_0x1b4ff0){const _0x59eb65=a11_0x14832a,_0x15ba6d=await listRuntimeArtifacts(_0x1b4ff0[_0x59eb65(0x103)],{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x1b4ff0[_0x59eb65(0xf7)](_0x59eb65(0xed))?{'source':_0x1b4ff0['str'](_0x59eb65(0xed))}:{},...readFavoriteFlag(_0x1b4ff0)!==undefined?{'favorite':readFavoriteFlag(_0x1b4ff0)}:{}});return{'ok':!![],'data':{'total':_0x15ba6d[_0x59eb65(0x11a)],'items':_0x1b4ff0[_0x59eb65(0xf6)](_0x59eb65(0xfb))?_0x15ba6d:_0x15ba6d[_0x59eb65(0x113)](summarizeArtifact)}};}},artifactDetail={'service':a11_0x14832a(0xf2),'command':a11_0x14832a(0xeb),'description':a11_0x14832a(0x124),'risk':'read','flags':[{...ID_FLAG,'description':a11_0x14832a(0x11d)}],async 'execute'(_0x23a148){const _0x1ce4c2=a11_0x14832a,_0xf346cc=await getRuntimeArtifact(_0x23a148['num']('id'),_0x23a148[_0x1ce4c2(0x103)]);return{'ok':!![],'data':detailArtifact(_0xf346cc)};}},artifactCreate={'service':a11_0x14832a(0xf2),'command':a11_0x14832a(0xfe),'description':a11_0x14832a(0xfd),'risk':a11_0x14832a(0x10a),'flags':[FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0xea784b){const _0x5b0d81=a11_0x14832a,_0x5c5035=buildArtifactInput(_0xea784b),_0x5aa614=await createRuntimeArtifact(_0xea784b[_0x5b0d81(0x103)],_0x5c5035);return{'ok':!![],'data':detailArtifact(_0x5aa614),'message':'Created\x20Artifact\x20'+_0x5aa614['id']+(_0x5aa614[_0x5b0d81(0x115)]?'\x20('+_0x5aa614['name']+')':'')};},async 'dryRun'(_0x20f7f9){const _0x2d6108=a11_0x14832a,_0x1abbf9=buildArtifactInput(_0x20f7f9);return dryRun('POST',_0x2d6108(0x108))[_0x2d6108(0x112)]({'appCode':_0x20f7f9[_0x2d6108(0x103)],..._0x1abbf9})['description'](_0x2d6108(0x100))['build']();}},artifactUpdate={'service':a11_0x14832a(0xf2),'command':a11_0x14832a(0x104),'description':a11_0x14832a(0x101),'risk':'read','flags':[{...ID_FLAG,'description':a11_0x14832a(0x11d)},FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x4b1ae4){const _0x4e75d7=a11_0x14832a,_0x58d17c=_0x4b1ae4[_0x4e75d7(0x10f)]('id'),_0x224e35=buildArtifactInput(_0x4b1ae4),_0x4e2fe6=await updateRuntimeArtifact(_0x58d17c,_0x4b1ae4[_0x4e75d7(0x103)],_0x224e35);return{'ok':!![],'data':detailArtifact(_0x4e2fe6),'message':_0x4e75d7(0x120)+_0x4e2fe6['id']+(_0x4e2fe6['name']?'\x20('+_0x4e2fe6['name']+')':'')};},async 'dryRun'(_0x5ecf78){const _0x155243=a11_0x14832a,_0x471a9c=_0x5ecf78[_0x155243(0x10f)]('id'),_0x105efa=buildArtifactInput(_0x5ecf78);return dryRun(_0x155243(0x10d),_0x155243(0x109)+_0x471a9c+_0x155243(0xde))['body']({'appCode':_0x5ecf78[_0x155243(0x103)],..._0x105efa})[_0x155243(0xf1)](_0x155243(0xfa)+_0x471a9c)['build']();}};function a11_0xd865(){const _0x14fbd0=['updateTime','body','map','artifactType','name','includes','split','trim','File\x20path\x20is\x20required.','length','exec','486312lpRWye','Artifact\x20ID','flag','Invalid\x20JSON\x20for\x20--metadata:\x20','Updated\x20Artifact\x20','59172EPzEEp','test','Artifact\x20source\x20file\x20is\x20blank.','Show\x20one\x20Artifact\x20by\x20id','favorite','filter','List\x20current-app\x20react_module\x20Artifacts','Artifact\x20metadata\x20as\x20JSON\x20object;\x20compiledContent\x20is\x20stripped','/update','1871523PQlysG','lastIndex','@ant-design/icons','801772YzdvhV','Artifact\x20display\x20name','createTime','AGENT','Optional\x20source\x20filter,\x20for\x20example\x20AGENT','some','metadata','900655lXvxik','string','detail','startsWith','source','isFile','Path\x20to\x20a\x20local\x20UTF-8\x20React\x20module\x20source\x20file','lodash','description','artifact','455900yAGibH','30naNItp','join','bool','str','140tvggWW','isArray','Preview:\x20update\x20react_module\x20Artifact\x20','verbose','34478uJctUC','Create\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','create','antd','Preview:\x20create\x20react_module\x20Artifact','Update\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','list','appCode','update','File\x20not\x20found:\x20','Optional\x20favorite-state\x20filter','utf8','/client/artifact/create','/client/artifact/','read','validation','object','POST','compiledContent','num','57bKHueh'];a11_0xd865=function(){return _0x14fbd0;};return a11_0xd865();}export const artifactDefinitions=[artifactList,artifactDetail,artifactCreate,artifactUpdate];
@@ -1 +1 @@
1
- const a12_0x34c27a=a12_0x5b75;(function(_0x5dba78,_0x2f2dbc){const _0x10d2c8=a12_0x5b75,_0x1ee5b4=_0x5dba78();while(!![]){try{const _0x322271=parseInt(_0x10d2c8(0x22a))/0x1*(-parseInt(_0x10d2c8(0x21f))/0x2)+-parseInt(_0x10d2c8(0x228))/0x3+parseInt(_0x10d2c8(0x1ff))/0x4+parseInt(_0x10d2c8(0x20e))/0x5+-parseInt(_0x10d2c8(0x204))/0x6+-parseInt(_0x10d2c8(0x208))/0x7+parseInt(_0x10d2c8(0x231))/0x8*(parseInt(_0x10d2c8(0x1ef))/0x9);if(_0x322271===_0x2f2dbc)break;else _0x1ee5b4['push'](_0x1ee5b4['shift']());}catch(_0xff4ea1){_0x1ee5b4['push'](_0x1ee5b4['shift']());}}}(a12_0x5608,0x44b96));import{existsSync,mkdirSync,readFileSync,unlinkSync,writeFileSync}from'node:fs';import{dirname}from'node:path';import{homedir}from'node:os';import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a12_0x5b75(_0x777221,_0x4f6483){_0x777221=_0x777221-0x1ee;const _0x560861=a12_0x5608();let _0x5b755a=_0x560861[_0x777221];return _0x5b755a;}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 a12_0x5608(){const _0x11c827=['Device\x20auth\x20API\x20unreachable\x20after\x20multiple\x20retries.','2131VSdjMa','networkError','auth','url-only','Invalid\x20device\x20auth\x20response','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.','Device\x20auth\x20API\x20returned\x20HTTP\x20','1887912pfFxCW','Waiting\x20for\x20authorization\x20(timeout:\x2010\x20minutes,\x20Ctrl+C\x20to\x20cancel)...','bool','application/json','scope','success','string','nonInteractive','/.device-auth','18JrVipX','global-default','removeListener','accessKey','SIGINT','floor','/api/device-auth/token','code','Already\x20authorized.\x20Use\x20`lovrabet\x20auth\x20status`\x20to\x20verify.','POST','Device\x20authorization\x20URL\x20printed.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20re-run.','\x20remaining','Invalid\x20access_key\x20returned\x20by\x20server.','AbortError','source','stringify','1645296vbaqPm','now','signal','access_key','Device\x20authorization\x20successful.','1092360LtqSIt','object','apiError','data','1629201jJWWfs','App\x20name\x20shown\x20on\x20authorization\x20page\x20(default:\x20lovrabet)','name','\x20config.','After\x20authorizing,\x20re-run:\x20','Device\x20authorization\x20cancelled.','2204090INfiwL','str','stderr','cancelled','boolean','\x20auth\x20status','\x0dWaiting\x20for\x20authorization...\x20','expired','once','Write\x20to\x20project\x20config','validation','status','Device\x20auth\x20API\x20error\x20(','aborted','homeDirName','global','project','334ltlYLq','&source=','getTime','Authorize\x20with\x20the\x20device-code\x20flow\x20(complete\x20in\x20the\x20browser;\x20no\x20copy-paste\x20required)','/device-auth?code=','lovrabet-cli','),\x20retrying...','createdAt','padStart','815838TpDEBH'];a12_0x5608=function(){return _0x11c827;};return a12_0x5608();}function resolveAuthScopeFlags(_0x56ab19){const _0x3158ff=a12_0x5b75;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x56ab19[_0x3158ff(0x233)](_0x3158ff(0x21d)),'explicitProject':_0x56ab19[_0x3158ff(0x233)](_0x3158ff(0x21e)),'policy':_0x3158ff(0x1f0)}));}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(){return crypto['randomUUID']();}export function buildDeviceAuthUrl(_0x342554,_0x4edcaf,_0x177389=a12_0x34c27a(0x224)){const _0x5cac31=a12_0x34c27a;return _0x342554+_0x5cac31(0x223)+encodeURIComponent(_0x4edcaf)+_0x5cac31(0x220)+encodeURIComponent(_0x177389);}export function getDeviceCodePath(){const _0x10a761=a12_0x34c27a;return homedir()+'/'+PRODUCT_CONFIG[_0x10a761(0x21c)]+_0x10a761(0x1ee);}export function readStoredDeviceCode(){const _0x4b02b0=a12_0x34c27a,_0x4f4eb=getDeviceCodePath();if(!existsSync(_0x4f4eb))return null;try{const _0x417f85=readFileSync(_0x4f4eb,{'encoding':'utf8'}),_0x18e19b=JSON['parse'](_0x417f85);if(_0x18e19b&&typeof _0x18e19b[_0x4b02b0(0x1f6)]===_0x4b02b0(0x237)&&typeof _0x18e19b[_0x4b02b0(0x226)]===_0x4b02b0(0x237)&&(_0x18e19b['scope']===_0x4b02b0(0x21d)||_0x18e19b[_0x4b02b0(0x235)]===_0x4b02b0(0x21e)))return _0x18e19b;}catch{}return null;}export function writeStoredDeviceCode(_0x131cb2,_0x1a3a0e){const _0x395c0d=a12_0x34c27a,_0x4f858b=getDeviceCodePath(),_0x1e407c=dirname(_0x4f858b);!existsSync(_0x1e407c)&&mkdirSync(_0x1e407c,{'recursive':!![]});const _0xcda9e8={'code':_0x131cb2,'createdAt':new Date()['toISOString'](),'scope':_0x1a3a0e};writeFileSync(_0x4f858b,JSON[_0x395c0d(0x1fe)](_0xcda9e8),{'encoding':'utf8','mode':0x180});}export function deleteStoredDeviceCode(){const _0x179fc3=getDeviceCodePath();try{unlinkSync(_0x179fc3);}catch{}}export function isStoredDeviceCodeExpired(_0xea4560){const _0x555a99=a12_0x34c27a;return Date[_0x555a99(0x200)]()-new Date(_0xea4560[_0x555a99(0x226)])[_0x555a99(0x221)]()>DEVICE_CODE_TTL_MS;}export async function fetchDeviceToken(_0x56e2e1,_0x10be70){const _0x3a4daf=a12_0x34c27a,_0xed83fc=_0x56e2e1+_0x3a4daf(0x1f5),_0xd48e1d=new AbortController(),_0x497bef=setTimeout(()=>_0xd48e1d['abort'](),0x2710),_0x172795=await fetch(_0xed83fc,{'method':_0x3a4daf(0x1f8),'headers':{'Content-Type':_0x3a4daf(0x234)},'body':JSON['stringify']({'code':_0x10be70}),'signal':_0xd48e1d[_0x3a4daf(0x201)]});clearTimeout(_0x497bef);if(!_0x172795['ok'])throw CliErrors['networkError'](_0x3a4daf(0x230)+_0x172795['status']);const _0xf8930e=await _0x172795['json'](),_0x2d923e=_0xf8930e[_0x3a4daf(0x207)]&&typeof _0xf8930e[_0x3a4daf(0x207)]===_0x3a4daf(0x205)?_0xf8930e['data']:_0xf8930e;if(!_0x2d923e||typeof _0x2d923e[_0x3a4daf(0x219)]!==_0x3a4daf(0x237))throw CliErrors[_0x3a4daf(0x206)](_0x3a4daf(0x22e));return{'status':_0x2d923e[_0x3a4daf(0x219)],'access_key':typeof _0x2d923e['access_key']===_0x3a4daf(0x237)?_0x2d923e[_0x3a4daf(0x202)]:undefined};}export async function pollDeviceToken(_0xa3cc12,_0x265f26,_0x13eb0c){const _0x2ed68f=a12_0x34c27a;let _0x5260d3=0x0;for(let _0x4e665c=0x0;_0x4e665c<MAX_POLLS;_0x4e665c++){if(_0x13eb0c[_0x2ed68f(0x21b)])throw CliErrors[_0x2ed68f(0x211)]('Device\x20authorization\x20cancelled.');let _0x2df0af;try{_0x2df0af=await fetchDeviceToken(_0xa3cc12,_0x265f26);}catch(_0x3d80f1){if(_0x3d80f1 instanceof Error&&_0x3d80f1[_0x2ed68f(0x20a)]===_0x2ed68f(0x1fc))throw CliErrors[_0x2ed68f(0x211)](_0x2ed68f(0x20d));_0x5260d3++;if(_0x5260d3>=MAX_CONSECUTIVE_NETWORK_ERRORS)throw CliErrors[_0x2ed68f(0x22b)](_0x2ed68f(0x229));writeCliSideChannelLine(_0x2ed68f(0x21a)+_0x5260d3+'/'+MAX_CONSECUTIVE_NETWORK_ERRORS+_0x2ed68f(0x225)),await sleep(POLL_INTERVAL_MS);continue;}_0x5260d3=0x0;if(_0x2df0af[_0x2ed68f(0x219)]===_0x2ed68f(0x236)){if(!_0x2df0af['access_key'])throw CliErrors[_0x2ed68f(0x206)]('Invalid\x20access_key\x20returned\x20by\x20server.');return _0x2df0af[_0x2ed68f(0x202)];}if(_0x2df0af['status']===_0x2ed68f(0x215)){deleteStoredDeviceCode();throw CliErrors[_0x2ed68f(0x218)]('Device\x20code\x20expired.\x20Run\x20`lovrabet\x20auth\x20device`\x20to\x20get\x20a\x20new\x20code.');}const _0x350087=(_0x4e665c+0x1)*POLL_INTERVAL_MS,_0x454fdc=DEVICE_CODE_TTL_MS-_0x350087,_0x572f68=Math['floor'](_0x454fdc/0xea60),_0x2d541b=Math[_0x2ed68f(0x1f4)](_0x454fdc%0xea60/0x3e8);process[_0x2ed68f(0x210)]['write'](_0x2ed68f(0x214)+_0x572f68+':'+String(_0x2d541b)[_0x2ed68f(0x227)](0x2,'0')+_0x2ed68f(0x1fa)),await sleep(POLL_INTERVAL_MS);}deleteStoredDeviceCode();throw CliErrors[_0x2ed68f(0x218)]('Device\x20authorization\x20timed\x20out\x20after\x2010\x20minutes.\x20Run\x20`lovrabet\x20auth\x20device`\x20to\x20get\x20a\x20new\x20code.');}function sleep(_0x277468){return new Promise(_0x426e1f=>setTimeout(_0x426e1f,_0x277468));}export const authDeviceDefinition={'service':a12_0x34c27a(0x22c),'command':'device','description':a12_0x34c27a(0x222),'risk':'write','confirmationDescription':a12_0x34c27a(0x22f),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'global','type':a12_0x34c27a(0x212),'description':'Write\x20to\x20global\x20config\x20(default)','default':!![]},{'name':a12_0x34c27a(0x21e),'type':a12_0x34c27a(0x212),'description':a12_0x34c27a(0x217),'default':![]},{'name':a12_0x34c27a(0x1fd),'type':a12_0x34c27a(0x237),'description':a12_0x34c27a(0x209),'default':a12_0x34c27a(0x224)},{'name':a12_0x34c27a(0x22d),'type':a12_0x34c27a(0x212),'description':'Print\x20URL\x20to\x20stdout\x20and\x20exit\x20(for\x20WorkBuddy\x20integration)','default':![]}],async 'execute'(_0x2cd815){const _0x4c8bbe=a12_0x34c27a,_0x58b640=resolveAuthScopeFlags(_0x2cd815),_0x3ece3c=_0x58b640[_0x4c8bbe(0x21d)]?_0x4c8bbe(0x21d):'project',_0x2cc7ca=readScopedConfig(_0x58b640);if(_0x2cc7ca[_0x4c8bbe(0x1f2)])return{'ok':!![],'message':_0x4c8bbe(0x1f7)};const _0x50d3ec=(_0x2cd815[_0x4c8bbe(0x20f)](_0x4c8bbe(0x1fd))||_0x4c8bbe(0x224))['trim'](),_0x119566=getUserDomain(),_0x1f81a0=readStoredDeviceCode(),_0x51e59c=_0x1f81a0&&!isStoredDeviceCodeExpired(_0x1f81a0)?_0x1f81a0[_0x4c8bbe(0x1f6)]:((()=>{const _0x490845=generateDeviceCode();return writeStoredDeviceCode(_0x490845,_0x3ece3c),_0x490845;})()),_0x20a8d6=buildDeviceAuthUrl(_0x119566,_0x51e59c,_0x50d3ec);if(_0x2cd815[_0x4c8bbe(0x233)](_0x4c8bbe(0x22d)))return console['log'](_0x20a8d6),{'ok':!![]};writeCliSideChannelLine('Open\x20this\x20URL\x20in\x20your\x20browser\x20to\x20authorize:'),writeCliSideChannelLine(''),writeCliSideChannelLine(_0x20a8d6),writeCliSideChannelLine(''),writeCliSideChannelLine('The\x20device\x20code\x20is\x20valid\x20for\x2010\x20minutes.');if(_0x2cd815[_0x4c8bbe(0x238)])return writeCliSideChannelLine(_0x4c8bbe(0x20c)+CLI_BIN_NAME+'\x20auth\x20device'),{'ok':!![],'message':_0x4c8bbe(0x1f9)};writeCliSideChannelLine(_0x4c8bbe(0x232));const _0x287458=new AbortController(),_0x41cb30=()=>{const _0xb2e7f0=_0x4c8bbe;_0x287458['abort'](),process[_0xb2e7f0(0x1f1)](_0xb2e7f0(0x1f3),_0x41cb30);};process[_0x4c8bbe(0x216)]('SIGINT',_0x41cb30);let _0x3d6f96;try{_0x3d6f96=await pollDeviceToken(_0x119566,_0x51e59c,_0x287458[_0x4c8bbe(0x201)]);}finally{process[_0x4c8bbe(0x1f1)]('SIGINT',_0x41cb30);}if(!ACCESS_KEY_PATTERN['test'](_0x3d6f96))throw CliErrors[_0x4c8bbe(0x206)](_0x4c8bbe(0x1fb));const _0x2f4e88=readScopedConfig(_0x58b640);return _0x2f4e88[_0x4c8bbe(0x1f2)]=_0x3d6f96,writeScopedConfig(_0x2f4e88,_0x58b640),deleteStoredDeviceCode(),process[_0x4c8bbe(0x210)]['write']('\x0a'),writeCliSideChannelLine('AccessKey\x20saved\x20to\x20'+_0x3ece3c+_0x4c8bbe(0x20b)),writeCliSideChannelLine('Verify:\x20'+CLI_BIN_NAME+_0x4c8bbe(0x213)),{'ok':!![],'message':_0x4c8bbe(0x203)};}};
1
+ const a12_0x4cc0a1=a12_0x7367;(function(_0x4c0522,_0x2fbcaf){const _0x154cfb=a12_0x7367,_0x3686ea=_0x4c0522();while(!![]){try{const _0x1d87f9=parseInt(_0x154cfb(0x1e2))/0x1+parseInt(_0x154cfb(0x1ed))/0x2+-parseInt(_0x154cfb(0x1b8))/0x3*(parseInt(_0x154cfb(0x1f5))/0x4)+parseInt(_0x154cfb(0x1ee))/0x5+parseInt(_0x154cfb(0x1e8))/0x6+-parseInt(_0x154cfb(0x1ba))/0x7+-parseInt(_0x154cfb(0x1f3))/0x8;if(_0x1d87f9===_0x2fbcaf)break;else _0x3686ea['push'](_0x3686ea['shift']());}catch(_0x18546e){_0x3686ea['push'](_0x3686ea['shift']());}}}(a12_0x4f82,0x5e201));import{existsSync,mkdirSync,readFileSync,unlinkSync,writeFileSync}from'node:fs';import{dirname}from'node:path';import{homedir}from'node:os';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(_0x3d7e84){const _0x35bb76=a12_0x7367;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x3d7e84[_0x35bb76(0x1d1)](_0x35bb76(0x1cc)),'explicitProject':_0x3d7e84[_0x35bb76(0x1d1)](_0x35bb76(0x1b7)),'policy':_0x35bb76(0x1c4)}));}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(){return crypto['randomUUID']();}export function buildDeviceAuthUrl(_0xdad59b,_0x16575e,_0x2e55dc=a12_0x4cc0a1(0x1fe)){const _0x593fb9=a12_0x4cc0a1;return _0xdad59b+_0x593fb9(0x1f9)+encodeURIComponent(_0x16575e)+_0x593fb9(0x1fd)+encodeURIComponent(_0x2e55dc);}export function getDeviceCodePath(){const _0x3445d9=a12_0x4cc0a1;return homedir()+'/'+PRODUCT_CONFIG[_0x3445d9(0x1f8)]+'/.device-auth';}function a12_0x7367(_0xf8055,_0x327f8f){_0xf8055=_0xf8055-0x1b2;const _0x4f8221=a12_0x4f82();let _0x736724=_0x4f8221[_0xf8055];return _0x736724;}export function readStoredDeviceCode(){const _0x502571=a12_0x4cc0a1,_0x326a3b=getDeviceCodePath();if(!existsSync(_0x326a3b))return null;try{const _0x2131cb=readFileSync(_0x326a3b,{'encoding':'utf8'}),_0x3187b7=JSON[_0x502571(0x1dc)](_0x2131cb);if(_0x3187b7&&typeof _0x3187b7[_0x502571(0x1db)]==='string'&&typeof _0x3187b7[_0x502571(0x1be)]===_0x502571(0x1c2)&&(_0x3187b7[_0x502571(0x1c3)]===_0x502571(0x1cc)||_0x3187b7[_0x502571(0x1c3)]==='project'))return _0x3187b7;}catch{}return null;}export function writeStoredDeviceCode(_0x26d310,_0x3dd9e7){const _0xd6c668=a12_0x4cc0a1,_0x265b34=getDeviceCodePath(),_0x40c857=dirname(_0x265b34);!existsSync(_0x40c857)&&mkdirSync(_0x40c857,{'recursive':!![]});const _0x423c98={'code':_0x26d310,'createdAt':new Date()[_0xd6c668(0x1cb)](),'scope':_0x3dd9e7};writeFileSync(_0x265b34,JSON[_0xd6c668(0x1e3)](_0x423c98),{'encoding':_0xd6c668(0x1c6),'mode':0x180});}export function deleteStoredDeviceCode(){const _0x52fac3=getDeviceCodePath();try{unlinkSync(_0x52fac3);}catch{}}export function isStoredDeviceCodeExpired(_0x3c7640){const _0x4f98fc=a12_0x4cc0a1;return Date['now']()-new Date(_0x3c7640[_0x4f98fc(0x1be)])[_0x4f98fc(0x1d5)]()>DEVICE_CODE_TTL_MS;}export async function fetchDeviceToken(_0x529fb3,_0x2f6f07){const _0x377918=a12_0x4cc0a1,_0x27a0ad=_0x529fb3+_0x377918(0x1e1),_0x16b633=new AbortController(),_0x32105a=setTimeout(()=>_0x16b633['abort'](),0x2710),_0x46218d=await fetch(_0x27a0ad,{'method':_0x377918(0x1fa),'headers':{'Content-Type':'application/json'},'body':JSON['stringify']({'code':_0x2f6f07}),'signal':_0x16b633['signal']});clearTimeout(_0x32105a);if(!_0x46218d['ok'])throw CliErrors[_0x377918(0x1e7)](_0x377918(0x1bc)+_0x46218d[_0x377918(0x1cf)]);const _0x3cb2e8=await _0x46218d[_0x377918(0x1ca)](),_0x50fd2c=_0x3cb2e8[_0x377918(0x1c0)]&&typeof _0x3cb2e8['data']===_0x377918(0x1d0)?_0x3cb2e8['data']:_0x3cb2e8;if(!_0x50fd2c||typeof _0x50fd2c[_0x377918(0x1cf)]!==_0x377918(0x1c2))throw CliErrors['apiError']('Invalid\x20device\x20auth\x20response');return{'status':_0x50fd2c[_0x377918(0x1cf)],'access_key':typeof _0x50fd2c['access_key']==='string'?_0x50fd2c[_0x377918(0x1ec)]:undefined};}export async function pollDeviceToken(_0x4ee930,_0x29bbcc,_0x3ae61){const _0x219d1=a12_0x4cc0a1;let _0x4648d0=0x0;for(let _0x3079ca=0x0;_0x3079ca<MAX_POLLS;_0x3079ca++){if(_0x3ae61['aborted'])throw CliErrors['cancelled'](_0x219d1(0x1bf));let _0x3ccc0b;try{_0x3ccc0b=await fetchDeviceToken(_0x4ee930,_0x29bbcc);}catch(_0x537a11){if(_0x537a11 instanceof Error&&_0x537a11[_0x219d1(0x1b2)]===_0x219d1(0x1d9))throw CliErrors['cancelled']('Device\x20authorization\x20cancelled.');_0x4648d0++;if(_0x4648d0>=MAX_CONSECUTIVE_NETWORK_ERRORS)throw CliErrors[_0x219d1(0x1e7)]('Device\x20auth\x20API\x20unreachable\x20after\x20multiple\x20retries.');writeCliSideChannelLine(_0x219d1(0x1ff)+_0x4648d0+'/'+MAX_CONSECUTIVE_NETWORK_ERRORS+_0x219d1(0x1f0)),await sleep(POLL_INTERVAL_MS);continue;}_0x4648d0=0x0;if(_0x3ccc0b['status']===_0x219d1(0x1bb)){if(!_0x3ccc0b[_0x219d1(0x1ec)])throw CliErrors[_0x219d1(0x1bd)](_0x219d1(0x1f2));return _0x3ccc0b['access_key'];}if(_0x3ccc0b[_0x219d1(0x1cf)]===_0x219d1(0x1e0)){deleteStoredDeviceCode();throw CliErrors['validation'](_0x219d1(0x1fb));}const _0x12a52d=(_0x3079ca+0x1)*POLL_INTERVAL_MS,_0x5d458f=DEVICE_CODE_TTL_MS-_0x12a52d,_0x41e5f1=Math[_0x219d1(0x1da)](_0x5d458f/0xea60),_0xa8c4c8=Math[_0x219d1(0x1da)](_0x5d458f%0xea60/0x3e8);process[_0x219d1(0x1f1)][_0x219d1(0x1e4)](_0x219d1(0x1f7)+_0x41e5f1+':'+String(_0xa8c4c8)[_0x219d1(0x1f6)](0x2,'0')+'\x20remaining'),await sleep(POLL_INTERVAL_MS);}deleteStoredDeviceCode();throw CliErrors[_0x219d1(0x1b5)](_0x219d1(0x1d3));}function a12_0x4f82(){const _0x349c7d=['),\x20retrying...','stderr','Invalid\x20access_key\x20returned\x20by\x20server.','1927712iXWYgD','signal','4lOrILG','padStart','\x0dWaiting\x20for\x20authorization...\x20','homeDirName','/device-auth?code=','POST','Device\x20code\x20expired.\x20Run\x20`lovrabet\x20auth\x20device`\x20to\x20get\x20a\x20new\x20code.','once','&source=','lovrabet-cli','Device\x20auth\x20API\x20error\x20(','App\x20name\x20shown\x20on\x20authorization\x20page\x20(default:\x20lovrabet)','AccessKey\x20saved\x20to\x20','name','Open\x20this\x20URL\x20in\x20your\x20browser\x20to\x20authorize:','str','validation','auth','project','326283bEKUiR','abort','837956OTTwzx','success','Device\x20auth\x20API\x20returned\x20HTTP\x20','apiError','createdAt','Device\x20authorization\x20cancelled.','data','log','string','scope','global-default','test','utf8','Already\x20authorized.\x20Use\x20`lovrabet\x20auth\x20status`\x20to\x20verify.','removeListener','\x20config.','json','toISOString','global','Print\x20URL\x20to\x20stdout\x20and\x20exit\x20(for\x20WorkBuddy\x20integration)','accessKey','status','object','bool','SIGINT','Device\x20authorization\x20timed\x20out\x20after\x2010\x20minutes.\x20Run\x20`lovrabet\x20auth\x20device`\x20to\x20get\x20a\x20new\x20code.','After\x20authorizing,\x20re-run:\x20','getTime','Verify:\x20','url-only','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.','AbortError','floor','code','parse','Device\x20authorization\x20URL\x20printed.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20re-run.','device','Device\x20authorization\x20successful.','expired','/api/device-auth/token','87589xiXHUd','stringify','write','boolean','nonInteractive','networkError','631530KlJsoE','The\x20device\x20code\x20is\x20valid\x20for\x2010\x20minutes.','trim','source','access_key','1007552NJgqzo','791750lfJLfV','Write\x20to\x20project\x20config'];a12_0x4f82=function(){return _0x349c7d;};return a12_0x4f82();}function sleep(_0x3f8cc2){return new Promise(_0x2a411e=>setTimeout(_0x2a411e,_0x3f8cc2));}export const authDeviceDefinition={'service':a12_0x4cc0a1(0x1b6),'command':a12_0x4cc0a1(0x1de),'description':'Authorize\x20with\x20the\x20device-code\x20flow\x20(complete\x20in\x20the\x20browser;\x20no\x20copy-paste\x20required)','risk':'write','confirmationDescription':a12_0x4cc0a1(0x1d8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x4cc0a1(0x1cc),'type':'boolean','description':'Write\x20to\x20global\x20config\x20(default)','default':!![]},{'name':a12_0x4cc0a1(0x1b7),'type':'boolean','description':a12_0x4cc0a1(0x1ef),'default':![]},{'name':a12_0x4cc0a1(0x1eb),'type':a12_0x4cc0a1(0x1c2),'description':a12_0x4cc0a1(0x200),'default':'lovrabet-cli'},{'name':a12_0x4cc0a1(0x1d7),'type':a12_0x4cc0a1(0x1e5),'description':a12_0x4cc0a1(0x1cd),'default':![]}],async 'execute'(_0xb9bfae){const _0x3da012=a12_0x4cc0a1,_0x143c85=resolveAuthScopeFlags(_0xb9bfae),_0xbe34d0=_0x143c85['global']?'global':_0x3da012(0x1b7),_0x13bf16=readScopedConfig(_0x143c85);if(_0x13bf16[_0x3da012(0x1ce)])return{'ok':!![],'message':_0x3da012(0x1c7)};const _0x7fa6d1=(_0xb9bfae[_0x3da012(0x1b4)]('source')||_0x3da012(0x1fe))[_0x3da012(0x1ea)](),_0x298d95=getUserDomain(),_0x1bf32b=readStoredDeviceCode(),_0x39b40b=_0x1bf32b&&!isStoredDeviceCodeExpired(_0x1bf32b)?_0x1bf32b[_0x3da012(0x1db)]:((()=>{const _0x5442ba=generateDeviceCode();return writeStoredDeviceCode(_0x5442ba,_0xbe34d0),_0x5442ba;})()),_0x123e07=buildDeviceAuthUrl(_0x298d95,_0x39b40b,_0x7fa6d1);if(_0xb9bfae['bool']('url-only'))return console[_0x3da012(0x1c1)](_0x123e07),{'ok':!![]};writeCliSideChannelLine(_0x3da012(0x1b3)),writeCliSideChannelLine(''),writeCliSideChannelLine(_0x123e07),writeCliSideChannelLine(''),writeCliSideChannelLine(_0x3da012(0x1e9));if(_0xb9bfae[_0x3da012(0x1e6)])return writeCliSideChannelLine(_0x3da012(0x1d4)+CLI_BIN_NAME+'\x20auth\x20device'),{'ok':!![],'message':_0x3da012(0x1dd)};writeCliSideChannelLine('Waiting\x20for\x20authorization\x20(timeout:\x2010\x20minutes,\x20Ctrl+C\x20to\x20cancel)...');const _0x404b24=new AbortController(),_0x43ed07=()=>{const _0x465a11=_0x3da012;_0x404b24[_0x465a11(0x1b9)](),process[_0x465a11(0x1c8)](_0x465a11(0x1d2),_0x43ed07);};process[_0x3da012(0x1fc)]('SIGINT',_0x43ed07);let _0x124a74;try{_0x124a74=await pollDeviceToken(_0x298d95,_0x39b40b,_0x404b24[_0x3da012(0x1f4)]);}finally{process[_0x3da012(0x1c8)]('SIGINT',_0x43ed07);}if(!ACCESS_KEY_PATTERN[_0x3da012(0x1c5)](_0x124a74))throw CliErrors[_0x3da012(0x1bd)](_0x3da012(0x1f2));const _0x40e87=readScopedConfig(_0x143c85);return _0x40e87[_0x3da012(0x1ce)]=_0x124a74,writeScopedConfig(_0x40e87,_0x143c85),deleteStoredDeviceCode(),process[_0x3da012(0x1f1)][_0x3da012(0x1e4)]('\x0a'),writeCliSideChannelLine(_0x3da012(0x201)+_0xbe34d0+_0x3da012(0x1c9)),writeCliSideChannelLine(_0x3da012(0x1d6)+CLI_BIN_NAME+'\x20auth\x20status'),{'ok':!![],'message':_0x3da012(0x1df)};}};