@lovrabet/lovrabet-cli 2.3.5 → 2.3.6-beta.2

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 (193) 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.d.ts +3 -3
  32. package/lib/commands/dataset/list.js +1 -1
  33. package/lib/commands/dataset/sdk-doc.js +1 -1
  34. package/lib/commands/doctor.js +1 -1
  35. package/lib/commands/file/index.js +1 -1
  36. package/lib/commands/init.js +1 -1
  37. package/lib/commands/kb/index.js +1 -1
  38. package/lib/commands/logs/index.js +1 -1
  39. package/lib/commands/notification/config-list.js +1 -1
  40. package/lib/commands/notification/index.js +1 -1
  41. package/lib/commands/notification/shared.js +1 -1
  42. package/lib/commands/ocr/index.js +1 -1
  43. package/lib/commands/permit/dataset-get.js +1 -1
  44. package/lib/commands/permit/dataset-set.js +1 -1
  45. package/lib/commands/permit/index.js +1 -1
  46. package/lib/commands/permit/page-get.js +1 -1
  47. package/lib/commands/permit/page-set.js +1 -1
  48. package/lib/commands/permit/role-menus-set.js +1 -1
  49. package/lib/commands/permit/role-menus.js +1 -1
  50. package/lib/commands/permit/shared.js +1 -1
  51. package/lib/commands/personal-bff/index.js +1 -1
  52. package/lib/commands/registry.js +1 -1
  53. package/lib/commands/role/create.js +1 -1
  54. package/lib/commands/role/delete.js +1 -1
  55. package/lib/commands/role/detail.js +1 -1
  56. package/lib/commands/role/index.js +1 -1
  57. package/lib/commands/role/list.js +1 -1
  58. package/lib/commands/role/shared.js +1 -1
  59. package/lib/commands/role/update.js +1 -1
  60. package/lib/commands/role/user-add.js +1 -1
  61. package/lib/commands/role/user-remove.js +1 -1
  62. package/lib/commands/schedule/index.js +1 -1
  63. package/lib/commands/schema.js +1 -1
  64. package/lib/commands/service/dynamic.js +1 -1
  65. package/lib/commands/service/function-name-adapter.js +1 -1
  66. package/lib/commands/service/index.js +1 -1
  67. package/lib/commands/service/registry.js +1 -1
  68. package/lib/commands/skill/commands/create.js +1 -1
  69. package/lib/commands/skill/commands/diagram.js +1 -1
  70. package/lib/commands/skill/commands/install.js +1 -1
  71. package/lib/commands/skill/commands/list.js +1 -1
  72. package/lib/commands/skill/commands/push.js +1 -1
  73. package/lib/commands/skill/commands/validate.js +1 -1
  74. package/lib/commands/skill/diagram.js +1 -1
  75. package/lib/commands/skill/flags.js +1 -1
  76. package/lib/commands/skill/index.js +1 -1
  77. package/lib/commands/skill/manifest-helpers.js +1 -1
  78. package/lib/commands/skill/push-execute.js +1 -1
  79. package/lib/commands/skill/push-flow-helpers.js +1 -1
  80. package/lib/commands/skill/push-retarget.js +1 -1
  81. package/lib/commands/skill/scopes.js +1 -1
  82. package/lib/commands/skill/summary.js +1 -1
  83. package/lib/commands/skill/templates.js +1 -1
  84. package/lib/commands/skill/validate.js +1 -1
  85. package/lib/commands/sql/detail.js +1 -1
  86. package/lib/commands/sql/exec.js +1 -1
  87. package/lib/commands/sql/index.js +1 -1
  88. package/lib/commands/update.js +1 -1
  89. package/lib/commands/user-account/bind.js +1 -1
  90. package/lib/commands/user-account/index.js +1 -1
  91. package/lib/commands/workspace/index.js +1 -1
  92. package/lib/config/domain-config.js +1 -1
  93. package/lib/config/schema.js +1 -1
  94. package/lib/constant/app.js +1 -1
  95. package/lib/constant/auth-mode.js +1 -1
  96. package/lib/constant/cli.js +1 -1
  97. package/lib/constant/defaults.js +1 -1
  98. package/lib/constant/distribution.js +1 -1
  99. package/lib/constant/domain.js +1 -1
  100. package/lib/constant/env.js +1 -1
  101. package/lib/constant/output.js +1 -1
  102. package/lib/constant/product.js +1 -1
  103. package/lib/constant/region.js +1 -1
  104. package/lib/constant/risk.js +1 -1
  105. package/lib/constant/url.js +1 -1
  106. package/lib/context.js +1 -1
  107. package/lib/core/api-client.d.ts +11 -0
  108. package/lib/core/api-client.js +1 -1
  109. package/lib/core/db-resolver.js +1 -1
  110. package/lib/core/kb-search-client.js +1 -1
  111. package/lib/core/sdk-client.js +1 -1
  112. package/lib/errors.js +1 -1
  113. package/lib/framework/access-error.js +1 -1
  114. package/lib/framework/build-all-flags.js +1 -1
  115. package/lib/framework/dryrun.js +1 -1
  116. package/lib/framework/flags.js +1 -1
  117. package/lib/framework/help.js +1 -1
  118. package/lib/framework/index.js +1 -1
  119. package/lib/framework/output.js +1 -1
  120. package/lib/framework/preparse.js +1 -1
  121. package/lib/framework/rate-limit.js +1 -1
  122. package/lib/framework/raw-flags.js +1 -1
  123. package/lib/framework/response.js +1 -1
  124. package/lib/framework/runner-confirmation.js +1 -1
  125. package/lib/framework/runner-error.js +1 -1
  126. package/lib/framework/runner.js +1 -1
  127. package/lib/framework/schema-export.js +1 -1
  128. package/lib/framework/service-order.js +1 -1
  129. package/lib/framework/types.js +1 -1
  130. package/lib/generated/build-info.d.ts +4 -4
  131. package/lib/generated/build-info.js +1 -1
  132. package/lib/generated/official-routing.js +1 -1
  133. package/lib/generated/routing-contract.js +1 -1
  134. package/lib/help.js +1 -1
  135. package/lib/postinstall.js +1 -1
  136. package/lib/runtime/confirmation.js +1 -1
  137. package/lib/runtime/event.js +1 -1
  138. package/lib/runtime/index.js +1 -1
  139. package/lib/runtime/queue.js +1 -1
  140. package/lib/runtime/resolve.js +1 -1
  141. package/lib/services/dataset-import/auto-id-runner.d.ts +3 -1
  142. package/lib/services/dataset-import/auto-id-runner.js +1 -1
  143. package/lib/services/dataset-import/excel-reader.js +1 -1
  144. package/lib/services/dataset-import/image-bytes.d.ts +3 -0
  145. package/lib/services/dataset-import/image-bytes.js +1 -0
  146. package/lib/services/dataset-import/image-ooxml.d.ts +10 -0
  147. package/lib/services/dataset-import/image-ooxml.js +1 -0
  148. package/lib/services/dataset-import/image-runner.d.ts +48 -0
  149. package/lib/services/dataset-import/image-runner.js +1 -0
  150. package/lib/services/dataset-import/metadata.js +1 -1
  151. package/lib/services/dataset-import/preview.js +1 -1
  152. package/lib/services/dataset-import/runner.d.ts +10 -1
  153. package/lib/services/dataset-import/runner.js +1 -1
  154. package/lib/services/dataset-import/types.d.ts +28 -1
  155. package/lib/skills/builtin-skill.js +1 -1
  156. package/lib/skills/npx-skills-add.js +1 -1
  157. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  158. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  159. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  160. package/lib/skills/runtime-skill-sync/install-target.js +1 -1
  161. package/lib/skills/runtime-skill-sync/links.js +1 -1
  162. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  163. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  164. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  165. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  166. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  167. package/lib/skills/runtime-skill-sync/push.js +1 -1
  168. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  169. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  170. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  171. package/lib/skills/runtime-skill-sync.js +1 -1
  172. package/lib/skills/skill-presence.js +1 -1
  173. package/lib/utils/access-key-redaction.js +1 -1
  174. package/lib/utils/apply-jq-filter.js +1 -1
  175. package/lib/utils/cli-version-check.js +1 -1
  176. package/lib/utils/cli-version-policy.js +1 -1
  177. package/lib/utils/logger.js +1 -1
  178. package/lib/utils/lossless-json.js +1 -1
  179. package/lib/utils/params.js +1 -1
  180. package/lib/utils/positive-safe-integer.js +1 -1
  181. package/lib/utils/redaction.js +1 -1
  182. package/lib/utils/update-notice.js +1 -1
  183. package/lib/utils/version.js +1 -1
  184. package/lib/utils/write-cli-side-channel.js +1 -1
  185. package/package.json +4 -1
  186. package/skills/lovrabet/SKILL.md +7 -3
  187. package/skills/lovrabet/guides/app-resolution.md +2 -0
  188. package/skills/lovrabet/guides/dataset-and-data-workflow.md +10 -1
  189. package/skills/lovrabet/references/dataset-discovery-workflow.md +14 -1
  190. package/skills/lovrabet/references/instant-api-workflow.md +2 -0
  191. package/skills/lovrabet/references/lovrabet-app.md +2 -0
  192. package/skills/lovrabet/references/lovrabet-excel-import.md +19 -0
  193. package/skills/lovrabet.manifest.json +3 -3
package/lib/cli.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- (function(_0x37127b,_0x33a49f){const _0x456b85=a0_0x33e2,_0x135491=_0x37127b();while(!![]){try{const _0x2bc786=parseInt(_0x456b85(0xba))/0x1+parseInt(_0x456b85(0xbc))/0x2*(parseInt(_0x456b85(0x9c))/0x3)+parseInt(_0x456b85(0xaa))/0x4*(-parseInt(_0x456b85(0xa2))/0x5)+-parseInt(_0x456b85(0xb6))/0x6*(-parseInt(_0x456b85(0xb1))/0x7)+-parseInt(_0x456b85(0xa5))/0x8*(parseInt(_0x456b85(0xb7))/0x9)+-parseInt(_0x456b85(0xa0))/0xa+-parseInt(_0x456b85(0xaf))/0xb;if(_0x2bc786===_0x33a49f)break;else _0x135491['push'](_0x135491['shift']());}catch(_0x4155d2){_0x135491['push'](_0x135491['shift']());}}}(a0_0x1d5d,0x882b5));import{jsx as a0_0x2ebec6}from'react/jsx-runtime';import a0_0x18043f from'meow';import{render}from'ink';import{Help}from'./help.js';import{CliError,CliErrors}from'./errors.js';import{buildConfigFromFlags,initGlobalEnvironment}from'./context.js';function a0_0x1d5d(){const _0x48cdac=['validation','4297680wRWmXH','args','74125VfrkXY','log','doctor','3440CzZuUI','defaultCommand','code','stderr','error','212ePoIAL','name','flags','corrected','message','4718164ouNRwI','assign','325087ukujVv','input','handler','Unexpected\x20error:','ERR_STREAM_DESTROYED','108qDBHGi','2817xULJyh','original','config','821959IlQPsQ','[preparse]\x20','2EQTWZR','exit','help','\x20->\x20--','\x0aCancelled.\x0a','definition','write','hint','ERR_USE_AFTER_CLOSE','2036577wlBYks','Hint:\x20','flatMap'];a0_0x1d5d=function(){return _0x48cdac;};return a0_0x1d5d();}import{isKnownService,getServiceEntry,findDefinition,getAllDefinitions,resolveRemovedCommand}from'./commands/registry.js';import{generateDynamicServiceHelp,resolveDynamicServiceCommand}from'./commands/service/dynamic.js';import{runCommand,createPipelineEnv}from'./framework/runner.js';import{generateCommandHelp,generateServiceHelp,generateFullHelp}from'./framework/help.js';import{buildMeowFlags}from'./constant/cli.js';import{getCliVersionDisplay}from'./utils/version.js';const helpText=generateFullHelp(),cli=a0_0x18043f(helpText,{'importMeta':import.meta,'flags':buildMeowFlags(),'version':getCliVersionDisplay()});void main()['catch'](handleError);async function main(){try{await run();}catch(_0xeb552e){handleError(_0xeb552e);}}async function run(){const _0xe65899=a0_0x33e2;let _0x520d2b=cli[_0xe65899(0xb2)][0x0],_0x5665fc=cli[_0xe65899(0xb2)][0x1];const _0xbe0d1c=cli[_0xe65899(0xac)];try{const {correctFlags:_0x2b2b66}=await import('./framework/preparse.js'),_0x46d2a7=getAllDefinitions()[_0xe65899(0x9e)](_0x1238a9=>_0x1238a9[_0xe65899(0xac)]??[]),{flags:_0x4619a0,corrections:_0x49937a}=_0x2b2b66(_0xbe0d1c,_0x46d2a7);if(_0x49937a['length']>0x0){for(const _0x3b729a of _0x49937a){process[_0xe65899(0xa8)][_0xe65899(0x99)](_0xe65899(0xbb)+_0x3b729a[_0xe65899(0xb3)]+':\x20--'+_0x3b729a[_0xe65899(0xb8)]+_0xe65899(0x96)+_0x3b729a[_0xe65899(0xad)]+'\x0a');}Object[_0xe65899(0xb0)](_0xbe0d1c,_0x4619a0);}}catch{}if(!_0x520d2b){const {waitUntilExit:_0x198633}=render(a0_0x2ebec6(Help,{}));await _0x198633();return;}const _0x479d54=resolveRemovedCommand(_0x520d2b,_0x5665fc);if(_0x479d54)throw CliErrors[_0xe65899(0x9f)](_0x479d54[_0xe65899(0xae)],_0x479d54[_0xe65899(0x9a)]);if(!isKnownService(_0x520d2b)){const _0x6dcc2a=resolveDynamicServiceCommand(cli[_0xe65899(0xb2)],_0xbe0d1c);if(_0x6dcc2a){if(_0xbe0d1c[_0xe65899(0xbe)]){console[_0xe65899(0xa3)](generateCommandHelp(_0x6dcc2a[_0xe65899(0x98)]));return;}Object['assign'](_0xbe0d1c,_0x6dcc2a['flags']);const _0x444414=buildConfigFromFlags(_0xbe0d1c);await initGlobalEnvironment(_0x444414);const _0x108196=createPipelineEnv(_0x444414,_0xbe0d1c);_0x108196[_0xe65899(0xa1)]=_0x6dcc2a[_0xe65899(0xa1)],await runCommand(_0x6dcc2a[_0xe65899(0x98)],_0x108196);return;}if(_0xbe0d1c[_0xe65899(0xbe)]){const _0x217b29=generateDynamicServiceHelp(_0x520d2b);if(_0x217b29){console[_0xe65899(0xa3)](_0x217b29);return;}}const {waitUntilExit:_0x12cfa8}=render(a0_0x2ebec6(Help,{}));await _0x12cfa8();return;}const _0xe8f762=getServiceEntry(_0x520d2b);if(!_0x5665fc){if(_0xbe0d1c['help']){console[_0xe65899(0xa3)](generateServiceHelp(_0x520d2b));return;}if(_0xe8f762[_0xe65899(0xa6)])_0x5665fc=_0xe8f762['defaultCommand'];else{console[_0xe65899(0xa3)](generateServiceHelp(_0x520d2b));return;}}const _0x1e9787=findDefinition(_0x520d2b,_0x5665fc);!_0x1e9787&&(console[_0xe65899(0xa3)](generateServiceHelp(_0x520d2b)),handleError(CliErrors['unknownCommand'](_0x520d2b+'\x20'+_0x5665fc)));if(_0xbe0d1c[_0xe65899(0xbe)]){console[_0xe65899(0xa3)](generateCommandHelp(_0x1e9787));return;}const _0x25b44f=buildConfigFromFlags(_0xbe0d1c);_0x520d2b!==_0xe65899(0xb9)&&_0x520d2b!==_0xe65899(0xa4)&&await initGlobalEnvironment(_0x25b44f);const _0x1e4867=createPipelineEnv(_0x25b44f,_0xbe0d1c);_0x1e4867['args']=cli[_0xe65899(0xb2)]['slice'](0x2),await runCommand(_0x1e9787,_0x1e4867);}function a0_0x33e2(_0x47a523,_0x1a8f98){_0x47a523=_0x47a523-0x96;const _0x1d5d5b=a0_0x1d5d();let _0x33e2c0=_0x1d5d5b[_0x47a523];return _0x33e2c0;}function handleError(_0x2ac32a){const _0x2f0a74=a0_0x33e2;if(_0x2ac32a instanceof CliError){_0x2ac32a[_0x2f0a74(0xa7)]==='cancelled'&&(process[_0x2f0a74(0xa8)][_0x2f0a74(0x99)](_0x2f0a74(0x97)),process['exit'](0x0));console[_0x2f0a74(0xa9)]('Error:\x20'+_0x2ac32a[_0x2f0a74(0xae)]);if(_0x2ac32a['hint'])console[_0x2f0a74(0xa9)](_0x2f0a74(0x9d)+_0x2ac32a[_0x2f0a74(0x9a)]);process[_0x2f0a74(0xbd)](_0x2ac32a['exitCode']);}isUserCancellation(_0x2ac32a)&&(process[_0x2f0a74(0xa8)]['write'](_0x2f0a74(0x97)),process['exit'](0x0)),console[_0x2f0a74(0xa9)](_0x2f0a74(0xb4),_0x2ac32a),process[_0x2f0a74(0xbd)](0x1);}function isUserCancellation(_0x3e4598){const _0x5e2240=a0_0x33e2;if(!(_0x3e4598 instanceof Error))return![];if(_0x3e4598[_0x5e2240(0xab)]==='ExitPromptError')return!![];if(_0x3e4598[_0x5e2240(0xa7)]===_0x5e2240(0x9b))return!![];if(_0x3e4598[_0x5e2240(0xa7)]===_0x5e2240(0xb5))return!![];return![];}
2
+ (function(_0x1640e2,_0x4625fd){const _0x139645=a0_0x4b55,_0x36917a=_0x1640e2();while(!![]){try{const _0x129919=parseInt(_0x139645(0x160))/0x1+-parseInt(_0x139645(0x182))/0x2*(parseInt(_0x139645(0x17e))/0x3)+-parseInt(_0x139645(0x170))/0x4+parseInt(_0x139645(0x16d))/0x5*(-parseInt(_0x139645(0x169))/0x6)+-parseInt(_0x139645(0x17d))/0x7*(parseInt(_0x139645(0x165))/0x8)+-parseInt(_0x139645(0x162))/0x9*(-parseInt(_0x139645(0x15c))/0xa)+parseInt(_0x139645(0x17b))/0xb*(parseInt(_0x139645(0x16c))/0xc);if(_0x129919===_0x4625fd)break;else _0x36917a['push'](_0x36917a['shift']());}catch(_0x3aa967){_0x36917a['push'](_0x36917a['shift']());}}}(a0_0x2862,0xc39e2));function a0_0x2862(){const _0x2e9855=['15VrKgXh','message','assign','1707032yvqDRl','defaultCommand','validation','\x0aCancelled.\x0a','original','Unexpected\x20error:','flatMap','name','input','code','exit','77iKeqYH','error','9023bOajCK','3XzloIJ','args','log','ERR_USE_AFTER_CLOSE','591550SUWSur','length','corrected','hint','10OJicay','handler','cancelled','Error:\x20','666641KEmkzn',':\x20--','8103906lvuTAA','config','definition','3792KtvKrN','ERR_STREAM_DESTROYED','[preparse]\x20','slice','1064586UgezBd','flags','help','1885692CsOnCj'];a0_0x2862=function(){return _0x2e9855;};return a0_0x2862();}import{jsx as a0_0x33990d}from'react/jsx-runtime';import a0_0x390b66 from'meow';import{render}from'ink';import{Help}from'./help.js';import{CliError,CliErrors}from'./errors.js';import{buildConfigFromFlags,initGlobalEnvironment}from'./context.js';import{isKnownService,getServiceEntry,findDefinition,getAllDefinitions,resolveRemovedCommand}from'./commands/registry.js';import{generateDynamicServiceHelp,resolveDynamicServiceCommand}from'./commands/service/dynamic.js';import{runCommand,createPipelineEnv}from'./framework/runner.js';function a0_0x4b55(_0x523a1a,_0xb385cf){_0x523a1a=_0x523a1a-0x15a;const _0x286269=a0_0x2862();let _0x4b5594=_0x286269[_0x523a1a];return _0x4b5594;}import{generateCommandHelp,generateServiceHelp,generateFullHelp}from'./framework/help.js';import{buildMeowFlags}from'./constant/cli.js';import{getCliVersionDisplay}from'./utils/version.js';const helpText=generateFullHelp(),cli=a0_0x390b66(helpText,{'importMeta':import.meta,'flags':buildMeowFlags(),'version':getCliVersionDisplay()});void main()['catch'](handleError);async function main(){try{await run();}catch(_0x50f375){handleError(_0x50f375);}}async function run(){const _0x19a301=a0_0x4b55;let _0x9dda86=cli[_0x19a301(0x178)][0x0],_0x5f450f=cli['input'][0x1];const _0x3916d2=cli[_0x19a301(0x16a)];try{const {correctFlags:_0x459611}=await import('./framework/preparse.js'),_0x54fb8a=getAllDefinitions()[_0x19a301(0x176)](_0x238915=>_0x238915['flags']??[]),{flags:_0x169985,corrections:_0x3a42d9}=_0x459611(_0x3916d2,_0x54fb8a);if(_0x3a42d9[_0x19a301(0x183)]>0x0){for(const _0x5a455c of _0x3a42d9){process['stderr']['write'](_0x19a301(0x167)+_0x5a455c[_0x19a301(0x15d)]+_0x19a301(0x161)+_0x5a455c[_0x19a301(0x174)]+'\x20->\x20--'+_0x5a455c[_0x19a301(0x15a)]+'\x0a');}Object[_0x19a301(0x16f)](_0x3916d2,_0x169985);}}catch{}if(!_0x9dda86){const {waitUntilExit:_0xabdd7e}=render(a0_0x33990d(Help,{}));await _0xabdd7e();return;}const _0x2d6de8=resolveRemovedCommand(_0x9dda86,_0x5f450f);if(_0x2d6de8)throw CliErrors[_0x19a301(0x172)](_0x2d6de8[_0x19a301(0x16e)],_0x2d6de8[_0x19a301(0x15b)]);if(!isKnownService(_0x9dda86)){const _0x59d55c=resolveDynamicServiceCommand(cli[_0x19a301(0x178)],_0x3916d2);if(_0x59d55c){if(_0x3916d2[_0x19a301(0x16b)]){console[_0x19a301(0x180)](generateCommandHelp(_0x59d55c['definition']));return;}Object['assign'](_0x3916d2,_0x59d55c['flags']);const _0x347d3a=buildConfigFromFlags(_0x3916d2);await initGlobalEnvironment(_0x347d3a);const _0x351c7f=createPipelineEnv(_0x347d3a,_0x3916d2);_0x351c7f['args']=_0x59d55c[_0x19a301(0x17f)],await runCommand(_0x59d55c[_0x19a301(0x164)],_0x351c7f);return;}if(_0x3916d2[_0x19a301(0x16b)]){const _0x112f6a=generateDynamicServiceHelp(_0x9dda86);if(_0x112f6a){console['log'](_0x112f6a);return;}}const {waitUntilExit:_0x4d86de}=render(a0_0x33990d(Help,{}));await _0x4d86de();return;}const _0x3e4c38=getServiceEntry(_0x9dda86);if(!_0x5f450f){if(_0x3916d2[_0x19a301(0x16b)]){console[_0x19a301(0x180)](generateServiceHelp(_0x9dda86));return;}if(_0x3e4c38[_0x19a301(0x171)])_0x5f450f=_0x3e4c38[_0x19a301(0x171)];else{console[_0x19a301(0x180)](generateServiceHelp(_0x9dda86));return;}}const _0x559084=findDefinition(_0x9dda86,_0x5f450f);!_0x559084&&(console[_0x19a301(0x180)](generateServiceHelp(_0x9dda86)),handleError(CliErrors['unknownCommand'](_0x9dda86+'\x20'+_0x5f450f)));if(_0x3916d2[_0x19a301(0x16b)]){console[_0x19a301(0x180)](generateCommandHelp(_0x559084));return;}const _0x3dfcf0=buildConfigFromFlags(_0x3916d2);_0x9dda86!==_0x19a301(0x163)&&_0x9dda86!=='doctor'&&await initGlobalEnvironment(_0x3dfcf0);const _0x1d7303=createPipelineEnv(_0x3dfcf0,_0x3916d2);_0x1d7303[_0x19a301(0x17f)]=cli[_0x19a301(0x178)][_0x19a301(0x168)](0x2),await runCommand(_0x559084,_0x1d7303);}function handleError(_0x408bd8){const _0x55c767=a0_0x4b55;if(_0x408bd8 instanceof CliError){_0x408bd8[_0x55c767(0x179)]===_0x55c767(0x15e)&&(process['stderr']['write']('\x0aCancelled.\x0a'),process[_0x55c767(0x17a)](0x0));console['error'](_0x55c767(0x15f)+_0x408bd8[_0x55c767(0x16e)]);if(_0x408bd8['hint'])console[_0x55c767(0x17c)]('Hint:\x20'+_0x408bd8['hint']);process[_0x55c767(0x17a)](_0x408bd8['exitCode']);}isUserCancellation(_0x408bd8)&&(process['stderr']['write'](_0x55c767(0x173)),process[_0x55c767(0x17a)](0x0)),console[_0x55c767(0x17c)](_0x55c767(0x175),_0x408bd8),process[_0x55c767(0x17a)](0x1);}function isUserCancellation(_0x2994a3){const _0x3a475e=a0_0x4b55;if(!(_0x2994a3 instanceof Error))return![];if(_0x2994a3[_0x3a475e(0x177)]==='ExitPromptError')return!![];if(_0x2994a3[_0x3a475e(0x179)]===_0x3a475e(0x181))return!![];if(_0x2994a3['code']===_0x3a475e(0x166))return!![];return![];}
@@ -1 +1 @@
1
- const a1_0x1b8fa5=a1_0x3c3e;function a1_0x3c3e(_0x1944a0,_0x509531){_0x1944a0=_0x1944a0-0xcc;const _0x585378=a1_0x5853();let _0x3c3ec5=_0x585378[_0x1944a0];return _0x3c3ec5;}(function(_0x4c92b9,_0x207014){const _0x1cc0fb=a1_0x3c3e,_0x281ebf=_0x4c92b9();while(!![]){try{const _0xe9f610=parseInt(_0x1cc0fb(0xf6))/0x1+-parseInt(_0x1cc0fb(0x146))/0x2+-parseInt(_0x1cc0fb(0x144))/0x3+-parseInt(_0x1cc0fb(0x14d))/0x4+-parseInt(_0x1cc0fb(0xd6))/0x5+-parseInt(_0x1cc0fb(0xdc))/0x6*(-parseInt(_0x1cc0fb(0x105))/0x7)+parseInt(_0x1cc0fb(0xfb))/0x8;if(_0xe9f610===_0x207014)break;else _0x281ebf['push'](_0x281ebf['shift']());}catch(_0x1e958b){_0x281ebf['push'](_0x281ebf['shift']());}}}(a1_0x5853,0xc3129));import{CliErrors}from'../../errors.js';const CATEGORY_FLAG={'name':a1_0x1b8fa5(0x110),'type':a1_0x1b8fa5(0x142),'description':a1_0x1b8fa5(0xdf)},KEYWORD_FLAG={'name':'keyword','type':a1_0x1b8fa5(0x142),'description':'Search\x20docs\x20by\x20code,\x20summary,\x20path,\x20or\x20usage\x20text'},DOC_CODE_FLAG={'name':a1_0x1b8fa5(0xd0),'type':'string','required':!![],'description':a1_0x1b8fa5(0xed)},DOCS=[{'code':'dataset_list','category':a1_0x1b8fa5(0xdd),'title':a1_0x1b8fa5(0x135),'method':a1_0x1b8fa5(0xe6),'path':a1_0x1b8fa5(0xd7),'summary':a1_0x1b8fa5(0xf5),'whenToUse':'Use\x20when\x20you\x20need\x20a\x20paginated\x20runtime\x20dataset\x20list\x20by\x20appCode\x20and\x20want\x20to\x20collect\x20available\x20datasetCode\x20values','pathParams':[],'queryParams':[],'bodySchema':a1_0x1b8fa5(0x116),'responseHighlights':[a1_0x1b8fa5(0x11a),a1_0x1b8fa5(0x114)],'examples':['lovrabet\x20dataset\x20list\x20--appcode\x20<appCode>\x20--format\x20compress'],'notes':[a1_0x1b8fa5(0x119)],'markdown':[a1_0x1b8fa5(0x109),'','Use\x20this\x20API\x20or\x20`lovrabet\x20dataset\x20list`\x20to\x20discover\x20available\x20dataset\x20codes\x20before\x20reading\x20data.']['join']('\x0a')},{'code':a1_0x1b8fa5(0x147),'category':a1_0x1b8fa5(0xdd),'title':a1_0x1b8fa5(0x10b),'method':a1_0x1b8fa5(0xf1),'path':'/api/dataset/getOneByCode?code={datasetCode}','summary':a1_0x1b8fa5(0xd3),'whenToUse':a1_0x1b8fa5(0x10e),'pathParams':[],'queryParams':[{'name':'code','description':a1_0x1b8fa5(0x128)}],'bodySchema':a1_0x1b8fa5(0x111),'responseHighlights':[a1_0x1b8fa5(0x120),a1_0x1b8fa5(0x12b),a1_0x1b8fa5(0x127)],'examples':[a1_0x1b8fa5(0xee)],'notes':[a1_0x1b8fa5(0xea)],'markdown':[a1_0x1b8fa5(0xff),'',a1_0x1b8fa5(0x11b)]['join']('\x0a')},{'code':a1_0x1b8fa5(0x152),'category':a1_0x1b8fa5(0xdd),'title':a1_0x1b8fa5(0xeb),'method':a1_0x1b8fa5(0xe6),'path':a1_0x1b8fa5(0xe3),'summary':'Filter\x20dataset\x20records','whenToUse':a1_0x1b8fa5(0xf9),'pathParams':[{'name':a1_0x1b8fa5(0xf8),'description':a1_0x1b8fa5(0x117)},{'name':a1_0x1b8fa5(0x150),'description':'32-character\x20dataset\x20code'}],'queryParams':[],'bodySchema':a1_0x1b8fa5(0x129),'responseHighlights':[a1_0x1b8fa5(0x125),a1_0x1b8fa5(0x124)],'examples':[a1_0x1b8fa5(0xe2),a1_0x1b8fa5(0xcd)],'notes':[a1_0x1b8fa5(0x14a),a1_0x1b8fa5(0x136),'Verify\x20tableData\x20and\x20paging\x20before\x20treating\x20the\x20response\x20as\x20a\x20business\x20fact.',a1_0x1b8fa5(0xe8)],'markdown':[a1_0x1b8fa5(0x13a),'',a1_0x1b8fa5(0xde)][a1_0x1b8fa5(0x13c)]('\x0a')},{'code':a1_0x1b8fa5(0xe5),'category':a1_0x1b8fa5(0xdd),'title':a1_0x1b8fa5(0x108),'method':a1_0x1b8fa5(0xe6),'path':'/api/{appCode}/{datasetCode}/aggregate','summary':a1_0x1b8fa5(0x139),'whenToUse':a1_0x1b8fa5(0xec),'pathParams':[{'name':a1_0x1b8fa5(0xf8),'description':a1_0x1b8fa5(0x117)},{'name':'datasetCode','description':'32-character\x20dataset\x20code'}],'queryParams':[],'bodySchema':a1_0x1b8fa5(0x11c),'responseHighlights':[a1_0x1b8fa5(0xfe),a1_0x1b8fa5(0x123)],'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_0x1b8fa5(0x10c),'`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.'],'markdown':['##\x20Aggregate\x20dataset\x20data','',a1_0x1b8fa5(0x10d)]['join']('\x0a')},{'code':a1_0x1b8fa5(0x118),'category':a1_0x1b8fa5(0xdd),'title':'Get\x20one\x20dataset\x20record','method':a1_0x1b8fa5(0xe6),'path':a1_0x1b8fa5(0xfd),'summary':a1_0x1b8fa5(0x12d),'whenToUse':a1_0x1b8fa5(0x140),'pathParams':[{'name':a1_0x1b8fa5(0xf8),'description':a1_0x1b8fa5(0x117)},{'name':'datasetCode','description':'32-character\x20dataset\x20code'}],'queryParams':[],'bodySchema':'{\x22id\x22:123}','responseHighlights':[a1_0x1b8fa5(0x13d)],'examples':[a1_0x1b8fa5(0xda)],'notes':[a1_0x1b8fa5(0xf0)],'markdown':a1_0x1b8fa5(0x10a)},{'code':a1_0x1b8fa5(0x115),'category':'dataset','title':'Create\x20dataset\x20record','method':a1_0x1b8fa5(0xe6),'path':a1_0x1b8fa5(0xe1),'summary':a1_0x1b8fa5(0xfa),'whenToUse':'Use\x20when\x20you\x20need\x20to\x20insert\x20one\x20business\x20record\x20into\x20a\x20dataset','pathParams':[{'name':'appCode','description':'Current\x20app\x20code'},{'name':'datasetCode','description':a1_0x1b8fa5(0x128)}],'queryParams':[],'bodySchema':a1_0x1b8fa5(0x133),'responseHighlights':[a1_0x1b8fa5(0x13e)],'examples':[a1_0x1b8fa5(0xe4)],'notes':[a1_0x1b8fa5(0xf7)],'markdown':'##\x20Create\x20dataset\x20record\x0a\x0aCreate\x20one\x20data\x20record\x20in\x20a\x20dataset.'},{'code':a1_0x1b8fa5(0x149),'category':'bf','title':a1_0x1b8fa5(0x11f),'method':a1_0x1b8fa5(0xf1),'path':a1_0x1b8fa5(0x112),'summary':a1_0x1b8fa5(0x11d),'whenToUse':a1_0x1b8fa5(0xd1),'pathParams':[{'name':a1_0x1b8fa5(0xf8),'description':a1_0x1b8fa5(0x117)},{'name':a1_0x1b8fa5(0x126),'description':a1_0x1b8fa5(0x130)}],'queryParams':[],'bodySchema':a1_0x1b8fa5(0x111),'responseHighlights':[a1_0x1b8fa5(0x13f)],'examples':[a1_0x1b8fa5(0xf4)],'notes':[a1_0x1b8fa5(0xce)],'markdown':a1_0x1b8fa5(0x12a)},{'code':a1_0x1b8fa5(0x138),'category':'bf','title':a1_0x1b8fa5(0x12c),'method':a1_0x1b8fa5(0xe6),'path':'/api/endpoint/{appCode}/{functionName}','summary':a1_0x1b8fa5(0x10f),'whenToUse':a1_0x1b8fa5(0xd9),'pathParams':[{'name':a1_0x1b8fa5(0xf8),'description':a1_0x1b8fa5(0x117)},{'name':a1_0x1b8fa5(0x126),'description':a1_0x1b8fa5(0xef)}],'queryParams':[],'bodySchema':a1_0x1b8fa5(0xfc),'responseHighlights':[a1_0x1b8fa5(0x107)],'examples':[a1_0x1b8fa5(0x132)],'notes':['Script\x20behavior\x20may\x20have\x20side\x20effects;\x20inspect\x20detail\x20first.'],'markdown':a1_0x1b8fa5(0x101)},{'code':a1_0x1b8fa5(0xf3),'category':'bf','title':a1_0x1b8fa5(0x11e),'method':a1_0x1b8fa5(0xe6),'path':a1_0x1b8fa5(0x14f),'summary':a1_0x1b8fa5(0x103),'whenToUse':'Use\x20when\x20the\x20target\x20Personal\x20BFF\x20script\x20id\x20is\x20confirmed\x20under\x20the\x20current\x20user\x20and\x20you\x20need\x20to\x20execute\x20that\x20personal\x20script\x20with\x20optional\x20JSON\x20params','pathParams':[{'name':'id','description':a1_0x1b8fa5(0xd8)}],'queryParams':[{'name':a1_0x1b8fa5(0xf8),'description':a1_0x1b8fa5(0x117)}],'bodySchema':a1_0x1b8fa5(0xfc),'responseHighlights':[a1_0x1b8fa5(0x107)],'examples':[a1_0x1b8fa5(0xe0)],'notes':[a1_0x1b8fa5(0xcf),a1_0x1b8fa5(0xe9)],'markdown':[a1_0x1b8fa5(0x143),'',a1_0x1b8fa5(0x121)][a1_0x1b8fa5(0x13c)]('\x0a')},{'code':a1_0x1b8fa5(0x106),'category':a1_0x1b8fa5(0xdb),'title':a1_0x1b8fa5(0x100),'method':a1_0x1b8fa5(0xe6),'path':a1_0x1b8fa5(0x145),'summary':a1_0x1b8fa5(0x100),'whenToUse':a1_0x1b8fa5(0x13b),'pathParams':[],'queryParams':[],'bodySchema':a1_0x1b8fa5(0x12e),'responseHighlights':['Returns\x20SQL\x20execution\x20payload'],'examples':[a1_0x1b8fa5(0x122)],'notes':[a1_0x1b8fa5(0x141)],'markdown':'##\x20Execute\x20custom\x20SQL\x0a\x0aExecute\x20a\x20configured\x20SQL\x20script\x20by\x20sqlCode.'}];function a1_0x5853(){const _0x133149=['includes','Get\x20dataset\x20detail','str','validation','5428730PaUtcb','/api/dataset/get-dataset-list-by-app-code','Personal\x20Backend\x20Function\x20script\x20ID,\x20for\x20example\x20123','Use\x20when\x20the\x20target\x20BF\x20functionName\x20is\x20confirmed\x20and\x20you\x20need\x20to\x20call\x20that\x20ENDPOINT','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27','custom_sql','668832AeByNe','dataset','Use\x20`where`,\x20`select`,\x20`orderBy`,\x20`currentPage`,\x20and\x20`pageSize`\x20to\x20inspect\x20live\x20data\x20shape.','Filter\x20docs\x20by\x20category,\x20for\x20example\x20dataset','lovrabet\x20personal-bff\x20exec\x20--id\x20<id>\x20--params\x20\x27{}\x27','/api/{appCode}/{datasetCode}/create','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','/api/{appCode}/{datasetCode}/filter','lovrabet\x20data\x20create\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22name\x22:\x22demo\x22}\x27','dataset_data_aggregate','POST','List\x20available\x20runtime\x20API\x20documentation\x20entries','Use\x20read-only\x20data\x20commands\x20before\x20writing\x20Artifacts\x20that\x20display\x20real\x20data.','Function\x20execution\x20may\x20have\x20business\x20side\x20effects;\x20inspect\x20detail\x20before\x20execution.','If\x20SDK\x20usage\x20is\x20needed,\x20follow\x20with\x20`lovrabet\x20dataset\x20sdk-doc\x20--code\x20<datasetCode>`.','Filter\x20dataset\x20data','Use\x20when\x20you\x20need\x20groupBy\x20plus\x20count,\x20sum,\x20avg,\x20max,\x20or\x20min\x20aggregates','API\x20doc\x20code,\x20for\x20example\x20dataset_list','lovrabet\x20dataset\x20detail\x20--code\x20<datasetCode>\x20--appcode\x20<appCode>','Endpoint\x20function\x20name','Prefer\x20`filter`\x20when\x20the\x20record\x20id\x20is\x20unknown.','GET','Show\x20runtime\x20API\x20documentation\x20by\x20code','personal_bf_execute','lovrabet\x20bff\x20detail\x20--name\x20<functionName>','List\x20datasets\x20with\x20pagination','1513406JcStrZ','This\x20is\x20a\x20write\x20operation;\x20use\x20dry-run\x20when\x20available\x20and\x20safe\x20fixtures\x20for\x20smoke\x20tests.','appCode','Use\x20when\x20you\x20need\x20to\x20read\x20business\x20data\x20with\x20where,\x20orderBy,\x20pagination,\x20or\x20similar\x20filters','Create\x20a\x20dataset\x20record','11925936gLiCdq','{\x22param\x22:\x22value\x22}','/api/{appCode}/{datasetCode}/getOne','result\x20rows\x20contain\x20aggregate\x20aliases','##\x20Dataset\x20detail','Execute\x20custom\x20SQL','##\x20Execute\x20BF\x20endpoint\x20function\x0a\x0aExecute\x20a\x20known\x20endpoint\x20script.','filter','Execute\x20a\x20Personal\x20Backend\x20Function\x20by\x20script\x20ID','title','77uWQNCR','custom_sql_execute','Returns\x20script\x20business\x20payload','Aggregate\x20dataset\x20data','##\x20List\x20datasets','##\x20Get\x20one\x20dataset\x20record\x0a\x0aRead\x20one\x20record\x20by\x20id.','Dataset\x20detail','Use\x20`having`\x20only\x20for\x20post-aggregation\x20filters.','Aggregate\x20supports\x20COUNT,\x20SUM,\x20AVG,\x20MAX,\x20and\x20MIN\x20definitions\x20in\x20the\x20`aggregate`\x20array.','Use\x20when\x20you\x20need\x20fields,\x20table\x20info,\x20relations,\x20or\x20operation\x20definitions\x20for\x20a\x20dataset\x20code','Execute\x20a\x20BF\x20endpoint\x20function','category','None','/client/bff/endpoint/{appCode}/{functionName}','length','paging.totalCount\x20gives\x20total\x20rows','dataset_data_create','{\x22appCode\x22:\x22app-aa63b188\x22,\x22currentPage\x22:1,\x22pageSize\x22:100}','Current\x20app\x20code','dataset_data_get_one','CLI\x20users\x20should\x20prefer\x20`lovrabet\x20dataset\x20list`\x20for\x20this\x20workflow.','tableData\x20contains\x20dataset\x20id/code/name','Inspect\x20field\x20names,\x20relations,\x20and\x20operation\x20metadata\x20for\x20a\x20known\x20dataset\x20code.','{\x22aggregate\x22:[{\x22column\x22:\x20\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[]}','Get\x20a\x20BF\x20endpoint\x20contract\x20by\x20app\x20and\x20function\x20name','Execute\x20Personal\x20Backend\x20Function','Get\x20BF\x20endpoint\x20function\x20contract','fields/properties\x20describe\x20data\x20shape','Execute\x20a\x20known\x20Personal\x20Backend\x20Function\x20script\x20through\x20its\x20runtime\x20execute\x20endpoint.','lovrabet\x20sql\x20exec\x20--sqlcode\x20<sqlCode>\x20--params\x20\x27{}\x27','where\x20filters\x20before\x20aggregation','paging\x20contains\x20pagination','tableData\x20contains\x20records','functionName','operations\x20describes\x20runtime\x20APIs','32-character\x20dataset\x20code','{\x22where\x22:{},\x22currentPage\x22:1,\x22pageSize\x22:20}','##\x20Get\x20BF\x20endpoint\x20function\x20contract\x0a\x0aInspect\x20one\x20known\x20endpoint\x20function\x20through\x20the\x20AK-authenticated\x20exact\x20detail\x20API.','relations\x20contains\x20the\x20object-shaped\x20API\x20relations\x20value\x20when\x20returned','Execute\x20BF\x20endpoint\x20function','Get\x20one\x20dataset\x20record','{\x22appCode\x22:\x22app-aa63b188\x22,\x22sqlCode\x22:\x22xxxxxxxx-xxxxxxxx\x22,\x22params\x22:{}}','method','Exact\x20endpoint\x20function\x20name','map','lovrabet\x20bff\x20exec\x20--name\x20<functionName>\x20--params\x20\x27{}\x27','{\x22fieldName\x22:\x22value\x22}','trim','List\x20datasets','For\x20the\x20next\x20page,\x20keep\x20where/select/orderBy/pageSize\x20unchanged\x20and\x20increment\x20only\x20currentPage,\x20which\x20starts\x20at\x201.','summary','bf_execute','Aggregate\x20dataset\x20records','##\x20Filter\x20dataset\x20data','Use\x20when\x20the\x20target\x20sqlCode\x20exists\x20and\x20you\x20need\x20to\x20execute\x20that\x20custom\x20SQL','join','Returns\x20one\x20matching\x20business\x20record','Returns\x20the\x20created\x20record\x20or\x20backend\x20operation\x20result','CLI\x20returns\x20appCode/functionName/description/version/gmtModified','Use\x20when\x20you\x20already\x20know\x20the\x20record\x20id\x20and\x20need\x20one\x20business\x20row\x20from\x20a\x20dataset','Use\x20`lovrabet\x20sql\x20detail`\x20before\x20execution.','string','##\x20Execute\x20Personal\x20Backend\x20Function','1517970kqYZdL','/api/custom/executeSql','3192420REmMgQ','dataset_detail','path','bf_detail','where,\x20select,\x20orderBy,\x20currentPage,\x20and\x20pageSize\x20belong\x20inside\x20one\x20--params\x20JSON\x20object;\x20they\x20are\x20not\x20standalone\x20CLI\x20flags.','api-doc','keyword','973508kXcXpa','API\x20doc\x20code\x20not\x20found:\x20','/api/runtime-bff/personal/{id}/execute','datasetCode','toLowerCase','dataset_data_filter','whenToUse','read','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','This\x20is\x20an\x20exact\x20lookup\x20by\x20appCode\x20+\x20functionName.\x20The\x20CLI\x20does\x20not\x20enumerate\x20Backend\x20Function\x20definitions\x20or\x20expose\x20platform-only\x20fields.','Personal\x20BFF\x20scripts\x20are\x20user-owned\x20and\x20scoped\x20per\x20app.','code','Use\x20when\x20the\x20function\x20name\x20is\x20already\x20confirmed\x20and\x20you\x20need\x20that\x20ENDPOINT\x27s\x20runtime\x20metadata'];a1_0x5853=function(){return _0x133149;};return a1_0x5853();}function entrySummary(_0xa3b262){const _0x44cdd3=a1_0x1b8fa5;return{'code':_0xa3b262[_0x44cdd3(0xd0)],'category':_0xa3b262[_0x44cdd3(0x110)],'method':_0xa3b262['method'],'path':_0xa3b262[_0x44cdd3(0x148)],'summary':_0xa3b262[_0x44cdd3(0x137)],'whenToUse':_0xa3b262[_0x44cdd3(0x153)]};}export function listApiDocEntries(_0x4915c6={}){const _0x451656=a1_0x1b8fa5,_0x111025=String(_0x4915c6['category']||'')[_0x451656(0x134)](),_0x9a7092=String(_0x4915c6[_0x451656(0x14c)]||'')[_0x451656(0x134)]()[_0x451656(0x151)]();return DOCS[_0x451656(0x102)](_0x451a6d=>{const _0x260a4b=_0x451656;if(_0x111025&&_0x451a6d['category']!==_0x111025)return![];if(!_0x9a7092)return!![];return[_0x451a6d[_0x260a4b(0xd0)],_0x451a6d[_0x260a4b(0x110)],_0x451a6d[_0x260a4b(0x12f)],_0x451a6d[_0x260a4b(0x148)],_0x451a6d[_0x260a4b(0x137)],_0x451a6d[_0x260a4b(0x153)],_0x451a6d[_0x260a4b(0x104)]][_0x260a4b(0x13c)]('\x20')[_0x260a4b(0x151)]()[_0x260a4b(0xd2)](_0x9a7092);})[_0x451656(0x131)](entrySummary);}export function getApiDocDetail(_0x75327c){const _0x3906bd=a1_0x1b8fa5,_0x39cd5a=DOCS['find'](_0x431a15=>_0x431a15[_0x3906bd(0xd0)]===_0x75327c);if(!_0x39cd5a)throw CliErrors[_0x3906bd(0xd5)](_0x3906bd(0x14e)+_0x75327c);return{..._0x39cd5a};}const apiDocList={'service':'api-doc','command':'list','description':a1_0x1b8fa5(0xe7),'risk':a1_0x1b8fa5(0xcc),'requiresAppCode':![],'flags':[CATEGORY_FLAG,KEYWORD_FLAG],async 'execute'(_0x4eb7b5){const _0x3a2907=a1_0x1b8fa5,_0x147959=listApiDocEntries({'category':_0x4eb7b5[_0x3a2907(0xd4)](_0x3a2907(0x110)),'keyword':_0x4eb7b5['str'](_0x3a2907(0x14c))});return{'ok':!![],'data':{'total':_0x147959[_0x3a2907(0x113)],'items':_0x147959}};}},apiDocDetail={'service':a1_0x1b8fa5(0x14b),'command':'detail','description':a1_0x1b8fa5(0xf2),'risk':a1_0x1b8fa5(0xcc),'requiresAppCode':![],'flags':[DOC_CODE_FLAG],async 'execute'(_0x38ae5a){const _0x4769a5=a1_0x1b8fa5;return{'ok':!![],'data':getApiDocDetail(_0x38ae5a[_0x4769a5(0xd4)](_0x4769a5(0xd0)))};}};export const apiDocDefinitions=[apiDocList,apiDocDetail];
1
+ const a1_0x4f5a3b=a1_0x13ef;(function(_0x5a6db4,_0x52402d){const _0x19f678=a1_0x13ef,_0x4c25e7=_0x5a6db4();while(!![]){try{const _0x5bbbd9=-parseInt(_0x19f678(0x254))/0x1*(parseInt(_0x19f678(0x1ee))/0x2)+-parseInt(_0x19f678(0x25d))/0x3+parseInt(_0x19f678(0x201))/0x4*(parseInt(_0x19f678(0x202))/0x5)+parseInt(_0x19f678(0x1f7))/0x6*(parseInt(_0x19f678(0x1dd))/0x7)+-parseInt(_0x19f678(0x25a))/0x8+parseInt(_0x19f678(0x20a))/0x9*(-parseInt(_0x19f678(0x21f))/0xa)+parseInt(_0x19f678(0x1db))/0xb;if(_0x5bbbd9===_0x52402d)break;else _0x4c25e7['push'](_0x4c25e7['shift']());}catch(_0x35b7ad){_0x4c25e7['push'](_0x4c25e7['shift']());}}}(a1_0x1c3c,0xb7287));import{CliErrors}from'../../errors.js';function a1_0x13ef(_0x297de9,_0x130f08){_0x297de9=_0x297de9-0x1db;const _0x1c3ca6=a1_0x1c3c();let _0x13ef5e=_0x1c3ca6[_0x297de9];return _0x13ef5e;}const CATEGORY_FLAG={'name':'category','type':'string','description':a1_0x4f5a3b(0x24b)},KEYWORD_FLAG={'name':'keyword','type':a1_0x4f5a3b(0x20d),'description':a1_0x4f5a3b(0x1e9)},DOC_CODE_FLAG={'name':a1_0x4f5a3b(0x1ed),'type':a1_0x4f5a3b(0x20d),'required':!![],'description':'API\x20doc\x20code,\x20for\x20example\x20dataset_list'},DOCS=[{'code':a1_0x4f5a3b(0x256),'category':a1_0x4f5a3b(0x24f),'title':a1_0x4f5a3b(0x1f1),'method':a1_0x4f5a3b(0x249),'path':a1_0x4f5a3b(0x233),'summary':'List\x20datasets\x20with\x20pagination','whenToUse':a1_0x4f5a3b(0x20f),'pathParams':[],'queryParams':[],'bodySchema':a1_0x4f5a3b(0x1e8),'responseHighlights':[a1_0x4f5a3b(0x222),a1_0x4f5a3b(0x1f5)],'examples':[a1_0x4f5a3b(0x25c)],'notes':[a1_0x4f5a3b(0x1fd)],'markdown':[a1_0x4f5a3b(0x215),'',a1_0x4f5a3b(0x251)]['join']('\x0a')},{'code':a1_0x4f5a3b(0x22b),'category':a1_0x4f5a3b(0x24f),'title':a1_0x4f5a3b(0x250),'method':a1_0x4f5a3b(0x23d),'path':'/api/dataset/getOneByCode?code={datasetCode}','summary':a1_0x4f5a3b(0x257),'whenToUse':a1_0x4f5a3b(0x235),'pathParams':[],'queryParams':[{'name':a1_0x4f5a3b(0x1ed),'description':a1_0x4f5a3b(0x1de)}],'bodySchema':a1_0x4f5a3b(0x212),'responseHighlights':[a1_0x4f5a3b(0x231),a1_0x4f5a3b(0x224),a1_0x4f5a3b(0x238)],'examples':[a1_0x4f5a3b(0x1e6)],'notes':[a1_0x4f5a3b(0x239)],'markdown':[a1_0x4f5a3b(0x259),'',a1_0x4f5a3b(0x228)][a1_0x4f5a3b(0x22d)]('\x0a')},{'code':a1_0x4f5a3b(0x1ea),'category':a1_0x4f5a3b(0x24f),'title':a1_0x4f5a3b(0x1fa),'method':a1_0x4f5a3b(0x249),'path':a1_0x4f5a3b(0x243),'summary':a1_0x4f5a3b(0x23b),'whenToUse':a1_0x4f5a3b(0x205),'pathParams':[{'name':a1_0x4f5a3b(0x207),'description':'Current\x20app\x20code'},{'name':'datasetCode','description':a1_0x4f5a3b(0x1de)}],'queryParams':[],'bodySchema':a1_0x4f5a3b(0x21b),'responseHighlights':[a1_0x4f5a3b(0x22c),a1_0x4f5a3b(0x225)],'examples':[a1_0x4f5a3b(0x206),a1_0x4f5a3b(0x1ff)],'notes':[a1_0x4f5a3b(0x1e7),'For\x20the\x20next\x20page,\x20keep\x20where/select/orderBy/pageSize\x20unchanged\x20and\x20increment\x20only\x20currentPage,\x20which\x20starts\x20at\x201.',a1_0x4f5a3b(0x1ef),a1_0x4f5a3b(0x223)],'markdown':[a1_0x4f5a3b(0x1e3),'',a1_0x4f5a3b(0x247)]['join']('\x0a')},{'code':a1_0x4f5a3b(0x1ec),'category':a1_0x4f5a3b(0x24f),'title':a1_0x4f5a3b(0x1e0),'method':a1_0x4f5a3b(0x249),'path':a1_0x4f5a3b(0x248),'summary':a1_0x4f5a3b(0x25e),'whenToUse':a1_0x4f5a3b(0x220),'pathParams':[{'name':'appCode','description':a1_0x4f5a3b(0x20e)},{'name':a1_0x4f5a3b(0x230),'description':a1_0x4f5a3b(0x1de)}],'queryParams':[],'bodySchema':'{\x22aggregate\x22:[{\x22column\x22:\x20\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[]}','responseHighlights':[a1_0x4f5a3b(0x1f6),a1_0x4f5a3b(0x21e)],'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_0x4f5a3b(0x217),a1_0x4f5a3b(0x226)],'markdown':['##\x20Aggregate\x20dataset\x20data','',a1_0x4f5a3b(0x1df)]['join']('\x0a')},{'code':'dataset_data_get_one','category':a1_0x4f5a3b(0x24f),'title':a1_0x4f5a3b(0x253),'method':a1_0x4f5a3b(0x249),'path':a1_0x4f5a3b(0x209),'summary':a1_0x4f5a3b(0x253),'whenToUse':'Use\x20when\x20you\x20already\x20know\x20the\x20record\x20id\x20and\x20need\x20one\x20business\x20row\x20from\x20a\x20dataset','pathParams':[{'name':'appCode','description':'Current\x20app\x20code'},{'name':a1_0x4f5a3b(0x230),'description':a1_0x4f5a3b(0x1de)}],'queryParams':[],'bodySchema':a1_0x4f5a3b(0x210),'responseHighlights':['Returns\x20one\x20matching\x20business\x20record'],'examples':[a1_0x4f5a3b(0x1e2)],'notes':[a1_0x4f5a3b(0x23f)],'markdown':a1_0x4f5a3b(0x24e)},{'code':a1_0x4f5a3b(0x24d),'category':a1_0x4f5a3b(0x24f),'title':a1_0x4f5a3b(0x20c),'method':a1_0x4f5a3b(0x249),'path':a1_0x4f5a3b(0x1fe),'summary':a1_0x4f5a3b(0x1f3),'whenToUse':a1_0x4f5a3b(0x22f),'pathParams':[{'name':a1_0x4f5a3b(0x207),'description':a1_0x4f5a3b(0x20e)},{'name':'datasetCode','description':a1_0x4f5a3b(0x1de)}],'queryParams':[],'bodySchema':a1_0x4f5a3b(0x204),'responseHighlights':['Returns\x20the\x20created\x20record\x20or\x20backend\x20operation\x20result'],'examples':[a1_0x4f5a3b(0x200)],'notes':['This\x20is\x20a\x20write\x20operation;\x20use\x20dry-run\x20when\x20available\x20and\x20safe\x20fixtures\x20for\x20smoke\x20tests.'],'markdown':a1_0x4f5a3b(0x214)},{'code':a1_0x4f5a3b(0x246),'category':'bf','title':a1_0x4f5a3b(0x232),'method':'GET','path':a1_0x4f5a3b(0x1e1),'summary':'Get\x20a\x20BF\x20endpoint\x20contract\x20by\x20app\x20and\x20function\x20name','whenToUse':a1_0x4f5a3b(0x1dc),'pathParams':[{'name':a1_0x4f5a3b(0x207),'description':a1_0x4f5a3b(0x20e)},{'name':'functionName','description':a1_0x4f5a3b(0x229)}],'queryParams':[],'bodySchema':a1_0x4f5a3b(0x212),'responseHighlights':['CLI\x20returns\x20appCode/functionName/description/version/gmtModified'],'examples':[a1_0x4f5a3b(0x208)],'notes':[a1_0x4f5a3b(0x21a)],'markdown':'##\x20Get\x20BF\x20endpoint\x20function\x20contract\x0a\x0aInspect\x20one\x20known\x20endpoint\x20function\x20through\x20the\x20AK-authenticated\x20exact\x20detail\x20API.'},{'code':a1_0x4f5a3b(0x20b),'category':'bf','title':a1_0x4f5a3b(0x203),'method':a1_0x4f5a3b(0x249),'path':a1_0x4f5a3b(0x1f9),'summary':'Execute\x20a\x20BF\x20endpoint\x20function','whenToUse':'Use\x20when\x20the\x20target\x20BF\x20functionName\x20is\x20confirmed\x20and\x20you\x20need\x20to\x20call\x20that\x20ENDPOINT','pathParams':[{'name':a1_0x4f5a3b(0x207),'description':a1_0x4f5a3b(0x20e)},{'name':a1_0x4f5a3b(0x211),'description':a1_0x4f5a3b(0x25b)}],'queryParams':[],'bodySchema':a1_0x4f5a3b(0x1f4),'responseHighlights':[a1_0x4f5a3b(0x1f2)],'examples':[a1_0x4f5a3b(0x1e4)],'notes':['Script\x20behavior\x20may\x20have\x20side\x20effects;\x20inspect\x20detail\x20first.'],'markdown':a1_0x4f5a3b(0x244)},{'code':a1_0x4f5a3b(0x24c),'category':'bf','title':'Execute\x20Personal\x20Backend\x20Function','method':'POST','path':'/api/runtime-bff/personal/{id}/execute','summary':a1_0x4f5a3b(0x22a),'whenToUse':'Use\x20when\x20the\x20target\x20Personal\x20BFF\x20script\x20id\x20is\x20confirmed\x20under\x20the\x20current\x20user\x20and\x20you\x20need\x20to\x20execute\x20that\x20personal\x20script\x20with\x20optional\x20JSON\x20params','pathParams':[{'name':'id','description':a1_0x4f5a3b(0x24a)}],'queryParams':[{'name':a1_0x4f5a3b(0x207),'description':'Current\x20app\x20code'}],'bodySchema':'{\x22param\x22:\x22value\x22}','responseHighlights':[a1_0x4f5a3b(0x1f2)],'examples':[a1_0x4f5a3b(0x23c)],'notes':[a1_0x4f5a3b(0x1e5),a1_0x4f5a3b(0x1eb)],'markdown':[a1_0x4f5a3b(0x21c),'',a1_0x4f5a3b(0x23e)]['join']('\x0a')},{'code':'custom_sql_execute','category':'custom_sql','title':a1_0x4f5a3b(0x245),'method':'POST','path':a1_0x4f5a3b(0x227),'summary':a1_0x4f5a3b(0x245),'whenToUse':a1_0x4f5a3b(0x255),'pathParams':[],'queryParams':[],'bodySchema':a1_0x4f5a3b(0x22e),'responseHighlights':[a1_0x4f5a3b(0x252)],'examples':[a1_0x4f5a3b(0x241)],'notes':[a1_0x4f5a3b(0x1fb)],'markdown':a1_0x4f5a3b(0x216)}];function entrySummary(_0x207b4a){const _0x2ba5ad=a1_0x4f5a3b;return{'code':_0x207b4a['code'],'category':_0x207b4a[_0x2ba5ad(0x236)],'method':_0x207b4a[_0x2ba5ad(0x23a)],'path':_0x207b4a[_0x2ba5ad(0x21d)],'summary':_0x207b4a[_0x2ba5ad(0x1fc)],'whenToUse':_0x207b4a['whenToUse']};}export function listApiDocEntries(_0x591ec4={}){const _0x167087=a1_0x4f5a3b,_0x508658=String(_0x591ec4[_0x167087(0x236)]||'')[_0x167087(0x237)](),_0x5df9df=String(_0x591ec4['keyword']||'')[_0x167087(0x237)]()[_0x167087(0x221)]();return DOCS[_0x167087(0x240)](_0x941e3b=>{const _0x44620b=_0x167087;if(_0x508658&&_0x941e3b['category']!==_0x508658)return![];if(!_0x5df9df)return!![];return[_0x941e3b[_0x44620b(0x1ed)],_0x941e3b[_0x44620b(0x236)],_0x941e3b['method'],_0x941e3b[_0x44620b(0x21d)],_0x941e3b[_0x44620b(0x1fc)],_0x941e3b['whenToUse'],_0x941e3b['title']][_0x44620b(0x22d)]('\x20')[_0x44620b(0x221)]()[_0x44620b(0x213)](_0x5df9df);})['map'](entrySummary);}export function getApiDocDetail(_0x57a97c){const _0x2a519a=a1_0x4f5a3b,_0x473f97=DOCS[_0x2a519a(0x1f0)](_0x1ad7e0=>_0x1ad7e0['code']===_0x57a97c);if(!_0x473f97)throw CliErrors[_0x2a519a(0x219)](_0x2a519a(0x258)+_0x57a97c);return{..._0x473f97};}const apiDocList={'service':a1_0x4f5a3b(0x242),'command':'list','description':'List\x20available\x20runtime\x20API\x20documentation\x20entries','risk':a1_0x4f5a3b(0x1f8),'requiresAppCode':![],'flags':[CATEGORY_FLAG,KEYWORD_FLAG],async 'execute'(_0x31e8b8){const _0x4ee888=a1_0x4f5a3b,_0x3e891d=listApiDocEntries({'category':_0x31e8b8[_0x4ee888(0x234)](_0x4ee888(0x236)),'keyword':_0x31e8b8['str']('keyword')});return{'ok':!![],'data':{'total':_0x3e891d[_0x4ee888(0x218)],'items':_0x3e891d}};}},apiDocDetail={'service':'api-doc','command':'detail','description':'Show\x20runtime\x20API\x20documentation\x20by\x20code','risk':a1_0x4f5a3b(0x1f8),'requiresAppCode':![],'flags':[DOC_CODE_FLAG],async 'execute'(_0x299618){const _0x3ff53e=a1_0x4f5a3b;return{'ok':!![],'data':getApiDocDetail(_0x299618[_0x3ff53e(0x234)](_0x3ff53e(0x1ed)))};}};function a1_0x1c3c(){const _0x244936=['string','Current\x20app\x20code','Use\x20when\x20you\x20need\x20a\x20paginated\x20runtime\x20dataset\x20list\x20by\x20appCode\x20and\x20want\x20to\x20collect\x20available\x20datasetCode\x20values','{\x22id\x22:123}','functionName','None','includes','##\x20Create\x20dataset\x20record\x0a\x0aCreate\x20one\x20data\x20record\x20in\x20a\x20dataset.','##\x20List\x20datasets','##\x20Execute\x20custom\x20SQL\x0a\x0aExecute\x20a\x20configured\x20SQL\x20script\x20by\x20sqlCode.','Use\x20`having`\x20only\x20for\x20post-aggregation\x20filters.','length','validation','This\x20is\x20an\x20exact\x20lookup\x20by\x20appCode\x20+\x20functionName.\x20The\x20CLI\x20does\x20not\x20enumerate\x20Backend\x20Function\x20definitions\x20or\x20expose\x20platform-only\x20fields.','{\x22where\x22:{},\x22currentPage\x22:1,\x22pageSize\x22:20}','##\x20Execute\x20Personal\x20Backend\x20Function','path','where\x20filters\x20before\x20aggregation','10110jzldwr','Use\x20when\x20you\x20need\x20groupBy\x20plus\x20count,\x20sum,\x20avg,\x20max,\x20or\x20min\x20aggregates','toLowerCase','tableData\x20contains\x20dataset\x20id/code/name','Use\x20read-only\x20data\x20commands\x20before\x20writing\x20Artifacts\x20that\x20display\x20real\x20data.','relations\x20contains\x20the\x20object-shaped\x20API\x20relations\x20value\x20when\x20returned','paging\x20contains\x20pagination','`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','/api/custom/executeSql','Inspect\x20field\x20names,\x20relations,\x20and\x20operation\x20metadata\x20for\x20a\x20known\x20dataset\x20code.','Exact\x20endpoint\x20function\x20name','Execute\x20a\x20Personal\x20Backend\x20Function\x20by\x20script\x20ID','dataset_detail','tableData\x20contains\x20records','join','{\x22appCode\x22:\x22app-aa63b188\x22,\x22sqlCode\x22:\x22xxxxxxxx-xxxxxxxx\x22,\x22params\x22:{}}','Use\x20when\x20you\x20need\x20to\x20insert\x20one\x20business\x20record\x20into\x20a\x20dataset','datasetCode','fields/properties\x20describe\x20data\x20shape','Get\x20BF\x20endpoint\x20function\x20contract','/api/dataset/get-dataset-list-by-app-code','str','Use\x20when\x20you\x20need\x20fields,\x20table\x20info,\x20relations,\x20or\x20operation\x20definitions\x20for\x20a\x20dataset\x20code','category','trim','operations\x20describes\x20runtime\x20APIs','If\x20SDK\x20usage\x20is\x20needed,\x20follow\x20with\x20`lovrabet\x20dataset\x20sdk-doc\x20--code\x20<datasetCode>`.','method','Filter\x20dataset\x20records','lovrabet\x20personal-bff\x20exec\x20--id\x20<id>\x20--params\x20\x27{}\x27','GET','Execute\x20a\x20known\x20Personal\x20Backend\x20Function\x20script\x20through\x20its\x20runtime\x20execute\x20endpoint.','Prefer\x20`filter`\x20when\x20the\x20record\x20id\x20is\x20unknown.','filter','lovrabet\x20sql\x20exec\x20--sqlcode\x20<sqlCode>\x20--params\x20\x27{}\x27','api-doc','/api/{appCode}/{datasetCode}/filter','##\x20Execute\x20BF\x20endpoint\x20function\x0a\x0aExecute\x20a\x20known\x20endpoint\x20script.','Execute\x20custom\x20SQL','bf_detail','Use\x20`where`,\x20`select`,\x20`orderBy`,\x20`currentPage`,\x20and\x20`pageSize`\x20to\x20inspect\x20live\x20data\x20shape.','/api/{appCode}/{datasetCode}/aggregate','POST','Personal\x20Backend\x20Function\x20script\x20ID,\x20for\x20example\x20123','Filter\x20docs\x20by\x20category,\x20for\x20example\x20dataset','personal_bf_execute','dataset_data_create','##\x20Get\x20one\x20dataset\x20record\x0a\x0aRead\x20one\x20record\x20by\x20id.','dataset','Dataset\x20detail','Use\x20this\x20API\x20or\x20`lovrabet\x20dataset\x20list`\x20to\x20discover\x20available\x20dataset\x20codes\x20before\x20reading\x20data.','Returns\x20SQL\x20execution\x20payload','Get\x20one\x20dataset\x20record','5818gVrBqU','Use\x20when\x20the\x20target\x20sqlCode\x20exists\x20and\x20you\x20need\x20to\x20execute\x20that\x20custom\x20SQL','dataset_list','Get\x20dataset\x20detail','API\x20doc\x20code\x20not\x20found:\x20','##\x20Dataset\x20detail','1336864hVyEPX','Endpoint\x20function\x20name','lovrabet\x20dataset\x20list\x20--appcode\x20<appCode>\x20--format\x20compress','63303AklROE','Aggregate\x20dataset\x20records','8231696ipzFbq','Use\x20when\x20the\x20function\x20name\x20is\x20already\x20confirmed\x20and\x20you\x20need\x20that\x20ENDPOINT\x27s\x20runtime\x20metadata','2119901pRpKpP','32-character\x20dataset\x20code','Aggregate\x20supports\x20COUNT,\x20SUM,\x20AVG,\x20MAX,\x20and\x20MIN\x20definitions\x20in\x20the\x20`aggregate`\x20array.','Aggregate\x20dataset\x20data','/client/bff/endpoint/{appCode}/{functionName}','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27','##\x20Filter\x20dataset\x20data','lovrabet\x20bff\x20exec\x20--name\x20<functionName>\x20--params\x20\x27{}\x27','Personal\x20BFF\x20scripts\x20are\x20user-owned\x20and\x20scoped\x20per\x20app.','lovrabet\x20dataset\x20detail\x20--code\x20<datasetCode>\x20--appcode\x20<appCode>','where,\x20select,\x20orderBy,\x20currentPage,\x20and\x20pageSize\x20belong\x20inside\x20one\x20--params\x20JSON\x20object;\x20they\x20are\x20not\x20standalone\x20CLI\x20flags.','{\x22appCode\x22:\x22app-aa63b188\x22,\x22currentPage\x22:1,\x22pageSize\x22:100}','Search\x20docs\x20by\x20code,\x20summary,\x20path,\x20or\x20usage\x20text','dataset_data_filter','Function\x20execution\x20may\x20have\x20business\x20side\x20effects;\x20inspect\x20detail\x20before\x20execution.','dataset_data_aggregate','code','364qNWzSs','Verify\x20tableData\x20and\x20paging\x20before\x20treating\x20the\x20response\x20as\x20a\x20business\x20fact.','find','List\x20datasets','Returns\x20script\x20business\x20payload','Create\x20a\x20dataset\x20record','{\x22param\x22:\x22value\x22}','paging.totalCount\x20gives\x20total\x20rows','result\x20rows\x20contain\x20aggregate\x20aliases','6DItdJp','read','/api/endpoint/{appCode}/{functionName}','Filter\x20dataset\x20data','Use\x20`lovrabet\x20sql\x20detail`\x20before\x20execution.','summary','CLI\x20users\x20should\x20prefer\x20`lovrabet\x20dataset\x20list`\x20for\x20this\x20workflow.','/api/{appCode}/{datasetCode}/create','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','lovrabet\x20data\x20create\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22name\x22:\x22demo\x22}\x27','440OZkPGd','52610uGxykX','Execute\x20BF\x20endpoint\x20function','{\x22fieldName\x22:\x22value\x22}','Use\x20when\x20you\x20need\x20to\x20read\x20business\x20data\x20with\x20where,\x20orderBy,\x20pagination,\x20or\x20similar\x20filters','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','appCode','lovrabet\x20bff\x20detail\x20--name\x20<functionName>','/api/{appCode}/{datasetCode}/getOne','1881DYWCRd','bf_execute','Create\x20dataset\x20record'];a1_0x1c3c=function(){return _0x244936;};return a1_0x1c3c();}export const apiDocDefinitions=[apiDocList,apiDocDetail];
@@ -1 +1 @@
1
- (function(_0x4e6c05,_0x10eff6){const _0x1492b8=a2_0x1425,_0x341b8a=_0x4e6c05();while(!![]){try{const _0x5365f0=parseInt(_0x1492b8(0x112))/0x1*(parseInt(_0x1492b8(0x10a))/0x2)+parseInt(_0x1492b8(0x10c))/0x3+parseInt(_0x1492b8(0x11a))/0x4+parseInt(_0x1492b8(0x11d))/0x5+-parseInt(_0x1492b8(0x10e))/0x6*(-parseInt(_0x1492b8(0x103))/0x7)+-parseInt(_0x1492b8(0x101))/0x8*(-parseInt(_0x1492b8(0x106))/0x9)+-parseInt(_0x1492b8(0x11e))/0xa;if(_0x5365f0===_0x10eff6)break;else _0x341b8a['push'](_0x341b8a['shift']());}catch(_0x3e924c){_0x341b8a['push'](_0x341b8a['shift']());}}}(a2_0x3de9,0x3f173));import{createHash}from'node:crypto';function a2_0x3de9(){const _0x108096=['9UDtLSm','EPERM','items','homeDirName','isArray','appCode','digest','slice','1070772IsNOGR','trim','stringify','115585CuJaNw','10504870keYKpf','8beCdgN','unknown','4424rbcgkX','EACCES','.tmp','2918403dPoQBz','appName','code','sha256','82914hWxeFs','find','353532ghCtjw','cache','1926TYkDoq','EXDEV','parse','utf8'];a2_0x3de9=function(){return _0x108096;};return a2_0x3de9();}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_0x1425(_0x4a1ea2,_0x3f66fb){_0x4a1ea2=_0x4a1ea2-0x101;const _0x3de972=a2_0x3de9();let _0x142556=_0x3de972[_0x4a1ea2];return _0x142556;}export function fingerprintAccessKey(_0x44a08a){const _0x5258d9=a2_0x1425,_0x76d231=_0x44a08a[_0x5258d9(0x11b)](),_0x2bb4bc=_0x76d231[_0x5258d9(0x119)](-0x6)||_0x5258d9(0x102),_0x4bf368=createHash(_0x5258d9(0x109))['update'](_0x76d231)[_0x5258d9(0x118)]('hex')[_0x5258d9(0x119)](0x0,0xc);return'ak_'+_0x2bb4bc+'_'+_0x4bf368;}export function getAppCacheFilePath(_0x3072fd,_0x3a554e){const _0x4d4f73=a2_0x1425;return resolve(homedir(),PRODUCT_CONFIG[_0x4d4f73(0x115)],_0x4d4f73(0x10d),_0x3072fd,fingerprintAccessKey(_0x3a554e),'my-apps.json');}export function readCachedAppList(_0x3021ce,_0x38e665){const _0x2bb55f=a2_0x1425;if(!_0x38e665?.[_0x2bb55f(0x11b)]())return null;const _0x47539d=getAppCacheFilePath(_0x3021ce,_0x38e665);if(!existsSync(_0x47539d))return null;try{const _0x30d73b=readFileSync(_0x47539d,'utf8');if(!_0x30d73b['trim']())return null;const _0x3a55c8=JSON[_0x2bb55f(0x110)](_0x30d73b);if(!Array[_0x2bb55f(0x116)](_0x3a55c8[_0x2bb55f(0x114)]))return null;return _0x3a55c8;}catch{return null;}}export function writeCachedAppList(_0x48a73f,_0x260b08,_0x2ad4f2){const _0x1fd9d0=a2_0x1425,_0x52d8ab=getAppCacheFilePath(_0x48a73f,_0x260b08),_0x2c5c9b=dirname(_0x52d8ab);!existsSync(_0x2c5c9b)&&mkdirSync(_0x2c5c9b,{'recursive':!![]});const _0x292e6d=_0x52d8ab+_0x1fd9d0(0x105);try{writeFileSync(_0x292e6d,JSON[_0x1fd9d0(0x11c)](_0x2ad4f2,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180});try{renameSync(_0x292e6d,_0x52d8ab);}catch(_0x1e87eb){if(_0x1e87eb['code']===_0x1fd9d0(0x113)||_0x1e87eb[_0x1fd9d0(0x108)]===_0x1fd9d0(0x10f)||_0x1e87eb[_0x1fd9d0(0x108)]===_0x1fd9d0(0x104)){writeFileSync(_0x52d8ab,JSON[_0x1fd9d0(0x11c)](_0x2ad4f2,null,0x2)+'\x0a',{'encoding':_0x1fd9d0(0x111)});try{unlinkSync(_0x292e6d);}catch{}}else throw _0x1e87eb;}}catch(_0x349d36){try{unlinkSync(_0x292e6d);}catch{}throw _0x349d36;}return _0x52d8ab;}export function resolveCachedAppCode(_0x297b25,_0x41e061,_0x1fbaac){const _0x4e9723=a2_0x1425;if(!_0x297b25)return undefined;const _0x43f0e0=readCachedAppList(_0x41e061,_0x1fbaac),_0x103ac9=_0x43f0e0?.[_0x4e9723(0x114)][_0x4e9723(0x10b)](_0x297ecc=>_0x297ecc[_0x4e9723(0x107)]===_0x297b25&&isRuntimeAccessibleApp(_0x297ecc));return _0x103ac9?.[_0x4e9723(0x117)]?.['trim']()||undefined;}
1
+ (function(_0x36fa8b,_0x53d29c){const _0x3cca9e=a2_0x226f,_0x53524f=_0x36fa8b();while(!![]){try{const _0x1dfbae=parseInt(_0x3cca9e(0x119))/0x1+-parseInt(_0x3cca9e(0x118))/0x2+parseInt(_0x3cca9e(0x11f))/0x3*(parseInt(_0x3cca9e(0x11b))/0x4)+-parseInt(_0x3cca9e(0x126))/0x5+-parseInt(_0x3cca9e(0x12d))/0x6+-parseInt(_0x3cca9e(0x120))/0x7+parseInt(_0x3cca9e(0x11c))/0x8;if(_0x1dfbae===_0x53d29c)break;else _0x53524f['push'](_0x53524f['shift']());}catch(_0x13e80c){_0x53524f['push'](_0x53524f['shift']());}}}(a2_0x860c,0x7078f));function a2_0x860c(){const _0x21815b=['find','update','1203270qAnYON','items','my-apps.json','code','appName','unknown','ak_','hex','753046YPZobc','132112qEqOaL','EPERM','8948pSMUKs','13910720HknwaF','parse','homeDirName','519AqjVzq','2172562wfJKcT','appCode','trim','utf8','slice','stringify','4549160rKwULP','EACCES','sha256','cache','.tmp'];a2_0x860c=function(){return _0x21815b;};return a2_0x860c();}function a2_0x226f(_0x145bc8,_0x534410){_0x145bc8=_0x145bc8-0x115;const _0x860cd5=a2_0x860c();let _0x226f87=_0x860cd5[_0x145bc8];return _0x226f87;}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(_0x187740){const _0x1f5826=a2_0x226f,_0x511ec7=_0x187740[_0x1f5826(0x122)](),_0x94a4c2=_0x511ec7[_0x1f5826(0x124)](-0x6)||_0x1f5826(0x115),_0x18157b=createHash(_0x1f5826(0x128))[_0x1f5826(0x12c)](_0x511ec7)['digest'](_0x1f5826(0x117))[_0x1f5826(0x124)](0x0,0xc);return _0x1f5826(0x116)+_0x94a4c2+'_'+_0x18157b;}export function getAppCacheFilePath(_0x4233ee,_0x463189){const _0x18a6a7=a2_0x226f;return resolve(homedir(),PRODUCT_CONFIG[_0x18a6a7(0x11e)],_0x18a6a7(0x129),_0x4233ee,fingerprintAccessKey(_0x463189),_0x18a6a7(0x12f));}export function readCachedAppList(_0x75ccc0,_0xb1ea6c){const _0x5c0ee8=a2_0x226f;if(!_0xb1ea6c?.[_0x5c0ee8(0x122)]())return null;const _0x5b4964=getAppCacheFilePath(_0x75ccc0,_0xb1ea6c);if(!existsSync(_0x5b4964))return null;try{const _0x3e9e77=readFileSync(_0x5b4964,_0x5c0ee8(0x123));if(!_0x3e9e77[_0x5c0ee8(0x122)]())return null;const _0x30927d=JSON[_0x5c0ee8(0x11d)](_0x3e9e77);if(!Array['isArray'](_0x30927d[_0x5c0ee8(0x12e)]))return null;return _0x30927d;}catch{return null;}}export function writeCachedAppList(_0x50f9cf,_0x3dcc02,_0x3aa67d){const _0x4231fe=a2_0x226f,_0x42dbba=getAppCacheFilePath(_0x50f9cf,_0x3dcc02),_0x1d1017=dirname(_0x42dbba);!existsSync(_0x1d1017)&&mkdirSync(_0x1d1017,{'recursive':!![]});const _0x5f0022=_0x42dbba+_0x4231fe(0x12a);try{writeFileSync(_0x5f0022,JSON[_0x4231fe(0x125)](_0x3aa67d,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180});try{renameSync(_0x5f0022,_0x42dbba);}catch(_0x5aba1a){if(_0x5aba1a[_0x4231fe(0x130)]===_0x4231fe(0x11a)||_0x5aba1a[_0x4231fe(0x130)]==='EXDEV'||_0x5aba1a['code']===_0x4231fe(0x127)){writeFileSync(_0x42dbba,JSON['stringify'](_0x3aa67d,null,0x2)+'\x0a',{'encoding':_0x4231fe(0x123)});try{unlinkSync(_0x5f0022);}catch{}}else throw _0x5aba1a;}}catch(_0x4c1517){try{unlinkSync(_0x5f0022);}catch{}throw _0x4c1517;}return _0x42dbba;}export function resolveCachedAppCode(_0xe9dc11,_0x3984d9,_0x314073){const _0xab68d0=a2_0x226f;if(!_0xe9dc11)return undefined;const _0x2591e0=readCachedAppList(_0x3984d9,_0x314073),_0x1ea541=_0x2591e0?.[_0xab68d0(0x12e)][_0xab68d0(0x12b)](_0x24d998=>_0x24d998[_0xab68d0(0x131)]===_0xe9dc11&&isRuntimeAccessibleApp(_0x24d998));return _0x1ea541?.[_0xab68d0(0x121)]?.[_0xab68d0(0x122)]()||undefined;}
@@ -1 +1 @@
1
- const a3_0x335013=a3_0x4b55;(function(_0x495a3a,_0x8e854b){const _0x131352=a3_0x4b55,_0x4fb428=_0x495a3a();while(!![]){try{const _0x366925=-parseInt(_0x131352(0x1fc))/0x1+parseInt(_0x131352(0x1f9))/0x2*(-parseInt(_0x131352(0x209))/0x3)+-parseInt(_0x131352(0x227))/0x4+-parseInt(_0x131352(0x228))/0x5*(parseInt(_0x131352(0x1f4))/0x6)+-parseInt(_0x131352(0x1ff))/0x7*(parseInt(_0x131352(0x208))/0x8)+parseInt(_0x131352(0x1fe))/0x9+parseInt(_0x131352(0x206))/0xa;if(_0x366925===_0x8e854b)break;else _0x4fb428['push'](_0x4fb428['shift']());}catch(_0xfae5ac){_0x4fb428['push'](_0x4fb428['shift']());}}}(a3_0x1866,0xb0a53));import{appImportFlagDefs,runAppImport}from'../../commands/init.js';import{getEnv,RUNTIME_ENV_VALUES}from'../../constant/env.js';function a3_0x4b55(_0x26ee01,_0x3239ba){_0x26ee01=_0x26ee01-0x1ee;const _0x1866ba=a3_0x1866();let _0x4b5572=_0x1866ba[_0x26ee01];return _0x4b5572;}import{buildAppProfileListFields}from'../../config/schema.js';import{enrichAppListItemsWithMergedSelection}from'../../commands/app/shared.js';function a3_0x1866(){const _0x2e67f2=['1623736lAmoEb','4143kIVAxs','appName','i18nInfo','Include\x20unpublished\x20apps\x20for\x20diagnostics','Reads\x20the\x20given\x20.rabetbase.json\x20and\x20imports\x20a\x20usable\x20default\x20app\x20into\x20local\x20.lovrabet.json.\x20Matching\x20keys\x20may\x20be\x20updated.','app','env','write','trim','source','Target\x20environment\x20(default:\x20current\x20env)','Read\x20from\x20local\x20cache\x20only','boolean','bool','items','production','Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','list','cache','../../context.js','accessKey','name','nonInteractive','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','find','filter','isArray','local','Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','length','4093148xdQoiY','5yJQdVW','\x20cached\x20app(s)\x20for\x20env=\x22','No\x20cached\x20apps\x20found.','read','map','Filter\x20by\x20environment\x20(default:\x20current\x20env)','pull','../../commands/app/remote-source.js','\x20app(s)\x20for\x20env=\x22','7740444Rwrves','enableI18n','langs','globalPath','Read\x20app\x20list\x20from\x20local\x20cache\x20only','2004qBnwCm','mergedCli','appcode','493401VFUlID','string','11335248BvyIZz','14LDpkjG','str','include-unpublished','no-cache','cachePath','List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','fetchedAt','40605250BoMwER','envName'];a3_0x1866=function(){return _0x2e67f2;};return a3_0x1866();}import{filterRuntimeAccessibleApps,findAppByCode,isRuntimeAccessibleApp}from'../../commands/app/eligibility.js';function collectFlags(_0x3ecc8e,_0x58fda0){const _0x16ea1b=a3_0x4b55,_0x109024={};for(const _0x42e751 of _0x58fda0){const _0x941997=_0x42e751['type']===_0x16ea1b(0x215)?_0x3ecc8e[_0x16ea1b(0x216)](_0x42e751['name']):_0x3ecc8e[_0x16ea1b(0x200)](_0x42e751[_0x16ea1b(0x21e)]);if(_0x941997!==''&&_0x941997!==![])_0x109024[_0x42e751[_0x16ea1b(0x21e)]]=_0x941997;}if(_0x3ecc8e[_0x16ea1b(0x21f)])_0x109024[_0x16ea1b(0x21f)]=!![];return _0x109024;}function normalizeLanguages(_0x565551){const _0x129b0c=a3_0x4b55;if(!Array[_0x129b0c(0x223)](_0x565551))return[];return _0x565551[_0x129b0c(0x222)](_0x1a7589=>typeof _0x1a7589==='string')[_0x129b0c(0x1ef)](_0x3db663=>_0x3db663[_0x129b0c(0x211)]())[_0x129b0c(0x222)](Boolean);}function buildRemoteAppI18nFields(_0x4f6d6e){const _0x347aea=a3_0x4b55,_0x1824e0=normalizeLanguages(_0x4f6d6e[_0x347aea(0x20b)]?.[_0x347aea(0x1f6)]);return{'enableI18n':typeof _0x4f6d6e[_0x347aea(0x1f5)]==='boolean'?_0x4f6d6e[_0x347aea(0x1f5)]:null,'languages':_0x1824e0,'i18nInfo':_0x4f6d6e[_0x347aea(0x20b)]?{..._0x4f6d6e[_0x347aea(0x20b)],'langs':_0x1824e0[_0x347aea(0x226)]?_0x1824e0:null}:null};}const listDef={'service':a3_0x335013(0x20e),'command':a3_0x335013(0x21a),'description':a3_0x335013(0x204),'risk':a3_0x335013(0x1ee),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':a3_0x335013(0x20f),'type':a3_0x335013(0x1fd),'description':a3_0x335013(0x1f0),'enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0x335013(0x224),'type':'boolean','description':a3_0x335013(0x1f8),'default':![]},{'name':a3_0x335013(0x202),'type':a3_0x335013(0x215),'description':a3_0x335013(0x220),'default':![]},{'name':'include-unpublished','type':a3_0x335013(0x215),'description':a3_0x335013(0x20c),'default':![]}],async 'execute'(_0x45397a){const _0x1c4c3f=a3_0x335013,_0x42654f=_0x45397a['str'](_0x1c4c3f(0x20f))||_0x45397a[_0x1c4c3f(0x207)]||getEnv()||_0x1c4c3f(0x218),_0x429a7d=_0x45397a[_0x1c4c3f(0x216)](_0x1c4c3f(0x224)),_0x5b6acb=_0x45397a[_0x1c4c3f(0x216)](_0x1c4c3f(0x202)),_0x38f849=_0x45397a[_0x1c4c3f(0x216)](_0x1c4c3f(0x201)),{readRawConfigWithLayers:_0x33ce2d,resolveDefaultAppSource:_0x1703ee,getLocalAppAliases:_0x363691}=await import(_0x1c4c3f(0x21c)),{getRemoteAppList:_0xf72319}=await import('../../commands/app/remote-source.js'),{config:_0xbdc451,layers:_0x35b398}=_0x33ce2d(),_0x34a6e4=_0x1703ee(_0x35b398),{defaultApp:_0x591cc2}=_0xbdc451,_0x197e63=await _0xf72319({'env':_0x42654f,'accessKey':_0x45397a[_0x1c4c3f(0x21d)],'localOnly':_0x429a7d,'noCache':_0x5b6acb}),_0x1ff958=_0x38f849?_0x197e63[_0x1c4c3f(0x217)]:filterRuntimeAccessibleApps(_0x197e63[_0x1c4c3f(0x217)]),_0x945a4c=_0x197e63[_0x1c4c3f(0x217)][_0x1c4c3f(0x226)]-_0x1ff958['length'],_0x4f44ef=_0x1ff958['map'](_0x3db598=>{const _0x5b2b2a=_0x1c4c3f;return{'name':_0x3db598[_0x5b2b2a(0x20a)],'appcode':_0x3db598['appCode'],'named':!![],'definedIn':'remote','isDefault':_0x3db598[_0x5b2b2a(0x20a)]===_0x591cc2,...buildAppProfileListFields(_0x42654f),...buildRemoteAppI18nFields(_0x3db598),'source':_0x197e63[_0x5b2b2a(0x212)],'owner':_0x3db598['appOwnerName']??null,'status':_0x3db598['appPublishStatus']??null,'cachedAt':_0x197e63[_0x5b2b2a(0x205)]};}),_0x49d911=_0x363691(_0xbdc451);let _0x1fbb60=0x0;for(const [_0x3ad03b,_0x2ac8e0]of Object['entries'](_0x49d911)){const _0x3e0826=typeof _0x2ac8e0[_0x1c4c3f(0x1fb)]===_0x1c4c3f(0x1fd)?_0x2ac8e0[_0x1c4c3f(0x1fb)]['trim']():'';if(!_0x3e0826)continue;const _0x4a2a38=findAppByCode(_0x197e63[_0x1c4c3f(0x217)],_0x3e0826);if(!_0x38f849&&_0x4a2a38&&!isRuntimeAccessibleApp(_0x4a2a38))continue;_0x1fbb60+=0x1,_0x4f44ef['push']({'name':_0x3ad03b,'appcode':_0x3e0826,'named':!![],'definedIn':_0x1c4c3f(0x224),'isDefault':_0x3ad03b===_0x591cc2,...buildAppProfileListFields(_0x42654f),'source':'config','owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0x4f44ef,_0x45397a[_0x1c4c3f(0x1fa)]);const _0x42932d=_0x4f44ef[_0x1c4c3f(0x221)](_0x2f3e41=>_0x2f3e41['isCurrent']===!![]),_0x26d469=_0x591cc2??_0x42932d?.[_0x1c4c3f(0x21e)]??null,_0x383bb8={'env':_0x42654f,'source':_0x197e63[_0x1c4c3f(0x212)],'fetchedAt':_0x197e63[_0x1c4c3f(0x205)],'cachePath':_0x197e63[_0x1c4c3f(0x203)],'globalPath':_0x35b398[_0x1c4c3f(0x1f7)]??null,'projectPath':_0x35b398['projectPath']??null,'defaultApp':_0x26d469,'defaultAppSource':_0x591cc2!=null?_0x34a6e4:null,'localAliasCount':_0x1fbb60,'remoteTotal':_0x197e63[_0x1c4c3f(0x217)][_0x1c4c3f(0x226)],'hiddenUnpublishedCount':_0x945a4c,'includeUnpublished':_0x38f849};if(_0x4f44ef['length']===0x0)return{'ok':!![],'data':{'items':_0x4f44ef,'meta':_0x383bb8},'message':_0x197e63['source']===_0x1c4c3f(0x21b)?_0x1c4c3f(0x22a):'No\x20apps\x20found\x20on\x20the\x20platform.'};return{'ok':!![],'data':{'items':_0x4f44ef,'meta':_0x383bb8}};}},pullDef={'service':'app','command':a3_0x335013(0x1f1),'description':a3_0x335013(0x219),'risk':a3_0x335013(0x210),'confirmationDescription':'Reads\x20the\x20apps\x20available\x20to\x20the\x20current\x20account\x20and\x20overwrites\x20the\x20local\x20app\x20cache\x20for\x20that\x20environment.\x20Platform\x20apps\x20are\x20not\x20modified.','requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a3_0x335013(0x20f),'type':a3_0x335013(0x1fd),'description':a3_0x335013(0x213),'enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0x335013(0x224),'type':a3_0x335013(0x215),'description':a3_0x335013(0x214),'default':![]},{'name':'no-cache','type':'boolean','description':a3_0x335013(0x220),'default':![]}],async 'execute'(_0x317c75){const _0x190108=a3_0x335013,_0x3ee825=_0x317c75[_0x190108(0x200)]('env')||_0x317c75[_0x190108(0x207)]||getEnv()||'production',_0x3def26=_0x317c75['bool'](_0x190108(0x224)),_0x1e1fea=_0x317c75['bool'](_0x190108(0x202)),{getRemoteAppList:_0x5556f3}=await import(_0x190108(0x1f2)),_0x11e8ef=await _0x5556f3({'env':_0x3ee825,'accessKey':_0x317c75[_0x190108(0x21d)],'localOnly':_0x3def26,'noCache':_0x1e1fea});return{'ok':!![],'data':{'total':_0x11e8ef[_0x190108(0x217)]['length'],'env':_0x3ee825,'source':_0x11e8ef[_0x190108(0x212)],'fetchedAt':_0x11e8ef[_0x190108(0x205)],'cachePath':_0x11e8ef['cachePath']},'message':_0x11e8ef[_0x190108(0x212)]===_0x190108(0x21b)?'Loaded\x20'+_0x11e8ef[_0x190108(0x217)][_0x190108(0x226)]+_0x190108(0x229)+_0x3ee825+'\x22.':'Refreshed\x20app\x20cache\x20with\x20'+_0x11e8ef[_0x190108(0x217)]['length']+_0x190108(0x1f3)+_0x3ee825+'\x22.'};}},importDef={'service':a3_0x335013(0x20e),'command':'import','description':a3_0x335013(0x225),'risk':'write','confirmationDescription':a3_0x335013(0x20d),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':appImportFlagDefs,async 'execute'(_0x49818f){return await runAppImport(collectFlags(_0x49818f,appImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[listDef,pullDef,importDef];
1
+ const a3_0xf16984=a3_0x2873;(function(_0x4fae9a,_0x31133c){const _0x17b3ef=a3_0x2873,_0x5c55eb=_0x4fae9a();while(!![]){try{const _0x3c43ec=parseInt(_0x17b3ef(0xa5))/0x1*(parseInt(_0x17b3ef(0xaf))/0x2)+-parseInt(_0x17b3ef(0x92))/0x3+parseInt(_0x17b3ef(0x9a))/0x4+-parseInt(_0x17b3ef(0x7a))/0x5+parseInt(_0x17b3ef(0xa6))/0x6*(parseInt(_0x17b3ef(0x85))/0x7)+parseInt(_0x17b3ef(0x9e))/0x8+parseInt(_0x17b3ef(0x9c))/0x9*(-parseInt(_0x17b3ef(0xa2))/0xa);if(_0x3c43ec===_0x31133c)break;else _0x5c55eb['push'](_0x5c55eb['shift']());}catch(_0x7b7177){_0x5c55eb['push'](_0x5c55eb['shift']());}}}(a3_0x443f,0xf4138));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 collectFlags(_0x197401,_0x4724ac){const _0xd4391a=a3_0x2873,_0x323d56={};for(const _0x5156fc of _0x4724ac){const _0x1ded27=_0x5156fc['type']===_0xd4391a(0x9d)?_0x197401[_0xd4391a(0xa4)](_0x5156fc[_0xd4391a(0xb0)]):_0x197401[_0xd4391a(0xb5)](_0x5156fc['name']);if(_0x1ded27!==''&&_0x1ded27!==![])_0x323d56[_0x5156fc[_0xd4391a(0xb0)]]=_0x1ded27;}if(_0x197401[_0xd4391a(0x80)])_0x323d56[_0xd4391a(0x80)]=!![];return _0x323d56;}function normalizeLanguages(_0x803956){const _0x46dd9c=a3_0x2873;if(!Array[_0x46dd9c(0x81)](_0x803956))return[];return _0x803956[_0x46dd9c(0x93)](_0x5b8a23=>typeof _0x5b8a23===_0x46dd9c(0x89))[_0x46dd9c(0xb4)](_0x322a3a=>_0x322a3a[_0x46dd9c(0x8f)]())['filter'](Boolean);}function a3_0x443f(){const _0x1f0928=['source','Loaded\x20','appPublishStatus','map','str','\x20cached\x20app(s)\x20for\x20env=\x22','appcode','No\x20cached\x20apps\x20found.','import','1482780ORBRGJ','Refreshed\x20app\x20cache\x20with\x20','length','app','no-cache','pull','nonInteractive','isArray','local','enableI18n','env','2176433TbCgla','fetchedAt','appName','langs','string','write','Reads\x20the\x20apps\x20available\x20to\x20the\x20current\x20account\x20and\x20overwrites\x20the\x20local\x20app\x20cache\x20for\x20that\x20environment.\x20Platform\x20apps\x20are\x20not\x20modified.','include-unpublished','items','envName','trim','isCurrent','production','2977848dEgOSJ','filter','../../commands/app/remote-source.js','Read\x20app\x20list\x20from\x20local\x20cache\x20only','accessKey','i18nInfo','Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','6024108RbiWSh','globalPath','51309lhnfEZ','boolean','15614312EBHzIg','../../context.js','Filter\x20by\x20environment\x20(default:\x20current\x20env)','config','3450joDMNq','\x20app(s)\x20for\x20env=\x22','bool','1fSxnHs','12gNDVlA','remote','cache','read','entries','list','appOwnerName','Include\x20unpublished\x20apps\x20for\x20diagnostics','find','352198ytiVTj','name'];a3_0x443f=function(){return _0x1f0928;};return a3_0x443f();}function buildRemoteAppI18nFields(_0x41d394){const _0x4a301b=a3_0x2873,_0x132daa=normalizeLanguages(_0x41d394[_0x4a301b(0x97)]?.[_0x4a301b(0x88)]);return{'enableI18n':typeof _0x41d394[_0x4a301b(0x83)]===_0x4a301b(0x9d)?_0x41d394[_0x4a301b(0x83)]:null,'languages':_0x132daa,'i18nInfo':_0x41d394['i18nInfo']?{..._0x41d394['i18nInfo'],'langs':_0x132daa[_0x4a301b(0x7c)]?_0x132daa:null}:null};}function a3_0x2873(_0x44e678,_0x222136){_0x44e678=_0x44e678-0x79;const _0x443f6b=a3_0x443f();let _0x2873a9=_0x443f6b[_0x44e678];return _0x2873a9;}const listDef={'service':a3_0xf16984(0x7d),'command':a3_0xf16984(0xab),'description':'List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','risk':a3_0xf16984(0xa9),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':'env','type':a3_0xf16984(0x89),'description':a3_0xf16984(0xa0),'enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0xf16984(0x82),'type':'boolean','description':a3_0xf16984(0x95),'default':![]},{'name':a3_0xf16984(0x7e),'type':a3_0xf16984(0x9d),'description':a3_0xf16984(0x99),'default':![]},{'name':a3_0xf16984(0x8c),'type':a3_0xf16984(0x9d),'description':a3_0xf16984(0xad),'default':![]}],async 'execute'(_0x369fb7){const _0x411e5b=a3_0xf16984,_0x5c4603=_0x369fb7['str'](_0x411e5b(0x84))||_0x369fb7[_0x411e5b(0x8e)]||getEnv()||'production',_0x4046e8=_0x369fb7[_0x411e5b(0xa4)](_0x411e5b(0x82)),_0x42c6eb=_0x369fb7['bool'](_0x411e5b(0x7e)),_0x566cab=_0x369fb7['bool'](_0x411e5b(0x8c)),{readRawConfigWithLayers:_0x1d157c,resolveDefaultAppSource:_0x376d3a,getLocalAppAliases:_0x49e815}=await import(_0x411e5b(0x9f)),{getRemoteAppList:_0x46ed18}=await import(_0x411e5b(0x94)),{config:_0x5ddb2a,layers:_0x48dd50}=_0x1d157c(),_0x45e8a6=_0x376d3a(_0x48dd50),{defaultApp:_0x348a5f}=_0x5ddb2a,_0x211b22=await _0x46ed18({'env':_0x5c4603,'accessKey':_0x369fb7[_0x411e5b(0x96)],'localOnly':_0x4046e8,'noCache':_0x42c6eb}),_0x9b194f=_0x566cab?_0x211b22['items']:filterRuntimeAccessibleApps(_0x211b22[_0x411e5b(0x8d)]),_0x20e207=_0x211b22[_0x411e5b(0x8d)]['length']-_0x9b194f[_0x411e5b(0x7c)],_0x302ea0=_0x9b194f[_0x411e5b(0xb4)](_0x19c32b=>{const _0x36fefb=_0x411e5b;return{'name':_0x19c32b[_0x36fefb(0x87)],'appcode':_0x19c32b['appCode'],'named':!![],'definedIn':_0x36fefb(0xa7),'isDefault':_0x19c32b['appName']===_0x348a5f,...buildAppProfileListFields(_0x5c4603),...buildRemoteAppI18nFields(_0x19c32b),'source':_0x211b22[_0x36fefb(0xb1)],'owner':_0x19c32b[_0x36fefb(0xac)]??null,'status':_0x19c32b[_0x36fefb(0xb3)]??null,'cachedAt':_0x211b22['fetchedAt']};}),_0x1cf867=_0x49e815(_0x5ddb2a);let _0x46826e=0x0;for(const [_0x58480b,_0xc3a911]of Object[_0x411e5b(0xaa)](_0x1cf867)){const _0x33d7e3=typeof _0xc3a911[_0x411e5b(0xb7)]===_0x411e5b(0x89)?_0xc3a911[_0x411e5b(0xb7)][_0x411e5b(0x8f)]():'';if(!_0x33d7e3)continue;const _0x287bd2=findAppByCode(_0x211b22[_0x411e5b(0x8d)],_0x33d7e3);if(!_0x566cab&&_0x287bd2&&!isRuntimeAccessibleApp(_0x287bd2))continue;_0x46826e+=0x1,_0x302ea0['push']({'name':_0x58480b,'appcode':_0x33d7e3,'named':!![],'definedIn':_0x411e5b(0x82),'isDefault':_0x58480b===_0x348a5f,...buildAppProfileListFields(_0x5c4603),'source':_0x411e5b(0xa1),'owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0x302ea0,_0x369fb7['mergedCli']);const _0x597aa8=_0x302ea0[_0x411e5b(0xae)](_0x3aae92=>_0x3aae92[_0x411e5b(0x90)]===!![]),_0x431340=_0x348a5f??_0x597aa8?.[_0x411e5b(0xb0)]??null,_0x29fb4b={'env':_0x5c4603,'source':_0x211b22[_0x411e5b(0xb1)],'fetchedAt':_0x211b22[_0x411e5b(0x86)],'cachePath':_0x211b22['cachePath'],'globalPath':_0x48dd50[_0x411e5b(0x9b)]??null,'projectPath':_0x48dd50['projectPath']??null,'defaultApp':_0x431340,'defaultAppSource':_0x348a5f!=null?_0x45e8a6:null,'localAliasCount':_0x46826e,'remoteTotal':_0x211b22[_0x411e5b(0x8d)][_0x411e5b(0x7c)],'hiddenUnpublishedCount':_0x20e207,'includeUnpublished':_0x566cab};if(_0x302ea0[_0x411e5b(0x7c)]===0x0)return{'ok':!![],'data':{'items':_0x302ea0,'meta':_0x29fb4b},'message':_0x211b22[_0x411e5b(0xb1)]===_0x411e5b(0xa8)?_0x411e5b(0xb8):'No\x20apps\x20found\x20on\x20the\x20platform.'};return{'ok':!![],'data':{'items':_0x302ea0,'meta':_0x29fb4b}};}},pullDef={'service':a3_0xf16984(0x7d),'command':a3_0xf16984(0x7f),'description':'Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','risk':'write','confirmationDescription':a3_0xf16984(0x8b),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a3_0xf16984(0x84),'type':a3_0xf16984(0x89),'description':'Target\x20environment\x20(default:\x20current\x20env)','enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0xf16984(0x82),'type':a3_0xf16984(0x9d),'description':'Read\x20from\x20local\x20cache\x20only','default':![]},{'name':a3_0xf16984(0x7e),'type':a3_0xf16984(0x9d),'description':'Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','default':![]}],async 'execute'(_0x3f3c66){const _0x41e8f2=a3_0xf16984,_0x4c2506=_0x3f3c66['str'](_0x41e8f2(0x84))||_0x3f3c66[_0x41e8f2(0x8e)]||getEnv()||_0x41e8f2(0x91),_0x144302=_0x3f3c66['bool'](_0x41e8f2(0x82)),_0x1a8d14=_0x3f3c66[_0x41e8f2(0xa4)](_0x41e8f2(0x7e)),{getRemoteAppList:_0xeee05d}=await import('../../commands/app/remote-source.js'),_0x49b0d8=await _0xeee05d({'env':_0x4c2506,'accessKey':_0x3f3c66[_0x41e8f2(0x96)],'localOnly':_0x144302,'noCache':_0x1a8d14});return{'ok':!![],'data':{'total':_0x49b0d8['items']['length'],'env':_0x4c2506,'source':_0x49b0d8[_0x41e8f2(0xb1)],'fetchedAt':_0x49b0d8[_0x41e8f2(0x86)],'cachePath':_0x49b0d8['cachePath']},'message':_0x49b0d8[_0x41e8f2(0xb1)]===_0x41e8f2(0xa8)?_0x41e8f2(0xb2)+_0x49b0d8[_0x41e8f2(0x8d)][_0x41e8f2(0x7c)]+_0x41e8f2(0xb6)+_0x4c2506+'\x22.':_0x41e8f2(0x7b)+_0x49b0d8[_0x41e8f2(0x8d)]['length']+_0x41e8f2(0xa3)+_0x4c2506+'\x22.'};}},importDef={'service':'app','command':a3_0xf16984(0x79),'description':a3_0xf16984(0x98),'risk':a3_0xf16984(0x8a),'confirmationDescription':'Reads\x20the\x20given\x20.rabetbase.json\x20and\x20imports\x20a\x20usable\x20default\x20app\x20into\x20local\x20.lovrabet.json.\x20Matching\x20keys\x20may\x20be\x20updated.','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':appImportFlagDefs,async 'execute'(_0x463040){return await runAppImport(collectFlags(_0x463040,appImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[listDef,pullDef,importDef];
@@ -1 +1 @@
1
- (function(_0x3dee76,_0x9074){const _0x35838b=a4_0x3c8f,_0x978fb5=_0x3dee76();while(!![]){try{const _0xe0733a=parseInt(_0x35838b(0x109))/0x1*(parseInt(_0x35838b(0xfd))/0x2)+-parseInt(_0x35838b(0x108))/0x3+parseInt(_0x35838b(0xfc))/0x4+parseInt(_0x35838b(0x10a))/0x5*(parseInt(_0x35838b(0x106))/0x6)+-parseInt(_0x35838b(0x10c))/0x7*(-parseInt(_0x35838b(0xfe))/0x8)+parseInt(_0x35838b(0x102))/0x9+-parseInt(_0x35838b(0xfa))/0xa;if(_0xe0733a===_0x9074)break;else _0x978fb5['push'](_0x978fb5['shift']());}catch(_0x43ff69){_0x978fb5['push'](_0x978fb5['shift']());}}}(a4_0x5090,0x56216));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(_0x4ad665){const _0x28ce47=a4_0x3c8f;if(typeof _0x4ad665!=='string')return null;const _0x427e16=_0x4ad665[_0x28ce47(0xff)]();return _0x427e16?_0x427e16[_0x28ce47(0x100)]():null;}export function isRuntimeAccessibleApp(_0x1d1a72){const _0x3ae0bf=a4_0x3c8f;return normalizeAppPublishStatus(_0x1d1a72[_0x3ae0bf(0x10e)])===RUNTIME_ACCESSIBLE_APP_STATUS;}export function filterRuntimeAccessibleApps(_0xe141fd){const _0x59200b=a4_0x3c8f;return _0xe141fd[_0x59200b(0x10b)](isRuntimeAccessibleApp);}function a4_0x5090(){const _0x2aea0a=['576039sHkrxC','5INHSjH','filter','2394nPxgOv','\x20dataset/data/sql/bff\x20commands,\x20or\x20choose\x20a\x20published\x20app.','appPublishStatus','UNKNOWN','\x20is\x20not\x20available\x20for\x20runtime\x20AI\x20access.','9400840cDssAW','.\x20Publish\x20the\x20app\x20before\x20using\x20','1945832wGunWN','2zBwRsU','9032MxXhJQ','trim','toUpperCase','appName','615429YErGzt','find','appCode','Current\x20status:\x20','2529354FtMJnz','validation','1937043xffsNb'];a4_0x5090=function(){return _0x2aea0a;};return a4_0x5090();}function a4_0x3c8f(_0x2056a9,_0xbd17ab){_0x2056a9=_0x2056a9-0xfa;const _0x5090db=a4_0x5090();let _0x3c8f2e=_0x5090db[_0x2056a9];return _0x3c8f2e;}export function findAppByName(_0x3d55bd,_0x235211){const _0x15a772=a4_0x3c8f;return _0x3d55bd['find'](_0x417b1b=>_0x417b1b[_0x15a772(0x101)]===_0x235211);}export function findAppByCode(_0x5bde27,_0x21667c){const _0x25a479=a4_0x3c8f,_0x1fced9=_0x21667c['trim']();if(!_0x1fced9)return undefined;return _0x5bde27[_0x25a479(0x103)](_0x34333b=>_0x34333b[_0x25a479(0x104)]?.[_0x25a479(0xff)]()===_0x1fced9);}export function runtimeInaccessibleAppError(_0x475a1f,_0x207fac){const _0x3b8654=a4_0x3c8f,_0x164644=normalizeAppPublishStatus(_0x475a1f['appPublishStatus'])??_0x3b8654(0x10f);return CliErrors[_0x3b8654(0x107)]('App\x20'+_0x207fac+_0x3b8654(0x110),_0x3b8654(0x105)+_0x164644+_0x3b8654(0xfb)+CLI_BIN_NAME+_0x3b8654(0x10d));}
1
+ (function(_0x22113d,_0x3c605c){const _0x3e4958=a4_0x142d,_0x1c0de5=_0x22113d();while(!![]){try{const _0x4a0ca0=-parseInt(_0x3e4958(0x7a))/0x1+-parseInt(_0x3e4958(0x88))/0x2+parseInt(_0x3e4958(0x7c))/0x3+parseInt(_0x3e4958(0x82))/0x4*(parseInt(_0x3e4958(0x79))/0x5)+parseInt(_0x3e4958(0x8b))/0x6*(-parseInt(_0x3e4958(0x8d))/0x7)+-parseInt(_0x3e4958(0x7d))/0x8+parseInt(_0x3e4958(0x81))/0x9*(parseInt(_0x3e4958(0x89))/0xa);if(_0x4a0ca0===_0x3c605c)break;else _0x1c0de5['push'](_0x1c0de5['shift']());}catch(_0x427c7f){_0x1c0de5['push'](_0x1c0de5['shift']());}}}(a4_0x1657,0x1920f));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(_0x301d7e){const _0x25f604=a4_0x142d;if(typeof _0x301d7e!==_0x25f604(0x87))return null;const _0x18ba9b=_0x301d7e['trim']();return _0x18ba9b?_0x18ba9b[_0x25f604(0x7b)]():null;}export function isRuntimeAccessibleApp(_0xf7c571){const _0x545134=a4_0x142d;return normalizeAppPublishStatus(_0xf7c571[_0x545134(0x8c)])===RUNTIME_ACCESSIBLE_APP_STATUS;}export function filterRuntimeAccessibleApps(_0x492376){const _0x69898d=a4_0x142d;return _0x492376[_0x69898d(0x85)](isRuntimeAccessibleApp);}export function findAppByName(_0x4c095d,_0x30619d){const _0x337fad=a4_0x142d;return _0x4c095d[_0x337fad(0x86)](_0x192438=>_0x192438[_0x337fad(0x8a)]===_0x30619d);}function a4_0x1657(){const _0x39929d=['12mhiVBX','appPublishStatus','166327GswnkK','App\x20','225PJAfPl','5650bzaYnY','toUpperCase','86724cBAnlw','1340360ygtCMx','validation','\x20dataset/data/sql/bff\x20commands,\x20or\x20choose\x20a\x20published\x20app.','Current\x20status:\x20','18QOzelY','10836DpximC','.\x20Publish\x20the\x20app\x20before\x20using\x20','UNKNOWN','filter','find','string','247470KAoBXP','1482830BlnosI','appName'];a4_0x1657=function(){return _0x39929d;};return a4_0x1657();}export function findAppByCode(_0x336b69,_0x5464f3){const _0x38f191=a4_0x142d,_0x42b368=_0x5464f3['trim']();if(!_0x42b368)return undefined;return _0x336b69[_0x38f191(0x86)](_0x2691cc=>_0x2691cc['appCode']?.['trim']()===_0x42b368);}function a4_0x142d(_0x433ad6,_0x3a141c){_0x433ad6=_0x433ad6-0x78;const _0x1657ba=a4_0x1657();let _0x142daa=_0x1657ba[_0x433ad6];return _0x142daa;}export function runtimeInaccessibleAppError(_0xe9c730,_0x454e11){const _0x5dcd80=a4_0x142d,_0x366127=normalizeAppPublishStatus(_0xe9c730['appPublishStatus'])??_0x5dcd80(0x84);return CliErrors[_0x5dcd80(0x7e)](_0x5dcd80(0x78)+_0x454e11+'\x20is\x20not\x20available\x20for\x20runtime\x20AI\x20access.',_0x5dcd80(0x80)+_0x366127+_0x5dcd80(0x83)+CLI_BIN_NAME+_0x5dcd80(0x7f));}
@@ -1 +1 @@
1
- (function(_0x3f0aa5,_0x16ddc2){const _0x386dc2=a5_0x5328,_0x465710=_0x3f0aa5();while(!![]){try{const _0x1a35a4=-parseInt(_0x386dc2(0xd0))/0x1+parseInt(_0x386dc2(0xc6))/0x2*(parseInt(_0x386dc2(0xc9))/0x3)+parseInt(_0x386dc2(0xd3))/0x4*(parseInt(_0x386dc2(0xd8))/0x5)+-parseInt(_0x386dc2(0xd4))/0x6*(-parseInt(_0x386dc2(0xd1))/0x7)+-parseInt(_0x386dc2(0xca))/0x8+parseInt(_0x386dc2(0xc5))/0x9*(parseInt(_0x386dc2(0xd2))/0xa)+parseInt(_0x386dc2(0xd5))/0xb*(-parseInt(_0x386dc2(0xd7))/0xc);if(_0x1a35a4===_0x16ddc2)break;else _0x465710['push'](_0x465710['shift']());}catch(_0x5e41c8){_0x465710['push'](_0x465710['shift']());}}}(a5_0x1785,0xe0235));function a5_0x5328(_0x1779bd,_0x390cfc){_0x1779bd=_0x1779bd-0xc5;const _0x178575=a5_0x1785();let _0x5328da=_0x178575[_0x1779bd];return _0x5328da;}import{fileURLToPath}from'url';import{dirname,join}from'path';import{readFileSync}from'fs';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function a5_0x1785(){const _0x5e709c=['216DOyGgh','1352408SBwvlq','errorMsg','tableData','data','Mock\x20API\x20error:\x20','../../../mock/app-list.json','193302iVliZB','325192IbWdMU','10bBGxvU','3140oLqduB','102Vcfjlc','40150awebEI','utf-8','4476XulcCr','5675rZZYOr','2843577ZkujOH','17922QcBTpR','parse','success'];a5_0x1785=function(){return _0x5e709c;};return a5_0x1785();}function loadMockAppList(){const _0x391a40=a5_0x5328,_0x48bb70=join(__dirname,_0x391a40(0xcf)),_0x2a2580=readFileSync(_0x48bb70,_0x391a40(0xd6));return JSON[_0x391a40(0xc7)](_0x2a2580);}let _cached=null;export function getMockAppList(){return!_cached&&(_cached=loadMockAppList()),_cached;}export function getMockRemoteAppItems(){const _0x1fb8d4=a5_0x5328,_0x278575=getMockAppList();if(!_0x278575[_0x1fb8d4(0xc8)])throw new Error(_0x1fb8d4(0xce)+_0x278575[_0x1fb8d4(0xcb)]+'\x20('+_0x278575['errorCode']+')');return _0x278575[_0x1fb8d4(0xcd)][_0x1fb8d4(0xcc)];}
1
+ (function(_0x59de30,_0x199250){const _0x1c942b=a5_0x4561,_0x216a93=_0x59de30();while(!![]){try{const _0xf56655=-parseInt(_0x1c942b(0x1d1))/0x1*(-parseInt(_0x1c942b(0x1c5))/0x2)+-parseInt(_0x1c942b(0x1ce))/0x3*(parseInt(_0x1c942b(0x1c8))/0x4)+-parseInt(_0x1c942b(0x1c6))/0x5+parseInt(_0x1c942b(0x1c4))/0x6*(-parseInt(_0x1c942b(0x1d0))/0x7)+-parseInt(_0x1c942b(0x1d2))/0x8+parseInt(_0x1c942b(0x1d3))/0x9+parseInt(_0x1c942b(0x1cf))/0xa;if(_0xf56655===_0x199250)break;else _0x216a93['push'](_0x216a93['shift']());}catch(_0xddbd09){_0x216a93['push'](_0x216a93['shift']());}}}(a5_0x65ce,0xc1c3f));import{fileURLToPath}from'url';import{dirname,join}from'path';function a5_0x4561(_0x3ce11c,_0x410e61){_0x3ce11c=_0x3ce11c-0x1c3;const _0x65ceab=a5_0x65ce();let _0x456100=_0x65ceab[_0x3ce11c];return _0x456100;}import{readFileSync}from'fs';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function loadMockAppList(){const _0x12c172=a5_0x4561,_0x1f5501=join(__dirname,_0x12c172(0x1cb)),_0x3db57b=readFileSync(_0x1f5501,_0x12c172(0x1c7));return JSON[_0x12c172(0x1c3)](_0x3db57b);}function a5_0x65ce(){const _0x27c14c=['12034035Bwsdhp','parse','3174YXzQEe','4250sxcSAL','3780435YRlfRq','utf-8','4Pnphea','Mock\x20API\x20error:\x20','data','../../../mock/app-list.json','errorCode','errorMsg','4001457ZelsJb','14158730tgOlvf','2940yaBSJg','324kCHshh','2685912MEISKr'];a5_0x65ce=function(){return _0x27c14c;};return a5_0x65ce();}let _cached=null;export function getMockAppList(){return!_cached&&(_cached=loadMockAppList()),_cached;}export function getMockRemoteAppItems(){const _0x3480a4=a5_0x4561,_0x58c369=getMockAppList();if(!_0x58c369['success'])throw new Error(_0x3480a4(0x1c9)+_0x58c369[_0x3480a4(0x1cd)]+'\x20('+_0x58c369[_0x3480a4(0x1cc)]+')');return _0x58c369[_0x3480a4(0x1ca)]['tableData'];}
@@ -1 +1 @@
1
- (function(_0x5c59dc,_0x584444){const _0xa3d6c9=a6_0x18ed,_0x2705c3=_0x5c59dc();while(!![]){try{const _0x3a90cf=-parseInt(_0xa3d6c9(0x105))/0x1*(-parseInt(_0xa3d6c9(0xf7))/0x2)+parseInt(_0xa3d6c9(0x102))/0x3*(-parseInt(_0xa3d6c9(0x109))/0x4)+-parseInt(_0xa3d6c9(0xf9))/0x5*(-parseInt(_0xa3d6c9(0x104))/0x6)+-parseInt(_0xa3d6c9(0xf8))/0x7*(-parseInt(_0xa3d6c9(0xfe))/0x8)+parseInt(_0xa3d6c9(0xfa))/0x9+parseInt(_0xa3d6c9(0xfc))/0xa*(parseInt(_0xa3d6c9(0xff))/0xb)+parseInt(_0xa3d6c9(0x103))/0xc*(-parseInt(_0xa3d6c9(0x100))/0xd);if(_0x3a90cf===_0x584444)break;else _0x2705c3['push'](_0x2705c3['shift']());}catch(_0x435684){_0x2705c3['push'](_0x2705c3['shift']());}}}(a6_0x2ce9,0xd2d90));function a6_0x2ce9(){const _0x10badc=['8Wtyykt','trim','94NhvxMW','4208302SeNfwl','2520ESSWiq','6543963takyTZ','toLowerCase','607630rjycWP','cache','8UyuigE','22FHEpjM','13NObvEY','fetchedAt','550935DueZLG','37584048AawMNl','16356NWOELA','32749nzxVOM','items','toISOString','mock'];a6_0x2ce9=function(){return _0x10badc;};return a6_0x2ce9();}import{getMyApps}from'../../core/api-client.js';import{getMockRemoteAppItems}from'../../commands/app/mock-loader.js';import{getAppCacheFilePath,readCachedAppList,writeCachedAppList}from'../../commands/app/cache.js';import{productEnv}from'../../constant/product.js';export function shouldUseMockRemoteApps(){const _0x486e5b=a6_0x18ed,_0x55dcb3=(productEnv('APP_LIST_SOURCE')||'')[_0x486e5b(0xf6)]()[_0x486e5b(0xfb)]();return _0x55dcb3===_0x486e5b(0x108);}export async function getRemoteAppItems(){if(shouldUseMockRemoteApps())return getMockRemoteAppItems();return getMyApps();}function a6_0x18ed(_0x143df1,_0x2469fa){_0x143df1=_0x143df1-0xf6;const _0x2ce991=a6_0x2ce9();let _0x18ed31=_0x2ce991[_0x143df1];return _0x18ed31;}export async function getRemoteAppList(_0x3c71c6){const _0x18a6e5=a6_0x18ed,{env:_0x3684fa,accessKey:_0x57354d,localOnly:localOnly=![],noCache:noCache=![]}=_0x3c71c6,_0x504aff=readCachedAppList(_0x3684fa,_0x57354d),_0x1d6a57=_0x57354d?.[_0x18a6e5(0xf6)]()?getAppCacheFilePath(_0x3684fa,_0x57354d):null;if(localOnly)return{'items':_0x504aff?.[_0x18a6e5(0x106)]??[],'source':_0x18a6e5(0xfd),'fetchedAt':_0x504aff?.[_0x18a6e5(0x101)]??null,'cachePath':_0x1d6a57};try{const _0x3c84f9=await getRemoteAppItems(),_0xa586ef=shouldUseMockRemoteApps()?_0x18a6e5(0x108):'remote',_0xf8c30=new Date()[_0x18a6e5(0x107)](),_0x55fdd8=_0x57354d?.[_0x18a6e5(0xf6)]()?writeCachedAppList(_0x3684fa,_0x57354d,{'env':_0x3684fa,'fetchedAt':_0xf8c30,'source':_0xa586ef,'items':_0x3c84f9}):null;return{'items':_0x3c84f9,'source':_0xa586ef,'fetchedAt':_0xf8c30,'cachePath':_0x55fdd8};}catch(_0x311301){if(!noCache&&_0x504aff)return{'items':_0x504aff['items'],'source':_0x18a6e5(0xfd),'fetchedAt':_0x504aff[_0x18a6e5(0x101)],'cachePath':_0x1d6a57};throw _0x311301;}}
1
+ (function(_0x25b243,_0x4a0096){const _0x40c824=a6_0x4be5,_0xd4fbde=_0x25b243();while(!![]){try{const _0x10811f=-parseInt(_0x40c824(0xcb))/0x1*(parseInt(_0x40c824(0xc5))/0x2)+parseInt(_0x40c824(0xcf))/0x3*(-parseInt(_0x40c824(0xd4))/0x4)+-parseInt(_0x40c824(0xc9))/0x5+parseInt(_0x40c824(0xd3))/0x6*(-parseInt(_0x40c824(0xd0))/0x7)+-parseInt(_0x40c824(0xce))/0x8+-parseInt(_0x40c824(0xcd))/0x9*(parseInt(_0x40c824(0xc8))/0xa)+parseInt(_0x40c824(0xd1))/0xb;if(_0x10811f===_0x4a0096)break;else _0xd4fbde['push'](_0xd4fbde['shift']());}catch(_0x1986d3){_0xd4fbde['push'](_0xd4fbde['shift']());}}}(a6_0x5f51,0x1a6e5));import{getMyApps}from'../../core/api-client.js';import{getMockRemoteAppItems}from'../../commands/app/mock-loader.js';function a6_0x5f51(){const _0x41fad9=['APP_LIST_SOURCE','1GzLEmh','mock','23076ouhttJ','103992lEWErr','12XVYcKA','371ReiIKD','9098683cXjEGt','remote','19986jJcVbp','90092bopfuZ','fetchedAt','trim','432932MQpGHp','toLowerCase','items','580kuilyf','370400dqSaTE'];a6_0x5f51=function(){return _0x41fad9;};return a6_0x5f51();}function a6_0x4be5(_0x2f5c44,_0x4bc95e){_0x2f5c44=_0x2f5c44-0xc4;const _0x5f5109=a6_0x5f51();let _0x4be5f3=_0x5f5109[_0x2f5c44];return _0x4be5f3;}import{getAppCacheFilePath,readCachedAppList,writeCachedAppList}from'../../commands/app/cache.js';import{productEnv}from'../../constant/product.js';export function shouldUseMockRemoteApps(){const _0x7f7d0f=a6_0x4be5,_0x56e0a8=(productEnv(_0x7f7d0f(0xca))||'')[_0x7f7d0f(0xc4)]()[_0x7f7d0f(0xc6)]();return _0x56e0a8===_0x7f7d0f(0xcc);}export async function getRemoteAppItems(){if(shouldUseMockRemoteApps())return getMockRemoteAppItems();return getMyApps();}export async function getRemoteAppList(_0xd8d1a){const _0x381712=a6_0x4be5,{env:_0x1b51f1,accessKey:_0x5aacdd,localOnly:localOnly=![],noCache:noCache=![]}=_0xd8d1a,_0x5a0b73=readCachedAppList(_0x1b51f1,_0x5aacdd),_0x40ddb9=_0x5aacdd?.[_0x381712(0xc4)]()?getAppCacheFilePath(_0x1b51f1,_0x5aacdd):null;if(localOnly)return{'items':_0x5a0b73?.[_0x381712(0xc7)]??[],'source':'cache','fetchedAt':_0x5a0b73?.[_0x381712(0xd5)]??null,'cachePath':_0x40ddb9};try{const _0x141710=await getRemoteAppItems(),_0x5e0cad=shouldUseMockRemoteApps()?_0x381712(0xcc):_0x381712(0xd2),_0x33df76=new Date()['toISOString'](),_0x48a2ee=_0x5aacdd?.['trim']()?writeCachedAppList(_0x1b51f1,_0x5aacdd,{'env':_0x1b51f1,'fetchedAt':_0x33df76,'source':_0x5e0cad,'items':_0x141710}):null;return{'items':_0x141710,'source':_0x5e0cad,'fetchedAt':_0x33df76,'cachePath':_0x48a2ee};}catch(_0x4618a8){if(!noCache&&_0x5a0b73)return{'items':_0x5a0b73[_0x381712(0xc7)],'source':'cache','fetchedAt':_0x5a0b73[_0x381712(0xd5)],'cachePath':_0x40ddb9};throw _0x4618a8;}}
@@ -1 +1 @@
1
- function a7_0x3ffc(_0x54b250,_0x299019){_0x54b250=_0x54b250-0x109;const _0x2c2fdf=a7_0x2c2f();let _0x3ffc91=_0x2c2fdf[_0x54b250];return _0x3ffc91;}(function(_0x5ced44,_0xdf2ed6){const _0x172771=a7_0x3ffc,_0xa1d0da=_0x5ced44();while(!![]){try{const _0xd497d9=parseInt(_0x172771(0x116))/0x1*(parseInt(_0x172771(0x10b))/0x2)+parseInt(_0x172771(0x119))/0x3+parseInt(_0x172771(0x113))/0x4+-parseInt(_0x172771(0x10c))/0x5*(parseInt(_0x172771(0x117))/0x6)+-parseInt(_0x172771(0x10e))/0x7+-parseInt(_0x172771(0x10a))/0x8+-parseInt(_0x172771(0x10f))/0x9*(-parseInt(_0x172771(0x112))/0xa);if(_0xd497d9===_0xdf2ed6)break;else _0xa1d0da['push'](_0xa1d0da['shift']());}catch(_0x297e2d){_0xa1d0da['push'](_0xa1d0da['shift']());}}}(a7_0x2c2f,0x9611f));function a7_0x2c2f(){const _0xcbbae7=['defaultApp','430794DbHeoC','appCode','currentApp','2615064tymyHB','1536236hsaFuw','70HnuvhY','isCurrent','7701834gvoItg','1335681DvfVno','find','appcode','110LaBaGB','1491980wrFiFm','local','trim','1dhkAxO','375162KiGnPB'];a7_0x2c2f=function(){return _0xcbbae7;};return a7_0x2c2f();}export function enrichAppListItemsWithMergedSelection(_0x184221,_0x487ed0){const _0x3a75a4=a7_0x3ffc;if(!_0x487ed0)return;const _0x3b7ae1=!!(_0x487ed0[_0x3a75a4(0x109)]??_0x487ed0[_0x3a75a4(0x118)]);for(const _0x165e03 of _0x184221){_0x165e03['isCurrent']=![];}const _0x58b311=_0x487ed0[_0x3a75a4(0x11a)]!=null?String(_0x487ed0['appCode'])[_0x3a75a4(0x115)]():'';if(_0x3b7ae1){const _0x249d42=_0x487ed0[_0x3a75a4(0x109)]??_0x487ed0[_0x3a75a4(0x118)];if(_0x249d42){const _0x207664=_0x184221[_0x3a75a4(0x110)](_0x40946f=>_0x40946f['named']===!![]&&_0x40946f['name']===_0x249d42&&_0x40946f['definedIn']===_0x3a75a4(0x114)),_0xcfe3be=_0x207664??_0x184221[_0x3a75a4(0x110)](_0x31b3dc=>_0x31b3dc['named']===!![]&&_0x31b3dc['name']===_0x249d42);if(_0xcfe3be){const _0x2e5c9a=String(_0xcfe3be[_0x3a75a4(0x111)]??'')['trim']();if(!_0x58b311||_0x2e5c9a===_0x58b311){_0xcfe3be['isCurrent']=!![];return;}}}if(_0x58b311){const _0x4144c5=_0x184221[_0x3a75a4(0x110)](_0x5adc61=>String(_0x5adc61[_0x3a75a4(0x111)]??'')[_0x3a75a4(0x115)]()===_0x58b311);_0x4144c5&&(_0x4144c5[_0x3a75a4(0x10d)]=!![]);}return;}if(!_0x58b311)return;for(const _0x2e2d0b of _0x184221){String(_0x2e2d0b['appcode']??'')[_0x3a75a4(0x115)]()===_0x58b311&&(_0x2e2d0b['isCurrent']=!![]);}}
1
+ function a7_0x1c9e(_0x184578,_0x2b6e32){_0x184578=_0x184578-0x12d;const _0x23f3e3=a7_0x23f3();let _0x1c9e9d=_0x23f3e3[_0x184578];return _0x1c9e9d;}(function(_0x20042e,_0x22c1a8){const _0x57e456=a7_0x1c9e,_0x550db9=_0x20042e();while(!![]){try{const _0x705ff2=-parseInt(_0x57e456(0x141))/0x1*(parseInt(_0x57e456(0x12d))/0x2)+parseInt(_0x57e456(0x137))/0x3+parseInt(_0x57e456(0x13f))/0x4+parseInt(_0x57e456(0x13e))/0x5*(parseInt(_0x57e456(0x12e))/0x6)+-parseInt(_0x57e456(0x13d))/0x7*(-parseInt(_0x57e456(0x13c))/0x8)+parseInt(_0x57e456(0x139))/0x9*(parseInt(_0x57e456(0x136))/0xa)+-parseInt(_0x57e456(0x133))/0xb;if(_0x705ff2===_0x22c1a8)break;else _0x550db9['push'](_0x550db9['shift']());}catch(_0x1d36b8){_0x550db9['push'](_0x550db9['shift']());}}}(a7_0x23f3,0x41ef0));function a7_0x23f3(){const _0x56d4b4=['7aHEtie','15jQupBy','891412seQXeR','defaultApp','1wRmfkL','828202notzTH','334518UNezLY','local','named','name','appcode','3193784fTxacM','definedIn','isCurrent','10waJHIY','169761mBvbkW','trim','4163355AXJBuV','appCode','find','521720uJssUr'];a7_0x23f3=function(){return _0x56d4b4;};return a7_0x23f3();}export function enrichAppListItemsWithMergedSelection(_0x6781f9,_0x4bb99e){const _0x1a9d95=a7_0x1c9e;if(!_0x4bb99e)return;const _0x4e4462=!!(_0x4bb99e['currentApp']??_0x4bb99e[_0x1a9d95(0x140)]);for(const _0x25dcbf of _0x6781f9){_0x25dcbf['isCurrent']=![];}const _0x3e8605=_0x4bb99e[_0x1a9d95(0x13a)]!=null?String(_0x4bb99e[_0x1a9d95(0x13a)])[_0x1a9d95(0x138)]():'';if(_0x4e4462){const _0x45ef35=_0x4bb99e['currentApp']??_0x4bb99e[_0x1a9d95(0x140)];if(_0x45ef35){const _0x4c2ed7=_0x6781f9[_0x1a9d95(0x13b)](_0x406942=>_0x406942[_0x1a9d95(0x130)]===!![]&&_0x406942[_0x1a9d95(0x131)]===_0x45ef35&&_0x406942[_0x1a9d95(0x134)]===_0x1a9d95(0x12f)),_0x22b174=_0x4c2ed7??_0x6781f9['find'](_0x5600e1=>_0x5600e1[_0x1a9d95(0x130)]===!![]&&_0x5600e1[_0x1a9d95(0x131)]===_0x45ef35);if(_0x22b174){const _0x4ff666=String(_0x22b174['appcode']??'')[_0x1a9d95(0x138)]();if(!_0x3e8605||_0x4ff666===_0x3e8605){_0x22b174['isCurrent']=!![];return;}}}if(_0x3e8605){const _0x2a91ef=_0x6781f9[_0x1a9d95(0x13b)](_0x580140=>String(_0x580140[_0x1a9d95(0x132)]??'')[_0x1a9d95(0x138)]()===_0x3e8605);_0x2a91ef&&(_0x2a91ef[_0x1a9d95(0x135)]=!![]);}return;}if(!_0x3e8605)return;for(const _0x56a395 of _0x6781f9){String(_0x56a395[_0x1a9d95(0x132)]??'')[_0x1a9d95(0x138)]()===_0x3e8605&&(_0x56a395['isCurrent']=!![]);}}
@@ -1 +1 @@
1
- const a8_0xb1a0ae=a8_0xb4fa;(function(_0x1e7a45,_0x2087c5){const _0x28908e=a8_0xb4fa,_0x3f438f=_0x1e7a45();while(!![]){try{const _0xea5a2a=parseInt(_0x28908e(0xad))/0x1+-parseInt(_0x28908e(0xb1))/0x2+-parseInt(_0x28908e(0xaf))/0x3+parseInt(_0x28908e(0xb8))/0x4*(-parseInt(_0x28908e(0xb3))/0x5)+parseInt(_0x28908e(0xb9))/0x6*(-parseInt(_0x28908e(0xb4))/0x7)+-parseInt(_0x28908e(0xb0))/0x8+-parseInt(_0x28908e(0xaa))/0x9*(-parseInt(_0x28908e(0xb2))/0xa);if(_0xea5a2a===_0x2087c5)break;else _0x3f438f['push'](_0x3f438f['shift']());}catch(_0x2f5b8a){_0x3f438f['push'](_0x3f438f['shift']());}}}(a8_0x39fb,0x40d28));import{getRuntimeAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a8_0xb4fa(_0x1b46f3,_0x304aee){_0x1b46f3=_0x1b46f3-0xa9;const _0x39fb31=a8_0x39fb();let _0xb4fabe=_0x39fb31[_0x1b46f3];return _0xb4fabe;}export const appConfigGet={'service':'app-config','command':a8_0xb1a0ae(0xac),'description':'Get\x20one\x20runtime\x20app-config\x20value\x20by\x20key','risk':a8_0xb1a0ae(0xb5),'args':[{'name':a8_0xb1a0ae(0xba),'description':'App\x20config\x20key','required':!![]}],'flags':[],async 'execute'(_0x46dcd0){const _0x4c8096=a8_0xb1a0ae,_0x33a455=_0x46dcd0['args'][0x0]?.[_0x4c8096(0xab)]();if(!_0x33a455)throw CliErrors['validation']('Missing\x20app-config\x20key.','Usage:\x20'+CLI_BIN_NAME+'\x20app-config\x20get\x20<key>');try{const _0x349361=await getRuntimeAppConfigByKey(_0x46dcd0[_0x4c8096(0xbb)],_0x33a455);return{'ok':!![],'data':_0x349361};}catch{throw CliErrors[_0x4c8096(0xa9)](_0x4c8096(0xb7)+_0x33a455+_0x4c8096(0xae)+_0x46dcd0['appCode'],_0x4c8096(0xb6));}}};function a8_0x39fb(){const _0x1c1d18=['Unable\x20to\x20get\x20app-config\x20value:\x20key=','4NVwDTc','6hpsCIg','key','appCode','apiError','9Lfffdf','trim','get','108513PsGptm',',\x20appCode=','1054668vdOdkP','1427736pmPvqJ','596038weMxyd','13531470aJupcS','1220915dMAqMi','867461gltUFO','read','Check\x20that\x20the\x20key\x20exists,\x20the\x20current\x20AccessKey\x20has\x20permission,\x20and\x20the\x20runtime\x20app-config\x20endpoint\x20is\x20available.'];a8_0x39fb=function(){return _0x1c1d18;};return a8_0x39fb();}
1
+ const a8_0x5a523a=a8_0x49ef;(function(_0x155e4a,_0x1bd888){const _0xfc3b71=a8_0x49ef,_0xc058bb=_0x155e4a();while(!![]){try{const _0x53c0b1=-parseInt(_0xfc3b71(0x103))/0x1*(-parseInt(_0xfc3b71(0xf9))/0x2)+-parseInt(_0xfc3b71(0x101))/0x3+-parseInt(_0xfc3b71(0xf7))/0x4*(-parseInt(_0xfc3b71(0xf4))/0x5)+-parseInt(_0xfc3b71(0x109))/0x6*(parseInt(_0xfc3b71(0x105))/0x7)+parseInt(_0xfc3b71(0xff))/0x8*(-parseInt(_0xfc3b71(0x108))/0x9)+-parseInt(_0xfc3b71(0xf5))/0xa*(-parseInt(_0xfc3b71(0xfd))/0xb)+-parseInt(_0xfc3b71(0x102))/0xc*(-parseInt(_0xfc3b71(0x100))/0xd);if(_0x53c0b1===_0x1bd888)break;else _0xc058bb['push'](_0xc058bb['shift']());}catch(_0x5ac50b){_0xc058bb['push'](_0xc058bb['shift']());}}}(a8_0x367e,0x7fc6d));function a8_0x49ef(_0x36fddc,_0x37ea1e){_0x36fddc=_0x36fddc-0xf3;const _0x367e03=a8_0x367e();let _0x49efc4=_0x367e03[_0x36fddc];return _0x49efc4;}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':'get','description':'Get\x20one\x20runtime\x20app-config\x20value\x20by\x20key','risk':'read','args':[{'name':a8_0x5a523a(0xfc),'description':a8_0x5a523a(0x107),'required':!![]}],'flags':[],async 'execute'(_0x594ff3){const _0x46da24=a8_0x5a523a,_0x43e970=_0x594ff3[_0x46da24(0x104)][0x0]?.[_0x46da24(0xf6)]();if(!_0x43e970)throw CliErrors[_0x46da24(0xfa)](_0x46da24(0xfe),_0x46da24(0xf3)+CLI_BIN_NAME+_0x46da24(0xf8));try{const _0xddd734=await getRuntimeAppConfigByKey(_0x594ff3['appCode'],_0x43e970);return{'ok':!![],'data':_0xddd734};}catch{throw CliErrors[_0x46da24(0x10a)]('Unable\x20to\x20get\x20app-config\x20value:\x20key='+_0x43e970+_0x46da24(0xfb)+_0x594ff3[_0x46da24(0x106)],'Check\x20that\x20the\x20key\x20exists,\x20the\x20current\x20AccessKey\x20has\x20permission,\x20and\x20the\x20runtime\x20app-config\x20endpoint\x20is\x20available.');}}};function a8_0x367e(){const _0x5466c0=['App\x20config\x20key','63yWMYfP','36XrtwSM','apiError','Usage:\x20','25UMwDbt','50gxaYBN','trim','307316rZrsRL','\x20app-config\x20get\x20<key>','817746XwwSDd','validation',',\x20appCode=','key','18579FOCXvH','Missing\x20app-config\x20key.','1149128ULGPaf','13039qOuwlu','1972134yKphIq','12912eSRVDO','2NMcKsm','args','120547EIAsHJ','appCode'];a8_0x367e=function(){return _0x5466c0;};return a8_0x367e();}
@@ -1 +1 @@
1
- function a9_0x4b58(_0x2c1fe4,_0x60806d){_0x2c1fe4=_0x2c1fe4-0xf7;const _0x30e3be=a9_0x30e3();let _0x4b5885=_0x30e3be[_0x2c1fe4];return _0x4b5885;}(function(_0x25e6b6,_0x52f106){const _0x3f34cf=a9_0x4b58,_0x859270=_0x25e6b6();while(!![]){try{const _0x1168a2=parseInt(_0x3f34cf(0xfb))/0x1*(-parseInt(_0x3f34cf(0xf8))/0x2)+parseInt(_0x3f34cf(0x100))/0x3+-parseInt(_0x3f34cf(0xf7))/0x4*(parseInt(_0x3f34cf(0xfe))/0x5)+parseInt(_0x3f34cf(0xfa))/0x6*(-parseInt(_0x3f34cf(0xf9))/0x7)+-parseInt(_0x3f34cf(0x101))/0x8*(-parseInt(_0x3f34cf(0xfc))/0x9)+parseInt(_0x3f34cf(0x102))/0xa+-parseInt(_0x3f34cf(0xfd))/0xb*(parseInt(_0x3f34cf(0xff))/0xc);if(_0x1168a2===_0x52f106)break;else _0x859270['push'](_0x859270['shift']());}catch(_0x367664){_0x859270['push'](_0x859270['shift']());}}}(a9_0x30e3,0xe0fa5));function a9_0x30e3(){const _0xa0e174=['2912555lDNjjj','243804VJjvkB','5418372FNrppK','280AtDexQ','17822460EECkEQ','4dCDnzk','4ZnvrHb','70bVgbgi','495366WbFxRm','904137CjgxsH','313713leKPGB','363nsNTPB'];a9_0x30e3=function(){return _0xa0e174;};return a9_0x30e3();}import{appConfigGet}from'../../commands/app-config/get.js';export const appConfigDefinitions=[appConfigGet];
1
+ function a9_0x2125(_0xb2dd85,_0xbe2144){_0xb2dd85=_0xb2dd85-0x199;const _0x5c427b=a9_0x5c42();let _0x21258f=_0x5c427b[_0xb2dd85];return _0x21258f;}(function(_0x1c3b72,_0x4a52c2){const _0x5d0740=a9_0x2125,_0x5e28ab=_0x1c3b72();while(!![]){try{const _0x2a4663=parseInt(_0x5d0740(0x19c))/0x1+-parseInt(_0x5d0740(0x1a0))/0x2+parseInt(_0x5d0740(0x1a3))/0x3+-parseInt(_0x5d0740(0x19b))/0x4*(parseInt(_0x5d0740(0x19e))/0x5)+parseInt(_0x5d0740(0x199))/0x6*(-parseInt(_0x5d0740(0x19a))/0x7)+parseInt(_0x5d0740(0x19f))/0x8*(parseInt(_0x5d0740(0x1a1))/0x9)+parseInt(_0x5d0740(0x19d))/0xa*(parseInt(_0x5d0740(0x1a2))/0xb);if(_0x2a4663===_0x4a52c2)break;else _0x5e28ab['push'](_0x5e28ab['shift']());}catch(_0x41fc7c){_0x5e28ab['push'](_0x5e28ab['shift']());}}}(a9_0x5c42,0x316ce));import{appConfigGet}from'../../commands/app-config/get.js';function a9_0x5c42(){const _0x523528=['12691XQKraj','10aYtaQm','430720JlwDcE','184FiLWRH','652988BrijZo','58122QOlpoQ','7254643AHSjkI','864843qIELPx','6BsnOMG','2251529TXjcnt','12Yshlzg'];a9_0x5c42=function(){return _0x523528;};return a9_0x5c42();}export const appConfigDefinitions=[appConfigGet];
@@ -1 +1 @@
1
- const a10_0x1ccc8b=a10_0x2eaa;(function(_0x1d65d9,_0x33c6d9){const _0x243e48=a10_0x2eaa,_0x222be0=_0x1d65d9();while(!![]){try{const _0x259014=-parseInt(_0x243e48(0x208))/0x1*(-parseInt(_0x243e48(0x1f8))/0x2)+-parseInt(_0x243e48(0x1ed))/0x3*(parseInt(_0x243e48(0x1f4))/0x4)+parseInt(_0x243e48(0x1ea))/0x5*(-parseInt(_0x243e48(0x205))/0x6)+-parseInt(_0x243e48(0x1f6))/0x7+-parseInt(_0x243e48(0x1f0))/0x8*(parseInt(_0x243e48(0x1e4))/0x9)+-parseInt(_0x243e48(0x212))/0xa*(parseInt(_0x243e48(0x215))/0xb)+parseInt(_0x243e48(0x21c))/0xc;if(_0x259014===_0x33c6d9)break;else _0x222be0['push'](_0x222be0['shift']());}catch(_0x645d5c){_0x222be0['push'](_0x222be0['shift']());}}}(a10_0xfddc,0xd8c19));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_0x437ffe}from'../../framework/dryrun.js';import{redactSensitiveValue}from'../../utils/redaction.js';import{parseLosslessJson}from'../../utils/lossless-json.js';const APP_CODE_FLAG={'name':a10_0x1ccc8b(0x1e9),'type':'string','description':a10_0x1ccc8b(0x1fe)},PAGE_FLAG={'name':a10_0x1ccc8b(0x1ef),'type':a10_0x1ccc8b(0x20d),'default':0x1,'description':'One-based\x20todo\x20page\x20number'},PAGE_SIZE_FLAG={'name':'page-size','type':a10_0x1ccc8b(0x20d),'default':0x14,'description':a10_0x1ccc8b(0x200)},TASK_ID_FLAG={'name':'task-id','type':a10_0x1ccc8b(0x1f5),'required':!![],'description':a10_0x1ccc8b(0x1e7)},COMMENT_FLAG={'name':a10_0x1ccc8b(0x219),'type':a10_0x1ccc8b(0x1f5),'description':a10_0x1ccc8b(0x1eb)},VARIABLES_FLAG={'name':a10_0x1ccc8b(0x1f2),'type':'string','description':'Workflow\x20variables\x20as\x20JSON\x20or\x20@path/to/variables.json'},TARGET_USER_ID_FLAG={'name':a10_0x1ccc8b(0x201),'type':a10_0x1ccc8b(0x1f5),'required':!![],'description':'Target\x20user\x20ID\x20selected\x20from\x20Runtime\x20transfer\x20candidates'};function requireApprovalAppCode(_0x7266c2){const _0x230721=a10_0x1ccc8b,_0xdcac0=(_0x7266c2[_0x230721(0x202)](_0x230721(0x1e9))||_0x7266c2['mergedCli']?.[_0x230721(0x1f9)]||_0x7266c2[_0x230721(0x1f9)]||'')[_0x230721(0x1e6)]();if(!_0xdcac0)throw CliErrors[_0x230721(0x213)]('Set\x20--app-code,\x20--appcode,\x20or\x20an\x20active\x20app\x20in\x20the\x20workspace\x20configuration.');return _0xdcac0;}function requireTaskId(_0x4001f9){const _0x3fdc8b=a10_0x1ccc8b,_0x3a4031=_0x4001f9['str']('task-id')['trim']();if(!_0x3a4031)throw CliErrors[_0x3fdc8b(0x1e8)](_0x3fdc8b(0x217));return _0x3a4031;}function validatePage(_0x58d29a){const _0x24d9d6=a10_0x1ccc8b,_0x3a25ea=_0x58d29a[_0x24d9d6(0x218)]('page',0x1),_0xf72faf=_0x58d29a[_0x24d9d6(0x218)](_0x24d9d6(0x216),0x14);if(!Number['isSafeInteger'](_0x3a25ea)||_0x3a25ea<0x1)throw CliErrors[_0x24d9d6(0x1e8)](_0x24d9d6(0x21a));if(!Number['isSafeInteger'](_0xf72faf)||_0xf72faf<0x1)throw CliErrors['validation']('--page-size\x20must\x20be\x20a\x20positive\x20integer.');}function a10_0x2eaa(_0x2ebd49,_0x37d30e){_0x2ebd49=_0x2ebd49-0x1e3;const _0xfddcd7=a10_0xfddc();let _0x2eaab2=_0xfddcd7[_0x2ebd49];return _0x2eaab2;}function readVariables(_0x472ed9){const _0x59a869=a10_0x1ccc8b,_0x443eef=_0x472ed9[_0x59a869(0x202)](_0x59a869(0x1f2))[_0x59a869(0x1e6)]();if(!_0x443eef)return undefined;let _0x374740=_0x443eef;if(_0x443eef[_0x59a869(0x1ff)]('@')){const _0x302f4d=_0x443eef['slice'](0x1)[_0x59a869(0x1e6)]();if(!_0x302f4d)throw CliErrors[_0x59a869(0x1e8)](_0x59a869(0x210));try{_0x374740=readFileSync(resolve(_0x302f4d),_0x59a869(0x20b));}catch{throw CliErrors['validation'](_0x59a869(0x1ec));}}let _0x510edd;try{_0x510edd=parseLosslessJson(_0x374740);}catch{throw CliErrors[_0x59a869(0x1e8)]('--variables\x20must\x20contain\x20valid\x20JSON.');}if(!_0x510edd||typeof _0x510edd!==_0x59a869(0x1fb)||Array['isArray'](_0x510edd))throw CliErrors[_0x59a869(0x1e8)](_0x59a869(0x207));return _0x510edd;}function approvalBody(_0x219222,_0x2afc4c){const _0x22333a=a10_0x1ccc8b,_0x329234={'appCode':requireApprovalAppCode(_0x219222),'taskId':requireTaskId(_0x219222),'approved':_0x2afc4c},_0x342b0a=_0x219222['str']('comment'),_0x57b179=readVariables(_0x219222);if(_0x342b0a)_0x329234[_0x22333a(0x219)]=_0x342b0a;if(_0x57b179!==undefined)_0x329234['variables']=_0x57b179;return _0x329234;}function transferBody(_0x1c88ea){const _0x1fc278=a10_0x1ccc8b,_0xe23232=requireTaskId(_0x1c88ea),_0x4c538b=_0x1c88ea[_0x1fc278(0x202)](_0x1fc278(0x201))[_0x1fc278(0x1e6)]();if(!_0x4c538b)throw CliErrors['validation']('--target-user-id\x20must\x20not\x20be\x20blank.');const _0x293248={'appCode':requireApprovalAppCode(_0x1c88ea),'taskId':_0xe23232,'targetUserId':_0x4c538b},_0x29bb12=_0x1c88ea[_0x1fc278(0x202)](_0x1fc278(0x219));if(_0x29bb12)_0x293248[_0x1fc278(0x219)]=_0x29bb12;return _0x293248;}function sanitized(_0xd21539){return redactSensitiveValue(_0xd21539);}const approvalTodo={'service':a10_0x1ccc8b(0x204),'command':a10_0x1ccc8b(0x21b),'description':a10_0x1ccc8b(0x1e3),'risk':a10_0x1ccc8b(0x20f),'requiresAppCode':![],'flags':[APP_CODE_FLAG,PAGE_FLAG,PAGE_SIZE_FLAG],async 'validate'(_0x4a75f2){requireApprovalAppCode(_0x4a75f2),validatePage(_0x4a75f2);},async 'execute'(_0x1c4066){const _0xf7a768=a10_0x1ccc8b,_0x34d9a7=requireApprovalAppCode(_0x1c4066),_0x2b2c31=await listApprovalTodo(_0x34d9a7,_0x1c4066[_0xf7a768(0x218)](_0xf7a768(0x1ef),0x1),_0x1c4066[_0xf7a768(0x218)](_0xf7a768(0x216),0x14));return{'ok':!![],'data':sanitized(_0x2b2c31)};}},approvalTaskDetail={'service':a10_0x1ccc8b(0x204),'command':a10_0x1ccc8b(0x1fc),'description':'Show\x20an\x20approval\x20task\x20and\x20its\x20current\x20handling\x20permissions','risk':a10_0x1ccc8b(0x20f),'requiresAppCode':![],'flags':[APP_CODE_FLAG,TASK_ID_FLAG],async 'validate'(_0x37f7b7){requireApprovalAppCode(_0x37f7b7),requireTaskId(_0x37f7b7);},async 'execute'(_0x4131ed){const _0x6d99f3=requireTaskId(_0x4131ed),_0x55ebb7=await getApprovalTaskDetail(_0x6d99f3,requireApprovalAppCode(_0x4131ed));return{'ok':!![],'data':sanitized(_0x55ebb7)};}},approvalApprove={'service':'approval','command':'approve','description':'Approve\x20a\x20pending\x20Runtime\x20task','risk':a10_0x1ccc8b(0x214),'confirmationDescription':a10_0x1ccc8b(0x203),'requiresAppCode':![],'flags':[APP_CODE_FLAG,TASK_ID_FLAG,COMMENT_FLAG,VARIABLES_FLAG],async 'validate'(_0x6c83dc){approvalBody(_0x6c83dc,!![]);},async 'execute'(_0x23de43){const _0x56c998=a10_0x1ccc8b,_0x1f700d=approvalBody(_0x23de43,!![]),_0x150188=await approveApprovalTask(_0x1f700d);return{'ok':!![],'data':sanitized(_0x150188),'message':_0x56c998(0x20c)+_0x1f700d[_0x56c998(0x1e5)]};},async 'dryRun'(_0x931070){const _0x499c6b=a10_0x1ccc8b,_0x16d990=approvalBody(_0x931070,!![]);return a10_0x437ffe(_0x499c6b(0x1fd),'/client/flow/approve')[_0x499c6b(0x1ee)](sanitized(_0x16d990))[_0x499c6b(0x1f1)](_0x499c6b(0x1fa))['build']();}},approvalReject={'service':a10_0x1ccc8b(0x204),'command':'reject','description':'Reject\x20a\x20pending\x20Runtime\x20task','risk':a10_0x1ccc8b(0x214),'confirmationDescription':'Rejects\x20the\x20pending\x20Runtime\x20task\x20and\x20applies\x20the\x20workflow\x20rejection\x20path.\x20This\x20action\x20may\x20end\x20the\x20workflow\x20or\x20trigger\x20downstream\x20business\x20side\x20effects.','requiresAppCode':![],'flags':[APP_CODE_FLAG,TASK_ID_FLAG,COMMENT_FLAG,VARIABLES_FLAG],async 'validate'(_0x190c09){approvalBody(_0x190c09,![]);},async 'execute'(_0x524012){const _0x2a1314=a10_0x1ccc8b,_0x5537a1=approvalBody(_0x524012,![]),_0x367660=await approveApprovalTask(_0x5537a1);return{'ok':!![],'data':sanitized(_0x367660),'message':_0x2a1314(0x1f3)+_0x5537a1[_0x2a1314(0x1e5)]};},async 'dryRun'(_0x372357){const _0x1c8aef=a10_0x1ccc8b,_0x2f77c4=approvalBody(_0x372357,![]);return a10_0x437ffe(_0x1c8aef(0x1fd),_0x1c8aef(0x211))[_0x1c8aef(0x1ee)](sanitized(_0x2f77c4))[_0x1c8aef(0x1f1)]('Preview:\x20reject\x20an\x20approval\x20task')[_0x1c8aef(0x206)]();}},approvalTransfer={'service':'approval','command':a10_0x1ccc8b(0x209),'description':a10_0x1ccc8b(0x20e),'risk':a10_0x1ccc8b(0x214),'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'(_0xf78e08){transferBody(_0xf78e08);},async 'execute'(_0x7a3a2a){const _0x2488d8=a10_0x1ccc8b,_0x5825b8=transferBody(_0x7a3a2a),_0xd9d42f=await transferApprovalTask(_0x5825b8);return{'ok':!![],'data':sanitized(_0xd9d42f),'message':_0x2488d8(0x20a)+_0x5825b8[_0x2488d8(0x1e5)]};},async 'dryRun'(_0x3be615){const _0x104c1e=a10_0x1ccc8b,_0x3d181c=transferBody(_0x3be615);return a10_0x437ffe(_0x104c1e(0x1fd),_0x104c1e(0x1f7))[_0x104c1e(0x1ee)](sanitized(_0x3d181c))[_0x104c1e(0x1f1)]('Preview:\x20transfer\x20an\x20approval\x20task')[_0x104c1e(0x206)]();}};function a10_0xfddc(){const _0x4ddc73=['transfer','Transferred\x20approval\x20task\x20','utf8','Approved\x20approval\x20task\x20','number','Transfer\x20a\x20pending\x20Runtime\x20task\x20to\x20an\x20allowed\x20user','read','--variables\x20@file\x20path\x20must\x20not\x20be\x20blank.','/client/flow/approve','44120MeLBrL','configMissing','high-risk-write','1606eHebaJ','page-size','--task-id\x20must\x20not\x20be\x20blank.','num','comment','--page\x20must\x20be\x20a\x20positive\x20integer.','todo','66628644SmSfbI','List\x20the\x20current\x20user\x27s\x20approval\x20todo\x20tasks','135DqiKgd','taskId','trim','Runtime\x20approval\x20task\x20ID','validation','app-code','162935jCLxlI','Approval\x20or\x20transfer\x20comment','Unable\x20to\x20read\x20--variables\x20file.','3jDdVef','body','page','775704dAWsIK','description','variables','Rejected\x20approval\x20task\x20','3485012isGtWr','string','11716012FdgXdo','/client/flow/task/transfer','38aJOBOg','appCode','Preview:\x20approve\x20an\x20approval\x20task','object','task-detail','POST','Application\x20code\x20(falls\x20back\x20to\x20the\x20active\x20workspace\x20app)','startsWith','Number\x20of\x20todo\x20records\x20per\x20page','target-user-id','str','Approves\x20the\x20pending\x20Runtime\x20task\x20and\x20advances\x20its\x20workflow.\x20This\x20action\x20may\x20trigger\x20downstream\x20nodes\x20and\x20business\x20side\x20effects.','approval','150bmPLcf','build','--variables\x20must\x20be\x20a\x20JSON\x20object.','41773zqvzYB'];a10_0xfddc=function(){return _0x4ddc73;};return a10_0xfddc();}export const approvalDefinitions=[approvalTodo,approvalTaskDetail,approvalApprove,approvalReject,approvalTransfer];export{approvalApprove,approvalReject,approvalTaskDetail,approvalTodo,approvalTransfer};
1
+ const a10_0x2b68bb=a10_0x375d;(function(_0x515090,_0x17bffa){const _0x4f08ab=a10_0x375d,_0xe4e6ec=_0x515090();while(!![]){try{const _0x3dd3df=parseInt(_0x4f08ab(0x1d9))/0x1*(-parseInt(_0x4f08ab(0x208))/0x2)+parseInt(_0x4f08ab(0x1d0))/0x3+-parseInt(_0x4f08ab(0x1cf))/0x4*(parseInt(_0x4f08ab(0x202))/0x5)+-parseInt(_0x4f08ab(0x1c6))/0x6+-parseInt(_0x4f08ab(0x1ec))/0x7*(-parseInt(_0x4f08ab(0x1ed))/0x8)+-parseInt(_0x4f08ab(0x207))/0x9+parseInt(_0x4f08ab(0x20d))/0xa;if(_0x3dd3df===_0x17bffa)break;else _0xe4e6ec['push'](_0xe4e6ec['shift']());}catch(_0x45e083){_0xe4e6ec['push'](_0xe4e6ec['shift']());}}}(a10_0x49c3,0xe6618));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_0xa6da00}from'../../framework/dryrun.js';import{redactSensitiveValue}from'../../utils/redaction.js';import{parseLosslessJson}from'../../utils/lossless-json.js';const APP_CODE_FLAG={'name':a10_0x2b68bb(0x1f1),'type':a10_0x2b68bb(0x1ce),'description':a10_0x2b68bb(0x1e5)},PAGE_FLAG={'name':a10_0x2b68bb(0x1e8),'type':a10_0x2b68bb(0x1c8),'default':0x1,'description':a10_0x2b68bb(0x1f9)},PAGE_SIZE_FLAG={'name':a10_0x2b68bb(0x1e9),'type':a10_0x2b68bb(0x1c8),'default':0x14,'description':a10_0x2b68bb(0x209)},TASK_ID_FLAG={'name':a10_0x2b68bb(0x1fe),'type':a10_0x2b68bb(0x1ce),'required':!![],'description':a10_0x2b68bb(0x201)},COMMENT_FLAG={'name':a10_0x2b68bb(0x1ca),'type':a10_0x2b68bb(0x1ce),'description':a10_0x2b68bb(0x1e1)},VARIABLES_FLAG={'name':a10_0x2b68bb(0x1f3),'type':a10_0x2b68bb(0x1ce),'description':a10_0x2b68bb(0x1f4)},TARGET_USER_ID_FLAG={'name':a10_0x2b68bb(0x1d3),'type':a10_0x2b68bb(0x1ce),'required':!![],'description':a10_0x2b68bb(0x206)};function requireApprovalAppCode(_0x3a54ec){const _0x5d2785=a10_0x2b68bb,_0xca8998=(_0x3a54ec['str'](_0x5d2785(0x1f1))||_0x3a54ec[_0x5d2785(0x1fa)]?.['appCode']||_0x3a54ec[_0x5d2785(0x1d7)]||'')[_0x5d2785(0x1d6)]();if(!_0xca8998)throw CliErrors[_0x5d2785(0x1fd)](_0x5d2785(0x1f8));return _0xca8998;}function a10_0x49c3(){const _0x6dce81=['Rejects\x20the\x20pending\x20Runtime\x20task\x20and\x20applies\x20the\x20workflow\x20rejection\x20path.\x20This\x20action\x20may\x20end\x20the\x20workflow\x20or\x20trigger\x20downstream\x20business\x20side\x20effects.','POST','string','7151180TbXXwa','2646153QKEUZy','Transfer\x20a\x20pending\x20Runtime\x20task\x20to\x20an\x20allowed\x20user','Unable\x20to\x20read\x20--variables\x20file.','target-user-id','taskId','task-detail','trim','appCode','Reject\x20a\x20pending\x20Runtime\x20task','1129427fNUzrY','Approve\x20a\x20pending\x20Runtime\x20task','high-risk-write','slice','approval','description','isSafeInteger','--task-id\x20must\x20not\x20be\x20blank.','Approval\x20or\x20transfer\x20comment','--variables\x20must\x20be\x20a\x20JSON\x20object.','List\x20the\x20current\x20user\x27s\x20approval\x20todo\x20tasks','body','Application\x20code\x20(falls\x20back\x20to\x20the\x20active\x20workspace\x20app)','Transfers\x20the\x20pending\x20Runtime\x20task\x20to\x20the\x20selected\x20eligible\x20user.\x20The\x20current\x20handler\x20may\x20lose\x20permission\x20to\x20process\x20the\x20task.','str','page','page-size','num','utf8','346339uYNoYe','216cMtwSx','--target-user-id\x20must\x20not\x20be\x20blank.','Approves\x20the\x20pending\x20Runtime\x20task\x20and\x20advances\x20its\x20workflow.\x20This\x20action\x20may\x20trigger\x20downstream\x20nodes\x20and\x20business\x20side\x20effects.','Preview:\x20reject\x20an\x20approval\x20task','app-code','Rejected\x20approval\x20task\x20','variables','Workflow\x20variables\x20as\x20JSON\x20or\x20@path/to/variables.json','--page-size\x20must\x20be\x20a\x20positive\x20integer.','--page\x20must\x20be\x20a\x20positive\x20integer.','todo','Set\x20--app-code,\x20--appcode,\x20or\x20an\x20active\x20app\x20in\x20the\x20workspace\x20configuration.','One-based\x20todo\x20page\x20number','mergedCli','/client/flow/approve','Approved\x20approval\x20task\x20','configMissing','task-id','startsWith','read','Runtime\x20approval\x20task\x20ID','5AZFIMQ','--variables\x20must\x20contain\x20valid\x20JSON.','build','reject','Target\x20user\x20ID\x20selected\x20from\x20Runtime\x20transfer\x20candidates','11684394wuSjye','2zXdiut','Number\x20of\x20todo\x20records\x20per\x20page','validation','Preview:\x20approve\x20an\x20approval\x20task','Transferred\x20approval\x20task\x20','45306310MftYbs','9536598jCJJCf','Show\x20an\x20approval\x20task\x20and\x20its\x20current\x20handling\x20permissions','number','--variables\x20@file\x20path\x20must\x20not\x20be\x20blank.','comment','/client/flow/task/transfer'];a10_0x49c3=function(){return _0x6dce81;};return a10_0x49c3();}function requireTaskId(_0x59ce9d){const _0x234348=a10_0x2b68bb,_0x55405d=_0x59ce9d[_0x234348(0x1e7)](_0x234348(0x1fe))[_0x234348(0x1d6)]();if(!_0x55405d)throw CliErrors[_0x234348(0x20a)](_0x234348(0x1e0));return _0x55405d;}function validatePage(_0x1aaf2c){const _0x50df61=a10_0x2b68bb,_0x5825a4=_0x1aaf2c[_0x50df61(0x1ea)](_0x50df61(0x1e8),0x1),_0x44d81d=_0x1aaf2c[_0x50df61(0x1ea)](_0x50df61(0x1e9),0x14);if(!Number[_0x50df61(0x1df)](_0x5825a4)||_0x5825a4<0x1)throw CliErrors[_0x50df61(0x20a)](_0x50df61(0x1f6));if(!Number[_0x50df61(0x1df)](_0x44d81d)||_0x44d81d<0x1)throw CliErrors['validation'](_0x50df61(0x1f5));}function a10_0x375d(_0xaad4d,_0x1a571c){_0xaad4d=_0xaad4d-0x1c6;const _0x49c368=a10_0x49c3();let _0x375d12=_0x49c368[_0xaad4d];return _0x375d12;}function readVariables(_0xe0f525){const _0x1e3f15=a10_0x2b68bb,_0x3f5904=_0xe0f525[_0x1e3f15(0x1e7)]('variables')[_0x1e3f15(0x1d6)]();if(!_0x3f5904)return undefined;let _0x357c23=_0x3f5904;if(_0x3f5904[_0x1e3f15(0x1ff)]('@')){const _0x179aba=_0x3f5904[_0x1e3f15(0x1dc)](0x1)[_0x1e3f15(0x1d6)]();if(!_0x179aba)throw CliErrors[_0x1e3f15(0x20a)](_0x1e3f15(0x1c9));try{_0x357c23=readFileSync(resolve(_0x179aba),_0x1e3f15(0x1eb));}catch{throw CliErrors[_0x1e3f15(0x20a)](_0x1e3f15(0x1d2));}}let _0x5b59bb;try{_0x5b59bb=parseLosslessJson(_0x357c23);}catch{throw CliErrors['validation'](_0x1e3f15(0x203));}if(!_0x5b59bb||typeof _0x5b59bb!=='object'||Array['isArray'](_0x5b59bb))throw CliErrors['validation'](_0x1e3f15(0x1e2));return _0x5b59bb;}function approvalBody(_0xefd032,_0x2ffe9c){const _0x2dd07f=a10_0x2b68bb,_0x5c3c11={'appCode':requireApprovalAppCode(_0xefd032),'taskId':requireTaskId(_0xefd032),'approved':_0x2ffe9c},_0x1d2a31=_0xefd032[_0x2dd07f(0x1e7)]('comment'),_0x51956f=readVariables(_0xefd032);if(_0x1d2a31)_0x5c3c11[_0x2dd07f(0x1ca)]=_0x1d2a31;if(_0x51956f!==undefined)_0x5c3c11[_0x2dd07f(0x1f3)]=_0x51956f;return _0x5c3c11;}function transferBody(_0x1983b9){const _0x5ccfb2=a10_0x2b68bb,_0x4d06a5=requireTaskId(_0x1983b9),_0x352e01=_0x1983b9[_0x5ccfb2(0x1e7)]('target-user-id')[_0x5ccfb2(0x1d6)]();if(!_0x352e01)throw CliErrors[_0x5ccfb2(0x20a)](_0x5ccfb2(0x1ee));const _0x3f4411={'appCode':requireApprovalAppCode(_0x1983b9),'taskId':_0x4d06a5,'targetUserId':_0x352e01},_0x507ea5=_0x1983b9[_0x5ccfb2(0x1e7)]('comment');if(_0x507ea5)_0x3f4411[_0x5ccfb2(0x1ca)]=_0x507ea5;return _0x3f4411;}function sanitized(_0x391d1f){return redactSensitiveValue(_0x391d1f);}const approvalTodo={'service':a10_0x2b68bb(0x1dd),'command':a10_0x2b68bb(0x1f7),'description':a10_0x2b68bb(0x1e3),'risk':a10_0x2b68bb(0x200),'requiresAppCode':![],'flags':[APP_CODE_FLAG,PAGE_FLAG,PAGE_SIZE_FLAG],async 'validate'(_0x3e2746){requireApprovalAppCode(_0x3e2746),validatePage(_0x3e2746);},async 'execute'(_0x51c3be){const _0x2137ac=a10_0x2b68bb,_0x5a6a89=requireApprovalAppCode(_0x51c3be),_0x5aeee5=await listApprovalTodo(_0x5a6a89,_0x51c3be[_0x2137ac(0x1ea)](_0x2137ac(0x1e8),0x1),_0x51c3be[_0x2137ac(0x1ea)](_0x2137ac(0x1e9),0x14));return{'ok':!![],'data':sanitized(_0x5aeee5)};}},approvalTaskDetail={'service':'approval','command':a10_0x2b68bb(0x1d5),'description':a10_0x2b68bb(0x1c7),'risk':a10_0x2b68bb(0x200),'requiresAppCode':![],'flags':[APP_CODE_FLAG,TASK_ID_FLAG],async 'validate'(_0x190eae){requireApprovalAppCode(_0x190eae),requireTaskId(_0x190eae);},async 'execute'(_0x2391c3){const _0x191504=requireTaskId(_0x2391c3),_0x890ccf=await getApprovalTaskDetail(_0x191504,requireApprovalAppCode(_0x2391c3));return{'ok':!![],'data':sanitized(_0x890ccf)};}},approvalApprove={'service':'approval','command':'approve','description':a10_0x2b68bb(0x1da),'risk':a10_0x2b68bb(0x1db),'confirmationDescription':a10_0x2b68bb(0x1ef),'requiresAppCode':![],'flags':[APP_CODE_FLAG,TASK_ID_FLAG,COMMENT_FLAG,VARIABLES_FLAG],async 'validate'(_0x425bb2){approvalBody(_0x425bb2,!![]);},async 'execute'(_0x456ece){const _0x5e92c4=a10_0x2b68bb,_0x2eb7b0=approvalBody(_0x456ece,!![]),_0x4500b8=await approveApprovalTask(_0x2eb7b0);return{'ok':!![],'data':sanitized(_0x4500b8),'message':_0x5e92c4(0x1fc)+_0x2eb7b0[_0x5e92c4(0x1d4)]};},async 'dryRun'(_0x4a589d){const _0x24b65c=a10_0x2b68bb,_0x302d02=approvalBody(_0x4a589d,!![]);return a10_0xa6da00(_0x24b65c(0x1cd),_0x24b65c(0x1fb))[_0x24b65c(0x1e4)](sanitized(_0x302d02))[_0x24b65c(0x1de)](_0x24b65c(0x20b))[_0x24b65c(0x204)]();}},approvalReject={'service':a10_0x2b68bb(0x1dd),'command':a10_0x2b68bb(0x205),'description':a10_0x2b68bb(0x1d8),'risk':a10_0x2b68bb(0x1db),'confirmationDescription':a10_0x2b68bb(0x1cc),'requiresAppCode':![],'flags':[APP_CODE_FLAG,TASK_ID_FLAG,COMMENT_FLAG,VARIABLES_FLAG],async 'validate'(_0x3f49f1){approvalBody(_0x3f49f1,![]);},async 'execute'(_0x310254){const _0x5517f5=a10_0x2b68bb,_0x35bdb8=approvalBody(_0x310254,![]),_0x3888eb=await approveApprovalTask(_0x35bdb8);return{'ok':!![],'data':sanitized(_0x3888eb),'message':_0x5517f5(0x1f2)+_0x35bdb8[_0x5517f5(0x1d4)]};},async 'dryRun'(_0x48eedf){const _0x4bb2a0=a10_0x2b68bb,_0x365c10=approvalBody(_0x48eedf,![]);return a10_0xa6da00(_0x4bb2a0(0x1cd),_0x4bb2a0(0x1fb))[_0x4bb2a0(0x1e4)](sanitized(_0x365c10))[_0x4bb2a0(0x1de)](_0x4bb2a0(0x1f0))[_0x4bb2a0(0x204)]();}},approvalTransfer={'service':'approval','command':'transfer','description':a10_0x2b68bb(0x1d1),'risk':'high-risk-write','confirmationDescription':a10_0x2b68bb(0x1e6),'requiresAppCode':![],'flags':[APP_CODE_FLAG,TASK_ID_FLAG,TARGET_USER_ID_FLAG,COMMENT_FLAG],async 'validate'(_0x4564f0){transferBody(_0x4564f0);},async 'execute'(_0x5b439a){const _0x18b277=a10_0x2b68bb,_0x4b6efb=transferBody(_0x5b439a),_0x195b2a=await transferApprovalTask(_0x4b6efb);return{'ok':!![],'data':sanitized(_0x195b2a),'message':_0x18b277(0x20c)+_0x4b6efb['taskId']};},async 'dryRun'(_0x14445d){const _0x4218c6=a10_0x2b68bb,_0x395079=transferBody(_0x14445d);return a10_0xa6da00(_0x4218c6(0x1cd),_0x4218c6(0x1cb))[_0x4218c6(0x1e4)](sanitized(_0x395079))[_0x4218c6(0x1de)]('Preview:\x20transfer\x20an\x20approval\x20task')['build']();}};export const approvalDefinitions=[approvalTodo,approvalTaskDetail,approvalApprove,approvalReject,approvalTransfer];export{approvalApprove,approvalReject,approvalTaskDetail,approvalTodo,approvalTransfer};
@@ -1 +1 @@
1
- const a11_0x307eb2=a11_0x3eed;(function(_0x133dc2,_0x28c3b6){const _0x1a1d4a=a11_0x3eed,_0x3a61da=_0x133dc2();while(!![]){try{const _0x16055f=-parseInt(_0x1a1d4a(0xc8))/0x1*(-parseInt(_0x1a1d4a(0x91))/0x2)+parseInt(_0x1a1d4a(0xa4))/0x3*(parseInt(_0x1a1d4a(0xa1))/0x4)+parseInt(_0x1a1d4a(0x9a))/0x5+parseInt(_0x1a1d4a(0xc7))/0x6*(parseInt(_0x1a1d4a(0xa9))/0x7)+parseInt(_0x1a1d4a(0xb6))/0x8+parseInt(_0x1a1d4a(0x93))/0x9*(-parseInt(_0x1a1d4a(0x89))/0xa)+-parseInt(_0x1a1d4a(0x95))/0xb;if(_0x16055f===_0x28c3b6)break;else _0x3a61da['push'](_0x3a61da['shift']());}catch(_0x4441d0){_0x3a61da['push'](_0x3a61da['shift']());}}}(a11_0x25be,0x5f6bb));import{existsSync,readFileSync,statSync}from'node:fs';import{createRuntimeArtifact,getRuntimeArtifact,listRuntimeArtifacts,updateRuntimeArtifact}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';function a11_0x25be(){const _0x2c6085=['num','metadata','.\x20Unsupported:\x20','3573104Tkgywi','POST','Updated\x20Artifact\x20','filter','react_module\x20must\x20be\x20an\x20embeddable\x20React\x20module,\x20not\x20full\x20HTML\x20or\x20a\x20ReactDOM/createRoot\x20mount\x20entry.','content','some','Path\x20to\x20a\x20local\x20UTF-8\x20React\x20module\x20source\x20file','antd','appCode','join','isFile','deleted','File\x20is\x20not\x20a\x20regular\x20file:\x20','utf8','artifactType','bool','30yStvYt','1PFHDCl','react_module','Artifact\x20ID','artifact','/client/artifact/','Show\x20one\x20Artifact\x20by\x20id','build','str','Optional\x20source\x20filter,\x20for\x20example\x20AGENT','Invalid\x20JSON\x20for\x20--metadata:\x20','test','compiledContent','boolean','/update','Preview:\x20update\x20react_module\x20Artifact\x20','10hkRijS','Preview:\x20create\x20react_module\x20Artifact','Update\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','flag','trim','react-dom','--metadata\x20must\x20be\x20a\x20JSON\x20object.','Artifact\x20display\x20name','1487034aEStpH','validation','919017WQOcoh','read','31654843VzYjbp','string','Artifact\x20source\x20file\x20is\x20blank.','source','react','3751405Bvwcxx','lodash','favorite','body','add','lastIndex','name','7516dctzcp','verbose','/client/artifact/create','1236GNKdRh','map','dayjs','update','updateTime','918519LlDhNe','create','length','File\x20path\x20is\x20required.','Create\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','Optional\x20favorite-state\x20filter','description','exec','createTime','split'];a11_0x25be=function(){return _0x2c6085;};return a11_0x25be();}import{dryRun}from'../../framework/dryrun.js';function a11_0x3eed(_0x18e14f,_0x55e013){_0x18e14f=_0x18e14f-0x81;const _0x25be80=a11_0x25be();let _0x3eedbd=_0x25be80[_0x18e14f];return _0x3eedbd;}const ARTIFACT_TYPE_REACT_MODULE=a11_0x307eb2(0xc9),ARTIFACT_SOURCE_AGENT='AGENT',ALLOWED_REACT_MODULE_IMPORTS=[a11_0x307eb2(0x99),a11_0x307eb2(0x8e),a11_0x307eb2(0x9b),a11_0x307eb2(0xa6),a11_0x307eb2(0xbe),'@ant-design/icons'];export const ALLOWED_REACT_MODULE_IMPORTS_TEXT=ALLOWED_REACT_MODULE_IMPORTS[a11_0x307eb2(0xc0)](',\x20');const IMPORT_SOURCE_PATTERNS=[/\bimport\s+(?:type\s+)?(?:[^'";]*?\s+from\s+)?["']([^"']+)["']/g,/\bexport\s+(?:type\s+)?[^'";]*?\s+from\s+["']([^"']+)["']/g,/\bimport\s*\(\s*["']([^"']+)["']\s*\)/g,/\brequire\s*\(\s*["']([^"']+)["']\s*\)/g],PAGE_LEVEL_PATTERNS=[/<!doctype\s+html/i,/<\s*html\b/i,/\bcreateRoot\s*\(/,/\bReactDOM\s*\.\s*render\s*\(/,/\bReactDOM\s*\.\s*createRoot\s*\(/],FILE_FLAG={'name':'file','type':a11_0x307eb2(0x96),'required':!![],'description':a11_0x307eb2(0xbd)},ARTIFACT_NAME_FLAG={'name':'name','type':a11_0x307eb2(0x96),'description':a11_0x307eb2(0x90)},METADATA_FLAG={'name':a11_0x307eb2(0xb4),'type':'string','description':'Artifact\x20metadata\x20as\x20JSON\x20object;\x20compiledContent\x20is\x20stripped'};function isPlainObject(_0x1ef562){return typeof _0x1ef562==='object'&&_0x1ef562!==null&&!Array['isArray'](_0x1ef562);}function readSourceFile(_0x12a907){const _0x5dc6e2=a11_0x307eb2;if(!_0x12a907)throw CliErrors[_0x5dc6e2(0x92)](_0x5dc6e2(0xac));if(!existsSync(_0x12a907))throw CliErrors[_0x5dc6e2(0x92)]('File\x20not\x20found:\x20'+_0x12a907);if(!statSync(_0x12a907)[_0x5dc6e2(0xc1)]())throw CliErrors['validation'](_0x5dc6e2(0xc3)+_0x12a907);const _0x1349cc=readFileSync(_0x12a907,_0x5dc6e2(0xc4));return validateReactModuleSource(_0x1349cc),_0x1349cc;}function parseMetadata(_0x431b6b){const _0x15d00f=a11_0x307eb2;if(!_0x431b6b)return undefined;let _0x4373d5;try{_0x4373d5=JSON['parse'](_0x431b6b);}catch{throw CliErrors[_0x15d00f(0x92)](_0x15d00f(0x83)+_0x431b6b);}if(!isPlainObject(_0x4373d5))throw CliErrors['validation'](_0x15d00f(0x8f));const _0x5e6cb0={..._0x4373d5};return delete _0x5e6cb0[_0x15d00f(0x85)],_0x5e6cb0;}function getPackageName(_0x52b5be){const _0x23d065=a11_0x307eb2;if(_0x52b5be['startsWith']('@')){const [_0x377e43,_0x5ed9f1]=_0x52b5be[_0x23d065(0xb2)]('/');return _0x377e43&&_0x5ed9f1?_0x377e43+'/'+_0x5ed9f1:_0x52b5be;}return _0x52b5be['split']('/')[0x0]||_0x52b5be;}function validateAllowedImports(_0x11eb06){const _0x2890a4=a11_0x307eb2,_0x362061=new Set();for(const _0x1d2ae5 of IMPORT_SOURCE_PATTERNS){_0x1d2ae5[_0x2890a4(0x9f)]=0x0;let _0x5819c3;while((_0x5819c3=_0x1d2ae5[_0x2890a4(0xb0)](_0x11eb06))!==null){const _0x44b8fc=_0x5819c3[0x1]?.[_0x2890a4(0x8d)]();_0x44b8fc&&_0x362061[_0x2890a4(0x9e)](_0x44b8fc);}}const _0x60c907=[..._0x362061][_0x2890a4(0xa5)](getPackageName)[_0x2890a4(0xb9)](_0x389b08=>!ALLOWED_REACT_MODULE_IMPORTS['includes'](_0x389b08));if(_0x60c907[_0x2890a4(0xab)]>0x0)throw CliErrors[_0x2890a4(0x92)]('react_module\x20imports\x20are\x20limited\x20to:\x20'+ALLOWED_REACT_MODULE_IMPORTS_TEXT+_0x2890a4(0xb5)+[...new Set(_0x60c907)][_0x2890a4(0xc0)](',\x20'));}export function validateReactModuleSource(_0x1e4fb9){const _0x552dfd=a11_0x307eb2;if(!_0x1e4fb9[_0x552dfd(0x8d)]())throw CliErrors[_0x552dfd(0x92)](_0x552dfd(0x97));if(PAGE_LEVEL_PATTERNS[_0x552dfd(0xbc)](_0x470b9e=>_0x470b9e[_0x552dfd(0x84)](_0x1e4fb9)))throw CliErrors[_0x552dfd(0x92)](_0x552dfd(0xba));validateAllowedImports(_0x1e4fb9);}function buildArtifactInput(_0x113ded){const _0x5bfbfd=a11_0x307eb2,_0x3eb286=readSourceFile(_0x113ded['str']('file')),_0x4639a9=_0x113ded[_0x5bfbfd(0x81)]('name')[_0x5bfbfd(0x8d)](),_0x477f66=parseMetadata(_0x113ded['str'](_0x5bfbfd(0xb4)));return{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x4639a9?{'name':_0x4639a9}:{},'content':_0x3eb286,..._0x477f66?{'metadata':_0x477f66}:{},'source':ARTIFACT_SOURCE_AGENT};}function summarizeArtifact(_0x1724de){const _0x890ab8=a11_0x307eb2;return{'id':_0x1724de['id'],'name':_0x1724de[_0x890ab8(0xa0)],'artifactType':_0x1724de['artifactType'],'source':_0x1724de['source'],'favorite':_0x1724de[_0x890ab8(0x9c)],'deleted':_0x1724de[_0x890ab8(0xc2)],'createTime':_0x1724de[_0x890ab8(0xb1)],'updateTime':_0x1724de[_0x890ab8(0xa8)]};}function detailArtifact(_0x3d91c2){const _0x461878=a11_0x307eb2;return{'id':_0x3d91c2['id'],'appCode':_0x3d91c2[_0x461878(0xbf)],'name':_0x3d91c2[_0x461878(0xa0)],'artifactType':_0x3d91c2[_0x461878(0xc5)],'source':_0x3d91c2[_0x461878(0x98)],'favorite':_0x3d91c2[_0x461878(0x9c)],'deleted':_0x3d91c2[_0x461878(0xc2)],'content':_0x3d91c2[_0x461878(0xbb)]??'','compiledContent':_0x3d91c2['compiledContent'],'metadata':_0x3d91c2['metadata']??{},'createTime':_0x3d91c2[_0x461878(0xb1)],'updateTime':_0x3d91c2[_0x461878(0xa8)]};}function readFavoriteFlag(_0x2af566){const _0x254a86=a11_0x307eb2,_0x34604f=_0x2af566[_0x254a86(0x8c)](_0x254a86(0x9c));return _0x34604f===undefined||_0x34604f===null||_0x34604f===''?undefined:_0x2af566[_0x254a86(0xc6)]('favorite');}const artifactList={'service':a11_0x307eb2(0xcb),'command':'list','description':'List\x20current-app\x20react_module\x20Artifacts','risk':'read','flags':[{'name':'source','type':a11_0x307eb2(0x96),'description':a11_0x307eb2(0x82)},{'name':'favorite','type':a11_0x307eb2(0x86),'description':a11_0x307eb2(0xae)},VERBOSE_FLAG],async 'execute'(_0x322b31){const _0x4e3f09=a11_0x307eb2,_0x3d3286=await listRuntimeArtifacts(_0x322b31['appCode'],{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x322b31[_0x4e3f09(0x81)](_0x4e3f09(0x98))?{'source':_0x322b31[_0x4e3f09(0x81)](_0x4e3f09(0x98))}:{},...readFavoriteFlag(_0x322b31)!==undefined?{'favorite':readFavoriteFlag(_0x322b31)}:{}});return{'ok':!![],'data':{'total':_0x3d3286['length'],'items':_0x322b31['bool'](_0x4e3f09(0xa2))?_0x3d3286:_0x3d3286[_0x4e3f09(0xa5)](summarizeArtifact)}};}},artifactDetail={'service':'artifact','command':'detail','description':a11_0x307eb2(0xcd),'risk':'read','flags':[{...ID_FLAG,'description':a11_0x307eb2(0xca)}],async 'execute'(_0xe8cf8a){const _0x3d420c=a11_0x307eb2,_0x278e3b=await getRuntimeArtifact(_0xe8cf8a[_0x3d420c(0xb3)]('id'),_0xe8cf8a[_0x3d420c(0xbf)]);return{'ok':!![],'data':detailArtifact(_0x278e3b)};}},artifactCreate={'service':a11_0x307eb2(0xcb),'command':a11_0x307eb2(0xaa),'description':a11_0x307eb2(0xad),'risk':a11_0x307eb2(0x94),'flags':[FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x276cf1){const _0x2fe76a=a11_0x307eb2,_0x3487f6=buildArtifactInput(_0x276cf1),_0xce6733=await createRuntimeArtifact(_0x276cf1[_0x2fe76a(0xbf)],_0x3487f6);return{'ok':!![],'data':detailArtifact(_0xce6733),'message':'Created\x20Artifact\x20'+_0xce6733['id']+(_0xce6733[_0x2fe76a(0xa0)]?'\x20('+_0xce6733[_0x2fe76a(0xa0)]+')':'')};},async 'dryRun'(_0x344aac){const _0x13ab09=a11_0x307eb2,_0xe3a83c=buildArtifactInput(_0x344aac);return dryRun(_0x13ab09(0xb7),_0x13ab09(0xa3))[_0x13ab09(0x9d)]({'appCode':_0x344aac[_0x13ab09(0xbf)],..._0xe3a83c})[_0x13ab09(0xaf)](_0x13ab09(0x8a))[_0x13ab09(0xce)]();}},artifactUpdate={'service':a11_0x307eb2(0xcb),'command':a11_0x307eb2(0xa7),'description':a11_0x307eb2(0x8b),'risk':a11_0x307eb2(0x94),'flags':[{...ID_FLAG,'description':a11_0x307eb2(0xca)},FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x16ce9e){const _0x24ddd6=a11_0x307eb2,_0x56f961=_0x16ce9e[_0x24ddd6(0xb3)]('id'),_0x1f520a=buildArtifactInput(_0x16ce9e),_0x1bae8a=await updateRuntimeArtifact(_0x56f961,_0x16ce9e[_0x24ddd6(0xbf)],_0x1f520a);return{'ok':!![],'data':detailArtifact(_0x1bae8a),'message':_0x24ddd6(0xb8)+_0x1bae8a['id']+(_0x1bae8a[_0x24ddd6(0xa0)]?'\x20('+_0x1bae8a[_0x24ddd6(0xa0)]+')':'')};},async 'dryRun'(_0x1b3637){const _0x472019=a11_0x307eb2,_0x5e3756=_0x1b3637['num']('id'),_0x1cc866=buildArtifactInput(_0x1b3637);return dryRun('POST',_0x472019(0xcc)+_0x5e3756+_0x472019(0x87))[_0x472019(0x9d)]({'appCode':_0x1b3637[_0x472019(0xbf)],..._0x1cc866})['description'](_0x472019(0x88)+_0x5e3756)[_0x472019(0xce)]();}};export const artifactDefinitions=[artifactList,artifactDetail,artifactCreate,artifactUpdate];
1
+ const a11_0x4c5923=a11_0xbf6f;(function(_0x2d4dcc,_0x5deb2a){const _0xcaa6c7=a11_0xbf6f,_0x47d55f=_0x2d4dcc();while(!![]){try{const _0x5f4de6=parseInt(_0xcaa6c7(0x16a))/0x1*(-parseInt(_0xcaa6c7(0x185))/0x2)+parseInt(_0xcaa6c7(0x14c))/0x3*(parseInt(_0xcaa6c7(0x16c))/0x4)+parseInt(_0xcaa6c7(0x153))/0x5+parseInt(_0xcaa6c7(0x16d))/0x6+-parseInt(_0xcaa6c7(0x171))/0x7+parseInt(_0xcaa6c7(0x17a))/0x8+parseInt(_0xcaa6c7(0x17b))/0x9*(-parseInt(_0xcaa6c7(0x148))/0xa);if(_0x5f4de6===_0x5deb2a)break;else _0x47d55f['push'](_0x47d55f['shift']());}catch(_0x5052c6){_0x47d55f['push'](_0x47d55f['shift']());}}}(a11_0x2548,0x8d102));import{existsSync,readFileSync,statSync}from'node:fs';import{createRuntimeArtifact,getRuntimeArtifact,listRuntimeArtifacts,updateRuntimeArtifact}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const ARTIFACT_TYPE_REACT_MODULE='react_module',ARTIFACT_SOURCE_AGENT=a11_0x4c5923(0x140),ALLOWED_REACT_MODULE_IMPORTS=['react',a11_0x4c5923(0x178),a11_0x4c5923(0x14d),a11_0x4c5923(0x18c),a11_0x4c5923(0x15e),a11_0x4c5923(0x14a)];export const ALLOWED_REACT_MODULE_IMPORTS_TEXT=ALLOWED_REACT_MODULE_IMPORTS[a11_0x4c5923(0x181)](',\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_0x4c5923(0x162),'type':a11_0x4c5923(0x145),'required':!![],'description':a11_0x4c5923(0x15f)},ARTIFACT_NAME_FLAG={'name':a11_0x4c5923(0x150),'type':a11_0x4c5923(0x145),'description':a11_0x4c5923(0x164)},METADATA_FLAG={'name':'metadata','type':'string','description':a11_0x4c5923(0x159)};function isPlainObject(_0x3e18aa){const _0x4668bf=a11_0x4c5923;return typeof _0x3e18aa===_0x4668bf(0x170)&&_0x3e18aa!==null&&!Array[_0x4668bf(0x188)](_0x3e18aa);}function readSourceFile(_0x2a2b8e){const _0x1173e8=a11_0x4c5923;if(!_0x2a2b8e)throw CliErrors[_0x1173e8(0x15c)](_0x1173e8(0x144));if(!existsSync(_0x2a2b8e))throw CliErrors[_0x1173e8(0x15c)]('File\x20not\x20found:\x20'+_0x2a2b8e);if(!statSync(_0x2a2b8e)[_0x1173e8(0x14b)]())throw CliErrors[_0x1173e8(0x15c)](_0x1173e8(0x141)+_0x2a2b8e);const _0x37203f=readFileSync(_0x2a2b8e,_0x1173e8(0x186));return validateReactModuleSource(_0x37203f),_0x37203f;}function a11_0x2548(){const _0x14e371=['@ant-design/icons','isFile','6Vsixkv','lodash','map','Optional\x20favorite-state\x20filter','name','source','Preview:\x20create\x20react_module\x20Artifact','5035605ENJcEw','body','artifactType','lastIndex','compiledContent','add','Artifact\x20metadata\x20as\x20JSON\x20object;\x20compiledContent\x20is\x20stripped','deleted','POST','validation','Artifact\x20ID','antd','Path\x20to\x20a\x20local\x20UTF-8\x20React\x20module\x20source\x20file','length','artifact','file','verbose','Artifact\x20display\x20name','Artifact\x20source\x20file\x20is\x20blank.','Invalid\x20JSON\x20for\x20--metadata:\x20','react_module\x20imports\x20are\x20limited\x20to:\x20','description','split','2drohMc','str','132716fUDWLK','1474812KkUagQ','Updated\x20Artifact\x20','some','object','1290317FoJqhm','--metadata\x20must\x20be\x20a\x20JSON\x20object.','detail','bool','appCode','flag','createTime','react-dom','parse','6678456oOlPSS','5494221urPGLJ','favorite','content','num','Created\x20Artifact\x20','update','join','includes','metadata','boolean','781494LCZaVH','utf8','Create\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','isArray','list','Preview:\x20update\x20react_module\x20Artifact\x20','startsWith','dayjs','Show\x20one\x20Artifact\x20by\x20id','read','updateTime','AGENT','File\x20is\x20not\x20a\x20regular\x20file:\x20','create','trim','File\x20path\x20is\x20required.','string','/update','Update\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','10KaTdyn','/client/artifact/'];a11_0x2548=function(){return _0x14e371;};return a11_0x2548();}function parseMetadata(_0x4cab14){const _0x35fd00=a11_0x4c5923;if(!_0x4cab14)return undefined;let _0x118cc9;try{_0x118cc9=JSON[_0x35fd00(0x179)](_0x4cab14);}catch{throw CliErrors[_0x35fd00(0x15c)](_0x35fd00(0x166)+_0x4cab14);}if(!isPlainObject(_0x118cc9))throw CliErrors['validation'](_0x35fd00(0x172));const _0x13ad5d={..._0x118cc9};return delete _0x13ad5d[_0x35fd00(0x157)],_0x13ad5d;}function getPackageName(_0x37452f){const _0x28584f=a11_0x4c5923;if(_0x37452f[_0x28584f(0x18b)]('@')){const [_0x34f932,_0x290e21]=_0x37452f[_0x28584f(0x169)]('/');return _0x34f932&&_0x290e21?_0x34f932+'/'+_0x290e21:_0x37452f;}return _0x37452f[_0x28584f(0x169)]('/')[0x0]||_0x37452f;}function validateAllowedImports(_0x54242f){const _0x20f0c5=a11_0x4c5923,_0x2fa0cf=new Set();for(const _0x234405 of IMPORT_SOURCE_PATTERNS){_0x234405[_0x20f0c5(0x156)]=0x0;let _0x35ac4a;while((_0x35ac4a=_0x234405['exec'](_0x54242f))!==null){const _0x1f51df=_0x35ac4a[0x1]?.['trim']();_0x1f51df&&_0x2fa0cf[_0x20f0c5(0x158)](_0x1f51df);}}const _0xb272c7=[..._0x2fa0cf][_0x20f0c5(0x14e)](getPackageName)['filter'](_0x2258c7=>!ALLOWED_REACT_MODULE_IMPORTS[_0x20f0c5(0x182)](_0x2258c7));if(_0xb272c7[_0x20f0c5(0x160)]>0x0)throw CliErrors[_0x20f0c5(0x15c)](_0x20f0c5(0x167)+ALLOWED_REACT_MODULE_IMPORTS_TEXT+'.\x20Unsupported:\x20'+[...new Set(_0xb272c7)][_0x20f0c5(0x181)](',\x20'));}function a11_0xbf6f(_0x1bc5fd,_0x1e17e5){_0x1bc5fd=_0x1bc5fd-0x13f;const _0x254817=a11_0x2548();let _0xbf6ffc=_0x254817[_0x1bc5fd];return _0xbf6ffc;}export function validateReactModuleSource(_0xf2edd0){const _0x4ffc9b=a11_0x4c5923;if(!_0xf2edd0['trim']())throw CliErrors[_0x4ffc9b(0x15c)](_0x4ffc9b(0x165));if(PAGE_LEVEL_PATTERNS[_0x4ffc9b(0x16f)](_0x5c71ad=>_0x5c71ad['test'](_0xf2edd0)))throw CliErrors[_0x4ffc9b(0x15c)]('react_module\x20must\x20be\x20an\x20embeddable\x20React\x20module,\x20not\x20full\x20HTML\x20or\x20a\x20ReactDOM/createRoot\x20mount\x20entry.');validateAllowedImports(_0xf2edd0);}function buildArtifactInput(_0x185f35){const _0x39ad00=a11_0x4c5923,_0x36e144=readSourceFile(_0x185f35['str']('file')),_0x523f62=_0x185f35[_0x39ad00(0x16b)](_0x39ad00(0x150))[_0x39ad00(0x143)](),_0x19c2f3=parseMetadata(_0x185f35[_0x39ad00(0x16b)](_0x39ad00(0x183)));return{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x523f62?{'name':_0x523f62}:{},'content':_0x36e144,..._0x19c2f3?{'metadata':_0x19c2f3}:{},'source':ARTIFACT_SOURCE_AGENT};}function summarizeArtifact(_0x2ab6d0){const _0x10bbcc=a11_0x4c5923;return{'id':_0x2ab6d0['id'],'name':_0x2ab6d0[_0x10bbcc(0x150)],'artifactType':_0x2ab6d0[_0x10bbcc(0x155)],'source':_0x2ab6d0[_0x10bbcc(0x151)],'favorite':_0x2ab6d0[_0x10bbcc(0x17c)],'deleted':_0x2ab6d0[_0x10bbcc(0x15a)],'createTime':_0x2ab6d0[_0x10bbcc(0x177)],'updateTime':_0x2ab6d0[_0x10bbcc(0x13f)]};}function detailArtifact(_0x320b8c){const _0x577741=a11_0x4c5923;return{'id':_0x320b8c['id'],'appCode':_0x320b8c['appCode'],'name':_0x320b8c[_0x577741(0x150)],'artifactType':_0x320b8c[_0x577741(0x155)],'source':_0x320b8c[_0x577741(0x151)],'favorite':_0x320b8c['favorite'],'deleted':_0x320b8c[_0x577741(0x15a)],'content':_0x320b8c[_0x577741(0x17d)]??'','compiledContent':_0x320b8c['compiledContent'],'metadata':_0x320b8c[_0x577741(0x183)]??{},'createTime':_0x320b8c[_0x577741(0x177)],'updateTime':_0x320b8c[_0x577741(0x13f)]};}function readFavoriteFlag(_0x362ba2){const _0x3758d6=a11_0x4c5923,_0x38e9e1=_0x362ba2[_0x3758d6(0x176)](_0x3758d6(0x17c));return _0x38e9e1===undefined||_0x38e9e1===null||_0x38e9e1===''?undefined:_0x362ba2[_0x3758d6(0x174)](_0x3758d6(0x17c));}const artifactList={'service':a11_0x4c5923(0x161),'command':a11_0x4c5923(0x189),'description':'List\x20current-app\x20react_module\x20Artifacts','risk':'read','flags':[{'name':'source','type':a11_0x4c5923(0x145),'description':'Optional\x20source\x20filter,\x20for\x20example\x20AGENT'},{'name':a11_0x4c5923(0x17c),'type':a11_0x4c5923(0x184),'description':a11_0x4c5923(0x14f)},VERBOSE_FLAG],async 'execute'(_0x26dfe9){const _0x5e2f27=a11_0x4c5923,_0xc0604d=await listRuntimeArtifacts(_0x26dfe9['appCode'],{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x26dfe9[_0x5e2f27(0x16b)](_0x5e2f27(0x151))?{'source':_0x26dfe9[_0x5e2f27(0x16b)](_0x5e2f27(0x151))}:{},...readFavoriteFlag(_0x26dfe9)!==undefined?{'favorite':readFavoriteFlag(_0x26dfe9)}:{}});return{'ok':!![],'data':{'total':_0xc0604d['length'],'items':_0x26dfe9['bool'](_0x5e2f27(0x163))?_0xc0604d:_0xc0604d[_0x5e2f27(0x14e)](summarizeArtifact)}};}},artifactDetail={'service':a11_0x4c5923(0x161),'command':a11_0x4c5923(0x173),'description':a11_0x4c5923(0x18d),'risk':'read','flags':[{...ID_FLAG,'description':'Artifact\x20ID'}],async 'execute'(_0x3b99e8){const _0x44fd43=a11_0x4c5923,_0x3f6f9a=await getRuntimeArtifact(_0x3b99e8[_0x44fd43(0x17e)]('id'),_0x3b99e8[_0x44fd43(0x175)]);return{'ok':!![],'data':detailArtifact(_0x3f6f9a)};}},artifactCreate={'service':a11_0x4c5923(0x161),'command':a11_0x4c5923(0x142),'description':a11_0x4c5923(0x187),'risk':a11_0x4c5923(0x18e),'flags':[FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x367f30){const _0x22e425=a11_0x4c5923,_0x558672=buildArtifactInput(_0x367f30),_0x2377be=await createRuntimeArtifact(_0x367f30['appCode'],_0x558672);return{'ok':!![],'data':detailArtifact(_0x2377be),'message':_0x22e425(0x17f)+_0x2377be['id']+(_0x2377be[_0x22e425(0x150)]?'\x20('+_0x2377be['name']+')':'')};},async 'dryRun'(_0x19ee1f){const _0xd10f2a=a11_0x4c5923,_0x418751=buildArtifactInput(_0x19ee1f);return dryRun(_0xd10f2a(0x15b),'/client/artifact/create')[_0xd10f2a(0x154)]({'appCode':_0x19ee1f[_0xd10f2a(0x175)],..._0x418751})[_0xd10f2a(0x168)](_0xd10f2a(0x152))['build']();}},artifactUpdate={'service':a11_0x4c5923(0x161),'command':a11_0x4c5923(0x180),'description':a11_0x4c5923(0x147),'risk':a11_0x4c5923(0x18e),'flags':[{...ID_FLAG,'description':a11_0x4c5923(0x15d)},FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x186e74){const _0x40f319=a11_0x4c5923,_0x18c946=_0x186e74[_0x40f319(0x17e)]('id'),_0x33a7f3=buildArtifactInput(_0x186e74),_0x1f36bd=await updateRuntimeArtifact(_0x18c946,_0x186e74[_0x40f319(0x175)],_0x33a7f3);return{'ok':!![],'data':detailArtifact(_0x1f36bd),'message':_0x40f319(0x16e)+_0x1f36bd['id']+(_0x1f36bd[_0x40f319(0x150)]?'\x20('+_0x1f36bd[_0x40f319(0x150)]+')':'')};},async 'dryRun'(_0x4ede72){const _0x5065fe=a11_0x4c5923,_0x428174=_0x4ede72[_0x5065fe(0x17e)]('id'),_0x2e8306=buildArtifactInput(_0x4ede72);return dryRun(_0x5065fe(0x15b),_0x5065fe(0x149)+_0x428174+_0x5065fe(0x146))[_0x5065fe(0x154)]({'appCode':_0x4ede72['appCode'],..._0x2e8306})[_0x5065fe(0x168)](_0x5065fe(0x18a)+_0x428174)['build']();}};export const artifactDefinitions=[artifactList,artifactDetail,artifactCreate,artifactUpdate];
@@ -1 +1 @@
1
- const a12_0x15cb60=a12_0x1f69;(function(_0x2d267a,_0x4f2a50){const _0x32821e=a12_0x1f69,_0x2795d0=_0x2d267a();while(!![]){try{const _0x24ba43=parseInt(_0x32821e(0x1d8))/0x1*(parseInt(_0x32821e(0x1e1))/0x2)+-parseInt(_0x32821e(0x1a8))/0x3*(parseInt(_0x32821e(0x1f0))/0x4)+-parseInt(_0x32821e(0x1c2))/0x5*(parseInt(_0x32821e(0x1af))/0x6)+-parseInt(_0x32821e(0x1f6))/0x7*(parseInt(_0x32821e(0x1f7))/0x8)+-parseInt(_0x32821e(0x1c6))/0x9+-parseInt(_0x32821e(0x1de))/0xa+-parseInt(_0x32821e(0x1f5))/0xb*(-parseInt(_0x32821e(0x1db))/0xc);if(_0x24ba43===_0x4f2a50)break;else _0x2795d0['push'](_0x2795d0['shift']());}catch(_0x55be7e){_0x2795d0['push'](_0x2795d0['shift']());}}}(a12_0x3bea,0x20de2));import{existsSync,mkdirSync,readFileSync,unlinkSync,writeFileSync}from'node:fs';import{dirname}from'node:path';function a12_0x1f69(_0x308330,_0x21fa63){_0x308330=_0x308330-0x1a7;const _0x3bea6e=a12_0x3bea();let _0x1f69f6=_0x3bea6e[_0x308330];return _0x1f69f6;}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(_0x59af98){const _0x200208=a12_0x1f69;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x59af98['bool'](_0x200208(0x1cc)),'explicitProject':_0x59af98['bool'](_0x200208(0x1df)),'policy':_0x200208(0x1e3)}));}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 _0x31c6f6=a12_0x1f69;return crypto[_0x31c6f6(0x1c0)]();}export function buildDeviceAuthUrl(_0x4ac835,_0x3704d2,_0x338f85='lovrabet-cli'){const _0xcc7047=a12_0x1f69;return _0x4ac835+_0xcc7047(0x1e2)+encodeURIComponent(_0x3704d2)+_0xcc7047(0x1b9)+encodeURIComponent(_0x338f85);}export function getDeviceCodePath(){return homedir()+'/'+PRODUCT_CONFIG['homeDirName']+'/.device-auth';}export function readStoredDeviceCode(){const _0x544428=a12_0x1f69,_0x3819fd=getDeviceCodePath();if(!existsSync(_0x3819fd))return null;try{const _0x3882d1=readFileSync(_0x3819fd,{'encoding':_0x544428(0x1a9)}),_0x2ca982=JSON[_0x544428(0x1e5)](_0x3882d1);if(_0x2ca982&&typeof _0x2ca982['code']===_0x544428(0x1b7)&&typeof _0x2ca982[_0x544428(0x1ce)]===_0x544428(0x1b7)&&(_0x2ca982['scope']===_0x544428(0x1cc)||_0x2ca982[_0x544428(0x1dd)]===_0x544428(0x1df)))return _0x2ca982;}catch{}return null;}export function writeStoredDeviceCode(_0x471d3b,_0x94bd33){const _0xd451d6=a12_0x1f69,_0x118402=getDeviceCodePath(),_0x4adbab=dirname(_0x118402);!existsSync(_0x4adbab)&&mkdirSync(_0x4adbab,{'recursive':!![]});const _0x1139cb={'code':_0x471d3b,'createdAt':new Date()['toISOString'](),'scope':_0x94bd33};writeFileSync(_0x118402,JSON[_0xd451d6(0x1b2)](_0x1139cb),{'encoding':'utf8','mode':0x180});}export function deleteStoredDeviceCode(){const _0x290eda=getDeviceCodePath();try{unlinkSync(_0x290eda);}catch{}}export function isStoredDeviceCodeExpired(_0x204154){const _0x204e95=a12_0x1f69;return Date[_0x204e95(0x1eb)]()-new Date(_0x204154[_0x204e95(0x1ce)])[_0x204e95(0x1ba)]()>DEVICE_CODE_TTL_MS;}export async function fetchDeviceToken(_0x473458,_0x15f005){const _0x5cd271=a12_0x1f69,_0x2e3b42=_0x473458+_0x5cd271(0x1c3),_0x3b5e41=new AbortController(),_0x163642=setTimeout(()=>_0x3b5e41['abort'](),0x2710),_0x199d07=await fetch(_0x2e3b42,{'method':'POST','headers':{'Content-Type':_0x5cd271(0x1e7)},'body':JSON[_0x5cd271(0x1b2)]({'code':_0x15f005}),'signal':_0x3b5e41[_0x5cd271(0x1e4)]});clearTimeout(_0x163642);if(!_0x199d07['ok'])throw CliErrors[_0x5cd271(0x1cf)]('Device\x20auth\x20API\x20returned\x20HTTP\x20'+_0x199d07[_0x5cd271(0x1aa)]);const _0x43e6f0=await _0x199d07[_0x5cd271(0x1ea)](),_0x3c4de1=_0x43e6f0[_0x5cd271(0x1b5)]&&typeof _0x43e6f0[_0x5cd271(0x1b5)]===_0x5cd271(0x1c7)?_0x43e6f0[_0x5cd271(0x1b5)]:_0x43e6f0;if(!_0x3c4de1||typeof _0x3c4de1[_0x5cd271(0x1aa)]!==_0x5cd271(0x1b7))throw CliErrors['apiError']('Invalid\x20device\x20auth\x20response');return{'status':_0x3c4de1[_0x5cd271(0x1aa)],'access_key':typeof _0x3c4de1[_0x5cd271(0x1cb)]==='string'?_0x3c4de1[_0x5cd271(0x1cb)]:undefined};}export async function pollDeviceToken(_0x3b28c9,_0x27ad4a,_0x4a475e){const _0xe9e3e6=a12_0x1f69;let _0x58c400=0x0;for(let _0x51b056=0x0;_0x51b056<MAX_POLLS;_0x51b056++){if(_0x4a475e[_0xe9e3e6(0x1ee)])throw CliErrors[_0xe9e3e6(0x1e8)](_0xe9e3e6(0x1e0));let _0x25018d;try{_0x25018d=await fetchDeviceToken(_0x3b28c9,_0x27ad4a);}catch(_0x4a0ec8){if(_0x4a0ec8 instanceof Error&&_0x4a0ec8[_0xe9e3e6(0x1c5)]===_0xe9e3e6(0x1ec))throw CliErrors[_0xe9e3e6(0x1e8)](_0xe9e3e6(0x1e0));_0x58c400++;if(_0x58c400>=MAX_CONSECUTIVE_NETWORK_ERRORS)throw CliErrors[_0xe9e3e6(0x1cf)](_0xe9e3e6(0x1d2));writeCliSideChannelLine('Device\x20auth\x20API\x20error\x20('+_0x58c400+'/'+MAX_CONSECUTIVE_NETWORK_ERRORS+_0xe9e3e6(0x1d9)),await sleep(POLL_INTERVAL_MS);continue;}_0x58c400=0x0;if(_0x25018d[_0xe9e3e6(0x1aa)]===_0xe9e3e6(0x1c8)){if(!_0x25018d['access_key'])throw CliErrors[_0xe9e3e6(0x1c4)](_0xe9e3e6(0x1b0));return _0x25018d[_0xe9e3e6(0x1cb)];}if(_0x25018d['status']===_0xe9e3e6(0x1f1)){deleteStoredDeviceCode();throw CliErrors[_0xe9e3e6(0x1be)](_0xe9e3e6(0x1bc));}const _0x6540fb=(_0x51b056+0x1)*POLL_INTERVAL_MS,_0x2b87ae=DEVICE_CODE_TTL_MS-_0x6540fb,_0x39a2d6=Math['floor'](_0x2b87ae/0xea60),_0x48adb8=Math[_0xe9e3e6(0x1cd)](_0x2b87ae%0xea60/0x3e8);process[_0xe9e3e6(0x1b8)]['write']('\x0dWaiting\x20for\x20authorization...\x20'+_0x39a2d6+':'+String(_0x48adb8)[_0xe9e3e6(0x1e6)](0x2,'0')+_0xe9e3e6(0x1ab)),await sleep(POLL_INTERVAL_MS);}deleteStoredDeviceCode();throw CliErrors['validation'](_0xe9e3e6(0x1da));}function a12_0x3bea(){const _0x4e8e6d=['Write\x20to\x20global\x20config\x20(default)','source','access_key','global','floor','createdAt','networkError','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.','Open\x20this\x20URL\x20in\x20your\x20browser\x20to\x20authorize:','Device\x20auth\x20API\x20unreachable\x20after\x20multiple\x20retries.','abort','The\x20device\x20code\x20is\x20valid\x20for\x2010\x20minutes.','write','\x20config.','device','84007vyFmLW','),\x20retrying...','Device\x20authorization\x20timed\x20out\x20after\x2010\x20minutes.\x20Run\x20`lovrabet\x20auth\x20device`\x20to\x20get\x20a\x20new\x20code.','108NgMfzM','bool','scope','1282220XCFKCZ','project','Device\x20authorization\x20cancelled.','4TiJXEA','/device-auth?code=','global-default','signal','parse','padStart','application/json','cancelled','auth','json','now','AbortError','lovrabet-cli','aborted','trim','4kVmqUp','expired','nonInteractive','SIGINT','url-only','983565NrvCcQ','2884hfTQRY','3464TQVuxk','str','146046dMHgoP','utf8','status','\x20remaining','Write\x20to\x20project\x20config','Verify:\x20','Print\x20URL\x20to\x20stdout\x20and\x20exit\x20(for\x20WorkBuddy\x20integration)','1401492XpEARw','Invalid\x20access_key\x20returned\x20by\x20server.','Device\x20authorization\x20successful.','stringify','Waiting\x20for\x20authorization\x20(timeout:\x2010\x20minutes,\x20Ctrl+C\x20to\x20cancel)...','accessKey','data','removeListener','string','stderr','&source=','getTime','Authorize\x20with\x20the\x20device-code\x20flow\x20(complete\x20in\x20the\x20browser;\x20no\x20copy-paste\x20required)','Device\x20code\x20expired.\x20Run\x20`lovrabet\x20auth\x20device`\x20to\x20get\x20a\x20new\x20code.','App\x20name\x20shown\x20on\x20authorization\x20page\x20(default:\x20lovrabet)','validation','\x20auth\x20device','randomUUID','boolean','5nGZxbg','/api/device-auth/token','apiError','name','2243169bRGXEK','object','success'];a12_0x3bea=function(){return _0x4e8e6d;};return a12_0x3bea();}function sleep(_0x215ba8){return new Promise(_0x1eeaee=>setTimeout(_0x1eeaee,_0x215ba8));}export const authDeviceDefinition={'service':a12_0x15cb60(0x1e9),'command':a12_0x15cb60(0x1d7),'description':a12_0x15cb60(0x1bb),'risk':a12_0x15cb60(0x1d5),'confirmationDescription':a12_0x15cb60(0x1d0),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x15cb60(0x1cc),'type':a12_0x15cb60(0x1c1),'description':a12_0x15cb60(0x1c9),'default':!![]},{'name':'project','type':a12_0x15cb60(0x1c1),'description':a12_0x15cb60(0x1ac),'default':![]},{'name':a12_0x15cb60(0x1ca),'type':a12_0x15cb60(0x1b7),'description':a12_0x15cb60(0x1bd),'default':'lovrabet-cli'},{'name':a12_0x15cb60(0x1f4),'type':'boolean','description':a12_0x15cb60(0x1ae),'default':![]}],async 'execute'(_0x8437b2){const _0x39e647=a12_0x15cb60,_0x522109=resolveAuthScopeFlags(_0x8437b2),_0x8a0018=_0x522109[_0x39e647(0x1cc)]?_0x39e647(0x1cc):_0x39e647(0x1df),_0x3a08ba=readScopedConfig(_0x522109);if(_0x3a08ba[_0x39e647(0x1b4)])return{'ok':!![],'message':'Already\x20authorized.\x20Use\x20`lovrabet\x20auth\x20status`\x20to\x20verify.'};const _0x3a8a0d=(_0x8437b2[_0x39e647(0x1a7)]('source')||_0x39e647(0x1ed))[_0x39e647(0x1ef)](),_0x16bf7b=getUserDomain(),_0x5d5316=readStoredDeviceCode(),_0x55958b=_0x5d5316&&!isStoredDeviceCodeExpired(_0x5d5316)?_0x5d5316['code']:((()=>{const _0x3d677b=generateDeviceCode();return writeStoredDeviceCode(_0x3d677b,_0x8a0018),_0x3d677b;})()),_0x303bd8=buildDeviceAuthUrl(_0x16bf7b,_0x55958b,_0x3a8a0d);if(_0x8437b2[_0x39e647(0x1dc)](_0x39e647(0x1f4)))return console['log'](_0x303bd8),{'ok':!![]};writeCliSideChannelLine(_0x39e647(0x1d1)),writeCliSideChannelLine(''),writeCliSideChannelLine(_0x303bd8),writeCliSideChannelLine(''),writeCliSideChannelLine(_0x39e647(0x1d4));if(_0x8437b2[_0x39e647(0x1f2)])return writeCliSideChannelLine('After\x20authorizing,\x20re-run:\x20'+CLI_BIN_NAME+_0x39e647(0x1bf)),{'ok':!![],'message':'Device\x20authorization\x20URL\x20printed.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20re-run.'};writeCliSideChannelLine(_0x39e647(0x1b3));const _0x5a9caa=new AbortController(),_0x38e9ab=()=>{const _0x48eca1=_0x39e647;_0x5a9caa[_0x48eca1(0x1d3)](),process[_0x48eca1(0x1b6)]('SIGINT',_0x38e9ab);};process['once'](_0x39e647(0x1f3),_0x38e9ab);let _0x5e7240;try{_0x5e7240=await pollDeviceToken(_0x16bf7b,_0x55958b,_0x5a9caa[_0x39e647(0x1e4)]);}finally{process[_0x39e647(0x1b6)](_0x39e647(0x1f3),_0x38e9ab);}if(!ACCESS_KEY_PATTERN['test'](_0x5e7240))throw CliErrors[_0x39e647(0x1c4)](_0x39e647(0x1b0));const _0x85ef99=readScopedConfig(_0x522109);return _0x85ef99[_0x39e647(0x1b4)]=_0x5e7240,writeScopedConfig(_0x85ef99,_0x522109),deleteStoredDeviceCode(),process[_0x39e647(0x1b8)][_0x39e647(0x1d5)]('\x0a'),writeCliSideChannelLine('AccessKey\x20saved\x20to\x20'+_0x8a0018+_0x39e647(0x1d6)),writeCliSideChannelLine(_0x39e647(0x1ad)+CLI_BIN_NAME+'\x20auth\x20status'),{'ok':!![],'message':_0x39e647(0x1b1)};}};
1
+ const a12_0x1c3a2e=a12_0x1c2d;function a12_0x1c2d(_0x360a7f,_0x1ee1af){_0x360a7f=_0x360a7f-0x15b;const _0x3c8cf8=a12_0x3c8c();let _0x1c2dd9=_0x3c8cf8[_0x360a7f];return _0x1c2dd9;}(function(_0x32b8bb,_0x3a3d71){const _0x5c6c62=a12_0x1c2d,_0x1bed1f=_0x32b8bb();while(!![]){try{const _0x57843e=-parseInt(_0x5c6c62(0x161))/0x1*(-parseInt(_0x5c6c62(0x181))/0x2)+-parseInt(_0x5c6c62(0x194))/0x3*(-parseInt(_0x5c6c62(0x15e))/0x4)+parseInt(_0x5c6c62(0x19a))/0x5+parseInt(_0x5c6c62(0x1a0))/0x6+-parseInt(_0x5c6c62(0x17c))/0x7+-parseInt(_0x5c6c62(0x19e))/0x8*(-parseInt(_0x5c6c62(0x17a))/0x9)+-parseInt(_0x5c6c62(0x189))/0xa;if(_0x57843e===_0x3a3d71)break;else _0x1bed1f['push'](_0x1bed1f['shift']());}catch(_0x121729){_0x1bed1f['push'](_0x1bed1f['shift']());}}}(a12_0x3c8c,0xe51b5));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(_0x436b17){const _0xd9de29=a12_0x1c2d;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x436b17['bool'](_0xd9de29(0x186)),'explicitProject':_0x436b17[_0xd9de29(0x191)](_0xd9de29(0x19c)),'policy':_0xd9de29(0x182)}));}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 _0x347809=a12_0x1c2d;return crypto[_0x347809(0x169)]();}export function buildDeviceAuthUrl(_0x1fe363,_0x561556,_0x5f070e='lovrabet-cli'){const _0x89c45c=a12_0x1c2d;return _0x1fe363+_0x89c45c(0x17d)+encodeURIComponent(_0x561556)+_0x89c45c(0x19d)+encodeURIComponent(_0x5f070e);}export function getDeviceCodePath(){const _0x562b53=a12_0x1c2d;return homedir()+'/'+PRODUCT_CONFIG[_0x562b53(0x185)]+_0x562b53(0x16d);}export function readStoredDeviceCode(){const _0x3b63ff=a12_0x1c2d,_0x3d7dbc=getDeviceCodePath();if(!existsSync(_0x3d7dbc))return null;try{const _0x389236=readFileSync(_0x3d7dbc,{'encoding':'utf8'}),_0x129ae5=JSON[_0x3b63ff(0x184)](_0x389236);if(_0x129ae5&&typeof _0x129ae5['code']===_0x3b63ff(0x180)&&typeof _0x129ae5[_0x3b63ff(0x16c)]===_0x3b63ff(0x180)&&(_0x129ae5[_0x3b63ff(0x192)]===_0x3b63ff(0x186)||_0x129ae5[_0x3b63ff(0x192)]===_0x3b63ff(0x19c)))return _0x129ae5;}catch{}return null;}export function writeStoredDeviceCode(_0x3b8b4c,_0x166576){const _0x4244be=a12_0x1c2d,_0xecc33d=getDeviceCodePath(),_0x2dca59=dirname(_0xecc33d);!existsSync(_0x2dca59)&&mkdirSync(_0x2dca59,{'recursive':!![]});const _0x16d55e={'code':_0x3b8b4c,'createdAt':new Date()[_0x4244be(0x1a1)](),'scope':_0x166576};writeFileSync(_0xecc33d,JSON[_0x4244be(0x171)](_0x16d55e),{'encoding':_0x4244be(0x1a2),'mode':0x180});}function a12_0x3c8c(){const _0x25438c=['homeDirName','global','\x20auth\x20status','abort','21715630IXBwSq','The\x20device\x20code\x20is\x20valid\x20for\x2010\x20minutes.','write','cancelled','apiError','json','now','boolean','bool','scope','Open\x20this\x20URL\x20in\x20your\x20browser\x20to\x20authorize:','1260LFMbvR','/api/device-auth/token','test','networkError','SIGINT','Verify:\x20','2731740fiUVGv','access_key','project','&source=','168yJMoQb','stderr','5065536KbJdex','toISOString','utf8','App\x20name\x20shown\x20on\x20authorization\x20page\x20(default:\x20lovrabet)','getTime','accessKey','Device\x20code\x20expired.\x20Run\x20`lovrabet\x20auth\x20device`\x20to\x20get\x20a\x20new\x20code.','Authorize\x20with\x20the\x20device-code\x20flow\x20(complete\x20in\x20the\x20browser;\x20no\x20copy-paste\x20required)','Device\x20authorization\x20cancelled.','\x20remaining','name','trim','nonInteractive','source','floor','Write\x20to\x20global\x20config\x20(default)','auth','8260mboPWV','url-only','Device\x20authorization\x20successful.','44987Kczohd','\x20config.','Write\x20to\x20project\x20config','Device\x20authorization\x20timed\x20out\x20after\x2010\x20minutes.\x20Run\x20`lovrabet\x20auth\x20device`\x20to\x20get\x20a\x20new\x20code.','data','validation','aborted','Device\x20auth\x20API\x20error\x20(','randomUUID','After\x20authorizing,\x20re-run:\x20','Already\x20authorized.\x20Use\x20`lovrabet\x20auth\x20status`\x20to\x20verify.','createdAt','/.device-auth','AbortError','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.','status','stringify','log','Device\x20auth\x20API\x20returned\x20HTTP\x20','lovrabet-cli','\x0dWaiting\x20for\x20authorization...\x20','once','Invalid\x20device\x20auth\x20response','object','removeListener','324153UBcFht','expired','904484uebEYN','/device-auth?code=','signal','\x20auth\x20device','string','10KyxSDp','global-default','),\x20retrying...','parse'];a12_0x3c8c=function(){return _0x25438c;};return a12_0x3c8c();}export function deleteStoredDeviceCode(){const _0x4d028d=getDeviceCodePath();try{unlinkSync(_0x4d028d);}catch{}}export function isStoredDeviceCodeExpired(_0x56ddb3){const _0x25e42d=a12_0x1c2d;return Date[_0x25e42d(0x18f)]()-new Date(_0x56ddb3[_0x25e42d(0x16c)])[_0x25e42d(0x1a4)]()>DEVICE_CODE_TTL_MS;}export async function fetchDeviceToken(_0x4b30c9,_0x433240){const _0x4eddd8=a12_0x1c2d,_0x1ab06b=_0x4b30c9+_0x4eddd8(0x195),_0xca530a=new AbortController(),_0x52f87b=setTimeout(()=>_0xca530a['abort'](),0x2710),_0x45c3d5=await fetch(_0x1ab06b,{'method':'POST','headers':{'Content-Type':'application/json'},'body':JSON[_0x4eddd8(0x171)]({'code':_0x433240}),'signal':_0xca530a[_0x4eddd8(0x17e)]});clearTimeout(_0x52f87b);if(!_0x45c3d5['ok'])throw CliErrors['networkError'](_0x4eddd8(0x173)+_0x45c3d5['status']);const _0x51e547=await _0x45c3d5[_0x4eddd8(0x18e)](),_0x5ccd0b=_0x51e547[_0x4eddd8(0x165)]&&typeof _0x51e547['data']===_0x4eddd8(0x178)?_0x51e547['data']:_0x51e547;if(!_0x5ccd0b||typeof _0x5ccd0b['status']!=='string')throw CliErrors['apiError'](_0x4eddd8(0x177));return{'status':_0x5ccd0b['status'],'access_key':typeof _0x5ccd0b[_0x4eddd8(0x19b)]===_0x4eddd8(0x180)?_0x5ccd0b['access_key']:undefined};}export async function pollDeviceToken(_0x117da8,_0x1a0616,_0x21a128){const _0x1ff778=a12_0x1c2d;let _0x543b58=0x0;for(let _0xed7536=0x0;_0xed7536<MAX_POLLS;_0xed7536++){if(_0x21a128[_0x1ff778(0x167)])throw CliErrors[_0x1ff778(0x18c)](_0x1ff778(0x1a8));let _0x5bf67b;try{_0x5bf67b=await fetchDeviceToken(_0x117da8,_0x1a0616);}catch(_0x16c26c){if(_0x16c26c instanceof Error&&_0x16c26c[_0x1ff778(0x1aa)]===_0x1ff778(0x16e))throw CliErrors[_0x1ff778(0x18c)]('Device\x20authorization\x20cancelled.');_0x543b58++;if(_0x543b58>=MAX_CONSECUTIVE_NETWORK_ERRORS)throw CliErrors[_0x1ff778(0x197)]('Device\x20auth\x20API\x20unreachable\x20after\x20multiple\x20retries.');writeCliSideChannelLine(_0x1ff778(0x168)+_0x543b58+'/'+MAX_CONSECUTIVE_NETWORK_ERRORS+_0x1ff778(0x183)),await sleep(POLL_INTERVAL_MS);continue;}_0x543b58=0x0;if(_0x5bf67b['status']==='success'){if(!_0x5bf67b[_0x1ff778(0x19b)])throw CliErrors[_0x1ff778(0x18d)]('Invalid\x20access_key\x20returned\x20by\x20server.');return _0x5bf67b[_0x1ff778(0x19b)];}if(_0x5bf67b[_0x1ff778(0x170)]===_0x1ff778(0x17b)){deleteStoredDeviceCode();throw CliErrors[_0x1ff778(0x166)](_0x1ff778(0x1a6));}const _0x40b409=(_0xed7536+0x1)*POLL_INTERVAL_MS,_0x532605=DEVICE_CODE_TTL_MS-_0x40b409,_0x2a8e2b=Math[_0x1ff778(0x15b)](_0x532605/0xea60),_0x142f18=Math[_0x1ff778(0x15b)](_0x532605%0xea60/0x3e8);process['stderr'][_0x1ff778(0x18b)](_0x1ff778(0x175)+_0x2a8e2b+':'+String(_0x142f18)['padStart'](0x2,'0')+_0x1ff778(0x1a9)),await sleep(POLL_INTERVAL_MS);}deleteStoredDeviceCode();throw CliErrors[_0x1ff778(0x166)](_0x1ff778(0x164));}function sleep(_0x642fc0){return new Promise(_0x111605=>setTimeout(_0x111605,_0x642fc0));}export const authDeviceDefinition={'service':a12_0x1c3a2e(0x15d),'command':'device','description':a12_0x1c3a2e(0x1a7),'risk':a12_0x1c3a2e(0x18b),'confirmationDescription':a12_0x1c3a2e(0x16f),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x1c3a2e(0x186),'type':'boolean','description':a12_0x1c3a2e(0x15c),'default':!![]},{'name':'project','type':'boolean','description':a12_0x1c3a2e(0x163),'default':![]},{'name':a12_0x1c3a2e(0x1ad),'type':a12_0x1c3a2e(0x180),'description':a12_0x1c3a2e(0x1a3),'default':'lovrabet-cli'},{'name':a12_0x1c3a2e(0x15f),'type':a12_0x1c3a2e(0x190),'description':'Print\x20URL\x20to\x20stdout\x20and\x20exit\x20(for\x20WorkBuddy\x20integration)','default':![]}],async 'execute'(_0x1ac64f){const _0x5267b0=a12_0x1c3a2e,_0x13327f=resolveAuthScopeFlags(_0x1ac64f),_0x5274f7=_0x13327f['global']?_0x5267b0(0x186):'project',_0xf19465=readScopedConfig(_0x13327f);if(_0xf19465['accessKey'])return{'ok':!![],'message':_0x5267b0(0x16b)};const _0x234ab3=(_0x1ac64f['str'](_0x5267b0(0x1ad))||_0x5267b0(0x174))[_0x5267b0(0x1ab)](),_0x53d7a8=getUserDomain(),_0x3827ad=readStoredDeviceCode(),_0x5a2c19=_0x3827ad&&!isStoredDeviceCodeExpired(_0x3827ad)?_0x3827ad['code']:((()=>{const _0x2a5f6f=generateDeviceCode();return writeStoredDeviceCode(_0x2a5f6f,_0x5274f7),_0x2a5f6f;})()),_0xade62b=buildDeviceAuthUrl(_0x53d7a8,_0x5a2c19,_0x234ab3);if(_0x1ac64f[_0x5267b0(0x191)](_0x5267b0(0x15f)))return console[_0x5267b0(0x172)](_0xade62b),{'ok':!![]};writeCliSideChannelLine(_0x5267b0(0x193)),writeCliSideChannelLine(''),writeCliSideChannelLine(_0xade62b),writeCliSideChannelLine(''),writeCliSideChannelLine(_0x5267b0(0x18a));if(_0x1ac64f[_0x5267b0(0x1ac)])return writeCliSideChannelLine(_0x5267b0(0x16a)+CLI_BIN_NAME+_0x5267b0(0x17f)),{'ok':!![],'message':'Device\x20authorization\x20URL\x20printed.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20re-run.'};writeCliSideChannelLine('Waiting\x20for\x20authorization\x20(timeout:\x2010\x20minutes,\x20Ctrl+C\x20to\x20cancel)...');const _0x1b2eb2=new AbortController(),_0x39a98a=()=>{const _0x2b514f=_0x5267b0;_0x1b2eb2[_0x2b514f(0x188)](),process[_0x2b514f(0x179)](_0x2b514f(0x198),_0x39a98a);};process[_0x5267b0(0x176)](_0x5267b0(0x198),_0x39a98a);let _0x2471ac;try{_0x2471ac=await pollDeviceToken(_0x53d7a8,_0x5a2c19,_0x1b2eb2[_0x5267b0(0x17e)]);}finally{process['removeListener'](_0x5267b0(0x198),_0x39a98a);}if(!ACCESS_KEY_PATTERN[_0x5267b0(0x196)](_0x2471ac))throw CliErrors[_0x5267b0(0x18d)]('Invalid\x20access_key\x20returned\x20by\x20server.');const _0x307be2=readScopedConfig(_0x13327f);return _0x307be2[_0x5267b0(0x1a5)]=_0x2471ac,writeScopedConfig(_0x307be2,_0x13327f),deleteStoredDeviceCode(),process[_0x5267b0(0x19f)][_0x5267b0(0x18b)]('\x0a'),writeCliSideChannelLine('AccessKey\x20saved\x20to\x20'+_0x5274f7+_0x5267b0(0x162)),writeCliSideChannelLine(_0x5267b0(0x199)+CLI_BIN_NAME+_0x5267b0(0x187)),{'ok':!![],'message':_0x5267b0(0x160)};}};