@lovrabet/lovrabet-cli 2.2.6 → 2.2.7-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (158) hide show
  1. package/lib/cli.js +1 -1
  2. package/lib/commands/api-doc/index.js +1 -1
  3. package/lib/commands/app/cache.js +1 -1
  4. package/lib/commands/app/definitions.js +1 -1
  5. package/lib/commands/app/eligibility.js +1 -1
  6. package/lib/commands/app/mock-loader.js +1 -1
  7. package/lib/commands/app/remote-source.js +1 -1
  8. package/lib/commands/app/shared.js +1 -1
  9. package/lib/commands/app-config/get.js +1 -1
  10. package/lib/commands/app-config/index.js +1 -1
  11. package/lib/commands/artifact/index.js +1 -1
  12. package/lib/commands/auth/device.js +1 -1
  13. package/lib/commands/auth/index.js +1 -1
  14. package/lib/commands/auth/prompt.js +1 -1
  15. package/lib/commands/bff/detail.js +1 -1
  16. package/lib/commands/bff/exec.js +1 -1
  17. package/lib/commands/bff/index.js +1 -1
  18. package/lib/commands/cli-skill/index.js +1 -1
  19. package/lib/commands/common/config-policy.js +1 -1
  20. package/lib/commands/common/constraints.js +1 -1
  21. package/lib/commands/common/flags.js +1 -1
  22. package/lib/commands/common/local-file.js +1 -1
  23. package/lib/commands/config/definitions.js +1 -1
  24. package/lib/commands/config/shared.js +1 -1
  25. package/lib/commands/data/index.js +1 -1
  26. package/lib/commands/dataset/detail.js +1 -1
  27. package/lib/commands/dataset/index.js +1 -1
  28. package/lib/commands/dataset/list.js +1 -1
  29. package/lib/commands/dataset/sdk-doc.js +1 -1
  30. package/lib/commands/doctor.js +1 -1
  31. package/lib/commands/file/index.js +1 -1
  32. package/lib/commands/init.js +1 -1
  33. package/lib/commands/kb/index.js +1 -1
  34. package/lib/commands/logs/index.js +1 -1
  35. package/lib/commands/notification/config-list.js +1 -1
  36. package/lib/commands/notification/index.js +1 -1
  37. package/lib/commands/notification/shared.js +1 -1
  38. package/lib/commands/ocr/index.js +1 -1
  39. package/lib/commands/permit/dataset-get.js +1 -1
  40. package/lib/commands/permit/dataset-set.js +1 -1
  41. package/lib/commands/permit/index.js +1 -1
  42. package/lib/commands/permit/page-get.js +1 -1
  43. package/lib/commands/permit/page-set.js +1 -1
  44. package/lib/commands/permit/role-menus-set.js +1 -1
  45. package/lib/commands/permit/role-menus.js +1 -1
  46. package/lib/commands/permit/shared.js +1 -1
  47. package/lib/commands/personal-bff/index.js +1 -1
  48. package/lib/commands/registry.js +1 -1
  49. package/lib/commands/role/create.js +1 -1
  50. package/lib/commands/role/delete.js +1 -1
  51. package/lib/commands/role/detail.js +1 -1
  52. package/lib/commands/role/index.js +1 -1
  53. package/lib/commands/role/list.js +1 -1
  54. package/lib/commands/role/shared.js +1 -1
  55. package/lib/commands/role/update.js +1 -1
  56. package/lib/commands/role/user-add.js +1 -1
  57. package/lib/commands/role/user-remove.js +1 -1
  58. package/lib/commands/schedule/index.js +1 -1
  59. package/lib/commands/schema.js +1 -1
  60. package/lib/commands/service/dynamic.js +1 -1
  61. package/lib/commands/service/function-name-adapter.js +1 -1
  62. package/lib/commands/service/index.js +1 -1
  63. package/lib/commands/service/registry.js +1 -1
  64. package/lib/commands/skill/commands/create.js +1 -1
  65. package/lib/commands/skill/commands/diagram.js +1 -1
  66. package/lib/commands/skill/commands/install.js +1 -1
  67. package/lib/commands/skill/commands/list.js +1 -1
  68. package/lib/commands/skill/commands/push.js +1 -1
  69. package/lib/commands/skill/commands/validate.js +1 -1
  70. package/lib/commands/skill/diagram.js +1 -1
  71. package/lib/commands/skill/flags.js +1 -1
  72. package/lib/commands/skill/index.js +1 -1
  73. package/lib/commands/skill/manifest-helpers.js +1 -1
  74. package/lib/commands/skill/push-execute.js +1 -1
  75. package/lib/commands/skill/push-flow-helpers.js +1 -1
  76. package/lib/commands/skill/push-retarget.js +1 -1
  77. package/lib/commands/skill/scopes.js +1 -1
  78. package/lib/commands/skill/summary.js +1 -1
  79. package/lib/commands/skill/templates.js +1 -1
  80. package/lib/commands/skill/validate.js +1 -1
  81. package/lib/commands/sql/detail.js +1 -1
  82. package/lib/commands/sql/exec.js +1 -1
  83. package/lib/commands/sql/index.js +1 -1
  84. package/lib/commands/update.js +1 -1
  85. package/lib/commands/user-account/bind.js +1 -1
  86. package/lib/commands/user-account/index.js +1 -1
  87. package/lib/commands/workspace/index.js +1 -1
  88. package/lib/config/schema.js +1 -1
  89. package/lib/constant/app.js +1 -1
  90. package/lib/constant/auth-mode.js +1 -1
  91. package/lib/constant/cli.js +1 -1
  92. package/lib/constant/defaults.js +1 -1
  93. package/lib/constant/distribution.js +1 -1
  94. package/lib/constant/domain.js +1 -1
  95. package/lib/constant/env.js +1 -1
  96. package/lib/constant/output.js +1 -1
  97. package/lib/constant/product.js +1 -1
  98. package/lib/constant/risk.js +1 -1
  99. package/lib/constant/url.js +1 -1
  100. package/lib/context.js +1 -1
  101. package/lib/core/api-client.js +1 -1
  102. package/lib/core/db-resolver.js +1 -1
  103. package/lib/core/sdk-client.js +1 -1
  104. package/lib/errors.js +1 -1
  105. package/lib/framework/build-all-flags.js +1 -1
  106. package/lib/framework/dryrun.js +1 -1
  107. package/lib/framework/flags.js +1 -1
  108. package/lib/framework/help.js +1 -1
  109. package/lib/framework/index.js +1 -1
  110. package/lib/framework/output.js +1 -1
  111. package/lib/framework/preparse.js +1 -1
  112. package/lib/framework/rate-limit.js +1 -1
  113. package/lib/framework/raw-flags.js +1 -1
  114. package/lib/framework/response.js +1 -1
  115. package/lib/framework/runner-confirmation.js +1 -1
  116. package/lib/framework/runner-error.js +1 -1
  117. package/lib/framework/runner.js +1 -1
  118. package/lib/framework/schema-export.js +1 -1
  119. package/lib/framework/service-order.js +1 -1
  120. package/lib/framework/types.js +1 -1
  121. package/lib/generated/build-info.d.ts +4 -4
  122. package/lib/generated/build-info.js +1 -1
  123. package/lib/help.js +1 -1
  124. package/lib/postinstall.js +1 -1
  125. package/lib/runtime/confirmation.js +1 -1
  126. package/lib/runtime/event.js +1 -1
  127. package/lib/runtime/index.js +1 -1
  128. package/lib/runtime/queue.js +1 -1
  129. package/lib/runtime/resolve.js +1 -1
  130. package/lib/skills/builtin-skill.js +1 -1
  131. package/lib/skills/npx-skills-add.js +1 -1
  132. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  133. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  134. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  135. package/lib/skills/runtime-skill-sync/install-target.js +1 -1
  136. package/lib/skills/runtime-skill-sync/links.js +1 -1
  137. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  138. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  139. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  140. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  141. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  142. package/lib/skills/runtime-skill-sync/push.js +1 -1
  143. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  144. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  145. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  146. package/lib/skills/runtime-skill-sync.js +1 -1
  147. package/lib/skills/skill-presence.js +1 -1
  148. package/lib/utils/apply-jq-filter.js +1 -1
  149. package/lib/utils/logger.js +1 -1
  150. package/lib/utils/lossless-json.js +1 -1
  151. package/lib/utils/params.js +1 -1
  152. package/lib/utils/platform.js +1 -1
  153. package/lib/utils/update-notice.js +1 -1
  154. package/lib/utils/version.js +1 -1
  155. package/lib/utils/write-cli-side-channel.js +1 -1
  156. package/package.json +1 -1
  157. package/skills/lovrabet/SKILL.md +1 -1
  158. package/skills/lovrabet.manifest.json +3 -3
@@ -1 +1 @@
1
- function a43_0x4c6e(){const _0x1e2a82=['\x20for\x20role\x20','2440470mLGVmi','3142800aVdqeJ','permit','34sWAlcd','validation','61857JYHmYc','2959284jgQziA','Comma-separated\x20runtime\x20menu\x20IDs','body','Preview:\x20','menu-','before','role-menus-set','Runtime\x20menu\x20','appCode','24unMiFV','356780NfJdCn','isSafeInteger','\x20was\x20not\x20found.','/client/permit/resource/batch-save-menu','POST','after','Invalid\x20runtime\x20menu\x20ID:\x20','授予或收回目标角色对指定运行菜单的访问权限;变更会影响该角色用户的菜单可见性。','roles','\x20already\x20reflects\x20','108gjaoiz','permitList','--menus','menus','7UOoqmX','77hJieVM','bool','map','revoke','str','length','menuIds','775612wJRGlf','Grant\x20or\x20revoke\x20selected\x20runtime\x20menus\x20for\x20one\x20role','push','grant','find','155235omYmkx','build','changed','operation'];a43_0x4c6e=function(){return _0x1e2a82;};return a43_0x4c6e();}const a43_0x591ef1=a43_0x2a17;(function(_0x41b338,_0x4c905c){const _0x553db6=a43_0x2a17,_0x5ef312=_0x41b338();while(!![]){try{const _0x548452=-parseInt(_0x553db6(0x193))/0x1+parseInt(_0x553db6(0x1a0))/0x2*(-parseInt(_0x553db6(0x1a2))/0x3)+-parseInt(_0x553db6(0x1ac))/0x4*(-parseInt(_0x553db6(0x198))/0x5)+parseInt(_0x553db6(0x19d))/0x6*(-parseInt(_0x553db6(0x18b))/0x7)+-parseInt(_0x553db6(0x19e))/0x8+-parseInt(_0x553db6(0x187))/0x9*(-parseInt(_0x553db6(0x1ad))/0xa)+-parseInt(_0x553db6(0x18c))/0xb*(-parseInt(_0x553db6(0x1a3))/0xc);if(_0x548452===_0x4c905c)break;else _0x5ef312['push'](_0x5ef312['shift']());}catch(_0x4d7db1){_0x5ef312['push'](_0x5ef312['shift']());}}}(a43_0x4c6e,0x654d9));import{listRuntimeMenuRolePermits,listRuntimePermitRoles,saveRuntimeMenuRolePermits}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,flattenRuntimeMenuRolePermits,GRANT_FLAG,menuPermitDto,REVOKE_FLAG,ROLE_REF_FLAG,runtimePermitWriteResult,splitRefs}from'../../commands/permit/shared.js';const MENUS_FLAG={'name':a43_0x591ef1(0x18a),'type':'string','required':!![],'description':a43_0x591ef1(0x1a4)};function a43_0x2a17(_0x274514,_0x9ab6f0){_0x274514=_0x274514-0x180;const _0x4c6e7d=a43_0x4c6e();let _0x2a174a=_0x4c6e7d[_0x274514];return _0x2a174a;}async function prepare(_0x540ac7){const _0x339945=a43_0x591ef1;await assertRuntimePermissionManager(_0x540ac7[_0x339945(0x1ab)]);const _0x24a052=assertGrantOrRevoke(_0x540ac7[_0x339945(0x18d)](_0x339945(0x196)),_0x540ac7['bool'](_0x339945(0x18f))),_0x4c2d8d=await resolveRuntimeRoleRef(_0x540ac7[_0x339945(0x1ab)],_0x540ac7['str']('role'));assertRuntimePermitRoleConfigurable(_0x4c2d8d);const _0x3a5e03=[...new Set(splitRefs(_0x540ac7[_0x339945(0x190)](_0x339945(0x18a)),_0x339945(0x189))[_0x339945(0x18e)](_0x598d14=>{const _0x4d2f95=_0x339945,_0x3c82ff=Number(_0x598d14);if(!/^\d+$/['test'](_0x598d14)||!Number[_0x4d2f95(0x1ae)](_0x3c82ff)||_0x3c82ff<=0x0)throw CliErrors[_0x4d2f95(0x1a1)](_0x4d2f95(0x183)+_0x598d14+'.');return _0x3c82ff;}))],_0x563b6f=flattenRuntimeMenuRolePermits(await listRuntimeMenuRolePermits(_0x540ac7[_0x339945(0x1ab)])),_0x2b189c=await listRuntimePermitRoles(_0x540ac7[_0x339945(0x1ab)]),_0xa0863d=[],_0x4557bd=[],_0x2ddc15=[],_0x1d6232=[];for(const _0x472610 of _0x3a5e03){const _0x1a51b5=_0x563b6f[_0x339945(0x197)](_0x1bb6a1=>_0x1bb6a1['id']===_0x472610);if(!_0x1a51b5)throw CliErrors['validation'](_0x339945(0x1aa)+_0x472610+_0x339945(0x1af));const _0x2286e0=applyRuntimeRolePermission(_0x1a51b5['rolePermit'],_0x4c2d8d,_0x2b189c,_0x24a052);_0x4557bd[_0x339945(0x195)]({'menuId':_0x472610,'rolePermit':_0x1a51b5['rolePermit']}),_0x2ddc15['push']({'menuId':_0x472610,'rolePermit':_0x2286e0[_0x339945(0x185)]});if(_0x2286e0[_0x339945(0x19a)])_0xa0863d[_0x339945(0x195)](menuPermitDto(_0x540ac7[_0x339945(0x1ab)],_0x1a51b5,_0x2286e0[_0x339945(0x185)]));else _0x1d6232['push']('Runtime\x20menu\x20'+_0x472610+_0x339945(0x186)+_0x24a052+_0x339945(0x19c)+_0x4c2d8d['id']+'.');}return{'operation':_0x24a052,'role':_0x4c2d8d,'menuIds':_0x3a5e03,'permitList':_0xa0863d,'before':_0x4557bd,'after':_0x2ddc15,'warnings':_0x1d6232};}export const permitRoleMenusSet={'service':a43_0x591ef1(0x19f),'command':a43_0x591ef1(0x1a9),'description':a43_0x591ef1(0x194),'risk':'high-risk-write','confirmationDescription':a43_0x591ef1(0x184),'flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,MENUS_FLAG],async 'validate'(_0x491cc5){const _0x2374f0=a43_0x591ef1;assertGrantOrRevoke(_0x491cc5[_0x2374f0(0x18d)](_0x2374f0(0x196)),_0x491cc5[_0x2374f0(0x18d)]('revoke'));},async 'dryRun'(_0x54ef2c){const _0x44a0f2=a43_0x591ef1,_0x19e34f=await prepare(_0x54ef2c);return dryRun(_0x44a0f2(0x181),'/client/permit/resource/batch-save-menu')[_0x44a0f2(0x1a5)]({'appCode':_0x54ef2c[_0x44a0f2(0x1ab)],'permitList':_0x19e34f[_0x44a0f2(0x188)]})['description'](_0x44a0f2(0x1a6)+_0x19e34f['operation']+'\x20selected\x20runtime\x20menus')[_0x44a0f2(0x199)]();},async 'execute'(_0x3fbc65){const _0x27557d=a43_0x591ef1,_0xfb68dd=await prepare(_0x3fbc65);return _0xfb68dd[_0x27557d(0x188)][_0x27557d(0x191)]>0x0&&await saveRuntimeMenuRolePermits(_0x3fbc65[_0x27557d(0x1ab)],_0xfb68dd['permitList']),{'ok':!![],'data':runtimePermitWriteResult(_0x27557d(0x1a7)+_0xfb68dd[_0x27557d(0x19b)],{'roleId':_0xfb68dd['role']['id'],'menuIds':_0xfb68dd[_0x27557d(0x192)]},_0xfb68dd[_0x27557d(0x1a8)],_0xfb68dd[_0x27557d(0x182)],{'method':_0x27557d(0x181),'path':_0x27557d(0x180)},_0xfb68dd['warnings'])};}};
1
+ const a43_0x112302=a43_0x34ce;(function(_0x3a963d,_0x564fbe){const _0x3f1992=a43_0x34ce,_0x53cd4b=_0x3a963d();while(!![]){try{const _0x558c63=-parseInt(_0x3f1992(0x127))/0x1*(-parseInt(_0x3f1992(0x115))/0x2)+parseInt(_0x3f1992(0x134))/0x3*(parseInt(_0x3f1992(0x13c))/0x4)+parseInt(_0x3f1992(0x13f))/0x5*(-parseInt(_0x3f1992(0x13e))/0x6)+-parseInt(_0x3f1992(0x131))/0x7*(-parseInt(_0x3f1992(0x11f))/0x8)+-parseInt(_0x3f1992(0x11d))/0x9*(parseInt(_0x3f1992(0x143))/0xa)+parseInt(_0x3f1992(0x13d))/0xb+parseInt(_0x3f1992(0x123))/0xc*(-parseInt(_0x3f1992(0x116))/0xd);if(_0x558c63===_0x564fbe)break;else _0x53cd4b['push'](_0x53cd4b['shift']());}catch(_0x199c8c){_0x53cd4b['push'](_0x53cd4b['shift']());}}}(a43_0x2865,0xbad8a));import{listRuntimeMenuRolePermits,listRuntimePermitRoles,saveRuntimeMenuRolePermits}from'../../core/api-client.js';function a43_0x34ce(_0x4968f3,_0xe058af){_0x4968f3=_0x4968f3-0x111;const _0x286544=a43_0x2865();let _0x34ce2f=_0x286544[_0x4968f3];return _0x34ce2f;}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':a43_0x112302(0x11c),'type':a43_0x112302(0x141),'required':!![],'description':a43_0x112302(0x139)};async function prepare(_0x2c444e){const _0x307dfe=a43_0x112302;await assertRuntimePermissionManager(_0x2c444e[_0x307dfe(0x133)]);const _0x58408a=assertGrantOrRevoke(_0x2c444e[_0x307dfe(0x13a)](_0x307dfe(0x114)),_0x2c444e[_0x307dfe(0x13a)]('revoke')),_0x4f6eb8=await resolveRuntimeRoleRef(_0x2c444e['appCode'],_0x2c444e[_0x307dfe(0x138)](_0x307dfe(0x12a)));assertRuntimePermitRoleConfigurable(_0x4f6eb8);const _0x1f9707=[...new Set(splitRefs(_0x2c444e[_0x307dfe(0x138)](_0x307dfe(0x11c)),_0x307dfe(0x121))[_0x307dfe(0x132)](_0x41686c=>{const _0x3f536f=_0x307dfe,_0x2931ea=Number(_0x41686c);if(!/^\d+$/[_0x3f536f(0x136)](_0x41686c)||!Number['isSafeInteger'](_0x2931ea)||_0x2931ea<=0x0)throw CliErrors[_0x3f536f(0x13b)]('Invalid\x20runtime\x20menu\x20ID:\x20'+_0x41686c+'.');return _0x2931ea;}))],_0x3a488e=flattenRuntimeMenuRolePermits(await listRuntimeMenuRolePermits(_0x2c444e[_0x307dfe(0x133)])),_0x35295e=await listRuntimePermitRoles(_0x2c444e[_0x307dfe(0x133)]),_0x27eec2=[],_0x509300=[],_0x20eb19=[],_0x410296=[];for(const _0x46fa68 of _0x1f9707){const _0x7705e4=_0x3a488e[_0x307dfe(0x12b)](_0x42caaa=>_0x42caaa['id']===_0x46fa68);if(!_0x7705e4)throw CliErrors[_0x307dfe(0x13b)](_0x307dfe(0x122)+_0x46fa68+'\x20was\x20not\x20found.');const _0x410c96=applyRuntimeRolePermission(_0x7705e4['rolePermit'],_0x4f6eb8,_0x35295e,_0x58408a);_0x509300[_0x307dfe(0x125)]({'menuId':_0x46fa68,'rolePermit':_0x7705e4[_0x307dfe(0x137)]}),_0x20eb19['push']({'menuId':_0x46fa68,'rolePermit':_0x410c96[_0x307dfe(0x128)]});if(_0x410c96[_0x307dfe(0x119)])_0x27eec2[_0x307dfe(0x125)](menuPermitDto(_0x2c444e[_0x307dfe(0x133)],_0x7705e4,_0x410c96['roles']));else _0x410296[_0x307dfe(0x125)](_0x307dfe(0x122)+_0x46fa68+_0x307dfe(0x124)+_0x58408a+_0x307dfe(0x126)+_0x4f6eb8['id']+'.');}return{'operation':_0x58408a,'role':_0x4f6eb8,'menuIds':_0x1f9707,'permitList':_0x27eec2,'before':_0x509300,'after':_0x20eb19,'warnings':_0x410296};}function a43_0x2865(){const _0x5c937b=['push','\x20for\x20role\x20','52966PmTgIl','roles','permit','role','find','body','\x20selected\x20runtime\x20menus','permitList','before','build','6097021SdtUDx','map','appCode','13290seKWwQ','operation','test','rolePermit','str','Comma-separated\x20runtime\x20menu\x20IDs','bool','validation','1292INyShB','12443310xnZXJv','102NDWSCr','94935qNFwet','after','string','授予或收回目标角色对指定运行菜单的访问权限;变更会影响该角色用户的菜单可见性。','3560VLaCXr','/client/permit/resource/batch-save-menu','role-menus-set','Grant\x20or\x20revoke\x20selected\x20runtime\x20menus\x20for\x20one\x20role','length','grant','30tiJRKr','883051dUiVhc','description','high-risk-write','changed','revoke','menuIds','menus','24417QIZuew','POST','8EuxoOU','Preview:\x20','--menus','Runtime\x20menu\x20','384JixMhn','\x20already\x20reflects\x20'];a43_0x2865=function(){return _0x5c937b;};return a43_0x2865();}export const permitRoleMenusSet={'service':a43_0x112302(0x129),'command':a43_0x112302(0x111),'description':a43_0x112302(0x112),'risk':a43_0x112302(0x118),'confirmationDescription':a43_0x112302(0x142),'flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,MENUS_FLAG],async 'validate'(_0x563233){const _0x43d46d=a43_0x112302;assertGrantOrRevoke(_0x563233[_0x43d46d(0x13a)](_0x43d46d(0x114)),_0x563233[_0x43d46d(0x13a)](_0x43d46d(0x11a)));},async 'dryRun'(_0x8bb313){const _0x31c298=a43_0x112302,_0x825e7=await prepare(_0x8bb313);return dryRun(_0x31c298(0x11e),_0x31c298(0x144))[_0x31c298(0x12c)]({'appCode':_0x8bb313[_0x31c298(0x133)],'permitList':_0x825e7[_0x31c298(0x12e)]})[_0x31c298(0x117)](_0x31c298(0x120)+_0x825e7[_0x31c298(0x135)]+_0x31c298(0x12d))[_0x31c298(0x130)]();},async 'execute'(_0x459fa4){const _0x9589a1=a43_0x112302,_0x35a56a=await prepare(_0x459fa4);return _0x35a56a[_0x9589a1(0x12e)][_0x9589a1(0x113)]>0x0&&await saveRuntimeMenuRolePermits(_0x459fa4[_0x9589a1(0x133)],_0x35a56a[_0x9589a1(0x12e)]),{'ok':!![],'data':runtimePermitWriteResult('menu-'+_0x35a56a[_0x9589a1(0x135)],{'roleId':_0x35a56a[_0x9589a1(0x12a)]['id'],'menuIds':_0x35a56a[_0x9589a1(0x11b)]},_0x35a56a[_0x9589a1(0x12f)],_0x35a56a[_0x9589a1(0x140)],{'method':_0x9589a1(0x11e),'path':_0x9589a1(0x144)},_0x35a56a['warnings'])};}};
@@ -1 +1 @@
1
- const a44_0x2730dc=a44_0x4a4d;(function(_0x2dda14,_0x41fbde){const _0x2f5358=a44_0x4a4d,_0x4c8f16=_0x2dda14();while(!![]){try{const _0x133650=-parseInt(_0x2f5358(0xc9))/0x1+parseInt(_0x2f5358(0xc7))/0x2+-parseInt(_0x2f5358(0xc5))/0x3+parseInt(_0x2f5358(0xc1))/0x4+parseInt(_0x2f5358(0xc3))/0x5*(-parseInt(_0x2f5358(0xca))/0x6)+-parseInt(_0x2f5358(0xc8))/0x7+parseInt(_0x2f5358(0xbf))/0x8;if(_0x133650===_0x41fbde)break;else _0x4c8f16['push'](_0x4c8f16['shift']());}catch(_0x1591d2){_0x4c8f16['push'](_0x4c8f16['shift']());}}}(a44_0x2bc6,0xc4a7a));function a44_0x4a4d(_0x34bdda,_0x335e58){_0x34bdda=_0x34bdda-0xbe;const _0x2bc668=a44_0x2bc6();let _0x4a4dbe=_0x2bc668[_0x34bdda];return _0x4a4dbe;}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':'permit','command':a44_0x2730dc(0xc4),'description':a44_0x2730dc(0xc6),'risk':a44_0x2730dc(0xc2),'flags':[ROLE_REF_FLAG],async 'execute'(_0x22d1b8){const _0x559fb6=a44_0x2730dc,_0xf7bd8c=await resolveRuntimeRoleRef(_0x22d1b8['appCode'],_0x22d1b8['str']('role')),_0x3f8ad8=await getRuntimeRoleMenuResources(_0x22d1b8[_0x559fb6(0xbe)],_0xf7bd8c['id']);return{'ok':!![],'data':{'scope':'runtime','role':{'id':_0xf7bd8c['id'],'roleName':_0xf7bd8c['roleName'],'roleType':_0xf7bd8c[_0x559fb6(0xc0)]},'menus':_0x3f8ad8}};}};function a44_0x2bc6(){const _0x2bbcd8=['Show\x20evaluated\x20runtime\x20menu\x20access\x20for\x20one\x20role','2157804qxFHmK','7455406dZSunc','1310724CzbfGt','671592JYULDa','appCode','13876120QOZYah','roleType','5124900cMdJXE','read','5sFWYFV','role-menus','2404290Xjrtxy'];a44_0x2bc6=function(){return _0x2bbcd8;};return a44_0x2bc6();}
1
+ function a44_0x1ad7(){const _0x15a0d2=['3402285HToInH','role','roleType','2151246EpfejL','role-menus','367888ayPdOA','read','12805210mFPdJb','appCode','Show\x20evaluated\x20runtime\x20menu\x20access\x20for\x20one\x20role','351YYOSHI','2VNCeAH','48967160AimYCl','76KLgsMG','1160489hAVYrf','permit','roleName','21moMfWP','435355FNYIUF'];a44_0x1ad7=function(){return _0x15a0d2;};return a44_0x1ad7();}const a44_0xcd2177=a44_0x1499;function a44_0x1499(_0x334856,_0x125cb7){_0x334856=_0x334856-0xda;const _0x1ad767=a44_0x1ad7();let _0x1499d0=_0x1ad767[_0x334856];return _0x1499d0;}(function(_0x50d9cd,_0x3fffc6){const _0x26183b=a44_0x1499,_0x1ce996=_0x50d9cd();while(!![]){try{const _0x3d258f=parseInt(_0x26183b(0xe4))/0x1+parseInt(_0x26183b(0xe1))/0x2*(parseInt(_0x26183b(0xe9))/0x3)+parseInt(_0x26183b(0xe3))/0x4*(-parseInt(_0x26183b(0xe8))/0x5)+parseInt(_0x26183b(0xec))/0x6*(-parseInt(_0x26183b(0xe7))/0x7)+parseInt(_0x26183b(0xdb))/0x8*(-parseInt(_0x26183b(0xe0))/0x9)+-parseInt(_0x26183b(0xdd))/0xa+parseInt(_0x26183b(0xe2))/0xb;if(_0x3d258f===_0x3fffc6)break;else _0x1ce996['push'](_0x1ce996['shift']());}catch(_0x2579b5){_0x1ce996['push'](_0x1ce996['shift']());}}}(a44_0x1ad7,0xe6075));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':a44_0xcd2177(0xe5),'command':a44_0xcd2177(0xda),'description':a44_0xcd2177(0xdf),'risk':a44_0xcd2177(0xdc),'flags':[ROLE_REF_FLAG],async 'execute'(_0x11e7d5){const _0x2eea65=a44_0xcd2177,_0x1db6ef=await resolveRuntimeRoleRef(_0x11e7d5[_0x2eea65(0xde)],_0x11e7d5['str'](_0x2eea65(0xea))),_0x35c9df=await getRuntimeRoleMenuResources(_0x11e7d5[_0x2eea65(0xde)],_0x1db6ef['id']);return{'ok':!![],'data':{'scope':'runtime','role':{'id':_0x1db6ef['id'],'roleName':_0x1db6ef[_0x2eea65(0xe6)],'roleType':_0x1db6ef[_0x2eea65(0xeb)]},'menus':_0x35c9df}};}};
@@ -1 +1 @@
1
- const a45_0xed2b73=a45_0x32fc;(function(_0x107e1b,_0xbfba98){const _0x55ae92=a45_0x32fc,_0x436b94=_0x107e1b();while(!![]){try{const _0x117b5a=parseInt(_0x55ae92(0x16e))/0x1*(-parseInt(_0x55ae92(0x17c))/0x2)+-parseInt(_0x55ae92(0x175))/0x3+-parseInt(_0x55ae92(0x18e))/0x4+parseInt(_0x55ae92(0x151))/0x5*(parseInt(_0x55ae92(0x17f))/0x6)+parseInt(_0x55ae92(0x159))/0x7+parseInt(_0x55ae92(0x17a))/0x8*(-parseInt(_0x55ae92(0x16b))/0x9)+parseInt(_0x55ae92(0x174))/0xa*(parseInt(_0x55ae92(0x15d))/0xb);if(_0x117b5a===_0xbfba98)break;else _0x436b94['push'](_0x436b94['shift']());}catch(_0x1bcd4f){_0x436b94['push'](_0x436b94['shift']());}}}(a45_0x5585,0xe0191));import{getLoginUserInfo,listRuntimePermitRoles,listRuntimeRoleUsers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a45_0x32fc(_0x16415a,_0x1f539b){_0x16415a=_0x16415a-0x14b;const _0x5585e1=a45_0x5585();let _0x32fcca=_0x5585e1[_0x16415a];return _0x32fcca;}export const MENU_ID_FLAG={'name':a45_0xed2b73(0x16d),'type':a45_0xed2b73(0x178),'required':!![],'description':a45_0xed2b73(0x183)};export const ROLE_REF_FLAG={'name':a45_0xed2b73(0x173),'type':'string','required':!![],'description':a45_0xed2b73(0x18a)};export const GRANT_FLAG={'name':a45_0xed2b73(0x167),'type':a45_0xed2b73(0x155),'description':a45_0xed2b73(0x188)};export const REVOKE_FLAG={'name':a45_0xed2b73(0x166),'type':a45_0xed2b73(0x155),'description':a45_0xed2b73(0x16f)};export const PAGE_SLOT_SPECS=[{'flag':'menu-roles','key':a45_0xed2b73(0x164),'allowSelf':![]},{'flag':'create-roles','key':a45_0xed2b73(0x193),'allowSelf':![]},{'flag':'update-roles','key':'dataUpdate','allowSelf':![]},{'flag':a45_0xed2b73(0x187),'key':'dataDelete','allowSelf':![]},{'flag':a45_0xed2b73(0x18d),'key':a45_0xed2b73(0x14c),'allowSelf':![]},{'flag':'export-roles','key':a45_0xed2b73(0x177),'allowSelf':![]},{'flag':a45_0xed2b73(0x17d),'key':a45_0xed2b73(0x14d),'allowSelf':!![]}];function a45_0x5585(){const _0x1dedf4=['menu-id','13VXVpju','Revoke\x20the\x20selected\x20resources\x20from\x20the\x20role','children','key','\x22\x20is\x20ambiguous.','role','1930iUhpND','594867zoWWYj','push','dataExport','number','Permission\x20role\x20\x22','8988328bwraWP','flag','126106WVvReU','row-roles','roleType','355734nMkMxA','The\x20current\x20service\x20contract\x20does\x20not\x20persist\x20an\x20empty\x20rolePermit;\x20grant\x20another\x20role\x20first.','Pass\x20exactly\x20one\x20of\x20--grant\x20or\x20--revoke.','Use\x20a\x20role\x20ID\x20from\x20`lovrabet\x20role\x20list`.','Runtime\x20menu\x20ID','userId','Ask\x20an\x20application\x20manager\x20to\x20perform\x20this\x20operation.','values','delete-roles','Grant\x20the\x20selected\x20resources\x20to\x20the\x20role','\x22\x20was\x20not\x20found.','Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name','\x20must\x20contain\x20at\x20least\x20one\x20value.','toUpperCase','detail-roles','662220KlOqZt','validation','pageId','filter','split','dataCreate','label','\x20runtime\x20role\x20','length','Cannot\x20revoke\x20the\x20last\x20role\x20from\x20a\x20runtime\x20resource.','runtime','dataDetail','dataPermit','find','Cannot\x20resolve\x20the\x20current\x20AK\x20userId\x20for\x20permission\x20management.','roleName','60anoGmY','ALL','permitId','test','boolean','map','SELF','Configure\x20USER,\x20CUSTOM,\x20or\x20an\x20applicable\x20special\x20role\x20instead.','7641760Mlgfsl','some','MENU','OWNER','81037OSmHdG','appCode','Comma-separated\x20runtime\x20role\x20IDs\x20or\x20names','ADMIN','menuId','Runtime\x20resource\x20permission\x20changes\x20require\x20an\x20ADMIN\x20or\x20OWNER\x20role.','resourceCode','menuPermit','Cannot\x20change\x20resource\x20permissions\x20for\x20','revoke','grant','userList','ADMIN\x20and\x20OWNER\x20have\x20full\x20runtime\x20access;\x20configure\x20USER\x20or\x20CUSTOM\x20instead.','string','9GQWEVe','trim'];a45_0x5585=function(){return _0x1dedf4;};return a45_0x5585();}export const PAGE_ROLE_FLAGS=PAGE_SLOT_SPECS[a45_0xed2b73(0x156)](_0x1bf6af=>({'name':_0x1bf6af[a45_0xed2b73(0x17b)],'type':a45_0xed2b73(0x16a),'description':a45_0xed2b73(0x15f)}));export function splitRefs(_0x210cd7,_0x272cdb){const _0x3cb363=a45_0xed2b73,_0x2dd502=[...new Set(_0x210cd7[_0x3cb363(0x192)](',')['map'](_0x27fee3=>_0x27fee3[_0x3cb363(0x16c)]())['filter'](Boolean))];if(_0x2dd502[_0x3cb363(0x196)]===0x0)throw CliErrors[_0x3cb363(0x18f)](_0x272cdb+_0x3cb363(0x18b));return _0x2dd502;}export function assertGrantOrRevoke(_0x456cea,_0x4775e3){const _0x22f523=a45_0xed2b73;if(_0x456cea===_0x4775e3)throw CliErrors[_0x22f523(0x18f)](_0x22f523(0x181));return _0x456cea?_0x22f523(0x167):'revoke';}function resolvePermitRole(_0x563b93,_0x275b73){const _0x32e44f=a45_0xed2b73,_0x316e75=_0x275b73[_0x32e44f(0x16c)](),_0x2ba5bd=/^-?\d+$/[_0x32e44f(0x154)](_0x316e75)?_0x563b93['filter'](_0x5eba7d=>_0x5eba7d['id']===Number(_0x316e75)):_0x563b93[_0x32e44f(0x191)](_0x2a179a=>_0x2a179a['roleName']===_0x316e75||_0x2a179a[_0x32e44f(0x17e)]===_0x316e75[_0x32e44f(0x18c)]());if(_0x2ba5bd['length']!==0x1)throw CliErrors[_0x32e44f(0x18f)](_0x2ba5bd['length']===0x0?_0x32e44f(0x179)+_0x316e75+_0x32e44f(0x189):_0x32e44f(0x179)+_0x316e75+_0x32e44f(0x172),_0x32e44f(0x182));return _0x2ba5bd[0x0];}export async function resolveRuntimePermitRoles(_0x261b38,_0x7ca31b,_0x30203e){const _0x271e11=a45_0xed2b73,_0x4497b8=await listRuntimePermitRoles(_0x261b38,{'needSelf':!![],'needPublic':!![]}),_0x31894e=[...new Map(_0x7ca31b[_0x271e11(0x156)](_0x33de55=>resolvePermitRole(_0x4497b8,_0x33de55))['map'](_0x2dcbec=>[_0x2dcbec['id'],_0x2dcbec]))[_0x271e11(0x186)]()],_0xe8ed52=_0x31894e[_0x271e11(0x14e)](_0x55b3f3=>_0x55b3f3[_0x271e11(0x17e)]===_0x271e11(0x160)||_0x55b3f3['roleType']===_0x271e11(0x15c));if(_0xe8ed52)throw CliErrors[_0x271e11(0x18f)](_0xe8ed52[_0x271e11(0x17e)]+'\x20has\x20full\x20runtime\x20access\x20and\x20cannot\x20be\x20a\x20resource\x20permission\x20target.',_0x271e11(0x158));if(!_0x30203e&&_0x31894e['some'](_0x33478c=>_0x33478c[_0x271e11(0x17e)]===_0x271e11(0x157)))throw CliErrors[_0x271e11(0x18f)]('SELF\x20is\x20only\x20valid\x20for\x20--row-roles.');return _0x31894e;}export async function assertRuntimePermissionManager(_0x6a6a5d){const _0x33d6de=a45_0xed2b73,_0x16cbec=await getLoginUserInfo(),_0x4d0ceb=_0x16cbec['userId']??_0x16cbec['id'],_0x36cf8b=Number(_0x4d0ceb);if(!Number['isSafeInteger'](_0x36cf8b)||_0x36cf8b<=0x0)throw CliErrors['validation'](_0x33d6de(0x14f));const _0x56c903=await listRuntimeRoleUsers(_0x6a6a5d),_0x34a54d=_0x56c903['some'](_0x473642=>(_0x473642[_0x33d6de(0x17e)]==='ADMIN'||_0x473642[_0x33d6de(0x17e)]===_0x33d6de(0x15c))&&_0x473642[_0x33d6de(0x168)][_0x33d6de(0x15a)](_0x4c6306=>_0x4c6306[_0x33d6de(0x184)]===_0x36cf8b));if(!_0x34a54d)throw CliErrors[_0x33d6de(0x18f)](_0x33d6de(0x162),_0x33d6de(0x185));}export function assertRuntimePermitRoleConfigurable(_0x119235){const _0x74044e=a45_0xed2b73;if(_0x119235[_0x74044e(0x17e)]==='ADMIN'||_0x119235[_0x74044e(0x17e)]==='OWNER')throw CliErrors[_0x74044e(0x18f)](_0x74044e(0x165)+_0x119235[_0x74044e(0x17e)]+_0x74044e(0x195)+_0x119235[_0x74044e(0x150)]+'.',_0x74044e(0x169));}function asPermitRole(_0x5c6d22){const _0x40c521=a45_0xed2b73;return{'id':_0x5c6d22['id'],'roleName':_0x5c6d22[_0x40c521(0x150)],'roleType':_0x5c6d22[_0x40c521(0x17e)],'allowed':!![]};}export function applyRuntimeRolePermission(_0x2a23e0,_0x191da8,_0x5575ed,_0x5b0654){const _0x310742=a45_0xed2b73,_0x199f36=!_0x2a23e0||_0x2a23e0[_0x310742(0x196)]===0x0,_0xffa84c=_0x2a23e0?.[_0x310742(0x15a)](_0x453d03=>_0x453d03[_0x310742(0x17e)]===_0x310742(0x152))??![];if(_0x5b0654==='grant'&&(_0x199f36||_0xffa84c))return{'roles':_0x2a23e0??null,'changed':![]};let _0x5d5781=_0x199f36||_0xffa84c?_0x5575ed[_0x310742(0x191)](_0x5117fd=>_0x5117fd['id']>0x0):[..._0x2a23e0];const _0x4d4766=_0x5d5781[_0x310742(0x15a)](_0x3ef9fb=>_0x3ef9fb['id']===_0x191da8['id']);if(_0x5b0654===_0x310742(0x167)){if(_0x4d4766)return{'roles':_0x5d5781,'changed':![]};return _0x5d5781[_0x310742(0x176)](asPermitRole(_0x191da8)),{'roles':_0x5d5781,'changed':!![]};}if(!_0x4d4766)return{'roles':_0x5d5781,'changed':_0x199f36||_0xffa84c};_0x5d5781=_0x5d5781[_0x310742(0x191)](_0x298b82=>_0x298b82['id']!==_0x191da8['id']);if(_0x5d5781['length']===0x0)throw CliErrors[_0x310742(0x18f)](_0x310742(0x197),_0x310742(0x180));return{'roles':_0x5d5781,'changed':!![]};}export function projectRuntimePagePermit(_0x3bc0ca){const _0x590b9e=a45_0xed2b73,_0x47bdf7={'menuId':_0x3bc0ca[_0x590b9e(0x161)],'pageId':_0x3bc0ca[_0x590b9e(0x190)],'appCode':_0x3bc0ca[_0x590b9e(0x15e)],'datasetCode':_0x3bc0ca['datasetCode']};for(const _0x4898e1 of PAGE_SLOT_SPECS){const _0x4bb6fe=_0x3bc0ca[_0x4898e1[_0x590b9e(0x171)]];_0x4bb6fe&&(_0x47bdf7[_0x4898e1[_0x590b9e(0x171)]]={'resourceCode':_0x4bb6fe[_0x590b9e(0x163)],'resourceType':_0x4bb6fe['resourceType'],'roles':(_0x4bb6fe['rolePermit']??[])[_0x590b9e(0x156)](_0x3409e7=>({'id':_0x3409e7['id'],'roleName':_0x3409e7[_0x590b9e(0x150)],'roleType':_0x3409e7[_0x590b9e(0x17e)]}))});}return _0x47bdf7;}export function flattenRuntimeMenuRolePermits(_0x56199f){const _0x2a3a8c=[],_0x37d8c1=_0x374269=>{const _0x26fcc7=a45_0x32fc;_0x2a3a8c[_0x26fcc7(0x176)](_0x374269);for(const _0x4c592d of _0x374269[_0x26fcc7(0x170)]??[])_0x37d8c1(_0x4c592d);};for(const _0x1ae8de of _0x56199f)_0x37d8c1(_0x1ae8de);return _0x2a3a8c;}export function runtimePermitWriteResult(_0x1b8dd3,_0x8b2806,_0x5ce494,_0x2ab675,_0x483c4d,_0x1e8c83=[]){const _0x5ddbeb=a45_0xed2b73;return{'operation':_0x1b8dd3,'scope':_0x5ddbeb(0x14b),'selector':_0x8b2806,'before':_0x5ce494,'after':_0x2ab675,'dryRun':![],'backend':_0x483c4d,'warnings':_0x1e8c83};}export function menuPermitDto(_0x3765ba,_0x2cb163,_0xcff6f7){const _0x46e7f2=a45_0xed2b73;return{..._0x2cb163['permitId']!=null?{'id':_0x2cb163[_0x46e7f2(0x153)]}:{},'appCode':_0x3765ba,'menuId':_0x2cb163['id'],'pageId':_0x2cb163[_0x46e7f2(0x190)]??null,'resourceCode':String(_0x2cb163['id']),'resourceType':_0x46e7f2(0x15b),'resourceName':_0x2cb163[_0x46e7f2(0x194)],'rolePermit':_0xcff6f7};}
1
+ const a45_0x545b67=a45_0x3010;(function(_0x4e411d,_0x482de1){const _0x28ef38=a45_0x3010,_0x322c0b=_0x4e411d();while(!![]){try{const _0x50d8e9=-parseInt(_0x28ef38(0xd6))/0x1*(-parseInt(_0x28ef38(0xd3))/0x2)+parseInt(_0x28ef38(0xc4))/0x3+-parseInt(_0x28ef38(0xa6))/0x4+-parseInt(_0x28ef38(0xa4))/0x5+parseInt(_0x28ef38(0x93))/0x6*(-parseInt(_0x28ef38(0xb9))/0x7)+parseInt(_0x28ef38(0xcc))/0x8*(parseInt(_0x28ef38(0xb0))/0x9)+parseInt(_0x28ef38(0x97))/0xa*(parseInt(_0x28ef38(0xa0))/0xb);if(_0x50d8e9===_0x482de1)break;else _0x322c0b['push'](_0x322c0b['shift']());}catch(_0x3f2eef){_0x322c0b['push'](_0x322c0b['shift']());}}}(a45_0x3a85,0xe6c23));import{getLoginUserInfo,listRuntimePermitRoles,listRuntimeRoleUsers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const MENU_ID_FLAG={'name':'menu-id','type':a45_0x545b67(0xb1),'required':!![],'description':a45_0x545b67(0xa8)};export const ROLE_REF_FLAG={'name':a45_0x545b67(0xd1),'type':'string','required':!![],'description':a45_0x545b67(0xac)};export const GRANT_FLAG={'name':'grant','type':a45_0x545b67(0x95),'description':a45_0x545b67(0xd7)};export const REVOKE_FLAG={'name':'revoke','type':a45_0x545b67(0x95),'description':a45_0x545b67(0x9c)};export const PAGE_SLOT_SPECS=[{'flag':a45_0x545b67(0xcb),'key':a45_0x545b67(0xc1),'allowSelf':![]},{'flag':a45_0x545b67(0x9b),'key':a45_0x545b67(0x9f),'allowSelf':![]},{'flag':a45_0x545b67(0xd8),'key':'dataUpdate','allowSelf':![]},{'flag':a45_0x545b67(0x9a),'key':a45_0x545b67(0x99),'allowSelf':![]},{'flag':a45_0x545b67(0x96),'key':a45_0x545b67(0xc0),'allowSelf':![]},{'flag':a45_0x545b67(0xd9),'key':'dataExport','allowSelf':![]},{'flag':'row-roles','key':'dataPermit','allowSelf':!![]}];export const PAGE_ROLE_FLAGS=PAGE_SLOT_SPECS[a45_0x545b67(0xaa)](_0x31d714=>({'name':_0x31d714[a45_0x545b67(0xd2)],'type':a45_0x545b67(0xc8),'description':'Comma-separated\x20runtime\x20role\x20IDs\x20or\x20names'}));export function splitRefs(_0x2a8126,_0x4914f9){const _0x5133aa=a45_0x545b67,_0x3ccf91=[...new Set(_0x2a8126[_0x5133aa(0xbe)](',')[_0x5133aa(0xaa)](_0x4b6830=>_0x4b6830[_0x5133aa(0xa7)]())[_0x5133aa(0xc5)](Boolean))];if(_0x3ccf91[_0x5133aa(0xb3)]===0x0)throw CliErrors[_0x5133aa(0xbd)](_0x4914f9+_0x5133aa(0xd4));return _0x3ccf91;}export function assertGrantOrRevoke(_0x52112e,_0x6b5ccb){const _0x2d4f97=a45_0x545b67;if(_0x52112e===_0x6b5ccb)throw CliErrors[_0x2d4f97(0xbd)](_0x2d4f97(0xdd));return _0x52112e?_0x2d4f97(0xcd):'revoke';}function resolvePermitRole(_0x2514dc,_0x382e44){const _0x2ec144=a45_0x545b67,_0x17fe89=_0x382e44[_0x2ec144(0xa7)](),_0x447e09=/^-?\d+$/['test'](_0x17fe89)?_0x2514dc[_0x2ec144(0xc5)](_0x2aabd7=>_0x2aabd7['id']===Number(_0x17fe89)):_0x2514dc[_0x2ec144(0xc5)](_0x51da49=>_0x51da49[_0x2ec144(0xaf)]===_0x17fe89||_0x51da49[_0x2ec144(0xbf)]===_0x17fe89[_0x2ec144(0xd0)]());if(_0x447e09[_0x2ec144(0xb3)]!==0x1)throw CliErrors['validation'](_0x447e09['length']===0x0?_0x2ec144(0xc2)+_0x17fe89+_0x2ec144(0xce):_0x2ec144(0xc2)+_0x17fe89+_0x2ec144(0xca),_0x2ec144(0x94));return _0x447e09[0x0];}export async function resolveRuntimePermitRoles(_0x52bf3d,_0x1629b1,_0x1615d0){const _0x1431ac=a45_0x545b67,_0x66613c=await listRuntimePermitRoles(_0x52bf3d,{'needSelf':!![],'needPublic':!![]}),_0x54d439=[...new Map(_0x1629b1[_0x1431ac(0xaa)](_0x308447=>resolvePermitRole(_0x66613c,_0x308447))[_0x1431ac(0xaa)](_0x4a1322=>[_0x4a1322['id'],_0x4a1322]))['values']()],_0x158a5b=_0x54d439[_0x1431ac(0xb2)](_0x3636c5=>_0x3636c5[_0x1431ac(0xbf)]===_0x1431ac(0xa9)||_0x3636c5[_0x1431ac(0xbf)]===_0x1431ac(0xc3));if(_0x158a5b)throw CliErrors[_0x1431ac(0xbd)](_0x158a5b['roleType']+_0x1431ac(0xad),'Configure\x20USER,\x20CUSTOM,\x20or\x20an\x20applicable\x20special\x20role\x20instead.');if(!_0x1615d0&&_0x54d439['some'](_0x18a7b1=>_0x18a7b1['roleType']===_0x1431ac(0xa3)))throw CliErrors[_0x1431ac(0xbd)](_0x1431ac(0xdc));return _0x54d439;}export async function assertRuntimePermissionManager(_0x276cde){const _0x5ec757=a45_0x545b67,_0x3dd3e4=await getLoginUserInfo(),_0x34c686=_0x3dd3e4[_0x5ec757(0xa1)]??_0x3dd3e4['id'],_0x47d104=Number(_0x34c686);if(!Number[_0x5ec757(0xb5)](_0x47d104)||_0x47d104<=0x0)throw CliErrors['validation'](_0x5ec757(0x98));const _0x32be8e=await listRuntimeRoleUsers(_0x276cde),_0x2c3000=_0x32be8e[_0x5ec757(0xda)](_0x5bc06e=>(_0x5bc06e[_0x5ec757(0xbf)]===_0x5ec757(0xa9)||_0x5bc06e['roleType']===_0x5ec757(0xc3))&&_0x5bc06e['userList'][_0x5ec757(0xda)](_0x122d56=>_0x122d56[_0x5ec757(0xa1)]===_0x47d104));if(!_0x2c3000)throw CliErrors[_0x5ec757(0xbd)]('Runtime\x20resource\x20permission\x20changes\x20require\x20an\x20ADMIN\x20or\x20OWNER\x20role.',_0x5ec757(0xa5));}export function assertRuntimePermitRoleConfigurable(_0x1bea3f){const _0x3a0f36=a45_0x545b67;if(_0x1bea3f[_0x3a0f36(0xbf)]==='ADMIN'||_0x1bea3f[_0x3a0f36(0xbf)]===_0x3a0f36(0xc3))throw CliErrors[_0x3a0f36(0xbd)](_0x3a0f36(0xbb)+_0x1bea3f[_0x3a0f36(0xbf)]+_0x3a0f36(0xbc)+_0x1bea3f[_0x3a0f36(0xaf)]+'.',_0x3a0f36(0x9d));}function asPermitRole(_0x128b52){const _0x15e2ea=a45_0x545b67;return{'id':_0x128b52['id'],'roleName':_0x128b52[_0x15e2ea(0xaf)],'roleType':_0x128b52['roleType'],'allowed':!![]};}export function applyRuntimeRolePermission(_0x3ac49a,_0x2cfc89,_0x16ce9a,_0x307eaf){const _0x401a78=a45_0x545b67,_0x564b98=!_0x3ac49a||_0x3ac49a[_0x401a78(0xb3)]===0x0,_0x42c468=_0x3ac49a?.[_0x401a78(0xda)](_0x1003c7=>_0x1003c7['roleType']===_0x401a78(0xb7))??![];if(_0x307eaf===_0x401a78(0xcd)&&(_0x564b98||_0x42c468))return{'roles':_0x3ac49a??null,'changed':![]};let _0x2b8ab7=_0x564b98||_0x42c468?_0x16ce9a[_0x401a78(0xc5)](_0x5827d4=>_0x5827d4['id']>0x0):[..._0x3ac49a];const _0x1543b9=_0x2b8ab7['some'](_0x5e3cc0=>_0x5e3cc0['id']===_0x2cfc89['id']);if(_0x307eaf===_0x401a78(0xcd)){if(_0x1543b9)return{'roles':_0x2b8ab7,'changed':![]};return _0x2b8ab7[_0x401a78(0xde)](asPermitRole(_0x2cfc89)),{'roles':_0x2b8ab7,'changed':!![]};}if(!_0x1543b9)return{'roles':_0x2b8ab7,'changed':_0x564b98||_0x42c468};_0x2b8ab7=_0x2b8ab7[_0x401a78(0xc5)](_0x4dbde0=>_0x4dbde0['id']!==_0x2cfc89['id']);if(_0x2b8ab7[_0x401a78(0xb3)]===0x0)throw CliErrors[_0x401a78(0xbd)](_0x401a78(0xd5),_0x401a78(0xae));return{'roles':_0x2b8ab7,'changed':!![]};}function a45_0x3a85(){const _0x4d515b=['roleType','dataDetail','menuPermit','Permission\x20role\x20\x22','OWNER','624705loBmto','filter','permitId','menuId','string','resourceType','\x22\x20is\x20ambiguous.','menu-roles','2955464OpkkZI','grant','\x22\x20was\x20not\x20found.','pageId','toUpperCase','role','flag','135742DoZVjs','\x20must\x20contain\x20at\x20least\x20one\x20value.','Cannot\x20revoke\x20the\x20last\x20role\x20from\x20a\x20runtime\x20resource.','1mmMCkc','Grant\x20the\x20selected\x20resources\x20to\x20the\x20role','update-roles','export-roles','some','key','SELF\x20is\x20only\x20valid\x20for\x20--row-roles.','Pass\x20exactly\x20one\x20of\x20--grant\x20or\x20--revoke.','push','5241408yGjUlC','Use\x20a\x20role\x20ID\x20from\x20`lovrabet\x20role\x20list`.','boolean','detail-roles','1501490iUgSCs','Cannot\x20resolve\x20the\x20current\x20AK\x20userId\x20for\x20permission\x20management.','dataDelete','delete-roles','create-roles','Revoke\x20the\x20selected\x20resources\x20from\x20the\x20role','ADMIN\x20and\x20OWNER\x20have\x20full\x20runtime\x20access;\x20configure\x20USER\x20or\x20CUSTOM\x20instead.','appCode','dataCreate','77lvXOXc','userId','runtime','SELF','358020fDvWyo','Ask\x20an\x20application\x20manager\x20to\x20perform\x20this\x20operation.','3658088YNwrCC','trim','Runtime\x20menu\x20ID','ADMIN','map','datasetCode','Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name','\x20has\x20full\x20runtime\x20access\x20and\x20cannot\x20be\x20a\x20resource\x20permission\x20target.','The\x20current\x20service\x20contract\x20does\x20not\x20persist\x20an\x20empty\x20rolePermit;\x20grant\x20another\x20role\x20first.','roleName','36CaIobm','number','find','length','label','isSafeInteger','resourceCode','ALL','MENU','7vCZnAy','rolePermit','Cannot\x20change\x20resource\x20permissions\x20for\x20','\x20runtime\x20role\x20','validation','split'];a45_0x3a85=function(){return _0x4d515b;};return a45_0x3a85();}function a45_0x3010(_0x2c5943,_0x3c96c6){_0x2c5943=_0x2c5943-0x93;const _0x3a8554=a45_0x3a85();let _0x3010db=_0x3a8554[_0x2c5943];return _0x3010db;}export function projectRuntimePagePermit(_0x1913e4){const _0x4ba969=a45_0x545b67,_0x551a58={'menuId':_0x1913e4[_0x4ba969(0xc7)],'pageId':_0x1913e4[_0x4ba969(0xcf)],'appCode':_0x1913e4[_0x4ba969(0x9e)],'datasetCode':_0x1913e4[_0x4ba969(0xab)]};for(const _0x492945 of PAGE_SLOT_SPECS){const _0x3be8aa=_0x1913e4[_0x492945[_0x4ba969(0xdb)]];_0x3be8aa&&(_0x551a58[_0x492945[_0x4ba969(0xdb)]]={'resourceCode':_0x3be8aa[_0x4ba969(0xb6)],'resourceType':_0x3be8aa[_0x4ba969(0xc9)],'roles':(_0x3be8aa[_0x4ba969(0xba)]??[])[_0x4ba969(0xaa)](_0x1eac39=>({'id':_0x1eac39['id'],'roleName':_0x1eac39[_0x4ba969(0xaf)],'roleType':_0x1eac39[_0x4ba969(0xbf)]}))});}return _0x551a58;}export function flattenRuntimeMenuRolePermits(_0xadaa14){const _0x50494f=[],_0x4a6f5a=_0x2bc781=>{const _0x34120f=a45_0x3010;_0x50494f[_0x34120f(0xde)](_0x2bc781);for(const _0x38d0a0 of _0x2bc781['children']??[])_0x4a6f5a(_0x38d0a0);};for(const _0x3a1f30 of _0xadaa14)_0x4a6f5a(_0x3a1f30);return _0x50494f;}export function runtimePermitWriteResult(_0x234d75,_0x62659f,_0x284bf4,_0x2e5b3b,_0x113551,_0x89b64e=[]){const _0x17a0aa=a45_0x545b67;return{'operation':_0x234d75,'scope':_0x17a0aa(0xa2),'selector':_0x62659f,'before':_0x284bf4,'after':_0x2e5b3b,'dryRun':![],'backend':_0x113551,'warnings':_0x89b64e};}export function menuPermitDto(_0x273d78,_0x5b8948,_0x31738c){const _0x30539c=a45_0x545b67;return{..._0x5b8948[_0x30539c(0xc6)]!=null?{'id':_0x5b8948[_0x30539c(0xc6)]}:{},'appCode':_0x273d78,'menuId':_0x5b8948['id'],'pageId':_0x5b8948['pageId']??null,'resourceCode':String(_0x5b8948['id']),'resourceType':_0x30539c(0xb8),'resourceName':_0x5b8948[_0x30539c(0xb4)],'rolePermit':_0x31738c};}
@@ -1 +1 @@
1
- const a46_0x5344f0=a46_0x1b7b;(function(_0x3bd737,_0x3958d1){const _0xec616=a46_0x1b7b,_0x38b8a=_0x3bd737();while(!![]){try{const _0x408031=parseInt(_0xec616(0x158))/0x1*(parseInt(_0xec616(0x161))/0x2)+-parseInt(_0xec616(0x155))/0x3*(-parseInt(_0xec616(0x14e))/0x4)+-parseInt(_0xec616(0x17b))/0x5*(-parseInt(_0xec616(0x16c))/0x6)+parseInt(_0xec616(0x176))/0x7*(-parseInt(_0xec616(0x14b))/0x8)+-parseInt(_0xec616(0x171))/0x9+-parseInt(_0xec616(0x140))/0xa+parseInt(_0xec616(0x14c))/0xb;if(_0x408031===_0x3958d1)break;else _0x38b8a['push'](_0x38b8a['shift']());}catch(_0x1107f6){_0x38b8a['push'](_0x38b8a['shift']());}}}(a46_0x22f4,0x61184));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':a46_0x5344f0(0x17f),'type':a46_0x5344f0(0x14f),'description':'Path\x20to\x20a\x20local\x20UTF-8\x20JavaScript\x20or\x20TypeScript\x20file'},FUNCTION_NAME_FLAG={'name':'name','type':a46_0x5344f0(0x14f),'required':!![],'description':a46_0x5344f0(0x145)},DESCRIPTION_FLAG={'name':a46_0x5344f0(0x153),'type':a46_0x5344f0(0x14f),'description':'Personal\x20Backend\x20Function\x20description'},SOURCE_SESSION_FLAG={'name':'source-session-id','type':a46_0x5344f0(0x14f),'description':a46_0x5344f0(0x17c)};function normalizeFunctionName(_0x4cc67f){const _0x230860=a46_0x5344f0,_0x336848=String(_0x4cc67f||'')[_0x230860(0x14a)]();if(!_0x336848||!FUNCTION_NAME_PATTERN[_0x230860(0x17a)](_0x336848))throw CliErrors[_0x230860(0x154)](_0x230860(0x148));return _0x336848;}function readScriptFile(_0x399839){const _0x5c249e=a46_0x5344f0;if(!_0x399839)throw CliErrors['validation']('File\x20path\x20is\x20required.');if(!existsSync(_0x399839))throw CliErrors['validation'](_0x5c249e(0x16e)+_0x399839);if(!statSync(_0x399839)[_0x5c249e(0x17e)]())throw CliErrors[_0x5c249e(0x154)](_0x5c249e(0x164)+_0x399839);const _0x19cb11=readFileSync(_0x399839,'utf8');if(!_0x19cb11[_0x5c249e(0x14a)]())throw CliErrors[_0x5c249e(0x154)]('Personal\x20Backend\x20Function\x20script\x20file\x20is\x20blank.');return _0x19cb11;}function optionalTrimmed(_0x21f1d2){const _0x2a7ce0=a46_0x5344f0,_0x5cc788=String(_0x21f1d2||'')[_0x2a7ce0(0x14a)]();return _0x5cc788||undefined;}function summarizeBff(_0x27cbf7){const _0x41f46f=a46_0x5344f0;return{'id':_0x27cbf7['id'],'appCode':_0x27cbf7[_0x41f46f(0x175)],'functionName':_0x27cbf7['functionName'],'description':_0x27cbf7[_0x41f46f(0x153)],'scriptType':_0x27cbf7[_0x41f46f(0x157)],'version':_0x27cbf7[_0x41f46f(0x17d)],'gmtModified':_0x27cbf7['gmtModified'],'updateTime':_0x27cbf7[_0x41f46f(0x147)]};}function detailBff(_0x525b5e){const _0x103b7f=a46_0x5344f0;return{'id':_0x525b5e['id'],'appCode':_0x525b5e[_0x103b7f(0x175)],'functionName':_0x525b5e[_0x103b7f(0x15f)],'description':_0x525b5e[_0x103b7f(0x153)],'scriptType':_0x525b5e[_0x103b7f(0x157)],'scriptContent':_0x525b5e[_0x103b7f(0x14d)]??'','config':_0x525b5e['config'],'version':_0x525b5e[_0x103b7f(0x17d)],'createUserId':_0x525b5e[_0x103b7f(0x146)],'gmtCreate':_0x525b5e[_0x103b7f(0x16d)],'gmtModified':_0x525b5e[_0x103b7f(0x170)],'createTime':_0x525b5e['createTime'],'updateTime':_0x525b5e[_0x103b7f(0x147)]};}function buildCreateInput(_0x4f68f2){const _0x46f027=a46_0x5344f0;return{'functionName':normalizeFunctionName(_0x4f68f2[_0x46f027(0x15d)]('name')),...optionalTrimmed(_0x4f68f2[_0x46f027(0x15d)]('description'))?{'description':optionalTrimmed(_0x4f68f2['str'](_0x46f027(0x153)))}:{},'scriptContent':readScriptFile(_0x4f68f2[_0x46f027(0x15d)](_0x46f027(0x17f))),...optionalTrimmed(_0x4f68f2['str'](_0x46f027(0x144)))?{'sourceSessionId':optionalTrimmed(_0x4f68f2[_0x46f027(0x15d)](_0x46f027(0x144)))}:{}};}function buildUpdateInput(_0x2ddf02){const _0x2fcbac=a46_0x5344f0,_0xea5e99={};optionalTrimmed(_0x2ddf02[_0x2fcbac(0x15d)](_0x2fcbac(0x141)))&&(_0xea5e99[_0x2fcbac(0x15f)]=normalizeFunctionName(_0x2ddf02[_0x2fcbac(0x15d)](_0x2fcbac(0x141))));_0x2ddf02['flag']('description')!==undefined&&(_0xea5e99[_0x2fcbac(0x153)]=_0x2ddf02['str'](_0x2fcbac(0x153)));optionalTrimmed(_0x2ddf02[_0x2fcbac(0x15d)](_0x2fcbac(0x17f)))&&(_0xea5e99['scriptContent']=readScriptFile(_0x2ddf02['str'](_0x2fcbac(0x17f))));_0x2ddf02[_0x2fcbac(0x143)](_0x2fcbac(0x144))!==undefined&&(_0xea5e99[_0x2fcbac(0x16a)]=_0x2ddf02[_0x2fcbac(0x15d)](_0x2fcbac(0x144)));if(Object[_0x2fcbac(0x151)](_0xea5e99)[_0x2fcbac(0x172)]===0x0)throw CliErrors[_0x2fcbac(0x154)](_0x2fcbac(0x166));return _0xea5e99;}function a46_0x1b7b(_0x1ae062,_0x11176d){_0x1ae062=_0x1ae062-0x13f;const _0x22f47b=a46_0x22f4();let _0x1b7bc3=_0x22f47b[_0x1ae062];return _0x1b7bc3;}function parseExecParams(_0x4f8daa){const _0x489a83=a46_0x5344f0,_0x4f99ff=parseJsonParams(_0x4f8daa)??{};if(Array[_0x489a83(0x142)](_0x4f99ff))throw CliErrors['validation']('--params\x20must\x20be\x20a\x20JSON\x20object.');return _0x4f99ff;}const personalBffList={'service':a46_0x5344f0(0x159),'command':'list','description':a46_0x5344f0(0x150),'risk':'read','flags':[VERBOSE_FLAG],async 'execute'(_0x514d0a){const _0x42ada6=a46_0x5344f0,_0x13fc1f=await listPersonalBffs(_0x514d0a[_0x42ada6(0x175)]);return{'ok':!![],'data':{'total':_0x13fc1f[_0x42ada6(0x172)],'items':_0x514d0a[_0x42ada6(0x15b)](_0x42ada6(0x174))?_0x13fc1f:_0x13fc1f['map'](summarizeBff)}};}},personalBffDetail={'service':a46_0x5344f0(0x159),'command':a46_0x5344f0(0x177),'description':a46_0x5344f0(0x152),'risk':a46_0x5344f0(0x178),'flags':[{...ID_FLAG,'description':a46_0x5344f0(0x179)}],async 'execute'(_0xb7dfc7){const _0x1ddc6d=a46_0x5344f0,_0x2d8035=await getPersonalBff(_0xb7dfc7[_0x1ddc6d(0x13f)]('id'),_0xb7dfc7['appCode']);return{'ok':!![],'data':detailBff(_0x2d8035)};}},personalBffCreate={'service':a46_0x5344f0(0x159),'command':'create','description':a46_0x5344f0(0x169),'risk':'write','confirmationDescription':a46_0x5344f0(0x160),'flags':[FUNCTION_NAME_FLAG,{...FILE_FLAG,'required':!![]},DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x485fc6){const _0x22dbd5=a46_0x5344f0,_0x53c294=buildCreateInput(_0x485fc6),_0x127cfc=await createPersonalBff(_0x485fc6[_0x22dbd5(0x175)],_0x53c294);return{'ok':!![],'data':detailBff(_0x127cfc),'message':_0x22dbd5(0x168)+_0x127cfc['id']+(_0x127cfc[_0x22dbd5(0x15f)]?'\x20('+_0x127cfc[_0x22dbd5(0x15f)]+')':'')};},async 'dryRun'(_0x35fafe){const _0x4ce073=a46_0x5344f0,_0x26ef24=buildCreateInput(_0x35fafe);return dryRun(_0x4ce073(0x15e),_0x4ce073(0x149))[_0x4ce073(0x173)]({'appCode':_0x35fafe['appCode'],..._0x26ef24})[_0x4ce073(0x153)]('Preview:\x20create\x20Personal\x20Backend\x20Function\x20'+_0x26ef24[_0x4ce073(0x15f)])[_0x4ce073(0x16b)]();}},personalBffUpdate={'service':'personal-bff','command':'update','description':'根据\x20ID\x20更新Personal\x20Backend\x20Function','risk':a46_0x5344f0(0x15a),'confirmationDescription':'更新Personal\x20Backend\x20Function\x20的脚本或元信息;之后的调用将使用新版本。','flags':[{...ID_FLAG,'description':a46_0x5344f0(0x179)},{...FUNCTION_NAME_FLAG,'required':![]},FILE_FLAG,DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x3ba9ec){const _0x40e4f5=a46_0x5344f0,_0x2cee0a=_0x3ba9ec[_0x40e4f5(0x13f)]('id'),_0x1342ed=buildUpdateInput(_0x3ba9ec),_0xa0bf24=await updatePersonalBff(_0x2cee0a,_0x3ba9ec['appCode'],_0x1342ed);return{'ok':!![],'data':detailBff(_0xa0bf24),'message':_0x40e4f5(0x15c)+_0xa0bf24['id']+(_0xa0bf24['functionName']?'\x20('+_0xa0bf24['functionName']+')':'')};},async 'dryRun'(_0xaafe5a){const _0x11cfe1=a46_0x5344f0,_0x43b856=_0xaafe5a[_0x11cfe1(0x13f)]('id'),_0x357e22=buildUpdateInput(_0xaafe5a);return dryRun(_0x11cfe1(0x15e),_0x11cfe1(0x162)+_0x43b856+'/update')[_0x11cfe1(0x173)]({'appCode':_0xaafe5a[_0x11cfe1(0x175)],..._0x357e22})['description']('Preview:\x20update\x20Personal\x20Backend\x20Function\x20'+_0x43b856)[_0x11cfe1(0x16b)]();}},personalBffExec={'service':a46_0x5344f0(0x159),'command':a46_0x5344f0(0x16f),'description':a46_0x5344f0(0x156),'risk':a46_0x5344f0(0x15a),'confirmationDescription':a46_0x5344f0(0x165),'flags':[{...ID_FLAG,'description':a46_0x5344f0(0x179)},{...PARAMS_FLAG,'description':a46_0x5344f0(0x163)}],async 'validate'(_0x568f6e){const _0x4ddce3=a46_0x5344f0;parseExecParams(_0x568f6e[_0x4ddce3(0x15d)](_0x4ddce3(0x167)));},async 'execute'(_0x2daa2c){const _0x3ef5f8=_0x2daa2c['num']('id'),_0x2dbcee=parseExecParams(_0x2daa2c['str']('params')),_0x36a7f8=await executePersonalBff(_0x3ef5f8,_0x2daa2c['appCode'],_0x2dbcee);return{'ok':!![],'data':{'result':_0x36a7f8},'message':'Executed\x20Personal\x20Backend\x20Function\x20'+_0x3ef5f8};}};function a46_0x22f4(){const _0x59a200=['build','581118lxKKFi','gmtCreate','File\x20not\x20found:\x20','exec','gmtModified','1397889KXvwES','length','body','verbose','appCode','5184746YYastV','detail','read','Personal\x20Backend\x20Function\x20script\x20ID','test','10VavAEd','Optional\x20source\x20RuntimeAgent\x20session\x20id','version','isFile','file','num','1202330acEnyY','name','isArray','flag','source-session-id','Personal\x20Backend\x20Function\x20name,\x20for\x20example\x20loadOrders','createUserId','updateTime','--name\x20must\x20be\x20a\x20valid\x20JavaScript\x20identifier,\x20for\x20example\x20loadOrders.','/client/runtime-bff/personal/create','trim','8kAqEBv','2370819jtuWbS','scriptContent','1416qTkCZe','string','List\x20current\x20user\x27s\x20Personal\x20Backend\x20Function\x20scripts\x20for\x20the\x20current\x20app','keys','Show\x20one\x20Personal\x20Backend\x20Function\x20by\x20id','description','validation','4827rJlruo','根据\x20ID\x20执行Personal\x20Backend\x20Function,并可传入\x20JSON\x20参数','scriptType','1OoILQj','personal-bff','write','bool','Updated\x20Personal\x20Backend\x20Function\x20','str','POST','functionName','把本地脚本保存为Personal\x20Backend\x20Function;之后可在当前应用中调用该脚本。','870222anFabv','/client/runtime-bff/personal/','JSON\x20object\x20passed\x20to\x20the\x20Personal\x20Backend\x20Function\x20execution','File\x20is\x20not\x20a\x20regular\x20file:\x20','执行Personal\x20Backend\x20Function\x20脚本;脚本可能读取或修改业务数据,也可能调用外部服务。','personal-bff\x20update\x20requires\x20at\x20least\x20one\x20of\x20--name,\x20--description,\x20--file,\x20or\x20--source-session-id.','params','Created\x20Personal\x20Backend\x20Function\x20','根据本地脚本文件创建Personal\x20Backend\x20Function','sourceSessionId'];a46_0x22f4=function(){return _0x59a200;};return a46_0x22f4();}export const personalBffDefinitions=[personalBffList,personalBffDetail,personalBffCreate,personalBffUpdate,personalBffExec];
1
+ const a46_0x448f28=a46_0x40f8;(function(_0x3737ba,_0x569349){const _0x5bc5de=a46_0x40f8,_0x24e6f5=_0x3737ba();while(!![]){try{const _0x391b94=parseInt(_0x5bc5de(0x18c))/0x1+parseInt(_0x5bc5de(0x170))/0x2+parseInt(_0x5bc5de(0x19e))/0x3*(parseInt(_0x5bc5de(0x175))/0x4)+parseInt(_0x5bc5de(0x155))/0x5+parseInt(_0x5bc5de(0x157))/0x6*(-parseInt(_0x5bc5de(0x185))/0x7)+-parseInt(_0x5bc5de(0x164))/0x8*(parseInt(_0x5bc5de(0x198))/0x9)+parseInt(_0x5bc5de(0x187))/0xa;if(_0x391b94===_0x569349)break;else _0x24e6f5['push'](_0x24e6f5['shift']());}catch(_0x5f1301){_0x24e6f5['push'](_0x24e6f5['shift']());}}}(a46_0x1dcb,0xcf4ef));function a46_0x40f8(_0x434da7,_0x9a4045){_0x434da7=_0x434da7-0x155;const _0x1dcb66=a46_0x1dcb();let _0x40f8a7=_0x1dcb66[_0x434da7];return _0x40f8a7;}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':a46_0x448f28(0x197),'type':a46_0x448f28(0x17d),'description':a46_0x448f28(0x19a)},FUNCTION_NAME_FLAG={'name':a46_0x448f28(0x167),'type':a46_0x448f28(0x17d),'required':!![],'description':a46_0x448f28(0x178)},DESCRIPTION_FLAG={'name':'description','type':a46_0x448f28(0x17d),'description':a46_0x448f28(0x184)},SOURCE_SESSION_FLAG={'name':a46_0x448f28(0x195),'type':a46_0x448f28(0x17d),'description':a46_0x448f28(0x15e)};function normalizeFunctionName(_0x3aef89){const _0x330a76=a46_0x448f28,_0x34acd9=String(_0x3aef89||'')[_0x330a76(0x174)]();if(!_0x34acd9||!FUNCTION_NAME_PATTERN[_0x330a76(0x199)](_0x34acd9))throw CliErrors[_0x330a76(0x19f)](_0x330a76(0x192));return _0x34acd9;}function readScriptFile(_0x41fcb8){const _0x940301=a46_0x448f28;if(!_0x41fcb8)throw CliErrors[_0x940301(0x19f)](_0x940301(0x16c));if(!existsSync(_0x41fcb8))throw CliErrors[_0x940301(0x19f)](_0x940301(0x16e)+_0x41fcb8);if(!statSync(_0x41fcb8)[_0x940301(0x162)]())throw CliErrors[_0x940301(0x19f)](_0x940301(0x191)+_0x41fcb8);const _0x54c790=readFileSync(_0x41fcb8,_0x940301(0x165));if(!_0x54c790['trim']())throw CliErrors[_0x940301(0x19f)](_0x940301(0x186));return _0x54c790;}function optionalTrimmed(_0x4b7f8c){const _0x528d59=a46_0x448f28,_0x4ea299=String(_0x4b7f8c||'')[_0x528d59(0x174)]();return _0x4ea299||undefined;}function summarizeBff(_0x213ed2){const _0x52378a=a46_0x448f28;return{'id':_0x213ed2['id'],'appCode':_0x213ed2[_0x52378a(0x18e)],'functionName':_0x213ed2[_0x52378a(0x18a)],'description':_0x213ed2[_0x52378a(0x172)],'scriptType':_0x213ed2['scriptType'],'version':_0x213ed2[_0x52378a(0x163)],'gmtModified':_0x213ed2[_0x52378a(0x161)],'updateTime':_0x213ed2[_0x52378a(0x180)]};}function detailBff(_0x5672ab){const _0x3e06a8=a46_0x448f28;return{'id':_0x5672ab['id'],'appCode':_0x5672ab[_0x3e06a8(0x18e)],'functionName':_0x5672ab[_0x3e06a8(0x18a)],'description':_0x5672ab[_0x3e06a8(0x172)],'scriptType':_0x5672ab[_0x3e06a8(0x16a)],'scriptContent':_0x5672ab[_0x3e06a8(0x16b)]??'','config':_0x5672ab[_0x3e06a8(0x173)],'version':_0x5672ab[_0x3e06a8(0x163)],'createUserId':_0x5672ab[_0x3e06a8(0x196)],'gmtCreate':_0x5672ab[_0x3e06a8(0x17c)],'gmtModified':_0x5672ab[_0x3e06a8(0x161)],'createTime':_0x5672ab[_0x3e06a8(0x159)],'updateTime':_0x5672ab['updateTime']};}function buildCreateInput(_0x3bb932){const _0x3ac512=a46_0x448f28;return{'functionName':normalizeFunctionName(_0x3bb932[_0x3ac512(0x15f)]('name')),...optionalTrimmed(_0x3bb932['str']('description'))?{'description':optionalTrimmed(_0x3bb932[_0x3ac512(0x15f)](_0x3ac512(0x172)))}:{},'scriptContent':readScriptFile(_0x3bb932[_0x3ac512(0x15f)](_0x3ac512(0x197))),...optionalTrimmed(_0x3bb932['str']('source-session-id'))?{'sourceSessionId':optionalTrimmed(_0x3bb932['str'](_0x3ac512(0x195)))}:{}};}function buildUpdateInput(_0x478180){const _0x475b38=a46_0x448f28,_0x7b0ca0={};optionalTrimmed(_0x478180[_0x475b38(0x15f)](_0x475b38(0x167)))&&(_0x7b0ca0[_0x475b38(0x18a)]=normalizeFunctionName(_0x478180['str'](_0x475b38(0x167))));_0x478180[_0x475b38(0x15c)](_0x475b38(0x172))!==undefined&&(_0x7b0ca0[_0x475b38(0x172)]=_0x478180[_0x475b38(0x15f)](_0x475b38(0x172)));optionalTrimmed(_0x478180['str'](_0x475b38(0x197)))&&(_0x7b0ca0['scriptContent']=readScriptFile(_0x478180[_0x475b38(0x15f)](_0x475b38(0x197))));_0x478180[_0x475b38(0x15c)](_0x475b38(0x195))!==undefined&&(_0x7b0ca0[_0x475b38(0x190)]=_0x478180[_0x475b38(0x15f)](_0x475b38(0x195)));if(Object[_0x475b38(0x168)](_0x7b0ca0)[_0x475b38(0x16d)]===0x0)throw CliErrors['validation']('personal-bff\x20update\x20requires\x20at\x20least\x20one\x20of\x20--name,\x20--description,\x20--file,\x20or\x20--source-session-id.');return _0x7b0ca0;}function parseExecParams(_0x532064){const _0x1b0c8e=a46_0x448f28,_0x58ed7f=parseJsonParams(_0x532064)??{};if(Array['isArray'](_0x58ed7f))throw CliErrors[_0x1b0c8e(0x19f)](_0x1b0c8e(0x19b));return _0x58ed7f;}const personalBffList={'service':'personal-bff','command':a46_0x448f28(0x15b),'description':a46_0x448f28(0x15d),'risk':a46_0x448f28(0x18b),'flags':[VERBOSE_FLAG],async 'execute'(_0x5d6eb0){const _0x1b844b=a46_0x448f28,_0x3f3735=await listPersonalBffs(_0x5d6eb0[_0x1b844b(0x18e)]);return{'ok':!![],'data':{'total':_0x3f3735[_0x1b844b(0x16d)],'items':_0x5d6eb0[_0x1b844b(0x183)](_0x1b844b(0x177))?_0x3f3735:_0x3f3735['map'](summarizeBff)}};}},personalBffDetail={'service':a46_0x448f28(0x166),'command':a46_0x448f28(0x188),'description':a46_0x448f28(0x19d),'risk':a46_0x448f28(0x18b),'flags':[{...ID_FLAG,'description':'Personal\x20Backend\x20Function\x20script\x20ID'}],async 'execute'(_0x4861e1){const _0x2514b1=a46_0x448f28,_0x427f6=await getPersonalBff(_0x4861e1[_0x2514b1(0x181)]('id'),_0x4861e1['appCode']);return{'ok':!![],'data':detailBff(_0x427f6)};}},personalBffCreate={'service':a46_0x448f28(0x166),'command':a46_0x448f28(0x160),'description':a46_0x448f28(0x179),'risk':'write','confirmationDescription':a46_0x448f28(0x194),'flags':[FUNCTION_NAME_FLAG,{...FILE_FLAG,'required':!![]},DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0xa4613){const _0x28df5e=a46_0x448f28,_0x4d1595=buildCreateInput(_0xa4613),_0x1af41c=await createPersonalBff(_0xa4613[_0x28df5e(0x18e)],_0x4d1595);return{'ok':!![],'data':detailBff(_0x1af41c),'message':_0x28df5e(0x17b)+_0x1af41c['id']+(_0x1af41c[_0x28df5e(0x18a)]?'\x20('+_0x1af41c[_0x28df5e(0x18a)]+')':'')};},async 'dryRun'(_0x5f29f3){const _0x377209=a46_0x448f28,_0x396793=buildCreateInput(_0x5f29f3);return dryRun(_0x377209(0x171),_0x377209(0x18f))['body']({'appCode':_0x5f29f3['appCode'],..._0x396793})[_0x377209(0x172)](_0x377209(0x158)+_0x396793[_0x377209(0x18a)])[_0x377209(0x189)]();}},personalBffUpdate={'service':a46_0x448f28(0x166),'command':a46_0x448f28(0x156),'description':a46_0x448f28(0x17e),'risk':a46_0x448f28(0x15a),'confirmationDescription':a46_0x448f28(0x16f),'flags':[{...ID_FLAG,'description':a46_0x448f28(0x169)},{...FUNCTION_NAME_FLAG,'required':![]},FILE_FLAG,DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x15d547){const _0x4dde3a=a46_0x448f28,_0x4cc66d=_0x15d547[_0x4dde3a(0x181)]('id'),_0xe6537f=buildUpdateInput(_0x15d547),_0x226012=await updatePersonalBff(_0x4cc66d,_0x15d547[_0x4dde3a(0x18e)],_0xe6537f);return{'ok':!![],'data':detailBff(_0x226012),'message':_0x4dde3a(0x19c)+_0x226012['id']+(_0x226012['functionName']?'\x20('+_0x226012[_0x4dde3a(0x18a)]+')':'')};},async 'dryRun'(_0x58ba66){const _0x34b2d7=a46_0x448f28,_0x15d971=_0x58ba66[_0x34b2d7(0x181)]('id'),_0x3ceef2=buildUpdateInput(_0x58ba66);return dryRun(_0x34b2d7(0x171),_0x34b2d7(0x18d)+_0x15d971+'/update')['body']({'appCode':_0x58ba66[_0x34b2d7(0x18e)],..._0x3ceef2})[_0x34b2d7(0x172)]('Preview:\x20update\x20Personal\x20Backend\x20Function\x20'+_0x15d971)[_0x34b2d7(0x189)]();}},personalBffExec={'service':'personal-bff','command':a46_0x448f28(0x17a),'description':'根据\x20ID\x20执行Personal\x20Backend\x20Function,并可传入\x20JSON\x20参数','risk':a46_0x448f28(0x15a),'confirmationDescription':a46_0x448f28(0x193),'flags':[{...ID_FLAG,'description':a46_0x448f28(0x169)},{...PARAMS_FLAG,'description':a46_0x448f28(0x182)}],async 'validate'(_0x120529){const _0x51d1d4=a46_0x448f28;parseExecParams(_0x120529[_0x51d1d4(0x15f)]('params'));},async 'execute'(_0x41e6cc){const _0x12ef76=a46_0x448f28,_0x53d2eb=_0x41e6cc[_0x12ef76(0x181)]('id'),_0x2033c2=parseExecParams(_0x41e6cc[_0x12ef76(0x15f)](_0x12ef76(0x176))),_0x18f5d9=await executePersonalBff(_0x53d2eb,_0x41e6cc['appCode'],_0x2033c2);return{'ok':!![],'data':{'result':_0x18f5d9},'message':_0x12ef76(0x17f)+_0x53d2eb};}};export const personalBffDefinitions=[personalBffList,personalBffDetail,personalBffCreate,personalBffUpdate,personalBffExec];function a46_0x1dcb(){const _0x51b0a1=['keys','Personal\x20Backend\x20Function\x20script\x20ID','scriptType','scriptContent','File\x20path\x20is\x20required.','length','File\x20not\x20found:\x20','更新Personal\x20Backend\x20Function\x20的脚本或元信息;之后的调用将使用新版本。','1334194fasWus','POST','description','config','trim','144DOgSgx','params','verbose','Personal\x20Backend\x20Function\x20name,\x20for\x20example\x20loadOrders','根据本地脚本文件创建Personal\x20Backend\x20Function','exec','Created\x20Personal\x20Backend\x20Function\x20','gmtCreate','string','根据\x20ID\x20更新Personal\x20Backend\x20Function','Executed\x20Personal\x20Backend\x20Function\x20','updateTime','num','JSON\x20object\x20passed\x20to\x20the\x20Personal\x20Backend\x20Function\x20execution','bool','Personal\x20Backend\x20Function\x20description','4249UXkgPw','Personal\x20Backend\x20Function\x20script\x20file\x20is\x20blank.','2093810RHRVPi','detail','build','functionName','read','1389489QJJgIe','/client/runtime-bff/personal/','appCode','/client/runtime-bff/personal/create','sourceSessionId','File\x20is\x20not\x20a\x20regular\x20file:\x20','--name\x20must\x20be\x20a\x20valid\x20JavaScript\x20identifier,\x20for\x20example\x20loadOrders.','执行Personal\x20Backend\x20Function\x20脚本;脚本可能读取或修改业务数据,也可能调用外部服务。','把本地脚本保存为Personal\x20Backend\x20Function;之后可在当前应用中调用该脚本。','source-session-id','createUserId','file','9PzttMI','test','Path\x20to\x20a\x20local\x20UTF-8\x20JavaScript\x20or\x20TypeScript\x20file','--params\x20must\x20be\x20a\x20JSON\x20object.','Updated\x20Personal\x20Backend\x20Function\x20','Show\x20one\x20Personal\x20Backend\x20Function\x20by\x20id','14793cKzZYJ','validation','4473615jggFqj','update','11280VgehQF','Preview:\x20create\x20Personal\x20Backend\x20Function\x20','createTime','write','list','flag','List\x20current\x20user\x27s\x20Personal\x20Backend\x20Function\x20scripts\x20for\x20the\x20current\x20app','Optional\x20source\x20RuntimeAgent\x20session\x20id','str','create','gmtModified','isFile','version','10783288wCHbHf','utf8','personal-bff','name'];a46_0x1dcb=function(){return _0x51b0a1;};return a46_0x1dcb();}
@@ -1 +1 @@
1
- const a47_0x5c5965=a47_0x5df6;(function(_0x94c79e,_0xe82ea5){const _0x1fe5c3=a47_0x5df6,_0x180671=_0x94c79e();while(!![]){try{const _0x53e652=-parseInt(_0x1fe5c3(0x1bc))/0x1*(-parseInt(_0x1fe5c3(0x1c6))/0x2)+parseInt(_0x1fe5c3(0x1a9))/0x3+parseInt(_0x1fe5c3(0x1a6))/0x4+-parseInt(_0x1fe5c3(0x1a2))/0x5+parseInt(_0x1fe5c3(0x1d8))/0x6+parseInt(_0x1fe5c3(0x1b2))/0x7*(parseInt(_0x1fe5c3(0x1ca))/0x8)+-parseInt(_0x1fe5c3(0x1d1))/0x9;if(_0x53e652===_0xe82ea5)break;else _0x180671['push'](_0x180671['shift']());}catch(_0x34cec7){_0x180671['push'](_0x180671['shift']());}}}(a47_0x5efe,0x327b6));import{authDefinitions}from'../commands/auth/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{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';function a47_0x5df6(_0x4dbc8e,_0x1903f1){_0x4dbc8e=_0x4dbc8e-0x1a0;const _0x5efe58=a47_0x5efe();let _0x5df6c6=_0x5efe58[_0x4dbc8e];return _0x5df6c6;}export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x3cdc43){const _0x32c50b=a47_0x5df6;for(const _0x269897 of _0x3cdc43){definitions['set'](_0x269897['service']+':'+_0x269897[_0x32c50b(0x1d3)],_0x269897);let _0x1a5e1e=serviceGroups[_0x32c50b(0x1c8)](_0x269897[_0x32c50b(0x1d7)]);!_0x1a5e1e&&(_0x1a5e1e=[],serviceGroups[_0x32c50b(0x1af)](_0x269897[_0x32c50b(0x1d7)],_0x1a5e1e)),_0x1a5e1e[_0x32c50b(0x1c2)](_0x269897);}}function registerService(_0x5bf7ce,_0x13460f,_0x3ff29f){const _0x62ed84=a47_0x5df6;registerDefinitions(_0x13460f);const _0x4a641c=_0x2f2171=>_0x2f2171==='read'?'':_0x2f2171===_0x62ed84(0x1b3)?_0x62ed84(0x1bd):_0x62ed84(0x1d9),_0x34c2de={'service':_0x13460f[0x0][_0x62ed84(0x1d7)],'label':_0x5bf7ce,'commands':_0x13460f[_0x62ed84(0x1ce)](_0x4f343c=>({'command':_0x4f343c[_0x62ed84(0x1d3)],'description':_0x4f343c['description'],'tag':_0x4a641c(_0x4f343c[_0x62ed84(0x1a7)])})),'defaultCommand':_0x3ff29f?.[_0x62ed84(0x1a0)]??(_0x3ff29f?.[_0x62ed84(0x1a3)]?_0x13460f[0x0]['command']:undefined),'isSingleCommand':_0x3ff29f?.[_0x62ed84(0x1a3)]};serviceRegistry[_0x62ed84(0x1c2)](_0x34c2de),serviceByName[_0x62ed84(0x1af)](_0x34c2de['service'],_0x34c2de);}registerService(a47_0x5c5965(0x1a4),authDefinitions,{'defaultCommand':a47_0x5c5965(0x1d0)}),registerService('User\x20Accounts',userAccountDefinitions),registerService('App\x20Management',appDefinitions,{'defaultCommand':a47_0x5c5965(0x1b0)}),registerService(a47_0x5c5965(0x1da),workspaceDefinitions),registerService(a47_0x5c5965(0x1b6),appConfigDefinitions),registerService(a47_0x5c5965(0x1c1),configDefinitions,{'defaultCommand':a47_0x5c5965(0x1b0)}),registerService(a47_0x5c5965(0x1cc),roleDefinitions,{'defaultCommand':a47_0x5c5965(0x1b0)}),registerService(a47_0x5c5965(0x1cd),permitDefinitions),registerService(a47_0x5c5965(0x1c9),apiDocDefinitions),registerService('Datasets',datasetDefinitions),registerService(a47_0x5c5965(0x1b9),dataDefinitions),registerService(a47_0x5c5965(0x1ba),sqlDefinitions),registerService('Backend\x20Function\x20Scripts',bffDefinitions),registerService(a47_0x5c5965(0x1b7),personalBffDefinitions),registerService(a47_0x5c5965(0x1be),artifactDefinitions),registerService(a47_0x5c5965(0x1cb),fileDefinitions),registerService(a47_0x5c5965(0x1a1),ocrDefinitions),registerService('Knowledge\x20Base',kbDefinitions),registerService(a47_0x5c5965(0x1a5),notificationDefinitions,{'defaultCommand':a47_0x5c5965(0x1bf)}),registerService('Agent\x20Schedules',scheduleDefinitions,{'defaultCommand':a47_0x5c5965(0x1b0)}),registerService('Service\x20Tree',serviceDefinitions,{'defaultCommand':'list'}),registerService(a47_0x5c5965(0x1c4),skillDefinitions,{'defaultCommand':a47_0x5c5965(0x1d4)}),registerService('CLI\x20Built-in\x20Skill',cliSkillDefinitions,{'defaultCommand':'install'}),registerService(a47_0x5c5965(0x1d5),[updateDefinition],{'defaultCommand':a47_0x5c5965(0x1ad),'isSingleCommand':!![]}),registerService(a47_0x5c5965(0x1ab),[doctorDefinition],{'isSingleCommand':!![]}),registerService(a47_0x5c5965(0x1d2),[schemaDefinition],{'isSingleCommand':!![]}),registerService(a47_0x5c5965(0x1aa),logsDefinitions,{'defaultCommand':a47_0x5c5965(0x1ae)});export function findDefinition(_0x45ad10,_0x135cbd){const _0x191c69=a47_0x5c5965;return definitions[_0x191c69(0x1c8)](_0x45ad10+':'+_0x135cbd);}export function resolveRemovedCommand(_0x3567d4,_0x56a2fd){const _0x1789b1=a47_0x5c5965;if(_0x3567d4==='app'&&_0x56a2fd===_0x1789b1(0x1d6))return{'command':_0x1789b1(0x1a8),'message':_0x1789b1(0x1b5),'hint':_0x1789b1(0x1cf)};if(_0x3567d4===_0x1789b1(0x1c3)&&_0x56a2fd===_0x1789b1(0x1b1))return{'command':_0x1789b1(0x1c0),'message':_0x1789b1(0x1b4),'hint':'Use\x20`lovrabet\x20workspace\x20use\x20--app\x20<name>`\x20instead.'};if(_0x3567d4==='logs'&&_0x56a2fd===_0x1789b1(0x1ac))return{'command':_0x1789b1(0x1c7),'message':_0x1789b1(0x1db),'hint':_0x1789b1(0x1c5)};return undefined;}function a47_0x5efe(){const _0x1f74d8=['app','Skills','Use\x20`lovrabet\x20logs\x20show`\x20to\x20view\x20command\x20history.','2aOlGwu','logs\x20clear','get','API\x20Documentation','8hElfGF','File','Runtime\x20Roles','Runtime\x20Permissions','map','Use\x20`lovrabet\x20workspace\x20init\x20--appcode\x20<code>`\x20instead.','login','765036adIZOS','Schema','command','install','Self\x20Update','init','service','1932774SPhpXT','\x20\x20[high-risk-write]','Workspace','`lovrabet\x20logs\x20clear`\x20has\x20been\x20removed.','defaultCommand','OCR','1524470jVdUjO','isSingleCommand','Authentication','Notification\x20Configs','656480ZWwqDd','risk','app\x20init','209871eucteJ','Logs','Diagnostics','clear','run','show','set','list','use','272034JmvtbZ','write','`lovrabet\x20app\x20use`\x20has\x20been\x20removed.','`lovrabet\x20app\x20init`\x20has\x20been\x20removed.','Runtime\x20App\x20Config','Personal\x20Backend\x20Function','values','Instant\x20API','SQL\x20Queries','has','1604fmgAkb','\x20\x20[write]','Artifacts','config-list','app\x20use','Configuration','push'];a47_0x5efe=function(){return _0x1f74d8;};return a47_0x5efe();}export function isKnownService(_0x1f3e17){const _0x4a319b=a47_0x5c5965;return serviceByName[_0x4a319b(0x1bb)](_0x1f3e17);}export function getServiceEntry(_0x585f07){const _0x5859cb=a47_0x5c5965;return serviceByName[_0x5859cb(0x1c8)](_0x585f07);}export function getAllDefinitions(){const _0x57d3a7=a47_0x5c5965;return Array['from'](definitions[_0x57d3a7(0x1b8)]());}
1
+ const a47_0x2261bf=a47_0x8534;(function(_0x1a4303,_0x5b2ff8){const _0x51df6e=a47_0x8534,_0x5823ba=_0x1a4303();while(!![]){try{const _0x3a633a=-parseInt(_0x51df6e(0x223))/0x1*(parseInt(_0x51df6e(0x22a))/0x2)+parseInt(_0x51df6e(0x1fa))/0x3*(-parseInt(_0x51df6e(0x1fd))/0x4)+parseInt(_0x51df6e(0x207))/0x5+parseInt(_0x51df6e(0x1f1))/0x6+parseInt(_0x51df6e(0x201))/0x7*(-parseInt(_0x51df6e(0x1ee))/0x8)+-parseInt(_0x51df6e(0x21f))/0x9*(parseInt(_0x51df6e(0x1f6))/0xa)+-parseInt(_0x51df6e(0x203))/0xb*(-parseInt(_0x51df6e(0x22c))/0xc);if(_0x3a633a===_0x5b2ff8)break;else _0x5823ba['push'](_0x5823ba['shift']());}catch(_0x26f40d){_0x5823ba['push'](_0x5823ba['shift']());}}}(a47_0x2c90,0xc088d));import{authDefinitions}from'../commands/auth/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{userAccountDefinitions}from'../commands/user-account/index.js';function a47_0x8534(_0x33a05a,_0x3f1d7b){_0x33a05a=_0x33a05a-0x1ee;const _0x2c9040=a47_0x2c90();let _0x85348d=_0x2c9040[_0x33a05a];return _0x85348d;}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();function a47_0x2c90(){const _0x3f3805=['read','12tZoSaF','logs\x20clear','8ZyxjGb','Runtime\x20Roles','values','4340652CqLeMN','write','`lovrabet\x20app\x20use`\x20has\x20been\x20removed.','User\x20Accounts','\x20\x20[write]','803630OgJMkx','push','app','defaultCommand','3462234leFtiC','API\x20Documentation','Use\x20`lovrabet\x20logs\x20show`\x20to\x20view\x20command\x20history.','4AZVSko','Datasets','set','command','2612106siOdAc','install','4316257UqASAT','Notification\x20Configs','description','init','7303180xCZoqN','CLI\x20Built-in\x20Skill','Self\x20Update','service','Instant\x20API','`lovrabet\x20logs\x20clear`\x20has\x20been\x20removed.','show','Backend\x20Function\x20Scripts','App\x20Management','\x20\x20[high-risk-write]','risk','File','login','Agent\x20Schedules','Runtime\x20Permissions','config-list','Workspace','isSingleCommand','Artifacts','get','Diagnostics','app\x20use','Use\x20`lovrabet\x20workspace\x20init\x20--appcode\x20<code>`\x20instead.','has','9kLpjSP','Logs','Runtime\x20App\x20Config','app\x20init','13865yFrrNw','Use\x20`lovrabet\x20workspace\x20use\x20--app\x20<name>`\x20instead.','from','list','Personal\x20Backend\x20Function','Knowledge\x20Base','use','26cDlKAg'];a47_0x2c90=function(){return _0x3f3805;};return a47_0x2c90();}export const serviceGroups=new Map();function registerDefinitions(_0x4da594){const _0x2def4a=a47_0x8534;for(const _0x12b87a of _0x4da594){definitions[_0x2def4a(0x1ff)](_0x12b87a['service']+':'+_0x12b87a['command'],_0x12b87a);let _0x1b1963=serviceGroups[_0x2def4a(0x21a)](_0x12b87a[_0x2def4a(0x20a)]);!_0x1b1963&&(_0x1b1963=[],serviceGroups['set'](_0x12b87a[_0x2def4a(0x20a)],_0x1b1963)),_0x1b1963[_0x2def4a(0x1f7)](_0x12b87a);}}function registerService(_0x56e36f,_0x60a597,_0x12de46){const _0x2888e6=a47_0x8534;registerDefinitions(_0x60a597);const _0x39c525=_0x19c847=>_0x19c847===_0x2888e6(0x22b)?'':_0x19c847===_0x2888e6(0x1f2)?_0x2888e6(0x1f5):_0x2888e6(0x210),_0x259de3={'service':_0x60a597[0x0]['service'],'label':_0x56e36f,'commands':_0x60a597['map'](_0x4fd7b2=>({'command':_0x4fd7b2[_0x2888e6(0x200)],'description':_0x4fd7b2[_0x2888e6(0x205)],'tag':_0x39c525(_0x4fd7b2[_0x2888e6(0x211)])})),'defaultCommand':_0x12de46?.[_0x2888e6(0x1f9)]??(_0x12de46?.['isSingleCommand']?_0x60a597[0x0][_0x2888e6(0x200)]:undefined),'isSingleCommand':_0x12de46?.[_0x2888e6(0x218)]};serviceRegistry[_0x2888e6(0x1f7)](_0x259de3),serviceByName[_0x2888e6(0x1ff)](_0x259de3[_0x2888e6(0x20a)],_0x259de3);}registerService('Authentication',authDefinitions,{'defaultCommand':a47_0x2261bf(0x213)}),registerService(a47_0x2261bf(0x1f4),userAccountDefinitions),registerService(a47_0x2261bf(0x20f),appDefinitions,{'defaultCommand':a47_0x2261bf(0x226)}),registerService(a47_0x2261bf(0x217),workspaceDefinitions),registerService(a47_0x2261bf(0x221),appConfigDefinitions),registerService('Configuration',configDefinitions,{'defaultCommand':a47_0x2261bf(0x226)}),registerService(a47_0x2261bf(0x1ef),roleDefinitions,{'defaultCommand':a47_0x2261bf(0x226)}),registerService(a47_0x2261bf(0x215),permitDefinitions),registerService(a47_0x2261bf(0x1fb),apiDocDefinitions),registerService(a47_0x2261bf(0x1fe),datasetDefinitions),registerService(a47_0x2261bf(0x20b),dataDefinitions),registerService('SQL\x20Queries',sqlDefinitions),registerService(a47_0x2261bf(0x20e),bffDefinitions),registerService(a47_0x2261bf(0x227),personalBffDefinitions),registerService(a47_0x2261bf(0x219),artifactDefinitions),registerService(a47_0x2261bf(0x212),fileDefinitions),registerService('OCR',ocrDefinitions),registerService(a47_0x2261bf(0x228),kbDefinitions),registerService(a47_0x2261bf(0x204),notificationDefinitions,{'defaultCommand':a47_0x2261bf(0x216)}),registerService(a47_0x2261bf(0x214),scheduleDefinitions,{'defaultCommand':'list'}),registerService('Service\x20Tree',serviceDefinitions,{'defaultCommand':a47_0x2261bf(0x226)}),registerService('Skills',skillDefinitions,{'defaultCommand':a47_0x2261bf(0x202)}),registerService(a47_0x2261bf(0x208),cliSkillDefinitions,{'defaultCommand':'install'}),registerService(a47_0x2261bf(0x209),[updateDefinition],{'defaultCommand':'run','isSingleCommand':!![]}),registerService(a47_0x2261bf(0x21b),[doctorDefinition],{'isSingleCommand':!![]}),registerService('Schema',[schemaDefinition],{'isSingleCommand':!![]}),registerService(a47_0x2261bf(0x220),logsDefinitions,{'defaultCommand':a47_0x2261bf(0x20d)});export function findDefinition(_0xd58ab1,_0xb0c2fb){const _0x4f01db=a47_0x2261bf;return definitions[_0x4f01db(0x21a)](_0xd58ab1+':'+_0xb0c2fb);}export function resolveRemovedCommand(_0x3544eb,_0x2ab679){const _0x57077f=a47_0x2261bf;if(_0x3544eb===_0x57077f(0x1f8)&&_0x2ab679===_0x57077f(0x206))return{'command':_0x57077f(0x222),'message':'`lovrabet\x20app\x20init`\x20has\x20been\x20removed.','hint':_0x57077f(0x21d)};if(_0x3544eb===_0x57077f(0x1f8)&&_0x2ab679===_0x57077f(0x229))return{'command':_0x57077f(0x21c),'message':_0x57077f(0x1f3),'hint':_0x57077f(0x224)};if(_0x3544eb==='logs'&&_0x2ab679==='clear')return{'command':_0x57077f(0x22d),'message':_0x57077f(0x20c),'hint':_0x57077f(0x1fc)};return undefined;}export function isKnownService(_0x7b2e5e){const _0x1bf0a1=a47_0x2261bf;return serviceByName[_0x1bf0a1(0x21e)](_0x7b2e5e);}export function getServiceEntry(_0x46c558){const _0x29c97d=a47_0x2261bf;return serviceByName[_0x29c97d(0x21a)](_0x46c558);}export function getAllDefinitions(){const _0x5d727e=a47_0x2261bf;return Array[_0x5d727e(0x225)](definitions[_0x5d727e(0x1f0)]());}
@@ -1 +1 @@
1
- const a48_0x279157=a48_0x409c;(function(_0x28a655,_0x556d4d){const _0x30d5a6=a48_0x409c,_0x19f15c=_0x28a655();while(!![]){try{const _0x5063e1=parseInt(_0x30d5a6(0x18d))/0x1+-parseInt(_0x30d5a6(0x1a0))/0x2+-parseInt(_0x30d5a6(0x1a5))/0x3+-parseInt(_0x30d5a6(0x190))/0x4*(-parseInt(_0x30d5a6(0x18e))/0x5)+parseInt(_0x30d5a6(0x194))/0x6+-parseInt(_0x30d5a6(0x18b))/0x7*(parseInt(_0x30d5a6(0x19a))/0x8)+parseInt(_0x30d5a6(0x18a))/0x9*(-parseInt(_0x30d5a6(0x192))/0xa);if(_0x5063e1===_0x556d4d)break;else _0x19f15c['push'](_0x19f15c['shift']());}catch(_0x5dbba9){_0x19f15c['push'](_0x19f15c['shift']());}}}(a48_0x12a4,0xbd289));import{createRuntimeAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';import{projectRuntimeRole,runtimeRoleWriteResult}from'../../commands/role/shared.js';function input(_0x199cc6){const _0x159378=a48_0x409c,_0x15c5a0=_0x199cc6[_0x159378(0x19e)](_0x159378(0x197))[_0x159378(0x1a4)]();if(!_0x15c5a0)throw CliErrors[_0x159378(0x189)](_0x159378(0x196));const _0xb66c8d=_0x199cc6[_0x159378(0x19e)](_0x159378(0x19d))['trim']();return{'appCode':_0x199cc6[_0x159378(0x19b)],'roleName':_0x15c5a0,..._0xb66c8d?{'remark':_0xb66c8d}:{}};}function a48_0x409c(_0x4df7a7,_0x1992ad){_0x4df7a7=_0x4df7a7-0x189;const _0x12a417=a48_0x12a4();let _0x409c38=_0x12a417[_0x4df7a7];return _0x409c38;}export const roleCreate={'service':a48_0x279157(0x18c),'command':a48_0x279157(0x1a1),'description':'Create\x20a\x20runtime\x20CUSTOM\x20role','risk':a48_0x279157(0x19f),'confirmationDescription':a48_0x279157(0x199),'flags':[{'name':a48_0x279157(0x197),'type':a48_0x279157(0x195),'required':!![],'description':a48_0x279157(0x193)},{'name':'remark','type':a48_0x279157(0x195),'description':a48_0x279157(0x1a3)}],async 'validate'(_0x577ea8){input(_0x577ea8);},async 'dryRun'(_0x2b404b){const _0x314d23=a48_0x279157;return dryRun(_0x314d23(0x18f),_0x314d23(0x1a2))[_0x314d23(0x191)]({'roleType':'CUSTOM',...input(_0x2b404b)})['description'](_0x314d23(0x19c))[_0x314d23(0x198)]();},async 'execute'(_0x1f9c0f){const _0x562ea9=a48_0x279157,_0x2a6361=await createRuntimeAppRole(input(_0x1f9c0f));return{'ok':!![],'data':runtimeRoleWriteResult(_0x562ea9(0x1a1),{'roleId':_0x2a6361['id']},null,projectRuntimeRole(_0x2a6361),{'method':'POST','path':_0x562ea9(0x1a2)})};}};function a48_0x12a4(){const _0x28a8a9=['88593NgIMIg','validation','36HecQGy','48587poJCAA','role','1338115xdCFcK','6320760GhElZD','POST','4seAOSH','body','1371910JGjRCr','Role\x20name','4595286odLrVn','string','--name\x20must\x20not\x20be\x20blank.','name','build','在当前运行应用中创建一个自定义角色;创建后可用于成员与资源权限配置。','632IQIOOM','appCode','Preview:\x20create\x20a\x20runtime\x20CUSTOM\x20role','remark','str','high-risk-write','2933442YKPmAs','create','/client/permit/role/create','Optional\x20role\x20remark','trim'];a48_0x12a4=function(){return _0x28a8a9;};return a48_0x12a4();}
1
+ const a48_0x3d642e=a48_0x471f;(function(_0x398dd7,_0x4f763e){const _0x1451e6=a48_0x471f,_0x514514=_0x398dd7();while(!![]){try{const _0xbb313e=parseInt(_0x1451e6(0x144))/0x1*(parseInt(_0x1451e6(0x13a))/0x2)+-parseInt(_0x1451e6(0x13b))/0x3+parseInt(_0x1451e6(0x13d))/0x4+parseInt(_0x1451e6(0x148))/0x5*(parseInt(_0x1451e6(0x154))/0x6)+parseInt(_0x1451e6(0x13e))/0x7*(-parseInt(_0x1451e6(0x155))/0x8)+parseInt(_0x1451e6(0x14b))/0x9*(-parseInt(_0x1451e6(0x142))/0xa)+parseInt(_0x1451e6(0x146))/0xb;if(_0xbb313e===_0x4f763e)break;else _0x514514['push'](_0x514514['shift']());}catch(_0x2b5383){_0x514514['push'](_0x514514['shift']());}}}(a48_0x3e0a,0x2b5f1));function a48_0x3e0a(){const _0x463ad3=['CUSTOM','Create\x20a\x20runtime\x20CUSTOM\x20role','5787IMdqHh','Role\x20name','POST','role','body','remark','string','--name\x20must\x20not\x20be\x20blank.','Preview:\x20create\x20a\x20runtime\x20CUSTOM\x20role','110178CYdHhv','9640pqAbOl','appCode','trim','build','874aPDOZp','765936EAhMnD','validation','772188InYTAo','1967TqDqSv','name','Optional\x20role\x20remark','create','1580ZbIIiw','high-risk-write','275EkIFuI','description','5149353AibzpX','/client/permit/role/create','25xiUwGd'];a48_0x3e0a=function(){return _0x463ad3;};return a48_0x3e0a();}function a48_0x471f(_0x49e9b4,_0x38d80c){_0x49e9b4=_0x49e9b4-0x13a;const _0x3e0a07=a48_0x3e0a();let _0x471ffa=_0x3e0a07[_0x49e9b4];return _0x471ffa;}import{createRuntimeAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';import{projectRuntimeRole,runtimeRoleWriteResult}from'../../commands/role/shared.js';function input(_0x52a0c8){const _0x49fd25=a48_0x471f,_0x33e08e=_0x52a0c8['str']('name')[_0x49fd25(0x157)]();if(!_0x33e08e)throw CliErrors[_0x49fd25(0x13c)](_0x49fd25(0x152));const _0x5d561c=_0x52a0c8['str']('remark')[_0x49fd25(0x157)]();return{'appCode':_0x52a0c8[_0x49fd25(0x156)],'roleName':_0x33e08e,..._0x5d561c?{'remark':_0x5d561c}:{}};}export const roleCreate={'service':a48_0x3d642e(0x14e),'command':a48_0x3d642e(0x141),'description':a48_0x3d642e(0x14a),'risk':a48_0x3d642e(0x143),'confirmationDescription':'在当前运行应用中创建一个自定义角色;创建后可用于成员与资源权限配置。','flags':[{'name':a48_0x3d642e(0x13f),'type':a48_0x3d642e(0x151),'required':!![],'description':a48_0x3d642e(0x14c)},{'name':a48_0x3d642e(0x150),'type':'string','description':a48_0x3d642e(0x140)}],async 'validate'(_0x392f02){input(_0x392f02);},async 'dryRun'(_0x1c8ede){const _0x4e7ece=a48_0x3d642e;return dryRun(_0x4e7ece(0x14d),_0x4e7ece(0x147))[_0x4e7ece(0x14f)]({'roleType':_0x4e7ece(0x149),...input(_0x1c8ede)})[_0x4e7ece(0x145)](_0x4e7ece(0x153))[_0x4e7ece(0x158)]();},async 'execute'(_0x45b4b1){const _0x2ba4af=a48_0x3d642e,_0x1d15e6=await createRuntimeAppRole(input(_0x45b4b1));return{'ok':!![],'data':runtimeRoleWriteResult('create',{'roleId':_0x1d15e6['id']},null,projectRuntimeRole(_0x1d15e6),{'method':_0x2ba4af(0x14d),'path':_0x2ba4af(0x147)})};}};
@@ -1 +1 @@
1
- const a49_0x1bef3b=a49_0x271b;function a49_0x271b(_0x314a90,_0x2aed65){_0x314a90=_0x314a90-0xc1;const _0x23a77f=a49_0x23a7();let _0x271b50=_0x23a77f[_0x314a90];return _0x271b50;}(function(_0x1657a7,_0x2e421b){const _0x1402a7=a49_0x271b,_0xec672d=_0x1657a7();while(!![]){try{const _0x57a321=parseInt(_0x1402a7(0xd4))/0x1*(parseInt(_0x1402a7(0xd3))/0x2)+parseInt(_0x1402a7(0xc1))/0x3*(-parseInt(_0x1402a7(0xc8))/0x4)+-parseInt(_0x1402a7(0xd5))/0x5*(-parseInt(_0x1402a7(0xcd))/0x6)+parseInt(_0x1402a7(0xd0))/0x7*(-parseInt(_0x1402a7(0xca))/0x8)+-parseInt(_0x1402a7(0xcf))/0x9*(-parseInt(_0x1402a7(0xc5))/0xa)+-parseInt(_0x1402a7(0xc4))/0xb*(parseInt(_0x1402a7(0xcc))/0xc)+parseInt(_0x1402a7(0xc7))/0xd;if(_0x57a321===_0x2e421b)break;else _0xec672d['push'](_0xec672d['shift']());}catch(_0x3968b0){_0xec672d['push'](_0xec672d['shift']());}}}(a49_0x23a7,0xaeb4c));import{deleteRuntimeAppRole}from'../../core/api-client.js';function a49_0x23a7(){const _0x55aae6=['description','9wSgreG','4256ckWaCG','appCode','num','2htHomE','494257tlKAKl','1820505pmdXzZ','delete','Preview:\x20delete\x20a\x20runtime\x20CUSTOM\x20role','145653AHDMjE','role','build','22YilUpD','12159010IXHKgw','body','15400593vqkYxb','68ZbYiqP','high-risk-write','10688lRETAs','/client/permit/role/delete','7618620MPOjWw','12kKGSIg'];a49_0x23a7=function(){return _0x55aae6;};return a49_0x23a7();}import{dryRun}from'../../framework/dryrun.js';import{assertCustomRuntimeRole,getRuntimeRoleById,projectRuntimeRole,ROLE_ID_FLAG,runtimeRoleWriteResult}from'../../commands/role/shared.js';async function prepare(_0x452a1b){const _0x4ce90f=a49_0x271b,_0x4fc92e=await getRuntimeRoleById(_0x452a1b[_0x4ce90f(0xd1)],_0x452a1b[_0x4ce90f(0xd2)]('id'));return assertCustomRuntimeRole(_0x4fc92e,_0x4ce90f(0xd6)),_0x4fc92e;}export const roleDelete={'service':a49_0x1bef3b(0xc2),'command':a49_0x1bef3b(0xd6),'description':'Delete\x20a\x20runtime\x20CUSTOM\x20role','risk':a49_0x1bef3b(0xc9),'confirmationDescription':'删除当前运行应用中的自定义角色;该角色的成员关系和权限配置可能随之失效。','flags':[ROLE_ID_FLAG],async 'dryRun'(_0x28008e){const _0x380a00=a49_0x1bef3b,_0x195de8=await prepare(_0x28008e);return dryRun('POST',_0x380a00(0xcb))[_0x380a00(0xc6)]({'id':_0x195de8['id']})[_0x380a00(0xce)](_0x380a00(0xd7))[_0x380a00(0xc3)]();},async 'execute'(_0x4ed42b){const _0xb8fbfa=await prepare(_0x4ed42b);return await deleteRuntimeAppRole(_0xb8fbfa['id']),{'ok':!![],'data':runtimeRoleWriteResult('delete',{'roleId':_0xb8fbfa['id']},projectRuntimeRole(_0xb8fbfa),null,{'method':'POST','path':'/client/permit/role/delete'})};}};
1
+ const a49_0x5539cf=a49_0x2b3e;(function(_0x3261e9,_0xc20174){const _0x12b401=a49_0x2b3e,_0x5ab33a=_0x3261e9();while(!![]){try{const _0x468640=parseInt(_0x12b401(0x1f1))/0x1*(parseInt(_0x12b401(0x1f3))/0x2)+-parseInt(_0x12b401(0x1f7))/0x3*(parseInt(_0x12b401(0x1f5))/0x4)+parseInt(_0x12b401(0x1e7))/0x5*(-parseInt(_0x12b401(0x1e3))/0x6)+parseInt(_0x12b401(0x1e6))/0x7+-parseInt(_0x12b401(0x1ed))/0x8+-parseInt(_0x12b401(0x1eb))/0x9+parseInt(_0x12b401(0x1e4))/0xa;if(_0x468640===_0xc20174)break;else _0x5ab33a['push'](_0x5ab33a['shift']());}catch(_0x320f73){_0x5ab33a['push'](_0x5ab33a['shift']());}}}(a49_0x4b87,0x72842));function a49_0x4b87(){const _0x438bd8=['/client/permit/role/delete','164414NXBoeV','Preview:\x20delete\x20a\x20runtime\x20CUSTOM\x20role','8GOMpoE','role','764406hCKWcU','78LDtcKZ','19458650NJWNJW','appCode','428750jtNqcX','57370HNIOWO','body','delete','description','6875910tuLVAJ','build','4868344mQDWwU','删除当前运行应用中的自定义角色;该角色的成员关系和权限配置可能随之失效。','Delete\x20a\x20runtime\x20CUSTOM\x20role','high-risk-write','6dUWaNa'];a49_0x4b87=function(){return _0x438bd8;};return a49_0x4b87();}import{deleteRuntimeAppRole}from'../../core/api-client.js';import{dryRun}from'../../framework/dryrun.js';import{assertCustomRuntimeRole,getRuntimeRoleById,projectRuntimeRole,ROLE_ID_FLAG,runtimeRoleWriteResult}from'../../commands/role/shared.js';async function prepare(_0x582a74){const _0x570d8f=a49_0x2b3e,_0x31c749=await getRuntimeRoleById(_0x582a74[_0x570d8f(0x1e5)],_0x582a74['num']('id'));return assertCustomRuntimeRole(_0x31c749,_0x570d8f(0x1e9)),_0x31c749;}function a49_0x2b3e(_0x2f6efb,_0xd76b49){_0x2f6efb=_0x2f6efb-0x1e3;const _0x4b87a4=a49_0x4b87();let _0x2b3e1e=_0x4b87a4[_0x2f6efb];return _0x2b3e1e;}export const roleDelete={'service':a49_0x5539cf(0x1f6),'command':a49_0x5539cf(0x1e9),'description':a49_0x5539cf(0x1ef),'risk':a49_0x5539cf(0x1f0),'confirmationDescription':a49_0x5539cf(0x1ee),'flags':[ROLE_ID_FLAG],async 'dryRun'(_0x29a585){const _0x2ae034=a49_0x5539cf,_0x4a730a=await prepare(_0x29a585);return dryRun('POST','/client/permit/role/delete')[_0x2ae034(0x1e8)]({'id':_0x4a730a['id']})[_0x2ae034(0x1ea)](_0x2ae034(0x1f4))[_0x2ae034(0x1ec)]();},async 'execute'(_0x2a4090){const _0x2dabd5=a49_0x5539cf,_0xcfa8b6=await prepare(_0x2a4090);return await deleteRuntimeAppRole(_0xcfa8b6['id']),{'ok':!![],'data':runtimeRoleWriteResult(_0x2dabd5(0x1e9),{'roleId':_0xcfa8b6['id']},projectRuntimeRole(_0xcfa8b6),null,{'method':'POST','path':_0x2dabd5(0x1f2)})};}};
@@ -1 +1 @@
1
- function a50_0x5929(){const _0x13ff4c=['114376jCxqJy','6CdhuyZ','role','num','appCode','2755616bCWxpe','9149454ncGBVw','2840870ZYsXQJ','3yVEckf','runtime','1294080bGLAWW','3598063jVHEsr','read','610124nYxqqN'];a50_0x5929=function(){return _0x13ff4c;};return a50_0x5929();}const a50_0x2eba65=a50_0x2350;function a50_0x2350(_0x53773c,_0x5ecd30){_0x53773c=_0x53773c-0x1d0;const _0x5929eb=a50_0x5929();let _0x23503a=_0x5929eb[_0x53773c];return _0x23503a;}(function(_0x4fcdef,_0x2493ea){const _0xc40c17=a50_0x2350,_0x274674=_0x4fcdef();while(!![]){try{const _0x3c1af5=-parseInt(_0xc40c17(0x1db))/0x1+parseInt(_0xc40c17(0x1d8))/0x2+parseInt(_0xc40c17(0x1d6))/0x3*(-parseInt(_0xc40c17(0x1d3))/0x4)+parseInt(_0xc40c17(0x1d5))/0x5+-parseInt(_0xc40c17(0x1dd))/0x6*(parseInt(_0xc40c17(0x1d9))/0x7)+parseInt(_0xc40c17(0x1dc))/0x8+parseInt(_0xc40c17(0x1d4))/0x9;if(_0x3c1af5===_0x2493ea)break;else _0x274674['push'](_0x274674['shift']());}catch(_0x10955f){_0x274674['push'](_0x274674['shift']());}}}(a50_0x5929,0x69bb8));import{getRuntimeRoleById,projectRuntimeRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';export const roleDetail={'service':a50_0x2eba65(0x1d0),'command':'detail','description':'Show\x20one\x20runtime\x20role\x20by\x20ID','risk':a50_0x2eba65(0x1da),'flags':[ROLE_ID_FLAG],async 'execute'(_0x59e3e2){const _0x2b0e37=a50_0x2eba65,_0x215425=await getRuntimeRoleById(_0x59e3e2[_0x2b0e37(0x1d2)],_0x59e3e2[_0x2b0e37(0x1d1)]('id'));return{'ok':!![],'data':{'scope':_0x2b0e37(0x1d7),'role':projectRuntimeRole(_0x215425)}};}};
1
+ const a50_0x542e5b=a50_0x3337;function a50_0x3337(_0x3e5bb0,_0x331641){_0x3e5bb0=_0x3e5bb0-0x124;const _0x9991f2=a50_0x9991();let _0x3337bf=_0x9991f2[_0x3e5bb0];return _0x3337bf;}(function(_0x106a6e,_0x4eb4fd){const _0x4472ba=a50_0x3337,_0x5818fd=_0x106a6e();while(!![]){try{const _0x283dfd=parseInt(_0x4472ba(0x129))/0x1+parseInt(_0x4472ba(0x12b))/0x2+-parseInt(_0x4472ba(0x12d))/0x3*(parseInt(_0x4472ba(0x12e))/0x4)+parseInt(_0x4472ba(0x126))/0x5+-parseInt(_0x4472ba(0x12f))/0x6*(parseInt(_0x4472ba(0x12c))/0x7)+-parseInt(_0x4472ba(0x125))/0x8+parseInt(_0x4472ba(0x12a))/0x9;if(_0x283dfd===_0x4eb4fd)break;else _0x5818fd['push'](_0x5818fd['shift']());}catch(_0x46fb00){_0x5818fd['push'](_0x5818fd['shift']());}}}(a50_0x9991,0xbf932));import{getRuntimeRoleById,projectRuntimeRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';export const roleDetail={'service':'role','command':a50_0x542e5b(0x128),'description':'Show\x20one\x20runtime\x20role\x20by\x20ID','risk':a50_0x542e5b(0x131),'flags':[ROLE_ID_FLAG],async 'execute'(_0x328ed0){const _0x5b9012=a50_0x542e5b,_0x51ccfc=await getRuntimeRoleById(_0x328ed0[_0x5b9012(0x130)],_0x328ed0[_0x5b9012(0x124)]('id'));return{'ok':!![],'data':{'scope':_0x5b9012(0x127),'role':projectRuntimeRole(_0x51ccfc)}};}};function a50_0x9991(){const _0x512030=['7497216YSvEGn','2540875PmXYsU','runtime','detail','1277564WAhrVX','12288762VrWdjX','207030njYlQj','3438694rkQEXr','96uYFbqu','7388ZBDhAA','18lzLMZP','appCode','read','num'];a50_0x9991=function(){return _0x512030;};return a50_0x9991();}
@@ -1 +1 @@
1
- (function(_0x2eba52,_0x2a1d2f){const _0x4f883e=a51_0x276b,_0x3083c1=_0x2eba52();while(!![]){try{const _0x27ee7c=parseInt(_0x4f883e(0x1d1))/0x1*(-parseInt(_0x4f883e(0x1d5))/0x2)+parseInt(_0x4f883e(0x1ce))/0x3*(parseInt(_0x4f883e(0x1cb))/0x4)+-parseInt(_0x4f883e(0x1cc))/0x5+-parseInt(_0x4f883e(0x1d0))/0x6+parseInt(_0x4f883e(0x1cd))/0x7+parseInt(_0x4f883e(0x1d4))/0x8*(-parseInt(_0x4f883e(0x1cf))/0x9)+parseInt(_0x4f883e(0x1d3))/0xa*(parseInt(_0x4f883e(0x1d2))/0xb);if(_0x27ee7c===_0x2a1d2f)break;else _0x3083c1['push'](_0x3083c1['shift']());}catch(_0x3f1cf1){_0x3083c1['push'](_0x3083c1['shift']());}}}(a51_0x30c8,0xe1728));import{roleList}from'../../commands/role/list.js';function a51_0x276b(_0xebdd6f,_0x92e968){_0xebdd6f=_0xebdd6f-0x1cb;const _0x30c8dd=a51_0x30c8();let _0x276b15=_0x30c8dd[_0xebdd6f];return _0x276b15;}import{roleDetail}from'../../commands/role/detail.js';import{roleCreate}from'../../commands/role/create.js';import{roleUpdate}from'../../commands/role/update.js';function a51_0x30c8(){const _0x3fe834=['11yODodq','31722650wvCCpj','14174648IWmqSg','22NKDSAm','868jWtKWN','2644780JfGLSZ','11526844UHpPtm','3405uAajOh','9RDGGkZ','4734288JQAsdF','95635ZENcgF'];a51_0x30c8=function(){return _0x3fe834;};return a51_0x30c8();}import{roleDelete}from'../../commands/role/delete.js';import{roleUserAdd}from'../../commands/role/user-add.js';import{roleUserRemove}from'../../commands/role/user-remove.js';export const roleDefinitions=[roleList,roleDetail,roleCreate,roleUpdate,roleDelete,roleUserAdd,roleUserRemove];
1
+ (function(_0x50657e,_0x366c26){const _0x490d81=a51_0x3abc,_0x25e399=_0x50657e();while(!![]){try{const _0x1f4183=parseInt(_0x490d81(0x6f))/0x1+parseInt(_0x490d81(0x6e))/0x2+-parseInt(_0x490d81(0x71))/0x3+-parseInt(_0x490d81(0x73))/0x4+-parseInt(_0x490d81(0x6d))/0x5+parseInt(_0x490d81(0x6b))/0x6*(parseInt(_0x490d81(0x72))/0x7)+parseInt(_0x490d81(0x6c))/0x8*(parseInt(_0x490d81(0x70))/0x9);if(_0x1f4183===_0x366c26)break;else _0x25e399['push'](_0x25e399['shift']());}catch(_0x5707cd){_0x25e399['push'](_0x25e399['shift']());}}}(a51_0x3a41,0xa75af));import{roleList}from'../../commands/role/list.js';function a51_0x3a41(){const _0x2a6b57=['803803qvuFjP','3203164pyOepo','6bsyLso','760DaFeqZ','5218455MCoxWb','1105244AqTEcV','509611XwVGRq','244143PUzgPx','3672474VumipR'];a51_0x3a41=function(){return _0x2a6b57;};return a51_0x3a41();}import{roleDetail}from'../../commands/role/detail.js';function a51_0x3abc(_0x19b740,_0x18f59b){_0x19b740=_0x19b740-0x6b;const _0x3a41b3=a51_0x3a41();let _0x3abccb=_0x3a41b3[_0x19b740];return _0x3abccb;}import{roleCreate}from'../../commands/role/create.js';import{roleUpdate}from'../../commands/role/update.js';import{roleDelete}from'../../commands/role/delete.js';import{roleUserAdd}from'../../commands/role/user-add.js';import{roleUserRemove}from'../../commands/role/user-remove.js';export const roleDefinitions=[roleList,roleDetail,roleCreate,roleUpdate,roleDelete,roleUserAdd,roleUserRemove];
@@ -1 +1 @@
1
- const a52_0x1d00b3=a52_0x1675;function a52_0x4c39(){const _0x43fe03=['isSafeInteger','list','List\x20runtime\x20roles\x20for\x20the\x20current\x20app','appCode','1733032jQdZNn','number','23586DxVRkW','map','num','Runtime\x20role\x20type','5932935htcciL','--pagesize\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.','string','30929720zKDFKi','pagesize','includes','Page\x20size\x20from\x201\x20to\x20100','role','roleType','filter','type','19710gWPmlz','read','87pyBACL','runtime','665ofpLzl','toUpperCase','paging','validation','trim','str','length','name','858145AVzoOY','10lSNeXu','slice','9387192RRAhek','Fuzzy\x20role-name\x20filter','page'];a52_0x4c39=function(){return _0x43fe03;};return a52_0x4c39();}(function(_0x2b142c,_0x504c28){const _0x321732=a52_0x1675,_0xfe8bb1=_0x2b142c();while(!![]){try{const _0xf6e725=parseInt(_0x321732(0x166))/0x1+parseInt(_0x321732(0x181))/0x2*(-parseInt(_0x321732(0x183))/0x3)+-parseInt(_0x321732(0x170))/0x4*(parseInt(_0x321732(0x167))/0x5)+parseInt(_0x321732(0x172))/0x6*(-parseInt(_0x321732(0x185))/0x7)+-parseInt(_0x321732(0x169))/0x8+-parseInt(_0x321732(0x176))/0x9+parseInt(_0x321732(0x179))/0xa;if(_0xf6e725===_0x504c28)break;else _0xfe8bb1['push'](_0xfe8bb1['shift']());}catch(_0x5c4e9a){_0xfe8bb1['push'](_0xfe8bb1['shift']());}}}(a52_0x4c39,0x90b6b));function a52_0x1675(_0x415e95,_0x10885d){_0x415e95=_0x415e95-0x163;const _0x4c395a=a52_0x4c39();let _0x16752a=_0x4c395a[_0x415e95];return _0x16752a;}import{listRuntimeAppRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{listAllRuntimeRoles,projectRuntimeRole,RUNTIME_ROLE_TYPES}from'../../commands/role/shared.js';export const roleList={'service':a52_0x1d00b3(0x17d),'command':a52_0x1d00b3(0x16d),'description':a52_0x1d00b3(0x16e),'risk':a52_0x1d00b3(0x182),'flags':[{'name':a52_0x1d00b3(0x180),'type':a52_0x1d00b3(0x178),'enum':RUNTIME_ROLE_TYPES,'description':a52_0x1d00b3(0x175)},{'name':a52_0x1d00b3(0x165),'type':a52_0x1d00b3(0x178),'description':a52_0x1d00b3(0x16a)},{'name':a52_0x1d00b3(0x16b),'type':a52_0x1d00b3(0x171),'default':0x1,'description':'Page\x20number'},{'name':a52_0x1d00b3(0x17a),'type':a52_0x1d00b3(0x171),'default':0x64,'description':a52_0x1d00b3(0x17c)}],async 'validate'(_0x2614be){const _0x557905=a52_0x1d00b3,_0x3aadea=_0x2614be[_0x557905(0x163)]('type')[_0x557905(0x186)]();if(_0x3aadea&&!RUNTIME_ROLE_TYPES[_0x557905(0x17b)](_0x3aadea))throw CliErrors[_0x557905(0x188)]('Invalid\x20runtime\x20role\x20type:\x20'+_0x3aadea+'.');const _0x4d9aa7=_0x2614be[_0x557905(0x174)](_0x557905(0x16b),0x1),_0x3101f4=_0x2614be[_0x557905(0x174)](_0x557905(0x17a),0x64);if(!Number[_0x557905(0x16c)](_0x4d9aa7)||_0x4d9aa7<0x1)throw CliErrors[_0x557905(0x188)]('--page\x20must\x20be\x20a\x20positive\x20integer.');if(!Number[_0x557905(0x16c)](_0x3101f4)||_0x3101f4<0x1||_0x3101f4>0x64)throw CliErrors[_0x557905(0x188)](_0x557905(0x177));},async 'execute'(_0xd66cb){const _0x405f1f=a52_0x1d00b3,_0x4223d7=_0xd66cb[_0x405f1f(0x163)](_0x405f1f(0x180))[_0x405f1f(0x186)](),_0x34ef25=_0xd66cb[_0x405f1f(0x163)](_0x405f1f(0x165))[_0x405f1f(0x189)](),_0x1f7f40=_0xd66cb[_0x405f1f(0x174)]('page',0x1),_0x43c613=_0xd66cb[_0x405f1f(0x174)](_0x405f1f(0x17a),0x64);if(_0x4223d7){const _0x4f8de6=(await listAllRuntimeRoles(_0xd66cb[_0x405f1f(0x16f)],{..._0x34ef25?{'roleName':_0x34ef25}:{}}))[_0x405f1f(0x17f)](_0x44f94f=>_0x44f94f[_0x405f1f(0x17e)]===_0x4223d7),_0x1aec35=(_0x1f7f40-0x1)*_0x43c613;return{'ok':!![],'data':{'scope':_0x405f1f(0x184),'roles':_0x4f8de6[_0x405f1f(0x168)](_0x1aec35,_0x1aec35+_0x43c613)[_0x405f1f(0x173)](projectRuntimeRole),'paging':{'currentPage':_0x1f7f40,'pageSize':_0x43c613,'totalCount':_0x4f8de6[_0x405f1f(0x164)]}}};}const _0x8ec55=await listRuntimeAppRoles(_0xd66cb[_0x405f1f(0x16f)],{..._0x34ef25?{'roleName':_0x34ef25}:{},'currentPage':_0x1f7f40,'pageSize':_0x43c613});return{'ok':!![],'data':{'scope':_0x405f1f(0x184),'roles':_0x8ec55['items'][_0x405f1f(0x173)](projectRuntimeRole),'paging':_0x8ec55[_0x405f1f(0x187)]}};}};
1
+ const a52_0x442876=a52_0x1e1d;function a52_0x1b3c(){const _0x1df24e=['--page\x20must\x20be\x20a\x20positive\x20integer.','number','11000yOGWAL','page','slice','Invalid\x20runtime\x20role\x20type:\x20','--pagesize\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.','trim','215BxHqvw','13209130SqGxSy','runtime','string','pagesize','Page\x20number','read','Fuzzy\x20role-name\x20filter','4SvvNvz','61722lNNWAI','validation','num','appCode','name','List\x20runtime\x20roles\x20for\x20the\x20current\x20app','includes','750081PBDtAT','str','items','24stBniC','length','Page\x20size\x20from\x201\x20to\x20100','3375nVMMHr','isSafeInteger','3397232JzkyUl','paging','role','toUpperCase','map','Runtime\x20role\x20type','702683fhcosH','854959qOARtp','type'];a52_0x1b3c=function(){return _0x1df24e;};return a52_0x1b3c();}function a52_0x1e1d(_0x9b0a59,_0x4af2e0){_0x9b0a59=_0x9b0a59-0x138;const _0x1b3c3d=a52_0x1b3c();let _0x1e1db8=_0x1b3c3d[_0x9b0a59];return _0x1e1db8;}(function(_0x4cd0d1,_0x4ddabf){const _0x2ccaf5=a52_0x1e1d,_0x3a5615=_0x4cd0d1();while(!![]){try{const _0x2ea2b0=parseInt(_0x2ccaf5(0x138))/0x1+-parseInt(_0x2ccaf5(0x14b))/0x2*(-parseInt(_0x2ccaf5(0x153))/0x3)+parseInt(_0x2ccaf5(0x15b))/0x4+-parseInt(_0x2ccaf5(0x143))/0x5*(parseInt(_0x2ccaf5(0x14c))/0x6)+parseInt(_0x2ccaf5(0x139))/0x7*(-parseInt(_0x2ccaf5(0x156))/0x8)+parseInt(_0x2ccaf5(0x159))/0x9*(parseInt(_0x2ccaf5(0x13d))/0xa)+-parseInt(_0x2ccaf5(0x144))/0xb;if(_0x2ea2b0===_0x4ddabf)break;else _0x3a5615['push'](_0x3a5615['shift']());}catch(_0x3289a1){_0x3a5615['push'](_0x3a5615['shift']());}}}(a52_0x1b3c,0x6f133));import{listRuntimeAppRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{listAllRuntimeRoles,projectRuntimeRole,RUNTIME_ROLE_TYPES}from'../../commands/role/shared.js';export const roleList={'service':a52_0x442876(0x15d),'command':'list','description':a52_0x442876(0x151),'risk':a52_0x442876(0x149),'flags':[{'name':a52_0x442876(0x13a),'type':a52_0x442876(0x146),'enum':RUNTIME_ROLE_TYPES,'description':a52_0x442876(0x160)},{'name':a52_0x442876(0x150),'type':a52_0x442876(0x146),'description':a52_0x442876(0x14a)},{'name':'page','type':'number','default':0x1,'description':a52_0x442876(0x148)},{'name':'pagesize','type':a52_0x442876(0x13c),'default':0x64,'description':a52_0x442876(0x158)}],async 'validate'(_0x904689){const _0xe37785=a52_0x442876,_0x49b152=_0x904689['str'](_0xe37785(0x13a))[_0xe37785(0x15e)]();if(_0x49b152&&!RUNTIME_ROLE_TYPES[_0xe37785(0x152)](_0x49b152))throw CliErrors[_0xe37785(0x14d)](_0xe37785(0x140)+_0x49b152+'.');const _0x2b3578=_0x904689[_0xe37785(0x14e)](_0xe37785(0x13e),0x1),_0x18b5ad=_0x904689[_0xe37785(0x14e)]('pagesize',0x64);if(!Number['isSafeInteger'](_0x2b3578)||_0x2b3578<0x1)throw CliErrors[_0xe37785(0x14d)](_0xe37785(0x13b));if(!Number[_0xe37785(0x15a)](_0x18b5ad)||_0x18b5ad<0x1||_0x18b5ad>0x64)throw CliErrors[_0xe37785(0x14d)](_0xe37785(0x141));},async 'execute'(_0x3fe5be){const _0xd14371=a52_0x442876,_0x114236=_0x3fe5be[_0xd14371(0x154)](_0xd14371(0x13a))[_0xd14371(0x15e)](),_0x1473c7=_0x3fe5be[_0xd14371(0x154)](_0xd14371(0x150))[_0xd14371(0x142)](),_0x406124=_0x3fe5be[_0xd14371(0x14e)]('page',0x1),_0x191cfd=_0x3fe5be['num'](_0xd14371(0x147),0x64);if(_0x114236){const _0x5b724f=(await listAllRuntimeRoles(_0x3fe5be[_0xd14371(0x14f)],{..._0x1473c7?{'roleName':_0x1473c7}:{}}))['filter'](_0x4f3498=>_0x4f3498['roleType']===_0x114236),_0x5d4adc=(_0x406124-0x1)*_0x191cfd;return{'ok':!![],'data':{'scope':_0xd14371(0x145),'roles':_0x5b724f[_0xd14371(0x13f)](_0x5d4adc,_0x5d4adc+_0x191cfd)[_0xd14371(0x15f)](projectRuntimeRole),'paging':{'currentPage':_0x406124,'pageSize':_0x191cfd,'totalCount':_0x5b724f[_0xd14371(0x157)]}}};}const _0x355e39=await listRuntimeAppRoles(_0x3fe5be[_0xd14371(0x14f)],{..._0x1473c7?{'roleName':_0x1473c7}:{},'currentPage':_0x406124,'pageSize':_0x191cfd});return{'ok':!![],'data':{'scope':_0xd14371(0x145),'roles':_0x355e39[_0xd14371(0x155)][_0xd14371(0x15f)](projectRuntimeRole),'paging':_0x355e39[_0xd14371(0x15c)]}};}};
@@ -1 +1 @@
1
- const a53_0x253511=a53_0x2432;(function(_0x5a3fe2,_0x14ce5b){const _0x4c85be=a53_0x2432,_0x5ce0f6=_0x5a3fe2();while(!![]){try{const _0x2ca9d5=-parseInt(_0x4c85be(0x1f3))/0x1+-parseInt(_0x4c85be(0x1d9))/0x2+parseInt(_0x4c85be(0x1d8))/0x3+parseInt(_0x4c85be(0x1ba))/0x4*(parseInt(_0x4c85be(0x1b9))/0x5)+-parseInt(_0x4c85be(0x1e1))/0x6+-parseInt(_0x4c85be(0x1c0))/0x7*(parseInt(_0x4c85be(0x1ae))/0x8)+parseInt(_0x4c85be(0x1c5))/0x9;if(_0x2ca9d5===_0x14ce5b)break;else _0x5ce0f6['push'](_0x5ce0f6['shift']());}catch(_0x48636b){_0x5ce0f6['push'](_0x5ce0f6['shift']());}}}(a53_0x4765,0x3d2eb));import{listRuntimeAppUsers,listRuntimeAppRoles,listRuntimeRoleUsers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const RUNTIME_ROLE_TYPES=[a53_0x253511(0x1e9),a53_0x253511(0x1de),'OWNER',a53_0x253511(0x1b5)];const BUILTIN_ROLE_TYPES=[a53_0x253511(0x1e9),'USER',a53_0x253511(0x1ee)];export const ROLE_ID_FLAG={'name':'id','type':a53_0x253511(0x1da),'required':!![],'description':a53_0x253511(0x1c1)};export const ROLE_REF_FLAG={'name':a53_0x253511(0x1e3),'type':a53_0x253511(0x1e4),'required':!![],'description':a53_0x253511(0x1d7)};function a53_0x2432(_0x628e9b,_0x490ac3){_0x628e9b=_0x628e9b-0x1ad;const _0x47657a=a53_0x4765();let _0x243259=_0x47657a[_0x628e9b];return _0x243259;}export const USER_ID_FLAG={'name':a53_0x253511(0x1b7),'type':a53_0x253511(0x1e4),'required':!![],'description':a53_0x253511(0x1b8)};export const EXPECT_USER_COUNT_FLAG={'name':a53_0x253511(0x1e5),'type':'number','description':a53_0x253511(0x1c7)};export function isBuiltinRuntimeRole(_0x59cde9){return BUILTIN_ROLE_TYPES['includes'](_0x59cde9);}export function assertCustomRuntimeRole(_0x3042c0,_0xf0d8b6){const _0x165c30=a53_0x253511;if(_0x3042c0[_0x165c30(0x1b3)]!==_0x165c30(0x1b5))throw CliErrors['validation']('Cannot\x20'+_0xf0d8b6+'\x20built-in\x20runtime\x20role\x20'+_0x3042c0[_0x165c30(0x1f5)]+'\x20('+_0x3042c0['roleType']+').','Only\x20CUSTOM\x20runtime\x20roles\x20can\x20be\x20modified\x20or\x20deleted.');}export function projectRuntimeRole(_0x1342d0){const _0x3196ea=a53_0x253511;return{'id':_0x1342d0['id'],'roleName':_0x1342d0[_0x3196ea(0x1f5)],'roleType':_0x1342d0['roleType'],'remark':_0x1342d0[_0x3196ea(0x1d1)],'userCount':_0x1342d0['userCount']??0x0,'permitCount':_0x1342d0[_0x3196ea(0x1ca)]??0x0,'builtin':isBuiltinRuntimeRole(_0x1342d0['roleType'])};}function a53_0x4765(){const _0x3f7406=['join','applyUserList','user-add','test','265498gbBwFa','userName','roleName','isSafeInteger','272FpwgNt','\x22\x20is\x20ambiguous.','appCode','Reload\x20the\x20role\x20list\x20and\x20retry\x20after\x20the\x20server\x20state\x20is\x20consistent.','Pass\x20one\x20role\x20ID:\x20','roleType','flag','CUSTOM','Pass\x20--user\x20<userId>;\x20name\x20and\x20account\x20lookup\x20are\x20not\x20available\x20in\x20runtime\x20scope.','user','Runtime\x20numeric\x20userId','6955HGhwId','276sejjFA','items','Runtime\x20role\x20id\x20','Pass\x20--role\x20<id|name>.','Transfer\x20or\x20manage\x20application\x20ownership\x20through\x20the\x20dedicated\x20application\x20workflow.','--expect-user-count\x20must\x20be\x20a\x20non-negative\x20integer.','11347kSqsgR','Runtime\x20role\x20ID\x20returned\x20by\x20role\x20list','runtime','Runtime\x20role\x20membership\x20requires\x20a\x20numeric\x20userId.','num','6844581UDquyH','OWNER\x20runtime\x20role\x20membership\x20cannot\x20be\x20changed\x20with\x20this\x20command.','Reject\x20when\x20the\x20target\x20role\x20member\x20count\x20has\x20changed','includes','Use\x20a\x20numeric\x20userId\x20returned\x20by\x20the\x20current\x20application\x27s\x20personnel\x20list.','permitCount',',\x20found\x20','Runtime\x20role\x20member\x20count\x20changed:\x20expected\x20','filter','\x20was\x20not\x20found\x20in\x20app\x20','trim','length','remark','code','Runtime\x20role\x20','push','userId','Missing\x20runtime\x20role\x20reference.','Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name','621735jgpwVw','22894wakxgH','number','userList','validation','\x20is\x20missing\x20from\x20the\x20grouped\x20member\x20snapshot.','USER','\x20is\x20already\x20in\x20runtime\x20role\x20','Run\x20`lovrabet\x20role\x20list`\x20and\x20use\x20a\x20role\x20from\x20the\x20current\x20app.','2886426JAWcmJ','\x20is\x20not\x20in\x20runtime\x20role\x20','role','string','expect-user-count','Role\x20ID\x20must\x20be\x20a\x20positive\x20integer.','Runtime\x20userId\x20must\x20be\x20a\x20positive\x20safe\x20integer.','Runtime\x20user\x20','ADMIN','paging','totalCount','map','User\x20','OWNER'];a53_0x4765=function(){return _0x3f7406;};return a53_0x4765();}export async function getRuntimeRoleById(_0x5d7e38,_0x553c48){const _0x168d53=a53_0x253511;if(!Number[_0x168d53(0x1ad)](_0x553c48)||_0x553c48<=0x0)throw CliErrors[_0x168d53(0x1dc)](_0x168d53(0x1e6));const _0x342584=(await listAllRuntimeRoles(_0x5d7e38))[_0x168d53(0x1cd)](_0x31deeb=>_0x31deeb['id']===_0x553c48&&(!_0x31deeb[_0x168d53(0x1b0)]||_0x31deeb[_0x168d53(0x1b0)]===_0x5d7e38));if(_0x342584[_0x168d53(0x1d0)]!==0x1)throw CliErrors['validation'](_0x168d53(0x1bc)+_0x553c48+_0x168d53(0x1ce)+_0x5d7e38+'.',_0x168d53(0x1e0));return _0x342584[0x0];}export async function listAllRuntimeRoles(_0x1fc941,_0x802f86={}){const _0x1b7b4a=a53_0x253511,_0x5797a0=0x64,_0x53e578=[];for(let _0xff4617=0x1;;_0xff4617+=0x1){const _0x51eabe=await listRuntimeAppRoles(_0x1fc941,{..._0x802f86['roleName']?{'roleName':_0x802f86[_0x1b7b4a(0x1f5)]}:{},'currentPage':_0xff4617,'pageSize':_0x5797a0});_0x53e578['push'](..._0x51eabe[_0x1b7b4a(0x1bb)]);if(_0x51eabe[_0x1b7b4a(0x1bb)][_0x1b7b4a(0x1d0)]<_0x5797a0||_0x51eabe[_0x1b7b4a(0x1ea)]&&_0x53e578[_0x1b7b4a(0x1d0)]>=_0x51eabe[_0x1b7b4a(0x1ea)][_0x1b7b4a(0x1eb)])return _0x53e578;}}export async function resolveRuntimeRoleRef(_0x57748a,_0x26fdd5){const _0x13d1ff=a53_0x253511,_0x389449=_0x26fdd5['trim']();if(!_0x389449)throw CliErrors[_0x13d1ff(0x1dc)](_0x13d1ff(0x1d6),_0x13d1ff(0x1bd));if(/^\d+$/[_0x13d1ff(0x1f2)](_0x389449))return getRuntimeRoleById(_0x57748a,Number(_0x389449));const _0x12a1dc=(await listAllRuntimeRoles(_0x57748a))[_0x13d1ff(0x1cd)](_0x142b28=>_0x142b28[_0x13d1ff(0x1f5)]===_0x389449);if(_0x12a1dc[_0x13d1ff(0x1d0)]===0x0)throw CliErrors[_0x13d1ff(0x1dc)]('Runtime\x20role\x20name\x20\x22'+_0x389449+'\x22\x20was\x20not\x20found\x20in\x20app\x20'+_0x57748a+'.','Run\x20`lovrabet\x20role\x20list`\x20or\x20pass\x20--role\x20<id>.');if(_0x12a1dc['length']>0x1)throw CliErrors['validation']('Runtime\x20role\x20name\x20\x22'+_0x389449+_0x13d1ff(0x1af),_0x13d1ff(0x1b2)+_0x12a1dc[_0x13d1ff(0x1ec)](_0x4eaab5=>_0x4eaab5['id'])[_0x13d1ff(0x1ef)](',\x20')+'.');return _0x12a1dc[0x0];}function parseRuntimeUserId(_0xe38535){const _0x332e1c=a53_0x253511,_0x1040d9=_0xe38535['trim']();if(!/^\d+$/[_0x332e1c(0x1f2)](_0x1040d9))throw CliErrors[_0x332e1c(0x1dc)](_0x332e1c(0x1c3),_0x332e1c(0x1b6));const _0x32197c=Number(_0x1040d9);if(!Number[_0x332e1c(0x1ad)](_0x32197c)||_0x32197c<=0x0)throw CliErrors[_0x332e1c(0x1dc)](_0x332e1c(0x1e7));return _0x32197c;}export async function prepareRuntimeMemberMutation(_0x22e587,_0x3eb3fd){const _0x19c87a=a53_0x253511,_0x5bdcd5=await resolveRuntimeRoleRef(_0x22e587[_0x19c87a(0x1b0)],_0x22e587['str']('role'));if(_0x5bdcd5[_0x19c87a(0x1b3)]===_0x19c87a(0x1ee))throw CliErrors['validation'](_0x19c87a(0x1c6),_0x19c87a(0x1be));const _0x2efd69=parseRuntimeUserId(_0x22e587['str']('user')),_0x38ed8b=(await listRuntimeRoleUsers(_0x22e587[_0x19c87a(0x1b0)]))[_0x19c87a(0x1ec)](_0x35dfad=>({..._0x35dfad,'userList':[..._0x35dfad[_0x19c87a(0x1db)]??[]],'applyUserList':[..._0x35dfad[_0x19c87a(0x1f0)]??[]]})),_0x4d55ef=_0x38ed8b['find'](_0x231313=>_0x231313['id']===_0x5bdcd5['id']);if(!_0x4d55ef)throw CliErrors[_0x19c87a(0x1dc)](_0x19c87a(0x1d3)+_0x5bdcd5['id']+_0x19c87a(0x1dd),_0x19c87a(0x1b1));const _0x32fd31=_0x4d55ef[_0x19c87a(0x1db)][_0x19c87a(0x1ec)](_0x13b5ad=>_0x13b5ad[_0x19c87a(0x1d5)]),_0x41524f=_0x22e587[_0x19c87a(0x1b4)](_0x19c87a(0x1e5));if(_0x41524f!==undefined&&_0x41524f!==null&&_0x41524f!==''){const _0x37fde5=_0x22e587[_0x19c87a(0x1c4)]('expect-user-count');if(!Number['isSafeInteger'](_0x37fde5)||_0x37fde5<0x0)throw CliErrors[_0x19c87a(0x1dc)](_0x19c87a(0x1bf));if(_0x32fd31[_0x19c87a(0x1d0)]!==_0x37fde5)throw CliErrors[_0x19c87a(0x1dc)](_0x19c87a(0x1cc)+_0x37fde5+_0x19c87a(0x1cb)+_0x32fd31[_0x19c87a(0x1d0)]+'.','Read\x20the\x20current\x20members\x20and\x20retry\x20with\x20the\x20new\x20expected\x20count.');}const _0x11cfb0=_0x32fd31[_0x19c87a(0x1c8)](_0x2efd69),_0x261abf=[];let _0x1862d2=!![];if(_0x3eb3fd===_0x19c87a(0x1f1)){const _0x356e09=await listRuntimeAppUsers(_0x22e587[_0x19c87a(0x1b0)]),_0x183442=_0x356e09[_0x19c87a(0x1cd)](_0x3b3cd1=>Number(_0x3b3cd1[_0x19c87a(0x1d2)])===_0x2efd69);if(_0x183442['length']!==0x1||!_0x183442[0x0][_0x19c87a(0x1f4)]?.[_0x19c87a(0x1cf)]())throw CliErrors[_0x19c87a(0x1dc)](_0x19c87a(0x1e8)+_0x2efd69+'\x20was\x20not\x20found\x20in\x20app\x20'+_0x22e587[_0x19c87a(0x1b0)]+'.',_0x19c87a(0x1c9));_0x11cfb0?(_0x1862d2=![],_0x261abf[_0x19c87a(0x1d4)](_0x19c87a(0x1ed)+_0x2efd69+_0x19c87a(0x1df)+_0x5bdcd5['id']+'.')):_0x4d55ef['userList'][_0x19c87a(0x1d4)]({'userId':_0x2efd69,'username':_0x183442[0x0][_0x19c87a(0x1f4)]});}else!_0x11cfb0?(_0x1862d2=![],_0x261abf[_0x19c87a(0x1d4)](_0x19c87a(0x1ed)+_0x2efd69+_0x19c87a(0x1e2)+_0x5bdcd5['id']+'.')):_0x4d55ef[_0x19c87a(0x1db)]=_0x4d55ef[_0x19c87a(0x1db)]['filter'](_0x5270ff=>_0x5270ff[_0x19c87a(0x1d5)]!==_0x2efd69);return{'role':_0x5bdcd5,'userId':_0x2efd69,'roleList':_0x38ed8b,'before':{'userIds':_0x32fd31},'after':{'userIds':_0x4d55ef['userList'][_0x19c87a(0x1ec)](_0xe5ca26=>_0xe5ca26[_0x19c87a(0x1d5)])},'shouldWrite':_0x1862d2,'warnings':_0x261abf};}export function runtimeRoleWriteResult(_0x3956b1,_0xe4b04b,_0x680d00,_0x1265a1,_0x24f313,_0x2ed574=[]){const _0x17f008=a53_0x253511;return{'operation':_0x3956b1,'scope':_0x17f008(0x1c2),'selector':_0xe4b04b,'before':_0x680d00,'after':_0x1265a1,'dryRun':![],'backend':_0x24f313,'warnings':_0x2ed574};}
1
+ const a53_0x4f3d18=a53_0x4195;(function(_0x15b4df,_0x5c534f){const _0x81511e=a53_0x4195,_0x1922d5=_0x15b4df();while(!![]){try{const _0x1ad1ee=-parseInt(_0x81511e(0x19b))/0x1*(-parseInt(_0x81511e(0x18a))/0x2)+-parseInt(_0x81511e(0x1b1))/0x3*(parseInt(_0x81511e(0x183))/0x4)+-parseInt(_0x81511e(0x187))/0x5*(parseInt(_0x81511e(0x19f))/0x6)+-parseInt(_0x81511e(0x1a6))/0x7+-parseInt(_0x81511e(0x1a5))/0x8*(parseInt(_0x81511e(0x1af))/0x9)+-parseInt(_0x81511e(0x1a8))/0xa*(-parseInt(_0x81511e(0x1b0))/0xb)+-parseInt(_0x81511e(0x1ad))/0xc*(-parseInt(_0x81511e(0x1c6))/0xd);if(_0x1ad1ee===_0x5c534f)break;else _0x1922d5['push'](_0x1922d5['shift']());}catch(_0x15aba5){_0x1922d5['push'](_0x1922d5['shift']());}}}(a53_0x3dc5,0xad0e3));import{listRuntimeAppUsers,listRuntimeAppRoles,listRuntimeRoleUsers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const RUNTIME_ROLE_TYPES=[a53_0x4f3d18(0x194),a53_0x4f3d18(0x1c4),a53_0x4f3d18(0x1ab),a53_0x4f3d18(0x181)];const BUILTIN_ROLE_TYPES=[a53_0x4f3d18(0x194),a53_0x4f3d18(0x1c4),a53_0x4f3d18(0x1ab)];export const ROLE_ID_FLAG={'name':'id','type':'number','required':!![],'description':a53_0x4f3d18(0x18e)};export const ROLE_REF_FLAG={'name':'role','type':a53_0x4f3d18(0x189),'required':!![],'description':a53_0x4f3d18(0x1b3)};export const USER_ID_FLAG={'name':a53_0x4f3d18(0x1c8),'type':a53_0x4f3d18(0x189),'required':!![],'description':a53_0x4f3d18(0x19c)};export const EXPECT_USER_COUNT_FLAG={'name':a53_0x4f3d18(0x1ac),'type':a53_0x4f3d18(0x18f),'description':'Reject\x20when\x20the\x20target\x20role\x20member\x20count\x20has\x20changed'};function a53_0x3dc5(){const _0x44c6ce=['282VyylBK','Pass\x20one\x20role\x20ID:\x20','test','remark','Transfer\x20or\x20manage\x20application\x20ownership\x20through\x20the\x20dedicated\x20application\x20workflow.','\x20built-in\x20runtime\x20role\x20','8VmjnwO','8744295QBiXoK','push','120UVtnvD','str','userList','OWNER','expect-user-count','23171676XuoVde','Runtime\x20role\x20name\x20\x22','2337705DVAndm','806399jQrnoe','1456491lVCVzk','\x22\x20is\x20ambiguous.','Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name','userId','runtime','user-add','Role\x20ID\x20must\x20be\x20a\x20positive\x20integer.','userName','roleType','paging','includes','length','roleName','Pass\x20--user\x20<userId>;\x20name\x20and\x20account\x20lookup\x20are\x20not\x20available\x20in\x20runtime\x20scope.','Run\x20`lovrabet\x20role\x20list`\x20or\x20pass\x20--role\x20<id>.','Use\x20a\x20numeric\x20userId\x20returned\x20by\x20the\x20current\x20application\x27s\x20personnel\x20list.','isSafeInteger','User\x20','\x20is\x20already\x20in\x20runtime\x20role\x20','USER','items','13eBKkby','validation','user','role','Run\x20`lovrabet\x20role\x20list`\x20and\x20use\x20a\x20role\x20from\x20the\x20current\x20app.','CUSTOM','Runtime\x20role\x20id\x20','8YTyIOh','applyUserList','Missing\x20runtime\x20role\x20reference.','\x20was\x20not\x20found\x20in\x20app\x20','35185UGIbtv','map','string','2518CiwSmu','\x22\x20was\x20not\x20found\x20in\x20app\x20','Pass\x20--role\x20<id|name>.','\x20is\x20missing\x20from\x20the\x20grouped\x20member\x20snapshot.','Runtime\x20role\x20ID\x20returned\x20by\x20role\x20list','number','Runtime\x20user\x20','Runtime\x20role\x20','trim',',\x20found\x20','ADMIN','userCount','filter','Reload\x20the\x20role\x20list\x20and\x20retry\x20after\x20the\x20server\x20state\x20is\x20consistent.','Runtime\x20role\x20membership\x20requires\x20a\x20numeric\x20userId.','Only\x20CUSTOM\x20runtime\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','permitCount','563ZlEBVx','Runtime\x20numeric\x20userId','\x20is\x20not\x20in\x20runtime\x20role\x20','appCode'];a53_0x3dc5=function(){return _0x44c6ce;};return a53_0x3dc5();}export function isBuiltinRuntimeRole(_0x1359ea){return BUILTIN_ROLE_TYPES['includes'](_0x1359ea);}export function assertCustomRuntimeRole(_0x25a1a5,_0x33ef9f){const _0x5f4c9e=a53_0x4f3d18;if(_0x25a1a5['roleType']!==_0x5f4c9e(0x181))throw CliErrors['validation']('Cannot\x20'+_0x33ef9f+_0x5f4c9e(0x1a4)+_0x25a1a5[_0x5f4c9e(0x1bd)]+'\x20('+_0x25a1a5[_0x5f4c9e(0x1b9)]+').',_0x5f4c9e(0x199));}export function projectRuntimeRole(_0x472de7){const _0x5ecf7e=a53_0x4f3d18;return{'id':_0x472de7['id'],'roleName':_0x472de7[_0x5ecf7e(0x1bd)],'roleType':_0x472de7[_0x5ecf7e(0x1b9)],'remark':_0x472de7[_0x5ecf7e(0x1a2)],'userCount':_0x472de7[_0x5ecf7e(0x195)]??0x0,'permitCount':_0x472de7[_0x5ecf7e(0x19a)]??0x0,'builtin':isBuiltinRuntimeRole(_0x472de7[_0x5ecf7e(0x1b9)])};}export async function getRuntimeRoleById(_0x531448,_0x26404f){const _0x3f94b8=a53_0x4f3d18;if(!Number[_0x3f94b8(0x1c1)](_0x26404f)||_0x26404f<=0x0)throw CliErrors[_0x3f94b8(0x1c7)](_0x3f94b8(0x1b7));const _0x4f7458=(await listAllRuntimeRoles(_0x531448))['filter'](_0x5bc700=>_0x5bc700['id']===_0x26404f&&(!_0x5bc700[_0x3f94b8(0x19e)]||_0x5bc700[_0x3f94b8(0x19e)]===_0x531448));if(_0x4f7458['length']!==0x1)throw CliErrors[_0x3f94b8(0x1c7)](_0x3f94b8(0x182)+_0x26404f+_0x3f94b8(0x186)+_0x531448+'.',_0x3f94b8(0x1ca));return _0x4f7458[0x0];}export async function listAllRuntimeRoles(_0x53390e,_0x3df216={}){const _0x317a01=a53_0x4f3d18,_0x54aceb=0x64,_0x337a60=[];for(let _0x633da3=0x1;;_0x633da3+=0x1){const _0x555bd1=await listRuntimeAppRoles(_0x53390e,{..._0x3df216['roleName']?{'roleName':_0x3df216[_0x317a01(0x1bd)]}:{},'currentPage':_0x633da3,'pageSize':_0x54aceb});_0x337a60[_0x317a01(0x1a7)](..._0x555bd1['items']);if(_0x555bd1[_0x317a01(0x1c5)][_0x317a01(0x1bc)]<_0x54aceb||_0x555bd1[_0x317a01(0x1ba)]&&_0x337a60[_0x317a01(0x1bc)]>=_0x555bd1[_0x317a01(0x1ba)]['totalCount'])return _0x337a60;}}export async function resolveRuntimeRoleRef(_0x57ddff,_0x533fc4){const _0x4b6340=a53_0x4f3d18,_0x11a8c1=_0x533fc4[_0x4b6340(0x192)]();if(!_0x11a8c1)throw CliErrors[_0x4b6340(0x1c7)](_0x4b6340(0x185),_0x4b6340(0x18c));if(/^\d+$/[_0x4b6340(0x1a1)](_0x11a8c1))return getRuntimeRoleById(_0x57ddff,Number(_0x11a8c1));const _0x5a728e=(await listAllRuntimeRoles(_0x57ddff))[_0x4b6340(0x196)](_0x29c628=>_0x29c628[_0x4b6340(0x1bd)]===_0x11a8c1);if(_0x5a728e['length']===0x0)throw CliErrors[_0x4b6340(0x1c7)](_0x4b6340(0x1ae)+_0x11a8c1+_0x4b6340(0x18b)+_0x57ddff+'.',_0x4b6340(0x1bf));if(_0x5a728e[_0x4b6340(0x1bc)]>0x1)throw CliErrors[_0x4b6340(0x1c7)](_0x4b6340(0x1ae)+_0x11a8c1+_0x4b6340(0x1b2),_0x4b6340(0x1a0)+_0x5a728e[_0x4b6340(0x188)](_0x4ce321=>_0x4ce321['id'])['join'](',\x20')+'.');return _0x5a728e[0x0];}function a53_0x4195(_0x3a8a95,_0x34803a){_0x3a8a95=_0x3a8a95-0x181;const _0x3dc506=a53_0x3dc5();let _0x4195b2=_0x3dc506[_0x3a8a95];return _0x4195b2;}function parseRuntimeUserId(_0x1f9c68){const _0x32c843=a53_0x4f3d18,_0x35bc8b=_0x1f9c68[_0x32c843(0x192)]();if(!/^\d+$/['test'](_0x35bc8b))throw CliErrors[_0x32c843(0x1c7)](_0x32c843(0x198),_0x32c843(0x1be));const _0x260238=Number(_0x35bc8b);if(!Number[_0x32c843(0x1c1)](_0x260238)||_0x260238<=0x0)throw CliErrors[_0x32c843(0x1c7)]('Runtime\x20userId\x20must\x20be\x20a\x20positive\x20safe\x20integer.');return _0x260238;}export async function prepareRuntimeMemberMutation(_0x2568fe,_0xf19fb9){const _0x3a832c=a53_0x4f3d18,_0x527755=await resolveRuntimeRoleRef(_0x2568fe[_0x3a832c(0x19e)],_0x2568fe[_0x3a832c(0x1a9)](_0x3a832c(0x1c9)));if(_0x527755['roleType']===_0x3a832c(0x1ab))throw CliErrors[_0x3a832c(0x1c7)]('OWNER\x20runtime\x20role\x20membership\x20cannot\x20be\x20changed\x20with\x20this\x20command.',_0x3a832c(0x1a3));const _0x52f881=parseRuntimeUserId(_0x2568fe[_0x3a832c(0x1a9)]('user')),_0x256920=(await listRuntimeRoleUsers(_0x2568fe['appCode']))[_0x3a832c(0x188)](_0x160b8d=>({..._0x160b8d,'userList':[..._0x160b8d[_0x3a832c(0x1aa)]??[]],'applyUserList':[..._0x160b8d[_0x3a832c(0x184)]??[]]})),_0x5f141c=_0x256920['find'](_0x1f37d8=>_0x1f37d8['id']===_0x527755['id']);if(!_0x5f141c)throw CliErrors[_0x3a832c(0x1c7)](_0x3a832c(0x191)+_0x527755['id']+_0x3a832c(0x18d),_0x3a832c(0x197));const _0x3c650d=_0x5f141c['userList']['map'](_0x106995=>_0x106995['userId']),_0x3be42c=_0x2568fe['flag']('expect-user-count');if(_0x3be42c!==undefined&&_0x3be42c!==null&&_0x3be42c!==''){const _0x4d3553=_0x2568fe['num'](_0x3a832c(0x1ac));if(!Number[_0x3a832c(0x1c1)](_0x4d3553)||_0x4d3553<0x0)throw CliErrors[_0x3a832c(0x1c7)]('--expect-user-count\x20must\x20be\x20a\x20non-negative\x20integer.');if(_0x3c650d[_0x3a832c(0x1bc)]!==_0x4d3553)throw CliErrors[_0x3a832c(0x1c7)]('Runtime\x20role\x20member\x20count\x20changed:\x20expected\x20'+_0x4d3553+_0x3a832c(0x193)+_0x3c650d[_0x3a832c(0x1bc)]+'.','Read\x20the\x20current\x20members\x20and\x20retry\x20with\x20the\x20new\x20expected\x20count.');}const _0x4fe468=_0x3c650d[_0x3a832c(0x1bb)](_0x52f881),_0x1d310a=[];let _0x44e3ea=!![];if(_0xf19fb9===_0x3a832c(0x1b6)){const _0x5eb624=await listRuntimeAppUsers(_0x2568fe[_0x3a832c(0x19e)]),_0x59bdd8=_0x5eb624['filter'](_0x5a48f1=>Number(_0x5a48f1['code'])===_0x52f881);if(_0x59bdd8['length']!==0x1||!_0x59bdd8[0x0][_0x3a832c(0x1b8)]?.[_0x3a832c(0x192)]())throw CliErrors['validation'](_0x3a832c(0x190)+_0x52f881+'\x20was\x20not\x20found\x20in\x20app\x20'+_0x2568fe[_0x3a832c(0x19e)]+'.',_0x3a832c(0x1c0));_0x4fe468?(_0x44e3ea=![],_0x1d310a['push']('User\x20'+_0x52f881+_0x3a832c(0x1c3)+_0x527755['id']+'.')):_0x5f141c[_0x3a832c(0x1aa)][_0x3a832c(0x1a7)]({'userId':_0x52f881,'username':_0x59bdd8[0x0][_0x3a832c(0x1b8)]});}else!_0x4fe468?(_0x44e3ea=![],_0x1d310a['push'](_0x3a832c(0x1c2)+_0x52f881+_0x3a832c(0x19d)+_0x527755['id']+'.')):_0x5f141c[_0x3a832c(0x1aa)]=_0x5f141c[_0x3a832c(0x1aa)][_0x3a832c(0x196)](_0x2f8af4=>_0x2f8af4[_0x3a832c(0x1b4)]!==_0x52f881);return{'role':_0x527755,'userId':_0x52f881,'roleList':_0x256920,'before':{'userIds':_0x3c650d},'after':{'userIds':_0x5f141c[_0x3a832c(0x1aa)]['map'](_0x257a78=>_0x257a78[_0x3a832c(0x1b4)])},'shouldWrite':_0x44e3ea,'warnings':_0x1d310a};}export function runtimeRoleWriteResult(_0x388426,_0x56bde8,_0x52b6f5,_0x4f5ff2,_0x522ea1,_0x37f86f=[]){const _0x4a19ef=a53_0x4f3d18;return{'operation':_0x388426,'scope':_0x4a19ef(0x1b5),'selector':_0x56bde8,'before':_0x52b6f5,'after':_0x4f5ff2,'dryRun':![],'backend':_0x522ea1,'warnings':_0x37f86f};}
@@ -1 +1 @@
1
- function a54_0x4699(){const _0x4f2d03=['str','New\x20role\x20name','New\x20non-empty\x20role\x20remark','num','name','trim','flag','276472tPHHii','Update\x20a\x20runtime\x20CUSTOM\x20role','The\x20current\x20runtime\x20role\x20API\x20does\x20not\x20support\x20clearing\x20an\x20existing\x20remark.','--remark\x20must\x20not\x20be\x20blank.','5soewGW','/client/permit/role/update','Preview:\x20update\x20a\x20runtime\x20CUSTOM\x20role','3395985QPBXEu','validation','4199352WwEKbU','Pass\x20--name\x20or\x20--remark\x20to\x20update\x20the\x20runtime\x20role.','15900SZGnjB','5981373iWfxef','333244pBhfSf','high-risk-write','3164456Nmituq','update','10mmzBwH','--name\x20must\x20not\x20be\x20blank.','2863bMVLBN','remark','修改当前运行应用中的自定义角色名称或备注;变更会立即影响角色展示。','appCode','role','POST'];a54_0x4699=function(){return _0x4f2d03;};return a54_0x4699();}const a54_0xe8e40f=a54_0x2efa;(function(_0x109492,_0xe96358){const _0x107f1b=a54_0x2efa,_0x477131=_0x109492();while(!![]){try{const _0x1779a8=parseInt(_0x107f1b(0x1dd))/0x1*(parseInt(_0x107f1b(0x1e6))/0x2)+-parseInt(_0x107f1b(0x1e2))/0x3+-parseInt(_0x107f1b(0x1d9))/0x4+-parseInt(_0x107f1b(0x1e0))/0x5+parseInt(_0x107f1b(0x1e4))/0x6*(parseInt(_0x107f1b(0x1cc))/0x7)+parseInt(_0x107f1b(0x1e8))/0x8+parseInt(_0x107f1b(0x1e5))/0x9*(parseInt(_0x107f1b(0x1ca))/0xa);if(_0x1779a8===_0xe96358)break;else _0x477131['push'](_0x477131['shift']());}catch(_0x1fcc41){_0x477131['push'](_0x477131['shift']());}}}(a54_0x4699,0xca657));import{updateRuntimeAppRole}from'../../core/api-client.js';function a54_0x2efa(_0x4bd48a,_0x34ad55){_0x4bd48a=_0x4bd48a-0x1c9;const _0x46992a=a54_0x4699();let _0x2efa04=_0x46992a[_0x4bd48a];return _0x2efa04;}import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';import{assertCustomRuntimeRole,getRuntimeRoleById,projectRuntimeRole,ROLE_ID_FLAG,runtimeRoleWriteResult}from'../../commands/role/shared.js';function updateFields(_0x3686f8){const _0x1a931f=a54_0x2efa,_0x143830=_0x3686f8[_0x1a931f(0x1d8)]('name')!==undefined,_0x11420c=_0x3686f8[_0x1a931f(0x1d8)](_0x1a931f(0x1cd))!==undefined;if(!_0x143830&&!_0x11420c)throw CliErrors[_0x1a931f(0x1e1)](_0x1a931f(0x1e3));const _0x5e975c=_0x3686f8[_0x1a931f(0x1d2)](_0x1a931f(0x1d6))[_0x1a931f(0x1d7)](),_0xf5258a=_0x3686f8[_0x1a931f(0x1d2)](_0x1a931f(0x1cd))[_0x1a931f(0x1d7)]();if(_0x143830&&!_0x5e975c)throw CliErrors['validation'](_0x1a931f(0x1cb));if(_0x11420c&&!_0xf5258a)throw CliErrors[_0x1a931f(0x1e1)](_0x1a931f(0x1dc),_0x1a931f(0x1db));return{..._0x143830?{'roleName':_0x5e975c}:{},..._0x11420c?{'remark':_0xf5258a}:{}};}async function prepare(_0x385caa){const _0x38dadc=a54_0x2efa,_0x5601b9=await getRuntimeRoleById(_0x385caa[_0x38dadc(0x1cf)],_0x385caa[_0x38dadc(0x1d5)]('id'));return assertCustomRuntimeRole(_0x5601b9,_0x38dadc(0x1c9)),{'role':_0x5601b9,'body':{'id':_0x5601b9['id'],'appCode':_0x385caa[_0x38dadc(0x1cf)],...updateFields(_0x385caa)}};}export const roleUpdate={'service':a54_0xe8e40f(0x1d0),'command':a54_0xe8e40f(0x1c9),'description':a54_0xe8e40f(0x1da),'risk':a54_0xe8e40f(0x1e7),'confirmationDescription':a54_0xe8e40f(0x1ce),'flags':[ROLE_ID_FLAG,{'name':a54_0xe8e40f(0x1d6),'type':'string','description':a54_0xe8e40f(0x1d3)},{'name':'remark','type':'string','description':a54_0xe8e40f(0x1d4)}],async 'validate'(_0x561c00){updateFields(_0x561c00);},async 'dryRun'(_0x30bb82){const _0x168304=a54_0xe8e40f,{body:_0x2c46cc}=await prepare(_0x30bb82);return dryRun(_0x168304(0x1d1),_0x168304(0x1de))['body'](_0x2c46cc)['description'](_0x168304(0x1df))['build']();},async 'execute'(_0x55be51){const _0x3b14c6=a54_0xe8e40f,{role:_0x1da10a,body:_0xa77117}=await prepare(_0x55be51),_0xae0f79=await updateRuntimeAppRole(_0xa77117);return{'ok':!![],'data':runtimeRoleWriteResult(_0x3b14c6(0x1c9),{'roleId':_0x1da10a['id']},projectRuntimeRole(_0x1da10a),projectRuntimeRole(_0xae0f79),{'method':_0x3b14c6(0x1d1),'path':'/client/permit/role/update'})};}};
1
+ const a54_0x114178=a54_0x16c9;function a54_0x43e3(){const _0x2ff7b2=['New\x20non-empty\x20role\x20remark','Update\x20a\x20runtime\x20CUSTOM\x20role','trim','470qmiEWJ','修改当前运行应用中的自定义角色名称或备注;变更会立即影响角色展示。','New\x20role\x20name','str','Pass\x20--name\x20or\x20--remark\x20to\x20update\x20the\x20runtime\x20role.','build','high-risk-write','name','remark','body','2325120VmcpYa','The\x20current\x20runtime\x20role\x20API\x20does\x20not\x20support\x20clearing\x20an\x20existing\x20remark.','23070evITcW','appCode','--name\x20must\x20not\x20be\x20blank.','415101kXyPMz','2ONSsay','description','482877Frsyen','835feoitp','validation','update','9904580qmGwYb','1151391uMYrYo','--remark\x20must\x20not\x20be\x20blank.','POST','string','role','Preview:\x20update\x20a\x20runtime\x20CUSTOM\x20role','/client/permit/role/update','flag','3231228xOuhGK'];a54_0x43e3=function(){return _0x2ff7b2;};return a54_0x43e3();}(function(_0x1d7e88,_0x3498b5){const _0x3b3b1f=a54_0x16c9,_0x5202e1=_0x1d7e88();while(!![]){try{const _0x3e8c2d=-parseInt(_0x3b3b1f(0x100))/0x1+-parseInt(_0x3b3b1f(0x101))/0x2*(-parseInt(_0x3b3b1f(0x108))/0x3)+parseInt(_0x3b3b1f(0x110))/0x4+-parseInt(_0x3b3b1f(0x104))/0x5*(parseInt(_0x3b3b1f(0xfd))/0x6)+-parseInt(_0x3b3b1f(0x107))/0x7+-parseInt(_0x3b3b1f(0xfb))/0x8+parseInt(_0x3b3b1f(0x103))/0x9*(parseInt(_0x3b3b1f(0x114))/0xa);if(_0x3e8c2d===_0x3498b5)break;else _0x5202e1['push'](_0x5202e1['shift']());}catch(_0x49208e){_0x5202e1['push'](_0x5202e1['shift']());}}}(a54_0x43e3,0xe80e3));import{updateRuntimeAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';function a54_0x16c9(_0xdfc690,_0x149b9c){_0xdfc690=_0xdfc690-0xf2;const _0x43e348=a54_0x43e3();let _0x16c96c=_0x43e348[_0xdfc690];return _0x16c96c;}import{assertCustomRuntimeRole,getRuntimeRoleById,projectRuntimeRole,ROLE_ID_FLAG,runtimeRoleWriteResult}from'../../commands/role/shared.js';function updateFields(_0x12f566){const _0x16167c=a54_0x16c9,_0x531a3a=_0x12f566[_0x16167c(0x10f)](_0x16167c(0xf8))!==undefined,_0x2dd5d3=_0x12f566[_0x16167c(0x10f)](_0x16167c(0xf9))!==undefined;if(!_0x531a3a&&!_0x2dd5d3)throw CliErrors['validation'](_0x16167c(0xf5));const _0x1c00f5=_0x12f566['str'](_0x16167c(0xf8))['trim'](),_0x205d96=_0x12f566[_0x16167c(0xf4)](_0x16167c(0xf9))[_0x16167c(0x113)]();if(_0x531a3a&&!_0x1c00f5)throw CliErrors[_0x16167c(0x105)](_0x16167c(0xff));if(_0x2dd5d3&&!_0x205d96)throw CliErrors['validation'](_0x16167c(0x109),_0x16167c(0xfc));return{..._0x531a3a?{'roleName':_0x1c00f5}:{},..._0x2dd5d3?{'remark':_0x205d96}:{}};}async function prepare(_0x4df768){const _0x3aebdf=a54_0x16c9,_0x351b05=await getRuntimeRoleById(_0x4df768[_0x3aebdf(0xfe)],_0x4df768['num']('id'));return assertCustomRuntimeRole(_0x351b05,'update'),{'role':_0x351b05,'body':{'id':_0x351b05['id'],'appCode':_0x4df768[_0x3aebdf(0xfe)],...updateFields(_0x4df768)}};}export const roleUpdate={'service':a54_0x114178(0x10c),'command':a54_0x114178(0x106),'description':a54_0x114178(0x112),'risk':a54_0x114178(0xf7),'confirmationDescription':a54_0x114178(0xf2),'flags':[ROLE_ID_FLAG,{'name':a54_0x114178(0xf8),'type':a54_0x114178(0x10b),'description':a54_0x114178(0xf3)},{'name':a54_0x114178(0xf9),'type':'string','description':a54_0x114178(0x111)}],async 'validate'(_0x35421b){updateFields(_0x35421b);},async 'dryRun'(_0x4ecad5){const _0x9e6e05=a54_0x114178,{body:_0x5fe7b8}=await prepare(_0x4ecad5);return dryRun(_0x9e6e05(0x10a),_0x9e6e05(0x10e))[_0x9e6e05(0xfa)](_0x5fe7b8)[_0x9e6e05(0x102)](_0x9e6e05(0x10d))[_0x9e6e05(0xf6)]();},async 'execute'(_0x107031){const _0x4e79f8=a54_0x114178,{role:_0x5b7e43,body:_0x5c4454}=await prepare(_0x107031),_0x3e8016=await updateRuntimeAppRole(_0x5c4454);return{'ok':!![],'data':runtimeRoleWriteResult('update',{'roleId':_0x5b7e43['id']},projectRuntimeRole(_0x5b7e43),projectRuntimeRole(_0x3e8016),{'method':'POST','path':_0x4e79f8(0x10e)})};}};
@@ -1 +1 @@
1
- function a55_0x17db(){const _0x149b1d=['roleList','7893EHBDby','shouldWrite','1725545iJtPSb','Add\x20a\x20numeric\x20userId\x20to\x20one\x20runtime\x20role','user-add','role','/client/permit/user-role/update-user-list','2858690ktDSBH','172139LmGVRa','132SedvXn','3RjQbJi','4ECiIfU','10080kHGkrj','high-risk-write','55782fOPOXX','POST','userId','build','before','description','441720NYQKpI','appCode','warnings','637106sintwt','after','把指定运行用户加入目标角色;该用户将获得该角色对应的运行权限。','791jbdMTV'];a55_0x17db=function(){return _0x149b1d;};return a55_0x17db();}const a55_0x251977=a55_0x1893;(function(_0x10bc00,_0x45ad24){const _0x41e9b9=a55_0x1893,_0x2646d7=_0x10bc00();while(!![]){try{const _0x12f215=parseInt(_0x41e9b9(0x192))/0x1+-parseInt(_0x41e9b9(0x195))/0x2*(-parseInt(_0x41e9b9(0x1a4))/0x3)+parseInt(_0x41e9b9(0x189))/0x4*(-parseInt(_0x41e9b9(0x19c))/0x5)+-parseInt(_0x41e9b9(0x18c))/0x6*(-parseInt(_0x41e9b9(0x198))/0x7)+-parseInt(_0x41e9b9(0x18a))/0x8*(parseInt(_0x41e9b9(0x19a))/0x9)+parseInt(_0x41e9b9(0x1a1))/0xa+parseInt(_0x41e9b9(0x1a2))/0xb*(parseInt(_0x41e9b9(0x1a3))/0xc);if(_0x12f215===_0x45ad24)break;else _0x2646d7['push'](_0x2646d7['shift']());}catch(_0x493b35){_0x2646d7['push'](_0x2646d7['shift']());}}}(a55_0x17db,0xc7e19));import{updateRuntimeRoleUsers}from'../../core/api-client.js';function a55_0x1893(_0x1accd9,_0x2b5550){_0x1accd9=_0x1accd9-0x189;const _0x17db04=a55_0x17db();let _0x189327=_0x17db04[_0x1accd9];return _0x189327;}import{dryRun}from'../../framework/dryrun.js';import{EXPECT_USER_COUNT_FLAG,prepareRuntimeMemberMutation,ROLE_REF_FLAG,runtimeRoleWriteResult,USER_ID_FLAG}from'../../commands/role/shared.js';export const roleUserAdd={'service':a55_0x251977(0x19f),'command':'user-add','description':a55_0x251977(0x19d),'risk':a55_0x251977(0x18b),'confirmationDescription':a55_0x251977(0x197),'flags':[ROLE_REF_FLAG,USER_ID_FLAG,EXPECT_USER_COUNT_FLAG],async 'dryRun'(_0x376334){const _0x446e2c=a55_0x251977,_0x5ca80a=await prepareRuntimeMemberMutation(_0x376334,_0x446e2c(0x19e));return dryRun(_0x446e2c(0x18d),_0x446e2c(0x1a0))['body']({'appCode':_0x376334[_0x446e2c(0x193)],'roleList':_0x5ca80a[_0x446e2c(0x199)]})[_0x446e2c(0x191)](_0x5ca80a[_0x446e2c(0x19b)]?'Preview:\x20add\x20runtime\x20role\x20member':_0x5ca80a[_0x446e2c(0x194)][0x0])[_0x446e2c(0x18f)]();},async 'execute'(_0x137e27){const _0x491c40=a55_0x251977,_0x1ada86=await prepareRuntimeMemberMutation(_0x137e27,'user-add');return _0x1ada86[_0x491c40(0x19b)]&&await updateRuntimeRoleUsers(_0x137e27['appCode'],_0x1ada86['roleList']),{'ok':!![],'data':runtimeRoleWriteResult(_0x491c40(0x19e),{'roleId':_0x1ada86['role']['id'],'userId':_0x1ada86[_0x491c40(0x18e)]},_0x1ada86[_0x491c40(0x190)],_0x1ada86[_0x491c40(0x196)],{'method':_0x491c40(0x18d),'path':_0x491c40(0x1a0)},_0x1ada86[_0x491c40(0x194)])};}};
1
+ const a55_0x254de4=a55_0x2458;(function(_0x3b6105,_0x5ae341){const _0x343005=a55_0x2458,_0x3e9bce=_0x3b6105();while(!![]){try{const _0x890b80=parseInt(_0x343005(0x188))/0x1*(parseInt(_0x343005(0x186))/0x2)+-parseInt(_0x343005(0x194))/0x3+parseInt(_0x343005(0x183))/0x4+-parseInt(_0x343005(0x182))/0x5+-parseInt(_0x343005(0x191))/0x6+-parseInt(_0x343005(0x18e))/0x7+parseInt(_0x343005(0x192))/0x8;if(_0x890b80===_0x5ae341)break;else _0x3e9bce['push'](_0x3e9bce['shift']());}catch(_0x184769){_0x3e9bce['push'](_0x3e9bce['shift']());}}}(a55_0x1737,0x9d5ab));function a55_0x2458(_0x242a62,_0x2d959b){_0x242a62=_0x242a62-0x181;const _0x173714=a55_0x1737();let _0x24585a=_0x173714[_0x242a62];return _0x24585a;}import{updateRuntimeRoleUsers}from'../../core/api-client.js';import{dryRun}from'../../framework/dryrun.js';import{EXPECT_USER_COUNT_FLAG,prepareRuntimeMemberMutation,ROLE_REF_FLAG,runtimeRoleWriteResult,USER_ID_FLAG}from'../../commands/role/shared.js';function a55_0x1737(){const _0x39265f=['after','warnings','2134BFLKNQ','roleList','1065InLmOw','description','POST','user-add','build','userId','3499741VOhkDL','Add\x20a\x20numeric\x20userId\x20to\x20one\x20runtime\x20role','role','5015988ORreCi','2523040tePtxM','把指定运行用户加入目标角色;该用户将获得该角色对应的运行权限。','1475019lzREYJ','shouldWrite','body','high-risk-write','/client/permit/user-role/update-user-list','Preview:\x20add\x20runtime\x20role\x20member','752545IPPSoV','4683724LuTaXG'];a55_0x1737=function(){return _0x39265f;};return a55_0x1737();}export const roleUserAdd={'service':a55_0x254de4(0x190),'command':'user-add','description':a55_0x254de4(0x18f),'risk':a55_0x254de4(0x197),'confirmationDescription':a55_0x254de4(0x193),'flags':[ROLE_REF_FLAG,USER_ID_FLAG,EXPECT_USER_COUNT_FLAG],async 'dryRun'(_0x62315){const _0x4378a1=a55_0x254de4,_0x4a510f=await prepareRuntimeMemberMutation(_0x62315,_0x4378a1(0x18b));return dryRun(_0x4378a1(0x18a),_0x4378a1(0x198))[_0x4378a1(0x196)]({'appCode':_0x62315['appCode'],'roleList':_0x4a510f[_0x4378a1(0x187)]})[_0x4378a1(0x189)](_0x4a510f[_0x4378a1(0x195)]?_0x4378a1(0x181):_0x4a510f[_0x4378a1(0x185)][0x0])[_0x4378a1(0x18c)]();},async 'execute'(_0x323b9d){const _0x31d47b=a55_0x254de4,_0x54391c=await prepareRuntimeMemberMutation(_0x323b9d,_0x31d47b(0x18b));return _0x54391c['shouldWrite']&&await updateRuntimeRoleUsers(_0x323b9d['appCode'],_0x54391c[_0x31d47b(0x187)]),{'ok':!![],'data':runtimeRoleWriteResult('user-add',{'roleId':_0x54391c['role']['id'],'userId':_0x54391c[_0x31d47b(0x18d)]},_0x54391c['before'],_0x54391c[_0x31d47b(0x184)],{'method':'POST','path':_0x31d47b(0x198)},_0x54391c[_0x31d47b(0x185)])};}};
@@ -1 +1 @@
1
- const a56_0x512e15=a56_0x2f41;(function(_0x289dba,_0x3d5812){const _0x2e6f26=a56_0x2f41,_0x2696f6=_0x289dba();while(!![]){try{const _0x41f08b=-parseInt(_0x2e6f26(0x186))/0x1*(parseInt(_0x2e6f26(0x182))/0x2)+-parseInt(_0x2e6f26(0x18b))/0x3*(parseInt(_0x2e6f26(0x185))/0x4)+parseInt(_0x2e6f26(0x178))/0x5+-parseInt(_0x2e6f26(0x18a))/0x6*(parseInt(_0x2e6f26(0x183))/0x7)+parseInt(_0x2e6f26(0x17e))/0x8+parseInt(_0x2e6f26(0x17b))/0x9*(parseInt(_0x2e6f26(0x187))/0xa)+parseInt(_0x2e6f26(0x180))/0xb;if(_0x41f08b===_0x3d5812)break;else _0x2696f6['push'](_0x2696f6['shift']());}catch(_0x310a03){_0x2696f6['push'](_0x2696f6['shift']());}}}(a56_0x3f8b,0x8d960));function a56_0x2f41(_0x182a3d,_0x3c1c8d){_0x182a3d=_0x182a3d-0x177;const _0x3f8b89=a56_0x3f8b();let _0x2f4124=_0x3f8b89[_0x182a3d];return _0x2f4124;}import{updateRuntimeRoleUsers}from'../../core/api-client.js';import{dryRun}from'../../framework/dryrun.js';function a56_0x3f8b(){const _0x11b4b3=['436329AkMDXc','high-risk-write','roleList','3781008PdRmpk','user-remove','12461999NGXinb','role','83454DYBYzq','7uzgJCs','shouldWrite','40132EReEWO','17GkXpci','200xeoXUY','warnings','/client/permit/user-role/update-user-list','3179850YInQez','330dzDykr','build','body','userId','POST','after','description','把指定运行用户移出目标角色;该用户将失去仅由该角色授予的运行权限。','1738725dnarzz','Remove\x20a\x20numeric\x20userId\x20from\x20one\x20runtime\x20role','appCode'];a56_0x3f8b=function(){return _0x11b4b3;};return a56_0x3f8b();}import{EXPECT_USER_COUNT_FLAG,prepareRuntimeMemberMutation,ROLE_REF_FLAG,runtimeRoleWriteResult,USER_ID_FLAG}from'../../commands/role/shared.js';export const roleUserRemove={'service':a56_0x512e15(0x181),'command':a56_0x512e15(0x17f),'description':a56_0x512e15(0x179),'risk':a56_0x512e15(0x17c),'confirmationDescription':a56_0x512e15(0x177),'flags':[ROLE_REF_FLAG,USER_ID_FLAG,EXPECT_USER_COUNT_FLAG],async 'dryRun'(_0x1ee1e4){const _0x4f6bad=a56_0x512e15,_0x5baded=await prepareRuntimeMemberMutation(_0x1ee1e4,_0x4f6bad(0x17f));return dryRun(_0x4f6bad(0x18f),_0x4f6bad(0x189))[_0x4f6bad(0x18d)]({'appCode':_0x1ee1e4[_0x4f6bad(0x17a)],'roleList':_0x5baded[_0x4f6bad(0x17d)]})[_0x4f6bad(0x191)](_0x5baded[_0x4f6bad(0x184)]?'Preview:\x20remove\x20runtime\x20role\x20member':_0x5baded[_0x4f6bad(0x188)][0x0])[_0x4f6bad(0x18c)]();},async 'execute'(_0x13c0e8){const _0x3a0f05=a56_0x512e15,_0x2c396a=await prepareRuntimeMemberMutation(_0x13c0e8,'user-remove');return _0x2c396a[_0x3a0f05(0x184)]&&await updateRuntimeRoleUsers(_0x13c0e8[_0x3a0f05(0x17a)],_0x2c396a[_0x3a0f05(0x17d)]),{'ok':!![],'data':runtimeRoleWriteResult('user-remove',{'roleId':_0x2c396a['role']['id'],'userId':_0x2c396a[_0x3a0f05(0x18e)]},_0x2c396a['before'],_0x2c396a[_0x3a0f05(0x190)],{'method':'POST','path':'/client/permit/user-role/update-user-list'},_0x2c396a[_0x3a0f05(0x188)])};}};
1
+ const a56_0x326184=a56_0x1b40;(function(_0x5979bb,_0x203d3e){const _0x1c87e4=a56_0x1b40,_0x47ae09=_0x5979bb();while(!![]){try{const _0x53b6b6=-parseInt(_0x1c87e4(0x1ea))/0x1*(-parseInt(_0x1c87e4(0x1f3))/0x2)+parseInt(_0x1c87e4(0x1f9))/0x3+-parseInt(_0x1c87e4(0x1fb))/0x4*(-parseInt(_0x1c87e4(0x1ff))/0x5)+parseInt(_0x1c87e4(0x1f2))/0x6*(-parseInt(_0x1c87e4(0x1fa))/0x7)+-parseInt(_0x1c87e4(0x1f7))/0x8+parseInt(_0x1c87e4(0x1fd))/0x9+-parseInt(_0x1c87e4(0x1f4))/0xa;if(_0x53b6b6===_0x203d3e)break;else _0x47ae09['push'](_0x47ae09['shift']());}catch(_0x3d6b68){_0x47ae09['push'](_0x47ae09['shift']());}}}(a56_0x37dc,0xa8036));function a56_0x37dc(){const _0x5823ef=['high-risk-write','roleList','102798fjmPOd','1475742ssGDNk','10400490tzvsOz','Preview:\x20remove\x20runtime\x20role\x20member','after','666152aNLtXB','user-remove','1323147IAFWgY','301uJrTiE','4RbMjox','Remove\x20a\x20numeric\x20userId\x20from\x20one\x20runtime\x20role','3771153heBWCa','shouldWrite','4751410rYtKXB','把指定运行用户移出目标角色;该用户将失去仅由该角色授予的运行权限。','warnings','1wLiLsu','POST','build','/client/permit/user-role/update-user-list','role','userId'];a56_0x37dc=function(){return _0x5823ef;};return a56_0x37dc();}import{updateRuntimeRoleUsers}from'../../core/api-client.js';import{dryRun}from'../../framework/dryrun.js';function a56_0x1b40(_0xb96dab,_0x222e1f){_0xb96dab=_0xb96dab-0x1ea;const _0x37dc7d=a56_0x37dc();let _0x1b4088=_0x37dc7d[_0xb96dab];return _0x1b4088;}import{EXPECT_USER_COUNT_FLAG,prepareRuntimeMemberMutation,ROLE_REF_FLAG,runtimeRoleWriteResult,USER_ID_FLAG}from'../../commands/role/shared.js';export const roleUserRemove={'service':'role','command':'user-remove','description':a56_0x326184(0x1fc),'risk':a56_0x326184(0x1f0),'confirmationDescription':a56_0x326184(0x200),'flags':[ROLE_REF_FLAG,USER_ID_FLAG,EXPECT_USER_COUNT_FLAG],async 'dryRun'(_0x45e047){const _0x3bd2b0=a56_0x326184,_0x14cd0f=await prepareRuntimeMemberMutation(_0x45e047,_0x3bd2b0(0x1f8));return dryRun(_0x3bd2b0(0x1eb),'/client/permit/user-role/update-user-list')['body']({'appCode':_0x45e047['appCode'],'roleList':_0x14cd0f[_0x3bd2b0(0x1f1)]})['description'](_0x14cd0f[_0x3bd2b0(0x1fe)]?_0x3bd2b0(0x1f5):_0x14cd0f[_0x3bd2b0(0x201)][0x0])[_0x3bd2b0(0x1ec)]();},async 'execute'(_0x8f7b37){const _0x35a44b=a56_0x326184,_0x859d7c=await prepareRuntimeMemberMutation(_0x8f7b37,_0x35a44b(0x1f8));return _0x859d7c['shouldWrite']&&await updateRuntimeRoleUsers(_0x8f7b37['appCode'],_0x859d7c[_0x35a44b(0x1f1)]),{'ok':!![],'data':runtimeRoleWriteResult(_0x35a44b(0x1f8),{'roleId':_0x859d7c[_0x35a44b(0x1ee)]['id'],'userId':_0x859d7c[_0x35a44b(0x1ef)]},_0x859d7c['before'],_0x859d7c[_0x35a44b(0x1f6)],{'method':'POST','path':_0x35a44b(0x1ed)},_0x859d7c[_0x35a44b(0x201)])};}};