@lovrabet/lovrabet-cli 2.3.10-beta.1 → 2.3.10-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 (191) 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.d.ts +1 -1
  26. package/lib/commands/config/init.js +1 -1
  27. package/lib/commands/config/shared.js +1 -1
  28. package/lib/commands/data/import-excel.js +1 -1
  29. package/lib/commands/data/index.js +1 -1
  30. package/lib/commands/dataset/detail.js +1 -1
  31. package/lib/commands/dataset/index.js +1 -1
  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/issue/context.js +1 -1
  38. package/lib/commands/issue/index.js +1 -1
  39. package/lib/commands/issue/report.js +1 -1
  40. package/lib/commands/kb/index.js +1 -1
  41. package/lib/commands/logs/index.js +1 -1
  42. package/lib/commands/notification/config-list.js +1 -1
  43. package/lib/commands/notification/index.js +1 -1
  44. package/lib/commands/notification/shared.js +1 -1
  45. package/lib/commands/ocr/index.js +1 -1
  46. package/lib/commands/permit/dataset-get.js +1 -1
  47. package/lib/commands/permit/dataset-set.js +1 -1
  48. package/lib/commands/permit/index.js +1 -1
  49. package/lib/commands/permit/page-get.js +1 -1
  50. package/lib/commands/permit/page-set.js +1 -1
  51. package/lib/commands/permit/role-menus-set.js +1 -1
  52. package/lib/commands/permit/role-menus.js +1 -1
  53. package/lib/commands/permit/shared.js +1 -1
  54. package/lib/commands/personal-bff/index.js +1 -1
  55. package/lib/commands/registry.js +1 -1
  56. package/lib/commands/role/create.js +1 -1
  57. package/lib/commands/role/delete.js +1 -1
  58. package/lib/commands/role/detail.js +1 -1
  59. package/lib/commands/role/index.js +1 -1
  60. package/lib/commands/role/list.js +1 -1
  61. package/lib/commands/role/shared.js +1 -1
  62. package/lib/commands/role/update.js +1 -1
  63. package/lib/commands/role/user-add.js +1 -1
  64. package/lib/commands/role/user-remove.js +1 -1
  65. package/lib/commands/schedule/index.js +1 -1
  66. package/lib/commands/schema.js +1 -1
  67. package/lib/commands/service/dynamic.js +1 -1
  68. package/lib/commands/service/function-name-adapter.js +1 -1
  69. package/lib/commands/service/index.js +1 -1
  70. package/lib/commands/service/registry.js +1 -1
  71. package/lib/commands/skill/commands/create.js +1 -1
  72. package/lib/commands/skill/commands/diagram.js +1 -1
  73. package/lib/commands/skill/commands/install.js +1 -1
  74. package/lib/commands/skill/commands/list.js +1 -1
  75. package/lib/commands/skill/commands/push.js +1 -1
  76. package/lib/commands/skill/commands/validate.js +1 -1
  77. package/lib/commands/skill/diagram.js +1 -1
  78. package/lib/commands/skill/flags.js +1 -1
  79. package/lib/commands/skill/index.js +1 -1
  80. package/lib/commands/skill/manifest-helpers.js +1 -1
  81. package/lib/commands/skill/push-execute.js +1 -1
  82. package/lib/commands/skill/push-flow-helpers.js +1 -1
  83. package/lib/commands/skill/push-retarget.js +1 -1
  84. package/lib/commands/skill/scopes.js +1 -1
  85. package/lib/commands/skill/summary.js +1 -1
  86. package/lib/commands/skill/templates.js +1 -1
  87. package/lib/commands/skill/validate.js +1 -1
  88. package/lib/commands/sql/detail.js +1 -1
  89. package/lib/commands/sql/exec.js +1 -1
  90. package/lib/commands/sql/index.js +1 -1
  91. package/lib/commands/update.js +1 -1
  92. package/lib/commands/user-account/bind.js +1 -1
  93. package/lib/commands/user-account/index.js +1 -1
  94. package/lib/commands/workspace/index.js +1 -1
  95. package/lib/config/domain-config.d.ts +1 -1
  96. package/lib/config/domain-config.js +1 -1
  97. package/lib/config/schema.d.ts +1 -1
  98. package/lib/config/schema.js +1 -1
  99. package/lib/constant/app.js +1 -1
  100. package/lib/constant/auth-mode.js +1 -1
  101. package/lib/constant/cli.js +1 -1
  102. package/lib/constant/defaults.js +1 -1
  103. package/lib/constant/distribution.js +1 -1
  104. package/lib/constant/domain.d.ts +6 -0
  105. package/lib/constant/domain.js +1 -1
  106. package/lib/constant/env.js +1 -1
  107. package/lib/constant/output.js +1 -1
  108. package/lib/constant/product.js +1 -1
  109. package/lib/constant/region.js +1 -1
  110. package/lib/constant/risk.js +1 -1
  111. package/lib/constant/url.js +1 -1
  112. package/lib/context.js +1 -1
  113. package/lib/core/api-client.js +1 -1
  114. package/lib/core/db-resolver.js +1 -1
  115. package/lib/core/kb-management-client.js +1 -1
  116. package/lib/core/kb-sdk-errors.js +1 -1
  117. package/lib/core/kb-search-client.js +1 -1
  118. package/lib/core/sdk-client.js +1 -1
  119. package/lib/errors.js +1 -1
  120. package/lib/framework/access-error.js +1 -1
  121. package/lib/framework/build-all-flags.js +1 -1
  122. package/lib/framework/dryrun.js +1 -1
  123. package/lib/framework/flags.js +1 -1
  124. package/lib/framework/help.js +1 -1
  125. package/lib/framework/index.js +1 -1
  126. package/lib/framework/output.js +1 -1
  127. package/lib/framework/preparse.js +1 -1
  128. package/lib/framework/rate-limit.js +1 -1
  129. package/lib/framework/raw-flags.js +1 -1
  130. package/lib/framework/response.js +1 -1
  131. package/lib/framework/runner-confirmation.js +1 -1
  132. package/lib/framework/runner-error.js +1 -1
  133. package/lib/framework/runner.js +1 -1
  134. package/lib/framework/schema-export.js +1 -1
  135. package/lib/framework/service-order.js +1 -1
  136. package/lib/framework/types.js +1 -1
  137. package/lib/generated/build-info.d.ts +4 -4
  138. package/lib/generated/build-info.js +1 -1
  139. package/lib/generated/official-routing.d.ts +3 -1
  140. package/lib/generated/official-routing.js +1 -1
  141. package/lib/generated/routing-contract.d.ts +2 -2
  142. package/lib/generated/routing-contract.js +1 -1
  143. package/lib/help.js +1 -1
  144. package/lib/postinstall.js +1 -1
  145. package/lib/runtime/confirmation.js +1 -1
  146. package/lib/runtime/event.js +1 -1
  147. package/lib/runtime/index.js +1 -1
  148. package/lib/runtime/queue.js +1 -1
  149. package/lib/runtime/resolve.js +1 -1
  150. package/lib/services/dataset-import/auto-id-runner.js +1 -1
  151. package/lib/services/dataset-import/excel-reader.js +1 -1
  152. package/lib/services/dataset-import/image-bytes.js +1 -1
  153. package/lib/services/dataset-import/image-ooxml.js +1 -1
  154. package/lib/services/dataset-import/image-runner.js +1 -1
  155. package/lib/services/dataset-import/metadata.js +1 -1
  156. package/lib/services/dataset-import/preview.js +1 -1
  157. package/lib/services/dataset-import/runner.js +1 -1
  158. package/lib/skills/builtin-skill.js +1 -1
  159. package/lib/skills/npx-skills-add.js +1 -1
  160. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  161. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  162. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  163. package/lib/skills/runtime-skill-sync/install-target.js +1 -1
  164. package/lib/skills/runtime-skill-sync/links.js +1 -1
  165. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  166. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  167. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  168. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  169. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  170. package/lib/skills/runtime-skill-sync/push.js +1 -1
  171. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  172. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  173. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  174. package/lib/skills/runtime-skill-sync.js +1 -1
  175. package/lib/skills/skill-presence.js +1 -1
  176. package/lib/utils/access-key-redaction.js +1 -1
  177. package/lib/utils/apply-jq-filter.js +1 -1
  178. package/lib/utils/cli-version-check.js +1 -1
  179. package/lib/utils/cli-version-policy.js +1 -1
  180. package/lib/utils/logger.js +1 -1
  181. package/lib/utils/lossless-json.js +1 -1
  182. package/lib/utils/params.js +1 -1
  183. package/lib/utils/positive-safe-integer.js +1 -1
  184. package/lib/utils/redaction.js +1 -1
  185. package/lib/utils/runtime-user-id.js +1 -1
  186. package/lib/utils/update-notice.js +1 -1
  187. package/lib/utils/version.js +1 -1
  188. package/lib/utils/write-cli-side-channel.js +1 -1
  189. package/package.json +1 -1
  190. package/skills/lovrabet/SKILL.md +1 -1
  191. package/skills/lovrabet.manifest.json +3 -3
@@ -1 +1 @@
1
- const a39_0x49b120=a39_0x5897;(function(_0xec0d7e,_0x3573ab){const _0x590d48=a39_0x5897,_0x5ac485=_0xec0d7e();while(!![]){try{const _0x3ed8b3=parseInt(_0x590d48(0x154))/0x1+-parseInt(_0x590d48(0x159))/0x2+-parseInt(_0x590d48(0x167))/0x3*(-parseInt(_0x590d48(0x152))/0x4)+-parseInt(_0x590d48(0x16a))/0x5+parseInt(_0x590d48(0x168))/0x6+parseInt(_0x590d48(0x16e))/0x7*(parseInt(_0x590d48(0x15b))/0x8)+parseInt(_0x590d48(0x172))/0x9*(-parseInt(_0x590d48(0x15d))/0xa);if(_0x3ed8b3===_0x3573ab)break;else _0x5ac485['push'](_0x5ac485['shift']());}catch(_0x282ff2){_0x5ac485['push'](_0x5ac485['shift']());}}}(a39_0x45a6,0xac937));import{logger}from'../../utils/logger.js';import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function printLogs(_0x3fd7f6){const _0x52a61a=a39_0x5897;if(_0x3fd7f6[_0x52a61a(0x156)]===0x0){console[_0x52a61a(0x164)](_0x52a61a(0x160));return;}console[_0x52a61a(0x164)]('*\x20'+CLI_DISPLAY_NAME+_0x52a61a(0x170)),_0x3fd7f6[_0x52a61a(0x16b)]((_0x253d8,_0x11d756)=>{const _0x4ef772=_0x52a61a,_0x1f7013=new Date(_0x253d8[_0x4ef772(0x166)])[_0x4ef772(0x16f)](_0x4ef772(0x157)),_0x2d1150=_0x253d8['level']===_0x4ef772(0x162)?'√':_0x253d8[_0x4ef772(0x171)]===_0x4ef772(0x153)?'×':_0x253d8[_0x4ef772(0x171)]===_0x4ef772(0x15a)?'!':'i';console[_0x4ef772(0x164)](_0x11d756+0x1+'.\x20'+_0x2d1150+'\x20['+_0x253d8[_0x4ef772(0x158)]+']\x20'+_0x253d8[_0x4ef772(0x155)]),console[_0x4ef772(0x164)]('\x20\x20\x20Time:\x20'+_0x1f7013),_0x253d8[_0x4ef772(0x15c)]&&console[_0x4ef772(0x164)](_0x4ef772(0x16d)+_0x253d8[_0x4ef772(0x15c)]+'ms'),_0x253d8[_0x4ef772(0x163)]&&Object[_0x4ef772(0x15e)](_0x253d8['details'])['length']>0x0&&console['log'](_0x4ef772(0x165)+JSON[_0x4ef772(0x161)](_0x253d8[_0x4ef772(0x163)],null,0x2)),console[_0x4ef772(0x164)]('');});}function a39_0x5897(_0x137021,_0x4dce3f){_0x137021=_0x137021-0x152;const _0x45a6d7=a39_0x45a6();let _0x5897eb=_0x45a6d7[_0x137021];return _0x5897eb;}function a39_0x45a6(){const _0x4a9e5b=['5352415debdWQ','forEach','show','\x20\x20\x20Duration:\x20','105FIqpsK','toLocaleString','\x20logs:\x0a','level','9bmcpgo','60wsnVqO','error','1348046qJaoZP','message','length','en-US','command','2559596XCeKAM','warn','97560GwKpez','duration','3260110VMMgry','keys','logs','*\x20No\x20logs\x20found','stringify','success','details','log','\x20\x20\x20Details:\x20','timestamp','143778ZqFmyt','6799812lCRcqW','readLogs'];a39_0x45a6=function(){return _0x4a9e5b;};return a39_0x45a6();}export const logsDefinitions=[{'service':a39_0x49b120(0x15f),'command':a39_0x49b120(0x16c),'description':'View\x20command\x20history\x20logs','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x5270ee){const _0x983e34=a39_0x49b120;return printLogs(logger[_0x983e34(0x169)]()),{'ok':!![]};}}];
1
+ function a39_0x5a2f(_0x42b37c,_0x17d7c1){_0x42b37c=_0x42b37c-0x1f2;const _0x4f617b=a39_0x4f61();let _0x5a2f94=_0x4f617b[_0x42b37c];return _0x5a2f94;}const a39_0x565f88=a39_0x5a2f;(function(_0x2b4e64,_0xf4d945){const _0x4f7281=a39_0x5a2f,_0xe44540=_0x2b4e64();while(!![]){try{const _0x3f6a4c=parseInt(_0x4f7281(0x203))/0x1*(parseInt(_0x4f7281(0x209))/0x2)+parseInt(_0x4f7281(0x210))/0x3*(parseInt(_0x4f7281(0x1f2))/0x4)+parseInt(_0x4f7281(0x1fd))/0x5+-parseInt(_0x4f7281(0x204))/0x6*(parseInt(_0x4f7281(0x205))/0x7)+-parseInt(_0x4f7281(0x1f7))/0x8+parseInt(_0x4f7281(0x207))/0x9+-parseInt(_0x4f7281(0x20b))/0xa*(parseInt(_0x4f7281(0x20d))/0xb);if(_0x3f6a4c===_0xf4d945)break;else _0xe44540['push'](_0xe44540['shift']());}catch(_0x4d5738){_0xe44540['push'](_0xe44540['shift']());}}}(a39_0x4f61,0xd8770));import{logger}from'../../utils/logger.js';import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function printLogs(_0x51daea){const _0x452658=a39_0x5a2f;if(_0x51daea[_0x452658(0x20c)]===0x0){console[_0x452658(0x20e)]('*\x20No\x20logs\x20found');return;}console[_0x452658(0x20e)]('*\x20'+CLI_DISPLAY_NAME+_0x452658(0x1f6)),_0x51daea[_0x452658(0x1f3)]((_0xb652fe,_0x2c2780)=>{const _0x3a803f=_0x452658,_0x2e5095=new Date(_0xb652fe[_0x3a803f(0x20f)])[_0x3a803f(0x206)]('en-US'),_0x4d91de=_0xb652fe[_0x3a803f(0x1fb)]===_0x3a803f(0x200)?'√':_0xb652fe[_0x3a803f(0x1fb)]==='error'?'×':_0xb652fe[_0x3a803f(0x1fb)]===_0x3a803f(0x1fe)?'!':'i';console[_0x3a803f(0x20e)](_0x2c2780+0x1+'.\x20'+_0x4d91de+'\x20['+_0xb652fe[_0x3a803f(0x20a)]+']\x20'+_0xb652fe[_0x3a803f(0x1fc)]),console[_0x3a803f(0x20e)](_0x3a803f(0x1ff)+_0x2e5095),_0xb652fe[_0x3a803f(0x202)]&&console[_0x3a803f(0x20e)](_0x3a803f(0x1f9)+_0xb652fe[_0x3a803f(0x202)]+'ms'),_0xb652fe[_0x3a803f(0x1f4)]&&Object['keys'](_0xb652fe[_0x3a803f(0x1f4)])[_0x3a803f(0x20c)]>0x0&&console[_0x3a803f(0x20e)](_0x3a803f(0x201)+JSON['stringify'](_0xb652fe['details'],null,0x2)),console[_0x3a803f(0x20e)]('');});}export const logsDefinitions=[{'service':a39_0x565f88(0x208),'command':a39_0x565f88(0x1fa),'description':'View\x20command\x20history\x20logs','risk':a39_0x565f88(0x1f5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x573a6c){const _0x3fa399=a39_0x565f88;return printLogs(logger[_0x3fa399(0x1f8)]()),{'ok':!![]};}}];function a39_0x4f61(){const _0x53132c=['\x20\x20\x20Duration:\x20','show','level','message','1554450etdTub','warn','\x20\x20\x20Time:\x20','success','\x20\x20\x20Details:\x20','duration','1861AgVjHV','4346142GFgyVj','7DPNkqh','toLocaleString','8727678YHalvr','logs','1426DqXBay','command','7050530LLCyeW','length','11xavkbk','log','timestamp','42tIFrSM','308132fcQCOg','forEach','details','read','\x20logs:\x0a','10959496GsSmFi','readLogs'];a39_0x4f61=function(){return _0x53132c;};return a39_0x4f61();}
@@ -1 +1 @@
1
- const a40_0x11da90=a40_0x341b;(function(_0x1b8c73,_0x1f7f3d){const _0xa020e6=a40_0x341b,_0x96aab2=_0x1b8c73();while(!![]){try{const _0x12a1df=-parseInt(_0xa020e6(0x169))/0x1*(parseInt(_0xa020e6(0x168))/0x2)+parseInt(_0xa020e6(0x15a))/0x3+parseInt(_0xa020e6(0x161))/0x4+-parseInt(_0xa020e6(0x15f))/0x5*(-parseInt(_0xa020e6(0x155))/0x6)+-parseInt(_0xa020e6(0x158))/0x7+-parseInt(_0xa020e6(0x154))/0x8*(-parseInt(_0xa020e6(0x164))/0x9)+-parseInt(_0xa020e6(0x166))/0xa*(-parseInt(_0xa020e6(0x15e))/0xb);if(_0x12a1df===_0x1f7f3d)break;else _0x96aab2['push'](_0x96aab2['shift']());}catch(_0x26bc52){_0x96aab2['push'](_0x96aab2['shift']());}}}(a40_0x40a8,0x2d898));import{listNotificationChannelConfigs}from'../../core/api-client.js';function a40_0x40a8(){const _0xddc73d=['Found\x20','254vkJHKp','917DIiTJt','424mGcBJW','102KYeuPb','notification','Notification\x20channel\x20type','1413510jPaPmH','length','134337JnFslp','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','read','string','55gZXIKp','34915MXqDxg','type','454396APKZIA','config-list','map','29115aMcAQD','EMAIL','112730bxnLYT'];a40_0x40a8=function(){return _0xddc73d;};return a40_0x40a8();}import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';function a40_0x341b(_0x29cb0e,_0x422534){_0x29cb0e=_0x29cb0e-0x154;const _0x40a844=a40_0x40a8();let _0x341b32=_0x40a844[_0x29cb0e];return _0x341b32;}export const notificationConfigList={'service':a40_0x11da90(0x156),'command':a40_0x11da90(0x162),'description':a40_0x11da90(0x15b),'risk':a40_0x11da90(0x15c),'flags':[{'name':a40_0x11da90(0x160),'type':a40_0x11da90(0x15d),'description':a40_0x11da90(0x157),'enum':NOTIFICATION_CHANNEL_TYPES,'default':a40_0x11da90(0x165)}],async 'validate'(_0x22e510){readNotificationChannelType(_0x22e510);},async 'execute'(_0x5896be){const _0x3f7ca1=a40_0x11da90,_0x183dae=readNotificationChannelType(_0x5896be),_0x16281e=await listNotificationChannelConfigs(_0x5896be['appCode'],_0x183dae),_0xcb659b=_0x16281e[_0x3f7ca1(0x163)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x5896be['appCode'],'channelType':_0x183dae,'count':_0xcb659b[_0x3f7ca1(0x159)],'configs':_0xcb659b},'message':_0x3f7ca1(0x167)+_0xcb659b['length']+'\x20'+_0x183dae+'\x20notification\x20config(s)'};}};
1
+ function a40_0x3151(){const _0x526559=['config-list','4902gFpIVJ','length','read','notification','\x20notification\x20config(s)','10FnIVZk','50ajqlBo','56pTDCgY','41031947hmPGSH','type','9LVbvMs','EMAIL','map','8900536eNuuHq','string','508479TKnNcw','appCode','268512ZLZfeA','4535900MXPTzM','4925725pwarnh'];a40_0x3151=function(){return _0x526559;};return a40_0x3151();}const a40_0x424d01=a40_0x26e3;(function(_0x184d39,_0x3e8ae6){const _0x43ea75=a40_0x26e3,_0x4383a9=_0x184d39();while(!![]){try{const _0x3790e9=parseInt(_0x43ea75(0xd8))/0x1+-parseInt(_0x43ea75(0xe4))/0x2*(parseInt(_0x43ea75(0xde))/0x3)+-parseInt(_0x43ea75(0xdb))/0x4+-parseInt(_0x43ea75(0xdc))/0x5+-parseInt(_0x43ea75(0xda))/0x6*(parseInt(_0x43ea75(0xe5))/0x7)+parseInt(_0x43ea75(0xd6))/0x8*(-parseInt(_0x43ea75(0xd3))/0x9)+-parseInt(_0x43ea75(0xe3))/0xa*(-parseInt(_0x43ea75(0xe6))/0xb);if(_0x3790e9===_0x3e8ae6)break;else _0x4383a9['push'](_0x4383a9['shift']());}catch(_0x31b191){_0x4383a9['push'](_0x4383a9['shift']());}}}(a40_0x3151,0x94767));import{listNotificationChannelConfigs}from'../../core/api-client.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';function a40_0x26e3(_0x591571,_0x75f8c2){_0x591571=_0x591571-0xd2;const _0x315196=a40_0x3151();let _0x26e3a1=_0x315196[_0x591571];return _0x26e3a1;}export const notificationConfigList={'service':a40_0x424d01(0xe1),'command':a40_0x424d01(0xdd),'description':'List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','risk':a40_0x424d01(0xe0),'flags':[{'name':a40_0x424d01(0xd2),'type':a40_0x424d01(0xd7),'description':'Notification\x20channel\x20type','enum':NOTIFICATION_CHANNEL_TYPES,'default':a40_0x424d01(0xd4)}],async 'validate'(_0x3de670){readNotificationChannelType(_0x3de670);},async 'execute'(_0x5a0cf8){const _0x1f0c31=a40_0x424d01,_0x517ab4=readNotificationChannelType(_0x5a0cf8),_0x236360=await listNotificationChannelConfigs(_0x5a0cf8[_0x1f0c31(0xd9)],_0x517ab4),_0x3fec46=_0x236360[_0x1f0c31(0xd5)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x5a0cf8[_0x1f0c31(0xd9)],'channelType':_0x517ab4,'count':_0x3fec46[_0x1f0c31(0xdf)],'configs':_0x3fec46},'message':'Found\x20'+_0x3fec46[_0x1f0c31(0xdf)]+'\x20'+_0x517ab4+_0x1f0c31(0xe2)};}};
@@ -1 +1 @@
1
- (function(_0x3fdadc,_0x47d3c3){const _0x39d065=a41_0x35cb,_0x3f281e=_0x3fdadc();while(!![]){try{const _0x4f0dff=-parseInt(_0x39d065(0xa7))/0x1*(parseInt(_0x39d065(0xa5))/0x2)+-parseInt(_0x39d065(0xa8))/0x3+-parseInt(_0x39d065(0xa4))/0x4+-parseInt(_0x39d065(0xa9))/0x5+-parseInt(_0x39d065(0xa6))/0x6+-parseInt(_0x39d065(0xa2))/0x7+parseInt(_0x39d065(0xa3))/0x8;if(_0x4f0dff===_0x47d3c3)break;else _0x3f281e['push'](_0x3f281e['shift']());}catch(_0x25909d){_0x3f281e['push'](_0x3f281e['shift']());}}}(a41_0x4d1c,0x7ccdc));import{notificationConfigList}from'../../commands/notification/config-list.js';function a41_0x4d1c(){const _0x16b327=['2527203jyHAZR','25842608bffOLI','3951248clQLBW','78ajhsOe','1535628KaRyvX','7605bBHVGj','948582qCxlMG','2507810laAmas'];a41_0x4d1c=function(){return _0x16b327;};return a41_0x4d1c();}function a41_0x35cb(_0x4914c6,_0x5c11ca){_0x4914c6=_0x4914c6-0xa2;const _0x4d1c89=a41_0x4d1c();let _0x35cb46=_0x4d1c89[_0x4914c6];return _0x35cb46;}export const notificationDefinitions=[notificationConfigList];
1
+ function a41_0x4e0a(_0x5de91c,_0x1f935a){_0x5de91c=_0x5de91c-0xcf;const _0x3ff456=a41_0x3ff4();let _0x4e0a03=_0x3ff456[_0x5de91c];return _0x4e0a03;}function a41_0x3ff4(){const _0x542494=['6134LBYJCz','858sYfKtX','108ZUzoJJ','2976920fHOOJI','78575KKIevP','464uQXWOW','46329500WyLNCc','743856FILfoq','379839iQuDxX','2550545LAUJhm'];a41_0x3ff4=function(){return _0x542494;};return a41_0x3ff4();}(function(_0x443245,_0xfa908f){const _0x255f37=a41_0x4e0a,_0x2f1524=_0x443245();while(!![]){try{const _0x1aa6ab=parseInt(_0x255f37(0xd2))/0x1*(parseInt(_0x255f37(0xd7))/0x2)+parseInt(_0x255f37(0xd5))/0x3+parseInt(_0x255f37(0xd0))/0x4+parseInt(_0x255f37(0xd6))/0x5+parseInt(_0x255f37(0xd8))/0x6*(parseInt(_0x255f37(0xd1))/0x7)+parseInt(_0x255f37(0xd4))/0x8*(parseInt(_0x255f37(0xcf))/0x9)+-parseInt(_0x255f37(0xd3))/0xa;if(_0x1aa6ab===_0xfa908f)break;else _0x2f1524['push'](_0x2f1524['shift']());}catch(_0x9cd72e){_0x2f1524['push'](_0x2f1524['shift']());}}}(a41_0x3ff4,0xd9c91));import{notificationConfigList}from'../../commands/notification/config-list.js';export const notificationDefinitions=[notificationConfigList];
@@ -1 +1 @@
1
- const a42_0x590f72=a42_0x19f5;(function(_0x336957,_0x31fc65){const _0x574929=a42_0x19f5,_0x1968a8=_0x336957();while(!![]){try{const _0x337e5d=-parseInt(_0x574929(0x203))/0x1*(parseInt(_0x574929(0x206))/0x2)+-parseInt(_0x574929(0x20d))/0x3*(parseInt(_0x574929(0x205))/0x4)+-parseInt(_0x574929(0x1fb))/0x5*(parseInt(_0x574929(0x210))/0x6)+parseInt(_0x574929(0x1fc))/0x7*(parseInt(_0x574929(0x1fa))/0x8)+-parseInt(_0x574929(0x209))/0x9+parseInt(_0x574929(0x20e))/0xa+parseInt(_0x574929(0x202))/0xb;if(_0x337e5d===_0x31fc65)break;else _0x1968a8['push'](_0x1968a8['shift']());}catch(_0x13d5f9){_0x1968a8['push'](_0x1968a8['shift']());}}}(a42_0x55d8,0x2ea79));function a42_0x19f5(_0x2cda25,_0x46ed36){_0x2cda25=_0x2cda25-0x1f4;const _0x55d81=a42_0x55d8();let _0x19f5f3=_0x55d81[_0x2cda25];return _0x19f5f3;}import{CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=[a42_0x590f72(0x1fd),'FEISHU',a42_0x590f72(0x1ff),a42_0x590f72(0x200),a42_0x590f72(0x1f4)];export function readNotificationChannelType(_0x5d111c){const _0x3b1b7d=a42_0x590f72,_0x25b48e=_0x5d111c['str']('type')[_0x3b1b7d(0x20a)]()||_0x3b1b7d(0x1fd);if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x25b48e))throw CliErrors['validation'](_0x3b1b7d(0x204)+_0x25b48e,_0x3b1b7d(0x208)+NOTIFICATION_CHANNEL_TYPES[_0x3b1b7d(0x1fe)](',\x20')+'.');return _0x25b48e;}export function projectNotificationListConfig(_0x2e771f,_0x3e57cf){const _0x490995=a42_0x590f72,_0x23b063=requireResponseObject(_0x2e771f,_0x3e57cf);return{'configCode':requireResponseString(_0x23b063[_0x490995(0x1f7)],_0x490995(0x1f7),_0x3e57cf),'configName':requireResponseString(_0x23b063[_0x490995(0x20f)],_0x490995(0x20f),_0x3e57cf),'channelType':requireResponseString(_0x23b063['channelType'],'channelType',_0x3e57cf),'description':normalizeNullableString(_0x23b063[_0x490995(0x1f5)])};}function a42_0x55d8(){const _0x5dea80=['object','4993054jgQBgd','40662NySwoa','Invalid\x20--type:\x20','15968ntZBDA','4uMUGcW','\x20is\x20missing\x20required\x20field\x20\x22','Allowed\x20values:\x20','2911833YpUQCL','trim','\x20must\x20be\x20an\x20object.','Invalid\x20notification\x20config\x20response.','123gnsZzn','2873350ZFJJwW','configName','624Sxedlu','WEBHOOK','description','string','configCode','apiError','isArray','184mdgRZz','7435EqwYtd','52661EOAXCh','EMAIL','join','DINGTALK','WECOM'];a42_0x55d8=function(){return _0x5dea80;};return a42_0x55d8();}function requireResponseObject(_0x2fea1a,_0x5ef996){const _0x5571bc=a42_0x590f72;if(typeof _0x2fea1a!==_0x5571bc(0x201)||_0x2fea1a===null||Array[_0x5571bc(0x1f9)](_0x2fea1a))throw CliErrors[_0x5571bc(0x1f8)](_0x5571bc(0x20c),'Item\x20'+(_0x5ef996+0x1)+_0x5571bc(0x20b));return _0x2fea1a;}function requireResponseString(_0x4a46be,_0x28e192,_0x1dccf0){const _0x289e7e=a42_0x590f72;if(typeof _0x4a46be!==_0x289e7e(0x1f6)||!_0x4a46be[_0x289e7e(0x20a)]())throw CliErrors['apiError'](_0x289e7e(0x20c),'Item\x20'+(_0x1dccf0+0x1)+_0x289e7e(0x207)+_0x28e192+'\x22.');return _0x4a46be[_0x289e7e(0x20a)]();}function normalizeNullableString(_0x4bb8dd){const _0x148673=a42_0x590f72;return typeof _0x4bb8dd===_0x148673(0x1f6)&&_0x4bb8dd[_0x148673(0x20a)]()?_0x4bb8dd[_0x148673(0x20a)]():null;}
1
+ const a42_0x29301c=a42_0x8d19;(function(_0x375f1b,_0x5a380b){const _0x29fc31=a42_0x8d19,_0x2cfc09=_0x375f1b();while(!![]){try{const _0x2e7156=parseInt(_0x29fc31(0xb3))/0x1+-parseInt(_0x29fc31(0xae))/0x2+-parseInt(_0x29fc31(0xb7))/0x3+parseInt(_0x29fc31(0xc5))/0x4*(-parseInt(_0x29fc31(0xbb))/0x5)+parseInt(_0x29fc31(0xbe))/0x6*(parseInt(_0x29fc31(0xc2))/0x7)+parseInt(_0x29fc31(0xc7))/0x8*(parseInt(_0x29fc31(0xad))/0x9)+-parseInt(_0x29fc31(0xc4))/0xa*(-parseInt(_0x29fc31(0xb1))/0xb);if(_0x2e7156===_0x5a380b)break;else _0x2cfc09['push'](_0x2cfc09['shift']());}catch(_0x578dc1){_0x2cfc09['push'](_0x2cfc09['shift']());}}}(a42_0x1e38,0xa3f9f));import{CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=['EMAIL',a42_0x29301c(0xc6),'DINGTALK',a42_0x29301c(0xb2),a42_0x29301c(0xac)];export function readNotificationChannelType(_0x5bedb9){const _0xbd601=a42_0x29301c,_0x34f853=_0x5bedb9[_0xbd601(0xb4)](_0xbd601(0xba))[_0xbd601(0xc8)]()||_0xbd601(0xb6);if(!NOTIFICATION_CHANNEL_TYPES[_0xbd601(0xc9)](_0x34f853))throw CliErrors['validation'](_0xbd601(0xb9)+_0x34f853,_0xbd601(0xaf)+NOTIFICATION_CHANNEL_TYPES[_0xbd601(0xbf)](',\x20')+'.');return _0x34f853;}export function projectNotificationListConfig(_0x1d633b,_0x531918){const _0x77ec85=a42_0x29301c,_0x361982=requireResponseObject(_0x1d633b,_0x531918);return{'configCode':requireResponseString(_0x361982[_0x77ec85(0xc1)],_0x77ec85(0xc1),_0x531918),'configName':requireResponseString(_0x361982[_0x77ec85(0xb5)],_0x77ec85(0xb5),_0x531918),'channelType':requireResponseString(_0x361982[_0x77ec85(0xb0)],_0x77ec85(0xb0),_0x531918),'description':normalizeNullableString(_0x361982['description'])};}function requireResponseObject(_0x153a07,_0x4d7d6f){const _0x18935a=a42_0x29301c;if(typeof _0x153a07!==_0x18935a(0xbd)||_0x153a07===null||Array['isArray'](_0x153a07))throw CliErrors[_0x18935a(0xc0)](_0x18935a(0xb8),'Item\x20'+(_0x4d7d6f+0x1)+_0x18935a(0xbc));return _0x153a07;}function a42_0x1e38(){const _0x38136b=['259FAmJkf','\x20is\x20missing\x20required\x20field\x20\x22','119690RigDwr','4UBOlCX','FEISHU','568xobXDf','trim','includes','Item\x20','string','WEBHOOK','69957RLokud','479712iNtflo','Allowed\x20values:\x20','channelType','1342nDeMhR','WECOM','109498ljeqaZ','str','configName','EMAIL','1916844qhhkug','Invalid\x20notification\x20config\x20response.','Invalid\x20--type:\x20','type','4267845TtOHjA','\x20must\x20be\x20an\x20object.','object','45798UEcyqI','join','apiError','configCode'];a42_0x1e38=function(){return _0x38136b;};return a42_0x1e38();}function a42_0x8d19(_0x2acf74,_0x5493db){_0x2acf74=_0x2acf74-0xaa;const _0x1e381e=a42_0x1e38();let _0x8d1922=_0x1e381e[_0x2acf74];return _0x8d1922;}function requireResponseString(_0x4aed39,_0xdbfebf,_0x30088f){const _0x4bfd67=a42_0x29301c;if(typeof _0x4aed39!==_0x4bfd67(0xab)||!_0x4aed39[_0x4bfd67(0xc8)]())throw CliErrors[_0x4bfd67(0xc0)](_0x4bfd67(0xb8),_0x4bfd67(0xaa)+(_0x30088f+0x1)+_0x4bfd67(0xc3)+_0xdbfebf+'\x22.');return _0x4aed39[_0x4bfd67(0xc8)]();}function normalizeNullableString(_0x170027){const _0x3e54f3=a42_0x29301c;return typeof _0x170027==='string'&&_0x170027[_0x3e54f3(0xc8)]()?_0x170027[_0x3e54f3(0xc8)]():null;}
@@ -1 +1 @@
1
- const a43_0x885f55=a43_0x4da8;(function(_0x4c0d22,_0x3c3833){const _0x2e6f98=a43_0x4da8,_0x261257=_0x4c0d22();while(!![]){try{const _0x4a826d=parseInt(_0x2e6f98(0x177))/0x1*(parseInt(_0x2e6f98(0x1a8))/0x2)+parseInt(_0x2e6f98(0x173))/0x3*(-parseInt(_0x2e6f98(0x174))/0x4)+parseInt(_0x2e6f98(0x194))/0x5*(-parseInt(_0x2e6f98(0x18d))/0x6)+-parseInt(_0x2e6f98(0x18b))/0x7+-parseInt(_0x2e6f98(0x19f))/0x8*(parseInt(_0x2e6f98(0x17b))/0x9)+-parseInt(_0x2e6f98(0x185))/0xa*(-parseInt(_0x2e6f98(0x186))/0xb)+parseInt(_0x2e6f98(0x18e))/0xc;if(_0x4a826d===_0x3c3833)break;else _0x261257['push'](_0x261257['shift']());}catch(_0x983ad0){_0x261257['push'](_0x261257['shift']());}}}(a43_0x2213,0x49de1));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';function a43_0x4da8(_0x4673e1,_0x37be7e){_0x4673e1=_0x4673e1-0x173;const _0x2213a4=a43_0x2213();let _0x4da856=_0x2213a4[_0x4673e1];return _0x4da856;}import{queryRuntimeFileUrl,recognizeRuntimeOcr,uploadRuntimeFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';function a43_0x2213(){const _0x4192f8=['image-file','trim','24kzSzNi','Preview:\x20recognize\x20','IdCard','invoice','<fileUrl\x20returned\x20by\x20/client/queryFileUrl>','\x20OCR','scene','/client/uploadFile','count','2LhYhvE','/client/ocr','description','77199TvDkgM','40AgFshD','ocr','length','220089BPGFTJ','image-url','general','imageUrl','829845UeatYd','Local\x20image\x20or\x20PDF\x20file;\x20current\x20backend\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','idCard','validation','path','Invoice','Table','body','filter','POST','2885310qpAEXg','11ePYviv','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','apiError','File\x20URL\x20response\x20missing\x20fileUrl.','read','2317154VGfKsU','General','6sPWKhk','8165940XZGKiS','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','filePath','Publicly\x20accessible\x20image\x20or\x20file\x20URL','imageFile','form','107935VDkfMV','appCode','<filePath\x20returned\x20by\x20/client/uploadFile>','idcard','fileUrl','str','string','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','.\x20Supported\x20scenes:\x20'];a43_0x2213=function(){return _0x4192f8;};return a43_0x2213();}const SUPPORTED_SCENES=[a43_0x885f55(0x1a2),a43_0x885f55(0x179),a43_0x885f55(0x193),a43_0x885f55(0x17d)],SCENE_TO_LEGACY_TYPE={'invoice':a43_0x885f55(0x180),'general':a43_0x885f55(0x18c),'form':a43_0x885f55(0x181),'idCard':a43_0x885f55(0x1a1)},SCENE_FLAG={'name':'scene','type':'string','required':!![],'enum':[...SUPPORTED_SCENES],'description':a43_0x885f55(0x187)},IMAGE_FILE_FLAG={'name':a43_0x885f55(0x19d),'type':a43_0x885f55(0x19a),'description':a43_0x885f55(0x17c)},IMAGE_URL_FLAG={'name':a43_0x885f55(0x178),'type':a43_0x885f55(0x19a),'description':a43_0x885f55(0x191)};function normalizeScene(_0x2b2412){const _0xb1a5d3=a43_0x885f55,_0x1dad7b=_0x2b2412[_0xb1a5d3(0x19e)]()['toLowerCase']();if(_0x1dad7b===_0xb1a5d3(0x197))return _0xb1a5d3(0x17d);if(_0x1dad7b===_0xb1a5d3(0x1a2)||_0x1dad7b===_0xb1a5d3(0x179)||_0x1dad7b===_0xb1a5d3(0x193))return _0x1dad7b;throw CliErrors[_0xb1a5d3(0x17e)]('Unsupported\x20OCR\x20scene:\x20'+_0x2b2412+_0xb1a5d3(0x19c)+SUPPORTED_SCENES['join'](',\x20'));}function selectedInputs(_0x2c7f6e){const _0x12761d=a43_0x885f55,_0x199449=_0x2c7f6e['str']('image-file')[_0x12761d(0x19e)](),_0x1ed268=_0x2c7f6e[_0x12761d(0x199)](_0x12761d(0x178))[_0x12761d(0x19e)]();return{'imageFile':_0x199449,'imageUrl':_0x1ed268,'count':[_0x199449,_0x1ed268][_0x12761d(0x183)](Boolean)[_0x12761d(0x176)]};}function validateInputSelection(_0xd41114){const _0x24b043=a43_0x885f55,_0x5aaa6e=selectedInputs(_0xd41114);if(_0x5aaa6e[_0x24b043(0x1a7)]!==0x1)throw CliErrors[_0x24b043(0x17e)](_0x24b043(0x18f));return _0x5aaa6e;}function withScene(_0x1e4fc9,_0x20e33c,_0x5dec19){const _0x5a2282=a43_0x885f55;return{..._0x1e4fc9,'scene':_0x20e33c,..._0x5dec19?{'sourceFile':{'fileName':_0x5dec19['fileName'],'filePath':_0x5dec19[_0x5a2282(0x190)]}}:{}};}const ocrRecognize={'service':a43_0x885f55(0x175),'command':'recognize','description':a43_0x885f55(0x19b),'risk':a43_0x885f55(0x18a),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x23d8fa){const _0x27cf59=a43_0x885f55,_0x501ba2=normalizeScene(_0x23d8fa[_0x27cf59(0x199)](_0x27cf59(0x1a5))),_0x14b8d5=SCENE_TO_LEGACY_TYPE[_0x501ba2],_0x5c5450=validateInputSelection(_0x23d8fa);if(_0x5c5450[_0x27cf59(0x17a)])return dryRun('POST',_0x27cf59(0x1a9))[_0x27cf59(0x182)]({'appCode':_0x23d8fa['appCode'],'url':_0x5c5450[_0x27cf59(0x17a)],'type':_0x14b8d5})[_0x27cf59(0x1aa)](_0x27cf59(0x1a0)+_0x501ba2+'\x20OCR\x20from\x20URL')['build']();const _0x36fa14=requireRuntimeUploadFile(_0x5c5450['imageFile'],_0x27cf59(0x19d));return dryRun(_0x27cf59(0x184),_0x27cf59(0x1a6))['body']({'steps':[{'method':_0x27cf59(0x184),'url':_0x27cf59(0x1a6),'body':{'appCode':_0x23d8fa[_0x27cf59(0x195)],'multipart':{'file':_0x36fa14}}},{'method':_0x27cf59(0x184),'url':'/client/queryFileUrl','body':{'filePath':_0x27cf59(0x196),'downloadFlag':![]}},{'method':_0x27cf59(0x184),'url':'/client/ocr','body':{'appCode':_0x23d8fa[_0x27cf59(0x195)],'url':_0x27cf59(0x1a3),'type':_0x14b8d5}}]})[_0x27cf59(0x1aa)]('Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20'+_0x501ba2+_0x27cf59(0x1a4))['build']();},async 'execute'(_0x31e6ea){const _0xc94b25=a43_0x885f55,_0x3f0e30=normalizeScene(_0x31e6ea['str'](_0xc94b25(0x1a5))),_0x51fe21=SCENE_TO_LEGACY_TYPE[_0x3f0e30],_0x5d7689=validateInputSelection(_0x31e6ea);if(_0x5d7689[_0xc94b25(0x17a)]){const _0x5afdfd=await recognizeRuntimeOcr(_0x31e6ea[_0xc94b25(0x195)],{'url':_0x5d7689[_0xc94b25(0x17a)],'type':_0x51fe21});return{'ok':!![],'data':withScene(_0x5afdfd,_0x3f0e30)};}const _0x2d6745=requireRuntimeUploadFile(_0x5d7689[_0xc94b25(0x192)],_0xc94b25(0x19d)),_0x44c522=await uploadRuntimeFile(_0x31e6ea[_0xc94b25(0x195)],_0x2d6745[_0xc94b25(0x17f)]);if(!_0x44c522[_0xc94b25(0x190)])throw CliErrors[_0xc94b25(0x188)]('File\x20upload\x20response\x20missing\x20filePath.');const _0x2b4e92=await queryRuntimeFileUrl(_0x44c522[_0xc94b25(0x190)],{'download':![]});if(!_0x2b4e92[_0xc94b25(0x198)])throw CliErrors['apiError'](_0xc94b25(0x189));const _0x390e60=await recognizeRuntimeOcr(_0x31e6ea[_0xc94b25(0x195)],{'url':_0x2b4e92[_0xc94b25(0x198)],'type':_0x51fe21});return{'ok':!![],'data':withScene(_0x390e60,_0x3f0e30,_0x44c522)};}};export const ocrDefinitions=[ocrRecognize];
1
+ const a43_0x37b3b7=a43_0x4eb4;(function(_0x20de74,_0x24ada5){const _0x9791a8=a43_0x4eb4,_0x418f94=_0x20de74();while(!![]){try{const _0x253d39=parseInt(_0x9791a8(0x19d))/0x1+-parseInt(_0x9791a8(0x1bb))/0x2+-parseInt(_0x9791a8(0x1b2))/0x3+parseInt(_0x9791a8(0x1a9))/0x4*(parseInt(_0x9791a8(0x1ac))/0x5)+parseInt(_0x9791a8(0x1b0))/0x6*(-parseInt(_0x9791a8(0x194))/0x7)+-parseInt(_0x9791a8(0x1a8))/0x8+parseInt(_0x9791a8(0x1a6))/0x9;if(_0x253d39===_0x24ada5)break;else _0x418f94['push'](_0x418f94['shift']());}catch(_0x5f57e4){_0x418f94['push'](_0x418f94['shift']());}}}(a43_0x3c8c,0x7e30f));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,recognizeRuntimeOcr,uploadRuntimeFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';function a43_0x3c8c(){const _0x1c7ebc=['appCode','read','Preview:\x20recognize\x20','form','631856eKWpRv','scene','image-url','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','filePath','imageUrl','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','str','general','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','65779PDdRUJ','body','Publicly\x20accessible\x20image\x20or\x20file\x20URL','<fileUrl\x20returned\x20by\x20/client/queryFileUrl>','IdCard','idCard','image-file','<filePath\x20returned\x20by\x20/client/uploadFile>','join','926746NiEbHO','apiError','recognize','imageFile','fileName','string','Invoice','description','ocr','5605407RtXfgp','build','6165712LthEwa','20hVoRvA','idcard','/client/ocr','611795qBPvQn','/client/uploadFile','\x20OCR\x20from\x20URL','fileUrl','6NsqcGf','POST','1645338maOrBe','trim','File\x20URL\x20response\x20missing\x20fileUrl.','validation','invoice'];a43_0x3c8c=function(){return _0x1c7ebc;};return a43_0x3c8c();}const SUPPORTED_SCENES=['invoice',a43_0x37b3b7(0x192),a43_0x37b3b7(0x1ba),a43_0x37b3b7(0x199)],SCENE_TO_LEGACY_TYPE={'invoice':a43_0x37b3b7(0x1a3),'general':'General','form':'Table','idCard':a43_0x37b3b7(0x198)},SCENE_FLAG={'name':a43_0x37b3b7(0x1bc),'type':a43_0x37b3b7(0x1a2),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a43_0x37b3b7(0x190)},IMAGE_FILE_FLAG={'name':a43_0x37b3b7(0x19a),'type':a43_0x37b3b7(0x1a2),'description':'Local\x20image\x20or\x20PDF\x20file;\x20current\x20backend\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR'},IMAGE_URL_FLAG={'name':'image-url','type':a43_0x37b3b7(0x1a2),'description':a43_0x37b3b7(0x196)};function normalizeScene(_0x50a98e){const _0x113015=a43_0x37b3b7,_0x5c59c9=_0x50a98e[_0x113015(0x1b3)]()['toLowerCase']();if(_0x5c59c9===_0x113015(0x1aa))return'idCard';if(_0x5c59c9===_0x113015(0x1b6)||_0x5c59c9===_0x113015(0x192)||_0x5c59c9===_0x113015(0x1ba))return _0x5c59c9;throw CliErrors[_0x113015(0x1b5)]('Unsupported\x20OCR\x20scene:\x20'+_0x50a98e+'.\x20Supported\x20scenes:\x20'+SUPPORTED_SCENES[_0x113015(0x19c)](',\x20'));}function selectedInputs(_0x42a7a8){const _0x7d3334=a43_0x37b3b7,_0x548e0c=_0x42a7a8['str'](_0x7d3334(0x19a))[_0x7d3334(0x1b3)](),_0x2fff6e=_0x42a7a8[_0x7d3334(0x191)](_0x7d3334(0x1bd))[_0x7d3334(0x1b3)]();return{'imageFile':_0x548e0c,'imageUrl':_0x2fff6e,'count':[_0x548e0c,_0x2fff6e]['filter'](Boolean)['length']};}function validateInputSelection(_0x508094){const _0x2d396b=a43_0x37b3b7,_0x28624c=selectedInputs(_0x508094);if(_0x28624c['count']!==0x1)throw CliErrors[_0x2d396b(0x1b5)](_0x2d396b(0x193));return _0x28624c;}function a43_0x4eb4(_0x41ddfc,_0xe156a3){_0x41ddfc=_0x41ddfc-0x18f;const _0x3c8cd2=a43_0x3c8c();let _0x4eb43a=_0x3c8cd2[_0x41ddfc];return _0x4eb43a;}function withScene(_0x4c1196,_0xa069e7,_0x5ccd61){const _0x485e5f=a43_0x37b3b7;return{..._0x4c1196,'scene':_0xa069e7,..._0x5ccd61?{'sourceFile':{'fileName':_0x5ccd61[_0x485e5f(0x1a1)],'filePath':_0x5ccd61[_0x485e5f(0x1bf)]}}:{}};}const ocrRecognize={'service':a43_0x37b3b7(0x1a5),'command':a43_0x37b3b7(0x19f),'description':a43_0x37b3b7(0x1be),'risk':a43_0x37b3b7(0x1b8),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x384b9e){const _0x3483cc=a43_0x37b3b7,_0x103ebe=normalizeScene(_0x384b9e[_0x3483cc(0x191)](_0x3483cc(0x1bc))),_0x3540e6=SCENE_TO_LEGACY_TYPE[_0x103ebe],_0x33c631=validateInputSelection(_0x384b9e);if(_0x33c631[_0x3483cc(0x18f)])return dryRun(_0x3483cc(0x1b1),_0x3483cc(0x1ab))['body']({'appCode':_0x384b9e[_0x3483cc(0x1b7)],'url':_0x33c631[_0x3483cc(0x18f)],'type':_0x3540e6})[_0x3483cc(0x1a4)](_0x3483cc(0x1b9)+_0x103ebe+_0x3483cc(0x1ae))[_0x3483cc(0x1a7)]();const _0x1ccedf=requireRuntimeUploadFile(_0x33c631[_0x3483cc(0x1a0)],_0x3483cc(0x19a));return dryRun('POST','/client/uploadFile')[_0x3483cc(0x195)]({'steps':[{'method':_0x3483cc(0x1b1),'url':_0x3483cc(0x1ad),'body':{'appCode':_0x384b9e[_0x3483cc(0x1b7)],'multipart':{'file':_0x1ccedf}}},{'method':_0x3483cc(0x1b1),'url':'/client/queryFileUrl','body':{'filePath':_0x3483cc(0x19b),'downloadFlag':![]}},{'method':_0x3483cc(0x1b1),'url':_0x3483cc(0x1ab),'body':{'appCode':_0x384b9e[_0x3483cc(0x1b7)],'url':_0x3483cc(0x197),'type':_0x3540e6}}]})[_0x3483cc(0x1a4)]('Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20'+_0x103ebe+'\x20OCR')['build']();},async 'execute'(_0x299f73){const _0x36d77e=a43_0x37b3b7,_0x35f499=normalizeScene(_0x299f73[_0x36d77e(0x191)](_0x36d77e(0x1bc))),_0x248674=SCENE_TO_LEGACY_TYPE[_0x35f499],_0x5d4016=validateInputSelection(_0x299f73);if(_0x5d4016['imageUrl']){const _0x5b4153=await recognizeRuntimeOcr(_0x299f73[_0x36d77e(0x1b7)],{'url':_0x5d4016['imageUrl'],'type':_0x248674});return{'ok':!![],'data':withScene(_0x5b4153,_0x35f499)};}const _0x2127b6=requireRuntimeUploadFile(_0x5d4016['imageFile'],_0x36d77e(0x19a)),_0x326899=await uploadRuntimeFile(_0x299f73[_0x36d77e(0x1b7)],_0x2127b6['path']);if(!_0x326899[_0x36d77e(0x1bf)])throw CliErrors[_0x36d77e(0x19e)]('File\x20upload\x20response\x20missing\x20filePath.');const _0x3592d5=await queryRuntimeFileUrl(_0x326899[_0x36d77e(0x1bf)],{'download':![]});if(!_0x3592d5[_0x36d77e(0x1af)])throw CliErrors[_0x36d77e(0x19e)](_0x36d77e(0x1b4));const _0x47b048=await recognizeRuntimeOcr(_0x299f73[_0x36d77e(0x1b7)],{'url':_0x3592d5[_0x36d77e(0x1af)],'type':_0x248674});return{'ok':!![],'data':withScene(_0x47b048,_0x35f499,_0x326899)};}};export const ocrDefinitions=[ocrRecognize];
@@ -1 +1 @@
1
- const a44_0x2c4c26=a44_0x2212;(function(_0x661b0,_0x3af584){const _0xfef7ee=a44_0x2212,_0x298c0c=_0x661b0();while(!![]){try{const _0x36769d=-parseInt(_0xfef7ee(0x14a))/0x1+-parseInt(_0xfef7ee(0x149))/0x2*(-parseInt(_0xfef7ee(0x14e))/0x3)+parseInt(_0xfef7ee(0x141))/0x4*(parseInt(_0xfef7ee(0x14b))/0x5)+parseInt(_0xfef7ee(0x13e))/0x6*(parseInt(_0xfef7ee(0x14f))/0x7)+parseInt(_0xfef7ee(0x147))/0x8+parseInt(_0xfef7ee(0x143))/0x9+-parseInt(_0xfef7ee(0x150))/0xa;if(_0x36769d===_0x3af584)break;else _0x298c0c['push'](_0x298c0c['shift']());}catch(_0x3e72a3){_0x298c0c['push'](_0x298c0c['shift']());}}}(a44_0x3f67,0x33420));import{listRuntimeDatasetPermits,listRuntimeDatasetRolePermits}from'../../core/api-client.js';import{resolveRuntimeRoleRef}from'../../commands/role/shared.js';function a44_0x3f67(){const _0x3025be=['Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name','str','39219iqydRv','7wPPrxV','3248860tcHWIs','2058822lZGiyq','trim','Show\x20runtime\x20dataset\x20permissions,\x20optionally\x20evaluated\x20for\x20one\x20role','16bEluQv','read','1981026VNaFhU','appCode','role','runtime','409000eMoTNO','roleType','26SJJlaO','330135QcKjby','100810jxtkpW'];a44_0x3f67=function(){return _0x3025be;};return a44_0x3f67();}function a44_0x2212(_0x14c0e9,_0x47273f){_0x14c0e9=_0x14c0e9-0x13e;const _0x3f6710=a44_0x3f67();let _0x221283=_0x3f6710[_0x14c0e9];return _0x221283;}export const permitDatasetGet={'service':'permit','command':'dataset-get','description':a44_0x2c4c26(0x140),'risk':a44_0x2c4c26(0x142),'flags':[{'name':a44_0x2c4c26(0x145),'type':'string','description':a44_0x2c4c26(0x14c)}],async 'execute'(_0x51bc6e){const _0x18bc6d=a44_0x2c4c26,_0x468c70=_0x51bc6e[_0x18bc6d(0x14d)](_0x18bc6d(0x145))[_0x18bc6d(0x13f)]();if(!_0x468c70)return{'ok':!![],'data':{'scope':_0x18bc6d(0x146),'datasets':await listRuntimeDatasetRolePermits(_0x51bc6e[_0x18bc6d(0x144)])}};const _0x408db8=await resolveRuntimeRoleRef(_0x51bc6e[_0x18bc6d(0x144)],_0x468c70);return{'ok':!![],'data':{'scope':_0x18bc6d(0x146),'role':{'id':_0x408db8['id'],'roleName':_0x408db8['roleName'],'roleType':_0x408db8[_0x18bc6d(0x148)]},'datasets':await listRuntimeDatasetPermits(_0x51bc6e[_0x18bc6d(0x144)],_0x408db8['id'])}};}};
1
+ const a44_0x44eb52=a44_0x27e8;function a44_0x5b8d(){const _0x41373c=['7601931LgWlyM','955UdTpvq','permit','14622tvsqhf','roleName','runtime','110568mvtkRy','role','roleType','18660XHYJPM','appCode','205535oIJkew','Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name','1315958gTlzQW','string','267kVZKLf','trim','772308SLnRaw','Show\x20runtime\x20dataset\x20permissions,\x20optionally\x20evaluated\x20for\x20one\x20role'];a44_0x5b8d=function(){return _0x41373c;};return a44_0x5b8d();}function a44_0x27e8(_0x4d0bda,_0x284cc0){_0x4d0bda=_0x4d0bda-0xf4;const _0x5b8dc9=a44_0x5b8d();let _0x27e85c=_0x5b8dc9[_0x4d0bda];return _0x27e85c;}(function(_0x5d26e8,_0x4496f1){const _0x16486b=a44_0x27e8,_0x4b686e=_0x5d26e8();while(!![]){try{const _0x10f54d=parseInt(_0x16486b(0xf4))/0x1+parseInt(_0x16486b(0xfa))/0x2+-parseInt(_0x16486b(0xf8))/0x3*(parseInt(_0x16486b(0x105))/0x4)+-parseInt(_0x16486b(0xfd))/0x5*(parseInt(_0x16486b(0xff))/0x6)+-parseInt(_0x16486b(0xf6))/0x7+-parseInt(_0x16486b(0x102))/0x8+parseInt(_0x16486b(0xfc))/0x9;if(_0x10f54d===_0x4496f1)break;else _0x4b686e['push'](_0x4b686e['shift']());}catch(_0x4f5fb1){_0x4b686e['push'](_0x4b686e['shift']());}}}(a44_0x5b8d,0x56659));import{listRuntimeDatasetPermits,listRuntimeDatasetRolePermits}from'../../core/api-client.js';import{resolveRuntimeRoleRef}from'../../commands/role/shared.js';export const permitDatasetGet={'service':a44_0x44eb52(0xfe),'command':'dataset-get','description':a44_0x44eb52(0xfb),'risk':'read','flags':[{'name':'role','type':a44_0x44eb52(0xf7),'description':a44_0x44eb52(0xf5)}],async 'execute'(_0x3eab43){const _0x4751ca=a44_0x44eb52,_0x5ac524=_0x3eab43['str'](_0x4751ca(0x103))[_0x4751ca(0xf9)]();if(!_0x5ac524)return{'ok':!![],'data':{'scope':_0x4751ca(0x101),'datasets':await listRuntimeDatasetRolePermits(_0x3eab43[_0x4751ca(0x106)])}};const _0x2c8614=await resolveRuntimeRoleRef(_0x3eab43[_0x4751ca(0x106)],_0x5ac524);return{'ok':!![],'data':{'scope':_0x4751ca(0x101),'role':{'id':_0x2c8614['id'],'roleName':_0x2c8614[_0x4751ca(0x100)],'roleType':_0x2c8614[_0x4751ca(0x104)]},'datasets':await listRuntimeDatasetPermits(_0x3eab43[_0x4751ca(0x106)],_0x2c8614['id'])}};}};
@@ -1 +1 @@
1
- const a45_0x27027a=a45_0x1d57;(function(_0x48c787,_0x3f0557){const _0x4125da=a45_0x1d57,_0x5937ed=_0x48c787();while(!![]){try{const _0x3101f0=-parseInt(_0x4125da(0xba))/0x1*(-parseInt(_0x4125da(0xe2))/0x2)+-parseInt(_0x4125da(0xb2))/0x3+-parseInt(_0x4125da(0xdf))/0x4*(parseInt(_0x4125da(0xd7))/0x5)+parseInt(_0x4125da(0xd3))/0x6+parseInt(_0x4125da(0xcf))/0x7*(parseInt(_0x4125da(0xcb))/0x8)+-parseInt(_0x4125da(0xdd))/0x9*(parseInt(_0x4125da(0xb3))/0xa)+parseInt(_0x4125da(0xbe))/0xb;if(_0x3101f0===_0x3f0557)break;else _0x5937ed['push'](_0x5937ed['shift']());}catch(_0x386a8d){_0x5937ed['push'](_0x5937ed['shift']());}}}(a45_0x2ae0,0x3345c));import{listRuntimeDatasetRolePermits,listRuntimePermitRoles,saveRuntimeDatasetRolePermits}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';import{resolveRuntimeRoleRef}from'../../commands/role/shared.js';function a45_0x1d57(_0x2cf94d,_0x2348e5){_0x2cf94d=_0x2cf94d-0xa8;const _0x2ae0ac=a45_0x2ae0();let _0x1d57d6=_0x2ae0ac[_0x2cf94d];return _0x1d57d6;}import{applyRuntimeRolePermission,assertGrantOrRevoke,assertRuntimePermissionManager,assertRuntimePermitRoleConfigurable,GRANT_FLAG,REVOKE_FLAG,ROLE_REF_FLAG,runtimePermitWriteResult,splitRefs}from'../../commands/permit/shared.js';const DATA_ACTIONS=['DATA_CREATE','DATA_UPDATE',a45_0x27027a(0xd0),'DATA_DETAIL',a45_0x27027a(0xd4),'DATA_ROW'],DATASETS_FLAG={'name':'datasets','type':'string','required':!![],'description':a45_0x27027a(0xd1)},ACTIONS_FLAG={'name':a45_0x27027a(0xc5),'type':a45_0x27027a(0xe0),'required':!![],'description':a45_0x27027a(0xae)+DATA_ACTIONS[a45_0x27027a(0xac)](',\x20')};function a45_0x2ae0(){const _0x39c63e=['revoke','1083894AQDnvS','DATA_EXPORT','--datasets','filter','10DDuRVQ','datasetCodes','bool','\x20already\x20reflects\x20','\x20does\x20not\x20expose\x20','grant','9sBkasO','POST','228164nUfBdW','string','body','365968KaDVnU','build','includes','find','Grant\x20or\x20revoke\x20selected\x20runtime\x20dataset\x20actions\x20for\x20one\x20role','after','Dataset\x20','resourceName','join','str','Comma-separated\x20actions:\x20','appCode','Preview:\x20','dataPermitList','465771ZqMRmv','3789590acdGQm','permitList','description','datasets','\x20was\x20not\x20found.','Grants\x20or\x20revokes\x20the\x20target\x20role\x20permission\x20for\x20the\x20given\x20dataset\x20actions.\x20Data\x20operations\x20for\x20users\x20in\x20that\x20role\x20will\x20change.','push','1Vsraet','Invalid\x20dataset\x20actions:\x20','\x20selected\x20runtime\x20dataset\x20actions','permit','1541012Gwkitg','changed','permitId','--actions','dataset-','dataset-set','datasetCode','actions','\x20for\x20role\x20','high-risk-write','length','rolePermit','operation','51576aZAaan','Runtime\x20dataset\x20','role','validation','385HFWzBh','DATA_DELETE','Comma-separated\x20runtime\x20dataset\x20codes'];a45_0x2ae0=function(){return _0x39c63e;};return a45_0x2ae0();}async function prepare(_0x4ed078){const _0x3cc3d5=a45_0x27027a;await assertRuntimePermissionManager(_0x4ed078[_0x3cc3d5(0xaf)]);const _0x4758b4=assertGrantOrRevoke(_0x4ed078['bool'](_0x3cc3d5(0xdc)),_0x4ed078[_0x3cc3d5(0xd9)](_0x3cc3d5(0xd2))),_0xbc9f3d=await resolveRuntimeRoleRef(_0x4ed078[_0x3cc3d5(0xaf)],_0x4ed078[_0x3cc3d5(0xad)]('role'));assertRuntimePermitRoleConfigurable(_0xbc9f3d);const _0x34634e=splitRefs(_0x4ed078[_0x3cc3d5(0xad)](_0x3cc3d5(0xb6)),_0x3cc3d5(0xd5)),_0x5ee2a0=[...new Set(splitRefs(_0x4ed078[_0x3cc3d5(0xad)](_0x3cc3d5(0xc5)),_0x3cc3d5(0xc1))['map'](_0x48f692=>_0x48f692['toUpperCase']()))],_0xd88ff8=_0x5ee2a0[_0x3cc3d5(0xd6)](_0x41bac2=>!DATA_ACTIONS[_0x3cc3d5(0xe4)](_0x41bac2));if(_0xd88ff8[_0x3cc3d5(0xc8)]>0x0)throw CliErrors[_0x3cc3d5(0xce)](_0x3cc3d5(0xbb)+_0xd88ff8[_0x3cc3d5(0xac)](',\x20')+'.');const _0x5ababe=await listRuntimeDatasetRolePermits(_0x4ed078[_0x3cc3d5(0xaf)]),_0x11c701=await listRuntimePermitRoles(_0x4ed078['appCode']),_0x25e648=[],_0x1bedff=[],_0x1905f6=[],_0xc88563=[];for(const _0x85fc7d of _0x34634e){const _0x313b74=_0x5ababe[_0x3cc3d5(0xe5)](_0x1e2721=>_0x1e2721[_0x3cc3d5(0xc4)]===_0x85fc7d);if(!_0x313b74)throw CliErrors['validation'](_0x3cc3d5(0xcc)+_0x85fc7d+_0x3cc3d5(0xb7));for(const _0x281b09 of _0x5ee2a0){const _0x592ece=_0x313b74[_0x3cc3d5(0xb1)]?.[_0x3cc3d5(0xe5)](_0x212111=>_0x212111['resourceType']===_0x281b09);if(!_0x592ece)throw CliErrors['validation'](_0x3cc3d5(0xaa)+_0x85fc7d+_0x3cc3d5(0xdb)+_0x281b09+'.');const _0x3b5b0a=applyRuntimeRolePermission(_0x592ece[_0x3cc3d5(0xc9)],_0xbc9f3d,_0x11c701,_0x4758b4);_0x1bedff['push']({'datasetCode':_0x85fc7d,'resourceType':_0x281b09,'rolePermit':_0x592ece[_0x3cc3d5(0xc9)]}),_0x1905f6['push']({'datasetCode':_0x85fc7d,'resourceType':_0x281b09,'rolePermit':_0x3b5b0a['roles']}),_0x3b5b0a[_0x3cc3d5(0xbf)]?_0x25e648[_0x3cc3d5(0xb9)]({..._0x592ece[_0x3cc3d5(0xc0)]!=null?{'id':_0x592ece[_0x3cc3d5(0xc0)]}:{},'appCode':_0x4ed078[_0x3cc3d5(0xaf)],'resourceCode':_0x85fc7d,'resourceType':_0x281b09,'resourceName':_0x592ece[_0x3cc3d5(0xab)],'rolePermit':_0x3b5b0a['roles']}):_0xc88563[_0x3cc3d5(0xb9)](_0x85fc7d+'/'+_0x281b09+_0x3cc3d5(0xda)+_0x4758b4+_0x3cc3d5(0xc6)+_0xbc9f3d['id']+'.');}}return{'operation':_0x4758b4,'role':_0xbc9f3d,'datasetCodes':_0x34634e,'actions':_0x5ee2a0,'permitList':_0x25e648,'before':_0x1bedff,'after':_0x1905f6,'warnings':_0xc88563};}export const permitDatasetSet={'service':a45_0x27027a(0xbd),'command':a45_0x27027a(0xc3),'description':a45_0x27027a(0xa8),'risk':a45_0x27027a(0xc7),'confirmationDescription':a45_0x27027a(0xb8),'flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,DATASETS_FLAG,ACTIONS_FLAG],async 'validate'(_0x44e16d){const _0x1bb3c7=a45_0x27027a;assertGrantOrRevoke(_0x44e16d[_0x1bb3c7(0xd9)](_0x1bb3c7(0xdc)),_0x44e16d[_0x1bb3c7(0xd9)](_0x1bb3c7(0xd2)));},async 'dryRun'(_0x60c907){const _0x14f3ca=a45_0x27027a,_0x383a06=await prepare(_0x60c907);return dryRun(_0x14f3ca(0xde),'/client/permit/resource/batch-save-dataset')[_0x14f3ca(0xe1)]({'appCode':_0x60c907[_0x14f3ca(0xaf)],'permitList':_0x383a06[_0x14f3ca(0xb4)]})[_0x14f3ca(0xb5)](_0x14f3ca(0xb0)+_0x383a06['operation']+_0x14f3ca(0xbc))[_0x14f3ca(0xe3)]();},async 'execute'(_0x1bbdac){const _0xc86a25=a45_0x27027a,_0x284b52=await prepare(_0x1bbdac);return _0x284b52[_0xc86a25(0xb4)][_0xc86a25(0xc8)]>0x0&&await saveRuntimeDatasetRolePermits(_0x1bbdac[_0xc86a25(0xaf)],_0x284b52[_0xc86a25(0xb4)]),{'ok':!![],'data':runtimePermitWriteResult(_0xc86a25(0xc2)+_0x284b52[_0xc86a25(0xca)],{'roleId':_0x284b52[_0xc86a25(0xcd)]['id'],'datasetCodes':_0x284b52[_0xc86a25(0xd8)],'actions':_0x284b52[_0xc86a25(0xc5)]},_0x284b52['before'],_0x284b52[_0xc86a25(0xa9)],{'method':'POST','path':'/client/permit/resource/batch-save-dataset'},_0x284b52['warnings'])};}};
1
+ const a45_0xac0270=a45_0xafc1;function a45_0x34cc(){const _0x1c76c9=['\x20already\x20reflects\x20','Comma-separated\x20runtime\x20dataset\x20codes','datasets','validation','\x20selected\x20runtime\x20dataset\x20actions','resourceType','str','--actions','Invalid\x20dataset\x20actions:\x20','after','rolePermit','join','618518lhQMEI','695379KKCuEw','412447jsUAKN','body','DATA_ROW','operation','changed','grant','\x20was\x20not\x20found.','role','appCode','high-risk-write','Runtime\x20dataset\x20','toUpperCase','includes','--datasets','string','DATA_DETAIL','\x20does\x20not\x20expose\x20','revoke','dataset-','find','12eTKWtn','roles','filter','actions','11912XbUlra','POST','permitList','85548ZbcAVN','datasetCode','Grant\x20or\x20revoke\x20selected\x20runtime\x20dataset\x20actions\x20for\x20one\x20role','2133JLKIdd','permitId','dataset-set','DATA_CREATE','1243780jcvrbr','push','Comma-separated\x20actions:\x20','DATA_UPDATE','map','bool','1092160zueZYS','Grants\x20or\x20revokes\x20the\x20target\x20role\x20permission\x20for\x20the\x20given\x20dataset\x20actions.\x20Data\x20operations\x20for\x20users\x20in\x20that\x20role\x20will\x20change.','DATA_EXPORT','/client/permit/resource/batch-save-dataset','Dataset\x20','dataPermitList'];a45_0x34cc=function(){return _0x1c76c9;};return a45_0x34cc();}(function(_0x1d660c,_0xd94ba5){const _0x4054fc=a45_0xafc1,_0x54d364=_0x1d660c();while(!![]){try{const _0x1e2141=-parseInt(_0x4054fc(0x197))/0x1+parseInt(_0x4054fc(0x17a))/0x2+parseInt(_0x4054fc(0x17b))/0x3+-parseInt(_0x4054fc(0x19e))/0x4+-parseInt(_0x4054fc(0x1a4))/0x5+parseInt(_0x4054fc(0x190))/0x6*(-parseInt(_0x4054fc(0x17c))/0x7)+-parseInt(_0x4054fc(0x194))/0x8*(-parseInt(_0x4054fc(0x19a))/0x9);if(_0x1e2141===_0xd94ba5)break;else _0x54d364['push'](_0x54d364['shift']());}catch(_0x27f283){_0x54d364['push'](_0x54d364['shift']());}}}(a45_0x34cc,0x2759a));import{listRuntimeDatasetRolePermits,listRuntimePermitRoles,saveRuntimeDatasetRolePermits}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';import{resolveRuntimeRoleRef}from'../../commands/role/shared.js';import{applyRuntimeRolePermission,assertGrantOrRevoke,assertRuntimePermissionManager,assertRuntimePermitRoleConfigurable,GRANT_FLAG,REVOKE_FLAG,ROLE_REF_FLAG,runtimePermitWriteResult,splitRefs}from'../../commands/permit/shared.js';const DATA_ACTIONS=[a45_0xac0270(0x19d),a45_0xac0270(0x1a1),'DATA_DELETE',a45_0xac0270(0x18b),a45_0xac0270(0x1a6),a45_0xac0270(0x17e)],DATASETS_FLAG={'name':a45_0xac0270(0x170),'type':'string','required':!![],'description':a45_0xac0270(0x16f)},ACTIONS_FLAG={'name':'actions','type':a45_0xac0270(0x18a),'required':!![],'description':a45_0xac0270(0x1a0)+DATA_ACTIONS[a45_0xac0270(0x179)](',\x20')};async function prepare(_0x4797a4){const _0x552b52=a45_0xac0270;await assertRuntimePermissionManager(_0x4797a4[_0x552b52(0x184)]);const _0x20e0c4=assertGrantOrRevoke(_0x4797a4[_0x552b52(0x1a3)](_0x552b52(0x181)),_0x4797a4[_0x552b52(0x1a3)](_0x552b52(0x18d))),_0x376978=await resolveRuntimeRoleRef(_0x4797a4[_0x552b52(0x184)],_0x4797a4[_0x552b52(0x174)](_0x552b52(0x183)));assertRuntimePermitRoleConfigurable(_0x376978);const _0x42d582=splitRefs(_0x4797a4['str'](_0x552b52(0x170)),_0x552b52(0x189)),_0xc5d1de=[...new Set(splitRefs(_0x4797a4[_0x552b52(0x174)](_0x552b52(0x193)),_0x552b52(0x175))[_0x552b52(0x1a2)](_0x4b97e0=>_0x4b97e0[_0x552b52(0x187)]()))],_0x39d230=_0xc5d1de[_0x552b52(0x192)](_0xc18d4c=>!DATA_ACTIONS[_0x552b52(0x188)](_0xc18d4c));if(_0x39d230['length']>0x0)throw CliErrors[_0x552b52(0x171)](_0x552b52(0x176)+_0x39d230[_0x552b52(0x179)](',\x20')+'.');const _0x55d605=await listRuntimeDatasetRolePermits(_0x4797a4['appCode']),_0x21d965=await listRuntimePermitRoles(_0x4797a4['appCode']),_0x58cc6c=[],_0x1b641a=[],_0x1f7e52=[],_0x50dc9e=[];for(const _0xadf920 of _0x42d582){const _0x211bb9=_0x55d605[_0x552b52(0x18f)](_0x371c3b=>_0x371c3b[_0x552b52(0x198)]===_0xadf920);if(!_0x211bb9)throw CliErrors[_0x552b52(0x171)](_0x552b52(0x186)+_0xadf920+_0x552b52(0x182));for(const _0x54ad7d of _0xc5d1de){const _0x4a3165=_0x211bb9[_0x552b52(0x1a9)]?.['find'](_0x284e27=>_0x284e27[_0x552b52(0x173)]===_0x54ad7d);if(!_0x4a3165)throw CliErrors[_0x552b52(0x171)](_0x552b52(0x1a8)+_0xadf920+_0x552b52(0x18c)+_0x54ad7d+'.');const _0x48d1da=applyRuntimeRolePermission(_0x4a3165[_0x552b52(0x178)],_0x376978,_0x21d965,_0x20e0c4);_0x1b641a[_0x552b52(0x19f)]({'datasetCode':_0xadf920,'resourceType':_0x54ad7d,'rolePermit':_0x4a3165[_0x552b52(0x178)]}),_0x1f7e52[_0x552b52(0x19f)]({'datasetCode':_0xadf920,'resourceType':_0x54ad7d,'rolePermit':_0x48d1da[_0x552b52(0x191)]}),_0x48d1da[_0x552b52(0x180)]?_0x58cc6c[_0x552b52(0x19f)]({..._0x4a3165['permitId']!=null?{'id':_0x4a3165[_0x552b52(0x19b)]}:{},'appCode':_0x4797a4['appCode'],'resourceCode':_0xadf920,'resourceType':_0x54ad7d,'resourceName':_0x4a3165['resourceName'],'rolePermit':_0x48d1da['roles']}):_0x50dc9e[_0x552b52(0x19f)](_0xadf920+'/'+_0x54ad7d+_0x552b52(0x1aa)+_0x20e0c4+'\x20for\x20role\x20'+_0x376978['id']+'.');}}return{'operation':_0x20e0c4,'role':_0x376978,'datasetCodes':_0x42d582,'actions':_0xc5d1de,'permitList':_0x58cc6c,'before':_0x1b641a,'after':_0x1f7e52,'warnings':_0x50dc9e};}function a45_0xafc1(_0x197c47,_0x33ac54){_0x197c47=_0x197c47-0x16f;const _0x34cc3a=a45_0x34cc();let _0xafc1bc=_0x34cc3a[_0x197c47];return _0xafc1bc;}export const permitDatasetSet={'service':'permit','command':a45_0xac0270(0x19c),'description':a45_0xac0270(0x199),'risk':a45_0xac0270(0x185),'confirmationDescription':a45_0xac0270(0x1a5),'flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,DATASETS_FLAG,ACTIONS_FLAG],async 'validate'(_0x278c02){const _0x16e0e8=a45_0xac0270;assertGrantOrRevoke(_0x278c02['bool'](_0x16e0e8(0x181)),_0x278c02['bool'](_0x16e0e8(0x18d)));},async 'dryRun'(_0x29aee7){const _0x28f2dc=a45_0xac0270,_0x3b56e3=await prepare(_0x29aee7);return dryRun(_0x28f2dc(0x195),_0x28f2dc(0x1a7))[_0x28f2dc(0x17d)]({'appCode':_0x29aee7[_0x28f2dc(0x184)],'permitList':_0x3b56e3[_0x28f2dc(0x196)]})['description']('Preview:\x20'+_0x3b56e3[_0x28f2dc(0x17f)]+_0x28f2dc(0x172))['build']();},async 'execute'(_0x13e92e){const _0x5b0a92=a45_0xac0270,_0x3a2543=await prepare(_0x13e92e);return _0x3a2543[_0x5b0a92(0x196)]['length']>0x0&&await saveRuntimeDatasetRolePermits(_0x13e92e[_0x5b0a92(0x184)],_0x3a2543[_0x5b0a92(0x196)]),{'ok':!![],'data':runtimePermitWriteResult(_0x5b0a92(0x18e)+_0x3a2543[_0x5b0a92(0x17f)],{'roleId':_0x3a2543[_0x5b0a92(0x183)]['id'],'datasetCodes':_0x3a2543['datasetCodes'],'actions':_0x3a2543[_0x5b0a92(0x193)]},_0x3a2543['before'],_0x3a2543[_0x5b0a92(0x177)],{'method':_0x5b0a92(0x195),'path':_0x5b0a92(0x1a7)},_0x3a2543['warnings'])};}};
@@ -1 +1 @@
1
- function a46_0x1053(_0x11d6de,_0x3f3037){_0x11d6de=_0x11d6de-0x166;const _0x3ecaf0=a46_0x3eca();let _0x1053d6=_0x3ecaf0[_0x11d6de];return _0x1053d6;}(function(_0x4a0517,_0x3ea64e){const _0x260a69=a46_0x1053,_0x6f89e6=_0x4a0517();while(!![]){try{const _0x2018c9=-parseInt(_0x260a69(0x166))/0x1*(-parseInt(_0x260a69(0x16a))/0x2)+-parseInt(_0x260a69(0x168))/0x3*(-parseInt(_0x260a69(0x16d))/0x4)+parseInt(_0x260a69(0x16c))/0x5+parseInt(_0x260a69(0x167))/0x6*(parseInt(_0x260a69(0x16e))/0x7)+parseInt(_0x260a69(0x16f))/0x8+parseInt(_0x260a69(0x169))/0x9+parseInt(_0x260a69(0x170))/0xa*(-parseInt(_0x260a69(0x16b))/0xb);if(_0x2018c9===_0x3ea64e)break;else _0x6f89e6['push'](_0x6f89e6['shift']());}catch(_0x2458a9){_0x6f89e6['push'](_0x6f89e6['shift']());}}}(a46_0x3eca,0x6847a));import{permitPageGet}from'../../commands/permit/page-get.js';import{permitPageSet}from'../../commands/permit/page-set.js';import{permitRoleMenus}from'../../commands/permit/role-menus.js';function a46_0x3eca(){const _0x19c6fe=['20058PaZhsM','113835WMpAWB','5327217ENfHBE','2mMivoS','11ZJmHKr','3324260wJkIkX','12blbuGT','28EFNdWm','1607472nsevBm','18008450fJEcrV','643069ncozap'];a46_0x3eca=function(){return _0x19c6fe;};return a46_0x3eca();}import{permitRoleMenusSet}from'../../commands/permit/role-menus-set.js';import{permitDatasetGet}from'../../commands/permit/dataset-get.js';import{permitDatasetSet}from'../../commands/permit/dataset-set.js';export const permitDefinitions=[permitPageGet,permitPageSet,permitRoleMenus,permitRoleMenusSet,permitDatasetGet,permitDatasetSet];
1
+ (function(_0x248a36,_0x319c7d){const _0x3a252c=a46_0xdee8,_0x405fdf=_0x248a36();while(!![]){try{const _0x19d3a7=-parseInt(_0x3a252c(0xb8))/0x1*(-parseInt(_0x3a252c(0xb5))/0x2)+-parseInt(_0x3a252c(0xb4))/0x3*(parseInt(_0x3a252c(0xaf))/0x4)+-parseInt(_0x3a252c(0xb1))/0x5*(-parseInt(_0x3a252c(0xb2))/0x6)+parseInt(_0x3a252c(0xb0))/0x7+parseInt(_0x3a252c(0xb7))/0x8+parseInt(_0x3a252c(0xae))/0x9+-parseInt(_0x3a252c(0xb3))/0xa*(parseInt(_0x3a252c(0xb6))/0xb);if(_0x19d3a7===_0x319c7d)break;else _0x405fdf['push'](_0x405fdf['shift']());}catch(_0x13976f){_0x405fdf['push'](_0x405fdf['shift']());}}}(a46_0xe855,0x38ad8));import{permitPageGet}from'../../commands/permit/page-get.js';import{permitPageSet}from'../../commands/permit/page-set.js';function a46_0xe855(){const _0x16a009=['477987tEzTyG','2wzdFwH','22AypEgT','913352KjdcEV','158047qNPGIt','2318787ayTEAT','8kUqDDw','1980433NlFLoI','130WggPeV','81798sglZOS','3082130XXNxmh'];a46_0xe855=function(){return _0x16a009;};return a46_0xe855();}import{permitRoleMenus}from'../../commands/permit/role-menus.js';import{permitRoleMenusSet}from'../../commands/permit/role-menus-set.js';import{permitDatasetGet}from'../../commands/permit/dataset-get.js';function a46_0xdee8(_0x333735,_0x5f445c){_0x333735=_0x333735-0xae;const _0xe8555f=a46_0xe855();let _0xdee824=_0xe8555f[_0x333735];return _0xdee824;}import{permitDatasetSet}from'../../commands/permit/dataset-set.js';export const permitDefinitions=[permitPageGet,permitPageSet,permitRoleMenus,permitRoleMenusSet,permitDatasetGet,permitDatasetSet];
@@ -1 +1 @@
1
- function a47_0x5c09(_0x229e8e,_0x1323bb){_0x229e8e=_0x229e8e-0x1ad;const _0x4a3231=a47_0x4a32();let _0x5c095d=_0x4a3231[_0x229e8e];return _0x5c095d;}(function(_0x30abc6,_0x36ddf3){const _0x195ee2=a47_0x5c09,_0x432704=_0x30abc6();while(!![]){try{const _0xc0a82b=parseInt(_0x195ee2(0x1b6))/0x1+parseInt(_0x195ee2(0x1b2))/0x2+parseInt(_0x195ee2(0x1b3))/0x3*(parseInt(_0x195ee2(0x1b1))/0x4)+parseInt(_0x195ee2(0x1b8))/0x5+-parseInt(_0x195ee2(0x1b9))/0x6*(parseInt(_0x195ee2(0x1b5))/0x7)+-parseInt(_0x195ee2(0x1ad))/0x8*(parseInt(_0x195ee2(0x1ae))/0x9)+-parseInt(_0x195ee2(0x1b7))/0xa;if(_0xc0a82b===_0x36ddf3)break;else _0x432704['push'](_0x432704['shift']());}catch(_0x1c4a1a){_0x432704['push'](_0x432704['shift']());}}}(a47_0x4a32,0xa1a4e));import{getRuntimePagePermit}from'../../core/api-client.js';import{MENU_ID_FLAG,projectRuntimePagePermit}from'../../commands/permit/shared.js';export const permitPageGet={'service':'permit','command':'page-get','description':'Get\x20runtime\x20page\x20permission\x20slots\x20by\x20menu\x20ID','risk':'read','flags':[MENU_ID_FLAG],async 'execute'(_0x12af02){const _0x5aa993=a47_0x5c09,_0x391d40=await getRuntimePagePermit(_0x12af02[_0x5aa993(0x1af)](_0x5aa993(0x1b4)));return{'ok':!![],'data':{'scope':_0x5aa993(0x1b0),'page':projectRuntimePagePermit(_0x391d40)}};}};function a47_0x4a32(){const _0x1dc42a=['86340FaeItp','3305430jIlZCb','6049105RgZWZZ','650154PlXUVR','295928kIMiAh','279GMVYOa','num','runtime','4gUnzHK','477310NdBLOD','2463780mMcaYd','menu-id','14BrHseL'];a47_0x4a32=function(){return _0x1dc42a;};return a47_0x4a32();}
1
+ function a47_0x3dd9(_0x5297e6,_0x5dbf33){_0x5297e6=_0x5297e6-0xca;const _0x4a6a28=a47_0x4a6a();let _0x3dd93a=_0x4a6a28[_0x5297e6];return _0x3dd93a;}const a47_0x37953d=a47_0x3dd9;(function(_0x1cd086,_0x3d982c){const _0x55c66e=a47_0x3dd9,_0x49185f=_0x1cd086();while(!![]){try{const _0x174e08=parseInt(_0x55c66e(0xda))/0x1*(-parseInt(_0x55c66e(0xcc))/0x2)+-parseInt(_0x55c66e(0xd8))/0x3*(parseInt(_0x55c66e(0xd3))/0x4)+parseInt(_0x55c66e(0xd4))/0x5+parseInt(_0x55c66e(0xd1))/0x6*(parseInt(_0x55c66e(0xcd))/0x7)+-parseInt(_0x55c66e(0xd5))/0x8+parseInt(_0x55c66e(0xce))/0x9+-parseInt(_0x55c66e(0xd9))/0xa;if(_0x174e08===_0x3d982c)break;else _0x49185f['push'](_0x49185f['shift']());}catch(_0x3e4f06){_0x49185f['push'](_0x49185f['shift']());}}}(a47_0x4a6a,0xf267c));import{getRuntimePagePermit}from'../../core/api-client.js';import{MENU_ID_FLAG,projectRuntimePagePermit}from'../../commands/permit/shared.js';function a47_0x4a6a(){const _0x54a005=['20199uQhbFs','11686580NTwOTq','33hJRazA','permit','num','86438fkMvbu','6637407dQPqdP','15171372LavfBS','runtime','read','12qEjOsT','Get\x20runtime\x20page\x20permission\x20slots\x20by\x20menu\x20ID','180ZCXLIm','8102455wFWmZE','10494712glOsmh','menu-id','page-get'];a47_0x4a6a=function(){return _0x54a005;};return a47_0x4a6a();}export const permitPageGet={'service':a47_0x37953d(0xca),'command':a47_0x37953d(0xd7),'description':a47_0x37953d(0xd2),'risk':a47_0x37953d(0xd0),'flags':[MENU_ID_FLAG],async 'execute'(_0x8cb4e9){const _0x2ce990=a47_0x37953d,_0x1337f6=await getRuntimePagePermit(_0x8cb4e9[_0x2ce990(0xcb)](_0x2ce990(0xd6)));return{'ok':!![],'data':{'scope':_0x2ce990(0xcf),'page':projectRuntimePagePermit(_0x1337f6)}};}};
@@ -1 +1 @@
1
- const a48_0x585551=a48_0x3cbc;(function(_0x2a329b,_0x549f6b){const _0x3e5ebc=a48_0x3cbc,_0x29bce1=_0x2a329b();while(!![]){try{const _0x55f440=-parseInt(_0x3e5ebc(0x141))/0x1+-parseInt(_0x3e5ebc(0x14a))/0x2+-parseInt(_0x3e5ebc(0x165))/0x3*(-parseInt(_0x3e5ebc(0x15a))/0x4)+parseInt(_0x3e5ebc(0x150))/0x5+parseInt(_0x3e5ebc(0x159))/0x6*(-parseInt(_0x3e5ebc(0x14f))/0x7)+parseInt(_0x3e5ebc(0x158))/0x8*(parseInt(_0x3e5ebc(0x140))/0x9)+parseInt(_0x3e5ebc(0x15f))/0xa;if(_0x55f440===_0x549f6b)break;else _0x29bce1['push'](_0x29bce1['shift']());}catch(_0x108403){_0x29bce1['push'](_0x29bce1['shift']());}}}(a48_0x598a,0x31a95));import{getRuntimePagePermit,saveRuntimePagePermit}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';import{assertRuntimePermissionManager,MENU_ID_FLAG,PAGE_ROLE_FLAGS,PAGE_SLOT_SPECS,projectRuntimePagePermit,resolveRuntimePermitRoles,runtimePermitWriteResult,splitRefs}from'../../commands/permit/shared.js';function a48_0x3cbc(_0x41aa3a,_0x468ca5){_0x41aa3a=_0x41aa3a-0x140;const _0x598a6e=a48_0x598a();let _0x3cbc19=_0x598a6e[_0x41aa3a];return _0x3cbc19;}function a48_0x598a(){const _0x2d1f67=['str','key','join','POST','4036460lXVvMK','num','allowSelf','menuId','before','description','54bibUQp','Pass\x20at\x20least\x20one\x20page\x20role\x20flag\x20to\x20update.','148437zQPmxT','178578AveAFq','/client/permit/page/save','Preview:\x20update\x20page\x20permission\x20slots\x20','\x20does\x20not\x20belong\x20to\x20app\x20','Page\x20menu\x20','push','Menu\x20','validation','high-risk-write','656842KNZAMo','flag','menu-id','Changes\x20role\x20permission\x20slots\x20on\x20the\x20given\x20runtime\x20page.\x20Unauthorized\x20users\x20may\x20be\x20unable\x20to\x20view\x20the\x20page\x20or\x20run\x20data\x20operations.','appCode','7wnjkZC','1424965KFLFmC','body','build','page-set','permit','page','Set\x20selected\x20runtime\x20page\x20permission\x20slots','rolePermit','16xQTyZZ','1293726EJKWTL','45424Wlwqna'];a48_0x598a=function(){return _0x2d1f67;};return a48_0x598a();}async function prepare(_0x3ce884){const _0xc63e89=a48_0x3cbc;await assertRuntimePermissionManager(_0x3ce884[_0xc63e89(0x14e)]);const _0x7d58a8=_0x3ce884[_0xc63e89(0x160)](_0xc63e89(0x14c)),_0x4ee272=await getRuntimePagePermit(_0x7d58a8);if(_0x4ee272['appCode']&&_0x4ee272['appCode']!==_0x3ce884[_0xc63e89(0x14e)])throw CliErrors[_0xc63e89(0x148)](_0xc63e89(0x147)+_0x7d58a8+_0xc63e89(0x144)+_0x3ce884['appCode']+'.');const _0x51b7d0=structuredClone(_0x4ee272),_0xf029f3=[];for(const _0x3c6d01 of PAGE_SLOT_SPECS){if(_0x3ce884['flag'](_0x3c6d01['flag'])===undefined)continue;const _0x2149f5=_0x4ee272[_0x3c6d01['key']];if(!_0x2149f5)throw CliErrors[_0xc63e89(0x148)](_0xc63e89(0x145)+_0x7d58a8+'\x20does\x20not\x20expose\x20'+_0x3c6d01[_0xc63e89(0x15c)]+'.');_0x2149f5[_0xc63e89(0x157)]=await resolveRuntimePermitRoles(_0x3ce884[_0xc63e89(0x14e)],splitRefs(_0x3ce884[_0xc63e89(0x15b)](_0x3c6d01[_0xc63e89(0x14b)]),'--'+_0x3c6d01[_0xc63e89(0x14b)]),_0x3c6d01[_0xc63e89(0x161)]),_0xf029f3[_0xc63e89(0x146)](_0x3c6d01[_0xc63e89(0x15c)]);}if(_0xf029f3['length']===0x0)throw CliErrors[_0xc63e89(0x148)](_0xc63e89(0x166));return{'menuId':_0x7d58a8,'page':_0x4ee272,'before':_0x51b7d0,'slots':_0xf029f3};}export const permitPageSet={'service':a48_0x585551(0x154),'command':a48_0x585551(0x153),'description':a48_0x585551(0x156),'risk':a48_0x585551(0x149),'confirmationDescription':a48_0x585551(0x14d),'flags':[MENU_ID_FLAG,...PAGE_ROLE_FLAGS],async 'dryRun'(_0x3b0e45){const _0x5d27fc=a48_0x585551,_0x42a903=await prepare(_0x3b0e45);return dryRun(_0x5d27fc(0x15e),_0x5d27fc(0x142))[_0x5d27fc(0x151)](_0x42a903['page'])[_0x5d27fc(0x164)](_0x5d27fc(0x143)+_0x42a903['slots'][_0x5d27fc(0x15d)](',\x20'))[_0x5d27fc(0x152)]();},async 'execute'(_0x35176a){const _0x429c8e=a48_0x585551,_0x3b18db=await prepare(_0x35176a),_0x210716=await saveRuntimePagePermit(_0x3b18db[_0x429c8e(0x155)]);return{'ok':!![],'data':runtimePermitWriteResult('page-set',{'menuId':_0x3b18db[_0x429c8e(0x162)],'slots':_0x3b18db['slots']},projectRuntimePagePermit(_0x3b18db[_0x429c8e(0x163)]),projectRuntimePagePermit(_0x210716),{'method':_0x429c8e(0x15e),'path':'/client/permit/page/save'})};}};
1
+ const a48_0x595c6c=a48_0x2d19;(function(_0x107572,_0x50ebbe){const _0x148b1e=a48_0x2d19,_0x4a9375=_0x107572();while(!![]){try{const _0x34c34f=-parseInt(_0x148b1e(0xcf))/0x1+-parseInt(_0x148b1e(0xc3))/0x2+-parseInt(_0x148b1e(0xcd))/0x3+parseInt(_0x148b1e(0xca))/0x4+-parseInt(_0x148b1e(0xb9))/0x5+-parseInt(_0x148b1e(0xd2))/0x6+parseInt(_0x148b1e(0xc0))/0x7;if(_0x34c34f===_0x50ebbe)break;else _0x4a9375['push'](_0x4a9375['shift']());}catch(_0x364611){_0x4a9375['push'](_0x4a9375['shift']());}}}(a48_0x4f7a,0xf0d4a));import{getRuntimePagePermit,saveRuntimePagePermit}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a48_0x2d19(_0x3619b9,_0x418f9f){_0x3619b9=_0x3619b9-0xb8;const _0x4f7a8b=a48_0x4f7a();let _0x2d1929=_0x4f7a8b[_0x3619b9];return _0x2d1929;}import{dryRun}from'../../framework/dryrun.js';import{assertRuntimePermissionManager,MENU_ID_FLAG,PAGE_ROLE_FLAGS,PAGE_SLOT_SPECS,projectRuntimePagePermit,resolveRuntimePermitRoles,runtimePermitWriteResult,splitRefs}from'../../commands/permit/shared.js';async function prepare(_0x584377){const _0x447e79=a48_0x2d19;await assertRuntimePermissionManager(_0x584377[_0x447e79(0xd3)]);const _0x5cfe15=_0x584377[_0x447e79(0xbd)](_0x447e79(0xda)),_0x40f694=await getRuntimePagePermit(_0x5cfe15);if(_0x40f694[_0x447e79(0xd3)]&&_0x40f694[_0x447e79(0xd3)]!==_0x584377[_0x447e79(0xd3)])throw CliErrors[_0x447e79(0xcb)](_0x447e79(0xc6)+_0x5cfe15+_0x447e79(0xcc)+_0x584377[_0x447e79(0xd3)]+'.');const _0x5bec35=structuredClone(_0x40f694),_0x3faf2d=[];for(const _0x2c7159 of PAGE_SLOT_SPECS){if(_0x584377[_0x447e79(0xbc)](_0x2c7159['flag'])===undefined)continue;const _0x1f2e95=_0x40f694[_0x2c7159[_0x447e79(0xc8)]];if(!_0x1f2e95)throw CliErrors[_0x447e79(0xcb)](_0x447e79(0xd5)+_0x5cfe15+_0x447e79(0xc4)+_0x2c7159[_0x447e79(0xc8)]+'.');_0x1f2e95[_0x447e79(0xc7)]=await resolveRuntimePermitRoles(_0x584377['appCode'],splitRefs(_0x584377[_0x447e79(0xd8)](_0x2c7159['flag']),'--'+_0x2c7159[_0x447e79(0xbc)]),_0x2c7159[_0x447e79(0xb8)]),_0x3faf2d[_0x447e79(0xc2)](_0x2c7159[_0x447e79(0xc8)]);}if(_0x3faf2d[_0x447e79(0xd1)]===0x0)throw CliErrors[_0x447e79(0xcb)]('Pass\x20at\x20least\x20one\x20page\x20role\x20flag\x20to\x20update.');return{'menuId':_0x5cfe15,'page':_0x40f694,'before':_0x5bec35,'slots':_0x3faf2d};}function a48_0x4f7a(){const _0x429f27=['flag','num','page-set','high-risk-write','49233058RvGCuT','Preview:\x20update\x20page\x20permission\x20slots\x20','push','2310142PjEyiB','\x20does\x20not\x20expose\x20','Changes\x20role\x20permission\x20slots\x20on\x20the\x20given\x20runtime\x20page.\x20Unauthorized\x20users\x20may\x20be\x20unable\x20to\x20view\x20the\x20page\x20or\x20run\x20data\x20operations.','Menu\x20','rolePermit','key','slots','109424jXFmnK','validation','\x20does\x20not\x20belong\x20to\x20app\x20','3928050yyhpLM','build','833384FlgWWZ','body','length','11119986MjiMwl','appCode','description','Page\x20menu\x20','before','POST','str','join','menu-id','page','permit','allowSelf','4615360ynDsuX','Set\x20selected\x20runtime\x20page\x20permission\x20slots','menuId'];a48_0x4f7a=function(){return _0x429f27;};return a48_0x4f7a();}export const permitPageSet={'service':a48_0x595c6c(0xdc),'command':a48_0x595c6c(0xbe),'description':a48_0x595c6c(0xba),'risk':a48_0x595c6c(0xbf),'confirmationDescription':a48_0x595c6c(0xc5),'flags':[MENU_ID_FLAG,...PAGE_ROLE_FLAGS],async 'dryRun'(_0x2f750d){const _0x21ee4c=a48_0x595c6c,_0x4ec0b3=await prepare(_0x2f750d);return dryRun(_0x21ee4c(0xd7),'/client/permit/page/save')[_0x21ee4c(0xd0)](_0x4ec0b3[_0x21ee4c(0xdb)])[_0x21ee4c(0xd4)](_0x21ee4c(0xc1)+_0x4ec0b3[_0x21ee4c(0xc9)][_0x21ee4c(0xd9)](',\x20'))[_0x21ee4c(0xce)]();},async 'execute'(_0x3de099){const _0x8ac635=a48_0x595c6c,_0x5ce8ea=await prepare(_0x3de099),_0x5c0120=await saveRuntimePagePermit(_0x5ce8ea[_0x8ac635(0xdb)]);return{'ok':!![],'data':runtimePermitWriteResult(_0x8ac635(0xbe),{'menuId':_0x5ce8ea[_0x8ac635(0xbb)],'slots':_0x5ce8ea[_0x8ac635(0xc9)]},projectRuntimePagePermit(_0x5ce8ea[_0x8ac635(0xd6)]),projectRuntimePagePermit(_0x5c0120),{'method':_0x8ac635(0xd7),'path':'/client/permit/page/save'})};}};
@@ -1 +1 @@
1
- const a49_0x4ad7ac=a49_0x3710;(function(_0x42788e,_0xc5bc1c){const _0xdea1bd=a49_0x3710,_0x45ec35=_0x42788e();while(!![]){try{const _0x18aeab=-parseInt(_0xdea1bd(0x16a))/0x1*(-parseInt(_0xdea1bd(0x159))/0x2)+parseInt(_0xdea1bd(0x153))/0x3*(parseInt(_0xdea1bd(0x145))/0x4)+-parseInt(_0xdea1bd(0x13f))/0x5*(-parseInt(_0xdea1bd(0x142))/0x6)+-parseInt(_0xdea1bd(0x160))/0x7*(-parseInt(_0xdea1bd(0x16b))/0x8)+-parseInt(_0xdea1bd(0x165))/0x9+parseInt(_0xdea1bd(0x14e))/0xa+-parseInt(_0xdea1bd(0x14a))/0xb;if(_0x18aeab===_0xc5bc1c)break;else _0x45ec35['push'](_0x45ec35['shift']());}catch(_0x25ca8e){_0x45ec35['push'](_0x45ec35['shift']());}}}(a49_0xedf7,0x59ccd));import{listRuntimeMenuRolePermits,listRuntimePermitRoles,saveRuntimeMenuRolePermits}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';function a49_0xedf7(){const _0x54587e=['14cCDRQB','216wFmcIf','validation','menus','isSafeInteger','warnings','menu-','29245seoMLB','build','permitList','66NWPQFF','body','str','128476KqOllQ','/client/permit/resource/batch-save-menu','length','string','find','7169195XlkGDw','permit','before','map','1221580AxdjLT','\x20selected\x20runtime\x20menus','Invalid\x20runtime\x20menu\x20ID:\x20','roles','Grant\x20or\x20revoke\x20selected\x20runtime\x20menus\x20for\x20one\x20role','3dvfitu','menuIds','Preview:\x20','role','changed','bool','71498AKXMqc','rolePermit','appCode','Grants\x20or\x20revokes\x20the\x20target\x20role\x20access\x20to\x20the\x20given\x20runtime\x20menus.\x20Menu\x20visibility\x20for\x20users\x20in\x20that\x20role\x20will\x20change.','push','description','high-risk-write','129290MJEomk','--menus','\x20already\x20reflects\x20','\x20for\x20role\x20','Runtime\x20menu\x20','1784034xNHIqZ','revoke','operation','grant','POST'];a49_0xedf7=function(){return _0x54587e;};return a49_0xedf7();}import{resolveRuntimeRoleRef}from'../../commands/role/shared.js';import{applyRuntimeRolePermission,assertGrantOrRevoke,assertRuntimePermissionManager,assertRuntimePermitRoleConfigurable,flattenRuntimeMenuRolePermits,GRANT_FLAG,menuPermitDto,REVOKE_FLAG,ROLE_REF_FLAG,runtimePermitWriteResult,splitRefs}from'../../commands/permit/shared.js';const MENUS_FLAG={'name':a49_0x4ad7ac(0x13b),'type':a49_0x4ad7ac(0x148),'required':!![],'description':'Comma-separated\x20runtime\x20menu\x20IDs'};async function prepare(_0xa87e4f){const _0x4c63f7=a49_0x4ad7ac;await assertRuntimePermissionManager(_0xa87e4f[_0x4c63f7(0x15b)]);const _0x4f7a1b=assertGrantOrRevoke(_0xa87e4f[_0x4c63f7(0x158)](_0x4c63f7(0x168)),_0xa87e4f[_0x4c63f7(0x158)](_0x4c63f7(0x166))),_0x18d7eb=await resolveRuntimeRoleRef(_0xa87e4f[_0x4c63f7(0x15b)],_0xa87e4f['str']('role'));assertRuntimePermitRoleConfigurable(_0x18d7eb);const _0x2be98d=[...new Set(splitRefs(_0xa87e4f[_0x4c63f7(0x144)]('menus'),_0x4c63f7(0x161))[_0x4c63f7(0x14d)](_0x14c379=>{const _0x1e0684=_0x4c63f7,_0x13fd71=Number(_0x14c379);if(!/^\d+$/['test'](_0x14c379)||!Number[_0x1e0684(0x13c)](_0x13fd71)||_0x13fd71<=0x0)throw CliErrors[_0x1e0684(0x16c)](_0x1e0684(0x150)+_0x14c379+'.');return _0x13fd71;}))],_0x30399d=flattenRuntimeMenuRolePermits(await listRuntimeMenuRolePermits(_0xa87e4f[_0x4c63f7(0x15b)])),_0x4043b0=await listRuntimePermitRoles(_0xa87e4f[_0x4c63f7(0x15b)]),_0x12600f=[],_0x250bfb=[],_0x52fa86=[],_0x286425=[];for(const _0x3ac621 of _0x2be98d){const _0x2b6d2e=_0x30399d[_0x4c63f7(0x149)](_0x9cc399=>_0x9cc399['id']===_0x3ac621);if(!_0x2b6d2e)throw CliErrors[_0x4c63f7(0x16c)](_0x4c63f7(0x164)+_0x3ac621+'\x20was\x20not\x20found.');const _0x44d6f2=applyRuntimeRolePermission(_0x2b6d2e[_0x4c63f7(0x15a)],_0x18d7eb,_0x4043b0,_0x4f7a1b);_0x250bfb[_0x4c63f7(0x15d)]({'menuId':_0x3ac621,'rolePermit':_0x2b6d2e['rolePermit']}),_0x52fa86[_0x4c63f7(0x15d)]({'menuId':_0x3ac621,'rolePermit':_0x44d6f2[_0x4c63f7(0x151)]});if(_0x44d6f2[_0x4c63f7(0x157)])_0x12600f[_0x4c63f7(0x15d)](menuPermitDto(_0xa87e4f[_0x4c63f7(0x15b)],_0x2b6d2e,_0x44d6f2[_0x4c63f7(0x151)]));else _0x286425[_0x4c63f7(0x15d)]('Runtime\x20menu\x20'+_0x3ac621+_0x4c63f7(0x162)+_0x4f7a1b+_0x4c63f7(0x163)+_0x18d7eb['id']+'.');}return{'operation':_0x4f7a1b,'role':_0x18d7eb,'menuIds':_0x2be98d,'permitList':_0x12600f,'before':_0x250bfb,'after':_0x52fa86,'warnings':_0x286425};}function a49_0x3710(_0x6aba36,_0x359761){_0x6aba36=_0x6aba36-0x13b;const _0xedf78c=a49_0xedf7();let _0x371072=_0xedf78c[_0x6aba36];return _0x371072;}export const permitRoleMenusSet={'service':a49_0x4ad7ac(0x14b),'command':'role-menus-set','description':a49_0x4ad7ac(0x152),'risk':a49_0x4ad7ac(0x15f),'confirmationDescription':a49_0x4ad7ac(0x15c),'flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,MENUS_FLAG],async 'validate'(_0x4f8e87){const _0x441dcc=a49_0x4ad7ac;assertGrantOrRevoke(_0x4f8e87[_0x441dcc(0x158)](_0x441dcc(0x168)),_0x4f8e87[_0x441dcc(0x158)](_0x441dcc(0x166)));},async 'dryRun'(_0x239804){const _0x243689=a49_0x4ad7ac,_0x1bb447=await prepare(_0x239804);return dryRun('POST',_0x243689(0x146))[_0x243689(0x143)]({'appCode':_0x239804[_0x243689(0x15b)],'permitList':_0x1bb447['permitList']})[_0x243689(0x15e)](_0x243689(0x155)+_0x1bb447[_0x243689(0x167)]+_0x243689(0x14f))[_0x243689(0x140)]();},async 'execute'(_0x3c9563){const _0x144fab=a49_0x4ad7ac,_0x4e31d1=await prepare(_0x3c9563);return _0x4e31d1['permitList'][_0x144fab(0x147)]>0x0&&await saveRuntimeMenuRolePermits(_0x3c9563[_0x144fab(0x15b)],_0x4e31d1[_0x144fab(0x141)]),{'ok':!![],'data':runtimePermitWriteResult(_0x144fab(0x13e)+_0x4e31d1['operation'],{'roleId':_0x4e31d1[_0x144fab(0x156)]['id'],'menuIds':_0x4e31d1[_0x144fab(0x154)]},_0x4e31d1[_0x144fab(0x14c)],_0x4e31d1['after'],{'method':_0x144fab(0x169),'path':_0x144fab(0x146)},_0x4e31d1[_0x144fab(0x13d)])};}};
1
+ const a49_0x43781f=a49_0x50e1;(function(_0x4299ed,_0x49268f){const _0x15a4b1=a49_0x50e1,_0x2c71b8=_0x4299ed();while(!![]){try{const _0x1ccdb5=-parseInt(_0x15a4b1(0x98))/0x1*(parseInt(_0x15a4b1(0x9e))/0x2)+parseInt(_0x15a4b1(0x8f))/0x3+-parseInt(_0x15a4b1(0x91))/0x4*(parseInt(_0x15a4b1(0x8c))/0x5)+parseInt(_0x15a4b1(0x7c))/0x6*(parseInt(_0x15a4b1(0xa3))/0x7)+parseInt(_0x15a4b1(0x82))/0x8*(-parseInt(_0x15a4b1(0x8b))/0x9)+-parseInt(_0x15a4b1(0x92))/0xa*(parseInt(_0x15a4b1(0x9c))/0xb)+parseInt(_0x15a4b1(0x90))/0xc;if(_0x1ccdb5===_0x49268f)break;else _0x2c71b8['push'](_0x2c71b8['shift']());}catch(_0x1c93ef){_0x2c71b8['push'](_0x2c71b8['shift']());}}}(a49_0x356d,0xb3c29));function a49_0x356d(){const _0x383250=['build','8uXpeyf','role-menus-set','POST','str','role','485905tFYQIY','Comma-separated\x20runtime\x20menu\x20IDs','permitList','string','description','operation','Grants\x20or\x20revokes\x20the\x20target\x20role\x20access\x20to\x20the\x20given\x20runtime\x20menus.\x20Menu\x20visibility\x20for\x20users\x20in\x20that\x20role\x20will\x20change.','Invalid\x20runtime\x20menu\x20ID:\x20','18LUbPYf','appCode','map','/client/permit/resource/batch-save-menu','before','Runtime\x20menu\x20','1385400UgyohM','\x20was\x20not\x20found.','changed','validation','length','\x20already\x20reflects\x20','Grant\x20or\x20revoke\x20selected\x20runtime\x20menus\x20for\x20one\x20role','revoke','bool','45VQYFwd','15425ciWkmv','rolePermit','roles','181401vTsGul','35701392lYZFwu','88BHLzik','3422710nwNPGV','warnings','menus','grant','high-risk-write','test','222311eNnwrT','find','Preview:\x20','push','22aRlasf'];a49_0x356d=function(){return _0x383250;};return a49_0x356d();}import{listRuntimeMenuRolePermits,listRuntimePermitRoles,saveRuntimeMenuRolePermits}from'../../core/api-client.js';function a49_0x50e1(_0x5a0d31,_0x3e6afc){_0x5a0d31=_0x5a0d31-0x7a;const _0x356d2d=a49_0x356d();let _0x50e1fd=_0x356d2d[_0x5a0d31];return _0x50e1fd;}import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';import{resolveRuntimeRoleRef}from'../../commands/role/shared.js';import{applyRuntimeRolePermission,assertGrantOrRevoke,assertRuntimePermissionManager,assertRuntimePermitRoleConfigurable,flattenRuntimeMenuRolePermits,GRANT_FLAG,menuPermitDto,REVOKE_FLAG,ROLE_REF_FLAG,runtimePermitWriteResult,splitRefs}from'../../commands/permit/shared.js';const MENUS_FLAG={'name':a49_0x43781f(0x94),'type':a49_0x43781f(0xa6),'required':!![],'description':a49_0x43781f(0xa4)};async function prepare(_0x1b3217){const _0x5556a5=a49_0x43781f;await assertRuntimePermissionManager(_0x1b3217[_0x5556a5(0x7d)]);const _0x355e10=assertGrantOrRevoke(_0x1b3217[_0x5556a5(0x8a)]('grant'),_0x1b3217[_0x5556a5(0x8a)](_0x5556a5(0x89))),_0x52f7fc=await resolveRuntimeRoleRef(_0x1b3217[_0x5556a5(0x7d)],_0x1b3217[_0x5556a5(0xa1)](_0x5556a5(0xa2)));assertRuntimePermitRoleConfigurable(_0x52f7fc);const _0x5c6adb=[...new Set(splitRefs(_0x1b3217[_0x5556a5(0xa1)](_0x5556a5(0x94)),'--menus')[_0x5556a5(0x7e)](_0xb1cdf5=>{const _0x41a22f=_0x5556a5,_0x2c2627=Number(_0xb1cdf5);if(!/^\d+$/[_0x41a22f(0x97)](_0xb1cdf5)||!Number['isSafeInteger'](_0x2c2627)||_0x2c2627<=0x0)throw CliErrors[_0x41a22f(0x85)](_0x41a22f(0x7b)+_0xb1cdf5+'.');return _0x2c2627;}))],_0x83f560=flattenRuntimeMenuRolePermits(await listRuntimeMenuRolePermits(_0x1b3217[_0x5556a5(0x7d)])),_0x439f11=await listRuntimePermitRoles(_0x1b3217[_0x5556a5(0x7d)]),_0x1db81b=[],_0x5b8407=[],_0x326355=[],_0x10876d=[];for(const _0x46f9a8 of _0x5c6adb){const _0x9018af=_0x83f560[_0x5556a5(0x99)](_0x57a840=>_0x57a840['id']===_0x46f9a8);if(!_0x9018af)throw CliErrors[_0x5556a5(0x85)](_0x5556a5(0x81)+_0x46f9a8+_0x5556a5(0x83));const _0x4fdda4=applyRuntimeRolePermission(_0x9018af['rolePermit'],_0x52f7fc,_0x439f11,_0x355e10);_0x5b8407[_0x5556a5(0x9b)]({'menuId':_0x46f9a8,'rolePermit':_0x9018af[_0x5556a5(0x8d)]}),_0x326355[_0x5556a5(0x9b)]({'menuId':_0x46f9a8,'rolePermit':_0x4fdda4['roles']});if(_0x4fdda4[_0x5556a5(0x84)])_0x1db81b[_0x5556a5(0x9b)](menuPermitDto(_0x1b3217[_0x5556a5(0x7d)],_0x9018af,_0x4fdda4[_0x5556a5(0x8e)]));else _0x10876d[_0x5556a5(0x9b)](_0x5556a5(0x81)+_0x46f9a8+_0x5556a5(0x87)+_0x355e10+'\x20for\x20role\x20'+_0x52f7fc['id']+'.');}return{'operation':_0x355e10,'role':_0x52f7fc,'menuIds':_0x5c6adb,'permitList':_0x1db81b,'before':_0x5b8407,'after':_0x326355,'warnings':_0x10876d};}export const permitRoleMenusSet={'service':'permit','command':a49_0x43781f(0x9f),'description':a49_0x43781f(0x88),'risk':a49_0x43781f(0x96),'confirmationDescription':a49_0x43781f(0x7a),'flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,MENUS_FLAG],async 'validate'(_0x5037a0){const _0x52ea90=a49_0x43781f;assertGrantOrRevoke(_0x5037a0[_0x52ea90(0x8a)](_0x52ea90(0x95)),_0x5037a0['bool'](_0x52ea90(0x89)));},async 'dryRun'(_0x39d567){const _0xe0d244=a49_0x43781f,_0x1223da=await prepare(_0x39d567);return dryRun(_0xe0d244(0xa0),_0xe0d244(0x7f))['body']({'appCode':_0x39d567['appCode'],'permitList':_0x1223da[_0xe0d244(0xa5)]})[_0xe0d244(0xa7)](_0xe0d244(0x9a)+_0x1223da[_0xe0d244(0xa8)]+'\x20selected\x20runtime\x20menus')[_0xe0d244(0x9d)]();},async 'execute'(_0xba1f13){const _0x470fd8=a49_0x43781f,_0x206e9d=await prepare(_0xba1f13);return _0x206e9d[_0x470fd8(0xa5)][_0x470fd8(0x86)]>0x0&&await saveRuntimeMenuRolePermits(_0xba1f13['appCode'],_0x206e9d[_0x470fd8(0xa5)]),{'ok':!![],'data':runtimePermitWriteResult('menu-'+_0x206e9d[_0x470fd8(0xa8)],{'roleId':_0x206e9d[_0x470fd8(0xa2)]['id'],'menuIds':_0x206e9d['menuIds']},_0x206e9d[_0x470fd8(0x80)],_0x206e9d['after'],{'method':_0x470fd8(0xa0),'path':'/client/permit/resource/batch-save-menu'},_0x206e9d[_0x470fd8(0x93)])};}};
@@ -1 +1 @@
1
- const a50_0x25b159=a50_0x595a;function a50_0x595a(_0x256cfc,_0x1b2c4d){_0x256cfc=_0x256cfc-0x112;const _0x541738=a50_0x5417();let _0x595a0d=_0x541738[_0x256cfc];return _0x595a0d;}(function(_0x5d7f59,_0x2b65f2){const _0xc947ae=a50_0x595a,_0xc3e99=_0x5d7f59();while(!![]){try{const _0x5854c8=-parseInt(_0xc947ae(0x117))/0x1+parseInt(_0xc947ae(0x115))/0x2*(parseInt(_0xc947ae(0x119))/0x3)+parseInt(_0xc947ae(0x118))/0x4+-parseInt(_0xc947ae(0x11a))/0x5*(-parseInt(_0xc947ae(0x121))/0x6)+-parseInt(_0xc947ae(0x112))/0x7+-parseInt(_0xc947ae(0x11b))/0x8*(-parseInt(_0xc947ae(0x114))/0x9)+-parseInt(_0xc947ae(0x116))/0xa;if(_0x5854c8===_0x2b65f2)break;else _0xc3e99['push'](_0xc3e99['shift']());}catch(_0x261270){_0xc3e99['push'](_0xc3e99['shift']());}}}(a50_0x5417,0x65da5));function a50_0x5417(){const _0x77e8af=['625nZnuNj','8zanmYN','role-menus','appCode','roleName','str','permit','37974AlMqaN','4857209xUStEu','roleType','2921157MfSBzj','4lGNUmW','10672790kLXLzX','184342vYTuuF','2480708AQUDYC','940233yhlpdb'];a50_0x5417=function(){return _0x77e8af;};return a50_0x5417();}import{getRuntimeRoleMenuResources}from'../../core/api-client.js';import{resolveRuntimeRoleRef}from'../../commands/role/shared.js';import{ROLE_REF_FLAG}from'../../commands/permit/shared.js';export const permitRoleMenus={'service':a50_0x25b159(0x120),'command':a50_0x25b159(0x11c),'description':'Show\x20evaluated\x20runtime\x20menu\x20access\x20for\x20one\x20role','risk':'read','flags':[ROLE_REF_FLAG],async 'execute'(_0x1deeb6){const _0x3ef4a5=a50_0x25b159,_0xe71d03=await resolveRuntimeRoleRef(_0x1deeb6[_0x3ef4a5(0x11d)],_0x1deeb6[_0x3ef4a5(0x11f)]('role')),_0x1cd78c=await getRuntimeRoleMenuResources(_0x1deeb6[_0x3ef4a5(0x11d)],_0xe71d03['id']);return{'ok':!![],'data':{'scope':'runtime','role':{'id':_0xe71d03['id'],'roleName':_0xe71d03[_0x3ef4a5(0x11e)],'roleType':_0xe71d03[_0x3ef4a5(0x113)]},'menus':_0x1cd78c}};}};
1
+ const a50_0x27d13e=a50_0xdf88;function a50_0xdf88(_0x3a5c5a,_0x21a749){_0x3a5c5a=_0x3a5c5a-0x188;const _0xca8eb3=a50_0xca8e();let _0xdf8858=_0xca8eb3[_0x3a5c5a];return _0xdf8858;}(function(_0x221ba0,_0x7bd835){const _0x59e477=a50_0xdf88,_0x491bbd=_0x221ba0();while(!![]){try{const _0x1432ca=parseInt(_0x59e477(0x193))/0x1+-parseInt(_0x59e477(0x194))/0x2+parseInt(_0x59e477(0x188))/0x3*(parseInt(_0x59e477(0x18e))/0x4)+parseInt(_0x59e477(0x18b))/0x5+parseInt(_0x59e477(0x195))/0x6*(parseInt(_0x59e477(0x190))/0x7)+-parseInt(_0x59e477(0x191))/0x8*(parseInt(_0x59e477(0x19a))/0x9)+-parseInt(_0x59e477(0x192))/0xa*(parseInt(_0x59e477(0x18f))/0xb);if(_0x1432ca===_0x7bd835)break;else _0x491bbd['push'](_0x491bbd['shift']());}catch(_0x40c4a3){_0x491bbd['push'](_0x491bbd['shift']());}}}(a50_0xca8e,0x503cf));import{getRuntimeRoleMenuResources}from'../../core/api-client.js';function a50_0xca8e(){const _0x41f805=['1110564KhCgyr','588JYNVHs','role','appCode','roleName','Show\x20evaluated\x20runtime\x20menu\x20access\x20for\x20one\x20role','53991rkXwId','474bnOlUI','roleType','role-menus','581505tbAXEO','str','permit','2992eicSpI','7491vKIwWo','27139BBLQxu','120xknscU','3390LFhKDl','590350bEgaOf'];a50_0xca8e=function(){return _0x41f805;};return a50_0xca8e();}import{resolveRuntimeRoleRef}from'../../commands/role/shared.js';import{ROLE_REF_FLAG}from'../../commands/permit/shared.js';export const permitRoleMenus={'service':a50_0x27d13e(0x18d),'command':a50_0x27d13e(0x18a),'description':a50_0x27d13e(0x199),'risk':'read','flags':[ROLE_REF_FLAG],async 'execute'(_0x4c9e67){const _0x510cf1=a50_0x27d13e,_0x19f800=await resolveRuntimeRoleRef(_0x4c9e67[_0x510cf1(0x197)],_0x4c9e67[_0x510cf1(0x18c)](_0x510cf1(0x196))),_0x162c40=await getRuntimeRoleMenuResources(_0x4c9e67[_0x510cf1(0x197)],_0x19f800['id']);return{'ok':!![],'data':{'scope':'runtime','role':{'id':_0x19f800['id'],'roleName':_0x19f800[_0x510cf1(0x198)],'roleType':_0x19f800[_0x510cf1(0x189)]},'menus':_0x162c40}};}};
@@ -1 +1 @@
1
- const a51_0x1161af=a51_0x3bee;(function(_0x3195aa,_0x363b8f){const _0x34ece0=a51_0x3bee,_0x33d0f7=_0x3195aa();while(!![]){try{const _0x5b0565=parseInt(_0x34ece0(0x13a))/0x1+parseInt(_0x34ece0(0x106))/0x2*(-parseInt(_0x34ece0(0x103))/0x3)+parseInt(_0x34ece0(0x12a))/0x4+-parseInt(_0x34ece0(0x139))/0x5*(-parseInt(_0x34ece0(0x102))/0x6)+-parseInt(_0x34ece0(0x11d))/0x7*(parseInt(_0x34ece0(0x11e))/0x8)+-parseInt(_0x34ece0(0x10a))/0x9*(parseInt(_0x34ece0(0x13b))/0xa)+-parseInt(_0x34ece0(0x107))/0xb*(-parseInt(_0x34ece0(0x11c))/0xc);if(_0x5b0565===_0x363b8f)break;else _0x33d0f7['push'](_0x33d0f7['shift']());}catch(_0x5766e5){_0x33d0f7['push'](_0x33d0f7['shift']());}}}(a51_0x1d2d,0xc1319));import{getLoginUserInfo,listRuntimePermitRoles,listRuntimeRoleUsers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{normalizeRuntimeUserId}from'../../utils/runtime-user-id.js';export const MENU_ID_FLAG={'name':a51_0x1161af(0x124),'type':a51_0x1161af(0x115),'required':!![],'description':a51_0x1161af(0x140)};export const ROLE_REF_FLAG={'name':a51_0x1161af(0x108),'type':'string','required':!![],'description':a51_0x1161af(0x12c)};function a51_0x3bee(_0x2faca8,_0x2a140c){_0x2faca8=_0x2faca8-0xf9;const _0x1d2d56=a51_0x1d2d();let _0x3bee2e=_0x1d2d56[_0x2faca8];return _0x3bee2e;}export const GRANT_FLAG={'name':a51_0x1161af(0x116),'type':a51_0x1161af(0x133),'description':a51_0x1161af(0x136)};export const REVOKE_FLAG={'name':'revoke','type':'boolean','description':a51_0x1161af(0x10b)};export const PAGE_SLOT_SPECS=[{'flag':'menu-roles','key':a51_0x1161af(0x119),'allowSelf':![]},{'flag':a51_0x1161af(0x117),'key':a51_0x1161af(0x110),'allowSelf':![]},{'flag':a51_0x1161af(0x125),'key':a51_0x1161af(0x12d),'allowSelf':![]},{'flag':'delete-roles','key':a51_0x1161af(0xf9),'allowSelf':![]},{'flag':'detail-roles','key':'dataDetail','allowSelf':![]},{'flag':a51_0x1161af(0x11f),'key':'dataExport','allowSelf':![]},{'flag':a51_0x1161af(0x121),'key':a51_0x1161af(0x130),'allowSelf':!![]}];export const PAGE_ROLE_FLAGS=PAGE_SLOT_SPECS[a51_0x1161af(0x104)](_0x41f365=>({'name':_0x41f365[a51_0x1161af(0x105)],'type':a51_0x1161af(0x129),'description':a51_0x1161af(0x13e)}));export function splitRefs(_0x43ba44,_0x4e01f0){const _0x467eaf=a51_0x1161af,_0x529dd0=[...new Set(_0x43ba44['split'](',')[_0x467eaf(0x104)](_0x3d4020=>_0x3d4020['trim']())['filter'](Boolean))];if(_0x529dd0[_0x467eaf(0x128)]===0x0)throw CliErrors['validation'](_0x4e01f0+_0x467eaf(0x113));return _0x529dd0;}export function assertGrantOrRevoke(_0xf74ef7,_0x1d7b71){const _0x1feda0=a51_0x1161af;if(_0xf74ef7===_0x1d7b71)throw CliErrors[_0x1feda0(0x11b)]('Pass\x20exactly\x20one\x20of\x20--grant\x20or\x20--revoke.');return _0xf74ef7?_0x1feda0(0x116):'revoke';}function assertPermitRoleId(_0x46438a){const _0x38f21f=a51_0x1161af,_0x3a1e7a=_0x46438a['id'],_0x310d20=typeof _0x3a1e7a==='number'&&Number[_0x38f21f(0x134)](_0x3a1e7a)&&(_0x3a1e7a>0x0||_0x3a1e7a===-0x2&&_0x46438a[_0x38f21f(0x109)]===_0x38f21f(0x120)||_0x3a1e7a===-0x1&&_0x46438a[_0x38f21f(0x109)]===_0x38f21f(0x13c)||_0x3a1e7a===0x0&&_0x46438a['roleType']===_0x38f21f(0x126));if(!_0x310d20)throw CliErrors[_0x38f21f(0x11b)]('Permission\x20role\x20has\x20an\x20invalid\x20ID;\x20reload\x20roles\x20before\x20writing.');}function resolvePermitRole(_0x379286,_0x4735d4){const _0x21582e=a51_0x1161af,_0xe745ad=_0x4735d4[_0x21582e(0x138)](),_0x523851=/^-?\d+$/[_0x21582e(0xfc)](_0xe745ad)?_0x379286['filter'](_0x193cd5=>_0x193cd5['id']===Number(_0xe745ad)):_0x379286[_0x21582e(0xff)](_0x426d65=>_0x426d65[_0x21582e(0xfa)]===_0xe745ad||_0x426d65[_0x21582e(0x109)]===_0xe745ad[_0x21582e(0x122)]());if(_0x523851[_0x21582e(0x128)]!==0x1)throw CliErrors[_0x21582e(0x11b)](_0x523851[_0x21582e(0x128)]===0x0?_0x21582e(0x13d)+_0xe745ad+_0x21582e(0x127):_0x21582e(0x13d)+_0xe745ad+_0x21582e(0xfe),'Use\x20a\x20role\x20ID\x20from\x20`lovrabet\x20role\x20list`.');const _0x415ea1=_0x523851[0x0];return assertPermitRoleId(_0x415ea1),_0x415ea1;}export async function resolveRuntimePermitRoles(_0xa72c63,_0x2f2418,_0x2904c3){const _0x414c79=a51_0x1161af,_0x45c6e1=await listRuntimePermitRoles(_0xa72c63,{'needSelf':!![],'needPublic':!![]}),_0x4c2c39=[...new Map(_0x2f2418[_0x414c79(0x104)](_0x1dcaee=>resolvePermitRole(_0x45c6e1,_0x1dcaee))[_0x414c79(0x104)](_0x1695cb=>[_0x1695cb['id'],_0x1695cb]))[_0x414c79(0x10f)]()],_0x55196e=_0x4c2c39[_0x414c79(0x13f)](_0x392c47=>_0x392c47[_0x414c79(0x109)]===_0x414c79(0x100)||_0x392c47[_0x414c79(0x109)]===_0x414c79(0x111));if(_0x55196e)throw CliErrors[_0x414c79(0x11b)](_0x55196e[_0x414c79(0x109)]+_0x414c79(0x112),_0x414c79(0x118));if(!_0x2904c3&&_0x4c2c39['some'](_0x441230=>_0x441230[_0x414c79(0x109)]===_0x414c79(0x126)))throw CliErrors[_0x414c79(0x11b)]('SELF\x20is\x20only\x20valid\x20for\x20--row-roles.');return _0x4c2c39;}export async function assertRuntimePermissionManager(_0x276add){const _0x37bd78=a51_0x1161af,_0x499a7c=await getLoginUserInfo(),_0x8cb537=_0x499a7c[_0x37bd78(0x135)]??_0x499a7c['id'],_0x1c58e7=normalizeRuntimeUserId(_0x8cb537);if(_0x1c58e7===undefined)throw CliErrors[_0x37bd78(0x11b)]('Cannot\x20resolve\x20the\x20current\x20AK\x20userId\x20for\x20permission\x20management.');const _0x4adb38=await listRuntimeRoleUsers(_0x276add),_0xcfbaf0=_0x4adb38['some'](_0x243118=>(_0x243118['roleType']==='ADMIN'||_0x243118[_0x37bd78(0x109)]===_0x37bd78(0x111))&&(_0x243118[_0x37bd78(0x123)]??[])[_0x37bd78(0x12b)](_0xfcdf49=>normalizeRuntimeUserId(_0xfcdf49[_0x37bd78(0x135)])===_0x1c58e7));if(!_0xcfbaf0)throw CliErrors[_0x37bd78(0x11b)](_0x37bd78(0x137),_0x37bd78(0x101));}export function assertRuntimePermitRoleConfigurable(_0x4c64ff){const _0x46a5ae=a51_0x1161af;if(_0x4c64ff[_0x46a5ae(0x109)]===_0x46a5ae(0x100)||_0x4c64ff[_0x46a5ae(0x109)]===_0x46a5ae(0x111))throw CliErrors[_0x46a5ae(0x11b)]('Cannot\x20change\x20resource\x20permissions\x20for\x20'+_0x4c64ff[_0x46a5ae(0x109)]+'\x20runtime\x20role\x20'+_0x4c64ff[_0x46a5ae(0xfa)]+'.',_0x46a5ae(0x141));}function asPermitRole(_0x5966c7){const _0x1396db=a51_0x1161af;return{'id':_0x5966c7['id'],'roleName':_0x5966c7[_0x1396db(0xfa)],'roleType':_0x5966c7[_0x1396db(0x109)],'allowed':!![]};}function a51_0x1d2d(){const _0x5a9650=['userList','menu-id','update-roles','SELF','\x22\x20was\x20not\x20found.','length','string','3134588PbAlee','some','Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name','dataUpdate','resourceType','push','dataPermit','key','permitId','boolean','isSafeInteger','userId','Grant\x20the\x20selected\x20resources\x20to\x20the\x20role','Runtime\x20resource\x20permission\x20changes\x20require\x20an\x20ADMIN\x20or\x20OWNER\x20role.','trim','5bIUZta','191035cQofwY','10VwSiIj','ALL','Permission\x20role\x20\x22','Comma-separated\x20runtime\x20role\x20IDs\x20or\x20names','find','Runtime\x20menu\x20ID','ADMIN\x20and\x20OWNER\x20have\x20full\x20runtime\x20access;\x20configure\x20USER\x20or\x20CUSTOM\x20instead.','MENU','dataDelete','roleName','menuId','test','appCode','\x22\x20is\x20ambiguous.','filter','ADMIN','Ask\x20an\x20application\x20manager\x20to\x20perform\x20this\x20operation.','1519650ruROob','3711glzWqX','map','flag','1364VZMYiz','33539vhHUfv','role','roleType','2675817ChqhDa','Revoke\x20the\x20selected\x20resources\x20from\x20the\x20role','children','forEach','label','values','dataCreate','OWNER','\x20has\x20full\x20runtime\x20access\x20and\x20cannot\x20be\x20a\x20resource\x20permission\x20target.','\x20must\x20contain\x20at\x20least\x20one\x20value.','runtime','number','grant','create-roles','Configure\x20USER,\x20CUSTOM,\x20or\x20an\x20applicable\x20special\x20role\x20instead.','menuPermit','The\x20current\x20service\x20contract\x20does\x20not\x20persist\x20an\x20empty\x20rolePermit;\x20grant\x20another\x20role\x20first.','validation','7692TLjTgn','14ywcXZy','5000392SjlUlE','export-roles','PUBLIC','row-roles','toUpperCase'];a51_0x1d2d=function(){return _0x5a9650;};return a51_0x1d2d();}export function applyRuntimeRolePermission(_0x5df007,_0x5ab389,_0x50bdbc,_0x3ee375){const _0x4c525c=a51_0x1161af,_0x207486=!_0x5df007||_0x5df007['length']===0x0,_0x31ef97=_0x5df007?.['some'](_0x10d075=>_0x10d075[_0x4c525c(0x109)]===_0x4c525c(0x13c))??![];if(_0x3ee375==='grant'&&(_0x207486||_0x31ef97))return{'roles':_0x5df007??null,'changed':![]};if(_0x207486||_0x31ef97)_0x50bdbc[_0x4c525c(0x10d)](assertPermitRoleId);let _0x36b1e6=_0x207486||_0x31ef97?_0x50bdbc[_0x4c525c(0xff)](_0x439e70=>typeof _0x439e70['id']==='number'&&_0x439e70['id']>0x0):[..._0x5df007];const _0x1c9ffe=_0x36b1e6['some'](_0x5b15a3=>_0x5b15a3['id']===_0x5ab389['id']);if(_0x3ee375===_0x4c525c(0x116)){if(_0x1c9ffe)return{'roles':_0x36b1e6,'changed':![]};return _0x36b1e6[_0x4c525c(0x12f)](asPermitRole(_0x5ab389)),{'roles':_0x36b1e6,'changed':!![]};}if(!_0x1c9ffe)return{'roles':_0x36b1e6,'changed':_0x207486||_0x31ef97};_0x36b1e6=_0x36b1e6['filter'](_0x118ba0=>_0x118ba0['id']!==_0x5ab389['id']);if(_0x36b1e6[_0x4c525c(0x128)]===0x0)throw CliErrors[_0x4c525c(0x11b)]('Cannot\x20revoke\x20the\x20last\x20role\x20from\x20a\x20runtime\x20resource.',_0x4c525c(0x11a));return{'roles':_0x36b1e6,'changed':!![]};}export function projectRuntimePagePermit(_0x4d6f06){const _0xb7b877=a51_0x1161af,_0x521dc3={'menuId':_0x4d6f06[_0xb7b877(0xfb)],'pageId':_0x4d6f06['pageId'],'appCode':_0x4d6f06[_0xb7b877(0xfd)],'datasetCode':_0x4d6f06['datasetCode']};for(const _0x81b889 of PAGE_SLOT_SPECS){const _0x1d8932=_0x4d6f06[_0x81b889[_0xb7b877(0x131)]];_0x1d8932&&(_0x521dc3[_0x81b889[_0xb7b877(0x131)]]={'resourceCode':_0x1d8932['resourceCode'],'resourceType':_0x1d8932[_0xb7b877(0x12e)],'roles':(_0x1d8932['rolePermit']??[])[_0xb7b877(0x104)](_0xee0ded=>({'id':_0xee0ded['id'],'roleName':_0xee0ded[_0xb7b877(0xfa)],'roleType':_0xee0ded[_0xb7b877(0x109)]}))});}return _0x521dc3;}export function flattenRuntimeMenuRolePermits(_0x385d1a){const _0x4b7aa2=[],_0x6e92ce=_0x295a42=>{const _0x4f256d=a51_0x3bee;_0x4b7aa2[_0x4f256d(0x12f)](_0x295a42);for(const _0x1a8e98 of _0x295a42[_0x4f256d(0x10c)]??[])_0x6e92ce(_0x1a8e98);};for(const _0x37b9b3 of _0x385d1a)_0x6e92ce(_0x37b9b3);return _0x4b7aa2;}export function runtimePermitWriteResult(_0x4819b4,_0x3288d9,_0xc66a06,_0x3fe740,_0x478747,_0x4b46ff=[]){const _0xe75cb6=a51_0x1161af;return{'operation':_0x4819b4,'scope':_0xe75cb6(0x114),'selector':_0x3288d9,'before':_0xc66a06,'after':_0x3fe740,'dryRun':![],'backend':_0x478747,'warnings':_0x4b46ff};}export function menuPermitDto(_0xa5f9fd,_0x593fdb,_0x406e8b){const _0x13f66c=a51_0x1161af;return{..._0x593fdb[_0x13f66c(0x132)]!=null?{'id':_0x593fdb[_0x13f66c(0x132)]}:{},'appCode':_0xa5f9fd,'menuId':_0x593fdb['id'],'pageId':_0x593fdb['pageId']??null,'resourceCode':String(_0x593fdb['id']),'resourceType':_0x13f66c(0x142),'resourceName':_0x593fdb[_0x13f66c(0x10e)],'rolePermit':_0x406e8b};}
1
+ const a51_0x4f6005=a51_0x5759;(function(_0x45100c,_0x2b6fc6){const _0x5156ef=a51_0x5759,_0xcbc20b=_0x45100c();while(!![]){try{const _0x2429b9=-parseInt(_0x5156ef(0xfb))/0x1*(-parseInt(_0x5156ef(0x117))/0x2)+parseInt(_0x5156ef(0xd7))/0x3+-parseInt(_0x5156ef(0x10f))/0x4*(parseInt(_0x5156ef(0x116))/0x5)+parseInt(_0x5156ef(0xfa))/0x6*(parseInt(_0x5156ef(0x10e))/0x7)+parseInt(_0x5156ef(0xcf))/0x8+-parseInt(_0x5156ef(0x103))/0x9*(parseInt(_0x5156ef(0x114))/0xa)+-parseInt(_0x5156ef(0xde))/0xb;if(_0x2429b9===_0x2b6fc6)break;else _0xcbc20b['push'](_0xcbc20b['shift']());}catch(_0x400baa){_0xcbc20b['push'](_0xcbc20b['shift']());}}}(a51_0x33d7,0xca3e9));import{getLoginUserInfo,listRuntimePermitRoles,listRuntimeRoleUsers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{normalizeRuntimeUserId}from'../../utils/runtime-user-id.js';export const MENU_ID_FLAG={'name':a51_0x4f6005(0xe7),'type':'number','required':!![],'description':a51_0x4f6005(0xe0)};export const ROLE_REF_FLAG={'name':'role','type':'string','required':!![],'description':'Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name'};function a51_0x33d7(){const _0x593da1=['userId','find','Permission\x20role\x20\x22','Runtime\x20resource\x20permission\x20changes\x20require\x20an\x20ADMIN\x20or\x20OWNER\x20role.','ALL','string','key','label','PUBLIC','forEach','create-roles','Cannot\x20resolve\x20the\x20current\x20AK\x20userId\x20for\x20permission\x20management.','\x20has\x20full\x20runtime\x20access\x20and\x20cannot\x20be\x20a\x20resource\x20permission\x20target.','12szmdnH','541885uetMDH','roleType','dataDetail','roleName','validation','\x22\x20was\x20not\x20found.','boolean','menu-roles','58383zXAMka','pageId','isSafeInteger','number','Permission\x20role\x20has\x20an\x20invalid\x20ID;\x20reload\x20roles\x20before\x20writing.','dataPermit','ADMIN\x20and\x20OWNER\x20have\x20full\x20runtime\x20access;\x20configure\x20USER\x20or\x20CUSTOM\x20instead.','ADMIN','children','Pass\x20exactly\x20one\x20of\x20--grant\x20or\x20--revoke.','filter','1314047DOogBE','29252NLhAAC','values','length','dataCreate','split','320VzXyDB','some','295DFCIuL','2deHjqx','export-roles','dataExport','dataDelete','Configure\x20USER,\x20CUSTOM,\x20or\x20an\x20applicable\x20special\x20role\x20instead.','update-roles','5700088UeyexF','userList','dataUpdate','\x22\x20is\x20ambiguous.','trim','delete-roles','resourceCode','\x20must\x20contain\x20at\x20least\x20one\x20value.','2776203avAIpv','\x20runtime\x20role\x20','map','row-roles','menuPermit','revoke','Comma-separated\x20runtime\x20role\x20IDs\x20or\x20names','11965745TDCIxg','runtime','Runtime\x20menu\x20ID','Grant\x20the\x20selected\x20resources\x20to\x20the\x20role','Use\x20a\x20role\x20ID\x20from\x20`lovrabet\x20role\x20list`.','Cannot\x20change\x20resource\x20permissions\x20for\x20','datasetCode','grant','menuId','menu-id','OWNER','test','permitId','Ask\x20an\x20application\x20manager\x20to\x20perform\x20this\x20operation.','flag'];a51_0x33d7=function(){return _0x593da1;};return a51_0x33d7();}export const GRANT_FLAG={'name':'grant','type':a51_0x4f6005(0x101),'description':a51_0x4f6005(0xe1)};export const REVOKE_FLAG={'name':'revoke','type':a51_0x4f6005(0x101),'description':'Revoke\x20the\x20selected\x20resources\x20from\x20the\x20role'};export const PAGE_SLOT_SPECS=[{'flag':a51_0x4f6005(0x102),'key':a51_0x4f6005(0xdb),'allowSelf':![]},{'flag':a51_0x4f6005(0xf7),'key':a51_0x4f6005(0x112),'allowSelf':![]},{'flag':a51_0x4f6005(0xce),'key':a51_0x4f6005(0xd1),'allowSelf':![]},{'flag':a51_0x4f6005(0xd4),'key':a51_0x4f6005(0xcc),'allowSelf':![]},{'flag':'detail-roles','key':a51_0x4f6005(0xfd),'allowSelf':![]},{'flag':a51_0x4f6005(0xca),'key':a51_0x4f6005(0xcb),'allowSelf':![]},{'flag':a51_0x4f6005(0xda),'key':a51_0x4f6005(0x108),'allowSelf':!![]}];export const PAGE_ROLE_FLAGS=PAGE_SLOT_SPECS[a51_0x4f6005(0xd9)](_0x2521f1=>({'name':_0x2521f1[a51_0x4f6005(0xec)],'type':a51_0x4f6005(0xf2),'description':a51_0x4f6005(0xdd)}));export function splitRefs(_0x566f4f,_0x2623e2){const _0x35961=a51_0x4f6005,_0x5e4b23=[...new Set(_0x566f4f[_0x35961(0x113)](',')['map'](_0x2521cf=>_0x2521cf['trim']())['filter'](Boolean))];if(_0x5e4b23['length']===0x0)throw CliErrors[_0x35961(0xff)](_0x2623e2+_0x35961(0xd6));return _0x5e4b23;}export function assertGrantOrRevoke(_0x1196fd,_0x2d9622){const _0x4757a4=a51_0x4f6005;if(_0x1196fd===_0x2d9622)throw CliErrors[_0x4757a4(0xff)](_0x4757a4(0x10c));return _0x1196fd?'grant':_0x4757a4(0xdc);}function assertPermitRoleId(_0x4ec9a2){const _0x24df45=a51_0x4f6005,_0x71824d=_0x4ec9a2['id'],_0x1c7e63=typeof _0x71824d===_0x24df45(0x106)&&Number[_0x24df45(0x105)](_0x71824d)&&(_0x71824d>0x0||_0x71824d===-0x2&&_0x4ec9a2[_0x24df45(0xfc)]===_0x24df45(0xf5)||_0x71824d===-0x1&&_0x4ec9a2[_0x24df45(0xfc)]===_0x24df45(0xf1)||_0x71824d===0x0&&_0x4ec9a2['roleType']==='SELF');if(!_0x1c7e63)throw CliErrors[_0x24df45(0xff)](_0x24df45(0x107));}function resolvePermitRole(_0x5519c6,_0x55e501){const _0x23edf9=a51_0x4f6005,_0x1eb3b9=_0x55e501[_0x23edf9(0xd3)](),_0x277995=/^-?\d+$/[_0x23edf9(0xe9)](_0x1eb3b9)?_0x5519c6[_0x23edf9(0x10d)](_0x1a2e13=>_0x1a2e13['id']===Number(_0x1eb3b9)):_0x5519c6['filter'](_0x2ccef3=>_0x2ccef3[_0x23edf9(0xfe)]===_0x1eb3b9||_0x2ccef3[_0x23edf9(0xfc)]===_0x1eb3b9['toUpperCase']());if(_0x277995[_0x23edf9(0x111)]!==0x1)throw CliErrors[_0x23edf9(0xff)](_0x277995[_0x23edf9(0x111)]===0x0?_0x23edf9(0xef)+_0x1eb3b9+_0x23edf9(0x100):_0x23edf9(0xef)+_0x1eb3b9+_0x23edf9(0xd2),_0x23edf9(0xe2));const _0x50149c=_0x277995[0x0];return assertPermitRoleId(_0x50149c),_0x50149c;}export async function resolveRuntimePermitRoles(_0x21618c,_0x32f101,_0x1cb590){const _0x2b3f8f=a51_0x4f6005,_0x490bc5=await listRuntimePermitRoles(_0x21618c,{'needSelf':!![],'needPublic':!![]}),_0x17a845=[...new Map(_0x32f101[_0x2b3f8f(0xd9)](_0x18a115=>resolvePermitRole(_0x490bc5,_0x18a115))[_0x2b3f8f(0xd9)](_0x2efef7=>[_0x2efef7['id'],_0x2efef7]))[_0x2b3f8f(0x110)]()],_0x126c99=_0x17a845[_0x2b3f8f(0xee)](_0x4c14a8=>_0x4c14a8[_0x2b3f8f(0xfc)]==='ADMIN'||_0x4c14a8[_0x2b3f8f(0xfc)]===_0x2b3f8f(0xe8));if(_0x126c99)throw CliErrors[_0x2b3f8f(0xff)](_0x126c99[_0x2b3f8f(0xfc)]+_0x2b3f8f(0xf9),_0x2b3f8f(0xcd));if(!_0x1cb590&&_0x17a845['some'](_0x2f70cf=>_0x2f70cf[_0x2b3f8f(0xfc)]==='SELF'))throw CliErrors['validation']('SELF\x20is\x20only\x20valid\x20for\x20--row-roles.');return _0x17a845;}export async function assertRuntimePermissionManager(_0x4fd5dc){const _0x12b172=a51_0x4f6005,_0x4343f9=await getLoginUserInfo(),_0xfdd28=_0x4343f9['userId']??_0x4343f9['id'],_0xfdce7b=normalizeRuntimeUserId(_0xfdd28);if(_0xfdce7b===undefined)throw CliErrors[_0x12b172(0xff)](_0x12b172(0xf8));const _0x3e467f=await listRuntimeRoleUsers(_0x4fd5dc),_0x3d8e6a=_0x3e467f[_0x12b172(0x115)](_0x39a4ac=>(_0x39a4ac[_0x12b172(0xfc)]==='ADMIN'||_0x39a4ac[_0x12b172(0xfc)]===_0x12b172(0xe8))&&(_0x39a4ac[_0x12b172(0xd0)]??[])[_0x12b172(0x115)](_0x1847e0=>normalizeRuntimeUserId(_0x1847e0[_0x12b172(0xed)])===_0xfdce7b));if(!_0x3d8e6a)throw CliErrors[_0x12b172(0xff)](_0x12b172(0xf0),_0x12b172(0xeb));}export function assertRuntimePermitRoleConfigurable(_0x564f6b){const _0x2b2628=a51_0x4f6005;if(_0x564f6b['roleType']===_0x2b2628(0x10a)||_0x564f6b[_0x2b2628(0xfc)]==='OWNER')throw CliErrors[_0x2b2628(0xff)](_0x2b2628(0xe3)+_0x564f6b['roleType']+_0x2b2628(0xd8)+_0x564f6b[_0x2b2628(0xfe)]+'.',_0x2b2628(0x109));}function asPermitRole(_0x29e384){const _0x388706=a51_0x4f6005;return{'id':_0x29e384['id'],'roleName':_0x29e384[_0x388706(0xfe)],'roleType':_0x29e384['roleType'],'allowed':!![]};}export function applyRuntimeRolePermission(_0x32aa9c,_0xa9f3e8,_0x463f9e,_0x50b175){const _0x56aa7c=a51_0x4f6005,_0x512ed8=!_0x32aa9c||_0x32aa9c[_0x56aa7c(0x111)]===0x0,_0x3ad9f5=_0x32aa9c?.[_0x56aa7c(0x115)](_0x138c00=>_0x138c00['roleType']==='ALL')??![];if(_0x50b175==='grant'&&(_0x512ed8||_0x3ad9f5))return{'roles':_0x32aa9c??null,'changed':![]};if(_0x512ed8||_0x3ad9f5)_0x463f9e[_0x56aa7c(0xf6)](assertPermitRoleId);let _0x298aad=_0x512ed8||_0x3ad9f5?_0x463f9e[_0x56aa7c(0x10d)](_0x30e045=>typeof _0x30e045['id']==='number'&&_0x30e045['id']>0x0):[..._0x32aa9c];const _0x4bb91d=_0x298aad[_0x56aa7c(0x115)](_0x1983cd=>_0x1983cd['id']===_0xa9f3e8['id']);if(_0x50b175===_0x56aa7c(0xe5)){if(_0x4bb91d)return{'roles':_0x298aad,'changed':![]};return _0x298aad['push'](asPermitRole(_0xa9f3e8)),{'roles':_0x298aad,'changed':!![]};}if(!_0x4bb91d)return{'roles':_0x298aad,'changed':_0x512ed8||_0x3ad9f5};_0x298aad=_0x298aad['filter'](_0x4d95b2=>_0x4d95b2['id']!==_0xa9f3e8['id']);if(_0x298aad[_0x56aa7c(0x111)]===0x0)throw CliErrors[_0x56aa7c(0xff)]('Cannot\x20revoke\x20the\x20last\x20role\x20from\x20a\x20runtime\x20resource.','The\x20current\x20service\x20contract\x20does\x20not\x20persist\x20an\x20empty\x20rolePermit;\x20grant\x20another\x20role\x20first.');return{'roles':_0x298aad,'changed':!![]};}export function projectRuntimePagePermit(_0x2cbd01){const _0x3ac572=a51_0x4f6005,_0x124e00={'menuId':_0x2cbd01[_0x3ac572(0xe6)],'pageId':_0x2cbd01[_0x3ac572(0x104)],'appCode':_0x2cbd01['appCode'],'datasetCode':_0x2cbd01[_0x3ac572(0xe4)]};for(const _0x52167e of PAGE_SLOT_SPECS){const _0x2ec654=_0x2cbd01[_0x52167e[_0x3ac572(0xf3)]];_0x2ec654&&(_0x124e00[_0x52167e[_0x3ac572(0xf3)]]={'resourceCode':_0x2ec654[_0x3ac572(0xd5)],'resourceType':_0x2ec654['resourceType'],'roles':(_0x2ec654['rolePermit']??[])[_0x3ac572(0xd9)](_0x595dfb=>({'id':_0x595dfb['id'],'roleName':_0x595dfb['roleName'],'roleType':_0x595dfb['roleType']}))});}return _0x124e00;}export function flattenRuntimeMenuRolePermits(_0x5b0538){const _0x57b963=[],_0x44c648=_0x1e62b1=>{const _0x4a65cb=a51_0x5759;_0x57b963['push'](_0x1e62b1);for(const _0x104146 of _0x1e62b1[_0x4a65cb(0x10b)]??[])_0x44c648(_0x104146);};for(const _0x447690 of _0x5b0538)_0x44c648(_0x447690);return _0x57b963;}function a51_0x5759(_0xb358bb,_0x2ae087){_0xb358bb=_0xb358bb-0xca;const _0x33d782=a51_0x33d7();let _0x5759dd=_0x33d782[_0xb358bb];return _0x5759dd;}export function runtimePermitWriteResult(_0x4dcf1c,_0x404e04,_0x312253,_0x37ecc6,_0xd921c0,_0x54e103=[]){const _0x2002bb=a51_0x4f6005;return{'operation':_0x4dcf1c,'scope':_0x2002bb(0xdf),'selector':_0x404e04,'before':_0x312253,'after':_0x37ecc6,'dryRun':![],'backend':_0xd921c0,'warnings':_0x54e103};}export function menuPermitDto(_0x6829db,_0x2460ca,_0x2c6dac){const _0x7121fe=a51_0x4f6005;return{..._0x2460ca[_0x7121fe(0xea)]!=null?{'id':_0x2460ca[_0x7121fe(0xea)]}:{},'appCode':_0x6829db,'menuId':_0x2460ca['id'],'pageId':_0x2460ca['pageId']??null,'resourceCode':String(_0x2460ca['id']),'resourceType':'MENU','resourceName':_0x2460ca[_0x7121fe(0xf4)],'rolePermit':_0x2c6dac};}
@@ -1 +1 @@
1
- const a52_0x45bb82=a52_0x4af9;(function(_0xb14e60,_0x22ad25){const _0x7703b7=a52_0x4af9,_0x243e42=_0xb14e60();while(!![]){try{const _0x192873=-parseInt(_0x7703b7(0x1e9))/0x1+parseInt(_0x7703b7(0x1ec))/0x2+parseInt(_0x7703b7(0x1f1))/0x3+parseInt(_0x7703b7(0x1bd))/0x4+parseInt(_0x7703b7(0x1ed))/0x5+parseInt(_0x7703b7(0x1f2))/0x6*(-parseInt(_0x7703b7(0x1da))/0x7)+parseInt(_0x7703b7(0x1e4))/0x8;if(_0x192873===_0x22ad25)break;else _0x243e42['push'](_0x243e42['shift']());}catch(_0x2e965b){_0x243e42['push'](_0x243e42['shift']());}}}(a52_0x526f,0x1fb41));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalBff,executePersonalBff,getPersonalBff,listPersonalBffs,updatePersonalBff}from'../../core/api-client.js';import{ID_FLAG,PARAMS_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';function a52_0x4af9(_0x5ec689,_0x3552e3){_0x5ec689=_0x5ec689-0x1b0;const _0x526f83=a52_0x526f();let _0x4af9=_0x526f83[_0x5ec689];return _0x4af9;}import{parseJsonParams}from'../../utils/params.js';const FUNCTION_NAME_PATTERN=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/,FILE_FLAG={'name':a52_0x45bb82(0x1c5),'type':a52_0x45bb82(0x1e5),'description':'Path\x20to\x20a\x20local\x20UTF-8\x20JavaScript\x20or\x20TypeScript\x20file'},FUNCTION_NAME_FLAG={'name':a52_0x45bb82(0x1ef),'type':'string','required':!![],'description':a52_0x45bb82(0x1c9)},DESCRIPTION_FLAG={'name':a52_0x45bb82(0x1d2),'type':a52_0x45bb82(0x1e5),'description':a52_0x45bb82(0x1bf)},SOURCE_SESSION_FLAG={'name':a52_0x45bb82(0x1dd),'type':a52_0x45bb82(0x1e5),'description':'Optional\x20source\x20RuntimeAgent\x20session\x20id'};function normalizeFunctionName(_0x194431){const _0x19f161=a52_0x45bb82,_0x5316ea=String(_0x194431||'')['trim']();if(!_0x5316ea||!FUNCTION_NAME_PATTERN['test'](_0x5316ea))throw CliErrors[_0x19f161(0x1e6)]('--name\x20must\x20be\x20a\x20valid\x20JavaScript\x20identifier,\x20for\x20example\x20loadOrders.');return _0x5316ea;}function readScriptFile(_0x3e52ab){const _0x401c34=a52_0x45bb82;if(!_0x3e52ab)throw CliErrors[_0x401c34(0x1e6)]('File\x20path\x20is\x20required.');if(!existsSync(_0x3e52ab))throw CliErrors[_0x401c34(0x1e6)](_0x401c34(0x1ea)+_0x3e52ab);if(!statSync(_0x3e52ab)['isFile']())throw CliErrors[_0x401c34(0x1e6)](_0x401c34(0x1c2)+_0x3e52ab);const _0x48b914=readFileSync(_0x3e52ab,_0x401c34(0x1c4));if(!_0x48b914[_0x401c34(0x1b8)]())throw CliErrors[_0x401c34(0x1e6)](_0x401c34(0x1bc));return _0x48b914;}function optionalTrimmed(_0xe7eb76){const _0x42ddce=a52_0x45bb82,_0x494954=String(_0xe7eb76||'')[_0x42ddce(0x1b8)]();return _0x494954||undefined;}function summarizeBff(_0x3b8e1f){const _0x1da7a6=a52_0x45bb82;return{'id':_0x3b8e1f['id'],'appCode':_0x3b8e1f[_0x1da7a6(0x1b9)],'functionName':_0x3b8e1f['functionName'],'description':_0x3b8e1f[_0x1da7a6(0x1d2)],'scriptType':_0x3b8e1f['scriptType'],'version':_0x3b8e1f[_0x1da7a6(0x1d3)],'gmtModified':_0x3b8e1f[_0x1da7a6(0x1e1)],'updateTime':_0x3b8e1f[_0x1da7a6(0x1b3)]};}function detailBff(_0x43162a){const _0x14d895=a52_0x45bb82;return{'id':_0x43162a['id'],'appCode':_0x43162a[_0x14d895(0x1b9)],'functionName':_0x43162a[_0x14d895(0x1b5)],'description':_0x43162a[_0x14d895(0x1d2)],'scriptType':_0x43162a[_0x14d895(0x1df)],'scriptContent':_0x43162a[_0x14d895(0x1d5)]??'','config':_0x43162a[_0x14d895(0x1c6)],'version':_0x43162a['version'],'createUserId':_0x43162a[_0x14d895(0x1ee)],'gmtCreate':_0x43162a[_0x14d895(0x1d7)],'gmtModified':_0x43162a[_0x14d895(0x1e1)],'createTime':_0x43162a['createTime'],'updateTime':_0x43162a[_0x14d895(0x1b3)]};}function buildCreateInput(_0x236779){const _0x5e8679=a52_0x45bb82;return{'functionName':normalizeFunctionName(_0x236779[_0x5e8679(0x1c0)](_0x5e8679(0x1ef))),...optionalTrimmed(_0x236779[_0x5e8679(0x1c0)](_0x5e8679(0x1d2)))?{'description':optionalTrimmed(_0x236779['str'](_0x5e8679(0x1d2)))}:{},'scriptContent':readScriptFile(_0x236779[_0x5e8679(0x1c0)](_0x5e8679(0x1c5))),...optionalTrimmed(_0x236779[_0x5e8679(0x1c0)]('source-session-id'))?{'sourceSessionId':optionalTrimmed(_0x236779[_0x5e8679(0x1c0)](_0x5e8679(0x1dd)))}:{}};}function buildUpdateInput(_0xe931bd){const _0x297f8e=a52_0x45bb82,_0x3d2362={};optionalTrimmed(_0xe931bd[_0x297f8e(0x1c0)](_0x297f8e(0x1ef)))&&(_0x3d2362[_0x297f8e(0x1b5)]=normalizeFunctionName(_0xe931bd['str'](_0x297f8e(0x1ef))));_0xe931bd[_0x297f8e(0x1b2)]('description')!==undefined&&(_0x3d2362[_0x297f8e(0x1d2)]=_0xe931bd['str'](_0x297f8e(0x1d2)));optionalTrimmed(_0xe931bd[_0x297f8e(0x1c0)](_0x297f8e(0x1c5)))&&(_0x3d2362[_0x297f8e(0x1d5)]=readScriptFile(_0xe931bd[_0x297f8e(0x1c0)](_0x297f8e(0x1c5))));_0xe931bd[_0x297f8e(0x1b2)](_0x297f8e(0x1dd))!==undefined&&(_0x3d2362['sourceSessionId']=_0xe931bd[_0x297f8e(0x1c0)]('source-session-id'));if(Object[_0x297f8e(0x1d8)](_0x3d2362)[_0x297f8e(0x1de)]===0x0)throw CliErrors['validation'](_0x297f8e(0x1c1));return _0x3d2362;}function a52_0x526f(){const _0x18c74f=['gmtModified','--params\x20must\x20be\x20a\x20JSON\x20object.','update','2023008aUWSNO','string','validation','Runs\x20the\x20Personal\x20Backend\x20Function\x20script.\x20The\x20script\x20may\x20read\x20or\x20change\x20business\x20data,\x20or\x20call\x20external\x20services.','params','258325DiTWDl','File\x20not\x20found:\x20','num','70314pWttYQ','601810FbqVqe','createUserId','name','detail','18153chNqvz','162456gvTyEZ','List\x20current\x20user\x27s\x20Personal\x20Backend\x20Function\x20scripts\x20for\x20the\x20current\x20app','build','isArray','flag','updateTime','Executed\x20Personal\x20Backend\x20Function\x20','functionName','verbose','Updates\x20the\x20Personal\x20Backend\x20Function\x20script\x20or\x20metadata.\x20Later\x20calls\x20use\x20the\x20new\x20version.','trim','appCode','Execute\x20a\x20Personal\x20Backend\x20Function\x20by\x20ID,\x20optionally\x20with\x20JSON\x20params','/update','Personal\x20Backend\x20Function\x20script\x20file\x20is\x20blank.','761376XlJmTI','list','Personal\x20Backend\x20Function\x20description','str','personal-bff\x20update\x20requires\x20at\x20least\x20one\x20of\x20--name,\x20--description,\x20--file,\x20or\x20--source-session-id.','File\x20is\x20not\x20a\x20regular\x20file:\x20','Create\x20a\x20Personal\x20Backend\x20Function\x20from\x20a\x20local\x20script\x20file','utf8','file','config','Saves\x20the\x20local\x20script\x20as\x20a\x20Personal\x20Backend\x20Function.\x20The\x20script\x20can\x20then\x20be\x20called\x20in\x20the\x20current\x20app.','write','Personal\x20Backend\x20Function\x20name,\x20for\x20example\x20loadOrders','Preview:\x20update\x20Personal\x20Backend\x20Function\x20','create','Created\x20Personal\x20Backend\x20Function\x20','body','exec','/client/runtime-bff/personal/','/client/runtime-bff/personal/create','Show\x20one\x20Personal\x20Backend\x20Function\x20by\x20id','description','version','read','scriptContent','personal-bff','gmtCreate','keys','POST','56ncoRXq','bool','Personal\x20Backend\x20Function\x20script\x20ID','source-session-id','length','scriptType','Update\x20a\x20Personal\x20Backend\x20Function\x20by\x20ID'];a52_0x526f=function(){return _0x18c74f;};return a52_0x526f();}function parseExecParams(_0x563153){const _0x1a1efb=a52_0x45bb82,_0x2d7850=parseJsonParams(_0x563153)??{};if(Array[_0x1a1efb(0x1b1)](_0x2d7850))throw CliErrors[_0x1a1efb(0x1e6)](_0x1a1efb(0x1e2));return _0x2d7850;}const personalBffList={'service':a52_0x45bb82(0x1d6),'command':a52_0x45bb82(0x1be),'description':a52_0x45bb82(0x1f3),'risk':'read','flags':[VERBOSE_FLAG],async 'execute'(_0x1002ce){const _0x3f9c0b=a52_0x45bb82,_0x527db5=await listPersonalBffs(_0x1002ce[_0x3f9c0b(0x1b9)]);return{'ok':!![],'data':{'total':_0x527db5['length'],'items':_0x1002ce[_0x3f9c0b(0x1db)](_0x3f9c0b(0x1b6))?_0x527db5:_0x527db5['map'](summarizeBff)}};}},personalBffDetail={'service':a52_0x45bb82(0x1d6),'command':a52_0x45bb82(0x1f0),'description':a52_0x45bb82(0x1d1),'risk':a52_0x45bb82(0x1d4),'flags':[{...ID_FLAG,'description':a52_0x45bb82(0x1dc)}],async 'execute'(_0x2c5743){const _0x33d837=a52_0x45bb82,_0x34f8fa=await getPersonalBff(_0x2c5743['num']('id'),_0x2c5743[_0x33d837(0x1b9)]);return{'ok':!![],'data':detailBff(_0x34f8fa)};}},personalBffCreate={'service':a52_0x45bb82(0x1d6),'command':a52_0x45bb82(0x1cb),'description':a52_0x45bb82(0x1c3),'risk':a52_0x45bb82(0x1c8),'confirmationDescription':a52_0x45bb82(0x1c7),'flags':[FUNCTION_NAME_FLAG,{...FILE_FLAG,'required':!![]},DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x15c4d9){const _0x2e8344=a52_0x45bb82,_0x503524=buildCreateInput(_0x15c4d9),_0x39f1d6=await createPersonalBff(_0x15c4d9[_0x2e8344(0x1b9)],_0x503524);return{'ok':!![],'data':detailBff(_0x39f1d6),'message':_0x2e8344(0x1cc)+_0x39f1d6['id']+(_0x39f1d6[_0x2e8344(0x1b5)]?'\x20('+_0x39f1d6[_0x2e8344(0x1b5)]+')':'')};},async 'dryRun'(_0x5be32e){const _0x5b9bdc=a52_0x45bb82,_0x510b98=buildCreateInput(_0x5be32e);return dryRun(_0x5b9bdc(0x1d9),_0x5b9bdc(0x1d0))[_0x5b9bdc(0x1cd)]({'appCode':_0x5be32e[_0x5b9bdc(0x1b9)],..._0x510b98})[_0x5b9bdc(0x1d2)]('Preview:\x20create\x20Personal\x20Backend\x20Function\x20'+_0x510b98[_0x5b9bdc(0x1b5)])[_0x5b9bdc(0x1b0)]();}},personalBffUpdate={'service':a52_0x45bb82(0x1d6),'command':a52_0x45bb82(0x1e3),'description':a52_0x45bb82(0x1e0),'risk':a52_0x45bb82(0x1c8),'confirmationDescription':a52_0x45bb82(0x1b7),'flags':[{...ID_FLAG,'description':'Personal\x20Backend\x20Function\x20script\x20ID'},{...FUNCTION_NAME_FLAG,'required':![]},FILE_FLAG,DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x2c331b){const _0x42948e=a52_0x45bb82,_0x32e79f=_0x2c331b[_0x42948e(0x1eb)]('id'),_0x2ed71c=buildUpdateInput(_0x2c331b),_0x3b769f=await updatePersonalBff(_0x32e79f,_0x2c331b[_0x42948e(0x1b9)],_0x2ed71c);return{'ok':!![],'data':detailBff(_0x3b769f),'message':'Updated\x20Personal\x20Backend\x20Function\x20'+_0x3b769f['id']+(_0x3b769f[_0x42948e(0x1b5)]?'\x20('+_0x3b769f[_0x42948e(0x1b5)]+')':'')};},async 'dryRun'(_0x439ac8){const _0x57c2ca=a52_0x45bb82,_0x579419=_0x439ac8[_0x57c2ca(0x1eb)]('id'),_0x429068=buildUpdateInput(_0x439ac8);return dryRun(_0x57c2ca(0x1d9),_0x57c2ca(0x1cf)+_0x579419+_0x57c2ca(0x1bb))[_0x57c2ca(0x1cd)]({'appCode':_0x439ac8[_0x57c2ca(0x1b9)],..._0x429068})['description'](_0x57c2ca(0x1ca)+_0x579419)[_0x57c2ca(0x1b0)]();}},personalBffExec={'service':a52_0x45bb82(0x1d6),'command':a52_0x45bb82(0x1ce),'description':a52_0x45bb82(0x1ba),'risk':a52_0x45bb82(0x1c8),'confirmationDescription':a52_0x45bb82(0x1e7),'flags':[{...ID_FLAG,'description':'Personal\x20Backend\x20Function\x20script\x20ID'},{...PARAMS_FLAG,'description':'JSON\x20object\x20passed\x20to\x20the\x20Personal\x20Backend\x20Function\x20execution'}],async 'validate'(_0x3ccc4b){const _0x106f7f=a52_0x45bb82;parseExecParams(_0x3ccc4b[_0x106f7f(0x1c0)](_0x106f7f(0x1e8)));},async 'execute'(_0x586234){const _0x313ceb=a52_0x45bb82,_0x422e70=_0x586234['num']('id'),_0x20097a=parseExecParams(_0x586234['str'](_0x313ceb(0x1e8))),_0x473e2c=await executePersonalBff(_0x422e70,_0x586234[_0x313ceb(0x1b9)],_0x20097a);return{'ok':!![],'data':{'result':_0x473e2c},'message':_0x313ceb(0x1b4)+_0x422e70};}};export const personalBffDefinitions=[personalBffList,personalBffDetail,personalBffCreate,personalBffUpdate,personalBffExec];
1
+ function a52_0x513f(){const _0x56ac82=['438645XBwdMH','scriptContent','Show\x20one\x20Personal\x20Backend\x20Function\x20by\x20id','trim','write','5871817ammXnr','Personal\x20Backend\x20Function\x20script\x20file\x20is\x20blank.','Personal\x20Backend\x20Function\x20script\x20ID','Preview:\x20create\x20Personal\x20Backend\x20Function\x20','List\x20current\x20user\x27s\x20Personal\x20Backend\x20Function\x20scripts\x20for\x20the\x20current\x20app','10kdaQlD','Path\x20to\x20a\x20local\x20UTF-8\x20JavaScript\x20or\x20TypeScript\x20file','/client/runtime-bff/personal/','test','/client/runtime-bff/personal/create','gmtModified','Executed\x20Personal\x20Backend\x20Function\x20','create','string','File\x20is\x20not\x20a\x20regular\x20file:\x20','Optional\x20source\x20RuntimeAgent\x20session\x20id','source-session-id','gmtCreate','4183495xNOjwh','isArray','map','725508nGZjrr','verbose','/update','File\x20not\x20found:\x20','str','validation','personal-bff\x20update\x20requires\x20at\x20least\x20one\x20of\x20--name,\x20--description,\x20--file,\x20or\x20--source-session-id.','num','body','name','sourceSessionId','1112154AjHIvB','3425088MTQjqF','file','params','POST','--name\x20must\x20be\x20a\x20valid\x20JavaScript\x20identifier,\x20for\x20example\x20loadOrders.','length','Saves\x20the\x20local\x20script\x20as\x20a\x20Personal\x20Backend\x20Function.\x20The\x20script\x20can\x20then\x20be\x20called\x20in\x20the\x20current\x20app.','read','personal-bff','bool','JSON\x20object\x20passed\x20to\x20the\x20Personal\x20Backend\x20Function\x20execution','flag','keys','Personal\x20Backend\x20Function\x20description','list','description','exec','appCode','3655332zGixGZ','functionName','Execute\x20a\x20Personal\x20Backend\x20Function\x20by\x20ID,\x20optionally\x20with\x20JSON\x20params','updateTime','build','Update\x20a\x20Personal\x20Backend\x20Function\x20by\x20ID','Personal\x20Backend\x20Function\x20name,\x20for\x20example\x20loadOrders','update','utf8'];a52_0x513f=function(){return _0x56ac82;};return a52_0x513f();}const a52_0x417b87=a52_0x5dcd;(function(_0x3a1c2d,_0x380208){const _0x575678=a52_0x5dcd,_0x17ab5c=_0x3a1c2d();while(!![]){try{const _0x2820a0=parseInt(_0x575678(0x154))/0x1+parseInt(_0x575678(0x139))/0x2*(parseInt(_0x575678(0x12f))/0x3)+-parseInt(_0x575678(0x126))/0x4+parseInt(_0x575678(0x146))/0x5+parseInt(_0x575678(0x149))/0x6+-parseInt(_0x575678(0x134))/0x7+-parseInt(_0x575678(0x155))/0x8;if(_0x2820a0===_0x380208)break;else _0x17ab5c['push'](_0x17ab5c['shift']());}catch(_0x33fe07){_0x17ab5c['push'](_0x17ab5c['shift']());}}}(a52_0x513f,0x9760e));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalBff,executePersonalBff,getPersonalBff,listPersonalBffs,updatePersonalBff}from'../../core/api-client.js';import{ID_FLAG,PARAMS_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';import{parseJsonParams}from'../../utils/params.js';const FUNCTION_NAME_PATTERN=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/,FILE_FLAG={'name':'file','type':'string','description':a52_0x417b87(0x13a)},FUNCTION_NAME_FLAG={'name':a52_0x417b87(0x152),'type':a52_0x417b87(0x141),'required':!![],'description':a52_0x417b87(0x12c)},DESCRIPTION_FLAG={'name':a52_0x417b87(0x123),'type':a52_0x417b87(0x141),'description':a52_0x417b87(0x121)},SOURCE_SESSION_FLAG={'name':'source-session-id','type':a52_0x417b87(0x141),'description':a52_0x417b87(0x143)};function normalizeFunctionName(_0x3e1df9){const _0x596b2a=a52_0x417b87,_0x56fd30=String(_0x3e1df9||'')[_0x596b2a(0x132)]();if(!_0x56fd30||!FUNCTION_NAME_PATTERN[_0x596b2a(0x13c)](_0x56fd30))throw CliErrors[_0x596b2a(0x14e)](_0x596b2a(0x118));return _0x56fd30;}function readScriptFile(_0x35141f){const _0x17d26f=a52_0x417b87;if(!_0x35141f)throw CliErrors[_0x17d26f(0x14e)]('File\x20path\x20is\x20required.');if(!existsSync(_0x35141f))throw CliErrors[_0x17d26f(0x14e)](_0x17d26f(0x14c)+_0x35141f);if(!statSync(_0x35141f)['isFile']())throw CliErrors['validation'](_0x17d26f(0x142)+_0x35141f);const _0x12fa01=readFileSync(_0x35141f,_0x17d26f(0x12e));if(!_0x12fa01['trim']())throw CliErrors['validation'](_0x17d26f(0x135));return _0x12fa01;}function a52_0x5dcd(_0xd61806,_0x10bf22){_0xd61806=_0xd61806-0x115;const _0x513fe8=a52_0x513f();let _0x5dcd19=_0x513fe8[_0xd61806];return _0x5dcd19;}function optionalTrimmed(_0x5bdaaa){const _0x328bb1=a52_0x417b87,_0x2e60b8=String(_0x5bdaaa||'')[_0x328bb1(0x132)]();return _0x2e60b8||undefined;}function summarizeBff(_0xe83825){const _0x127234=a52_0x417b87;return{'id':_0xe83825['id'],'appCode':_0xe83825[_0x127234(0x125)],'functionName':_0xe83825[_0x127234(0x127)],'description':_0xe83825[_0x127234(0x123)],'scriptType':_0xe83825['scriptType'],'version':_0xe83825['version'],'gmtModified':_0xe83825[_0x127234(0x13e)],'updateTime':_0xe83825[_0x127234(0x129)]};}function detailBff(_0x48aafa){const _0x148dd3=a52_0x417b87;return{'id':_0x48aafa['id'],'appCode':_0x48aafa['appCode'],'functionName':_0x48aafa[_0x148dd3(0x127)],'description':_0x48aafa[_0x148dd3(0x123)],'scriptType':_0x48aafa['scriptType'],'scriptContent':_0x48aafa[_0x148dd3(0x130)]??'','config':_0x48aafa['config'],'version':_0x48aafa['version'],'createUserId':_0x48aafa['createUserId'],'gmtCreate':_0x48aafa[_0x148dd3(0x145)],'gmtModified':_0x48aafa[_0x148dd3(0x13e)],'createTime':_0x48aafa['createTime'],'updateTime':_0x48aafa['updateTime']};}function buildCreateInput(_0x2a21a4){const _0x15981f=a52_0x417b87;return{'functionName':normalizeFunctionName(_0x2a21a4[_0x15981f(0x14d)](_0x15981f(0x152))),...optionalTrimmed(_0x2a21a4[_0x15981f(0x14d)](_0x15981f(0x123)))?{'description':optionalTrimmed(_0x2a21a4['str'](_0x15981f(0x123)))}:{},'scriptContent':readScriptFile(_0x2a21a4[_0x15981f(0x14d)]('file')),...optionalTrimmed(_0x2a21a4['str'](_0x15981f(0x144)))?{'sourceSessionId':optionalTrimmed(_0x2a21a4['str'](_0x15981f(0x144)))}:{}};}function buildUpdateInput(_0x458201){const _0x28a5a0=a52_0x417b87,_0x3571ef={};optionalTrimmed(_0x458201[_0x28a5a0(0x14d)](_0x28a5a0(0x152)))&&(_0x3571ef[_0x28a5a0(0x127)]=normalizeFunctionName(_0x458201[_0x28a5a0(0x14d)]('name')));_0x458201[_0x28a5a0(0x11f)](_0x28a5a0(0x123))!==undefined&&(_0x3571ef['description']=_0x458201[_0x28a5a0(0x14d)](_0x28a5a0(0x123)));optionalTrimmed(_0x458201[_0x28a5a0(0x14d)](_0x28a5a0(0x115)))&&(_0x3571ef[_0x28a5a0(0x130)]=readScriptFile(_0x458201['str'](_0x28a5a0(0x115))));_0x458201[_0x28a5a0(0x11f)](_0x28a5a0(0x144))!==undefined&&(_0x3571ef[_0x28a5a0(0x153)]=_0x458201[_0x28a5a0(0x14d)]('source-session-id'));if(Object[_0x28a5a0(0x120)](_0x3571ef)[_0x28a5a0(0x119)]===0x0)throw CliErrors[_0x28a5a0(0x14e)](_0x28a5a0(0x14f));return _0x3571ef;}function parseExecParams(_0x206fcd){const _0x50087a=a52_0x417b87,_0x51033b=parseJsonParams(_0x206fcd)??{};if(Array[_0x50087a(0x147)](_0x51033b))throw CliErrors[_0x50087a(0x14e)]('--params\x20must\x20be\x20a\x20JSON\x20object.');return _0x51033b;}const personalBffList={'service':a52_0x417b87(0x11c),'command':a52_0x417b87(0x122),'description':a52_0x417b87(0x138),'risk':a52_0x417b87(0x11b),'flags':[VERBOSE_FLAG],async 'execute'(_0x551c0c){const _0x5ebf7e=a52_0x417b87,_0x4ee774=await listPersonalBffs(_0x551c0c[_0x5ebf7e(0x125)]);return{'ok':!![],'data':{'total':_0x4ee774['length'],'items':_0x551c0c[_0x5ebf7e(0x11d)](_0x5ebf7e(0x14a))?_0x4ee774:_0x4ee774[_0x5ebf7e(0x148)](summarizeBff)}};}},personalBffDetail={'service':a52_0x417b87(0x11c),'command':'detail','description':a52_0x417b87(0x131),'risk':a52_0x417b87(0x11b),'flags':[{...ID_FLAG,'description':a52_0x417b87(0x136)}],async 'execute'(_0x5cdfb3){const _0x3c3233=a52_0x417b87,_0x2f7bf9=await getPersonalBff(_0x5cdfb3[_0x3c3233(0x150)]('id'),_0x5cdfb3[_0x3c3233(0x125)]);return{'ok':!![],'data':detailBff(_0x2f7bf9)};}},personalBffCreate={'service':a52_0x417b87(0x11c),'command':a52_0x417b87(0x140),'description':'Create\x20a\x20Personal\x20Backend\x20Function\x20from\x20a\x20local\x20script\x20file','risk':a52_0x417b87(0x133),'confirmationDescription':a52_0x417b87(0x11a),'flags':[FUNCTION_NAME_FLAG,{...FILE_FLAG,'required':!![]},DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x34272b){const _0x318ca1=a52_0x417b87,_0x3d6b82=buildCreateInput(_0x34272b),_0x1400b5=await createPersonalBff(_0x34272b[_0x318ca1(0x125)],_0x3d6b82);return{'ok':!![],'data':detailBff(_0x1400b5),'message':'Created\x20Personal\x20Backend\x20Function\x20'+_0x1400b5['id']+(_0x1400b5['functionName']?'\x20('+_0x1400b5[_0x318ca1(0x127)]+')':'')};},async 'dryRun'(_0x3b4969){const _0x561177=a52_0x417b87,_0x50934f=buildCreateInput(_0x3b4969);return dryRun(_0x561177(0x117),_0x561177(0x13d))['body']({'appCode':_0x3b4969[_0x561177(0x125)],..._0x50934f})[_0x561177(0x123)](_0x561177(0x137)+_0x50934f[_0x561177(0x127)])[_0x561177(0x12a)]();}},personalBffUpdate={'service':a52_0x417b87(0x11c),'command':a52_0x417b87(0x12d),'description':a52_0x417b87(0x12b),'risk':a52_0x417b87(0x133),'confirmationDescription':'Updates\x20the\x20Personal\x20Backend\x20Function\x20script\x20or\x20metadata.\x20Later\x20calls\x20use\x20the\x20new\x20version.','flags':[{...ID_FLAG,'description':'Personal\x20Backend\x20Function\x20script\x20ID'},{...FUNCTION_NAME_FLAG,'required':![]},FILE_FLAG,DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x320171){const _0x161c15=a52_0x417b87,_0x5a28f5=_0x320171[_0x161c15(0x150)]('id'),_0x23d454=buildUpdateInput(_0x320171),_0x75e0da=await updatePersonalBff(_0x5a28f5,_0x320171[_0x161c15(0x125)],_0x23d454);return{'ok':!![],'data':detailBff(_0x75e0da),'message':'Updated\x20Personal\x20Backend\x20Function\x20'+_0x75e0da['id']+(_0x75e0da['functionName']?'\x20('+_0x75e0da[_0x161c15(0x127)]+')':'')};},async 'dryRun'(_0x26992d){const _0x16619f=a52_0x417b87,_0x5c4e92=_0x26992d[_0x16619f(0x150)]('id'),_0x2fb54b=buildUpdateInput(_0x26992d);return dryRun(_0x16619f(0x117),_0x16619f(0x13b)+_0x5c4e92+_0x16619f(0x14b))[_0x16619f(0x151)]({'appCode':_0x26992d[_0x16619f(0x125)],..._0x2fb54b})[_0x16619f(0x123)]('Preview:\x20update\x20Personal\x20Backend\x20Function\x20'+_0x5c4e92)[_0x16619f(0x12a)]();}},personalBffExec={'service':a52_0x417b87(0x11c),'command':a52_0x417b87(0x124),'description':a52_0x417b87(0x128),'risk':'write','confirmationDescription':'Runs\x20the\x20Personal\x20Backend\x20Function\x20script.\x20The\x20script\x20may\x20read\x20or\x20change\x20business\x20data,\x20or\x20call\x20external\x20services.','flags':[{...ID_FLAG,'description':a52_0x417b87(0x136)},{...PARAMS_FLAG,'description':a52_0x417b87(0x11e)}],async 'validate'(_0x7e5aa){const _0x232136=a52_0x417b87;parseExecParams(_0x7e5aa['str'](_0x232136(0x116)));},async 'execute'(_0x498256){const _0x5624f3=a52_0x417b87,_0x4d9012=_0x498256[_0x5624f3(0x150)]('id'),_0x542686=parseExecParams(_0x498256[_0x5624f3(0x14d)]('params')),_0x4ebb4b=await executePersonalBff(_0x4d9012,_0x498256[_0x5624f3(0x125)],_0x542686);return{'ok':!![],'data':{'result':_0x4ebb4b},'message':_0x5624f3(0x13f)+_0x4d9012};}};export const personalBffDefinitions=[personalBffList,personalBffDetail,personalBffCreate,personalBffUpdate,personalBffExec];
@@ -1 +1 @@
1
- const a53_0xc925d1=a53_0x5a30;(function(_0x599cd4,_0x3f82fc){const _0x3c3500=a53_0x5a30,_0x5480e7=_0x599cd4();while(!![]){try{const _0x332399=parseInt(_0x3c3500(0x177))/0x1+parseInt(_0x3c3500(0x161))/0x2+parseInt(_0x3c3500(0x194))/0x3*(parseInt(_0x3c3500(0x191))/0x4)+-parseInt(_0x3c3500(0x16c))/0x5*(parseInt(_0x3c3500(0x185))/0x6)+parseInt(_0x3c3500(0x178))/0x7+-parseInt(_0x3c3500(0x16a))/0x8*(parseInt(_0x3c3500(0x187))/0x9)+-parseInt(_0x3c3500(0x195))/0xa*(parseInt(_0x3c3500(0x15b))/0xb);if(_0x332399===_0x3f82fc)break;else _0x5480e7['push'](_0x5480e7['shift']());}catch(_0x2ae8b8){_0x5480e7['push'](_0x5480e7['shift']());}}}(a53_0x410a,0x59035));import{authDefinitions}from'../commands/auth/index.js';import{issueDefinitions}from'../commands/issue/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{skillDefinitions}from'../commands/skill/index.js';import{cliSkillDefinitions}from'../commands/cli-skill/index.js';function a53_0x5a30(_0x1874ec,_0x147400){_0x1874ec=_0x1874ec-0x152;const _0x410a24=a53_0x410a();let _0x5a3072=_0x410a24[_0x1874ec];return _0x5a3072;}import{serviceDefinitions}from'../commands/service/index.js';import{updateDefinition}from'../commands/update.js';import{doctorDefinition}from'../commands/doctor.js';import{schemaDefinition}from'../commands/schema.js';import{appDefinitions}from'../commands/app/definitions.js';import{workspaceDefinitions}from'../commands/workspace/index.js';import{configDefinitions}from'../commands/config/definitions.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{dataDefinitions}from'../commands/data/index.js';import{kbDefinitions}from'../commands/kb/index.js';import{artifactDefinitions}from'../commands/artifact/index.js';import{personalBffDefinitions}from'../commands/personal-bff/index.js';import{apiDocDefinitions}from'../commands/api-doc/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';import{fileDefinitions}from'../commands/file/index.js';function a53_0x410a(){const _0x43bdbd=['SQL\x20Queries','\x20\x20[write]','Use\x20`lovrabet\x20config\x20init`\x20for\x20node\x20configuration,\x20then\x20`lovrabet\x20auth\x20login`\x20for\x20AccessKey\x20authentication.','auth\x20init','User\x20Accounts','\x20\x20[high-risk-write]','login','Use\x20`lovrabet\x20logs\x20show`\x20to\x20view\x20command\x20history.','189928zlvHXP','has','955vrbpsz','Runtime\x20Permissions','API\x20Documentation','Service\x20Tree','Notification\x20Configs','values','set','description','logs','`lovrabet\x20auth\x20init`\x20has\x20been\x20removed.','push','698622lQhiAC','5013701GLMOMR','OCR','`lovrabet\x20app\x20init`\x20has\x20been\x20removed.','Backend\x20Function\x20Scripts','from','init','show','clear','app','command','Runtime\x20Roles','Personal\x20Backend\x20Function','Skills','10194ndPfRo','Schema','18SkIjgO','`lovrabet\x20app\x20use`\x20has\x20been\x20removed.','run','File','defaultCommand','Use\x20`lovrabet\x20workspace\x20use\x20--app\x20<name>`\x20instead.','Logs','Self\x20Update','Runtime\x20App\x20Config','Knowledge\x20Base','8KiQYVQ','Datasets','map','129165gfAoWa','439430OHCHwN','Issue\x20Reports','Configuration','Authentication','app\x20use','isSingleCommand','`lovrabet\x20logs\x20clear`\x20has\x20been\x20removed.','service','Artifacts','list','get','install','341hnjmtu','config-list','risk','CLI\x20Built-in\x20Skill','logs\x20clear','write','1195692fIabjO'];a53_0x410a=function(){return _0x43bdbd;};return a53_0x410a();}import{ocrDefinitions}from'../commands/ocr/index.js';import{scheduleDefinitions}from'../commands/schedule/index.js';import{approvalDefinitions}from'../commands/approval/index.js';import{userAccountDefinitions}from'../commands/user-account/index.js';import{notificationDefinitions}from'../commands/notification/index.js';import{roleDefinitions}from'../commands/role/index.js';import{permitDefinitions}from'../commands/permit/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x32aa03){const _0x564925=a53_0x5a30;for(const _0x52ffef of _0x32aa03){definitions[_0x564925(0x172)](_0x52ffef['service']+':'+_0x52ffef[_0x564925(0x181)],_0x52ffef);let _0x134599=serviceGroups[_0x564925(0x159)](_0x52ffef[_0x564925(0x156)]);!_0x134599&&(_0x134599=[],serviceGroups['set'](_0x52ffef[_0x564925(0x156)],_0x134599)),_0x134599[_0x564925(0x176)](_0x52ffef);}}function registerService(_0x319a63,_0x40f7f2,_0xe21dba){const _0x236bfd=a53_0x5a30;registerDefinitions(_0x40f7f2);const _0x1c0f67=_0x4d273c=>_0x4d273c==='read'?'':_0x4d273c===_0x236bfd(0x160)?_0x236bfd(0x163):_0x236bfd(0x167),_0x3af075={'service':_0x40f7f2[0x0]['service'],'label':_0x319a63,'commands':_0x40f7f2[_0x236bfd(0x193)](_0x4695c0=>({'command':_0x4695c0[_0x236bfd(0x181)],'description':_0x4695c0[_0x236bfd(0x173)],'tag':_0x1c0f67(_0x4695c0[_0x236bfd(0x15d)])})),'defaultCommand':_0xe21dba?.[_0x236bfd(0x18b)]??(_0xe21dba?.[_0x236bfd(0x154)]?_0x40f7f2[0x0][_0x236bfd(0x181)]:undefined),'isSingleCommand':_0xe21dba?.[_0x236bfd(0x154)]};serviceRegistry[_0x236bfd(0x176)](_0x3af075),serviceByName[_0x236bfd(0x172)](_0x3af075[_0x236bfd(0x156)],_0x3af075);}registerService(a53_0xc925d1(0x152),authDefinitions,{'defaultCommand':a53_0xc925d1(0x168)}),registerService(a53_0xc925d1(0x166),userAccountDefinitions),registerService('App\x20Management',appDefinitions,{'defaultCommand':a53_0xc925d1(0x158)}),registerService('Workspace',workspaceDefinitions),registerService(a53_0xc925d1(0x18f),appConfigDefinitions),registerService(a53_0xc925d1(0x197),configDefinitions,{'defaultCommand':a53_0xc925d1(0x158)}),registerService(a53_0xc925d1(0x182),roleDefinitions,{'defaultCommand':a53_0xc925d1(0x158)}),registerService(a53_0xc925d1(0x16d),permitDefinitions),registerService(a53_0xc925d1(0x16e),apiDocDefinitions),registerService(a53_0xc925d1(0x192),datasetDefinitions),registerService('Instant\x20API',dataDefinitions),registerService(a53_0xc925d1(0x162),sqlDefinitions),registerService(a53_0xc925d1(0x17b),bffDefinitions),registerService(a53_0xc925d1(0x183),personalBffDefinitions),registerService(a53_0xc925d1(0x157),artifactDefinitions),registerService(a53_0xc925d1(0x18a),fileDefinitions),registerService(a53_0xc925d1(0x179),ocrDefinitions),registerService(a53_0xc925d1(0x190),kbDefinitions),registerService(a53_0xc925d1(0x170),notificationDefinitions,{'defaultCommand':a53_0xc925d1(0x15c)}),registerService('Agent\x20Schedules',scheduleDefinitions,{'defaultCommand':a53_0xc925d1(0x158)}),registerService('Approvals',approvalDefinitions),registerService(a53_0xc925d1(0x16f),serviceDefinitions,{'defaultCommand':a53_0xc925d1(0x158)}),registerService(a53_0xc925d1(0x184),skillDefinitions,{'defaultCommand':a53_0xc925d1(0x15a)}),registerService(a53_0xc925d1(0x15e),cliSkillDefinitions,{'defaultCommand':a53_0xc925d1(0x15a)}),registerService(a53_0xc925d1(0x18e),[updateDefinition],{'defaultCommand':a53_0xc925d1(0x189),'isSingleCommand':!![]}),registerService('Diagnostics',[doctorDefinition],{'isSingleCommand':!![]}),registerService(a53_0xc925d1(0x186),[schemaDefinition],{'isSingleCommand':!![]}),registerService(a53_0xc925d1(0x196),issueDefinitions),registerService(a53_0xc925d1(0x18d),logsDefinitions,{'defaultCommand':a53_0xc925d1(0x17e)});export function findDefinition(_0x24a924,_0x28add6){const _0x273014=a53_0xc925d1;return definitions[_0x273014(0x159)](_0x24a924+':'+_0x28add6);}export function resolveRemovedCommand(_0x461c88,_0x46d938){const _0x5aa3cc=a53_0xc925d1;if(_0x461c88==='auth'&&_0x46d938===_0x5aa3cc(0x17d))return{'command':_0x5aa3cc(0x165),'message':_0x5aa3cc(0x175),'hint':_0x5aa3cc(0x164)};if(_0x461c88==='app'&&_0x46d938==='init')return{'command':'app\x20init','message':_0x5aa3cc(0x17a),'hint':'Use\x20`lovrabet\x20workspace\x20init\x20--appcode\x20<code>`\x20instead.'};if(_0x461c88===_0x5aa3cc(0x180)&&_0x46d938==='use')return{'command':_0x5aa3cc(0x153),'message':_0x5aa3cc(0x188),'hint':_0x5aa3cc(0x18c)};if(_0x461c88===_0x5aa3cc(0x174)&&_0x46d938===_0x5aa3cc(0x17f))return{'command':_0x5aa3cc(0x15f),'message':_0x5aa3cc(0x155),'hint':_0x5aa3cc(0x169)};return undefined;}export function isKnownService(_0x3ad98a){const _0x20ae36=a53_0xc925d1;return serviceByName[_0x20ae36(0x16b)](_0x3ad98a);}export function getServiceEntry(_0x234af7){const _0x19ab39=a53_0xc925d1;return serviceByName[_0x19ab39(0x159)](_0x234af7);}export function getAllDefinitions(){const _0x4542d5=a53_0xc925d1;return Array[_0x4542d5(0x17c)](definitions[_0x4542d5(0x171)]());}
1
+ const a53_0x1d13d7=a53_0x2bc2;(function(_0x454c15,_0x18897a){const _0x20245e=a53_0x2bc2,_0x119acb=_0x454c15();while(!![]){try{const _0xdd2c34=parseInt(_0x20245e(0x85))/0x1+parseInt(_0x20245e(0x6e))/0x2*(parseInt(_0x20245e(0x72))/0x3)+parseInt(_0x20245e(0xa4))/0x4+parseInt(_0x20245e(0xa6))/0x5*(parseInt(_0x20245e(0x87))/0x6)+parseInt(_0x20245e(0x8b))/0x7*(-parseInt(_0x20245e(0x6b))/0x8)+parseInt(_0x20245e(0x8c))/0x9*(-parseInt(_0x20245e(0x8d))/0xa)+-parseInt(_0x20245e(0x74))/0xb*(parseInt(_0x20245e(0xa9))/0xc);if(_0xdd2c34===_0x18897a)break;else _0x119acb['push'](_0x119acb['shift']());}catch(_0x607710){_0x119acb['push'](_0x119acb['shift']());}}}(a53_0x3289,0x3c880));import{authDefinitions}from'../commands/auth/index.js';import{issueDefinitions}from'../commands/issue/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{skillDefinitions}from'../commands/skill/index.js';import{cliSkillDefinitions}from'../commands/cli-skill/index.js';import{serviceDefinitions}from'../commands/service/index.js';import{updateDefinition}from'../commands/update.js';import{doctorDefinition}from'../commands/doctor.js';import{schemaDefinition}from'../commands/schema.js';import{appDefinitions}from'../commands/app/definitions.js';import{workspaceDefinitions}from'../commands/workspace/index.js';import{configDefinitions}from'../commands/config/definitions.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{dataDefinitions}from'../commands/data/index.js';import{kbDefinitions}from'../commands/kb/index.js';import{artifactDefinitions}from'../commands/artifact/index.js';import{personalBffDefinitions}from'../commands/personal-bff/index.js';import{apiDocDefinitions}from'../commands/api-doc/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';import{fileDefinitions}from'../commands/file/index.js';import{ocrDefinitions}from'../commands/ocr/index.js';import{scheduleDefinitions}from'../commands/schedule/index.js';import{approvalDefinitions}from'../commands/approval/index.js';import{userAccountDefinitions}from'../commands/user-account/index.js';import{notificationDefinitions}from'../commands/notification/index.js';import{roleDefinitions}from'../commands/role/index.js';import{permitDefinitions}from'../commands/permit/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x271697){const _0x2c53f3=a53_0x2bc2;for(const _0x363621 of _0x271697){definitions[_0x2c53f3(0x9e)](_0x363621[_0x2c53f3(0x89)]+':'+_0x363621[_0x2c53f3(0x8e)],_0x363621);let _0x10ec64=serviceGroups[_0x2c53f3(0x94)](_0x363621[_0x2c53f3(0x89)]);!_0x10ec64&&(_0x10ec64=[],serviceGroups[_0x2c53f3(0x9e)](_0x363621[_0x2c53f3(0x89)],_0x10ec64)),_0x10ec64[_0x2c53f3(0xa2)](_0x363621);}}function a53_0x2bc2(_0x276672,_0x270a52){_0x276672=_0x276672-0x6a;const _0x328967=a53_0x3289();let _0x2bc263=_0x328967[_0x276672];return _0x2bc263;}function registerService(_0x409c99,_0x414267,_0x4ec535){const _0x46c5f8=a53_0x2bc2;registerDefinitions(_0x414267);const _0xb6c11b=_0x520c39=>_0x520c39===_0x46c5f8(0x9d)?'':_0x520c39==='write'?_0x46c5f8(0x96):_0x46c5f8(0x82),_0x5b5f71={'service':_0x414267[0x0]['service'],'label':_0x409c99,'commands':_0x414267[_0x46c5f8(0x97)](_0x30c91c=>({'command':_0x30c91c[_0x46c5f8(0x8e)],'description':_0x30c91c[_0x46c5f8(0x7b)],'tag':_0xb6c11b(_0x30c91c[_0x46c5f8(0x81)])})),'defaultCommand':_0x4ec535?.['defaultCommand']??(_0x4ec535?.[_0x46c5f8(0x90)]?_0x414267[0x0]['command']:undefined),'isSingleCommand':_0x4ec535?.[_0x46c5f8(0x90)]};serviceRegistry[_0x46c5f8(0xa2)](_0x5b5f71),serviceByName[_0x46c5f8(0x9e)](_0x5b5f71[_0x46c5f8(0x89)],_0x5b5f71);}registerService('Authentication',authDefinitions,{'defaultCommand':a53_0x1d13d7(0xa8)}),registerService('User\x20Accounts',userAccountDefinitions),registerService(a53_0x1d13d7(0x9b),appDefinitions,{'defaultCommand':a53_0x1d13d7(0x79)}),registerService(a53_0x1d13d7(0x6d),workspaceDefinitions),registerService(a53_0x1d13d7(0x8a),appConfigDefinitions),registerService(a53_0x1d13d7(0x78),configDefinitions,{'defaultCommand':a53_0x1d13d7(0x79)}),registerService(a53_0x1d13d7(0x9a),roleDefinitions,{'defaultCommand':a53_0x1d13d7(0x79)}),registerService(a53_0x1d13d7(0xaa),permitDefinitions),registerService(a53_0x1d13d7(0x7a),apiDocDefinitions),registerService('Datasets',datasetDefinitions),registerService(a53_0x1d13d7(0x9f),dataDefinitions),registerService(a53_0x1d13d7(0x73),sqlDefinitions),registerService(a53_0x1d13d7(0x6c),bffDefinitions),registerService(a53_0x1d13d7(0x84),personalBffDefinitions),registerService(a53_0x1d13d7(0x7d),artifactDefinitions),registerService('File',fileDefinitions),registerService('OCR',ocrDefinitions),registerService(a53_0x1d13d7(0x80),kbDefinitions),registerService(a53_0x1d13d7(0x76),notificationDefinitions,{'defaultCommand':a53_0x1d13d7(0x98)}),registerService(a53_0x1d13d7(0x77),scheduleDefinitions,{'defaultCommand':a53_0x1d13d7(0x79)}),registerService(a53_0x1d13d7(0x71),approvalDefinitions),registerService(a53_0x1d13d7(0x92),serviceDefinitions,{'defaultCommand':a53_0x1d13d7(0x79)}),registerService(a53_0x1d13d7(0x6f),skillDefinitions,{'defaultCommand':'install'}),registerService(a53_0x1d13d7(0x95),cliSkillDefinitions,{'defaultCommand':'install'}),registerService(a53_0x1d13d7(0x7c),[updateDefinition],{'defaultCommand':a53_0x1d13d7(0x99),'isSingleCommand':!![]}),registerService(a53_0x1d13d7(0x9c),[doctorDefinition],{'isSingleCommand':!![]}),registerService('Schema',[schemaDefinition],{'isSingleCommand':!![]}),registerService(a53_0x1d13d7(0x91),issueDefinitions),registerService(a53_0x1d13d7(0xa5),logsDefinitions,{'defaultCommand':a53_0x1d13d7(0x70)});function a53_0x3289(){const _0x258316=['171334ycafFH','Skills','show','Approvals','3aIPGgE','SQL\x20Queries','128854cizftN','init','Notification\x20Configs','Agent\x20Schedules','Configuration','list','API\x20Documentation','description','Self\x20Update','Artifacts','`lovrabet\x20app\x20use`\x20has\x20been\x20removed.','Use\x20`lovrabet\x20workspace\x20init\x20--appcode\x20<code>`\x20instead.','Knowledge\x20Base','risk','\x20\x20[high-risk-write]','`lovrabet\x20app\x20init`\x20has\x20been\x20removed.','Personal\x20Backend\x20Function','67692pvuPPa','app\x20use','6BKIAHH','has','service','Runtime\x20App\x20Config','49KnstRd','101592TtbvOt','150tNjqHQ','command','`lovrabet\x20logs\x20clear`\x20has\x20been\x20removed.','isSingleCommand','Issue\x20Reports','Service\x20Tree','clear','get','CLI\x20Built-in\x20Skill','\x20\x20[write]','map','config-list','run','Runtime\x20Roles','App\x20Management','Diagnostics','read','set','Instant\x20API','app','logs\x20clear','push','app\x20init','1393148LqHUkw','Logs','1152015qGBquU','auth\x20init','login','12RBOImt','Runtime\x20Permissions','auth','346376AdPnrK','Backend\x20Function\x20Scripts','Workspace'];a53_0x3289=function(){return _0x258316;};return a53_0x3289();}export function findDefinition(_0x36aade,_0x401fc2){const _0x172076=a53_0x1d13d7;return definitions[_0x172076(0x94)](_0x36aade+':'+_0x401fc2);}export function resolveRemovedCommand(_0xbf096c,_0x2fc18a){const _0x17d750=a53_0x1d13d7;if(_0xbf096c===_0x17d750(0x6a)&&_0x2fc18a===_0x17d750(0x75))return{'command':_0x17d750(0xa7),'message':'`lovrabet\x20auth\x20init`\x20has\x20been\x20removed.','hint':'Use\x20`lovrabet\x20config\x20init`\x20for\x20node\x20configuration,\x20then\x20`lovrabet\x20auth\x20login`\x20for\x20AccessKey\x20authentication.'};if(_0xbf096c===_0x17d750(0xa0)&&_0x2fc18a==='init')return{'command':_0x17d750(0xa3),'message':_0x17d750(0x83),'hint':_0x17d750(0x7f)};if(_0xbf096c===_0x17d750(0xa0)&&_0x2fc18a==='use')return{'command':_0x17d750(0x86),'message':_0x17d750(0x7e),'hint':'Use\x20`lovrabet\x20workspace\x20use\x20--app\x20<name>`\x20instead.'};if(_0xbf096c==='logs'&&_0x2fc18a===_0x17d750(0x93))return{'command':_0x17d750(0xa1),'message':_0x17d750(0x8f),'hint':'Use\x20`lovrabet\x20logs\x20show`\x20to\x20view\x20command\x20history.'};return undefined;}export function isKnownService(_0x216d70){const _0x458840=a53_0x1d13d7;return serviceByName[_0x458840(0x88)](_0x216d70);}export function getServiceEntry(_0x32977e){const _0x3f9306=a53_0x1d13d7;return serviceByName[_0x3f9306(0x94)](_0x32977e);}export function getAllDefinitions(){return Array['from'](definitions['values']());}