@lovrabet/lovrabet-cli 2.3.10 → 2.3.11-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 (186) 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 +3 -3
  185. package/skills/lovrabet/references/lovrabet-schedule-workflow.md +50 -1
  186. package/skills/lovrabet.manifest.json +3 -3
package/lib/cli.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- const a0_0x4892f7=a0_0x46b3;(function(_0x4824fe,_0x211871){const _0x7e5021=a0_0x46b3,_0x37306a=_0x4824fe();while(!![]){try{const _0x512bbe=parseInt(_0x7e5021(0x12f))/0x1*(parseInt(_0x7e5021(0x133))/0x2)+-parseInt(_0x7e5021(0x11f))/0x3*(parseInt(_0x7e5021(0x12b))/0x4)+-parseInt(_0x7e5021(0x117))/0x5*(parseInt(_0x7e5021(0x10f))/0x6)+parseInt(_0x7e5021(0x11c))/0x7*(parseInt(_0x7e5021(0x111))/0x8)+parseInt(_0x7e5021(0x11e))/0x9*(parseInt(_0x7e5021(0x135))/0xa)+parseInt(_0x7e5021(0x12c))/0xb*(-parseInt(_0x7e5021(0x127))/0xc)+-parseInt(_0x7e5021(0x113))/0xd*(-parseInt(_0x7e5021(0x126))/0xe);if(_0x512bbe===_0x211871)break;else _0x37306a['push'](_0x37306a['shift']());}catch(_0x4d4edc){_0x37306a['push'](_0x37306a['shift']());}}}(a0_0x48d6,0x3ff1a));import{jsx as a0_0x466198}from'react/jsx-runtime';import a0_0x5e2495 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';function a0_0x48d6(){const _0x1e65f8=['Unexpected\x20error:','1038296EhMkBt','1152aDVtfz','log','error','original','103684EHtTQV','25036xgMfoB','hint','handler','218670OtBLbS','assign','exit','definition','2uvrHSR','flatMap','50UUIWxw','\x0aCancelled.\x0a','Error:\x20','corrected','[preparse]\x20','name','flags','help','exitCode','write',':\x20--','18bCVeen','message','8lyEOXu','code','130lBhJtV','catch','slice','ERR_USE_AFTER_CLOSE','402145APOsmk','args','ERR_STREAM_DESTROYED','validation','config','724052sNgcRq','cancelled','37521oAmoMZ','42qliTUW','./framework/preparse.js','input','stderr','defaultCommand','doctor'];a0_0x48d6=function(){return _0x1e65f8;};return a0_0x48d6();}import{runCommand,createPipelineEnv}from'./framework/runner.js';import{generateCommandHelp,generateServiceHelp,generateFullHelp}from'./framework/help.js';import{buildMeowFlags}from'./constant/cli.js';import{getCliVersionDisplay}from'./utils/version.js';function a0_0x46b3(_0x5c2c09,_0x549eb1){_0x5c2c09=_0x5c2c09-0x107;const _0x48d619=a0_0x48d6();let _0x46b37a=_0x48d619[_0x5c2c09];return _0x46b37a;}const helpText=generateFullHelp(),cli=a0_0x5e2495(helpText,{'importMeta':import.meta,'flags':buildMeowFlags(),'version':getCliVersionDisplay()});void main()[a0_0x4892f7(0x114)](handleError);async function main(){try{await run();}catch(_0x3a2d4c){handleError(_0x3a2d4c);}}async function run(){const _0x331f44=a0_0x4892f7;let _0x5bebef=cli[_0x331f44(0x121)][0x0],_0x14071c=cli[_0x331f44(0x121)][0x1];const _0x1e1d3f=cli[_0x331f44(0x10a)];try{const {correctFlags:_0x156497}=await import(_0x331f44(0x120)),_0x56e583=getAllDefinitions()[_0x331f44(0x134)](_0x19a91d=>_0x19a91d['flags']??[]),{flags:_0x9e302b,corrections:_0x10f6b6}=_0x156497(_0x1e1d3f,_0x56e583);if(_0x10f6b6['length']>0x0){for(const _0xce9843 of _0x10f6b6){process[_0x331f44(0x122)][_0x331f44(0x10d)](_0x331f44(0x108)+_0xce9843[_0x331f44(0x12e)]+_0x331f44(0x10e)+_0xce9843[_0x331f44(0x12a)]+'\x20->\x20--'+_0xce9843[_0x331f44(0x107)]+'\x0a');}Object[_0x331f44(0x130)](_0x1e1d3f,_0x9e302b);}}catch{}if(!_0x5bebef){const {waitUntilExit:_0x366edb}=render(a0_0x466198(Help,{}));await _0x366edb();return;}const _0xc2f99=resolveRemovedCommand(_0x5bebef,_0x14071c);if(_0xc2f99)throw CliErrors[_0x331f44(0x11a)](_0xc2f99['message'],_0xc2f99[_0x331f44(0x12d)]);if(!isKnownService(_0x5bebef)){const _0x321136=resolveDynamicServiceCommand(cli[_0x331f44(0x121)],_0x1e1d3f);if(_0x321136){if(_0x1e1d3f['help']){console['log'](generateCommandHelp(_0x321136[_0x331f44(0x132)]));return;}Object[_0x331f44(0x130)](_0x1e1d3f,_0x321136[_0x331f44(0x10a)]);const _0x41b069=buildConfigFromFlags(_0x1e1d3f);await initGlobalEnvironment(_0x41b069);const _0x11c679=createPipelineEnv(_0x41b069,_0x1e1d3f);_0x11c679[_0x331f44(0x118)]=_0x321136[_0x331f44(0x118)],await runCommand(_0x321136[_0x331f44(0x132)],_0x11c679);return;}if(_0x1e1d3f[_0x331f44(0x10b)]){const _0x11bcd9=generateDynamicServiceHelp(_0x5bebef);if(_0x11bcd9){console[_0x331f44(0x128)](_0x11bcd9);return;}}const {waitUntilExit:_0x229da4}=render(a0_0x466198(Help,{}));await _0x229da4();return;}const _0x27f7de=getServiceEntry(_0x5bebef);if(!_0x14071c){if(_0x1e1d3f[_0x331f44(0x10b)]){console[_0x331f44(0x128)](generateServiceHelp(_0x5bebef));return;}if(_0x27f7de[_0x331f44(0x123)])_0x14071c=_0x27f7de[_0x331f44(0x123)];else{console[_0x331f44(0x128)](generateServiceHelp(_0x5bebef));return;}}const _0x306f2b=findDefinition(_0x5bebef,_0x14071c);!_0x306f2b&&(console[_0x331f44(0x128)](generateServiceHelp(_0x5bebef)),handleError(CliErrors['unknownCommand'](_0x5bebef+'\x20'+_0x14071c)));if(_0x1e1d3f[_0x331f44(0x10b)]){console[_0x331f44(0x128)](generateCommandHelp(_0x306f2b));return;}const _0x3ec838=buildConfigFromFlags(_0x1e1d3f);_0x5bebef!==_0x331f44(0x11b)&&_0x5bebef!==_0x331f44(0x124)&&await initGlobalEnvironment(_0x3ec838);const _0x5efb7d=createPipelineEnv(_0x3ec838,_0x1e1d3f);_0x5efb7d[_0x331f44(0x118)]=cli[_0x331f44(0x121)][_0x331f44(0x115)](0x2),await runCommand(_0x306f2b,_0x5efb7d);}function handleError(_0x4a6163){const _0x2db459=a0_0x4892f7;if(_0x4a6163 instanceof CliError){_0x4a6163[_0x2db459(0x112)]===_0x2db459(0x11d)&&(process[_0x2db459(0x122)]['write'](_0x2db459(0x136)),process['exit'](0x0));console[_0x2db459(0x129)](_0x2db459(0x137)+_0x4a6163[_0x2db459(0x110)]);if(_0x4a6163[_0x2db459(0x12d)])console[_0x2db459(0x129)]('Hint:\x20'+_0x4a6163[_0x2db459(0x12d)]);process['exit'](_0x4a6163[_0x2db459(0x10c)]);}isUserCancellation(_0x4a6163)&&(process[_0x2db459(0x122)]['write']('\x0aCancelled.\x0a'),process['exit'](0x0)),console[_0x2db459(0x129)](_0x2db459(0x125),_0x4a6163),process[_0x2db459(0x131)](0x1);}function isUserCancellation(_0x3d0346){const _0x3e40c1=a0_0x4892f7;if(!(_0x3d0346 instanceof Error))return![];if(_0x3d0346[_0x3e40c1(0x109)]==='ExitPromptError')return!![];if(_0x3d0346[_0x3e40c1(0x112)]===_0x3e40c1(0x116))return!![];if(_0x3d0346['code']===_0x3e40c1(0x119))return!![];return![];}
2
+ (function(_0x1e35de,_0x5cae67){const _0x5b06c5=a0_0x35f6,_0x2b2d90=_0x1e35de();while(!![]){try{const _0x494ba9=parseInt(_0x5b06c5(0xb0))/0x1*(-parseInt(_0x5b06c5(0xb7))/0x2)+-parseInt(_0x5b06c5(0xb6))/0x3+parseInt(_0x5b06c5(0xd4))/0x4*(-parseInt(_0x5b06c5(0xd2))/0x5)+parseInt(_0x5b06c5(0xb4))/0x6+parseInt(_0x5b06c5(0xb5))/0x7+parseInt(_0x5b06c5(0xcd))/0x8*(parseInt(_0x5b06c5(0xc0))/0x9)+parseInt(_0x5b06c5(0xbe))/0xa*(parseInt(_0x5b06c5(0xc7))/0xb);if(_0x494ba9===_0x5cae67)break;else _0x2b2d90['push'](_0x2b2d90['shift']());}catch(_0x1abe5b){_0x2b2d90['push'](_0x2b2d90['shift']());}}}(a0_0x397e,0x5e452));import{jsx as a0_0x58809d}from'react/jsx-runtime';import a0_0x59d068 from'meow';function a0_0x397e(){const _0xf1b839=['exitCode','flags','code','10690YyiNUf','config','101259ajXKKd','args','log','corrected','Unexpected\x20error:','assign','write','4235qACUBA','hint','length','ERR_USE_AFTER_CLOSE','unknownCommand','\x0aCancelled.\x0a','376btBcuw','ERR_STREAM_DESTROYED','original','input','ExitPromptError','1388090CGtYaw','Hint:\x20','4zGcPgW','message','stderr','error','5hLotWl','defaultCommand','validation','help','150192ZPkBLV','945609GwadbQ','1309344lXcXvE','114qjXVhO','exit','./framework/preparse.js','Error:\x20'];a0_0x397e=function(){return _0xf1b839;};return a0_0x397e();}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';function a0_0x35f6(_0x81dc00,_0x483cb4){_0x81dc00=_0x81dc00-0xad;const _0x397e5d=a0_0x397e();let _0x35f6ae=_0x397e5d[_0x81dc00];return _0x35f6ae;}import{getCliVersionDisplay}from'./utils/version.js';const helpText=generateFullHelp(),cli=a0_0x59d068(helpText,{'importMeta':import.meta,'flags':buildMeowFlags(),'version':getCliVersionDisplay()});void main()['catch'](handleError);async function main(){try{await run();}catch(_0x54e548){handleError(_0x54e548);}}async function run(){const _0x3e8976=a0_0x35f6;let _0x913956=cli[_0x3e8976(0xd0)][0x0],_0x53d8a6=cli['input'][0x1];const _0xad6ef7=cli[_0x3e8976(0xbc)];try{const {correctFlags:_0x3d1fb0}=await import(_0x3e8976(0xb9)),_0x40b43f=getAllDefinitions()['flatMap'](_0x489ea9=>_0x489ea9[_0x3e8976(0xbc)]??[]),{flags:_0x26b8e7,corrections:_0x384974}=_0x3d1fb0(_0xad6ef7,_0x40b43f);if(_0x384974[_0x3e8976(0xc9)]>0x0){for(const _0x56b857 of _0x384974){process['stderr'][_0x3e8976(0xc6)]('[preparse]\x20'+_0x56b857['handler']+':\x20--'+_0x56b857[_0x3e8976(0xcf)]+'\x20->\x20--'+_0x56b857[_0x3e8976(0xc3)]+'\x0a');}Object[_0x3e8976(0xc5)](_0xad6ef7,_0x26b8e7);}}catch{}if(!_0x913956){const {waitUntilExit:_0x29515b}=render(a0_0x58809d(Help,{}));await _0x29515b();return;}const _0x54892b=resolveRemovedCommand(_0x913956,_0x53d8a6);if(_0x54892b)throw CliErrors[_0x3e8976(0xb2)](_0x54892b[_0x3e8976(0xad)],_0x54892b[_0x3e8976(0xc8)]);if(!isKnownService(_0x913956)){const _0x1471d8=resolveDynamicServiceCommand(cli[_0x3e8976(0xd0)],_0xad6ef7);if(_0x1471d8){if(_0xad6ef7[_0x3e8976(0xb3)]){console[_0x3e8976(0xc2)](generateCommandHelp(_0x1471d8['definition']));return;}Object[_0x3e8976(0xc5)](_0xad6ef7,_0x1471d8[_0x3e8976(0xbc)]);const _0x1102c6=buildConfigFromFlags(_0xad6ef7);await initGlobalEnvironment(_0x1102c6);const _0x3d808f=createPipelineEnv(_0x1102c6,_0xad6ef7);_0x3d808f[_0x3e8976(0xc1)]=_0x1471d8[_0x3e8976(0xc1)],await runCommand(_0x1471d8['definition'],_0x3d808f);return;}if(_0xad6ef7[_0x3e8976(0xb3)]){const _0x26ed1d=generateDynamicServiceHelp(_0x913956);if(_0x26ed1d){console[_0x3e8976(0xc2)](_0x26ed1d);return;}}const {waitUntilExit:_0x28900f}=render(a0_0x58809d(Help,{}));await _0x28900f();return;}const _0x3f6f1e=getServiceEntry(_0x913956);if(!_0x53d8a6){if(_0xad6ef7[_0x3e8976(0xb3)]){console[_0x3e8976(0xc2)](generateServiceHelp(_0x913956));return;}if(_0x3f6f1e[_0x3e8976(0xb1)])_0x53d8a6=_0x3f6f1e[_0x3e8976(0xb1)];else{console[_0x3e8976(0xc2)](generateServiceHelp(_0x913956));return;}}const _0x4fe87f=findDefinition(_0x913956,_0x53d8a6);!_0x4fe87f&&(console[_0x3e8976(0xc2)](generateServiceHelp(_0x913956)),handleError(CliErrors[_0x3e8976(0xcb)](_0x913956+'\x20'+_0x53d8a6)));if(_0xad6ef7[_0x3e8976(0xb3)]){console[_0x3e8976(0xc2)](generateCommandHelp(_0x4fe87f));return;}const _0x14dc84=buildConfigFromFlags(_0xad6ef7);_0x913956!==_0x3e8976(0xbf)&&_0x913956!=='doctor'&&await initGlobalEnvironment(_0x14dc84);const _0xe95d33=createPipelineEnv(_0x14dc84,_0xad6ef7);_0xe95d33[_0x3e8976(0xc1)]=cli[_0x3e8976(0xd0)]['slice'](0x2),await runCommand(_0x4fe87f,_0xe95d33);}function handleError(_0x11ad88){const _0x1a9eaf=a0_0x35f6;if(_0x11ad88 instanceof CliError){_0x11ad88[_0x1a9eaf(0xbd)]==='cancelled'&&(process['stderr'][_0x1a9eaf(0xc6)](_0x1a9eaf(0xcc)),process['exit'](0x0));console[_0x1a9eaf(0xaf)](_0x1a9eaf(0xba)+_0x11ad88[_0x1a9eaf(0xad)]);if(_0x11ad88[_0x1a9eaf(0xc8)])console['error'](_0x1a9eaf(0xd3)+_0x11ad88['hint']);process[_0x1a9eaf(0xb8)](_0x11ad88[_0x1a9eaf(0xbb)]);}isUserCancellation(_0x11ad88)&&(process[_0x1a9eaf(0xae)][_0x1a9eaf(0xc6)]('\x0aCancelled.\x0a'),process[_0x1a9eaf(0xb8)](0x0)),console[_0x1a9eaf(0xaf)](_0x1a9eaf(0xc4),_0x11ad88),process['exit'](0x1);}function isUserCancellation(_0x49d6d3){const _0x45074f=a0_0x35f6;if(!(_0x49d6d3 instanceof Error))return![];if(_0x49d6d3['name']===_0x45074f(0xd1))return!![];if(_0x49d6d3['code']===_0x45074f(0xca))return!![];if(_0x49d6d3[_0x45074f(0xbd)]===_0x45074f(0xce))return!![];return![];}
@@ -1 +1 @@
1
- const a1_0x2b90c2=a1_0x41a7;function a1_0x41a7(_0x1ec7a4,_0x55923d){_0x1ec7a4=_0x1ec7a4-0x1a8;const _0x552a51=a1_0x552a();let _0x41a7a9=_0x552a51[_0x1ec7a4];return _0x41a7a9;}(function(_0x3311d0,_0x413209){const _0x361be7=a1_0x41a7,_0x37d189=_0x3311d0();while(!![]){try{const _0x20cb82=-parseInt(_0x361be7(0x1c7))/0x1*(parseInt(_0x361be7(0x1bf))/0x2)+-parseInt(_0x361be7(0x229))/0x3*(-parseInt(_0x361be7(0x1fb))/0x4)+parseInt(_0x361be7(0x1e4))/0x5*(parseInt(_0x361be7(0x1d4))/0x6)+parseInt(_0x361be7(0x1ee))/0x7*(parseInt(_0x361be7(0x20d))/0x8)+parseInt(_0x361be7(0x1ac))/0x9+-parseInt(_0x361be7(0x1f5))/0xa*(-parseInt(_0x361be7(0x1af))/0xb)+-parseInt(_0x361be7(0x22e))/0xc;if(_0x20cb82===_0x413209)break;else _0x37d189['push'](_0x37d189['shift']());}catch(_0x3ac9bc){_0x37d189['push'](_0x37d189['shift']());}}}(a1_0x552a,0xb5090));import{CliErrors}from'../../errors.js';const CATEGORY_FLAG={'name':a1_0x2b90c2(0x1d6),'type':'string','description':a1_0x2b90c2(0x1e0)},KEYWORD_FLAG={'name':a1_0x2b90c2(0x1bc),'type':a1_0x2b90c2(0x1d1),'description':a1_0x2b90c2(0x21f)},DOC_CODE_FLAG={'name':'code','type':a1_0x2b90c2(0x1d1),'required':!![],'description':a1_0x2b90c2(0x1eb)},DOCS=[{'code':'dataset_list','category':a1_0x2b90c2(0x220),'title':a1_0x2b90c2(0x1e5),'method':'POST','path':a1_0x2b90c2(0x210),'summary':a1_0x2b90c2(0x207),'whenToUse':a1_0x2b90c2(0x1bd),'pathParams':[],'queryParams':[],'bodySchema':a1_0x2b90c2(0x212),'responseHighlights':[a1_0x2b90c2(0x201),'paging.totalCount\x20gives\x20total\x20rows'],'examples':[a1_0x2b90c2(0x1e3)],'notes':[a1_0x2b90c2(0x20e)],'markdown':[a1_0x2b90c2(0x1c6),'',a1_0x2b90c2(0x22a)][a1_0x2b90c2(0x1cc)]('\x0a')},{'code':a1_0x2b90c2(0x1c2),'category':'dataset','title':a1_0x2b90c2(0x218),'method':a1_0x2b90c2(0x1f6),'path':a1_0x2b90c2(0x1c3),'summary':'Get\x20dataset\x20detail','whenToUse':a1_0x2b90c2(0x1e2),'pathParams':[],'queryParams':[{'name':'code','description':'32-character\x20dataset\x20code'}],'bodySchema':a1_0x2b90c2(0x21a),'responseHighlights':[a1_0x2b90c2(0x225),'relations\x20contains\x20the\x20object-shaped\x20API\x20relations\x20value\x20when\x20returned',a1_0x2b90c2(0x223)],'examples':[a1_0x2b90c2(0x1c4)],'notes':[a1_0x2b90c2(0x1dc)],'markdown':[a1_0x2b90c2(0x20b),'','Inspect\x20field\x20names,\x20relations,\x20and\x20operation\x20metadata\x20for\x20a\x20known\x20dataset\x20code.'][a1_0x2b90c2(0x1cc)]('\x0a')},{'code':a1_0x2b90c2(0x1cd),'category':a1_0x2b90c2(0x220),'title':a1_0x2b90c2(0x1d5),'method':a1_0x2b90c2(0x224),'path':a1_0x2b90c2(0x1a8),'summary':a1_0x2b90c2(0x1fc),'whenToUse':a1_0x2b90c2(0x228),'pathParams':[{'name':a1_0x2b90c2(0x221),'description':a1_0x2b90c2(0x214)},{'name':a1_0x2b90c2(0x20a),'description':a1_0x2b90c2(0x1b2)}],'queryParams':[],'bodySchema':'{\x22where\x22:{},\x22currentPage\x22:1,\x22pageSize\x22:20}','responseHighlights':[a1_0x2b90c2(0x1db),a1_0x2b90c2(0x1cb)],'examples':[a1_0x2b90c2(0x1c0),a1_0x2b90c2(0x1f8)],'notes':[a1_0x2b90c2(0x204),a1_0x2b90c2(0x1f1),a1_0x2b90c2(0x1b3),a1_0x2b90c2(0x200)],'markdown':[a1_0x2b90c2(0x1ba),'','Use\x20`where`,\x20`select`,\x20`orderBy`,\x20`currentPage`,\x20and\x20`pageSize`\x20to\x20inspect\x20live\x20data\x20shape.'][a1_0x2b90c2(0x1cc)]('\x0a')},{'code':a1_0x2b90c2(0x211),'category':a1_0x2b90c2(0x220),'title':a1_0x2b90c2(0x1ae),'method':a1_0x2b90c2(0x224),'path':a1_0x2b90c2(0x1da),'summary':a1_0x2b90c2(0x1aa),'whenToUse':'Use\x20when\x20you\x20need\x20groupBy\x20plus\x20count,\x20sum,\x20avg,\x20max,\x20or\x20min\x20aggregates','pathParams':[{'name':a1_0x2b90c2(0x221),'description':'Current\x20app\x20code'},{'name':a1_0x2b90c2(0x20a),'description':a1_0x2b90c2(0x1b2)}],'queryParams':[],'bodySchema':'{\x22aggregate\x22:[{\x22column\x22:\x20\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[]}','responseHighlights':[a1_0x2b90c2(0x1b5),a1_0x2b90c2(0x1e8)],'examples':[a1_0x2b90c2(0x213)],'notes':[a1_0x2b90c2(0x1fa),'`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.'],'markdown':[a1_0x2b90c2(0x1ff),'',a1_0x2b90c2(0x1fe)][a1_0x2b90c2(0x1cc)]('\x0a')},{'code':a1_0x2b90c2(0x22c),'category':a1_0x2b90c2(0x220),'title':a1_0x2b90c2(0x1f9),'method':a1_0x2b90c2(0x224),'path':a1_0x2b90c2(0x1c8),'summary':'Get\x20one\x20dataset\x20record','whenToUse':a1_0x2b90c2(0x1fd),'pathParams':[{'name':a1_0x2b90c2(0x221),'description':a1_0x2b90c2(0x214)},{'name':a1_0x2b90c2(0x20a),'description':'32-character\x20dataset\x20code'}],'queryParams':[],'bodySchema':a1_0x2b90c2(0x1c5),'responseHighlights':[a1_0x2b90c2(0x21d)],'examples':['lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27'],'notes':['Prefer\x20`filter`\x20when\x20the\x20record\x20id\x20is\x20unknown.'],'markdown':a1_0x2b90c2(0x202)},{'code':a1_0x2b90c2(0x1e9),'category':a1_0x2b90c2(0x220),'title':'Create\x20dataset\x20record','method':'POST','path':a1_0x2b90c2(0x1c9),'summary':a1_0x2b90c2(0x1d7),'whenToUse':a1_0x2b90c2(0x226),'pathParams':[{'name':a1_0x2b90c2(0x221),'description':a1_0x2b90c2(0x214)},{'name':'datasetCode','description':a1_0x2b90c2(0x1b2)}],'queryParams':[],'bodySchema':a1_0x2b90c2(0x208),'responseHighlights':[a1_0x2b90c2(0x21e)],'examples':[a1_0x2b90c2(0x1d8)],'notes':[a1_0x2b90c2(0x22b)],'markdown':'##\x20Create\x20dataset\x20record\x0a\x0aCreate\x20one\x20data\x20record\x20in\x20a\x20dataset.'},{'code':'bf_detail','category':'bf','title':a1_0x2b90c2(0x22d),'method':a1_0x2b90c2(0x1f6),'path':a1_0x2b90c2(0x1ab),'summary':a1_0x2b90c2(0x1d3),'whenToUse':a1_0x2b90c2(0x209),'pathParams':[{'name':a1_0x2b90c2(0x221),'description':a1_0x2b90c2(0x214)},{'name':a1_0x2b90c2(0x1f7),'description':a1_0x2b90c2(0x1f2)}],'queryParams':[],'bodySchema':a1_0x2b90c2(0x21a),'responseHighlights':[a1_0x2b90c2(0x203)],'examples':[a1_0x2b90c2(0x206)],'notes':[a1_0x2b90c2(0x1f4)],'markdown':a1_0x2b90c2(0x205)},{'code':a1_0x2b90c2(0x20f),'category':'bf','title':'Execute\x20BF\x20endpoint\x20function','method':a1_0x2b90c2(0x224),'path':a1_0x2b90c2(0x1b7),'summary':a1_0x2b90c2(0x1d9),'whenToUse':a1_0x2b90c2(0x1a9),'pathParams':[{'name':a1_0x2b90c2(0x221),'description':a1_0x2b90c2(0x214)},{'name':a1_0x2b90c2(0x1f7),'description':a1_0x2b90c2(0x1d2)}],'queryParams':[],'bodySchema':'{\x22param\x22:\x22value\x22}','responseHighlights':[a1_0x2b90c2(0x1bb)],'examples':['lovrabet\x20bff\x20exec\x20--name\x20<functionName>\x20--params\x20\x27{}\x27'],'notes':[a1_0x2b90c2(0x1e6)],'markdown':a1_0x2b90c2(0x1b1)},{'code':a1_0x2b90c2(0x21b),'category':'bf','title':'Execute\x20Personal\x20Backend\x20Function','method':a1_0x2b90c2(0x224),'path':a1_0x2b90c2(0x1be),'summary':a1_0x2b90c2(0x227),'whenToUse':a1_0x2b90c2(0x1b4),'pathParams':[{'name':'id','description':'Personal\x20Backend\x20Function\x20script\x20ID,\x20for\x20example\x20123'}],'queryParams':[{'name':a1_0x2b90c2(0x221),'description':a1_0x2b90c2(0x214)}],'bodySchema':'{\x22param\x22:\x22value\x22}','responseHighlights':[a1_0x2b90c2(0x1bb)],'examples':['lovrabet\x20personal-bff\x20exec\x20--id\x20<id>\x20--params\x20\x27{}\x27'],'notes':[a1_0x2b90c2(0x1b6),'Function\x20execution\x20may\x20have\x20business\x20side\x20effects;\x20inspect\x20detail\x20before\x20execution.'],'markdown':[a1_0x2b90c2(0x1e1),'',a1_0x2b90c2(0x1ea)][a1_0x2b90c2(0x1cc)]('\x0a')},{'code':a1_0x2b90c2(0x1de),'category':'custom_sql','title':a1_0x2b90c2(0x1e7),'method':'POST','path':a1_0x2b90c2(0x1ad),'summary':'Execute\x20custom\x20SQL','whenToUse':a1_0x2b90c2(0x1b0),'pathParams':[],'queryParams':[],'bodySchema':'{\x22appCode\x22:\x22app-aa63b188\x22,\x22sqlCode\x22:\x22xxxxxxxx-xxxxxxxx\x22,\x22params\x22:{}}','responseHighlights':[a1_0x2b90c2(0x1c1)],'examples':['lovrabet\x20sql\x20exec\x20--sqlcode\x20<sqlCode>\x20--params\x20\x27{}\x27'],'notes':[a1_0x2b90c2(0x222)],'markdown':a1_0x2b90c2(0x1f0)}];function a1_0x552a(){const _0x14bd3f=['Returns\x20script\x20business\x20payload','keyword','Use\x20when\x20you\x20need\x20a\x20paginated\x20runtime\x20dataset\x20list\x20by\x20appCode\x20and\x20want\x20to\x20collect\x20available\x20datasetCode\x20values','/api/runtime-bff/personal/{id}/execute','135486DfHkew','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','Returns\x20SQL\x20execution\x20payload','dataset_detail','/api/dataset/getOneByCode?code={datasetCode}','lovrabet\x20dataset\x20detail\x20--code\x20<datasetCode>\x20--appcode\x20<appCode>','{\x22id\x22:123}','##\x20List\x20datasets','11wxFKIu','/api/{appCode}/{datasetCode}/getOne','/api/{appCode}/{datasetCode}/create','summary','paging\x20contains\x20pagination','join','dataset_data_filter','title','toLowerCase','str','string','Endpoint\x20function\x20name','Get\x20a\x20BF\x20endpoint\x20contract\x20by\x20app\x20and\x20function\x20name','3256626BAIgtB','Filter\x20dataset\x20data','category','Create\x20a\x20dataset\x20record','lovrabet\x20data\x20create\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22name\x22:\x22demo\x22}\x27','Execute\x20a\x20BF\x20endpoint\x20function','/api/{appCode}/{datasetCode}/aggregate','tableData\x20contains\x20records','If\x20SDK\x20usage\x20is\x20needed,\x20follow\x20with\x20`lovrabet\x20dataset\x20sdk-doc\x20--code\x20<datasetCode>`.','whenToUse','custom_sql_execute','detail','Filter\x20docs\x20by\x20category,\x20for\x20example\x20dataset','##\x20Execute\x20Personal\x20Backend\x20Function','Use\x20when\x20you\x20need\x20fields,\x20table\x20info,\x20relations,\x20or\x20operation\x20definitions\x20for\x20a\x20dataset\x20code','lovrabet\x20dataset\x20list\x20--appcode\x20<appCode>\x20--format\x20compress','5RqABoD','List\x20datasets','Script\x20behavior\x20may\x20have\x20side\x20effects;\x20inspect\x20detail\x20first.','Execute\x20custom\x20SQL','where\x20filters\x20before\x20aggregation','dataset_data_create','Execute\x20a\x20known\x20Personal\x20Backend\x20Function\x20script\x20through\x20its\x20runtime\x20execute\x20endpoint.','API\x20doc\x20code,\x20for\x20example\x20dataset_list','filter','includes','6118geGaAl','validation','##\x20Execute\x20custom\x20SQL\x0a\x0aExecute\x20a\x20configured\x20SQL\x20script\x20by\x20sqlCode.','For\x20the\x20next\x20page,\x20keep\x20where/select/orderBy/pageSize\x20unchanged\x20and\x20increment\x20only\x20currentPage,\x20which\x20starts\x20at\x201.','Exact\x20endpoint\x20function\x20name','API\x20doc\x20code\x20not\x20found:\x20','This\x20is\x20an\x20exact\x20lookup\x20by\x20appCode\x20+\x20functionName.\x20The\x20CLI\x20does\x20not\x20enumerate\x20Backend\x20Function\x20definitions\x20or\x20expose\x20platform-only\x20fields.','140RGmFrD','GET','functionName','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','Get\x20one\x20dataset\x20record','Use\x20`having`\x20only\x20for\x20post-aggregation\x20filters.','4YXvKZf','Filter\x20dataset\x20records','Use\x20when\x20you\x20already\x20know\x20the\x20record\x20id\x20and\x20need\x20one\x20business\x20row\x20from\x20a\x20dataset','Aggregate\x20supports\x20COUNT,\x20SUM,\x20AVG,\x20MAX,\x20and\x20MIN\x20definitions\x20in\x20the\x20`aggregate`\x20array.','##\x20Aggregate\x20dataset\x20data','Use\x20read-only\x20data\x20commands\x20before\x20writing\x20Artifacts\x20that\x20display\x20real\x20data.','tableData\x20contains\x20dataset\x20id/code/name','##\x20Get\x20one\x20dataset\x20record\x0a\x0aRead\x20one\x20record\x20by\x20id.','CLI\x20returns\x20appCode/functionName/description/version/gmtModified','where,\x20select,\x20orderBy,\x20currentPage,\x20and\x20pageSize\x20belong\x20inside\x20one\x20--params\x20JSON\x20object;\x20they\x20are\x20not\x20standalone\x20CLI\x20flags.','##\x20Get\x20BF\x20endpoint\x20function\x20contract\x0a\x0aInspect\x20one\x20known\x20endpoint\x20function\x20through\x20the\x20AK-authenticated\x20exact\x20detail\x20API.','lovrabet\x20bff\x20detail\x20--name\x20<functionName>','List\x20datasets\x20with\x20pagination','{\x22fieldName\x22:\x22value\x22}','Use\x20when\x20the\x20function\x20name\x20is\x20already\x20confirmed\x20and\x20you\x20need\x20that\x20ENDPOINT\x27s\x20runtime\x20metadata','datasetCode','##\x20Dataset\x20detail','Show\x20runtime\x20API\x20documentation\x20by\x20code','13304nbsAKl','CLI\x20users\x20should\x20prefer\x20`lovrabet\x20dataset\x20list`\x20for\x20this\x20workflow.','bf_execute','/api/dataset/get-dataset-list-by-app-code','dataset_data_aggregate','{\x22appCode\x22:\x22app-aa63b188\x22,\x22currentPage\x22:1,\x22pageSize\x22:100}','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','Current\x20app\x20code','path','method','trim','Dataset\x20detail','api-doc','None','personal_bf_execute','list','Returns\x20one\x20matching\x20business\x20record','Returns\x20the\x20created\x20record\x20or\x20backend\x20operation\x20result','Search\x20docs\x20by\x20code,\x20summary,\x20path,\x20or\x20usage\x20text','dataset','appCode','Use\x20`lovrabet\x20sql\x20detail`\x20before\x20execution.','operations\x20describes\x20runtime\x20APIs','POST','fields/properties\x20describe\x20data\x20shape','Use\x20when\x20you\x20need\x20to\x20insert\x20one\x20business\x20record\x20into\x20a\x20dataset','Execute\x20a\x20Personal\x20Backend\x20Function\x20by\x20script\x20ID','Use\x20when\x20you\x20need\x20to\x20read\x20business\x20data\x20with\x20where,\x20orderBy,\x20pagination,\x20or\x20similar\x20filters','3146331pQzxfD','Use\x20this\x20API\x20or\x20`lovrabet\x20dataset\x20list`\x20to\x20discover\x20available\x20dataset\x20codes\x20before\x20reading\x20data.','This\x20is\x20a\x20write\x20operation;\x20use\x20dry-run\x20when\x20available\x20and\x20safe\x20fixtures\x20for\x20smoke\x20tests.','dataset_data_get_one','Get\x20BF\x20endpoint\x20function\x20contract','36852828PKvhCk','/api/{appCode}/{datasetCode}/filter','Use\x20when\x20the\x20target\x20BF\x20functionName\x20is\x20confirmed\x20and\x20you\x20need\x20to\x20call\x20that\x20ENDPOINT','Aggregate\x20dataset\x20records','/client/bff/endpoint/{appCode}/{functionName}','3372228UfXtws','/api/custom/executeSql','Aggregate\x20dataset\x20data','894190CWtwHW','Use\x20when\x20the\x20target\x20sqlCode\x20exists\x20and\x20you\x20need\x20to\x20execute\x20that\x20custom\x20SQL','##\x20Execute\x20BF\x20endpoint\x20function\x0a\x0aExecute\x20a\x20known\x20endpoint\x20script.','32-character\x20dataset\x20code','Verify\x20tableData\x20and\x20paging\x20before\x20treating\x20the\x20response\x20as\x20a\x20business\x20fact.','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','result\x20rows\x20contain\x20aggregate\x20aliases','Personal\x20BFF\x20scripts\x20are\x20user-owned\x20and\x20scoped\x20per\x20app.','/api/endpoint/{appCode}/{functionName}','code','read','##\x20Filter\x20dataset\x20data'];a1_0x552a=function(){return _0x14bd3f;};return a1_0x552a();}function entrySummary(_0x5f4601){const _0x1ebc2d=a1_0x2b90c2;return{'code':_0x5f4601[_0x1ebc2d(0x1b8)],'category':_0x5f4601[_0x1ebc2d(0x1d6)],'method':_0x5f4601[_0x1ebc2d(0x216)],'path':_0x5f4601[_0x1ebc2d(0x215)],'summary':_0x5f4601[_0x1ebc2d(0x1ca)],'whenToUse':_0x5f4601[_0x1ebc2d(0x1dd)]};}export function listApiDocEntries(_0x1cfecc={}){const _0x257a52=a1_0x2b90c2,_0x23b5c7=String(_0x1cfecc[_0x257a52(0x1d6)]||'')[_0x257a52(0x217)](),_0x1b2d56=String(_0x1cfecc[_0x257a52(0x1bc)]||'')[_0x257a52(0x217)]()[_0x257a52(0x1cf)]();return DOCS[_0x257a52(0x1ec)](_0x2b27f3=>{const _0xae6841=_0x257a52;if(_0x23b5c7&&_0x2b27f3[_0xae6841(0x1d6)]!==_0x23b5c7)return![];if(!_0x1b2d56)return!![];return[_0x2b27f3[_0xae6841(0x1b8)],_0x2b27f3[_0xae6841(0x1d6)],_0x2b27f3[_0xae6841(0x216)],_0x2b27f3[_0xae6841(0x215)],_0x2b27f3[_0xae6841(0x1ca)],_0x2b27f3[_0xae6841(0x1dd)],_0x2b27f3[_0xae6841(0x1ce)]][_0xae6841(0x1cc)]('\x20')[_0xae6841(0x1cf)]()[_0xae6841(0x1ed)](_0x1b2d56);})['map'](entrySummary);}export function getApiDocDetail(_0x51739a){const _0x8c5cb8=a1_0x2b90c2,_0x45e935=DOCS['find'](_0x193aea=>_0x193aea[_0x8c5cb8(0x1b8)]===_0x51739a);if(!_0x45e935)throw CliErrors[_0x8c5cb8(0x1ef)](_0x8c5cb8(0x1f3)+_0x51739a);return{..._0x45e935};}const apiDocList={'service':a1_0x2b90c2(0x219),'command':a1_0x2b90c2(0x21c),'description':'List\x20available\x20runtime\x20API\x20documentation\x20entries','risk':a1_0x2b90c2(0x1b9),'requiresAppCode':![],'flags':[CATEGORY_FLAG,KEYWORD_FLAG],async 'execute'(_0x3a5ebf){const _0x545d3d=a1_0x2b90c2,_0x30d138=listApiDocEntries({'category':_0x3a5ebf[_0x545d3d(0x1d0)](_0x545d3d(0x1d6)),'keyword':_0x3a5ebf['str'](_0x545d3d(0x1bc))});return{'ok':!![],'data':{'total':_0x30d138['length'],'items':_0x30d138}};}},apiDocDetail={'service':'api-doc','command':a1_0x2b90c2(0x1df),'description':a1_0x2b90c2(0x20c),'risk':a1_0x2b90c2(0x1b9),'requiresAppCode':![],'flags':[DOC_CODE_FLAG],async 'execute'(_0x8e358a){const _0x2a4f0c=a1_0x2b90c2;return{'ok':!![],'data':getApiDocDetail(_0x8e358a[_0x2a4f0c(0x1d0)](_0x2a4f0c(0x1b8)))};}};export const apiDocDefinitions=[apiDocList,apiDocDetail];
1
+ const a1_0x49e318=a1_0x5d29;(function(_0x11a168,_0x59135f){const _0x48e723=a1_0x5d29,_0x27c688=_0x11a168();while(!![]){try{const _0x2bac8c=parseInt(_0x48e723(0x1a2))/0x1+parseInt(_0x48e723(0x198))/0x2+-parseInt(_0x48e723(0x17b))/0x3+-parseInt(_0x48e723(0x1b9))/0x4*(parseInt(_0x48e723(0x1fa))/0x5)+-parseInt(_0x48e723(0x1d5))/0x6+parseInt(_0x48e723(0x1d2))/0x7+parseInt(_0x48e723(0x180))/0x8;if(_0x2bac8c===_0x59135f)break;else _0x27c688['push'](_0x27c688['shift']());}catch(_0xc4eb4e){_0x27c688['push'](_0x27c688['shift']());}}}(a1_0x319f,0xb7b7a));import{CliErrors}from'../../errors.js';const CATEGORY_FLAG={'name':a1_0x49e318(0x1f6),'type':a1_0x49e318(0x1be),'description':a1_0x49e318(0x18d)},KEYWORD_FLAG={'name':'keyword','type':a1_0x49e318(0x1be),'description':a1_0x49e318(0x19e)},DOC_CODE_FLAG={'name':a1_0x49e318(0x1e5),'type':'string','required':!![],'description':a1_0x49e318(0x17c)},DOCS=[{'code':a1_0x49e318(0x1bd),'category':a1_0x49e318(0x183),'title':a1_0x49e318(0x1aa),'method':a1_0x49e318(0x1ad),'path':a1_0x49e318(0x1cf),'summary':'List\x20datasets\x20with\x20pagination','whenToUse':a1_0x49e318(0x191),'pathParams':[],'queryParams':[],'bodySchema':a1_0x49e318(0x1cd),'responseHighlights':[a1_0x49e318(0x1c4),'paging.totalCount\x20gives\x20total\x20rows'],'examples':[a1_0x49e318(0x1c8)],'notes':[a1_0x49e318(0x1fe)],'markdown':[a1_0x49e318(0x182),'',a1_0x49e318(0x1a5)][a1_0x49e318(0x1e2)]('\x0a')},{'code':a1_0x49e318(0x1bf),'category':a1_0x49e318(0x183),'title':a1_0x49e318(0x1ef),'method':a1_0x49e318(0x18e),'path':'/api/dataset/getOneByCode?code={datasetCode}','summary':a1_0x49e318(0x19a),'whenToUse':a1_0x49e318(0x194),'pathParams':[],'queryParams':[{'name':'code','description':'32-character\x20dataset\x20code'}],'bodySchema':a1_0x49e318(0x185),'responseHighlights':[a1_0x49e318(0x1e9),'relations\x20contains\x20the\x20object-shaped\x20API\x20relations\x20value\x20when\x20returned',a1_0x49e318(0x1ab)],'examples':[a1_0x49e318(0x1c3)],'notes':[a1_0x49e318(0x196)],'markdown':['##\x20Dataset\x20detail','',a1_0x49e318(0x1de)][a1_0x49e318(0x1e2)]('\x0a')},{'code':a1_0x49e318(0x1ce),'category':a1_0x49e318(0x183),'title':'Filter\x20dataset\x20data','method':a1_0x49e318(0x1ad),'path':a1_0x49e318(0x1e3),'summary':a1_0x49e318(0x1c6),'whenToUse':a1_0x49e318(0x197),'pathParams':[{'name':a1_0x49e318(0x18b),'description':a1_0x49e318(0x1c2)},{'name':a1_0x49e318(0x1cc),'description':a1_0x49e318(0x1bc)}],'queryParams':[],'bodySchema':a1_0x49e318(0x1d3),'responseHighlights':[a1_0x49e318(0x1b4),a1_0x49e318(0x190)],'examples':[a1_0x49e318(0x189),'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'],'notes':[a1_0x49e318(0x1a8),'For\x20the\x20next\x20page,\x20keep\x20where/select/orderBy/pageSize\x20unchanged\x20and\x20increment\x20only\x20currentPage,\x20which\x20starts\x20at\x201.',a1_0x49e318(0x1d9),'Use\x20read-only\x20data\x20commands\x20before\x20writing\x20Artifacts\x20that\x20display\x20real\x20data.'],'markdown':[a1_0x49e318(0x19d),'',a1_0x49e318(0x188)][a1_0x49e318(0x1e2)]('\x0a')},{'code':'dataset_data_aggregate','category':a1_0x49e318(0x183),'title':'Aggregate\x20dataset\x20data','method':'POST','path':a1_0x49e318(0x17e),'summary':a1_0x49e318(0x1e8),'whenToUse':a1_0x49e318(0x1fb),'pathParams':[{'name':a1_0x49e318(0x18b),'description':a1_0x49e318(0x1c2)},{'name':a1_0x49e318(0x1cc),'description':a1_0x49e318(0x1bc)}],'queryParams':[],'bodySchema':a1_0x49e318(0x1b8),'responseHighlights':[a1_0x49e318(0x1f7),a1_0x49e318(0x18c)],'examples':['lovrabet\x20data\x20aggregate\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}]}\x27'],'notes':[a1_0x49e318(0x1e6),a1_0x49e318(0x1b2)],'markdown':[a1_0x49e318(0x1a3),'',a1_0x49e318(0x1af)][a1_0x49e318(0x1e2)]('\x0a')},{'code':a1_0x49e318(0x1c1),'category':a1_0x49e318(0x183),'title':a1_0x49e318(0x1d4),'method':'POST','path':a1_0x49e318(0x1ed),'summary':a1_0x49e318(0x1d4),'whenToUse':a1_0x49e318(0x1f4),'pathParams':[{'name':a1_0x49e318(0x18b),'description':a1_0x49e318(0x1c2)},{'name':a1_0x49e318(0x1cc),'description':'32-character\x20dataset\x20code'}],'queryParams':[],'bodySchema':a1_0x49e318(0x1e0),'responseHighlights':['Returns\x20one\x20matching\x20business\x20record'],'examples':[a1_0x49e318(0x1d0)],'notes':[a1_0x49e318(0x1d6)],'markdown':'##\x20Get\x20one\x20dataset\x20record\x0a\x0aRead\x20one\x20record\x20by\x20id.'},{'code':a1_0x49e318(0x1c9),'category':a1_0x49e318(0x183),'title':a1_0x49e318(0x1f0),'method':a1_0x49e318(0x1ad),'path':a1_0x49e318(0x199),'summary':a1_0x49e318(0x17d),'whenToUse':a1_0x49e318(0x1f1),'pathParams':[{'name':a1_0x49e318(0x18b),'description':'Current\x20app\x20code'},{'name':'datasetCode','description':'32-character\x20dataset\x20code'}],'queryParams':[],'bodySchema':a1_0x49e318(0x184),'responseHighlights':['Returns\x20the\x20created\x20record\x20or\x20backend\x20operation\x20result'],'examples':[a1_0x49e318(0x195)],'notes':[a1_0x49e318(0x1ba)],'markdown':a1_0x49e318(0x18a)},{'code':a1_0x49e318(0x1b3),'category':'bf','title':a1_0x49e318(0x1e7),'method':a1_0x49e318(0x18e),'path':a1_0x49e318(0x1a1),'summary':a1_0x49e318(0x1d7),'whenToUse':a1_0x49e318(0x1c7),'pathParams':[{'name':a1_0x49e318(0x18b),'description':'Current\x20app\x20code'},{'name':a1_0x49e318(0x18f),'description':a1_0x49e318(0x1cb)}],'queryParams':[],'bodySchema':a1_0x49e318(0x185),'responseHighlights':[a1_0x49e318(0x1b6)],'examples':[a1_0x49e318(0x1d1)],'notes':[a1_0x49e318(0x1eb)],'markdown':a1_0x49e318(0x186)},{'code':a1_0x49e318(0x1ee),'category':'bf','title':a1_0x49e318(0x1ca),'method':a1_0x49e318(0x1ad),'path':'/api/endpoint/{appCode}/{functionName}','summary':a1_0x49e318(0x1dc),'whenToUse':a1_0x49e318(0x1ae),'pathParams':[{'name':a1_0x49e318(0x18b),'description':a1_0x49e318(0x1c2)},{'name':a1_0x49e318(0x18f),'description':a1_0x49e318(0x1f9)}],'queryParams':[],'bodySchema':a1_0x49e318(0x1a7),'responseHighlights':[a1_0x49e318(0x192)],'examples':[a1_0x49e318(0x1b7)],'notes':[a1_0x49e318(0x1f8)],'markdown':'##\x20Execute\x20BF\x20endpoint\x20function\x0a\x0aExecute\x20a\x20known\x20endpoint\x20script.'},{'code':a1_0x49e318(0x1f2),'category':'bf','title':a1_0x49e318(0x1a6),'method':'POST','path':a1_0x49e318(0x1dd),'summary':'Execute\x20a\x20Personal\x20Backend\x20Function\x20by\x20script\x20ID','whenToUse':a1_0x49e318(0x1e1),'pathParams':[{'name':'id','description':'Personal\x20Backend\x20Function\x20script\x20ID,\x20for\x20example\x20123'}],'queryParams':[{'name':a1_0x49e318(0x18b),'description':a1_0x49e318(0x1c2)}],'bodySchema':a1_0x49e318(0x1a7),'responseHighlights':[a1_0x49e318(0x192)],'examples':[a1_0x49e318(0x1df)],'notes':['Personal\x20BFF\x20scripts\x20are\x20user-owned\x20and\x20scoped\x20per\x20app.','Function\x20execution\x20may\x20have\x20business\x20side\x20effects;\x20inspect\x20detail\x20before\x20execution.'],'markdown':['##\x20Execute\x20Personal\x20Backend\x20Function','',a1_0x49e318(0x1b5)][a1_0x49e318(0x1e2)]('\x0a')},{'code':a1_0x49e318(0x1a0),'category':'custom_sql','title':a1_0x49e318(0x1c0),'method':a1_0x49e318(0x1ad),'path':a1_0x49e318(0x1b0),'summary':a1_0x49e318(0x1c0),'whenToUse':'Use\x20when\x20the\x20target\x20sqlCode\x20exists\x20and\x20you\x20need\x20to\x20execute\x20that\x20custom\x20SQL','pathParams':[],'queryParams':[],'bodySchema':a1_0x49e318(0x19c),'responseHighlights':[a1_0x49e318(0x1a9)],'examples':['lovrabet\x20sql\x20exec\x20--sqlcode\x20<sqlCode>\x20--params\x20\x27{}\x27'],'notes':[a1_0x49e318(0x181)],'markdown':'##\x20Execute\x20custom\x20SQL\x0a\x0aExecute\x20a\x20configured\x20SQL\x20script\x20by\x20sqlCode.'}];function a1_0x5d29(_0x1a4a6b,_0x3e82a9){_0x1a4a6b=_0x1a4a6b-0x17b;const _0x319fc0=a1_0x319f();let _0x5d296f=_0x319fc0[_0x1a4a6b];return _0x5d296f;}function entrySummary(_0x5607fe){const _0x2e7cec=a1_0x49e318;return{'code':_0x5607fe[_0x2e7cec(0x1e5)],'category':_0x5607fe[_0x2e7cec(0x1f6)],'method':_0x5607fe[_0x2e7cec(0x193)],'path':_0x5607fe[_0x2e7cec(0x1ec)],'summary':_0x5607fe[_0x2e7cec(0x1b1)],'whenToUse':_0x5607fe[_0x2e7cec(0x1da)]};}export function listApiDocEntries(_0x92298={}){const _0x3ca0a7=a1_0x49e318,_0x49fe66=String(_0x92298[_0x3ca0a7(0x1f6)]||'')[_0x3ca0a7(0x1fc)](),_0x30c3f9=String(_0x92298[_0x3ca0a7(0x1ea)]||'')[_0x3ca0a7(0x1fc)]()[_0x3ca0a7(0x19f)]();return DOCS[_0x3ca0a7(0x1fd)](_0x193ca0=>{const _0x3cbd34=_0x3ca0a7;if(_0x49fe66&&_0x193ca0[_0x3cbd34(0x1f6)]!==_0x49fe66)return![];if(!_0x30c3f9)return!![];return[_0x193ca0[_0x3cbd34(0x1e5)],_0x193ca0[_0x3cbd34(0x1f6)],_0x193ca0[_0x3cbd34(0x193)],_0x193ca0[_0x3cbd34(0x1ec)],_0x193ca0['summary'],_0x193ca0[_0x3cbd34(0x1da)],_0x193ca0[_0x3cbd34(0x1f3)]][_0x3cbd34(0x1e2)]('\x20')['toLowerCase']()['includes'](_0x30c3f9);})[_0x3ca0a7(0x1bb)](entrySummary);}export function getApiDocDetail(_0x3a0af8){const _0x200ac5=a1_0x49e318,_0xd526a0=DOCS['find'](_0x101a43=>_0x101a43[_0x200ac5(0x1e5)]===_0x3a0af8);if(!_0xd526a0)throw CliErrors[_0x200ac5(0x17f)](_0x200ac5(0x1d8)+_0x3a0af8);return{..._0xd526a0};}const apiDocList={'service':a1_0x49e318(0x1a4),'command':a1_0x49e318(0x1c5),'description':a1_0x49e318(0x187),'risk':a1_0x49e318(0x19b),'requiresAppCode':![],'flags':[CATEGORY_FLAG,KEYWORD_FLAG],async 'execute'(_0x1be301){const _0x460b7c=a1_0x49e318,_0xfb511a=listApiDocEntries({'category':_0x1be301[_0x460b7c(0x1e4)]('category'),'keyword':_0x1be301[_0x460b7c(0x1e4)](_0x460b7c(0x1ea))});return{'ok':!![],'data':{'total':_0xfb511a[_0x460b7c(0x1f5)],'items':_0xfb511a}};}},apiDocDetail={'service':a1_0x49e318(0x1a4),'command':a1_0x49e318(0x1ac),'description':a1_0x49e318(0x1db),'risk':a1_0x49e318(0x19b),'requiresAppCode':![],'flags':[DOC_CODE_FLAG],async 'execute'(_0x23565f){const _0x5127ac=a1_0x49e318;return{'ok':!![],'data':getApiDocDetail(_0x23565f[_0x5127ac(0x1e4)]('code'))};}};function a1_0x319f(){const _0x23f86a=['appCode','where\x20filters\x20before\x20aggregation','Filter\x20docs\x20by\x20category,\x20for\x20example\x20dataset','GET','functionName','paging\x20contains\x20pagination','Use\x20when\x20you\x20need\x20a\x20paginated\x20runtime\x20dataset\x20list\x20by\x20appCode\x20and\x20want\x20to\x20collect\x20available\x20datasetCode\x20values','Returns\x20script\x20business\x20payload','method','Use\x20when\x20you\x20need\x20fields,\x20table\x20info,\x20relations,\x20or\x20operation\x20definitions\x20for\x20a\x20dataset\x20code','lovrabet\x20data\x20create\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22name\x22:\x22demo\x22}\x27','If\x20SDK\x20usage\x20is\x20needed,\x20follow\x20with\x20`lovrabet\x20dataset\x20sdk-doc\x20--code\x20<datasetCode>`.','Use\x20when\x20you\x20need\x20to\x20read\x20business\x20data\x20with\x20where,\x20orderBy,\x20pagination,\x20or\x20similar\x20filters','466330JRBqOi','/api/{appCode}/{datasetCode}/create','Get\x20dataset\x20detail','read','{\x22appCode\x22:\x22app-aa63b188\x22,\x22sqlCode\x22:\x22xxxxxxxx-xxxxxxxx\x22,\x22params\x22:{}}','##\x20Filter\x20dataset\x20data','Search\x20docs\x20by\x20code,\x20summary,\x20path,\x20or\x20usage\x20text','toLowerCase','custom_sql_execute','/client/bff/endpoint/{appCode}/{functionName}','721433hjRVkj','##\x20Aggregate\x20dataset\x20data','api-doc','Use\x20this\x20API\x20or\x20`lovrabet\x20dataset\x20list`\x20to\x20discover\x20available\x20dataset\x20codes\x20before\x20reading\x20data.','Execute\x20Personal\x20Backend\x20Function','{\x22param\x22:\x22value\x22}','where,\x20select,\x20orderBy,\x20currentPage,\x20and\x20pageSize\x20belong\x20inside\x20one\x20--params\x20JSON\x20object;\x20they\x20are\x20not\x20standalone\x20CLI\x20flags.','Returns\x20SQL\x20execution\x20payload','List\x20datasets','operations\x20describes\x20runtime\x20APIs','detail','POST','Use\x20when\x20the\x20target\x20BF\x20functionName\x20is\x20confirmed\x20and\x20you\x20need\x20to\x20call\x20that\x20ENDPOINT','Aggregate\x20supports\x20COUNT,\x20SUM,\x20AVG,\x20MAX,\x20and\x20MIN\x20definitions\x20in\x20the\x20`aggregate`\x20array.','/api/custom/executeSql','summary','`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','bf_detail','tableData\x20contains\x20records','Execute\x20a\x20known\x20Personal\x20Backend\x20Function\x20script\x20through\x20its\x20runtime\x20execute\x20endpoint.','CLI\x20returns\x20appCode/functionName/description/version/gmtModified','lovrabet\x20bff\x20exec\x20--name\x20<functionName>\x20--params\x20\x27{}\x27','{\x22aggregate\x22:[{\x22column\x22:\x20\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[]}','706040XDVXZg','This\x20is\x20a\x20write\x20operation;\x20use\x20dry-run\x20when\x20available\x20and\x20safe\x20fixtures\x20for\x20smoke\x20tests.','map','32-character\x20dataset\x20code','dataset_list','string','dataset_detail','Execute\x20custom\x20SQL','dataset_data_get_one','Current\x20app\x20code','lovrabet\x20dataset\x20detail\x20--code\x20<datasetCode>\x20--appcode\x20<appCode>','tableData\x20contains\x20dataset\x20id/code/name','list','Filter\x20dataset\x20records','Use\x20when\x20the\x20function\x20name\x20is\x20already\x20confirmed\x20and\x20you\x20need\x20that\x20ENDPOINT\x27s\x20runtime\x20metadata','lovrabet\x20dataset\x20list\x20--appcode\x20<appCode>\x20--format\x20compress','dataset_data_create','Execute\x20BF\x20endpoint\x20function','Exact\x20endpoint\x20function\x20name','datasetCode','{\x22appCode\x22:\x22app-aa63b188\x22,\x22currentPage\x22:1,\x22pageSize\x22:100}','dataset_data_filter','/api/dataset/get-dataset-list-by-app-code','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27','lovrabet\x20bff\x20detail\x20--name\x20<functionName>','4231822YpsVfR','{\x22where\x22:{},\x22currentPage\x22:1,\x22pageSize\x22:20}','Get\x20one\x20dataset\x20record','2707698SfdhgH','Prefer\x20`filter`\x20when\x20the\x20record\x20id\x20is\x20unknown.','Get\x20a\x20BF\x20endpoint\x20contract\x20by\x20app\x20and\x20function\x20name','API\x20doc\x20code\x20not\x20found:\x20','Verify\x20tableData\x20and\x20paging\x20before\x20treating\x20the\x20response\x20as\x20a\x20business\x20fact.','whenToUse','Show\x20runtime\x20API\x20documentation\x20by\x20code','Execute\x20a\x20BF\x20endpoint\x20function','/api/runtime-bff/personal/{id}/execute','Inspect\x20field\x20names,\x20relations,\x20and\x20operation\x20metadata\x20for\x20a\x20known\x20dataset\x20code.','lovrabet\x20personal-bff\x20exec\x20--id\x20<id>\x20--params\x20\x27{}\x27','{\x22id\x22:123}','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','join','/api/{appCode}/{datasetCode}/filter','str','code','Use\x20`having`\x20only\x20for\x20post-aggregation\x20filters.','Get\x20BF\x20endpoint\x20function\x20contract','Aggregate\x20dataset\x20records','fields/properties\x20describe\x20data\x20shape','keyword','This\x20is\x20an\x20exact\x20lookup\x20by\x20appCode\x20+\x20functionName.\x20The\x20CLI\x20does\x20not\x20enumerate\x20Backend\x20Function\x20definitions\x20or\x20expose\x20platform-only\x20fields.','path','/api/{appCode}/{datasetCode}/getOne','bf_execute','Dataset\x20detail','Create\x20dataset\x20record','Use\x20when\x20you\x20need\x20to\x20insert\x20one\x20business\x20record\x20into\x20a\x20dataset','personal_bf_execute','title','Use\x20when\x20you\x20already\x20know\x20the\x20record\x20id\x20and\x20need\x20one\x20business\x20row\x20from\x20a\x20dataset','length','category','result\x20rows\x20contain\x20aggregate\x20aliases','Script\x20behavior\x20may\x20have\x20side\x20effects;\x20inspect\x20detail\x20first.','Endpoint\x20function\x20name','10jQIsPi','Use\x20when\x20you\x20need\x20groupBy\x20plus\x20count,\x20sum,\x20avg,\x20max,\x20or\x20min\x20aggregates','trim','filter','CLI\x20users\x20should\x20prefer\x20`lovrabet\x20dataset\x20list`\x20for\x20this\x20workflow.','2970699UcpKyv','API\x20doc\x20code,\x20for\x20example\x20dataset_list','Create\x20a\x20dataset\x20record','/api/{appCode}/{datasetCode}/aggregate','validation','7903184cLNPKY','Use\x20`lovrabet\x20sql\x20detail`\x20before\x20execution.','##\x20List\x20datasets','dataset','{\x22fieldName\x22:\x22value\x22}','None','##\x20Get\x20BF\x20endpoint\x20function\x20contract\x0a\x0aInspect\x20one\x20known\x20endpoint\x20function\x20through\x20the\x20AK-authenticated\x20exact\x20detail\x20API.','List\x20available\x20runtime\x20API\x20documentation\x20entries','Use\x20`where`,\x20`select`,\x20`orderBy`,\x20`currentPage`,\x20and\x20`pageSize`\x20to\x20inspect\x20live\x20data\x20shape.','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','##\x20Create\x20dataset\x20record\x0a\x0aCreate\x20one\x20data\x20record\x20in\x20a\x20dataset.'];a1_0x319f=function(){return _0x23f86a;};return a1_0x319f();}export const apiDocDefinitions=[apiDocList,apiDocDetail];
@@ -1 +1 @@
1
- (function(_0x5cf855,_0x7aaea2){const _0x1e19ec=a2_0x482e,_0x3cfaeb=_0x5cf855();while(!![]){try{const _0x96dd86=-parseInt(_0x1e19ec(0xe4))/0x1*(-parseInt(_0x1e19ec(0xf6))/0x2)+-parseInt(_0x1e19ec(0xf3))/0x3*(parseInt(_0x1e19ec(0xf0))/0x4)+parseInt(_0x1e19ec(0xea))/0x5+-parseInt(_0x1e19ec(0xf5))/0x6+-parseInt(_0x1e19ec(0xde))/0x7+parseInt(_0x1e19ec(0xe7))/0x8+parseInt(_0x1e19ec(0xf7))/0x9*(-parseInt(_0x1e19ec(0xe8))/0xa);if(_0x96dd86===_0x7aaea2)break;else _0x3cfaeb['push'](_0x3cfaeb['shift']());}catch(_0x2f7cd0){_0x3cfaeb['push'](_0x3cfaeb['shift']());}}}(a2_0x116e,0x75cca));import{createHash}from'node:crypto';import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{homedir}from'node:os';import{dirname,resolve}from'node:path';import{PRODUCT_CONFIG}from'../../constant/product.js';import{isRuntimeAccessibleApp}from'../../commands/app/eligibility.js';function a2_0x116e(){const _0x10750d=['2666503oWlidR','slice','cache','utf8','homeDirName','stringify','3aWXBfV','items','parse','6910912nYGfmQ','80GudkYS','find','3782615IAMerA','ak_','trim','update','digest','appCode','52AFLpxS','EXDEV','code','10527HtHIDi','hex','5093484eMmHRE','117986wUjGdg','44325mmsGwL'];a2_0x116e=function(){return _0x10750d;};return a2_0x116e();}export function fingerprintAccessKey(_0x1b3235){const _0x1f64f2=a2_0x482e,_0x1ee1e=_0x1b3235[_0x1f64f2(0xec)](),_0x24a42a=_0x1ee1e[_0x1f64f2(0xdf)](-0x6)||'unknown',_0x347f8f=createHash('sha256')[_0x1f64f2(0xed)](_0x1ee1e)[_0x1f64f2(0xee)](_0x1f64f2(0xf4))['slice'](0x0,0xc);return _0x1f64f2(0xeb)+_0x24a42a+'_'+_0x347f8f;}export function getAppCacheFilePath(_0x45d8f8,_0x2d83ce){const _0x45a03b=a2_0x482e;return resolve(homedir(),PRODUCT_CONFIG[_0x45a03b(0xe2)],_0x45a03b(0xe0),_0x45d8f8,fingerprintAccessKey(_0x2d83ce),'my-apps.json');}export function readCachedAppList(_0x2f5895,_0x11c1bc){const _0x48a620=a2_0x482e;if(!_0x11c1bc?.[_0x48a620(0xec)]())return null;const _0x329283=getAppCacheFilePath(_0x2f5895,_0x11c1bc);if(!existsSync(_0x329283))return null;try{const _0x58f035=readFileSync(_0x329283,_0x48a620(0xe1));if(!_0x58f035['trim']())return null;const _0xcd0783=JSON[_0x48a620(0xe6)](_0x58f035);if(!Array['isArray'](_0xcd0783[_0x48a620(0xe5)]))return null;return _0xcd0783;}catch{return null;}}export function writeCachedAppList(_0xc174ea,_0x4605a1,_0x485682){const _0x3ddaf4=a2_0x482e,_0x3b8675=getAppCacheFilePath(_0xc174ea,_0x4605a1),_0x2fd67a=dirname(_0x3b8675);!existsSync(_0x2fd67a)&&mkdirSync(_0x2fd67a,{'recursive':!![]});const _0xf0aa17=_0x3b8675+'.tmp';try{writeFileSync(_0xf0aa17,JSON['stringify'](_0x485682,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180});try{renameSync(_0xf0aa17,_0x3b8675);}catch(_0x5cfac6){if(_0x5cfac6['code']==='EPERM'||_0x5cfac6[_0x3ddaf4(0xf2)]===_0x3ddaf4(0xf1)||_0x5cfac6[_0x3ddaf4(0xf2)]==='EACCES'){writeFileSync(_0x3b8675,JSON[_0x3ddaf4(0xe3)](_0x485682,null,0x2)+'\x0a',{'encoding':_0x3ddaf4(0xe1)});try{unlinkSync(_0xf0aa17);}catch{}}else throw _0x5cfac6;}}catch(_0x1eec86){try{unlinkSync(_0xf0aa17);}catch{}throw _0x1eec86;}return _0x3b8675;}function a2_0x482e(_0x389e21,_0x3ad78b){_0x389e21=_0x389e21-0xde;const _0x116e11=a2_0x116e();let _0x482ec2=_0x116e11[_0x389e21];return _0x482ec2;}export function resolveCachedAppCode(_0x1fb878,_0x3ab3bd,_0x5e4005){const _0x41fa51=a2_0x482e;if(!_0x1fb878)return undefined;const _0x5cf241=readCachedAppList(_0x3ab3bd,_0x5e4005),_0x48937b=_0x5cf241?.['items'][_0x41fa51(0xe9)](_0x14dcb0=>_0x14dcb0['appName']===_0x1fb878&&isRuntimeAccessibleApp(_0x14dcb0));return _0x48937b?.[_0x41fa51(0xef)]?.['trim']()||undefined;}
1
+ (function(_0x37d129,_0x442b32){const _0x1468e5=a2_0x4bf5,_0x3f4228=_0x37d129();while(!![]){try{const _0x37427e=parseInt(_0x1468e5(0x19a))/0x1+parseInt(_0x1468e5(0x191))/0x2*(parseInt(_0x1468e5(0x186))/0x3)+parseInt(_0x1468e5(0x194))/0x4*(-parseInt(_0x1468e5(0x183))/0x5)+parseInt(_0x1468e5(0x18c))/0x6*(parseInt(_0x1468e5(0x189))/0x7)+-parseInt(_0x1468e5(0x18d))/0x8+-parseInt(_0x1468e5(0x193))/0x9+-parseInt(_0x1468e5(0x192))/0xa*(-parseInt(_0x1468e5(0x19c))/0xb);if(_0x37427e===_0x442b32)break;else _0x3f4228['push'](_0x3f4228['shift']());}catch(_0x2f1bd8){_0x3f4228['push'](_0x3f4228['shift']());}}}(a2_0x5560,0x257c0));function a2_0x4bf5(_0x591962,_0x26b02b){_0x591962=_0x591962-0x182;const _0x556081=a2_0x5560();let _0x4bf588=_0x556081[_0x591962];return _0x4bf588;}function a2_0x5560(){const _0x472918=['4510IadYjk','556974fVXChs','4oUzSxR','.tmp','my-apps.json','find','sha256','ak_','244700YaTTAc','stringify','4444PQPSzV','code','1495955txkWiF','utf8','EACCES','133617Nyegtm','trim','slice','161NgzDPU','EPERM','isArray','26166VZJnPG','2238624nRFOzd','items','appName','cache','12mlnnio'];a2_0x5560=function(){return _0x472918;};return a2_0x5560();}import{createHash}from'node:crypto';import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{homedir}from'node:os';import{dirname,resolve}from'node:path';import{PRODUCT_CONFIG}from'../../constant/product.js';import{isRuntimeAccessibleApp}from'../../commands/app/eligibility.js';export function fingerprintAccessKey(_0x288575){const _0x238153=a2_0x4bf5,_0x4f2e91=_0x288575['trim'](),_0x33073a=_0x4f2e91[_0x238153(0x188)](-0x6)||'unknown',_0x55f28b=createHash(_0x238153(0x198))['update'](_0x4f2e91)['digest']('hex')[_0x238153(0x188)](0x0,0xc);return _0x238153(0x199)+_0x33073a+'_'+_0x55f28b;}export function getAppCacheFilePath(_0x526205,_0xd032ed){const _0x21afef=a2_0x4bf5;return resolve(homedir(),PRODUCT_CONFIG['homeDirName'],_0x21afef(0x190),_0x526205,fingerprintAccessKey(_0xd032ed),_0x21afef(0x196));}export function readCachedAppList(_0x13921a,_0x268417){const _0x37227c=a2_0x4bf5;if(!_0x268417?.['trim']())return null;const _0x49aa4=getAppCacheFilePath(_0x13921a,_0x268417);if(!existsSync(_0x49aa4))return null;try{const _0x1c1bf0=readFileSync(_0x49aa4,_0x37227c(0x184));if(!_0x1c1bf0['trim']())return null;const _0x1c781f=JSON['parse'](_0x1c1bf0);if(!Array[_0x37227c(0x18b)](_0x1c781f[_0x37227c(0x18e)]))return null;return _0x1c781f;}catch{return null;}}export function writeCachedAppList(_0x130a37,_0x151e8e,_0x37f9cf){const _0x343453=a2_0x4bf5,_0xa9c77d=getAppCacheFilePath(_0x130a37,_0x151e8e),_0x2e1455=dirname(_0xa9c77d);!existsSync(_0x2e1455)&&mkdirSync(_0x2e1455,{'recursive':!![]});const _0x4ec938=_0xa9c77d+_0x343453(0x195);try{writeFileSync(_0x4ec938,JSON['stringify'](_0x37f9cf,null,0x2)+'\x0a',{'encoding':_0x343453(0x184),'mode':0x180});try{renameSync(_0x4ec938,_0xa9c77d);}catch(_0x3c957b){if(_0x3c957b[_0x343453(0x182)]===_0x343453(0x18a)||_0x3c957b[_0x343453(0x182)]==='EXDEV'||_0x3c957b[_0x343453(0x182)]===_0x343453(0x185)){writeFileSync(_0xa9c77d,JSON[_0x343453(0x19b)](_0x37f9cf,null,0x2)+'\x0a',{'encoding':_0x343453(0x184)});try{unlinkSync(_0x4ec938);}catch{}}else throw _0x3c957b;}}catch(_0x530b9d){try{unlinkSync(_0x4ec938);}catch{}throw _0x530b9d;}return _0xa9c77d;}export function resolveCachedAppCode(_0x59f13e,_0x3ca315,_0x4e95ae){const _0x1264ef=a2_0x4bf5;if(!_0x59f13e)return undefined;const _0x313904=readCachedAppList(_0x3ca315,_0x4e95ae),_0x1b65a3=_0x313904?.[_0x1264ef(0x18e)][_0x1264ef(0x197)](_0x3d65b2=>_0x3d65b2[_0x1264ef(0x18f)]===_0x59f13e&&isRuntimeAccessibleApp(_0x3d65b2));return _0x1b65a3?.['appCode']?.[_0x1264ef(0x187)]()||undefined;}
@@ -1 +1 @@
1
- const a3_0x4c4594=a3_0x53e8;(function(_0x1ad8cd,_0x4bd8c0){const _0x18cb87=a3_0x53e8,_0x4ef81f=_0x1ad8cd();while(!![]){try{const _0xd4d24=parseInt(_0x18cb87(0x10f))/0x1*(-parseInt(_0x18cb87(0x105))/0x2)+parseInt(_0x18cb87(0x106))/0x3*(parseInt(_0x18cb87(0x122))/0x4)+parseInt(_0x18cb87(0x11b))/0x5+parseInt(_0x18cb87(0x113))/0x6+parseInt(_0x18cb87(0xff))/0x7+parseInt(_0x18cb87(0x100))/0x8*(parseInt(_0x18cb87(0x134))/0x9)+-parseInt(_0x18cb87(0x11f))/0xa;if(_0xd4d24===_0x4bd8c0)break;else _0x4ef81f['push'](_0x4ef81f['shift']());}catch(_0x348b54){_0x4ef81f['push'](_0x4ef81f['shift']());}}}(a3_0x406f,0xebca8));import{appImportFlagDefs,runAppImport}from'../../commands/init.js';import{getEnv,RUNTIME_ENV_VALUES}from'../../constant/env.js';import{buildAppProfileListFields}from'../../config/schema.js';import{enrichAppListItemsWithMergedSelection}from'../../commands/app/shared.js';function a3_0x406f(){const _0x3c26f4=['type','Refreshed\x20app\x20cache\x20with\x20','push','34401060bEhIWn','pull','\x20cached\x20app(s)\x20for\x20env=\x22','30524HLLqQl','isArray','read','Target\x20environment\x20(default:\x20current\x20env)','nonInteractive','fetchedAt','../../commands/app/remote-source.js','bool','remote','langs','string','filter','Read\x20from\x20local\x20cache\x20only','name','config','\x20app(s)\x20for\x20env=\x22','local','length','329337hpTHid','boolean','entries','cachePath','production','Read\x20app\x20list\x20from\x20local\x20cache\x20only','Loaded\x20','enableI18n','trim','source','accessKey','Include\x20unpublished\x20apps\x20for\x20diagnostics','import','7226408eQSHPx','248MjbyqG','no-cache','include-unpublished','appcode','cache','2651436NKaCcz','279AhMoID','map','No\x20apps\x20found\x20on\x20the\x20platform.','globalPath','mergedCli','str','write','Reads\x20the\x20given\x20.rabetbase.json\x20and\x20imports\x20a\x20usable\x20default\x20app\x20into\x20local\x20.lovrabet.json.\x20Matching\x20keys\x20may\x20be\x20updated.','appOwnerName','1NJcGDh','env','items','find','8660436akuLmJ','List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','Filter\x20by\x20environment\x20(default:\x20current\x20env)','../../context.js','app','appName','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','i18nInfo','7059040QGQMls'];a3_0x406f=function(){return _0x3c26f4;};return a3_0x406f();}import{filterRuntimeAccessibleApps,findAppByCode,isRuntimeAccessibleApp}from'../../commands/app/eligibility.js';function a3_0x53e8(_0xc130f1,_0xb52e1c){_0xc130f1=_0xc130f1-0xf7;const _0x406fde=a3_0x406f();let _0x53e8f6=_0x406fde[_0xc130f1];return _0x53e8f6;}function collectFlags(_0x41ca1f,_0x1e9e69){const _0x37876c=a3_0x53e8,_0x293e0d={};for(const _0x381a8e of _0x1e9e69){const _0x2da776=_0x381a8e[_0x37876c(0x11c)]===_0x37876c(0x135)?_0x41ca1f[_0x37876c(0x129)](_0x381a8e['name']):_0x41ca1f['str'](_0x381a8e[_0x37876c(0x12f)]);if(_0x2da776!==''&&_0x2da776!==![])_0x293e0d[_0x381a8e[_0x37876c(0x12f)]]=_0x2da776;}if(_0x41ca1f[_0x37876c(0x126)])_0x293e0d['nonInteractive']=!![];return _0x293e0d;}function normalizeLanguages(_0x1379dc){const _0x1aa7cf=a3_0x53e8;if(!Array[_0x1aa7cf(0x123)](_0x1379dc))return[];return _0x1379dc[_0x1aa7cf(0x12d)](_0xcb45a7=>typeof _0xcb45a7===_0x1aa7cf(0x12c))['map'](_0x2c67d2=>_0x2c67d2[_0x1aa7cf(0xfa)]())[_0x1aa7cf(0x12d)](Boolean);}function buildRemoteAppI18nFields(_0x495216){const _0x1e47be=a3_0x53e8,_0x513e40=normalizeLanguages(_0x495216[_0x1e47be(0x11a)]?.[_0x1e47be(0x12b)]);return{'enableI18n':typeof _0x495216['enableI18n']===_0x1e47be(0x135)?_0x495216[_0x1e47be(0xf9)]:null,'languages':_0x513e40,'i18nInfo':_0x495216[_0x1e47be(0x11a)]?{..._0x495216[_0x1e47be(0x11a)],'langs':_0x513e40[_0x1e47be(0x133)]?_0x513e40:null}:null};}const listDef={'service':a3_0x4c4594(0x117),'command':'list','description':a3_0x4c4594(0x114),'risk':a3_0x4c4594(0x124),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':'env','type':'string','description':a3_0x4c4594(0x115),'enum':[...RUNTIME_ENV_VALUES]},{'name':'local','type':'boolean','description':a3_0x4c4594(0xf7),'default':![]},{'name':a3_0x4c4594(0x101),'type':a3_0x4c4594(0x135),'description':a3_0x4c4594(0x119),'default':![]},{'name':a3_0x4c4594(0x102),'type':a3_0x4c4594(0x135),'description':a3_0x4c4594(0xfd),'default':![]}],async 'execute'(_0x1ac836){const _0x2abe44=a3_0x4c4594,_0x1e7c22=_0x1ac836['str'](_0x2abe44(0x110))||_0x1ac836['envName']||getEnv()||_0x2abe44(0x138),_0x350e4b=_0x1ac836['bool'](_0x2abe44(0x132)),_0x5458df=_0x1ac836[_0x2abe44(0x129)](_0x2abe44(0x101)),_0x51d2db=_0x1ac836[_0x2abe44(0x129)](_0x2abe44(0x102)),{readRawConfigWithLayers:_0x40fc32,resolveDefaultAppSource:_0x1e6c7b,getLocalAppAliases:_0x1dc949}=await import(_0x2abe44(0x116)),{getRemoteAppList:_0x1eec6c}=await import(_0x2abe44(0x128)),{config:_0x2cf474,layers:_0x2b63b1}=_0x40fc32(),_0x34ac36=_0x1e6c7b(_0x2b63b1),{defaultApp:_0xf1b656}=_0x2cf474,_0x37a802=await _0x1eec6c({'env':_0x1e7c22,'accessKey':_0x1ac836['accessKey'],'localOnly':_0x350e4b,'noCache':_0x5458df}),_0x13fea2=_0x51d2db?_0x37a802[_0x2abe44(0x111)]:filterRuntimeAccessibleApps(_0x37a802['items']),_0x14f855=_0x37a802[_0x2abe44(0x111)][_0x2abe44(0x133)]-_0x13fea2['length'],_0xd15800=_0x13fea2[_0x2abe44(0x107)](_0x4ceb82=>{const _0x5caed6=_0x2abe44;return{'name':_0x4ceb82[_0x5caed6(0x118)],'appcode':_0x4ceb82['appCode'],'named':!![],'definedIn':_0x5caed6(0x12a),'isDefault':_0x4ceb82[_0x5caed6(0x118)]===_0xf1b656,...buildAppProfileListFields(_0x1e7c22),...buildRemoteAppI18nFields(_0x4ceb82),'source':_0x37a802[_0x5caed6(0xfb)],'owner':_0x4ceb82[_0x5caed6(0x10e)]??null,'status':_0x4ceb82['appPublishStatus']??null,'cachedAt':_0x37a802[_0x5caed6(0x127)]};}),_0x5bb017=_0x1dc949(_0x2cf474);let _0x5d7ee0=0x0;for(const [_0x25c90f,_0x208e90]of Object[_0x2abe44(0x136)](_0x5bb017)){const _0xbb6dda=typeof _0x208e90[_0x2abe44(0x103)]===_0x2abe44(0x12c)?_0x208e90[_0x2abe44(0x103)][_0x2abe44(0xfa)]():'';if(!_0xbb6dda)continue;const _0x3ee019=findAppByCode(_0x37a802[_0x2abe44(0x111)],_0xbb6dda);if(!_0x51d2db&&_0x3ee019&&!isRuntimeAccessibleApp(_0x3ee019))continue;_0x5d7ee0+=0x1,_0xd15800[_0x2abe44(0x11e)]({'name':_0x25c90f,'appcode':_0xbb6dda,'named':!![],'definedIn':_0x2abe44(0x132),'isDefault':_0x25c90f===_0xf1b656,...buildAppProfileListFields(_0x1e7c22),'source':_0x2abe44(0x130),'owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0xd15800,_0x1ac836[_0x2abe44(0x10a)]);const _0x6309b7=_0xd15800[_0x2abe44(0x112)](_0x3006a9=>_0x3006a9['isCurrent']===!![]),_0x5441ed=_0xf1b656??_0x6309b7?.[_0x2abe44(0x12f)]??null,_0x5e1916={'env':_0x1e7c22,'source':_0x37a802['source'],'fetchedAt':_0x37a802['fetchedAt'],'cachePath':_0x37a802['cachePath'],'globalPath':_0x2b63b1[_0x2abe44(0x109)]??null,'projectPath':_0x2b63b1['projectPath']??null,'defaultApp':_0x5441ed,'defaultAppSource':_0xf1b656!=null?_0x34ac36:null,'localAliasCount':_0x5d7ee0,'remoteTotal':_0x37a802['items'][_0x2abe44(0x133)],'hiddenUnpublishedCount':_0x14f855,'includeUnpublished':_0x51d2db};if(_0xd15800[_0x2abe44(0x133)]===0x0)return{'ok':!![],'data':{'items':_0xd15800,'meta':_0x5e1916},'message':_0x37a802[_0x2abe44(0xfb)]===_0x2abe44(0x104)?'No\x20cached\x20apps\x20found.':_0x2abe44(0x108)};return{'ok':!![],'data':{'items':_0xd15800,'meta':_0x5e1916}};}},pullDef={'service':a3_0x4c4594(0x117),'command':a3_0x4c4594(0x120),'description':'Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','risk':a3_0x4c4594(0x10c),'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':'env','type':'string','description':a3_0x4c4594(0x125),'enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0x4c4594(0x132),'type':a3_0x4c4594(0x135),'description':a3_0x4c4594(0x12e),'default':![]},{'name':a3_0x4c4594(0x101),'type':a3_0x4c4594(0x135),'description':'Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','default':![]}],async 'execute'(_0xb94d80){const _0x44074a=a3_0x4c4594,_0x300875=_0xb94d80[_0x44074a(0x10b)](_0x44074a(0x110))||_0xb94d80['envName']||getEnv()||'production',_0x456e56=_0xb94d80[_0x44074a(0x129)]('local'),_0x1259df=_0xb94d80[_0x44074a(0x129)](_0x44074a(0x101)),{getRemoteAppList:_0x1bc961}=await import('../../commands/app/remote-source.js'),_0x37ec03=await _0x1bc961({'env':_0x300875,'accessKey':_0xb94d80[_0x44074a(0xfc)],'localOnly':_0x456e56,'noCache':_0x1259df});return{'ok':!![],'data':{'total':_0x37ec03['items'][_0x44074a(0x133)],'env':_0x300875,'source':_0x37ec03[_0x44074a(0xfb)],'fetchedAt':_0x37ec03[_0x44074a(0x127)],'cachePath':_0x37ec03[_0x44074a(0x137)]},'message':_0x37ec03[_0x44074a(0xfb)]===_0x44074a(0x104)?_0x44074a(0xf8)+_0x37ec03['items'][_0x44074a(0x133)]+_0x44074a(0x121)+_0x300875+'\x22.':_0x44074a(0x11d)+_0x37ec03[_0x44074a(0x111)][_0x44074a(0x133)]+_0x44074a(0x131)+_0x300875+'\x22.'};}},importDef={'service':'app','command':a3_0x4c4594(0xfe),'description':'Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','risk':a3_0x4c4594(0x10c),'confirmationDescription':a3_0x4c4594(0x10d),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':appImportFlagDefs,async 'execute'(_0x253dd8){return await runAppImport(collectFlags(_0x253dd8,appImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[listDef,pullDef,importDef];
1
+ function a3_0x6090(){const _0x4e9471=['source','Reads\x20the\x20given\x20.rabetbase.json\x20and\x20imports\x20a\x20usable\x20default\x20app\x20into\x20local\x20.lovrabet.json.\x20Matching\x20keys\x20may\x20be\x20updated.','filter','bool','Target\x20environment\x20(default:\x20current\x20env)','appPublishStatus','pull','accessKey','\x20app(s)\x20for\x20env=\x22','1391060airJDS','string','../../commands/app/remote-source.js','find','2882360lCPVpd','items','no-cache','app','Filter\x20by\x20environment\x20(default:\x20current\x20env)','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','fetchedAt','Read\x20from\x20local\x20cache\x20only','isArray','entries','enableI18n','Reads\x20the\x20apps\x20available\x20to\x20the\x20current\x20account\x20and\x20overwrites\x20the\x20local\x20app\x20cache\x20for\x20that\x20environment.\x20Platform\x20apps\x20are\x20not\x20modified.','appName','map','appCode','read','appOwnerName','1172980SjcaGR','List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','6qoSows','import','globalPath','length','181574MdawYv','name','Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','appcode','envName','6iHcjhR','cachePath','144467CATyhW','cache','remote','production','Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','include-unpublished','trim','Loaded\x20','Include\x20unpublished\x20apps\x20for\x20diagnostics','nonInteractive','str','2198119VZtKzd','write','boolean','projectPath','isCurrent','list','119208jFtdaS','mergedCli','local','Read\x20app\x20list\x20from\x20local\x20cache\x20only','No\x20apps\x20found\x20on\x20the\x20platform.','env','i18nInfo','27GnmFbW'];a3_0x6090=function(){return _0x4e9471;};return a3_0x6090();}const a3_0x4eea0c=a3_0x473a;(function(_0x371640,_0x3598bb){const _0x106e1f=a3_0x473a,_0x5ab95c=_0x371640();while(!![]){try{const _0x22a663=-parseInt(_0x106e1f(0x211))/0x1+parseInt(_0x106e1f(0x20a))/0x2*(-parseInt(_0x106e1f(0x20f))/0x3)+parseInt(_0x106e1f(0x1ef))/0x4+parseInt(_0x106e1f(0x204))/0x5+parseInt(_0x106e1f(0x206))/0x6*(-parseInt(_0x106e1f(0x1d8))/0x7)+parseInt(_0x106e1f(0x1de))/0x8*(-parseInt(_0x106e1f(0x1e5))/0x9)+parseInt(_0x106e1f(0x1f3))/0xa;if(_0x22a663===_0x3598bb)break;else _0x5ab95c['push'](_0x5ab95c['shift']());}catch(_0x9281b9){_0x5ab95c['push'](_0x5ab95c['shift']());}}}(a3_0x6090,0x2d5ec));import{appImportFlagDefs,runAppImport}from'../../commands/init.js';import{getEnv,RUNTIME_ENV_VALUES}from'../../constant/env.js';import{buildAppProfileListFields}from'../../config/schema.js';import{enrichAppListItemsWithMergedSelection}from'../../commands/app/shared.js';import{filterRuntimeAccessibleApps,findAppByCode,isRuntimeAccessibleApp}from'../../commands/app/eligibility.js';function a3_0x473a(_0x3bf984,_0x211453){_0x3bf984=_0x3bf984-0x1ce;const _0x6090d2=a3_0x6090();let _0x473a63=_0x6090d2[_0x3bf984];return _0x473a63;}function collectFlags(_0x4c9aea,_0x133aab){const _0x5777f2=a3_0x473a,_0x4ed5d0={};for(const _0x52890d of _0x133aab){const _0x291686=_0x52890d['type']===_0x5777f2(0x1da)?_0x4c9aea['bool'](_0x52890d[_0x5777f2(0x20b)]):_0x4c9aea[_0x5777f2(0x1d7)](_0x52890d[_0x5777f2(0x20b)]);if(_0x291686!==''&&_0x291686!==![])_0x4ed5d0[_0x52890d['name']]=_0x291686;}if(_0x4c9aea[_0x5777f2(0x1d6)])_0x4ed5d0[_0x5777f2(0x1d6)]=!![];return _0x4ed5d0;}function normalizeLanguages(_0x2588d5){const _0x164f7a=a3_0x473a;if(!Array[_0x164f7a(0x1fb)](_0x2588d5))return[];return _0x2588d5[_0x164f7a(0x1e8)](_0x487d03=>typeof _0x487d03===_0x164f7a(0x1f0))[_0x164f7a(0x200)](_0x48f681=>_0x48f681[_0x164f7a(0x1d3)]())['filter'](Boolean);}function buildRemoteAppI18nFields(_0x5edbe8){const _0xc473fb=a3_0x473a,_0x20aecd=normalizeLanguages(_0x5edbe8['i18nInfo']?.['langs']);return{'enableI18n':typeof _0x5edbe8[_0xc473fb(0x1fd)]===_0xc473fb(0x1da)?_0x5edbe8[_0xc473fb(0x1fd)]:null,'languages':_0x20aecd,'i18nInfo':_0x5edbe8['i18nInfo']?{..._0x5edbe8[_0xc473fb(0x1e4)],'langs':_0x20aecd[_0xc473fb(0x209)]?_0x20aecd:null}:null};}const listDef={'service':'app','command':a3_0x4eea0c(0x1dd),'description':a3_0x4eea0c(0x205),'risk':a3_0x4eea0c(0x202),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':a3_0x4eea0c(0x1e3),'type':'string','description':a3_0x4eea0c(0x1f7),'enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0x4eea0c(0x1e0),'type':a3_0x4eea0c(0x1da),'description':a3_0x4eea0c(0x1e1),'default':![]},{'name':'no-cache','type':'boolean','description':a3_0x4eea0c(0x1f8),'default':![]},{'name':a3_0x4eea0c(0x1d2),'type':'boolean','description':a3_0x4eea0c(0x1d5),'default':![]}],async 'execute'(_0x1e750c){const _0x520f13=a3_0x4eea0c,_0x49b7b3=_0x1e750c[_0x520f13(0x1d7)](_0x520f13(0x1e3))||_0x1e750c[_0x520f13(0x20e)]||getEnv()||_0x520f13(0x1d0),_0x3a6f7f=_0x1e750c[_0x520f13(0x1e9)]('local'),_0x90884a=_0x1e750c['bool'](_0x520f13(0x1f5)),_0x4eff62=_0x1e750c[_0x520f13(0x1e9)](_0x520f13(0x1d2)),{readRawConfigWithLayers:_0x4dbd1e,resolveDefaultAppSource:_0x4f9f79,getLocalAppAliases:_0x3f4bb9}=await import('../../context.js'),{getRemoteAppList:_0x2f102c}=await import(_0x520f13(0x1f1)),{config:_0x36bac3,layers:_0x4d00a6}=_0x4dbd1e(),_0x221737=_0x4f9f79(_0x4d00a6),{defaultApp:_0x1ca22e}=_0x36bac3,_0x441eee=await _0x2f102c({'env':_0x49b7b3,'accessKey':_0x1e750c[_0x520f13(0x1ed)],'localOnly':_0x3a6f7f,'noCache':_0x90884a}),_0x1f676a=_0x4eff62?_0x441eee['items']:filterRuntimeAccessibleApps(_0x441eee[_0x520f13(0x1f4)]),_0x548e2d=_0x441eee[_0x520f13(0x1f4)][_0x520f13(0x209)]-_0x1f676a[_0x520f13(0x209)],_0x550a8a=_0x1f676a['map'](_0x5deba9=>{const _0x3918d5=_0x520f13;return{'name':_0x5deba9[_0x3918d5(0x1ff)],'appcode':_0x5deba9[_0x3918d5(0x201)],'named':!![],'definedIn':_0x3918d5(0x1cf),'isDefault':_0x5deba9[_0x3918d5(0x1ff)]===_0x1ca22e,...buildAppProfileListFields(_0x49b7b3),...buildRemoteAppI18nFields(_0x5deba9),'source':_0x441eee['source'],'owner':_0x5deba9[_0x3918d5(0x203)]??null,'status':_0x5deba9[_0x3918d5(0x1eb)]??null,'cachedAt':_0x441eee[_0x3918d5(0x1f9)]};}),_0x30e5b8=_0x3f4bb9(_0x36bac3);let _0x10b3cb=0x0;for(const [_0xe9a078,_0x50fe18]of Object[_0x520f13(0x1fc)](_0x30e5b8)){const _0x113f48=typeof _0x50fe18['appcode']===_0x520f13(0x1f0)?_0x50fe18[_0x520f13(0x20d)]['trim']():'';if(!_0x113f48)continue;const _0x4b63fd=findAppByCode(_0x441eee['items'],_0x113f48);if(!_0x4eff62&&_0x4b63fd&&!isRuntimeAccessibleApp(_0x4b63fd))continue;_0x10b3cb+=0x1,_0x550a8a['push']({'name':_0xe9a078,'appcode':_0x113f48,'named':!![],'definedIn':_0x520f13(0x1e0),'isDefault':_0xe9a078===_0x1ca22e,...buildAppProfileListFields(_0x49b7b3),'source':'config','owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0x550a8a,_0x1e750c[_0x520f13(0x1df)]);const _0x51614a=_0x550a8a[_0x520f13(0x1f2)](_0x2127dc=>_0x2127dc[_0x520f13(0x1dc)]===!![]),_0xff6b85=_0x1ca22e??_0x51614a?.['name']??null,_0x13eb13={'env':_0x49b7b3,'source':_0x441eee['source'],'fetchedAt':_0x441eee[_0x520f13(0x1f9)],'cachePath':_0x441eee[_0x520f13(0x210)],'globalPath':_0x4d00a6[_0x520f13(0x208)]??null,'projectPath':_0x4d00a6[_0x520f13(0x1db)]??null,'defaultApp':_0xff6b85,'defaultAppSource':_0x1ca22e!=null?_0x221737:null,'localAliasCount':_0x10b3cb,'remoteTotal':_0x441eee['items']['length'],'hiddenUnpublishedCount':_0x548e2d,'includeUnpublished':_0x4eff62};if(_0x550a8a[_0x520f13(0x209)]===0x0)return{'ok':!![],'data':{'items':_0x550a8a,'meta':_0x13eb13},'message':_0x441eee[_0x520f13(0x1e6)]===_0x520f13(0x1ce)?'No\x20cached\x20apps\x20found.':_0x520f13(0x1e2)};return{'ok':!![],'data':{'items':_0x550a8a,'meta':_0x13eb13}};}},pullDef={'service':a3_0x4eea0c(0x1f6),'command':a3_0x4eea0c(0x1ec),'description':a3_0x4eea0c(0x1d1),'risk':'write','confirmationDescription':a3_0x4eea0c(0x1fe),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a3_0x4eea0c(0x1e3),'type':'string','description':a3_0x4eea0c(0x1ea),'enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0x4eea0c(0x1e0),'type':a3_0x4eea0c(0x1da),'description':a3_0x4eea0c(0x1fa),'default':![]},{'name':'no-cache','type':a3_0x4eea0c(0x1da),'description':a3_0x4eea0c(0x1f8),'default':![]}],async 'execute'(_0x49aaaa){const _0x3d9007=a3_0x4eea0c,_0x34f312=_0x49aaaa[_0x3d9007(0x1d7)]('env')||_0x49aaaa[_0x3d9007(0x20e)]||getEnv()||_0x3d9007(0x1d0),_0x34c4c7=_0x49aaaa['bool'](_0x3d9007(0x1e0)),_0x20dc92=_0x49aaaa[_0x3d9007(0x1e9)]('no-cache'),{getRemoteAppList:_0x51bbcc}=await import('../../commands/app/remote-source.js'),_0x262a8d=await _0x51bbcc({'env':_0x34f312,'accessKey':_0x49aaaa[_0x3d9007(0x1ed)],'localOnly':_0x34c4c7,'noCache':_0x20dc92});return{'ok':!![],'data':{'total':_0x262a8d['items'][_0x3d9007(0x209)],'env':_0x34f312,'source':_0x262a8d['source'],'fetchedAt':_0x262a8d['fetchedAt'],'cachePath':_0x262a8d[_0x3d9007(0x210)]},'message':_0x262a8d[_0x3d9007(0x1e6)]===_0x3d9007(0x1ce)?_0x3d9007(0x1d4)+_0x262a8d[_0x3d9007(0x1f4)][_0x3d9007(0x209)]+'\x20cached\x20app(s)\x20for\x20env=\x22'+_0x34f312+'\x22.':'Refreshed\x20app\x20cache\x20with\x20'+_0x262a8d[_0x3d9007(0x1f4)][_0x3d9007(0x209)]+_0x3d9007(0x1ee)+_0x34f312+'\x22.'};}},importDef={'service':a3_0x4eea0c(0x1f6),'command':a3_0x4eea0c(0x207),'description':a3_0x4eea0c(0x20c),'risk':a3_0x4eea0c(0x1d9),'confirmationDescription':a3_0x4eea0c(0x1e7),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':appImportFlagDefs,async 'execute'(_0x1996de){return await runAppImport(collectFlags(_0x1996de,appImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[listDef,pullDef,importDef];
@@ -1 +1 @@
1
- (function(_0x55b4a4,_0x79a229){const _0x5d4040=a4_0x1903,_0x510d48=_0x55b4a4();while(!![]){try{const _0x437bf2=-parseInt(_0x5d4040(0x17c))/0x1+parseInt(_0x5d4040(0x184))/0x2+-parseInt(_0x5d4040(0x180))/0x3+parseInt(_0x5d4040(0x17f))/0x4*(parseInt(_0x5d4040(0x171))/0x5)+parseInt(_0x5d4040(0x17b))/0x6*(-parseInt(_0x5d4040(0x185))/0x7)+-parseInt(_0x5d4040(0x16e))/0x8*(-parseInt(_0x5d4040(0x179))/0x9)+parseInt(_0x5d4040(0x17d))/0xa;if(_0x437bf2===_0x79a229)break;else _0x510d48['push'](_0x510d48['shift']());}catch(_0x3c612c){_0x510d48['push'](_0x510d48['shift']());}}}(a4_0x246b,0x8c151));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(_0x2af8b7){const _0x2e544a=a4_0x1903;if(typeof _0x2af8b7!==_0x2e544a(0x178))return null;const _0x38c479=_0x2af8b7['trim']();return _0x38c479?_0x38c479[_0x2e544a(0x17e)]():null;}function a4_0x246b(){const _0x44bfa3=['appPublishStatus','.\x20Publish\x20the\x20app\x20before\x20using\x20','1955DGlulP','App\x20','filter','appName','find','trim','appCode','string','3006lneMSZ','UNKNOWN','34014tJUIkm','94637knVdQb','13049680PqdKDF','toUpperCase','6944tEwsnw','2278446OHBBIS','validation','\x20dataset/data/sql/bff\x20commands,\x20or\x20choose\x20a\x20published\x20app.','Current\x20status:\x20','313968peUSOK','980wYkxXu','1936VirYfU'];a4_0x246b=function(){return _0x44bfa3;};return a4_0x246b();}export function isRuntimeAccessibleApp(_0x2e9d50){const _0x49c211=a4_0x1903;return normalizeAppPublishStatus(_0x2e9d50[_0x49c211(0x16f)])===RUNTIME_ACCESSIBLE_APP_STATUS;}export function filterRuntimeAccessibleApps(_0x10becc){const _0xe4c4c8=a4_0x1903;return _0x10becc[_0xe4c4c8(0x173)](isRuntimeAccessibleApp);}function a4_0x1903(_0x30210a,_0x5c56a2){_0x30210a=_0x30210a-0x16e;const _0x246bf7=a4_0x246b();let _0x190399=_0x246bf7[_0x30210a];return _0x190399;}export function findAppByName(_0x20646c,_0x39d01b){const _0x27f99e=a4_0x1903;return _0x20646c['find'](_0x9f3838=>_0x9f3838[_0x27f99e(0x174)]===_0x39d01b);}export function findAppByCode(_0x99d19d,_0x5d4d63){const _0x57bd17=a4_0x1903,_0x24a277=_0x5d4d63[_0x57bd17(0x176)]();if(!_0x24a277)return undefined;return _0x99d19d[_0x57bd17(0x175)](_0x3426ca=>_0x3426ca[_0x57bd17(0x177)]?.[_0x57bd17(0x176)]()===_0x24a277);}export function runtimeInaccessibleAppError(_0x6e8d85,_0x4c12e0){const _0x3425bd=a4_0x1903,_0x2ce788=normalizeAppPublishStatus(_0x6e8d85[_0x3425bd(0x16f)])??_0x3425bd(0x17a);return CliErrors[_0x3425bd(0x181)](_0x3425bd(0x172)+_0x4c12e0+'\x20is\x20not\x20available\x20for\x20runtime\x20AI\x20access.',_0x3425bd(0x183)+_0x2ce788+_0x3425bd(0x170)+CLI_BIN_NAME+_0x3425bd(0x182));}
1
+ (function(_0x44cfe2,_0x29b038){const _0x1fc13b=a4_0x1979,_0x53b491=_0x44cfe2();while(!![]){try{const _0x1b0f84=-parseInt(_0x1fc13b(0x128))/0x1*(parseInt(_0x1fc13b(0x113))/0x2)+-parseInt(_0x1fc13b(0x11f))/0x3+-parseInt(_0x1fc13b(0x118))/0x4*(parseInt(_0x1fc13b(0x115))/0x5)+parseInt(_0x1fc13b(0x11d))/0x6+-parseInt(_0x1fc13b(0x11c))/0x7+parseInt(_0x1fc13b(0x122))/0x8*(-parseInt(_0x1fc13b(0x124))/0x9)+parseInt(_0x1fc13b(0x116))/0xa;if(_0x1b0f84===_0x29b038)break;else _0x53b491['push'](_0x53b491['shift']());}catch(_0x2ef497){_0x53b491['push'](_0x53b491['shift']());}}}(a4_0xe903,0x1fe27));import{CLI_BIN_NAME}from'../../constant/cli.js';import{RUNTIME_ACCESSIBLE_APP_STATUS}from'../../constant/app.js';function a4_0xe903(){const _0x6cca35=['1aIGEKf','68214axXtqN','.\x20Publish\x20the\x20app\x20before\x20using\x20','206405KGXFQT','4950960rJMWDf','App\x20','16rvRLbb','find','appCode','trim','928039xwVFjU','1339650ENBaTQ','\x20is\x20not\x20available\x20for\x20runtime\x20AI\x20access.','92934ZOsLzT','validation','toUpperCase','899944FihVyR','appPublishStatus','18rJhUeV','UNKNOWN','filter','Current\x20status:\x20'];a4_0xe903=function(){return _0x6cca35;};return a4_0xe903();}import{CliErrors}from'../../errors.js';export function normalizeAppPublishStatus(_0x2b8972){const _0x3ecdb6=a4_0x1979;if(typeof _0x2b8972!=='string')return null;const _0x4c64a6=_0x2b8972['trim']();return _0x4c64a6?_0x4c64a6[_0x3ecdb6(0x121)]():null;}export function isRuntimeAccessibleApp(_0x41ba55){const _0xba2856=a4_0x1979;return normalizeAppPublishStatus(_0x41ba55[_0xba2856(0x123)])===RUNTIME_ACCESSIBLE_APP_STATUS;}export function filterRuntimeAccessibleApps(_0x30cfe0){const _0x382424=a4_0x1979;return _0x30cfe0[_0x382424(0x126)](isRuntimeAccessibleApp);}function a4_0x1979(_0x39d0d1,_0x111710){_0x39d0d1=_0x39d0d1-0x113;const _0xe90378=a4_0xe903();let _0x1979ca=_0xe90378[_0x39d0d1];return _0x1979ca;}export function findAppByName(_0x297272,_0x26fb7b){return _0x297272['find'](_0x2f3569=>_0x2f3569['appName']===_0x26fb7b);}export function findAppByCode(_0x195bb8,_0x5b7ff8){const _0x50f872=a4_0x1979,_0x3ef086=_0x5b7ff8['trim']();if(!_0x3ef086)return undefined;return _0x195bb8[_0x50f872(0x119)](_0x100aec=>_0x100aec[_0x50f872(0x11a)]?.[_0x50f872(0x11b)]()===_0x3ef086);}export function runtimeInaccessibleAppError(_0x33a7da,_0x45f211){const _0x3e0cd8=a4_0x1979,_0x5ce18d=normalizeAppPublishStatus(_0x33a7da['appPublishStatus'])??_0x3e0cd8(0x125);return CliErrors[_0x3e0cd8(0x120)](_0x3e0cd8(0x117)+_0x45f211+_0x3e0cd8(0x11e),_0x3e0cd8(0x127)+_0x5ce18d+_0x3e0cd8(0x114)+CLI_BIN_NAME+'\x20dataset/data/sql/bff\x20commands,\x20or\x20choose\x20a\x20published\x20app.');}
@@ -1 +1 @@
1
- (function(_0x72324c,_0x436b20){const _0x351f7c=a5_0x5730,_0x1ca78d=_0x72324c();while(!![]){try{const _0x1f9285=parseInt(_0x351f7c(0xed))/0x1+parseInt(_0x351f7c(0xf5))/0x2+-parseInt(_0x351f7c(0xf4))/0x3+parseInt(_0x351f7c(0xfa))/0x4+-parseInt(_0x351f7c(0xf6))/0x5*(parseInt(_0x351f7c(0xf9))/0x6)+-parseInt(_0x351f7c(0xef))/0x7+parseInt(_0x351f7c(0xfc))/0x8*(parseInt(_0x351f7c(0xf8))/0x9);if(_0x1f9285===_0x436b20)break;else _0x1ca78d['push'](_0x1ca78d['shift']());}catch(_0x490c64){_0x1ca78d['push'](_0x1ca78d['shift']());}}}(a5_0x4943,0x68cff));import{fileURLToPath}from'url';function a5_0x4943(){const _0x11f92b=['305220yIbBfu','859976NoxZVK','480tkQklh','data','5016717BkFYfl','49188EfwDoN','2711616Hupfws','errorMsg','8iPJfTG','228436hlNifJ','errorCode','4029774PzBFlH','../../../mock/app-list.json','success','parse','tableData'];a5_0x4943=function(){return _0x11f92b;};return a5_0x4943();}import{dirname,join}from'path';import{readFileSync}from'fs';function a5_0x5730(_0x5254e1,_0x5c5d31){_0x5254e1=_0x5254e1-0xed;const _0x494349=a5_0x4943();let _0x57301f=_0x494349[_0x5254e1];return _0x57301f;}const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function loadMockAppList(){const _0x49901b=a5_0x5730,_0x2c9795=join(__dirname,_0x49901b(0xf0)),_0x3d5228=readFileSync(_0x2c9795,'utf-8');return JSON[_0x49901b(0xf2)](_0x3d5228);}let _cached=null;export function getMockAppList(){return!_cached&&(_cached=loadMockAppList()),_cached;}export function getMockRemoteAppItems(){const _0x5a0b9d=a5_0x5730,_0xade535=getMockAppList();if(!_0xade535[_0x5a0b9d(0xf1)])throw new Error('Mock\x20API\x20error:\x20'+_0xade535[_0x5a0b9d(0xfb)]+'\x20('+_0xade535[_0x5a0b9d(0xee)]+')');return _0xade535[_0x5a0b9d(0xf7)][_0x5a0b9d(0xf3)];}
1
+ (function(_0x106288,_0x1ab529){const _0x282c18=a5_0x2a06,_0x1acec7=_0x106288();while(!![]){try{const _0x3e3356=parseInt(_0x282c18(0x8b))/0x1+-parseInt(_0x282c18(0x84))/0x2*(-parseInt(_0x282c18(0x86))/0x3)+-parseInt(_0x282c18(0x85))/0x4+-parseInt(_0x282c18(0x90))/0x5+parseInt(_0x282c18(0x8f))/0x6+parseInt(_0x282c18(0x89))/0x7*(parseInt(_0x282c18(0x8e))/0x8)+-parseInt(_0x282c18(0x92))/0x9;if(_0x3e3356===_0x1ab529)break;else _0x1acec7['push'](_0x1acec7['shift']());}catch(_0x3350f8){_0x1acec7['push'](_0x1acec7['shift']());}}}(a5_0x2f7e,0x332ce));import{fileURLToPath}from'url';import{dirname,join}from'path';import{readFileSync}from'fs';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function a5_0x2f7e(){const _0xa8822b=['168sOBuyf','success','parse','497QrbrPX','Mock\x20API\x20error:\x20','339893acaeYe','errorCode','tableData','23448PPjKFf','1951392ucrjuS','1228780ugXgGO','../../../mock/app-list.json','1390239gxBjFo','data','2974umlUxS','1386628sluWHd'];a5_0x2f7e=function(){return _0xa8822b;};return a5_0x2f7e();}function a5_0x2a06(_0x4db049,_0x3b612e){_0x4db049=_0x4db049-0x83;const _0x2f7e1c=a5_0x2f7e();let _0x2a060a=_0x2f7e1c[_0x4db049];return _0x2a060a;}function loadMockAppList(){const _0x823177=a5_0x2a06,_0x283c96=join(__dirname,_0x823177(0x91)),_0x133607=readFileSync(_0x283c96,'utf-8');return JSON[_0x823177(0x88)](_0x133607);}let _cached=null;export function getMockAppList(){return!_cached&&(_cached=loadMockAppList()),_cached;}export function getMockRemoteAppItems(){const _0x4c3e78=a5_0x2a06,_0x337f05=getMockAppList();if(!_0x337f05[_0x4c3e78(0x87)])throw new Error(_0x4c3e78(0x8a)+_0x337f05['errorMsg']+'\x20('+_0x337f05[_0x4c3e78(0x8c)]+')');return _0x337f05[_0x4c3e78(0x83)][_0x4c3e78(0x8d)];}
@@ -1 +1 @@
1
- (function(_0x1fae7b,_0x634cc0){const _0x3faad2=a6_0x233f,_0x53306d=_0x1fae7b();while(!![]){try{const _0x395c4d=parseInt(_0x3faad2(0x8a))/0x1+-parseInt(_0x3faad2(0x96))/0x2+-parseInt(_0x3faad2(0x90))/0x3+-parseInt(_0x3faad2(0x98))/0x4*(-parseInt(_0x3faad2(0x93))/0x5)+parseInt(_0x3faad2(0x8f))/0x6*(parseInt(_0x3faad2(0x8d))/0x7)+parseInt(_0x3faad2(0x99))/0x8*(-parseInt(_0x3faad2(0x94))/0x9)+parseInt(_0x3faad2(0x92))/0xa*(parseInt(_0x3faad2(0x91))/0xb);if(_0x395c4d===_0x634cc0)break;else _0x53306d['push'](_0x53306d['shift']());}catch(_0x59d5fd){_0x53306d['push'](_0x53306d['shift']());}}}(a6_0x24b3,0x9fc79));import{getMyApps}from'../../core/api-client.js';import{getMockRemoteAppItems}from'../../commands/app/mock-loader.js';import{getAppCacheFilePath,readCachedAppList,writeCachedAppList}from'../../commands/app/cache.js';function a6_0x233f(_0x111f8d,_0xceef3c){_0x111f8d=_0x111f8d-0x87;const _0x24b38b=a6_0x24b3();let _0x233f07=_0x24b38b[_0x111f8d];return _0x233f07;}import{productEnv}from'../../constant/product.js';export function shouldUseMockRemoteApps(){const _0x51563b=a6_0x233f,_0x1834e1=(productEnv(_0x51563b(0x9a))||'')[_0x51563b(0x8c)]()[_0x51563b(0x89)]();return _0x1834e1===_0x51563b(0x97);}export async function getRemoteAppItems(){if(shouldUseMockRemoteApps())return getMockRemoteAppItems();return getMyApps();}export async function getRemoteAppList(_0x8c027d){const _0x4d8364=a6_0x233f,{env:_0x5f3977,accessKey:_0x19aa42,localOnly:localOnly=![],noCache:noCache=![]}=_0x8c027d,_0x3def77=readCachedAppList(_0x5f3977,_0x19aa42),_0x3b167c=_0x19aa42?.[_0x4d8364(0x8c)]()?getAppCacheFilePath(_0x5f3977,_0x19aa42):null;if(localOnly)return{'items':_0x3def77?.[_0x4d8364(0x8e)]??[],'source':_0x4d8364(0x95),'fetchedAt':_0x3def77?.[_0x4d8364(0x87)]??null,'cachePath':_0x3b167c};try{const _0x327e10=await getRemoteAppItems(),_0x366db2=shouldUseMockRemoteApps()?_0x4d8364(0x97):_0x4d8364(0x88),_0x205743=new Date()[_0x4d8364(0x8b)](),_0x1a8d3a=_0x19aa42?.['trim']()?writeCachedAppList(_0x5f3977,_0x19aa42,{'env':_0x5f3977,'fetchedAt':_0x205743,'source':_0x366db2,'items':_0x327e10}):null;return{'items':_0x327e10,'source':_0x366db2,'fetchedAt':_0x205743,'cachePath':_0x1a8d3a};}catch(_0xc1d638){if(!noCache&&_0x3def77)return{'items':_0x3def77['items'],'source':_0x4d8364(0x95),'fetchedAt':_0x3def77[_0x4d8364(0x87)],'cachePath':_0x3b167c};throw _0xc1d638;}}function a6_0x24b3(){const _0x12f8f5=['2077851sCDjPV','2255GsRaSF','31840XHvGir','755WRjWKw','18CyVKXP','cache','2095070YfOBiM','mock','28216miUICU','213072mStvTK','APP_LIST_SOURCE','fetchedAt','remote','toLowerCase','239387XPFNfz','toISOString','trim','429289aYHXqn','items','48rvYPlK'];a6_0x24b3=function(){return _0x12f8f5;};return a6_0x24b3();}
1
+ (function(_0x41cdaa,_0x3bb271){const _0x533a5a=a6_0x29e5,_0x567705=_0x41cdaa();while(!![]){try{const _0x399eb6=-parseInt(_0x533a5a(0xd2))/0x1*(-parseInt(_0x533a5a(0xc9))/0x2)+parseInt(_0x533a5a(0xcb))/0x3*(-parseInt(_0x533a5a(0xcf))/0x4)+parseInt(_0x533a5a(0xcc))/0x5+parseInt(_0x533a5a(0xd7))/0x6*(-parseInt(_0x533a5a(0xca))/0x7)+-parseInt(_0x533a5a(0xcd))/0x8+-parseInt(_0x533a5a(0xd1))/0x9*(parseInt(_0x533a5a(0xd3))/0xa)+parseInt(_0x533a5a(0xd4))/0xb;if(_0x399eb6===_0x3bb271)break;else _0x567705['push'](_0x567705['shift']());}catch(_0x49b215){_0x567705['push'](_0x567705['shift']());}}}(a6_0x558d,0xd2e59));function a6_0x558d(){const _0x21342f=['fetchedAt','12CBzcAM','items','10641069kIQdJN','1fSPeZA','10crPubj','44498597ycvBza','trim','APP_LIST_SOURCE','330qYNpyZ','mock','cache','toISOString','1067996mzFIwv','108115IFrXdO','677517dFLJgg','1686435xAsLwc','10747568WpHIQg'];a6_0x558d=function(){return _0x21342f;};return a6_0x558d();}import{getMyApps}from'../../core/api-client.js';import{getMockRemoteAppItems}from'../../commands/app/mock-loader.js';import{getAppCacheFilePath,readCachedAppList,writeCachedAppList}from'../../commands/app/cache.js';import{productEnv}from'../../constant/product.js';function a6_0x29e5(_0x5bd2bc,_0x55f287){_0x5bd2bc=_0x5bd2bc-0xc7;const _0x558d39=a6_0x558d();let _0x29e50e=_0x558d39[_0x5bd2bc];return _0x29e50e;}export function shouldUseMockRemoteApps(){const _0x338f54=a6_0x29e5,_0x95f314=(productEnv(_0x338f54(0xd6))||'')[_0x338f54(0xd5)]()['toLowerCase']();return _0x95f314===_0x338f54(0xd8);}export async function getRemoteAppItems(){if(shouldUseMockRemoteApps())return getMockRemoteAppItems();return getMyApps();}export async function getRemoteAppList(_0x556f43){const _0x1139e0=a6_0x29e5,{env:_0x57b693,accessKey:_0x28f699,localOnly:localOnly=![],noCache:noCache=![]}=_0x556f43,_0x417f1e=readCachedAppList(_0x57b693,_0x28f699),_0x1ddc2f=_0x28f699?.[_0x1139e0(0xd5)]()?getAppCacheFilePath(_0x57b693,_0x28f699):null;if(localOnly)return{'items':_0x417f1e?.['items']??[],'source':_0x1139e0(0xc7),'fetchedAt':_0x417f1e?.[_0x1139e0(0xce)]??null,'cachePath':_0x1ddc2f};try{const _0x4f0796=await getRemoteAppItems(),_0x3bab52=shouldUseMockRemoteApps()?'mock':'remote',_0x55cf40=new Date()[_0x1139e0(0xc8)](),_0x59cadc=_0x28f699?.[_0x1139e0(0xd5)]()?writeCachedAppList(_0x57b693,_0x28f699,{'env':_0x57b693,'fetchedAt':_0x55cf40,'source':_0x3bab52,'items':_0x4f0796}):null;return{'items':_0x4f0796,'source':_0x3bab52,'fetchedAt':_0x55cf40,'cachePath':_0x59cadc};}catch(_0x3519df){if(!noCache&&_0x417f1e)return{'items':_0x417f1e[_0x1139e0(0xd0)],'source':_0x1139e0(0xc7),'fetchedAt':_0x417f1e[_0x1139e0(0xce)],'cachePath':_0x1ddc2f};throw _0x3519df;}}
@@ -1 +1 @@
1
- (function(_0x289e09,_0x42b695){const _0x2b0f2a=a7_0x4ebc,_0x265b0b=_0x289e09();while(!![]){try{const _0x589ba3=-parseInt(_0x2b0f2a(0x123))/0x1+-parseInt(_0x2b0f2a(0x130))/0x2+parseInt(_0x2b0f2a(0x133))/0x3*(-parseInt(_0x2b0f2a(0x125))/0x4)+-parseInt(_0x2b0f2a(0x122))/0x5*(parseInt(_0x2b0f2a(0x12b))/0x6)+-parseInt(_0x2b0f2a(0x12e))/0x7+parseInt(_0x2b0f2a(0x126))/0x8+parseInt(_0x2b0f2a(0x12c))/0x9*(parseInt(_0x2b0f2a(0x127))/0xa);if(_0x589ba3===_0x42b695)break;else _0x265b0b['push'](_0x265b0b['shift']());}catch(_0x1fe6b2){_0x265b0b['push'](_0x265b0b['shift']());}}}(a7_0x46ff,0xbf702));function a7_0x4ebc(_0x28be23,_0x3f6520){_0x28be23=_0x28be23-0x122;const _0x46fff7=a7_0x46ff();let _0x4ebcb3=_0x46fff7[_0x28be23];return _0x4ebcb3;}export function enrichAppListItemsWithMergedSelection(_0x3aed93,_0x3691bb){const _0x599cab=a7_0x4ebc;if(!_0x3691bb)return;const _0x4ee9fa=!!(_0x3691bb[_0x599cab(0x124)]??_0x3691bb['defaultApp']);for(const _0x5cf96b of _0x3aed93){_0x5cf96b['isCurrent']=![];}const _0x44d75a=_0x3691bb[_0x599cab(0x131)]!=null?String(_0x3691bb[_0x599cab(0x131)])[_0x599cab(0x129)]():'';if(_0x4ee9fa){const _0x53e555=_0x3691bb[_0x599cab(0x124)]??_0x3691bb['defaultApp'];if(_0x53e555){const _0x1e1a1f=_0x3aed93[_0x599cab(0x134)](_0x752feb=>_0x752feb[_0x599cab(0x132)]===!![]&&_0x752feb[_0x599cab(0x128)]===_0x53e555&&_0x752feb['definedIn']===_0x599cab(0x12a)),_0x440d6f=_0x1e1a1f??_0x3aed93[_0x599cab(0x134)](_0xf4b41b=>_0xf4b41b[_0x599cab(0x132)]===!![]&&_0xf4b41b[_0x599cab(0x128)]===_0x53e555);if(_0x440d6f){const _0xa2f8df=String(_0x440d6f[_0x599cab(0x12d)]??'')[_0x599cab(0x129)]();if(!_0x44d75a||_0xa2f8df===_0x44d75a){_0x440d6f[_0x599cab(0x12f)]=!![];return;}}}if(_0x44d75a){const _0x4fc777=_0x3aed93[_0x599cab(0x134)](_0xa37f9b=>String(_0xa37f9b[_0x599cab(0x12d)]??'')['trim']()===_0x44d75a);_0x4fc777&&(_0x4fc777[_0x599cab(0x12f)]=!![]);}return;}if(!_0x44d75a)return;for(const _0x15ce22 of _0x3aed93){String(_0x15ce22[_0x599cab(0x12d)]??'')['trim']()===_0x44d75a&&(_0x15ce22[_0x599cab(0x12f)]=!![]);}}function a7_0x46ff(){const _0x616eaa=['27xxPPxO','appcode','2648646BYjNYG','isCurrent','35354evdgAw','appCode','named','682113mILzKn','find','8495VNrsqK','746878VnZucl','currentApp','4BEETNR','4898696FOmNoF','9008380RSIPWa','name','trim','local','4098TXLMem'];a7_0x46ff=function(){return _0x616eaa;};return a7_0x46ff();}
1
+ (function(_0x334047,_0x56546c){const _0x3c21ef=a7_0x4c0d,_0x4a6498=_0x334047();while(!![]){try{const _0x4f63ca=-parseInt(_0x3c21ef(0x92))/0x1*(parseInt(_0x3c21ef(0x9b))/0x2)+-parseInt(_0x3c21ef(0x9a))/0x3+parseInt(_0x3c21ef(0xa3))/0x4+parseInt(_0x3c21ef(0xa1))/0x5+parseInt(_0x3c21ef(0xa2))/0x6+parseInt(_0x3c21ef(0x9e))/0x7+parseInt(_0x3c21ef(0x97))/0x8*(-parseInt(_0x3c21ef(0x93))/0x9);if(_0x4f63ca===_0x56546c)break;else _0x4a6498['push'](_0x4a6498['shift']());}catch(_0x27f73e){_0x4a6498['push'](_0x4a6498['shift']());}}}(a7_0x5c81,0xc1efe));function a7_0x5c81(){const _0x333cad=['appcode','5555432opOlTa','find','trim','622494TAwLgE','74GsbbyR','currentApp','appCode','1411116KpaUcd','name','isCurrent','1949065aqHAkL','6454626yRjPpW','2214976HTDQkv','local','14179XTqJFm','9tgwcDb','named','defaultApp'];a7_0x5c81=function(){return _0x333cad;};return a7_0x5c81();}function a7_0x4c0d(_0x3ad4d8,_0x12604b){_0x3ad4d8=_0x3ad4d8-0x91;const _0x5c8149=a7_0x5c81();let _0x4c0d95=_0x5c8149[_0x3ad4d8];return _0x4c0d95;}export function enrichAppListItemsWithMergedSelection(_0x474a65,_0x5c09bb){const _0x426a7b=a7_0x4c0d;if(!_0x5c09bb)return;const _0x40361e=!!(_0x5c09bb[_0x426a7b(0x9c)]??_0x5c09bb[_0x426a7b(0x95)]);for(const _0x3b8636 of _0x474a65){_0x3b8636['isCurrent']=![];}const _0x48cc7f=_0x5c09bb[_0x426a7b(0x9d)]!=null?String(_0x5c09bb[_0x426a7b(0x9d)])[_0x426a7b(0x99)]():'';if(_0x40361e){const _0x1f9fab=_0x5c09bb[_0x426a7b(0x9c)]??_0x5c09bb[_0x426a7b(0x95)];if(_0x1f9fab){const _0x3daea2=_0x474a65[_0x426a7b(0x98)](_0x360de0=>_0x360de0[_0x426a7b(0x94)]===!![]&&_0x360de0[_0x426a7b(0x9f)]===_0x1f9fab&&_0x360de0['definedIn']===_0x426a7b(0x91)),_0x5bfc3f=_0x3daea2??_0x474a65[_0x426a7b(0x98)](_0x2c3511=>_0x2c3511[_0x426a7b(0x94)]===!![]&&_0x2c3511[_0x426a7b(0x9f)]===_0x1f9fab);if(_0x5bfc3f){const _0x1507a6=String(_0x5bfc3f[_0x426a7b(0x96)]??'')['trim']();if(!_0x48cc7f||_0x1507a6===_0x48cc7f){_0x5bfc3f[_0x426a7b(0xa0)]=!![];return;}}}if(_0x48cc7f){const _0x2e28b0=_0x474a65[_0x426a7b(0x98)](_0xcacf74=>String(_0xcacf74[_0x426a7b(0x96)]??'')['trim']()===_0x48cc7f);_0x2e28b0&&(_0x2e28b0[_0x426a7b(0xa0)]=!![]);}return;}if(!_0x48cc7f)return;for(const _0x398a77 of _0x474a65){String(_0x398a77['appcode']??'')[_0x426a7b(0x99)]()===_0x48cc7f&&(_0x398a77['isCurrent']=!![]);}}
@@ -1 +1 @@
1
- const a8_0x5e7947=a8_0x2bf9;(function(_0x165fd6,_0x5e2a8f){const _0x231565=a8_0x2bf9,_0x16ca2e=_0x165fd6();while(!![]){try{const _0x2e5cfe=parseInt(_0x231565(0xbc))/0x1+parseInt(_0x231565(0xc2))/0x2+parseInt(_0x231565(0xbf))/0x3+-parseInt(_0x231565(0xc7))/0x4+-parseInt(_0x231565(0xb9))/0x5+-parseInt(_0x231565(0xc0))/0x6*(-parseInt(_0x231565(0xbe))/0x7)+parseInt(_0x231565(0xba))/0x8;if(_0x2e5cfe===_0x5e2a8f)break;else _0x16ca2e['push'](_0x16ca2e['shift']());}catch(_0x5c119a){_0x16ca2e['push'](_0x16ca2e['shift']());}}}(a8_0x5fe7,0xd2a9f));function a8_0x2bf9(_0x26cb16,_0xc8c352){_0x26cb16=_0x26cb16-0xb9;const _0x5fe771=a8_0x5fe7();let _0x2bf9ee=_0x5fe771[_0x26cb16];return _0x2bf9ee;}import{getRuntimeAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const appConfigGet={'service':'app-config','command':a8_0x5e7947(0xcb),'description':a8_0x5e7947(0xc1),'risk':'read','args':[{'name':'key','description':a8_0x5e7947(0xca),'required':!![]}],'flags':[],async 'execute'(_0x18e739){const _0x12f08d=a8_0x5e7947,_0x4b9c34=_0x18e739[_0x12f08d(0xc9)][0x0]?.[_0x12f08d(0xc5)]();if(!_0x4b9c34)throw CliErrors[_0x12f08d(0xc6)](_0x12f08d(0xc4),_0x12f08d(0xc3)+CLI_BIN_NAME+'\x20app-config\x20get\x20<key>');try{const _0x1768fe=await getRuntimeAppConfigByKey(_0x18e739[_0x12f08d(0xbd)],_0x4b9c34);return{'ok':!![],'data':_0x1768fe};}catch{throw CliErrors[_0x12f08d(0xcc)]('Unable\x20to\x20get\x20app-config\x20value:\x20key='+_0x4b9c34+_0x12f08d(0xbb)+_0x18e739['appCode'],_0x12f08d(0xc8));}}};function a8_0x5fe7(){const _0x111b00=['7575540yQoPKF','8337304jVvfJa',',\x20appCode=','370023sKCKwk','appCode','118538JYcSPS','405006jWGjKl','18GdSJHL','Get\x20one\x20runtime\x20app-config\x20value\x20by\x20key','2429682bGZIDV','Usage:\x20','Missing\x20app-config\x20key.','trim','validation','1739376tVFLxG','Check\x20that\x20the\x20key\x20exists,\x20the\x20current\x20AccessKey\x20has\x20permission,\x20and\x20the\x20runtime\x20app-config\x20endpoint\x20is\x20available.','args','App\x20config\x20key','get','apiError'];a8_0x5fe7=function(){return _0x111b00;};return a8_0x5fe7();}
1
+ const a8_0x48c18e=a8_0xf87b;(function(_0x52b1f7,_0x1831f3){const _0xe1732a=a8_0xf87b,_0x46c388=_0x52b1f7();while(!![]){try{const _0x42c553=parseInt(_0xe1732a(0x1ae))/0x1+-parseInt(_0xe1732a(0x1b1))/0x2+-parseInt(_0xe1732a(0x1a9))/0x3+parseInt(_0xe1732a(0x1b8))/0x4+parseInt(_0xe1732a(0x1ad))/0x5+-parseInt(_0xe1732a(0x1b0))/0x6*(-parseInt(_0xe1732a(0x1bb))/0x7)+-parseInt(_0xe1732a(0x1b4))/0x8;if(_0x42c553===_0x1831f3)break;else _0x46c388['push'](_0x46c388['shift']());}catch(_0x1c5460){_0x46c388['push'](_0x46c388['shift']());}}}(a8_0x233c,0x2c00c));import{getRuntimeAppConfigByKey}from'../../core/api-client.js';function a8_0x233c(){const _0x3cab31=['278213ZYHZFf','read','788796EsQKRY','454082geyaGz','get','appCode','649992kzyATD','App\x20config\x20key',',\x20appCode=','validation','414996BdkQRz','Usage:\x20','\x20app-config\x20get\x20<key>','7TWDmfm','920352rfemTD','Get\x20one\x20runtime\x20app-config\x20value\x20by\x20key','Missing\x20app-config\x20key.','app-config','1409410CfFRmk'];a8_0x233c=function(){return _0x3cab31;};return a8_0x233c();}function a8_0xf87b(_0x5d1d0e,_0x31a0e3){_0x5d1d0e=_0x5d1d0e-0x1a9;const _0x233c1a=a8_0x233c();let _0xf87b42=_0x233c1a[_0x5d1d0e];return _0xf87b42;}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const appConfigGet={'service':a8_0x48c18e(0x1ac),'command':a8_0x48c18e(0x1b2),'description':a8_0x48c18e(0x1aa),'risk':a8_0x48c18e(0x1af),'args':[{'name':'key','description':a8_0x48c18e(0x1b5),'required':!![]}],'flags':[],async 'execute'(_0x2d0400){const _0x3616c0=a8_0x48c18e,_0x1092fe=_0x2d0400['args'][0x0]?.['trim']();if(!_0x1092fe)throw CliErrors[_0x3616c0(0x1b7)](_0x3616c0(0x1ab),_0x3616c0(0x1b9)+CLI_BIN_NAME+_0x3616c0(0x1ba));try{const _0x44c7e7=await getRuntimeAppConfigByKey(_0x2d0400[_0x3616c0(0x1b3)],_0x1092fe);return{'ok':!![],'data':_0x44c7e7};}catch{throw CliErrors['apiError']('Unable\x20to\x20get\x20app-config\x20value:\x20key='+_0x1092fe+_0x3616c0(0x1b6)+_0x2d0400[_0x3616c0(0x1b3)],'Check\x20that\x20the\x20key\x20exists,\x20the\x20current\x20AccessKey\x20has\x20permission,\x20and\x20the\x20runtime\x20app-config\x20endpoint\x20is\x20available.');}}};
@@ -1 +1 @@
1
- (function(_0x518300,_0x17dee1){const _0x44f924=a9_0x18c2,_0x672261=_0x518300();while(!![]){try{const _0x4f7bc5=parseInt(_0x44f924(0x1cc))/0x1+parseInt(_0x44f924(0x1ce))/0x2*(-parseInt(_0x44f924(0x1cd))/0x3)+parseInt(_0x44f924(0x1ca))/0x4+parseInt(_0x44f924(0x1cf))/0x5+-parseInt(_0x44f924(0x1c9))/0x6+parseInt(_0x44f924(0x1cb))/0x7*(-parseInt(_0x44f924(0x1c7))/0x8)+-parseInt(_0x44f924(0x1c8))/0x9;if(_0x4f7bc5===_0x17dee1)break;else _0x672261['push'](_0x672261['shift']());}catch(_0x2709d5){_0x672261['push'](_0x672261['shift']());}}}(a9_0x3196,0xec193));function a9_0x18c2(_0x3026ed,_0x359b6b){_0x3026ed=_0x3026ed-0x1c7;const _0x319617=a9_0x3196();let _0x18c215=_0x319617[_0x3026ed];return _0x18c215;}import{appConfigGet}from'../../commands/app-config/get.js';export const appConfigDefinitions=[appConfigGet];function a9_0x3196(){const _0x460085=['14pyxaLP','751185vKMTHg','3FykirW','958676rlwNuN','7488290HkIfzl','1215472DWcpZh','3508092gHeolr','2733474YstQhD','1387156VWmrgQ'];a9_0x3196=function(){return _0x460085;};return a9_0x3196();}
1
+ (function(_0x31ad5f,_0x3aca5d){const _0x7548dc=a9_0x2291,_0x2d76e8=_0x31ad5f();while(!![]){try{const _0x490379=-parseInt(_0x7548dc(0x1e1))/0x1+parseInt(_0x7548dc(0x1da))/0x2+parseInt(_0x7548dc(0x1de))/0x3*(parseInt(_0x7548dc(0x1db))/0x4)+-parseInt(_0x7548dc(0x1df))/0x5*(parseInt(_0x7548dc(0x1e0))/0x6)+-parseInt(_0x7548dc(0x1dd))/0x7+parseInt(_0x7548dc(0x1dc))/0x8*(parseInt(_0x7548dc(0x1d9))/0x9)+-parseInt(_0x7548dc(0x1e2))/0xa;if(_0x490379===_0x3aca5d)break;else _0x2d76e8['push'](_0x2d76e8['shift']());}catch(_0x3c4628){_0x2d76e8['push'](_0x2d76e8['shift']());}}}(a9_0x5ece,0x70b1b));function a9_0x2291(_0x4aa0a5,_0x26ea01){_0x4aa0a5=_0x4aa0a5-0x1d9;const _0x5eceb4=a9_0x5ece();let _0x229162=_0x5eceb4[_0x4aa0a5];return _0x229162;}import{appConfigGet}from'../../commands/app-config/get.js';export const appConfigDefinitions=[appConfigGet];function a9_0x5ece(){const _0x24616c=['24WGFJVy','968289WcIyaA','1225695BKgujW','115rucWga','8574XvbsVC','125309EcrEMa','6560510weGrDE','2374641AsCoTf','428074CGCZRC','4qfTkiz'];a9_0x5ece=function(){return _0x24616c;};return a9_0x5ece();}
@@ -1 +1 @@
1
- const a10_0x52282e=a10_0x5147;(function(_0x5cda35,_0x4f5440){const _0x3ade57=a10_0x5147,_0x2c6e7e=_0x5cda35();while(!![]){try{const _0x312f3c=parseInt(_0x3ade57(0xde))/0x1*(-parseInt(_0x3ade57(0xeb))/0x2)+-parseInt(_0x3ade57(0xf7))/0x3*(-parseInt(_0x3ade57(0xdc))/0x4)+parseInt(_0x3ade57(0xf0))/0x5+parseInt(_0x3ade57(0xe0))/0x6*(parseInt(_0x3ade57(0x104))/0x7)+-parseInt(_0x3ade57(0xe6))/0x8*(-parseInt(_0x3ade57(0xdb))/0x9)+-parseInt(_0x3ade57(0x109))/0xa+-parseInt(_0x3ade57(0xf6))/0xb;if(_0x312f3c===_0x4f5440)break;else _0x2c6e7e['push'](_0x2c6e7e['shift']());}catch(_0x5cc6e8){_0x2c6e7e['push'](_0x2c6e7e['shift']());}}}(a10_0x4f9f,0xc53ae));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_0x1f408d}from'../../framework/dryrun.js';import{redactSensitiveValue}from'../../utils/redaction.js';import{parseLosslessJson}from'../../utils/lossless-json.js';const APP_CODE_FLAG={'name':a10_0x52282e(0x114),'type':a10_0x52282e(0x10a),'description':'Application\x20code\x20(falls\x20back\x20to\x20the\x20active\x20workspace\x20app)'},PAGE_FLAG={'name':a10_0x52282e(0xef),'type':'number','default':0x1,'description':a10_0x52282e(0x101)},PAGE_SIZE_FLAG={'name':a10_0x52282e(0x115),'type':a10_0x52282e(0xf4),'default':0x14,'description':a10_0x52282e(0xd9)},TASK_ID_FLAG={'name':a10_0x52282e(0x119),'type':'string','required':!![],'description':a10_0x52282e(0xfc)},COMMENT_FLAG={'name':a10_0x52282e(0x105),'type':a10_0x52282e(0x10a),'description':a10_0x52282e(0x100)},VARIABLES_FLAG={'name':'variables','type':a10_0x52282e(0x10a),'description':a10_0x52282e(0x10d)},TARGET_USER_ID_FLAG={'name':a10_0x52282e(0x113),'type':a10_0x52282e(0x10a),'required':!![],'description':a10_0x52282e(0xf1)};function requireApprovalAppCode(_0x2c267e){const _0x568ff6=a10_0x52282e,_0x30682e=(_0x2c267e[_0x568ff6(0xf9)]('app-code')||_0x2c267e[_0x568ff6(0x10c)]?.[_0x568ff6(0x108)]||_0x2c267e[_0x568ff6(0x108)]||'')[_0x568ff6(0xf2)]();if(!_0x30682e)throw CliErrors[_0x568ff6(0xdf)](_0x568ff6(0xe4));return _0x30682e;}function requireTaskId(_0x8c9883){const _0xcb17b0=a10_0x52282e,_0x6951b=_0x8c9883[_0xcb17b0(0xf9)](_0xcb17b0(0x119))[_0xcb17b0(0xf2)]();if(!_0x6951b)throw CliErrors[_0xcb17b0(0x10b)](_0xcb17b0(0xfe));return _0x6951b;}function validatePage(_0x409c39){const _0x182b70=a10_0x52282e,_0xbc2c94=_0x409c39['num'](_0x182b70(0xef),0x1),_0x25b5b4=_0x409c39[_0x182b70(0xfa)]('page-size',0x14);if(!Number[_0x182b70(0x112)](_0xbc2c94)||_0xbc2c94<0x1)throw CliErrors[_0x182b70(0x10b)](_0x182b70(0x117));if(!Number['isSafeInteger'](_0x25b5b4)||_0x25b5b4<0x1)throw CliErrors['validation'](_0x182b70(0xf5));}function readVariables(_0x42f737){const _0x3b949b=a10_0x52282e,_0x382fba=_0x42f737[_0x3b949b(0xf9)]('variables')[_0x3b949b(0xf2)]();if(!_0x382fba)return undefined;let _0x4b94c0=_0x382fba;if(_0x382fba['startsWith']('@')){const _0x56ec31=_0x382fba['slice'](0x1)[_0x3b949b(0xf2)]();if(!_0x56ec31)throw CliErrors[_0x3b949b(0x10b)](_0x3b949b(0xd8));try{_0x4b94c0=readFileSync(resolve(_0x56ec31),'utf8');}catch{throw CliErrors[_0x3b949b(0x10b)](_0x3b949b(0xda));}}let _0x4fc640;try{_0x4fc640=parseLosslessJson(_0x4b94c0);}catch{throw CliErrors[_0x3b949b(0x10b)](_0x3b949b(0xe9));}if(!_0x4fc640||typeof _0x4fc640!==_0x3b949b(0x11c)||Array[_0x3b949b(0xd7)](_0x4fc640))throw CliErrors[_0x3b949b(0x10b)](_0x3b949b(0xe5));return _0x4fc640;}function a10_0x5147(_0x2d3f45,_0x3a7f45){_0x2d3f45=_0x2d3f45-0xd7;const _0x4f9f8c=a10_0x4f9f();let _0x51476f=_0x4f9f8c[_0x2d3f45];return _0x51476f;}function a10_0x4f9f(){const _0x2ea1da=['high-risk-write','isSafeInteger','target-user-id','app-code','page-size','Transfers\x20the\x20pending\x20Runtime\x20task\x20to\x20the\x20selected\x20eligible\x20user.\x20The\x20current\x20handler\x20may\x20lose\x20permission\x20to\x20process\x20the\x20task.','--page\x20must\x20be\x20a\x20positive\x20integer.','read','task-id','Transfer\x20a\x20pending\x20Runtime\x20task\x20to\x20an\x20allowed\x20user','POST','object','isArray','--variables\x20@file\x20path\x20must\x20not\x20be\x20blank.','Number\x20of\x20todo\x20records\x20per\x20page','Unable\x20to\x20read\x20--variables\x20file.','1777932IJGrwo','2653720qsnzin','Transferred\x20approval\x20task\x20','1383827JRnUTs','configMissing','9642rOeVdb','approve','Show\x20an\x20approval\x20task\x20and\x20its\x20current\x20handling\x20permissions','reject','Set\x20--app-code,\x20--appcode,\x20or\x20an\x20active\x20app\x20in\x20the\x20workspace\x20configuration.','--variables\x20must\x20be\x20a\x20JSON\x20object.','48jZzdCX','build','Preview:\x20approve\x20an\x20approval\x20task','--variables\x20must\x20contain\x20valid\x20JSON.','variables','2OVfBDl','body','todo','List\x20the\x20current\x20user\x27s\x20approval\x20todo\x20tasks','page','396630QhhLCo','Target\x20user\x20ID\x20selected\x20from\x20Runtime\x20transfer\x20candidates','trim','task-detail','number','--page-size\x20must\x20be\x20a\x20positive\x20integer.','3929453ZiyEzi','3bDnctP','Rejects\x20the\x20pending\x20Runtime\x20task\x20and\x20applies\x20the\x20workflow\x20rejection\x20path.\x20This\x20action\x20may\x20end\x20the\x20workflow\x20or\x20trigger\x20downstream\x20business\x20side\x20effects.','str','num','Preview:\x20transfer\x20an\x20approval\x20task','Runtime\x20approval\x20task\x20ID','Approves\x20the\x20pending\x20Runtime\x20task\x20and\x20advances\x20its\x20workflow.\x20This\x20action\x20may\x20trigger\x20downstream\x20nodes\x20and\x20business\x20side\x20effects.','--task-id\x20must\x20not\x20be\x20blank.','approval','Approval\x20or\x20transfer\x20comment','One-based\x20todo\x20page\x20number','taskId','Reject\x20a\x20pending\x20Runtime\x20task','6097IRvIzJ','comment','/client/flow/approve','Approve\x20a\x20pending\x20Runtime\x20task','appCode','7788370JREIGK','string','validation','mergedCli','Workflow\x20variables\x20as\x20JSON\x20or\x20@path/to/variables.json','description','--target-user-id\x20must\x20not\x20be\x20blank.','Approved\x20approval\x20task\x20'];a10_0x4f9f=function(){return _0x2ea1da;};return a10_0x4f9f();}function approvalBody(_0xdebe2c,_0x1e44f6){const _0x5ad7fe=a10_0x52282e,_0x127820={'appCode':requireApprovalAppCode(_0xdebe2c),'taskId':requireTaskId(_0xdebe2c),'approved':_0x1e44f6},_0x45678d=_0xdebe2c[_0x5ad7fe(0xf9)]('comment'),_0x9ab9f1=readVariables(_0xdebe2c);if(_0x45678d)_0x127820[_0x5ad7fe(0x105)]=_0x45678d;if(_0x9ab9f1!==undefined)_0x127820[_0x5ad7fe(0xea)]=_0x9ab9f1;return _0x127820;}function transferBody(_0x4111dc){const _0xcc5c3=a10_0x52282e,_0x1f00f6=requireTaskId(_0x4111dc),_0x52ce6b=_0x4111dc[_0xcc5c3(0xf9)]('target-user-id')[_0xcc5c3(0xf2)]();if(!_0x52ce6b)throw CliErrors['validation'](_0xcc5c3(0x10f));const _0x2283f8={'appCode':requireApprovalAppCode(_0x4111dc),'taskId':_0x1f00f6,'targetUserId':_0x52ce6b},_0x303a87=_0x4111dc[_0xcc5c3(0xf9)](_0xcc5c3(0x105));if(_0x303a87)_0x2283f8[_0xcc5c3(0x105)]=_0x303a87;return _0x2283f8;}function sanitized(_0x725659){return redactSensitiveValue(_0x725659);}const approvalTodo={'service':'approval','command':a10_0x52282e(0xed),'description':a10_0x52282e(0xee),'risk':a10_0x52282e(0x118),'requiresAppCode':![],'flags':[APP_CODE_FLAG,PAGE_FLAG,PAGE_SIZE_FLAG],async 'validate'(_0xa3e452){requireApprovalAppCode(_0xa3e452),validatePage(_0xa3e452);},async 'execute'(_0x520f9d){const _0x33a02f=a10_0x52282e,_0x470ad7=requireApprovalAppCode(_0x520f9d),_0x48709e=await listApprovalTodo(_0x470ad7,_0x520f9d[_0x33a02f(0xfa)](_0x33a02f(0xef),0x1),_0x520f9d[_0x33a02f(0xfa)](_0x33a02f(0x115),0x14));return{'ok':!![],'data':sanitized(_0x48709e)};}},approvalTaskDetail={'service':a10_0x52282e(0xff),'command':a10_0x52282e(0xf3),'description':a10_0x52282e(0xe2),'risk':'read','requiresAppCode':![],'flags':[APP_CODE_FLAG,TASK_ID_FLAG],async 'validate'(_0x3145e6){requireApprovalAppCode(_0x3145e6),requireTaskId(_0x3145e6);},async 'execute'(_0x190733){const _0x4ee851=requireTaskId(_0x190733),_0x3531d2=await getApprovalTaskDetail(_0x4ee851,requireApprovalAppCode(_0x190733));return{'ok':!![],'data':sanitized(_0x3531d2)};}},approvalApprove={'service':a10_0x52282e(0xff),'command':a10_0x52282e(0xe1),'description':a10_0x52282e(0x107),'risk':a10_0x52282e(0x111),'confirmationDescription':a10_0x52282e(0xfd),'requiresAppCode':![],'flags':[APP_CODE_FLAG,TASK_ID_FLAG,COMMENT_FLAG,VARIABLES_FLAG],async 'validate'(_0x46a3de){approvalBody(_0x46a3de,!![]);},async 'execute'(_0x3ebce5){const _0x2aebaa=a10_0x52282e,_0x165602=approvalBody(_0x3ebce5,!![]),_0xd88805=await approveApprovalTask(_0x165602);return{'ok':!![],'data':sanitized(_0xd88805),'message':_0x2aebaa(0x110)+_0x165602['taskId']};},async 'dryRun'(_0x5bdb03){const _0x4ffdaa=a10_0x52282e,_0x34116d=approvalBody(_0x5bdb03,!![]);return a10_0x1f408d(_0x4ffdaa(0x11b),_0x4ffdaa(0x106))[_0x4ffdaa(0xec)](sanitized(_0x34116d))[_0x4ffdaa(0x10e)](_0x4ffdaa(0xe8))[_0x4ffdaa(0xe7)]();}},approvalReject={'service':'approval','command':a10_0x52282e(0xe3),'description':a10_0x52282e(0x103),'risk':a10_0x52282e(0x111),'confirmationDescription':a10_0x52282e(0xf8),'requiresAppCode':![],'flags':[APP_CODE_FLAG,TASK_ID_FLAG,COMMENT_FLAG,VARIABLES_FLAG],async 'validate'(_0x241c3d){approvalBody(_0x241c3d,![]);},async 'execute'(_0x450ac5){const _0x11b639=a10_0x52282e,_0x3683fa=approvalBody(_0x450ac5,![]),_0x4895f9=await approveApprovalTask(_0x3683fa);return{'ok':!![],'data':sanitized(_0x4895f9),'message':'Rejected\x20approval\x20task\x20'+_0x3683fa[_0x11b639(0x102)]};},async 'dryRun'(_0x5ae21a){const _0x3e9b5e=a10_0x52282e,_0x5c6599=approvalBody(_0x5ae21a,![]);return a10_0x1f408d(_0x3e9b5e(0x11b),_0x3e9b5e(0x106))[_0x3e9b5e(0xec)](sanitized(_0x5c6599))[_0x3e9b5e(0x10e)]('Preview:\x20reject\x20an\x20approval\x20task')[_0x3e9b5e(0xe7)]();}},approvalTransfer={'service':a10_0x52282e(0xff),'command':'transfer','description':a10_0x52282e(0x11a),'risk':a10_0x52282e(0x111),'confirmationDescription':a10_0x52282e(0x116),'requiresAppCode':![],'flags':[APP_CODE_FLAG,TASK_ID_FLAG,TARGET_USER_ID_FLAG,COMMENT_FLAG],async 'validate'(_0x43f301){transferBody(_0x43f301);},async 'execute'(_0x234489){const _0x4889de=a10_0x52282e,_0x5d6c51=transferBody(_0x234489),_0x10a273=await transferApprovalTask(_0x5d6c51);return{'ok':!![],'data':sanitized(_0x10a273),'message':_0x4889de(0xdd)+_0x5d6c51['taskId']};},async 'dryRun'(_0x3cd899){const _0x39ec67=a10_0x52282e,_0x59dcb8=transferBody(_0x3cd899);return a10_0x1f408d(_0x39ec67(0x11b),'/client/flow/task/transfer')[_0x39ec67(0xec)](sanitized(_0x59dcb8))[_0x39ec67(0x10e)](_0x39ec67(0xfb))[_0x39ec67(0xe7)]();}};export const approvalDefinitions=[approvalTodo,approvalTaskDetail,approvalApprove,approvalReject,approvalTransfer];export{approvalApprove,approvalReject,approvalTaskDetail,approvalTodo,approvalTransfer};
1
+ const a10_0x3bb712=a10_0x45c8;(function(_0x28100a,_0x148570){const _0x13ccab=a10_0x45c8,_0x198c6e=_0x28100a();while(!![]){try{const _0x1157ef=-parseInt(_0x13ccab(0xbf))/0x1+parseInt(_0x13ccab(0xc6))/0x2+parseInt(_0x13ccab(0xcf))/0x3*(-parseInt(_0x13ccab(0xaa))/0x4)+-parseInt(_0x13ccab(0xcd))/0x5+parseInt(_0x13ccab(0xca))/0x6+parseInt(_0x13ccab(0xd6))/0x7*(parseInt(_0x13ccab(0xe5))/0x8)+parseInt(_0x13ccab(0xba))/0x9;if(_0x1157ef===_0x148570)break;else _0x198c6e['push'](_0x198c6e['shift']());}catch(_0x48f4e2){_0x198c6e['push'](_0x198c6e['shift']());}}}(a10_0x2c84,0x9e548));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_0x5c4c49}from'../../framework/dryrun.js';import{redactSensitiveValue}from'../../utils/redaction.js';import{parseLosslessJson}from'../../utils/lossless-json.js';const APP_CODE_FLAG={'name':a10_0x3bb712(0xb2),'type':a10_0x3bb712(0xc5),'description':a10_0x3bb712(0xd2)},PAGE_FLAG={'name':'page','type':a10_0x3bb712(0xcc),'default':0x1,'description':a10_0x3bb712(0xb4)},PAGE_SIZE_FLAG={'name':'page-size','type':a10_0x3bb712(0xcc),'default':0x14,'description':a10_0x3bb712(0xa9)},TASK_ID_FLAG={'name':a10_0x3bb712(0xd0),'type':a10_0x3bb712(0xc5),'required':!![],'description':a10_0x3bb712(0xd1)},COMMENT_FLAG={'name':a10_0x3bb712(0xc3),'type':a10_0x3bb712(0xc5),'description':a10_0x3bb712(0xae)},VARIABLES_FLAG={'name':'variables','type':a10_0x3bb712(0xc5),'description':'Workflow\x20variables\x20as\x20JSON\x20or\x20@path/to/variables.json'},TARGET_USER_ID_FLAG={'name':a10_0x3bb712(0xb6),'type':a10_0x3bb712(0xc5),'required':!![],'description':'Target\x20user\x20ID\x20selected\x20from\x20Runtime\x20transfer\x20candidates'};function a10_0x45c8(_0x54f3b2,_0x28911a){_0x54f3b2=_0x54f3b2-0xa5;const _0x2c8423=a10_0x2c84();let _0x45c850=_0x2c8423[_0x54f3b2];return _0x45c850;}function requireApprovalAppCode(_0x3bd284){const _0x354b93=a10_0x3bb712,_0xb38aac=(_0x3bd284[_0x354b93(0xdf)](_0x354b93(0xb2))||_0x3bd284[_0x354b93(0xd9)]?.['appCode']||_0x3bd284[_0x354b93(0xc1)]||'')[_0x354b93(0xe3)]();if(!_0xb38aac)throw CliErrors[_0x354b93(0xa6)]('Set\x20--app-code,\x20--appcode,\x20or\x20an\x20active\x20app\x20in\x20the\x20workspace\x20configuration.');return _0xb38aac;}function a10_0x2c84(){const _0x43578b=['Preview:\x20approve\x20an\x20approval\x20task','957vHxLtN','task-id','Runtime\x20approval\x20task\x20ID','Application\x20code\x20(falls\x20back\x20to\x20the\x20active\x20workspace\x20app)','task-detail','/client/flow/approve','startsWith','7xdKrlL','high-risk-write','description','mergedCli','--page-size\x20must\x20be\x20a\x20positive\x20integer.','isSafeInteger','validation','reject','num','str','taskId','List\x20the\x20current\x20user\x27s\x20approval\x20todo\x20tasks','POST','trim','variables','5116528BpwHfz','Show\x20an\x20approval\x20task\x20and\x20its\x20current\x20handling\x20permissions','configMissing','Rejected\x20approval\x20task\x20','utf8','Number\x20of\x20todo\x20records\x20per\x20page','11276NXMQnz','read','Transferred\x20approval\x20task\x20','page-size','Approval\x20or\x20transfer\x20comment','Transfer\x20a\x20pending\x20Runtime\x20task\x20to\x20an\x20allowed\x20user','--page\x20must\x20be\x20a\x20positive\x20integer.','body','app-code','todo','One-based\x20todo\x20page\x20number','Reject\x20a\x20pending\x20Runtime\x20task','target-user-id','Rejects\x20the\x20pending\x20Runtime\x20task\x20and\x20applies\x20the\x20workflow\x20rejection\x20path.\x20This\x20action\x20may\x20end\x20the\x20workflow\x20or\x20trigger\x20downstream\x20business\x20side\x20effects.','isArray','Approve\x20a\x20pending\x20Runtime\x20task','1590606hWREmw','--variables\x20must\x20contain\x20valid\x20JSON.','--variables\x20@file\x20path\x20must\x20not\x20be\x20blank.','build','--task-id\x20must\x20not\x20be\x20blank.','627045kewjCX','page','appCode','Approved\x20approval\x20task\x20','comment','--target-user-id\x20must\x20not\x20be\x20blank.','string','997104gUldRM','approval','--variables\x20must\x20be\x20a\x20JSON\x20object.','approve','6751428fKnOjn','transfer','number','1326320Cayzrc'];a10_0x2c84=function(){return _0x43578b;};return a10_0x2c84();}function requireTaskId(_0x1b7845){const _0x4c0eb7=a10_0x3bb712,_0x552758=_0x1b7845[_0x4c0eb7(0xdf)](_0x4c0eb7(0xd0))['trim']();if(!_0x552758)throw CliErrors[_0x4c0eb7(0xdc)](_0x4c0eb7(0xbe));return _0x552758;}function validatePage(_0x5a42b8){const _0x2b8b26=a10_0x3bb712,_0x5bbcbd=_0x5a42b8['num'](_0x2b8b26(0xc0),0x1),_0x41d9e5=_0x5a42b8['num'](_0x2b8b26(0xad),0x14);if(!Number[_0x2b8b26(0xdb)](_0x5bbcbd)||_0x5bbcbd<0x1)throw CliErrors[_0x2b8b26(0xdc)](_0x2b8b26(0xb0));if(!Number[_0x2b8b26(0xdb)](_0x41d9e5)||_0x41d9e5<0x1)throw CliErrors[_0x2b8b26(0xdc)](_0x2b8b26(0xda));}function readVariables(_0x39d6a4){const _0x4b5bf8=a10_0x3bb712,_0x323ba6=_0x39d6a4[_0x4b5bf8(0xdf)]('variables')[_0x4b5bf8(0xe3)]();if(!_0x323ba6)return undefined;let _0x3026f6=_0x323ba6;if(_0x323ba6[_0x4b5bf8(0xd5)]('@')){const _0x44ead9=_0x323ba6['slice'](0x1)['trim']();if(!_0x44ead9)throw CliErrors[_0x4b5bf8(0xdc)](_0x4b5bf8(0xbc));try{_0x3026f6=readFileSync(resolve(_0x44ead9),_0x4b5bf8(0xa8));}catch{throw CliErrors[_0x4b5bf8(0xdc)]('Unable\x20to\x20read\x20--variables\x20file.');}}let _0x1804c1;try{_0x1804c1=parseLosslessJson(_0x3026f6);}catch{throw CliErrors['validation'](_0x4b5bf8(0xbb));}if(!_0x1804c1||typeof _0x1804c1!=='object'||Array[_0x4b5bf8(0xb8)](_0x1804c1))throw CliErrors[_0x4b5bf8(0xdc)](_0x4b5bf8(0xc8));return _0x1804c1;}function approvalBody(_0x4fd4f3,_0x2aa4df){const _0x3bfbdb=a10_0x3bb712,_0x4a4a5a={'appCode':requireApprovalAppCode(_0x4fd4f3),'taskId':requireTaskId(_0x4fd4f3),'approved':_0x2aa4df},_0x1beed3=_0x4fd4f3[_0x3bfbdb(0xdf)]('comment'),_0x402ca4=readVariables(_0x4fd4f3);if(_0x1beed3)_0x4a4a5a[_0x3bfbdb(0xc3)]=_0x1beed3;if(_0x402ca4!==undefined)_0x4a4a5a[_0x3bfbdb(0xe4)]=_0x402ca4;return _0x4a4a5a;}function transferBody(_0x44276c){const _0x3e31ed=a10_0x3bb712,_0x28840d=requireTaskId(_0x44276c),_0x97c3f3=_0x44276c[_0x3e31ed(0xdf)]('target-user-id')[_0x3e31ed(0xe3)]();if(!_0x97c3f3)throw CliErrors[_0x3e31ed(0xdc)](_0x3e31ed(0xc4));const _0x6fa7c8={'appCode':requireApprovalAppCode(_0x44276c),'taskId':_0x28840d,'targetUserId':_0x97c3f3},_0x260e01=_0x44276c[_0x3e31ed(0xdf)]('comment');if(_0x260e01)_0x6fa7c8[_0x3e31ed(0xc3)]=_0x260e01;return _0x6fa7c8;}function sanitized(_0x6cca61){return redactSensitiveValue(_0x6cca61);}const approvalTodo={'service':'approval','command':a10_0x3bb712(0xb3),'description':a10_0x3bb712(0xe1),'risk':a10_0x3bb712(0xab),'requiresAppCode':![],'flags':[APP_CODE_FLAG,PAGE_FLAG,PAGE_SIZE_FLAG],async 'validate'(_0x180263){requireApprovalAppCode(_0x180263),validatePage(_0x180263);},async 'execute'(_0x550928){const _0x45d0f4=a10_0x3bb712,_0x58de5d=requireApprovalAppCode(_0x550928),_0x3d425d=await listApprovalTodo(_0x58de5d,_0x550928[_0x45d0f4(0xde)]('page',0x1),_0x550928[_0x45d0f4(0xde)]('page-size',0x14));return{'ok':!![],'data':sanitized(_0x3d425d)};}},approvalTaskDetail={'service':a10_0x3bb712(0xc7),'command':a10_0x3bb712(0xd3),'description':a10_0x3bb712(0xa5),'risk':a10_0x3bb712(0xab),'requiresAppCode':![],'flags':[APP_CODE_FLAG,TASK_ID_FLAG],async 'validate'(_0x4a9119){requireApprovalAppCode(_0x4a9119),requireTaskId(_0x4a9119);},async 'execute'(_0x105135){const _0x51214a=requireTaskId(_0x105135),_0x2ba233=await getApprovalTaskDetail(_0x51214a,requireApprovalAppCode(_0x105135));return{'ok':!![],'data':sanitized(_0x2ba233)};}},approvalApprove={'service':'approval','command':a10_0x3bb712(0xc9),'description':a10_0x3bb712(0xb9),'risk':a10_0x3bb712(0xd7),'confirmationDescription':'Approves\x20the\x20pending\x20Runtime\x20task\x20and\x20advances\x20its\x20workflow.\x20This\x20action\x20may\x20trigger\x20downstream\x20nodes\x20and\x20business\x20side\x20effects.','requiresAppCode':![],'flags':[APP_CODE_FLAG,TASK_ID_FLAG,COMMENT_FLAG,VARIABLES_FLAG],async 'validate'(_0x54eb68){approvalBody(_0x54eb68,!![]);},async 'execute'(_0x1a7b13){const _0x3644fc=a10_0x3bb712,_0x482836=approvalBody(_0x1a7b13,!![]),_0x169087=await approveApprovalTask(_0x482836);return{'ok':!![],'data':sanitized(_0x169087),'message':_0x3644fc(0xc2)+_0x482836[_0x3644fc(0xe0)]};},async 'dryRun'(_0x466a67){const _0x581168=a10_0x3bb712,_0x224fcb=approvalBody(_0x466a67,!![]);return a10_0x5c4c49(_0x581168(0xe2),_0x581168(0xd4))[_0x581168(0xb1)](sanitized(_0x224fcb))[_0x581168(0xd8)](_0x581168(0xce))['build']();}},approvalReject={'service':a10_0x3bb712(0xc7),'command':a10_0x3bb712(0xdd),'description':a10_0x3bb712(0xb5),'risk':'high-risk-write','confirmationDescription':a10_0x3bb712(0xb7),'requiresAppCode':![],'flags':[APP_CODE_FLAG,TASK_ID_FLAG,COMMENT_FLAG,VARIABLES_FLAG],async 'validate'(_0x243c19){approvalBody(_0x243c19,![]);},async 'execute'(_0x4a1344){const _0x3a7257=a10_0x3bb712,_0x572981=approvalBody(_0x4a1344,![]),_0x332dab=await approveApprovalTask(_0x572981);return{'ok':!![],'data':sanitized(_0x332dab),'message':_0x3a7257(0xa7)+_0x572981[_0x3a7257(0xe0)]};},async 'dryRun'(_0x1b1a0c){const _0x4112d0=a10_0x3bb712,_0x4f0743=approvalBody(_0x1b1a0c,![]);return a10_0x5c4c49(_0x4112d0(0xe2),_0x4112d0(0xd4))[_0x4112d0(0xb1)](sanitized(_0x4f0743))[_0x4112d0(0xd8)]('Preview:\x20reject\x20an\x20approval\x20task')[_0x4112d0(0xbd)]();}},approvalTransfer={'service':a10_0x3bb712(0xc7),'command':a10_0x3bb712(0xcb),'description':a10_0x3bb712(0xaf),'risk':'high-risk-write','confirmationDescription':'Transfers\x20the\x20pending\x20Runtime\x20task\x20to\x20the\x20selected\x20eligible\x20user.\x20The\x20current\x20handler\x20may\x20lose\x20permission\x20to\x20process\x20the\x20task.','requiresAppCode':![],'flags':[APP_CODE_FLAG,TASK_ID_FLAG,TARGET_USER_ID_FLAG,COMMENT_FLAG],async 'validate'(_0xa631dd){transferBody(_0xa631dd);},async 'execute'(_0x1ec3a2){const _0x4a4a5e=a10_0x3bb712,_0x2b9102=transferBody(_0x1ec3a2),_0x4cd282=await transferApprovalTask(_0x2b9102);return{'ok':!![],'data':sanitized(_0x4cd282),'message':_0x4a4a5e(0xac)+_0x2b9102[_0x4a4a5e(0xe0)]};},async 'dryRun'(_0x3f4e82){const _0x4d8e46=a10_0x3bb712,_0x3efd64=transferBody(_0x3f4e82);return a10_0x5c4c49(_0x4d8e46(0xe2),'/client/flow/task/transfer')['body'](sanitized(_0x3efd64))[_0x4d8e46(0xd8)]('Preview:\x20transfer\x20an\x20approval\x20task')[_0x4d8e46(0xbd)]();}};export const approvalDefinitions=[approvalTodo,approvalTaskDetail,approvalApprove,approvalReject,approvalTransfer];export{approvalApprove,approvalReject,approvalTaskDetail,approvalTodo,approvalTransfer};
@@ -1 +1 @@
1
- const a11_0x1f4ab3=a11_0x3670;(function(_0x15ea8b,_0x37fedf){const _0xb1780e=a11_0x3670,_0x4c6ea0=_0x15ea8b();while(!![]){try{const _0x49e9fc=-parseInt(_0xb1780e(0x19c))/0x1+-parseInt(_0xb1780e(0x198))/0x2+-parseInt(_0xb1780e(0x18b))/0x3+parseInt(_0xb1780e(0x1ac))/0x4*(parseInt(_0xb1780e(0x1c3))/0x5)+parseInt(_0xb1780e(0x1c7))/0x6*(-parseInt(_0xb1780e(0x1a6))/0x7)+-parseInt(_0xb1780e(0x19f))/0x8*(parseInt(_0xb1780e(0x1ab))/0x9)+parseInt(_0xb1780e(0x186))/0xa;if(_0x49e9fc===_0x37fedf)break;else _0x4c6ea0['push'](_0x4c6ea0['shift']());}catch(_0x47a945){_0x4c6ea0['push'](_0x4c6ea0['shift']());}}}(a11_0x3862,0xd21ed));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=a11_0x1f4ab3(0x1ce),ARTIFACT_SOURCE_AGENT='AGENT',ALLOWED_REACT_MODULE_IMPORTS=[a11_0x1f4ab3(0x1d2),a11_0x1f4ab3(0x1d1),a11_0x1f4ab3(0x1c4),a11_0x1f4ab3(0x1bb),a11_0x1f4ab3(0x1a5),'@ant-design/icons'];export const ALLOWED_REACT_MODULE_IMPORTS_TEXT=ALLOWED_REACT_MODULE_IMPORTS['join'](',\x20');const IMPORT_SOURCE_PATTERNS=[/\bimport\s+(?:type\s+)?(?:[^'";]*?\s+from\s+)?["']([^"']+)["']/g,/\bexport\s+(?:type\s+)?[^'";]*?\s+from\s+["']([^"']+)["']/g,/\bimport\s*\(\s*["']([^"']+)["']\s*\)/g,/\brequire\s*\(\s*["']([^"']+)["']\s*\)/g],PAGE_LEVEL_PATTERNS=[/<!doctype\s+html/i,/<\s*html\b/i,/\bcreateRoot\s*\(/,/\bReactDOM\s*\.\s*render\s*\(/,/\bReactDOM\s*\.\s*createRoot\s*\(/],FILE_FLAG={'name':a11_0x1f4ab3(0x1d5),'type':a11_0x1f4ab3(0x18e),'required':!![],'description':a11_0x1f4ab3(0x18f)},ARTIFACT_NAME_FLAG={'name':a11_0x1f4ab3(0x193),'type':a11_0x1f4ab3(0x18e),'description':a11_0x1f4ab3(0x1c5)},METADATA_FLAG={'name':a11_0x1f4ab3(0x1b0),'type':'string','description':'Artifact\x20metadata\x20as\x20JSON\x20object;\x20compiledContent\x20is\x20stripped'};function isPlainObject(_0x11bcab){const _0x23937c=a11_0x1f4ab3;return typeof _0x11bcab===_0x23937c(0x1cf)&&_0x11bcab!==null&&!Array[_0x23937c(0x189)](_0x11bcab);}function readSourceFile(_0x2258a7){const _0x3a9237=a11_0x1f4ab3;if(!_0x2258a7)throw CliErrors[_0x3a9237(0x1c6)](_0x3a9237(0x1aa));if(!existsSync(_0x2258a7))throw CliErrors[_0x3a9237(0x1c6)](_0x3a9237(0x1b6)+_0x2258a7);if(!statSync(_0x2258a7)[_0x3a9237(0x1d0)]())throw CliErrors[_0x3a9237(0x1c6)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x2258a7);const _0x2603d5=readFileSync(_0x2258a7,_0x3a9237(0x1d4));return validateReactModuleSource(_0x2603d5),_0x2603d5;}function a11_0x3862(){const _0x3cc90b=['7ebipki','build','source','body','File\x20path\x20is\x20required.','12645xZFuJb','685836xljlFr','--metadata\x20must\x20be\x20a\x20JSON\x20object.','Create\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','.\x20Unsupported:\x20','metadata','includes','POST','Created\x20Artifact\x20','artifactType','/client/artifact/create','File\x20not\x20found:\x20','compiledContent','exec','str','add','dayjs','appCode','split','favorite','parse','flag','createTime','description','45zNVNaN','lodash','Artifact\x20display\x20name','validation','3975102TKOehY','detail','trim','create','length','bool','Artifact\x20ID','react_module','object','isFile','react-dom','react','Optional\x20source\x20filter,\x20for\x20example\x20AGENT','utf8','file','33144890cIpxNE','react_module\x20imports\x20are\x20limited\x20to:\x20','updateTime','isArray','verbose','1266246ttmgBN','Preview:\x20update\x20react_module\x20Artifact\x20','read','string','Path\x20to\x20a\x20local\x20UTF-8\x20React\x20module\x20source\x20file','map','/update','startsWith','name','Optional\x20favorite-state\x20filter','num','artifact','test','1722920ZmDrKE','join','deleted','Artifact\x20source\x20file\x20is\x20blank.','981703zcvALb','Show\x20one\x20Artifact\x20by\x20id','Update\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','6088ZntutI','Preview:\x20create\x20react_module\x20Artifact','update','List\x20current-app\x20react_module\x20Artifacts','list','/client/artifact/','antd'];a11_0x3862=function(){return _0x3cc90b;};return a11_0x3862();}function parseMetadata(_0x3e4918){const _0xbb5d0a=a11_0x1f4ab3;if(!_0x3e4918)return undefined;let _0x16cf8f;try{_0x16cf8f=JSON[_0xbb5d0a(0x1bf)](_0x3e4918);}catch{throw CliErrors[_0xbb5d0a(0x1c6)]('Invalid\x20JSON\x20for\x20--metadata:\x20'+_0x3e4918);}if(!isPlainObject(_0x16cf8f))throw CliErrors[_0xbb5d0a(0x1c6)](_0xbb5d0a(0x1ad));const _0x3006eb={..._0x16cf8f};return delete _0x3006eb[_0xbb5d0a(0x1b7)],_0x3006eb;}function getPackageName(_0x390692){const _0x1471ad=a11_0x1f4ab3;if(_0x390692[_0x1471ad(0x192)]('@')){const [_0x4f55e7,_0x3b47d4]=_0x390692[_0x1471ad(0x1bd)]('/');return _0x4f55e7&&_0x3b47d4?_0x4f55e7+'/'+_0x3b47d4:_0x390692;}return _0x390692[_0x1471ad(0x1bd)]('/')[0x0]||_0x390692;}function validateAllowedImports(_0x47f010){const _0xabebf=a11_0x1f4ab3,_0x27b9c5=new Set();for(const _0x57c04f of IMPORT_SOURCE_PATTERNS){_0x57c04f['lastIndex']=0x0;let _0x1f78cd;while((_0x1f78cd=_0x57c04f[_0xabebf(0x1b8)](_0x47f010))!==null){const _0x1cdb84=_0x1f78cd[0x1]?.[_0xabebf(0x1c9)]();_0x1cdb84&&_0x27b9c5[_0xabebf(0x1ba)](_0x1cdb84);}}const _0x38ca3f=[..._0x27b9c5][_0xabebf(0x190)](getPackageName)['filter'](_0x4c5e18=>!ALLOWED_REACT_MODULE_IMPORTS[_0xabebf(0x1b1)](_0x4c5e18));if(_0x38ca3f[_0xabebf(0x1cb)]>0x0)throw CliErrors['validation'](_0xabebf(0x187)+ALLOWED_REACT_MODULE_IMPORTS_TEXT+_0xabebf(0x1af)+[...new Set(_0x38ca3f)][_0xabebf(0x199)](',\x20'));}export function validateReactModuleSource(_0x1ad356){const _0x469bd6=a11_0x1f4ab3;if(!_0x1ad356[_0x469bd6(0x1c9)]())throw CliErrors[_0x469bd6(0x1c6)](_0x469bd6(0x19b));if(PAGE_LEVEL_PATTERNS['some'](_0x289cb6=>_0x289cb6[_0x469bd6(0x197)](_0x1ad356)))throw CliErrors[_0x469bd6(0x1c6)]('react_module\x20must\x20be\x20an\x20embeddable\x20React\x20module,\x20not\x20full\x20HTML\x20or\x20a\x20ReactDOM/createRoot\x20mount\x20entry.');validateAllowedImports(_0x1ad356);}function a11_0x3670(_0x4bba89,_0xe6406d){_0x4bba89=_0x4bba89-0x186;const _0x386293=a11_0x3862();let _0x367016=_0x386293[_0x4bba89];return _0x367016;}function buildArtifactInput(_0x799307){const _0x47f455=a11_0x1f4ab3,_0x3406a2=readSourceFile(_0x799307[_0x47f455(0x1b9)](_0x47f455(0x1d5))),_0x4905fb=_0x799307['str']('name')['trim'](),_0x1ebc59=parseMetadata(_0x799307[_0x47f455(0x1b9)](_0x47f455(0x1b0)));return{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x4905fb?{'name':_0x4905fb}:{},'content':_0x3406a2,..._0x1ebc59?{'metadata':_0x1ebc59}:{},'source':ARTIFACT_SOURCE_AGENT};}function summarizeArtifact(_0x20177d){const _0x5a79d4=a11_0x1f4ab3;return{'id':_0x20177d['id'],'name':_0x20177d['name'],'artifactType':_0x20177d[_0x5a79d4(0x1b4)],'source':_0x20177d['source'],'favorite':_0x20177d[_0x5a79d4(0x1be)],'deleted':_0x20177d[_0x5a79d4(0x19a)],'createTime':_0x20177d[_0x5a79d4(0x1c1)],'updateTime':_0x20177d['updateTime']};}function detailArtifact(_0x32551e){const _0x32ead0=a11_0x1f4ab3;return{'id':_0x32551e['id'],'appCode':_0x32551e[_0x32ead0(0x1bc)],'name':_0x32551e['name'],'artifactType':_0x32551e[_0x32ead0(0x1b4)],'source':_0x32551e[_0x32ead0(0x1a8)],'favorite':_0x32551e[_0x32ead0(0x1be)],'deleted':_0x32551e['deleted'],'content':_0x32551e['content']??'','compiledContent':_0x32551e[_0x32ead0(0x1b7)],'metadata':_0x32551e[_0x32ead0(0x1b0)]??{},'createTime':_0x32551e['createTime'],'updateTime':_0x32551e[_0x32ead0(0x188)]};}function readFavoriteFlag(_0x1ffcb2){const _0xd63446=a11_0x1f4ab3,_0x409f91=_0x1ffcb2[_0xd63446(0x1c0)](_0xd63446(0x1be));return _0x409f91===undefined||_0x409f91===null||_0x409f91===''?undefined:_0x1ffcb2[_0xd63446(0x1cc)](_0xd63446(0x1be));}const artifactList={'service':a11_0x1f4ab3(0x196),'command':a11_0x1f4ab3(0x1a3),'description':a11_0x1f4ab3(0x1a2),'risk':'read','flags':[{'name':'source','type':a11_0x1f4ab3(0x18e),'description':a11_0x1f4ab3(0x1d3)},{'name':a11_0x1f4ab3(0x1be),'type':'boolean','description':a11_0x1f4ab3(0x194)},VERBOSE_FLAG],async 'execute'(_0x16281c){const _0x4e4a7c=a11_0x1f4ab3,_0x1b82e2=await listRuntimeArtifacts(_0x16281c[_0x4e4a7c(0x1bc)],{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x16281c[_0x4e4a7c(0x1b9)](_0x4e4a7c(0x1a8))?{'source':_0x16281c[_0x4e4a7c(0x1b9)](_0x4e4a7c(0x1a8))}:{},...readFavoriteFlag(_0x16281c)!==undefined?{'favorite':readFavoriteFlag(_0x16281c)}:{}});return{'ok':!![],'data':{'total':_0x1b82e2[_0x4e4a7c(0x1cb)],'items':_0x16281c[_0x4e4a7c(0x1cc)](_0x4e4a7c(0x18a))?_0x1b82e2:_0x1b82e2[_0x4e4a7c(0x190)](summarizeArtifact)}};}},artifactDetail={'service':a11_0x1f4ab3(0x196),'command':a11_0x1f4ab3(0x1c8),'description':a11_0x1f4ab3(0x19d),'risk':a11_0x1f4ab3(0x18d),'flags':[{...ID_FLAG,'description':a11_0x1f4ab3(0x1cd)}],async 'execute'(_0x22ab5e){const _0x5c2573=a11_0x1f4ab3,_0x225a1b=await getRuntimeArtifact(_0x22ab5e['num']('id'),_0x22ab5e[_0x5c2573(0x1bc)]);return{'ok':!![],'data':detailArtifact(_0x225a1b)};}},artifactCreate={'service':a11_0x1f4ab3(0x196),'command':a11_0x1f4ab3(0x1ca),'description':a11_0x1f4ab3(0x1ae),'risk':'read','flags':[FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x31c506){const _0x4547f0=a11_0x1f4ab3,_0x56c877=buildArtifactInput(_0x31c506),_0x194de9=await createRuntimeArtifact(_0x31c506[_0x4547f0(0x1bc)],_0x56c877);return{'ok':!![],'data':detailArtifact(_0x194de9),'message':_0x4547f0(0x1b3)+_0x194de9['id']+(_0x194de9[_0x4547f0(0x193)]?'\x20('+_0x194de9[_0x4547f0(0x193)]+')':'')};},async 'dryRun'(_0x1184c6){const _0xdaff57=a11_0x1f4ab3,_0x1fdef1=buildArtifactInput(_0x1184c6);return dryRun(_0xdaff57(0x1b2),_0xdaff57(0x1b5))[_0xdaff57(0x1a9)]({'appCode':_0x1184c6[_0xdaff57(0x1bc)],..._0x1fdef1})[_0xdaff57(0x1c2)](_0xdaff57(0x1a0))['build']();}},artifactUpdate={'service':a11_0x1f4ab3(0x196),'command':a11_0x1f4ab3(0x1a1),'description':a11_0x1f4ab3(0x19e),'risk':a11_0x1f4ab3(0x18d),'flags':[{...ID_FLAG,'description':a11_0x1f4ab3(0x1cd)},FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x18a5d4){const _0x2846dd=a11_0x1f4ab3,_0x37d743=_0x18a5d4[_0x2846dd(0x195)]('id'),_0x1a2beb=buildArtifactInput(_0x18a5d4),_0x589445=await updateRuntimeArtifact(_0x37d743,_0x18a5d4[_0x2846dd(0x1bc)],_0x1a2beb);return{'ok':!![],'data':detailArtifact(_0x589445),'message':'Updated\x20Artifact\x20'+_0x589445['id']+(_0x589445['name']?'\x20('+_0x589445[_0x2846dd(0x193)]+')':'')};},async 'dryRun'(_0x4c4198){const _0x2a6c7d=a11_0x1f4ab3,_0x1c824c=_0x4c4198['num']('id'),_0x5a42e0=buildArtifactInput(_0x4c4198);return dryRun(_0x2a6c7d(0x1b2),_0x2a6c7d(0x1a4)+_0x1c824c+_0x2a6c7d(0x191))[_0x2a6c7d(0x1a9)]({'appCode':_0x4c4198[_0x2a6c7d(0x1bc)],..._0x5a42e0})['description'](_0x2a6c7d(0x18c)+_0x1c824c)[_0x2a6c7d(0x1a7)]();}};export const artifactDefinitions=[artifactList,artifactDetail,artifactCreate,artifactUpdate];
1
+ const a11_0x340663=a11_0x3d93;(function(_0x229d9f,_0x5127ad){const _0x41b5a2=a11_0x3d93,_0x431ec3=_0x229d9f();while(!![]){try{const _0xbb87c1=parseInt(_0x41b5a2(0x15a))/0x1+parseInt(_0x41b5a2(0x16f))/0x2+parseInt(_0x41b5a2(0x151))/0x3+parseInt(_0x41b5a2(0x143))/0x4*(-parseInt(_0x41b5a2(0x149))/0x5)+-parseInt(_0x41b5a2(0x15b))/0x6+-parseInt(_0x41b5a2(0x13c))/0x7*(-parseInt(_0x41b5a2(0x131))/0x8)+-parseInt(_0x41b5a2(0x146))/0x9;if(_0xbb87c1===_0x5127ad)break;else _0x431ec3['push'](_0x431ec3['shift']());}catch(_0x2876fc){_0x431ec3['push'](_0x431ec3['shift']());}}}(a11_0x2fdf,0x48334));import{existsSync,readFileSync,statSync}from'node:fs';import{createRuntimeArtifact,getRuntimeArtifact,listRuntimeArtifacts,updateRuntimeArtifact}from'../../core/api-client.js';function a11_0x3d93(_0x32e8bb,_0x1e7ab0){_0x32e8bb=_0x32e8bb-0x12e;const _0x2fdf08=a11_0x2fdf();let _0x3d9345=_0x2fdf08[_0x32e8bb];return _0x3d9345;}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_0x340663(0x15e),ARTIFACT_SOURCE_AGENT=a11_0x340663(0x157),ALLOWED_REACT_MODULE_IMPORTS=[a11_0x340663(0x168),'react-dom','lodash',a11_0x340663(0x14d),a11_0x340663(0x175),a11_0x340663(0x132)];export const ALLOWED_REACT_MODULE_IMPORTS_TEXT=ALLOWED_REACT_MODULE_IMPORTS[a11_0x340663(0x137)](',\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_0x340663(0x16a),'type':a11_0x340663(0x130),'required':!![],'description':a11_0x340663(0x13f)},ARTIFACT_NAME_FLAG={'name':a11_0x340663(0x12e),'type':'string','description':a11_0x340663(0x154)},METADATA_FLAG={'name':a11_0x340663(0x167),'type':a11_0x340663(0x130),'description':'Artifact\x20metadata\x20as\x20JSON\x20object;\x20compiledContent\x20is\x20stripped'};function isPlainObject(_0x1811c4){const _0xeb6444=a11_0x340663;return typeof _0x1811c4===_0xeb6444(0x139)&&_0x1811c4!==null&&!Array[_0xeb6444(0x13b)](_0x1811c4);}function readSourceFile(_0x14309e){const _0x28e4b6=a11_0x340663;if(!_0x14309e)throw CliErrors[_0x28e4b6(0x160)](_0x28e4b6(0x170));if(!existsSync(_0x14309e))throw CliErrors[_0x28e4b6(0x160)]('File\x20not\x20found:\x20'+_0x14309e);if(!statSync(_0x14309e)['isFile']())throw CliErrors[_0x28e4b6(0x160)](_0x28e4b6(0x14e)+_0x14309e);const _0x38e984=readFileSync(_0x14309e,_0x28e4b6(0x13e));return validateReactModuleSource(_0x38e984),_0x38e984;}function parseMetadata(_0x237f82){const _0x37cc1d=a11_0x340663;if(!_0x237f82)return undefined;let _0xc0078f;try{_0xc0078f=JSON[_0x37cc1d(0x174)](_0x237f82);}catch{throw CliErrors[_0x37cc1d(0x160)](_0x37cc1d(0x169)+_0x237f82);}if(!isPlainObject(_0xc0078f))throw CliErrors['validation']('--metadata\x20must\x20be\x20a\x20JSON\x20object.');const _0x214941={..._0xc0078f};return delete _0x214941[_0x37cc1d(0x16e)],_0x214941;}function getPackageName(_0xdceb7c){const _0x44dd67=a11_0x340663;if(_0xdceb7c[_0x44dd67(0x158)]('@')){const [_0x48e8ae,_0x46f5ac]=_0xdceb7c['split']('/');return _0x48e8ae&&_0x46f5ac?_0x48e8ae+'/'+_0x46f5ac:_0xdceb7c;}return _0xdceb7c[_0x44dd67(0x173)]('/')[0x0]||_0xdceb7c;}function validateAllowedImports(_0x3e446e){const _0x29596e=a11_0x340663,_0x33cd31=new Set();for(const _0x192cb4 of IMPORT_SOURCE_PATTERNS){_0x192cb4['lastIndex']=0x0;let _0x10d9b6;while((_0x10d9b6=_0x192cb4[_0x29596e(0x140)](_0x3e446e))!==null){const _0x365f45=_0x10d9b6[0x1]?.[_0x29596e(0x144)]();_0x365f45&&_0x33cd31['add'](_0x365f45);}}const _0x14ebb3=[..._0x33cd31][_0x29596e(0x145)](getPackageName)[_0x29596e(0x148)](_0xe71200=>!ALLOWED_REACT_MODULE_IMPORTS[_0x29596e(0x162)](_0xe71200));if(_0x14ebb3[_0x29596e(0x165)]>0x0)throw CliErrors[_0x29596e(0x160)]('react_module\x20imports\x20are\x20limited\x20to:\x20'+ALLOWED_REACT_MODULE_IMPORTS_TEXT+'.\x20Unsupported:\x20'+[...new Set(_0x14ebb3)][_0x29596e(0x137)](',\x20'));}export function validateReactModuleSource(_0x2974d0){const _0x47e0dd=a11_0x340663;if(!_0x2974d0[_0x47e0dd(0x144)]())throw CliErrors['validation'](_0x47e0dd(0x136));if(PAGE_LEVEL_PATTERNS['some'](_0x2f630d=>_0x2f630d[_0x47e0dd(0x135)](_0x2974d0)))throw CliErrors['validation'](_0x47e0dd(0x16b));validateAllowedImports(_0x2974d0);}function buildArtifactInput(_0x60cdea){const _0x532d37=a11_0x340663,_0x2729dd=readSourceFile(_0x60cdea[_0x532d37(0x155)](_0x532d37(0x16a))),_0x1e1cd6=_0x60cdea[_0x532d37(0x155)](_0x532d37(0x12e))[_0x532d37(0x144)](),_0x4db9fe=parseMetadata(_0x60cdea['str'](_0x532d37(0x167)));return{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x1e1cd6?{'name':_0x1e1cd6}:{},'content':_0x2729dd,..._0x4db9fe?{'metadata':_0x4db9fe}:{},'source':ARTIFACT_SOURCE_AGENT};}function summarizeArtifact(_0x525384){const _0x4ae702=a11_0x340663;return{'id':_0x525384['id'],'name':_0x525384[_0x4ae702(0x12e)],'artifactType':_0x525384['artifactType'],'source':_0x525384[_0x4ae702(0x166)],'favorite':_0x525384[_0x4ae702(0x12f)],'deleted':_0x525384[_0x4ae702(0x176)],'createTime':_0x525384[_0x4ae702(0x14a)],'updateTime':_0x525384['updateTime']};}function a11_0x2fdf(){const _0x468b99=['Preview:\x20update\x20react_module\x20Artifact\x20','split','parse','antd','deleted','num','name','favorite','string','24gciLbC','@ant-design/icons','bool','update','test','Artifact\x20source\x20file\x20is\x20blank.','join','Preview:\x20create\x20react_module\x20Artifact','object','body','isArray','41685qmjGoo','Create\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','utf8','Path\x20to\x20a\x20local\x20UTF-8\x20React\x20module\x20source\x20file','exec','Update\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','Optional\x20favorite-state\x20filter','49156GMiXjb','trim','map','362016MAigkL','create','filter','165ITFYef','createTime','flag','/client/artifact/create','dayjs','File\x20is\x20not\x20a\x20regular\x20file:\x20','verbose','appCode','1012692MRkDXB','POST','build','Artifact\x20display\x20name','str','artifact','AGENT','startsWith','updateTime','491628epBdpe','3179052cMjIkI','Updated\x20Artifact\x20','description','react_module','artifactType','validation','List\x20current-app\x20react_module\x20Artifacts','includes','read','list','length','source','metadata','react','Invalid\x20JSON\x20for\x20--metadata:\x20','file','react_module\x20must\x20be\x20an\x20embeddable\x20React\x20module,\x20not\x20full\x20HTML\x20or\x20a\x20ReactDOM/createRoot\x20mount\x20entry.','Artifact\x20ID','boolean','compiledContent','848556sjtucs','File\x20path\x20is\x20required.','Created\x20Artifact\x20'];a11_0x2fdf=function(){return _0x468b99;};return a11_0x2fdf();}function detailArtifact(_0x48d7b8){const _0x1eb627=a11_0x340663;return{'id':_0x48d7b8['id'],'appCode':_0x48d7b8[_0x1eb627(0x150)],'name':_0x48d7b8[_0x1eb627(0x12e)],'artifactType':_0x48d7b8[_0x1eb627(0x15f)],'source':_0x48d7b8[_0x1eb627(0x166)],'favorite':_0x48d7b8['favorite'],'deleted':_0x48d7b8['deleted'],'content':_0x48d7b8['content']??'','compiledContent':_0x48d7b8['compiledContent'],'metadata':_0x48d7b8['metadata']??{},'createTime':_0x48d7b8['createTime'],'updateTime':_0x48d7b8[_0x1eb627(0x159)]};}function readFavoriteFlag(_0x300189){const _0x362ec6=a11_0x340663,_0x3e3997=_0x300189[_0x362ec6(0x14b)](_0x362ec6(0x12f));return _0x3e3997===undefined||_0x3e3997===null||_0x3e3997===''?undefined:_0x300189['bool'](_0x362ec6(0x12f));}const artifactList={'service':'artifact','command':a11_0x340663(0x164),'description':a11_0x340663(0x161),'risk':a11_0x340663(0x163),'flags':[{'name':a11_0x340663(0x166),'type':a11_0x340663(0x130),'description':'Optional\x20source\x20filter,\x20for\x20example\x20AGENT'},{'name':a11_0x340663(0x12f),'type':a11_0x340663(0x16d),'description':a11_0x340663(0x142)},VERBOSE_FLAG],async 'execute'(_0x97d561){const _0x80c31=a11_0x340663,_0x23f2a8=await listRuntimeArtifacts(_0x97d561[_0x80c31(0x150)],{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x97d561[_0x80c31(0x155)](_0x80c31(0x166))?{'source':_0x97d561['str'](_0x80c31(0x166))}:{},...readFavoriteFlag(_0x97d561)!==undefined?{'favorite':readFavoriteFlag(_0x97d561)}:{}});return{'ok':!![],'data':{'total':_0x23f2a8['length'],'items':_0x97d561[_0x80c31(0x133)](_0x80c31(0x14f))?_0x23f2a8:_0x23f2a8['map'](summarizeArtifact)}};}},artifactDetail={'service':a11_0x340663(0x156),'command':'detail','description':'Show\x20one\x20Artifact\x20by\x20id','risk':a11_0x340663(0x163),'flags':[{...ID_FLAG,'description':a11_0x340663(0x16c)}],async 'execute'(_0x3d3cb4){const _0x39c2fc=await getRuntimeArtifact(_0x3d3cb4['num']('id'),_0x3d3cb4['appCode']);return{'ok':!![],'data':detailArtifact(_0x39c2fc)};}},artifactCreate={'service':'artifact','command':a11_0x340663(0x147),'description':a11_0x340663(0x13d),'risk':a11_0x340663(0x163),'flags':[FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x301bb6){const _0x5e44c5=a11_0x340663,_0x148c47=buildArtifactInput(_0x301bb6),_0x5e87be=await createRuntimeArtifact(_0x301bb6['appCode'],_0x148c47);return{'ok':!![],'data':detailArtifact(_0x5e87be),'message':_0x5e44c5(0x171)+_0x5e87be['id']+(_0x5e87be[_0x5e44c5(0x12e)]?'\x20('+_0x5e87be[_0x5e44c5(0x12e)]+')':'')};},async 'dryRun'(_0x418063){const _0x482d69=a11_0x340663,_0x5d7676=buildArtifactInput(_0x418063);return dryRun(_0x482d69(0x152),_0x482d69(0x14c))[_0x482d69(0x13a)]({'appCode':_0x418063[_0x482d69(0x150)],..._0x5d7676})[_0x482d69(0x15d)](_0x482d69(0x138))['build']();}},artifactUpdate={'service':a11_0x340663(0x156),'command':a11_0x340663(0x134),'description':a11_0x340663(0x141),'risk':a11_0x340663(0x163),'flags':[{...ID_FLAG,'description':a11_0x340663(0x16c)},FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x3a77e0){const _0x9bbd61=a11_0x340663,_0x6a2f9f=_0x3a77e0[_0x9bbd61(0x177)]('id'),_0x4ac08d=buildArtifactInput(_0x3a77e0),_0x1cdaa4=await updateRuntimeArtifact(_0x6a2f9f,_0x3a77e0[_0x9bbd61(0x150)],_0x4ac08d);return{'ok':!![],'data':detailArtifact(_0x1cdaa4),'message':_0x9bbd61(0x15c)+_0x1cdaa4['id']+(_0x1cdaa4[_0x9bbd61(0x12e)]?'\x20('+_0x1cdaa4[_0x9bbd61(0x12e)]+')':'')};},async 'dryRun'(_0x1dbb08){const _0x363821=a11_0x340663,_0x7d06e=_0x1dbb08[_0x363821(0x177)]('id'),_0x3252a7=buildArtifactInput(_0x1dbb08);return dryRun('POST','/client/artifact/'+_0x7d06e+'/update')[_0x363821(0x13a)]({'appCode':_0x1dbb08[_0x363821(0x150)],..._0x3252a7})[_0x363821(0x15d)](_0x363821(0x172)+_0x7d06e)[_0x363821(0x153)]();}};export const artifactDefinitions=[artifactList,artifactDetail,artifactCreate,artifactUpdate];
@@ -1 +1 @@
1
- const a12_0x2ffeec=a12_0x5b84;(function(_0x22bf61,_0x1b94c6){const _0x552151=a12_0x5b84,_0x437939=_0x22bf61();while(!![]){try{const _0x2f2b74=parseInt(_0x552151(0x191))/0x1*(-parseInt(_0x552151(0x192))/0x2)+parseInt(_0x552151(0x166))/0x3*(parseInt(_0x552151(0x188))/0x4)+-parseInt(_0x552151(0x17e))/0x5*(parseInt(_0x552151(0x142))/0x6)+-parseInt(_0x552151(0x18b))/0x7*(parseInt(_0x552151(0x18d))/0x8)+-parseInt(_0x552151(0x15b))/0x9*(parseInt(_0x552151(0x174))/0xa)+parseInt(_0x552151(0x187))/0xb*(parseInt(_0x552151(0x17d))/0xc)+parseInt(_0x552151(0x15e))/0xd;if(_0x2f2b74===_0x1b94c6)break;else _0x437939['push'](_0x437939['shift']());}catch(_0x1358ae){_0x437939['push'](_0x437939['shift']());}}}(a12_0x15a4,0x848c4));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(_0x2b2eda){const _0x24fef4=a12_0x5b84;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x2b2eda[_0x24fef4(0x171)](_0x24fef4(0x175)),'explicitProject':_0x2b2eda[_0x24fef4(0x171)](_0x24fef4(0x179)),'policy':_0x24fef4(0x150)}));}const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/,DEVICE_CODE_TTL_MS=0x927c0,POLL_INTERVAL_MS=0xbb8,MAX_POLLS=0xc8,MAX_CONSECUTIVE_NETWORK_ERRORS=0x5;function a12_0x5b84(_0x2fa849,_0x2991ca){_0x2fa849=_0x2fa849-0x13d;const _0x15a4f7=a12_0x15a4();let _0x5b8439=_0x15a4f7[_0x2fa849];return _0x5b8439;}export function generateDeviceCode(){const _0x2fae8a=a12_0x5b84;return crypto[_0x2fae8a(0x17c)]();}export function buildDeviceAuthUrl(_0x434ee0,_0x3fb4c6,_0x167bac=a12_0x2ffeec(0x16b)){const _0x1b3326=a12_0x2ffeec;return _0x434ee0+_0x1b3326(0x16d)+encodeURIComponent(_0x3fb4c6)+'&source='+encodeURIComponent(_0x167bac);}export function getDeviceCodePath(){const _0x5251b5=a12_0x2ffeec;return homedir()+'/'+PRODUCT_CONFIG[_0x5251b5(0x181)]+_0x5251b5(0x14b);}export function readStoredDeviceCode(){const _0x4f2708=a12_0x2ffeec,_0x32e244=getDeviceCodePath();if(!existsSync(_0x32e244))return null;try{const _0x45ee47=readFileSync(_0x32e244,{'encoding':_0x4f2708(0x17a)}),_0x433d6b=JSON[_0x4f2708(0x146)](_0x45ee47);if(_0x433d6b&&typeof _0x433d6b[_0x4f2708(0x18a)]===_0x4f2708(0x190)&&typeof _0x433d6b[_0x4f2708(0x157)]==='string'&&(_0x433d6b[_0x4f2708(0x15c)]==='global'||_0x433d6b[_0x4f2708(0x15c)]===_0x4f2708(0x179)))return _0x433d6b;}catch{}return null;}export function writeStoredDeviceCode(_0xa474fe,_0x4dbfcd){const _0x213508=a12_0x2ffeec,_0xee3914=getDeviceCodePath(),_0x100b33=dirname(_0xee3914);!existsSync(_0x100b33)&&mkdirSync(_0x100b33,{'recursive':!![]});const _0x11e069={'code':_0xa474fe,'createdAt':new Date()[_0x213508(0x143)](),'scope':_0x4dbfcd};writeFileSync(_0xee3914,JSON[_0x213508(0x169)](_0x11e069),{'encoding':_0x213508(0x17a),'mode':0x180});}export function deleteStoredDeviceCode(){const _0x3445aa=getDeviceCodePath();try{unlinkSync(_0x3445aa);}catch{}}export function isStoredDeviceCodeExpired(_0x42b668){const _0x46fef2=a12_0x2ffeec;return Date[_0x46fef2(0x14d)]()-new Date(_0x42b668[_0x46fef2(0x157)])[_0x46fef2(0x15d)]()>DEVICE_CODE_TTL_MS;}export async function fetchDeviceToken(_0x3b40b9,_0x446183){const _0x2b6a8f=a12_0x2ffeec,_0x7c5dc4=_0x3b40b9+_0x2b6a8f(0x177),_0x39908c=new AbortController(),_0x36c6e0=setTimeout(()=>_0x39908c['abort'](),0x2710),_0x163c2b=await fetch(_0x7c5dc4,{'method':'POST','headers':{'Content-Type':'application/json'},'body':JSON[_0x2b6a8f(0x169)]({'code':_0x446183}),'signal':_0x39908c[_0x2b6a8f(0x186)]});clearTimeout(_0x36c6e0);if(!_0x163c2b['ok'])throw CliErrors[_0x2b6a8f(0x159)](_0x2b6a8f(0x152)+_0x163c2b[_0x2b6a8f(0x165)]);const _0x8e1c15=await _0x163c2b['json'](),_0x12cf0b=_0x8e1c15[_0x2b6a8f(0x172)]&&typeof _0x8e1c15[_0x2b6a8f(0x172)]===_0x2b6a8f(0x170)?_0x8e1c15['data']:_0x8e1c15;if(!_0x12cf0b||typeof _0x12cf0b[_0x2b6a8f(0x165)]!==_0x2b6a8f(0x190))throw CliErrors[_0x2b6a8f(0x140)](_0x2b6a8f(0x16f));return{'status':_0x12cf0b[_0x2b6a8f(0x165)],'access_key':typeof _0x12cf0b[_0x2b6a8f(0x180)]==='string'?_0x12cf0b[_0x2b6a8f(0x180)]:undefined};}export async function pollDeviceToken(_0x5bfbc3,_0x54fc06,_0x2db10f){const _0x408748=a12_0x2ffeec;let _0x3e86ef=0x0;for(let _0xa7516=0x0;_0xa7516<MAX_POLLS;_0xa7516++){if(_0x2db10f[_0x408748(0x15f)])throw CliErrors[_0x408748(0x145)](_0x408748(0x158));let _0xe8ee9a;try{_0xe8ee9a=await fetchDeviceToken(_0x5bfbc3,_0x54fc06);}catch(_0x359ade){if(_0x359ade instanceof Error&&_0x359ade[_0x408748(0x14e)]===_0x408748(0x148))throw CliErrors[_0x408748(0x145)](_0x408748(0x158));_0x3e86ef++;if(_0x3e86ef>=MAX_CONSECUTIVE_NETWORK_ERRORS)throw CliErrors[_0x408748(0x159)](_0x408748(0x16a));writeCliSideChannelLine(_0x408748(0x13f)+_0x3e86ef+'/'+MAX_CONSECUTIVE_NETWORK_ERRORS+_0x408748(0x162)),await sleep(POLL_INTERVAL_MS);continue;}_0x3e86ef=0x0;if(_0xe8ee9a[_0x408748(0x165)]===_0x408748(0x183)){if(!_0xe8ee9a[_0x408748(0x180)])throw CliErrors[_0x408748(0x140)](_0x408748(0x163));return _0xe8ee9a[_0x408748(0x180)];}if(_0xe8ee9a[_0x408748(0x165)]===_0x408748(0x15a)){deleteStoredDeviceCode();throw CliErrors[_0x408748(0x144)](_0x408748(0x160));}const _0x21db3c=(_0xa7516+0x1)*POLL_INTERVAL_MS,_0x4f6c33=DEVICE_CODE_TTL_MS-_0x21db3c,_0x2acc5f=Math[_0x408748(0x155)](_0x4f6c33/0xea60),_0x2e599e=Math[_0x408748(0x155)](_0x4f6c33%0xea60/0x3e8);process[_0x408748(0x18f)][_0x408748(0x176)](_0x408748(0x141)+_0x2acc5f+':'+String(_0x2e599e)[_0x408748(0x13d)](0x2,'0')+_0x408748(0x156)),await sleep(POLL_INTERVAL_MS);}deleteStoredDeviceCode();throw CliErrors[_0x408748(0x144)](_0x408748(0x13e));}function sleep(_0xf7bc9f){return new Promise(_0x322d99=>setTimeout(_0x322d99,_0xf7bc9f));}export const authDeviceDefinition={'service':a12_0x2ffeec(0x185),'command':a12_0x2ffeec(0x173),'description':a12_0x2ffeec(0x17b),'risk':a12_0x2ffeec(0x176),'confirmationDescription':a12_0x2ffeec(0x161),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x2ffeec(0x175),'type':'boolean','description':a12_0x2ffeec(0x189),'default':!![]},{'name':'project','type':a12_0x2ffeec(0x182),'description':a12_0x2ffeec(0x18e),'default':![]},{'name':'source','type':a12_0x2ffeec(0x190),'description':a12_0x2ffeec(0x151),'default':a12_0x2ffeec(0x16b)},{'name':a12_0x2ffeec(0x14c),'type':'boolean','description':a12_0x2ffeec(0x168),'default':![]}],async 'execute'(_0xf5ca0d){const _0x8800dc=a12_0x2ffeec,_0x5481aa=resolveAuthScopeFlags(_0xf5ca0d),_0x547c3c=_0x5481aa[_0x8800dc(0x175)]?'global':_0x8800dc(0x179),_0x1c4b2b=readScopedConfig(_0x5481aa);if(_0x1c4b2b[_0x8800dc(0x14f)])return{'ok':!![],'message':_0x8800dc(0x14a)};const _0x3ed650=(_0xf5ca0d['str'](_0x8800dc(0x194))||'lovrabet-cli')[_0x8800dc(0x16e)](),_0x3d9ffb=getUserDomain(),_0x3e87c7=readStoredDeviceCode(),_0x3b1197=_0x3e87c7&&!isStoredDeviceCodeExpired(_0x3e87c7)?_0x3e87c7[_0x8800dc(0x18a)]:((()=>{const _0x867c6a=generateDeviceCode();return writeStoredDeviceCode(_0x867c6a,_0x547c3c),_0x867c6a;})()),_0x34802f=buildDeviceAuthUrl(_0x3d9ffb,_0x3b1197,_0x3ed650);if(_0xf5ca0d['bool'](_0x8800dc(0x14c)))return console['log'](_0x34802f),{'ok':!![]};writeCliSideChannelLine(_0x8800dc(0x18c)),writeCliSideChannelLine(''),writeCliSideChannelLine(_0x34802f),writeCliSideChannelLine(''),writeCliSideChannelLine(_0x8800dc(0x178));if(_0xf5ca0d[_0x8800dc(0x195)])return writeCliSideChannelLine('After\x20authorizing,\x20re-run:\x20'+CLI_BIN_NAME+_0x8800dc(0x184)),{'ok':!![],'message':_0x8800dc(0x167)};writeCliSideChannelLine(_0x8800dc(0x153));const _0x1e7f9c=new AbortController(),_0x4bec9d=()=>{const _0x59ff94=_0x8800dc;_0x1e7f9c[_0x59ff94(0x147)](),process[_0x59ff94(0x164)](_0x59ff94(0x17f),_0x4bec9d);};process[_0x8800dc(0x149)](_0x8800dc(0x17f),_0x4bec9d);let _0x915df4;try{_0x915df4=await pollDeviceToken(_0x3d9ffb,_0x3b1197,_0x1e7f9c[_0x8800dc(0x186)]);}finally{process['removeListener'](_0x8800dc(0x17f),_0x4bec9d);}if(!ACCESS_KEY_PATTERN[_0x8800dc(0x154)](_0x915df4))throw CliErrors['apiError'](_0x8800dc(0x163));const _0xcc0edb=readScopedConfig(_0x5481aa);return _0xcc0edb['accessKey']=_0x915df4,writeScopedConfig(_0xcc0edb,_0x5481aa),deleteStoredDeviceCode(),process[_0x8800dc(0x18f)]['write']('\x0a'),writeCliSideChannelLine('AccessKey\x20saved\x20to\x20'+_0x547c3c+'\x20config.'),writeCliSideChannelLine(_0x8800dc(0x193)+CLI_BIN_NAME+'\x20auth\x20status'),{'ok':!![],'message':_0x8800dc(0x16c)};}};function a12_0x15a4(){const _0x4815d7=['data','device','10fudbQO','global','write','/api/device-auth/token','The\x20device\x20code\x20is\x20valid\x20for\x2010\x20minutes.','project','utf8','Authorize\x20with\x20the\x20device-code\x20flow\x20(complete\x20in\x20the\x20browser;\x20no\x20copy-paste\x20required)','randomUUID','2200284USvEaI','105CgraAW','SIGINT','access_key','homeDirName','boolean','success','\x20auth\x20device','auth','signal','11xDAylc','1796JrGOAA','Write\x20to\x20global\x20config\x20(default)','code','213409cSzgZn','Open\x20this\x20URL\x20in\x20your\x20browser\x20to\x20authorize:','16GXxXWp','Write\x20to\x20project\x20config','stderr','string','3pYOOoU','79346dvxdYP','Verify:\x20','source','nonInteractive','padStart','Device\x20authorization\x20timed\x20out\x20after\x2010\x20minutes.\x20Run\x20`lovrabet\x20auth\x20device`\x20to\x20get\x20a\x20new\x20code.','Device\x20auth\x20API\x20error\x20(','apiError','\x0dWaiting\x20for\x20authorization...\x20','157434ZcYEGc','toISOString','validation','cancelled','parse','abort','AbortError','once','Already\x20authorized.\x20Use\x20`lovrabet\x20auth\x20status`\x20to\x20verify.','/.device-auth','url-only','now','name','accessKey','global-default','App\x20name\x20shown\x20on\x20authorization\x20page\x20(default:\x20lovrabet)','Device\x20auth\x20API\x20returned\x20HTTP\x20','Waiting\x20for\x20authorization\x20(timeout:\x2010\x20minutes,\x20Ctrl+C\x20to\x20cancel)...','test','floor','\x20remaining','createdAt','Device\x20authorization\x20cancelled.','networkError','expired','7491429dwwkuT','scope','getTime','21070075THLOsB','aborted','Device\x20code\x20expired.\x20Run\x20`lovrabet\x20auth\x20device`\x20to\x20get\x20a\x20new\x20code.','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.','),\x20retrying...','Invalid\x20access_key\x20returned\x20by\x20server.','removeListener','status','2019TjpZBY','Device\x20authorization\x20URL\x20printed.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20re-run.','Print\x20URL\x20to\x20stdout\x20and\x20exit\x20(for\x20WorkBuddy\x20integration)','stringify','Device\x20auth\x20API\x20unreachable\x20after\x20multiple\x20retries.','lovrabet-cli','Device\x20authorization\x20successful.','/device-auth?code=','trim','Invalid\x20device\x20auth\x20response','object','bool'];a12_0x15a4=function(){return _0x4815d7;};return a12_0x15a4();}
1
+ const a12_0x29a12b=a12_0x37fa;(function(_0x1bd6ea,_0x1f1a9e){const _0x524496=a12_0x37fa,_0x800a1e=_0x1bd6ea();while(!![]){try{const _0x525ec3=-parseInt(_0x524496(0xf2))/0x1*(-parseInt(_0x524496(0xc8))/0x2)+-parseInt(_0x524496(0xd6))/0x3*(-parseInt(_0x524496(0xc5))/0x4)+parseInt(_0x524496(0xcb))/0x5*(parseInt(_0x524496(0xb3))/0x6)+-parseInt(_0x524496(0xef))/0x7+-parseInt(_0x524496(0xf1))/0x8+parseInt(_0x524496(0xcd))/0x9+parseInt(_0x524496(0xae))/0xa;if(_0x525ec3===_0x1f1a9e)break;else _0x800a1e['push'](_0x800a1e['shift']());}catch(_0x58ad11){_0x800a1e['push'](_0x800a1e['shift']());}}}(a12_0xfaa5,0xcd78f));import{existsSync,mkdirSync,readFileSync,unlinkSync,writeFileSync}from'node:fs';import{dirname}from'node:path';function a12_0x37fa(_0x56dff4,_0x4688cf){_0x56dff4=_0x56dff4-0xaa;const _0xfaa50=a12_0xfaa5();let _0x37fa30=_0xfaa50[_0x56dff4];return _0x37fa30;}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(_0x41eec6){const _0x1838d2=a12_0x37fa;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x41eec6[_0x1838d2(0xec)](_0x1838d2(0xbd)),'explicitProject':_0x41eec6[_0x1838d2(0xec)](_0x1838d2(0xb9)),'policy':_0x1838d2(0xb8)}));}const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/,DEVICE_CODE_TTL_MS=0x927c0,POLL_INTERVAL_MS=0xbb8,MAX_POLLS=0xc8,MAX_CONSECUTIVE_NETWORK_ERRORS=0x5;export function generateDeviceCode(){const _0x5494e7=a12_0x37fa;return crypto[_0x5494e7(0xe6)]();}export function buildDeviceAuthUrl(_0x36c369,_0x538335,_0x351b0d=a12_0x29a12b(0xd1)){const _0x2d7d7c=a12_0x29a12b;return _0x36c369+_0x2d7d7c(0xf8)+encodeURIComponent(_0x538335)+'&source='+encodeURIComponent(_0x351b0d);}export function getDeviceCodePath(){const _0x75387=a12_0x29a12b;return homedir()+'/'+PRODUCT_CONFIG[_0x75387(0xf5)]+_0x75387(0xd8);}function a12_0xfaa5(){const _0x42d85e=['global-default','project','validation','\x20config.','url-only','global','Print\x20URL\x20to\x20stdout\x20and\x20exit\x20(for\x20WorkBuddy\x20integration)','Device\x20authorization\x20timed\x20out\x20after\x2010\x20minutes.\x20Run\x20`lovrabet\x20auth\x20device`\x20to\x20get\x20a\x20new\x20code.','parse','now','floor','once','signal','96AfyOOk','Authorize\x20with\x20the\x20device-code\x20flow\x20(complete\x20in\x20the\x20browser;\x20no\x20copy-paste\x20required)','object','6bHTRkE','status','data','10MiXLdg','access_key','9990414aJuvpo','\x20remaining','networkError','SIGINT','lovrabet-cli','Open\x20this\x20URL\x20in\x20your\x20browser\x20to\x20authorize:','trim','write','nonInteractive','44607aHQSYK','stringify','/.device-auth','scope','application/json','Device\x20authorization\x20successful.','Device\x20auth\x20API\x20returned\x20HTTP\x20','removeListener','apiError','accessKey','The\x20device\x20code\x20is\x20valid\x20for\x2010\x20minutes.','POST','name','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.','source','createdAt','randomUUID','Device\x20authorization\x20URL\x20printed.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20re-run.','getTime','Device\x20authorization\x20cancelled.','/api/device-auth/token','App\x20name\x20shown\x20on\x20authorization\x20page\x20(default:\x20lovrabet)','bool','\x0dWaiting\x20for\x20authorization...\x20','auth','4859127ndjzLF','Invalid\x20access_key\x20returned\x20by\x20server.','12503768LLDCnY','196279AZajeI','Write\x20to\x20project\x20config','Write\x20to\x20global\x20config\x20(default)','homeDirName','),\x20retrying...','boolean','/device-auth?code=','stderr','utf8','str','string','Device\x20code\x20expired.\x20Run\x20`lovrabet\x20auth\x20device`\x20to\x20get\x20a\x20new\x20code.','test','After\x20authorizing,\x20re-run:\x20','Verify:\x20','abort','3289700NRxOFG','Device\x20auth\x20API\x20unreachable\x20after\x20multiple\x20retries.','expired','cancelled','AbortError','2142114YfOJJF','success','code','\x20auth\x20status','Device\x20auth\x20API\x20error\x20('];a12_0xfaa5=function(){return _0x42d85e;};return a12_0xfaa5();}export function readStoredDeviceCode(){const _0x5f479f=a12_0x29a12b,_0x50ddc5=getDeviceCodePath();if(!existsSync(_0x50ddc5))return null;try{const _0x478876=readFileSync(_0x50ddc5,{'encoding':_0x5f479f(0xfa)}),_0x110494=JSON[_0x5f479f(0xc0)](_0x478876);if(_0x110494&&typeof _0x110494[_0x5f479f(0xb5)]==='string'&&typeof _0x110494['createdAt']===_0x5f479f(0xfc)&&(_0x110494[_0x5f479f(0xd9)]===_0x5f479f(0xbd)||_0x110494['scope']===_0x5f479f(0xb9)))return _0x110494;}catch{}return null;}export function writeStoredDeviceCode(_0x3d1483,_0xdad565){const _0x5dd0a2=a12_0x29a12b,_0x8d10da=getDeviceCodePath(),_0x3a7ed4=dirname(_0x8d10da);!existsSync(_0x3a7ed4)&&mkdirSync(_0x3a7ed4,{'recursive':!![]});const _0x5f339c={'code':_0x3d1483,'createdAt':new Date()['toISOString'](),'scope':_0xdad565};writeFileSync(_0x8d10da,JSON['stringify'](_0x5f339c),{'encoding':_0x5dd0a2(0xfa),'mode':0x180});}export function deleteStoredDeviceCode(){const _0x40fd74=getDeviceCodePath();try{unlinkSync(_0x40fd74);}catch{}}export function isStoredDeviceCodeExpired(_0x455c93){const _0x3c849b=a12_0x29a12b;return Date[_0x3c849b(0xc1)]()-new Date(_0x455c93[_0x3c849b(0xe5)])[_0x3c849b(0xe8)]()>DEVICE_CODE_TTL_MS;}export async function fetchDeviceToken(_0x259f49,_0x37db51){const _0x5b08dd=a12_0x29a12b,_0x2ed271=_0x259f49+_0x5b08dd(0xea),_0x1ee5d1=new AbortController(),_0x4f6de0=setTimeout(()=>_0x1ee5d1[_0x5b08dd(0xad)](),0x2710),_0x5d08ed=await fetch(_0x2ed271,{'method':_0x5b08dd(0xe1),'headers':{'Content-Type':_0x5b08dd(0xda)},'body':JSON[_0x5b08dd(0xd7)]({'code':_0x37db51}),'signal':_0x1ee5d1[_0x5b08dd(0xc4)]});clearTimeout(_0x4f6de0);if(!_0x5d08ed['ok'])throw CliErrors[_0x5b08dd(0xcf)](_0x5b08dd(0xdc)+_0x5d08ed['status']);const _0x5e821e=await _0x5d08ed['json'](),_0xb13ef2=_0x5e821e[_0x5b08dd(0xca)]&&typeof _0x5e821e[_0x5b08dd(0xca)]===_0x5b08dd(0xc7)?_0x5e821e[_0x5b08dd(0xca)]:_0x5e821e;if(!_0xb13ef2||typeof _0xb13ef2['status']!=='string')throw CliErrors[_0x5b08dd(0xde)]('Invalid\x20device\x20auth\x20response');return{'status':_0xb13ef2[_0x5b08dd(0xc9)],'access_key':typeof _0xb13ef2[_0x5b08dd(0xcc)]==='string'?_0xb13ef2['access_key']:undefined};}export async function pollDeviceToken(_0x3f1085,_0x3907ce,_0x244725){const _0x4f0900=a12_0x29a12b;let _0x4e1f76=0x0;for(let _0x12541f=0x0;_0x12541f<MAX_POLLS;_0x12541f++){if(_0x244725['aborted'])throw CliErrors[_0x4f0900(0xb1)](_0x4f0900(0xe9));let _0x311a5d;try{_0x311a5d=await fetchDeviceToken(_0x3f1085,_0x3907ce);}catch(_0x55d2d0){if(_0x55d2d0 instanceof Error&&_0x55d2d0[_0x4f0900(0xe2)]===_0x4f0900(0xb2))throw CliErrors[_0x4f0900(0xb1)]('Device\x20authorization\x20cancelled.');_0x4e1f76++;if(_0x4e1f76>=MAX_CONSECUTIVE_NETWORK_ERRORS)throw CliErrors['networkError'](_0x4f0900(0xaf));writeCliSideChannelLine(_0x4f0900(0xb7)+_0x4e1f76+'/'+MAX_CONSECUTIVE_NETWORK_ERRORS+_0x4f0900(0xf6)),await sleep(POLL_INTERVAL_MS);continue;}_0x4e1f76=0x0;if(_0x311a5d[_0x4f0900(0xc9)]===_0x4f0900(0xb4)){if(!_0x311a5d[_0x4f0900(0xcc)])throw CliErrors[_0x4f0900(0xde)](_0x4f0900(0xf0));return _0x311a5d[_0x4f0900(0xcc)];}if(_0x311a5d[_0x4f0900(0xc9)]===_0x4f0900(0xb0)){deleteStoredDeviceCode();throw CliErrors[_0x4f0900(0xba)](_0x4f0900(0xfd));}const _0x5be49f=(_0x12541f+0x1)*POLL_INTERVAL_MS,_0x19407e=DEVICE_CODE_TTL_MS-_0x5be49f,_0x237088=Math['floor'](_0x19407e/0xea60),_0x26a4f5=Math[_0x4f0900(0xc2)](_0x19407e%0xea60/0x3e8);process[_0x4f0900(0xf9)][_0x4f0900(0xd4)](_0x4f0900(0xed)+_0x237088+':'+String(_0x26a4f5)['padStart'](0x2,'0')+_0x4f0900(0xce)),await sleep(POLL_INTERVAL_MS);}deleteStoredDeviceCode();throw CliErrors[_0x4f0900(0xba)](_0x4f0900(0xbf));}function sleep(_0x8726d7){return new Promise(_0x2c0353=>setTimeout(_0x2c0353,_0x8726d7));}export const authDeviceDefinition={'service':a12_0x29a12b(0xee),'command':'device','description':a12_0x29a12b(0xc6),'risk':'write','confirmationDescription':a12_0x29a12b(0xe3),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x29a12b(0xbd),'type':a12_0x29a12b(0xf7),'description':a12_0x29a12b(0xf4),'default':!![]},{'name':a12_0x29a12b(0xb9),'type':a12_0x29a12b(0xf7),'description':a12_0x29a12b(0xf3),'default':![]},{'name':a12_0x29a12b(0xe4),'type':a12_0x29a12b(0xfc),'description':a12_0x29a12b(0xeb),'default':a12_0x29a12b(0xd1)},{'name':a12_0x29a12b(0xbc),'type':a12_0x29a12b(0xf7),'description':a12_0x29a12b(0xbe),'default':![]}],async 'execute'(_0x16ee61){const _0x59d94e=a12_0x29a12b,_0x536c8a=resolveAuthScopeFlags(_0x16ee61),_0x391ef3=_0x536c8a['global']?_0x59d94e(0xbd):_0x59d94e(0xb9),_0x177db3=readScopedConfig(_0x536c8a);if(_0x177db3[_0x59d94e(0xdf)])return{'ok':!![],'message':'Already\x20authorized.\x20Use\x20`lovrabet\x20auth\x20status`\x20to\x20verify.'};const _0x26ca38=(_0x16ee61[_0x59d94e(0xfb)](_0x59d94e(0xe4))||_0x59d94e(0xd1))[_0x59d94e(0xd3)](),_0x364bb5=getUserDomain(),_0x483ba2=readStoredDeviceCode(),_0x461dd6=_0x483ba2&&!isStoredDeviceCodeExpired(_0x483ba2)?_0x483ba2['code']:((()=>{const _0x14023e=generateDeviceCode();return writeStoredDeviceCode(_0x14023e,_0x391ef3),_0x14023e;})()),_0x3ccb90=buildDeviceAuthUrl(_0x364bb5,_0x461dd6,_0x26ca38);if(_0x16ee61[_0x59d94e(0xec)]('url-only'))return console['log'](_0x3ccb90),{'ok':!![]};writeCliSideChannelLine(_0x59d94e(0xd2)),writeCliSideChannelLine(''),writeCliSideChannelLine(_0x3ccb90),writeCliSideChannelLine(''),writeCliSideChannelLine(_0x59d94e(0xe0));if(_0x16ee61[_0x59d94e(0xd5)])return writeCliSideChannelLine(_0x59d94e(0xab)+CLI_BIN_NAME+'\x20auth\x20device'),{'ok':!![],'message':_0x59d94e(0xe7)};writeCliSideChannelLine('Waiting\x20for\x20authorization\x20(timeout:\x2010\x20minutes,\x20Ctrl+C\x20to\x20cancel)...');const _0x3ba8d4=new AbortController(),_0x321cbf=()=>{const _0xec3414=_0x59d94e;_0x3ba8d4[_0xec3414(0xad)](),process[_0xec3414(0xdd)]('SIGINT',_0x321cbf);};process[_0x59d94e(0xc3)](_0x59d94e(0xd0),_0x321cbf);let _0xc05d40;try{_0xc05d40=await pollDeviceToken(_0x364bb5,_0x461dd6,_0x3ba8d4[_0x59d94e(0xc4)]);}finally{process[_0x59d94e(0xdd)](_0x59d94e(0xd0),_0x321cbf);}if(!ACCESS_KEY_PATTERN[_0x59d94e(0xaa)](_0xc05d40))throw CliErrors[_0x59d94e(0xde)](_0x59d94e(0xf0));const _0x36f2c5=readScopedConfig(_0x536c8a);return _0x36f2c5[_0x59d94e(0xdf)]=_0xc05d40,writeScopedConfig(_0x36f2c5,_0x536c8a),deleteStoredDeviceCode(),process[_0x59d94e(0xf9)][_0x59d94e(0xd4)]('\x0a'),writeCliSideChannelLine('AccessKey\x20saved\x20to\x20'+_0x391ef3+_0x59d94e(0xbb)),writeCliSideChannelLine(_0x59d94e(0xac)+CLI_BIN_NAME+_0x59d94e(0xb6)),{'ok':!![],'message':_0x59d94e(0xdb)};}};