@lovrabet/lovrabet-cli 2.2.4-beta.3 → 2.2.5-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 (160) 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.d.ts +7 -0
  140. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  141. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  142. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  143. package/lib/skills/runtime-skill-sync/push.js +1 -1
  144. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  145. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  146. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  147. package/lib/skills/runtime-skill-sync.d.ts +1 -1
  148. package/lib/skills/runtime-skill-sync.js +1 -1
  149. package/lib/skills/skill-presence.js +1 -1
  150. package/lib/utils/apply-jq-filter.js +1 -1
  151. package/lib/utils/logger.js +1 -1
  152. package/lib/utils/lossless-json.js +1 -1
  153. package/lib/utils/params.js +1 -1
  154. package/lib/utils/platform.js +1 -1
  155. package/lib/utils/update-notice.js +1 -1
  156. package/lib/utils/version.js +1 -1
  157. package/lib/utils/write-cli-side-channel.js +1 -1
  158. package/package.json +1 -1
  159. package/skills/lovrabet/SKILL.md +1 -1
  160. package/skills/lovrabet.manifest.json +3 -3
@@ -1 +1 @@
1
- const a43_0x397a0b=a43_0xbf78;(function(_0x482fc3,_0x2453dc){const _0x559400=a43_0xbf78,_0x38cc47=_0x482fc3();while(!![]){try{const _0xc92943=-parseInt(_0x559400(0x117))/0x1+-parseInt(_0x559400(0x113))/0x2+-parseInt(_0x559400(0x10c))/0x3*(parseInt(_0x559400(0x133))/0x4)+-parseInt(_0x559400(0x12a))/0x5+-parseInt(_0x559400(0x123))/0x6+parseInt(_0x559400(0x12f))/0x7+parseInt(_0x559400(0x118))/0x8;if(_0xc92943===_0x2453dc)break;else _0x38cc47['push'](_0x38cc47['shift']());}catch(_0x329092){_0x38cc47['push'](_0x38cc47['shift']());}}}(a43_0x3318,0x46722));function a43_0x3318(){const _0x11f5d7=['883372xpnLfs','map','/client/permit/resource/batch-save-menu','--menus','1945436LUqRcX','授予或收回目标角色对指定运行菜单的访问权限;变更会影响该角色用户的菜单可见性。','validation','\x20already\x20reflects\x20','body','3VvEfFg','role-menus-set','menu-','Invalid\x20runtime\x20menu\x20ID:\x20','\x20was\x20not\x20found.','str','Comma-separated\x20runtime\x20menu\x20IDs','568272DyZoac','isSafeInteger','changed','operation','78981KZcIPH','12353160daDnqd','push','Grant\x20or\x20revoke\x20selected\x20runtime\x20menus\x20for\x20one\x20role','revoke','after','rolePermit','POST','appCode','permitList','warnings','Preview:\x20','1463172JfTeuQ','build','role','grant','high-risk-write','menus','bool','1442285rQgatj','\x20selected\x20runtime\x20menus','length','permit','Runtime\x20menu\x20'];a43_0x3318=function(){return _0x11f5d7;};return a43_0x3318();}function a43_0xbf78(_0x25151c,_0x33c2ed){_0x25151c=_0x25151c-0x108;const _0x331895=a43_0x3318();let _0xbf78b2=_0x331895[_0x25151c];return _0xbf78b2;}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_0x397a0b(0x128),'type':'string','required':!![],'description':a43_0x397a0b(0x112)};async function prepare(_0x5a9716){const _0x4d222b=a43_0x397a0b;await assertRuntimePermissionManager(_0x5a9716[_0x4d222b(0x11f)]);const _0xb1d224=assertGrantOrRevoke(_0x5a9716['bool'](_0x4d222b(0x126)),_0x5a9716[_0x4d222b(0x129)]('revoke')),_0x5eda13=await resolveRuntimeRoleRef(_0x5a9716[_0x4d222b(0x11f)],_0x5a9716[_0x4d222b(0x111)](_0x4d222b(0x125)));assertRuntimePermitRoleConfigurable(_0x5eda13);const _0x383062=[...new Set(splitRefs(_0x5a9716[_0x4d222b(0x111)](_0x4d222b(0x128)),_0x4d222b(0x132))[_0x4d222b(0x130)](_0x51aa60=>{const _0x33142a=_0x4d222b,_0x5a9391=Number(_0x51aa60);if(!/^\d+$/['test'](_0x51aa60)||!Number[_0x33142a(0x114)](_0x5a9391)||_0x5a9391<=0x0)throw CliErrors['validation'](_0x33142a(0x10f)+_0x51aa60+'.');return _0x5a9391;}))],_0x488a2b=flattenRuntimeMenuRolePermits(await listRuntimeMenuRolePermits(_0x5a9716['appCode'])),_0x14daeb=await listRuntimePermitRoles(_0x5a9716[_0x4d222b(0x11f)]),_0x39155b=[],_0x5d8597=[],_0x4cae6d=[],_0x33e830=[];for(const _0x103e74 of _0x383062){const _0x71f6a9=_0x488a2b['find'](_0xe49602=>_0xe49602['id']===_0x103e74);if(!_0x71f6a9)throw CliErrors[_0x4d222b(0x109)]('Runtime\x20menu\x20'+_0x103e74+_0x4d222b(0x110));const _0x3cb87f=applyRuntimeRolePermission(_0x71f6a9[_0x4d222b(0x11d)],_0x5eda13,_0x14daeb,_0xb1d224);_0x5d8597['push']({'menuId':_0x103e74,'rolePermit':_0x71f6a9[_0x4d222b(0x11d)]}),_0x4cae6d['push']({'menuId':_0x103e74,'rolePermit':_0x3cb87f['roles']});if(_0x3cb87f[_0x4d222b(0x115)])_0x39155b['push'](menuPermitDto(_0x5a9716[_0x4d222b(0x11f)],_0x71f6a9,_0x3cb87f['roles']));else _0x33e830[_0x4d222b(0x119)](_0x4d222b(0x12e)+_0x103e74+_0x4d222b(0x10a)+_0xb1d224+'\x20for\x20role\x20'+_0x5eda13['id']+'.');}return{'operation':_0xb1d224,'role':_0x5eda13,'menuIds':_0x383062,'permitList':_0x39155b,'before':_0x5d8597,'after':_0x4cae6d,'warnings':_0x33e830};}export const permitRoleMenusSet={'service':a43_0x397a0b(0x12d),'command':a43_0x397a0b(0x10d),'description':a43_0x397a0b(0x11a),'risk':a43_0x397a0b(0x127),'confirmationDescription':a43_0x397a0b(0x108),'flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,MENUS_FLAG],async 'validate'(_0x164a57){const _0x3c4346=a43_0x397a0b;assertGrantOrRevoke(_0x164a57[_0x3c4346(0x129)](_0x3c4346(0x126)),_0x164a57['bool'](_0x3c4346(0x11b)));},async 'dryRun'(_0x395706){const _0x10067f=a43_0x397a0b,_0x1c1617=await prepare(_0x395706);return dryRun(_0x10067f(0x11e),_0x10067f(0x131))[_0x10067f(0x10b)]({'appCode':_0x395706[_0x10067f(0x11f)],'permitList':_0x1c1617[_0x10067f(0x120)]})['description'](_0x10067f(0x122)+_0x1c1617[_0x10067f(0x116)]+_0x10067f(0x12b))[_0x10067f(0x124)]();},async 'execute'(_0x45aa2f){const _0x49cce1=a43_0x397a0b,_0x59204b=await prepare(_0x45aa2f);return _0x59204b[_0x49cce1(0x120)][_0x49cce1(0x12c)]>0x0&&await saveRuntimeMenuRolePermits(_0x45aa2f['appCode'],_0x59204b[_0x49cce1(0x120)]),{'ok':!![],'data':runtimePermitWriteResult(_0x49cce1(0x10e)+_0x59204b[_0x49cce1(0x116)],{'roleId':_0x59204b[_0x49cce1(0x125)]['id'],'menuIds':_0x59204b['menuIds']},_0x59204b['before'],_0x59204b[_0x49cce1(0x11c)],{'method':_0x49cce1(0x11e),'path':'/client/permit/resource/batch-save-menu'},_0x59204b[_0x49cce1(0x121)])};}};
1
+ const a43_0x2f11e0=a43_0x2c3e;(function(_0x40336a,_0x3c7174){const _0x3eef2f=a43_0x2c3e,_0x340d52=_0x40336a();while(!![]){try{const _0x232023=-parseInt(_0x3eef2f(0xe2))/0x1*(-parseInt(_0x3eef2f(0xe3))/0x2)+parseInt(_0x3eef2f(0xe8))/0x3+parseInt(_0x3eef2f(0x10c))/0x4*(parseInt(_0x3eef2f(0x107))/0x5)+-parseInt(_0x3eef2f(0xff))/0x6+parseInt(_0x3eef2f(0x102))/0x7+-parseInt(_0x3eef2f(0x104))/0x8*(parseInt(_0x3eef2f(0xf9))/0x9)+-parseInt(_0x3eef2f(0xed))/0xa;if(_0x232023===_0x3c7174)break;else _0x340d52['push'](_0x340d52['shift']());}catch(_0x3e238a){_0x340d52['push'](_0x340d52['shift']());}}}(a43_0x236b,0xa281c));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_0x2f11e0(0x101),'type':'string','required':!![],'description':'Comma-separated\x20runtime\x20menu\x20IDs'};function a43_0x236b(){const _0x49bb=['find','/client/permit/resource/batch-save-menu','bool','262667CKHBNL','10fNLUoN','str','grant','warnings','授予或收回目标角色对指定运行菜单的访问权限;变更会影响该角色用户的菜单可见性。','629760hrkRdP','role-menus-set','role','operation','after','20040770NhKCnR','test','Runtime\x20menu\x20','before','rolePermit','roles','POST','Preview:\x20','description','changed','\x20already\x20reflects\x20','\x20selected\x20runtime\x20menus','2037213HtTgai','build','push','Grant\x20or\x20revoke\x20selected\x20runtime\x20menus\x20for\x20one\x20role','\x20was\x20not\x20found.','\x20for\x20role\x20','5408766FvOcsM','menuIds','menus','7698999cEEXXs','isSafeInteger','8ohTOCG','revoke','permit','6035gTgBDs','permitList','length','appCode','validation','3892wcDQfn','map'];a43_0x236b=function(){return _0x49bb;};return a43_0x236b();}function a43_0x2c3e(_0x1218a8,_0x46607a){_0x1218a8=_0x1218a8-0xde;const _0x236b0f=a43_0x236b();let _0x2c3e6e=_0x236b0f[_0x1218a8];return _0x2c3e6e;}async function prepare(_0x3f4773){const _0x3fbc3e=a43_0x2f11e0;await assertRuntimePermissionManager(_0x3f4773[_0x3fbc3e(0x10a)]);const _0xb022c=assertGrantOrRevoke(_0x3f4773[_0x3fbc3e(0xe1)]('grant'),_0x3f4773[_0x3fbc3e(0xe1)](_0x3fbc3e(0x105))),_0x5a2aa4=await resolveRuntimeRoleRef(_0x3f4773[_0x3fbc3e(0x10a)],_0x3f4773[_0x3fbc3e(0xe4)](_0x3fbc3e(0xea)));assertRuntimePermitRoleConfigurable(_0x5a2aa4);const _0x3ad9d8=[...new Set(splitRefs(_0x3f4773['str'](_0x3fbc3e(0x101)),'--menus')[_0x3fbc3e(0xde)](_0x5ac91d=>{const _0x555bdc=_0x3fbc3e,_0x1603ad=Number(_0x5ac91d);if(!/^\d+$/[_0x555bdc(0xee)](_0x5ac91d)||!Number[_0x555bdc(0x103)](_0x1603ad)||_0x1603ad<=0x0)throw CliErrors[_0x555bdc(0x10b)]('Invalid\x20runtime\x20menu\x20ID:\x20'+_0x5ac91d+'.');return _0x1603ad;}))],_0x4044bb=flattenRuntimeMenuRolePermits(await listRuntimeMenuRolePermits(_0x3f4773[_0x3fbc3e(0x10a)])),_0x461ea4=await listRuntimePermitRoles(_0x3f4773[_0x3fbc3e(0x10a)]),_0x412170=[],_0x25f7f2=[],_0x1ae555=[],_0x42c310=[];for(const _0x2b53e1 of _0x3ad9d8){const _0xf21117=_0x4044bb[_0x3fbc3e(0xdf)](_0x16fcbf=>_0x16fcbf['id']===_0x2b53e1);if(!_0xf21117)throw CliErrors[_0x3fbc3e(0x10b)](_0x3fbc3e(0xef)+_0x2b53e1+_0x3fbc3e(0xfd));const _0x2d682c=applyRuntimeRolePermission(_0xf21117['rolePermit'],_0x5a2aa4,_0x461ea4,_0xb022c);_0x25f7f2[_0x3fbc3e(0xfb)]({'menuId':_0x2b53e1,'rolePermit':_0xf21117[_0x3fbc3e(0xf1)]}),_0x1ae555['push']({'menuId':_0x2b53e1,'rolePermit':_0x2d682c[_0x3fbc3e(0xf2)]});if(_0x2d682c[_0x3fbc3e(0xf6)])_0x412170['push'](menuPermitDto(_0x3f4773['appCode'],_0xf21117,_0x2d682c[_0x3fbc3e(0xf2)]));else _0x42c310[_0x3fbc3e(0xfb)]('Runtime\x20menu\x20'+_0x2b53e1+_0x3fbc3e(0xf7)+_0xb022c+_0x3fbc3e(0xfe)+_0x5a2aa4['id']+'.');}return{'operation':_0xb022c,'role':_0x5a2aa4,'menuIds':_0x3ad9d8,'permitList':_0x412170,'before':_0x25f7f2,'after':_0x1ae555,'warnings':_0x42c310};}export const permitRoleMenusSet={'service':a43_0x2f11e0(0x106),'command':a43_0x2f11e0(0xe9),'description':a43_0x2f11e0(0xfc),'risk':'high-risk-write','confirmationDescription':a43_0x2f11e0(0xe7),'flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,MENUS_FLAG],async 'validate'(_0x7c1bcd){const _0x31fe01=a43_0x2f11e0;assertGrantOrRevoke(_0x7c1bcd['bool'](_0x31fe01(0xe5)),_0x7c1bcd[_0x31fe01(0xe1)](_0x31fe01(0x105)));},async 'dryRun'(_0x54318c){const _0x53513c=a43_0x2f11e0,_0x4ae633=await prepare(_0x54318c);return dryRun(_0x53513c(0xf3),'/client/permit/resource/batch-save-menu')['body']({'appCode':_0x54318c[_0x53513c(0x10a)],'permitList':_0x4ae633[_0x53513c(0x108)]})[_0x53513c(0xf5)](_0x53513c(0xf4)+_0x4ae633[_0x53513c(0xeb)]+_0x53513c(0xf8))[_0x53513c(0xfa)]();},async 'execute'(_0x1b2e40){const _0x53282b=a43_0x2f11e0,_0x5a76ec=await prepare(_0x1b2e40);return _0x5a76ec['permitList'][_0x53282b(0x109)]>0x0&&await saveRuntimeMenuRolePermits(_0x1b2e40[_0x53282b(0x10a)],_0x5a76ec[_0x53282b(0x108)]),{'ok':!![],'data':runtimePermitWriteResult('menu-'+_0x5a76ec[_0x53282b(0xeb)],{'roleId':_0x5a76ec[_0x53282b(0xea)]['id'],'menuIds':_0x5a76ec[_0x53282b(0x100)]},_0x5a76ec[_0x53282b(0xf0)],_0x5a76ec[_0x53282b(0xec)],{'method':_0x53282b(0xf3),'path':_0x53282b(0xe0)},_0x5a76ec[_0x53282b(0xe6)])};}};
@@ -1 +1 @@
1
- const a44_0x38c6b4=a44_0x1ef4;function a44_0x1ef4(_0x4a98e3,_0x45d36c){_0x4a98e3=_0x4a98e3-0x84;const _0x2c176b=a44_0x2c17();let _0x1ef48c=_0x2c176b[_0x4a98e3];return _0x1ef48c;}(function(_0x4ca507,_0x2bfd7c){const _0xf2dd85=a44_0x1ef4,_0x435b2b=_0x4ca507();while(!![]){try{const _0x354a10=-parseInt(_0xf2dd85(0x88))/0x1*(-parseInt(_0xf2dd85(0x97))/0x2)+-parseInt(_0xf2dd85(0x86))/0x3*(parseInt(_0xf2dd85(0x91))/0x4)+parseInt(_0xf2dd85(0x87))/0x5+-parseInt(_0xf2dd85(0x85))/0x6*(-parseInt(_0xf2dd85(0x90))/0x7)+parseInt(_0xf2dd85(0x96))/0x8+-parseInt(_0xf2dd85(0x8d))/0x9*(-parseInt(_0xf2dd85(0x8c))/0xa)+parseInt(_0xf2dd85(0x98))/0xb*(-parseInt(_0xf2dd85(0x89))/0xc);if(_0x354a10===_0x2bfd7c)break;else _0x435b2b['push'](_0x435b2b['shift']());}catch(_0x28d006){_0x435b2b['push'](_0x435b2b['shift']());}}}(a44_0x2c17,0xf0936));function a44_0x2c17(){const _0x7cce71=['33bJklQr','appCode','19284aGwMHn','641487Nlamkd','3545815lljGBG','8308PnkgQG','11297892EigkWt','str','read','16630gXawAf','10485KvSJVo','runtime','permit','3304qEySSj','20jYbEkq','role-menus','roleType','role','roleName','2466864IWDOsI','98EWUDwF'];a44_0x2c17=function(){return _0x7cce71;};return a44_0x2c17();}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_0x38c6b4(0x8f),'command':a44_0x38c6b4(0x92),'description':'Show\x20evaluated\x20runtime\x20menu\x20access\x20for\x20one\x20role','risk':a44_0x38c6b4(0x8b),'flags':[ROLE_REF_FLAG],async 'execute'(_0x1357ae){const _0x5b5e5c=a44_0x38c6b4,_0x59053c=await resolveRuntimeRoleRef(_0x1357ae[_0x5b5e5c(0x84)],_0x1357ae[_0x5b5e5c(0x8a)](_0x5b5e5c(0x94))),_0x570de2=await getRuntimeRoleMenuResources(_0x1357ae['appCode'],_0x59053c['id']);return{'ok':!![],'data':{'scope':_0x5b5e5c(0x8e),'role':{'id':_0x59053c['id'],'roleName':_0x59053c[_0x5b5e5c(0x95)],'roleType':_0x59053c[_0x5b5e5c(0x93)]},'menus':_0x570de2}};}};
1
+ const a44_0x551056=a44_0x3666;(function(_0x4773fe,_0x1c8276){const _0x2c11df=a44_0x3666,_0xdbbcba=_0x4773fe();while(!![]){try{const _0x55d2ec=-parseInt(_0x2c11df(0x1ea))/0x1*(parseInt(_0x2c11df(0x1f0))/0x2)+-parseInt(_0x2c11df(0x1e7))/0x3*(parseInt(_0x2c11df(0x1e2))/0x4)+parseInt(_0x2c11df(0x1ec))/0x5+-parseInt(_0x2c11df(0x1eb))/0x6+-parseInt(_0x2c11df(0x1e6))/0x7*(-parseInt(_0x2c11df(0x1e1))/0x8)+parseInt(_0x2c11df(0x1e3))/0x9*(-parseInt(_0x2c11df(0x1e4))/0xa)+-parseInt(_0x2c11df(0x1e8))/0xb;if(_0x55d2ec===_0x1c8276)break;else _0xdbbcba['push'](_0xdbbcba['shift']());}catch(_0x2182fc){_0xdbbcba['push'](_0xdbbcba['shift']());}}}(a44_0x1212,0x5c5d6));import{getRuntimeRoleMenuResources}from'../../core/api-client.js';function a44_0x1212(){const _0x4a2ec3=['Show\x20evaluated\x20runtime\x20menu\x20access\x20for\x20one\x20role','roleName','appCode','742vGjfMh','104bQAcOj','76196QQaOsL','90zMtNdp','137630UZIlCV','roleType','376985bWhaCE','45UhpKOp','3555057CjArNv','str','1xEbluL','293802fntKtS','2370505QJHltl'];a44_0x1212=function(){return _0x4a2ec3;};return a44_0x1212();}import{resolveRuntimeRoleRef}from'../../commands/role/shared.js';import{ROLE_REF_FLAG}from'../../commands/permit/shared.js';function a44_0x3666(_0x4b9fef,_0x443dc9){_0x4b9fef=_0x4b9fef-0x1e1;const _0x12120d=a44_0x1212();let _0x366648=_0x12120d[_0x4b9fef];return _0x366648;}export const permitRoleMenus={'service':'permit','command':'role-menus','description':a44_0x551056(0x1ed),'risk':'read','flags':[ROLE_REF_FLAG],async 'execute'(_0x21045b){const _0x2127b2=a44_0x551056,_0x2607c3=await resolveRuntimeRoleRef(_0x21045b[_0x2127b2(0x1ef)],_0x21045b[_0x2127b2(0x1e9)]('role')),_0x57028f=await getRuntimeRoleMenuResources(_0x21045b['appCode'],_0x2607c3['id']);return{'ok':!![],'data':{'scope':'runtime','role':{'id':_0x2607c3['id'],'roleName':_0x2607c3[_0x2127b2(0x1ee)],'roleType':_0x2607c3[_0x2127b2(0x1e5)]},'menus':_0x57028f}};}};
@@ -1 +1 @@
1
- const a45_0x48fa07=a45_0x5dd5;(function(_0x2ea4d4,_0x3b2218){const _0x33570c=a45_0x5dd5,_0x2b9f6c=_0x2ea4d4();while(!![]){try{const _0x2ddd60=-parseInt(_0x33570c(0xa3))/0x1*(-parseInt(_0x33570c(0x90))/0x2)+-parseInt(_0x33570c(0xbb))/0x3*(parseInt(_0x33570c(0xb0))/0x4)+parseInt(_0x33570c(0xac))/0x5+-parseInt(_0x33570c(0x8f))/0x6*(-parseInt(_0x33570c(0x9a))/0x7)+parseInt(_0x33570c(0x91))/0x8+parseInt(_0x33570c(0xc1))/0x9+parseInt(_0x33570c(0xbf))/0xa*(-parseInt(_0x33570c(0x95))/0xb);if(_0x2ddd60===_0x3b2218)break;else _0x2b9f6c['push'](_0x2b9f6c['shift']());}catch(_0x33102f){_0x2b9f6c['push'](_0x2b9f6c['shift']());}}}(a45_0x3739,0x94faa));import{getLoginUserInfo,listRuntimePermitRoles,listRuntimeRoleUsers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const MENU_ID_FLAG={'name':'menu-id','type':a45_0x48fa07(0xa7),'required':!![],'description':a45_0x48fa07(0x9e)};export const ROLE_REF_FLAG={'name':a45_0x48fa07(0x85),'type':'string','required':!![],'description':a45_0x48fa07(0xa9)};export const GRANT_FLAG={'name':a45_0x48fa07(0x8a),'type':'boolean','description':a45_0x48fa07(0x8e)};export const REVOKE_FLAG={'name':a45_0x48fa07(0x94),'type':a45_0x48fa07(0x98),'description':'Revoke\x20the\x20selected\x20resources\x20from\x20the\x20role'};export const PAGE_SLOT_SPECS=[{'flag':'menu-roles','key':a45_0x48fa07(0xb3),'allowSelf':![]},{'flag':a45_0x48fa07(0xa8),'key':'dataCreate','allowSelf':![]},{'flag':a45_0x48fa07(0x9f),'key':a45_0x48fa07(0x86),'allowSelf':![]},{'flag':a45_0x48fa07(0xa5),'key':a45_0x48fa07(0xc0),'allowSelf':![]},{'flag':'detail-roles','key':'dataDetail','allowSelf':![]},{'flag':a45_0x48fa07(0xae),'key':a45_0x48fa07(0x88),'allowSelf':![]},{'flag':a45_0x48fa07(0xb7),'key':a45_0x48fa07(0x8d),'allowSelf':!![]}];function a45_0x3739(){const _0x1833c1=['boolean','key','21PAOKyu','Pass\x20exactly\x20one\x20of\x20--grant\x20or\x20--revoke.','ADMIN','isSafeInteger','Runtime\x20menu\x20ID','update-roles','The\x20current\x20service\x20contract\x20does\x20not\x20persist\x20an\x20empty\x20rolePermit;\x20grant\x20another\x20role\x20first.','appCode','children','1KkHaVk','trim','delete-roles','string','number','create-roles','Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name','\x20runtime\x20role\x20','Runtime\x20resource\x20permission\x20changes\x20require\x20an\x20ADMIN\x20or\x20OWNER\x20role.','3135755sheDYM','push','export-roles','Use\x20a\x20role\x20ID\x20from\x20`lovrabet\x20role\x20list`.','30984qplKCr','ALL','SELF\x20is\x20only\x20valid\x20for\x20--row-roles.','menuPermit','Permission\x20role\x20\x22','values','split','row-roles','\x22\x20is\x20ambiguous.','MENU','roleName','429GKyJVx','permitId','some','Configure\x20USER,\x20CUSTOM,\x20or\x20an\x20applicable\x20special\x20role\x20instead.','13541340IhtSQj','dataDelete','10492344VkSszx','pageId','menuId','toUpperCase','rolePermit','filter','ADMIN\x20and\x20OWNER\x20have\x20full\x20runtime\x20access;\x20configure\x20USER\x20or\x20CUSTOM\x20instead.','validation','resourceCode','label','Ask\x20an\x20application\x20manager\x20to\x20perform\x20this\x20operation.','role','dataUpdate','userId','dataExport','flag','grant','roleType','map','dataPermit','Grant\x20the\x20selected\x20resources\x20to\x20the\x20role','1498884LsZyey','591042keyRzy','1872800LNsOYU','length','\x20must\x20contain\x20at\x20least\x20one\x20value.','revoke','11mEuBhr','OWNER','\x22\x20was\x20not\x20found.'];a45_0x3739=function(){return _0x1833c1;};return a45_0x3739();}export const PAGE_ROLE_FLAGS=PAGE_SLOT_SPECS['map'](_0x40f0f8=>({'name':_0x40f0f8[a45_0x48fa07(0x89)],'type':a45_0x48fa07(0xa6),'description':'Comma-separated\x20runtime\x20role\x20IDs\x20or\x20names'}));export function splitRefs(_0xda222d,_0x13b52a){const _0x5333ff=a45_0x48fa07,_0x5d444e=[...new Set(_0xda222d[_0x5333ff(0xb6)](',')[_0x5333ff(0x8c)](_0x376f1d=>_0x376f1d[_0x5333ff(0xa4)]())[_0x5333ff(0x7f)](Boolean))];if(_0x5d444e[_0x5333ff(0x92)]===0x0)throw CliErrors['validation'](_0x13b52a+_0x5333ff(0x93));return _0x5d444e;}export function assertGrantOrRevoke(_0x59d837,_0x3ae5d2){const _0x481168=a45_0x48fa07;if(_0x59d837===_0x3ae5d2)throw CliErrors[_0x481168(0x81)](_0x481168(0x9b));return _0x59d837?_0x481168(0x8a):_0x481168(0x94);}function resolvePermitRole(_0x1c2fa1,_0x4f63f){const _0x251ae3=a45_0x48fa07,_0x3d8f9a=_0x4f63f[_0x251ae3(0xa4)](),_0xc6ff02=/^-?\d+$/['test'](_0x3d8f9a)?_0x1c2fa1['filter'](_0x25b293=>_0x25b293['id']===Number(_0x3d8f9a)):_0x1c2fa1[_0x251ae3(0x7f)](_0x3bba1c=>_0x3bba1c[_0x251ae3(0xba)]===_0x3d8f9a||_0x3bba1c[_0x251ae3(0x8b)]===_0x3d8f9a[_0x251ae3(0x7d)]());if(_0xc6ff02[_0x251ae3(0x92)]!==0x1)throw CliErrors['validation'](_0xc6ff02['length']===0x0?_0x251ae3(0xb4)+_0x3d8f9a+_0x251ae3(0x97):_0x251ae3(0xb4)+_0x3d8f9a+_0x251ae3(0xb8),_0x251ae3(0xaf));return _0xc6ff02[0x0];}export async function resolveRuntimePermitRoles(_0x53575f,_0x2deb4a,_0x56642d){const _0x4bd846=a45_0x48fa07,_0x22c7fb=await listRuntimePermitRoles(_0x53575f,{'needSelf':!![],'needPublic':!![]}),_0x512edd=[...new Map(_0x2deb4a[_0x4bd846(0x8c)](_0x14c319=>resolvePermitRole(_0x22c7fb,_0x14c319))[_0x4bd846(0x8c)](_0x888ed8=>[_0x888ed8['id'],_0x888ed8]))[_0x4bd846(0xb5)]()],_0x57cc17=_0x512edd['find'](_0xdbdc98=>_0xdbdc98[_0x4bd846(0x8b)]===_0x4bd846(0x9c)||_0xdbdc98[_0x4bd846(0x8b)]===_0x4bd846(0x96));if(_0x57cc17)throw CliErrors[_0x4bd846(0x81)](_0x57cc17['roleType']+'\x20has\x20full\x20runtime\x20access\x20and\x20cannot\x20be\x20a\x20resource\x20permission\x20target.',_0x4bd846(0xbe));if(!_0x56642d&&_0x512edd[_0x4bd846(0xbd)](_0x145aeb=>_0x145aeb['roleType']==='SELF'))throw CliErrors[_0x4bd846(0x81)](_0x4bd846(0xb2));return _0x512edd;}export async function assertRuntimePermissionManager(_0x1aaeed){const _0x2c429d=a45_0x48fa07,_0x290fb6=await getLoginUserInfo(),_0xd9c50c=_0x290fb6[_0x2c429d(0x87)]??_0x290fb6['id'],_0x90c8db=Number(_0xd9c50c);if(!Number[_0x2c429d(0x9d)](_0x90c8db)||_0x90c8db<=0x0)throw CliErrors[_0x2c429d(0x81)]('Cannot\x20resolve\x20the\x20current\x20AK\x20userId\x20for\x20permission\x20management.');const _0x28d852=await listRuntimeRoleUsers(_0x1aaeed),_0x12b097=_0x28d852[_0x2c429d(0xbd)](_0x3e2dfc=>(_0x3e2dfc['roleType']===_0x2c429d(0x9c)||_0x3e2dfc[_0x2c429d(0x8b)]==='OWNER')&&_0x3e2dfc['userList'][_0x2c429d(0xbd)](_0x8cae49=>_0x8cae49[_0x2c429d(0x87)]===_0x90c8db));if(!_0x12b097)throw CliErrors['validation'](_0x2c429d(0xab),_0x2c429d(0x84));}export function assertRuntimePermitRoleConfigurable(_0x1b0bd7){const _0x3ebed7=a45_0x48fa07;if(_0x1b0bd7[_0x3ebed7(0x8b)]===_0x3ebed7(0x9c)||_0x1b0bd7[_0x3ebed7(0x8b)]===_0x3ebed7(0x96))throw CliErrors[_0x3ebed7(0x81)]('Cannot\x20change\x20resource\x20permissions\x20for\x20'+_0x1b0bd7[_0x3ebed7(0x8b)]+_0x3ebed7(0xaa)+_0x1b0bd7['roleName']+'.',_0x3ebed7(0x80));}function asPermitRole(_0x2610cf){const _0x59984d=a45_0x48fa07;return{'id':_0x2610cf['id'],'roleName':_0x2610cf[_0x59984d(0xba)],'roleType':_0x2610cf[_0x59984d(0x8b)],'allowed':!![]};}export function applyRuntimeRolePermission(_0x3db483,_0x345733,_0x2a31ed,_0x2dcdb2){const _0x241381=a45_0x48fa07,_0xa87c70=!_0x3db483||_0x3db483['length']===0x0,_0x29992c=_0x3db483?.['some'](_0x41dd32=>_0x41dd32[_0x241381(0x8b)]===_0x241381(0xb1))??![];if(_0x2dcdb2===_0x241381(0x8a)&&(_0xa87c70||_0x29992c))return{'roles':_0x3db483??null,'changed':![]};let _0x365090=_0xa87c70||_0x29992c?_0x2a31ed['filter'](_0x3e87b2=>_0x3e87b2['id']>0x0):[..._0x3db483];const _0x31419b=_0x365090['some'](_0x49a30c=>_0x49a30c['id']===_0x345733['id']);if(_0x2dcdb2===_0x241381(0x8a)){if(_0x31419b)return{'roles':_0x365090,'changed':![]};return _0x365090[_0x241381(0xad)](asPermitRole(_0x345733)),{'roles':_0x365090,'changed':!![]};}if(!_0x31419b)return{'roles':_0x365090,'changed':_0xa87c70||_0x29992c};_0x365090=_0x365090[_0x241381(0x7f)](_0x3ac779=>_0x3ac779['id']!==_0x345733['id']);if(_0x365090[_0x241381(0x92)]===0x0)throw CliErrors[_0x241381(0x81)]('Cannot\x20revoke\x20the\x20last\x20role\x20from\x20a\x20runtime\x20resource.',_0x241381(0xa0));return{'roles':_0x365090,'changed':!![]};}export function projectRuntimePagePermit(_0x38c502){const _0x1fedda=a45_0x48fa07,_0x568697={'menuId':_0x38c502[_0x1fedda(0x7c)],'pageId':_0x38c502[_0x1fedda(0xc2)],'appCode':_0x38c502[_0x1fedda(0xa1)],'datasetCode':_0x38c502['datasetCode']};for(const _0x3359fc of PAGE_SLOT_SPECS){const _0x259574=_0x38c502[_0x3359fc[_0x1fedda(0x99)]];_0x259574&&(_0x568697[_0x3359fc[_0x1fedda(0x99)]]={'resourceCode':_0x259574[_0x1fedda(0x82)],'resourceType':_0x259574['resourceType'],'roles':(_0x259574[_0x1fedda(0x7e)]??[])[_0x1fedda(0x8c)](_0x33027a=>({'id':_0x33027a['id'],'roleName':_0x33027a['roleName'],'roleType':_0x33027a['roleType']}))});}return _0x568697;}export function flattenRuntimeMenuRolePermits(_0x83086){const _0x176bb2=[],_0x3f1f66=_0x26bb36=>{const _0x592b21=a45_0x5dd5;_0x176bb2[_0x592b21(0xad)](_0x26bb36);for(const _0x5e8469 of _0x26bb36[_0x592b21(0xa2)]??[])_0x3f1f66(_0x5e8469);};for(const _0x4418bd of _0x83086)_0x3f1f66(_0x4418bd);return _0x176bb2;}function a45_0x5dd5(_0xba19a8,_0x26d2c2){_0xba19a8=_0xba19a8-0x7c;const _0x37399e=a45_0x3739();let _0x5dd5ae=_0x37399e[_0xba19a8];return _0x5dd5ae;}export function runtimePermitWriteResult(_0x547849,_0x276390,_0x14ec03,_0x436bfa,_0x485eb7,_0x204c8c=[]){return{'operation':_0x547849,'scope':'runtime','selector':_0x276390,'before':_0x14ec03,'after':_0x436bfa,'dryRun':![],'backend':_0x485eb7,'warnings':_0x204c8c};}export function menuPermitDto(_0x3bfa32,_0x373c0f,_0x2811fb){const _0x4ddd4c=a45_0x48fa07;return{..._0x373c0f['permitId']!=null?{'id':_0x373c0f[_0x4ddd4c(0xbc)]}:{},'appCode':_0x3bfa32,'menuId':_0x373c0f['id'],'pageId':_0x373c0f['pageId']??null,'resourceCode':String(_0x373c0f['id']),'resourceType':_0x4ddd4c(0xb9),'resourceName':_0x373c0f[_0x4ddd4c(0x83)],'rolePermit':_0x2811fb};}
1
+ const a45_0x5c70cf=a45_0x1a7c;(function(_0x2ffae5,_0x46f29c){const _0x5d9c26=a45_0x1a7c,_0x4698f4=_0x2ffae5();while(!![]){try{const _0xea452d=-parseInt(_0x5d9c26(0x1db))/0x1*(-parseInt(_0x5d9c26(0x20e))/0x2)+-parseInt(_0x5d9c26(0x20a))/0x3*(parseInt(_0x5d9c26(0x1e6))/0x4)+-parseInt(_0x5d9c26(0x1f6))/0x5*(parseInt(_0x5d9c26(0x1f8))/0x6)+parseInt(_0x5d9c26(0x1d2))/0x7+parseInt(_0x5d9c26(0x1e2))/0x8*(-parseInt(_0x5d9c26(0x1fe))/0x9)+parseInt(_0x5d9c26(0x20c))/0xa+parseInt(_0x5d9c26(0x1ef))/0xb;if(_0xea452d===_0x46f29c)break;else _0x4698f4['push'](_0x4698f4['shift']());}catch(_0x19de30){_0x4698f4['push'](_0x4698f4['shift']());}}}(a45_0x22c8,0xd6598));import{getLoginUserInfo,listRuntimePermitRoles,listRuntimeRoleUsers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const MENU_ID_FLAG={'name':a45_0x5c70cf(0x212),'type':a45_0x5c70cf(0x201),'required':!![],'description':a45_0x5c70cf(0x1f3)};export const ROLE_REF_FLAG={'name':a45_0x5c70cf(0x20b),'type':a45_0x5c70cf(0x1e5),'required':!![],'description':a45_0x5c70cf(0x219)};export const GRANT_FLAG={'name':a45_0x5c70cf(0x1fa),'type':a45_0x5c70cf(0x21b),'description':a45_0x5c70cf(0x1fb)};export const REVOKE_FLAG={'name':a45_0x5c70cf(0x1df),'type':a45_0x5c70cf(0x21b),'description':a45_0x5c70cf(0x203)};export const PAGE_SLOT_SPECS=[{'flag':a45_0x5c70cf(0x1d3),'key':'menuPermit','allowSelf':![]},{'flag':a45_0x5c70cf(0x213),'key':a45_0x5c70cf(0x1ea),'allowSelf':![]},{'flag':a45_0x5c70cf(0x206),'key':a45_0x5c70cf(0x1dc),'allowSelf':![]},{'flag':a45_0x5c70cf(0x210),'key':a45_0x5c70cf(0x218),'allowSelf':![]},{'flag':a45_0x5c70cf(0x20f),'key':'dataDetail','allowSelf':![]},{'flag':a45_0x5c70cf(0x1e8),'key':a45_0x5c70cf(0x200),'allowSelf':![]},{'flag':'row-roles','key':a45_0x5c70cf(0x1f2),'allowSelf':!![]}];export const PAGE_ROLE_FLAGS=PAGE_SLOT_SPECS['map'](_0x41d3da=>({'name':_0x41d3da[a45_0x5c70cf(0x1f4)],'type':'string','description':a45_0x5c70cf(0x1e3)}));export function splitRefs(_0x503e11,_0x47f13a){const _0x475665=a45_0x5c70cf,_0x2d36bd=[...new Set(_0x503e11['split'](',')[_0x475665(0x21c)](_0x3a5b6b=>_0x3a5b6b['trim']())[_0x475665(0x1e9)](Boolean))];if(_0x2d36bd[_0x475665(0x209)]===0x0)throw CliErrors[_0x475665(0x1fc)](_0x47f13a+_0x475665(0x1f7));return _0x2d36bd;}export function assertGrantOrRevoke(_0x425263,_0x14cefb){const _0x2ac5b4=a45_0x5c70cf;if(_0x425263===_0x14cefb)throw CliErrors[_0x2ac5b4(0x1fc)]('Pass\x20exactly\x20one\x20of\x20--grant\x20or\x20--revoke.');return _0x425263?'grant':_0x2ac5b4(0x1df);}function resolvePermitRole(_0x2451b7,_0x5dba62){const _0x3f2568=a45_0x5c70cf,_0x5abfe0=_0x5dba62[_0x3f2568(0x202)](),_0x35d509=/^-?\d+$/['test'](_0x5abfe0)?_0x2451b7[_0x3f2568(0x1e9)](_0x1adfe1=>_0x1adfe1['id']===Number(_0x5abfe0)):_0x2451b7[_0x3f2568(0x1e9)](_0x10ecdc=>_0x10ecdc[_0x3f2568(0x1ee)]===_0x5abfe0||_0x10ecdc['roleType']===_0x5abfe0['toUpperCase']());if(_0x35d509[_0x3f2568(0x209)]!==0x1)throw CliErrors[_0x3f2568(0x1fc)](_0x35d509[_0x3f2568(0x209)]===0x0?_0x3f2568(0x215)+_0x5abfe0+_0x3f2568(0x1f1):'Permission\x20role\x20\x22'+_0x5abfe0+_0x3f2568(0x1ff),_0x3f2568(0x1d8));return _0x35d509[0x0];}export async function resolveRuntimePermitRoles(_0x40402c,_0x974f3e,_0xf5696f){const _0x23ccf2=a45_0x5c70cf,_0x3e1c25=await listRuntimePermitRoles(_0x40402c,{'needSelf':!![],'needPublic':!![]}),_0x485b84=[...new Map(_0x974f3e['map'](_0x264ec7=>resolvePermitRole(_0x3e1c25,_0x264ec7))[_0x23ccf2(0x21c)](_0x5d4ee8=>[_0x5d4ee8['id'],_0x5d4ee8]))[_0x23ccf2(0x208)]()],_0x558622=_0x485b84[_0x23ccf2(0x211)](_0x5228bf=>_0x5228bf[_0x23ccf2(0x1ec)]==='ADMIN'||_0x5228bf['roleType']==='OWNER');if(_0x558622)throw CliErrors[_0x23ccf2(0x1fc)](_0x558622[_0x23ccf2(0x1ec)]+_0x23ccf2(0x1f5),_0x23ccf2(0x1e0));if(!_0xf5696f&&_0x485b84[_0x23ccf2(0x205)](_0x2b9b95=>_0x2b9b95[_0x23ccf2(0x1ec)]===_0x23ccf2(0x1d5)))throw CliErrors['validation']('SELF\x20is\x20only\x20valid\x20for\x20--row-roles.');return _0x485b84;}export async function assertRuntimePermissionManager(_0x5908fe){const _0xb11769=a45_0x5c70cf,_0x47173a=await getLoginUserInfo(),_0xc47ff5=_0x47173a['userId']??_0x47173a['id'],_0x18f333=Number(_0xc47ff5);if(!Number[_0xb11769(0x214)](_0x18f333)||_0x18f333<=0x0)throw CliErrors[_0xb11769(0x1fc)](_0xb11769(0x1d4));const _0x523b6f=await listRuntimeRoleUsers(_0x5908fe),_0x20ce36=_0x523b6f[_0xb11769(0x205)](_0x440bd0=>(_0x440bd0[_0xb11769(0x1ec)]===_0xb11769(0x1ed)||_0x440bd0[_0xb11769(0x1ec)]===_0xb11769(0x207))&&_0x440bd0['userList'][_0xb11769(0x205)](_0x18421f=>_0x18421f['userId']===_0x18f333));if(!_0x20ce36)throw CliErrors[_0xb11769(0x1fc)](_0xb11769(0x1dd),_0xb11769(0x1d9));}export function assertRuntimePermitRoleConfigurable(_0x2bc343){const _0x538fc2=a45_0x5c70cf;if(_0x2bc343[_0x538fc2(0x1ec)]==='ADMIN'||_0x2bc343[_0x538fc2(0x1ec)]===_0x538fc2(0x207))throw CliErrors['validation']('Cannot\x20change\x20resource\x20permissions\x20for\x20'+_0x2bc343[_0x538fc2(0x1ec)]+_0x538fc2(0x1d7)+_0x2bc343[_0x538fc2(0x1ee)]+'.',_0x538fc2(0x1e4));}function asPermitRole(_0x480b5d){const _0x13bda7=a45_0x5c70cf;return{'id':_0x480b5d['id'],'roleName':_0x480b5d[_0x13bda7(0x1ee)],'roleType':_0x480b5d['roleType'],'allowed':!![]};}export function applyRuntimeRolePermission(_0x40e550,_0x528126,_0x3a79cf,_0x28119e){const _0x1e010e=a45_0x5c70cf,_0x3ec0ea=!_0x40e550||_0x40e550[_0x1e010e(0x209)]===0x0,_0x57c217=_0x40e550?.[_0x1e010e(0x205)](_0x48e773=>_0x48e773[_0x1e010e(0x1ec)]===_0x1e010e(0x1f0))??![];if(_0x28119e===_0x1e010e(0x1fa)&&(_0x3ec0ea||_0x57c217))return{'roles':_0x40e550??null,'changed':![]};let _0x1ef6eb=_0x3ec0ea||_0x57c217?_0x3a79cf['filter'](_0x4bfc40=>_0x4bfc40['id']>0x0):[..._0x40e550];const _0xc31ded=_0x1ef6eb[_0x1e010e(0x205)](_0xb4ccf3=>_0xb4ccf3['id']===_0x528126['id']);if(_0x28119e==='grant'){if(_0xc31ded)return{'roles':_0x1ef6eb,'changed':![]};return _0x1ef6eb[_0x1e010e(0x216)](asPermitRole(_0x528126)),{'roles':_0x1ef6eb,'changed':!![]};}if(!_0xc31ded)return{'roles':_0x1ef6eb,'changed':_0x3ec0ea||_0x57c217};_0x1ef6eb=_0x1ef6eb['filter'](_0x228753=>_0x228753['id']!==_0x528126['id']);if(_0x1ef6eb[_0x1e010e(0x209)]===0x0)throw CliErrors['validation'](_0x1e010e(0x20d),_0x1e010e(0x1e1));return{'roles':_0x1ef6eb,'changed':!![]};}function a45_0x1a7c(_0x4fe7f0,_0x53bbd1){_0x4fe7f0=_0x4fe7f0-0x1d1;const _0x22c822=a45_0x22c8();let _0x1a7c98=_0x22c822[_0x4fe7f0];return _0x1a7c98;}function a45_0x22c8(){const _0x25c5ee=['menu-id','create-roles','isSafeInteger','Permission\x20role\x20\x22','push','children','dataDelete','Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name','MENU','boolean','map','resourceCode','9871043KwBLvr','menu-roles','Cannot\x20resolve\x20the\x20current\x20AK\x20userId\x20for\x20permission\x20management.','SELF','key','\x20runtime\x20role\x20','Use\x20a\x20role\x20ID\x20from\x20`lovrabet\x20role\x20list`.','Ask\x20an\x20application\x20manager\x20to\x20perform\x20this\x20operation.','runtime','5477PVcVWk','dataUpdate','Runtime\x20resource\x20permission\x20changes\x20require\x20an\x20ADMIN\x20or\x20OWNER\x20role.','resourceType','revoke','Configure\x20USER,\x20CUSTOM,\x20or\x20an\x20applicable\x20special\x20role\x20instead.','The\x20current\x20service\x20contract\x20does\x20not\x20persist\x20an\x20empty\x20rolePermit;\x20grant\x20another\x20role\x20first.','8992qnVZlK','Comma-separated\x20runtime\x20role\x20IDs\x20or\x20names','ADMIN\x20and\x20OWNER\x20have\x20full\x20runtime\x20access;\x20configure\x20USER\x20or\x20CUSTOM\x20instead.','string','26392HYjfJw','pageId','export-roles','filter','dataCreate','rolePermit','roleType','ADMIN','roleName','5327751MehSge','ALL','\x22\x20was\x20not\x20found.','dataPermit','Runtime\x20menu\x20ID','flag','\x20has\x20full\x20runtime\x20access\x20and\x20cannot\x20be\x20a\x20resource\x20permission\x20target.','1900Ifwpmm','\x20must\x20contain\x20at\x20least\x20one\x20value.','16158PJpFpE','appCode','grant','Grant\x20the\x20selected\x20resources\x20to\x20the\x20role','validation','permitId','5391eVXMCm','\x22\x20is\x20ambiguous.','dataExport','number','trim','Revoke\x20the\x20selected\x20resources\x20from\x20the\x20role','datasetCode','some','update-roles','OWNER','values','length','585vgwTqM','role','2359800DAlnXC','Cannot\x20revoke\x20the\x20last\x20role\x20from\x20a\x20runtime\x20resource.','632vsbcru','detail-roles','delete-roles','find'];a45_0x22c8=function(){return _0x25c5ee;};return a45_0x22c8();}export function projectRuntimePagePermit(_0x24829b){const _0x4b5bb2=a45_0x5c70cf,_0x286d6c={'menuId':_0x24829b['menuId'],'pageId':_0x24829b[_0x4b5bb2(0x1e7)],'appCode':_0x24829b[_0x4b5bb2(0x1f9)],'datasetCode':_0x24829b[_0x4b5bb2(0x204)]};for(const _0x17f92a of PAGE_SLOT_SPECS){const _0x73dd5=_0x24829b[_0x17f92a['key']];_0x73dd5&&(_0x286d6c[_0x17f92a[_0x4b5bb2(0x1d6)]]={'resourceCode':_0x73dd5[_0x4b5bb2(0x1d1)],'resourceType':_0x73dd5[_0x4b5bb2(0x1de)],'roles':(_0x73dd5[_0x4b5bb2(0x1eb)]??[])[_0x4b5bb2(0x21c)](_0x5461d5=>({'id':_0x5461d5['id'],'roleName':_0x5461d5[_0x4b5bb2(0x1ee)],'roleType':_0x5461d5[_0x4b5bb2(0x1ec)]}))});}return _0x286d6c;}export function flattenRuntimeMenuRolePermits(_0x28edf8){const _0x4ca486=[],_0x3575d8=_0x46b682=>{const _0x34f54a=a45_0x1a7c;_0x4ca486[_0x34f54a(0x216)](_0x46b682);for(const _0xc345fa of _0x46b682[_0x34f54a(0x217)]??[])_0x3575d8(_0xc345fa);};for(const _0x407eb9 of _0x28edf8)_0x3575d8(_0x407eb9);return _0x4ca486;}export function runtimePermitWriteResult(_0x38b640,_0x2fbd6f,_0x26dfc9,_0x11b3f9,_0x122c72,_0x40c2c1=[]){const _0x26f699=a45_0x5c70cf;return{'operation':_0x38b640,'scope':_0x26f699(0x1da),'selector':_0x2fbd6f,'before':_0x26dfc9,'after':_0x11b3f9,'dryRun':![],'backend':_0x122c72,'warnings':_0x40c2c1};}export function menuPermitDto(_0x20ab02,_0x394b0d,_0x573be3){const _0x461f27=a45_0x5c70cf;return{..._0x394b0d[_0x461f27(0x1fd)]!=null?{'id':_0x394b0d[_0x461f27(0x1fd)]}:{},'appCode':_0x20ab02,'menuId':_0x394b0d['id'],'pageId':_0x394b0d[_0x461f27(0x1e7)]??null,'resourceCode':String(_0x394b0d['id']),'resourceType':_0x461f27(0x21a),'resourceName':_0x394b0d['label'],'rolePermit':_0x573be3};}
@@ -1 +1 @@
1
- const a46_0x4d8292=a46_0x105a;function a46_0x105a(_0x3693ea,_0x5e3083){_0x3693ea=_0x3693ea-0xc2;const _0x5f4197=a46_0x5f41();let _0x105a5a=_0x5f4197[_0x3693ea];return _0x105a5a;}(function(_0x41e8e6,_0x174d47){const _0x2ca711=a46_0x105a,_0x10545c=_0x41e8e6();while(!![]){try{const _0x48aaa9=-parseInt(_0x2ca711(0xd8))/0x1+parseInt(_0x2ca711(0xfb))/0x2+parseInt(_0x2ca711(0xcf))/0x3+-parseInt(_0x2ca711(0xc6))/0x4*(parseInt(_0x2ca711(0xf1))/0x5)+parseInt(_0x2ca711(0xea))/0x6*(parseInt(_0x2ca711(0xda))/0x7)+parseInt(_0x2ca711(0xf5))/0x8+parseInt(_0x2ca711(0xd4))/0x9;if(_0x48aaa9===_0x174d47)break;else _0x10545c['push'](_0x10545c['shift']());}catch(_0x4d5625){_0x10545c['push'](_0x10545c['shift']());}}}(a46_0x5f41,0x824a6));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_0x4d8292(0xe0),'type':a46_0x4d8292(0xd7),'description':a46_0x4d8292(0xd5)},FUNCTION_NAME_FLAG={'name':a46_0x4d8292(0xfc),'type':a46_0x4d8292(0xd7),'required':!![],'description':a46_0x4d8292(0xc2)},DESCRIPTION_FLAG={'name':a46_0x4d8292(0xdf),'type':'string','description':a46_0x4d8292(0xf2)},SOURCE_SESSION_FLAG={'name':a46_0x4d8292(0xc4),'type':a46_0x4d8292(0xd7),'description':a46_0x4d8292(0xd9)};function normalizeFunctionName(_0x415eb1){const _0x273cac=a46_0x4d8292,_0x1d8f9d=String(_0x415eb1||'')[_0x273cac(0xd6)]();if(!_0x1d8f9d||!FUNCTION_NAME_PATTERN['test'](_0x1d8f9d))throw CliErrors['validation'](_0x273cac(0xdd));return _0x1d8f9d;}function readScriptFile(_0x1afd96){const _0x8aa25c=a46_0x4d8292;if(!_0x1afd96)throw CliErrors[_0x8aa25c(0xc9)](_0x8aa25c(0xfa));if(!existsSync(_0x1afd96))throw CliErrors['validation']('File\x20not\x20found:\x20'+_0x1afd96);if(!statSync(_0x1afd96)[_0x8aa25c(0xf4)]())throw CliErrors[_0x8aa25c(0xc9)](_0x8aa25c(0xc5)+_0x1afd96);const _0x1c7b13=readFileSync(_0x1afd96,_0x8aa25c(0xd3));if(!_0x1c7b13[_0x8aa25c(0xd6)]())throw CliErrors['validation'](_0x8aa25c(0xe9));return _0x1c7b13;}function optionalTrimmed(_0x44de09){const _0x30da74=a46_0x4d8292,_0xf46eb2=String(_0x44de09||'')[_0x30da74(0xd6)]();return _0xf46eb2||undefined;}function summarizeBff(_0x1d495e){const _0x191531=a46_0x4d8292;return{'id':_0x1d495e['id'],'appCode':_0x1d495e['appCode'],'functionName':_0x1d495e[_0x191531(0xf6)],'description':_0x1d495e[_0x191531(0xdf)],'scriptType':_0x1d495e[_0x191531(0xe2)],'version':_0x1d495e['version'],'gmtModified':_0x1d495e[_0x191531(0xde)],'updateTime':_0x1d495e[_0x191531(0xe1)]};}function detailBff(_0x2c947f){const _0x31b081=a46_0x4d8292;return{'id':_0x2c947f['id'],'appCode':_0x2c947f[_0x31b081(0xed)],'functionName':_0x2c947f[_0x31b081(0xf6)],'description':_0x2c947f['description'],'scriptType':_0x2c947f['scriptType'],'scriptContent':_0x2c947f['scriptContent']??'','config':_0x2c947f[_0x31b081(0xe8)],'version':_0x2c947f['version'],'createUserId':_0x2c947f['createUserId'],'gmtCreate':_0x2c947f[_0x31b081(0xe5)],'gmtModified':_0x2c947f['gmtModified'],'createTime':_0x2c947f[_0x31b081(0xdc)],'updateTime':_0x2c947f['updateTime']};}function buildCreateInput(_0x216968){const _0x450e45=a46_0x4d8292;return{'functionName':normalizeFunctionName(_0x216968[_0x450e45(0xc7)]('name')),...optionalTrimmed(_0x216968['str']('description'))?{'description':optionalTrimmed(_0x216968['str'](_0x450e45(0xdf)))}:{},'scriptContent':readScriptFile(_0x216968[_0x450e45(0xc7)](_0x450e45(0xe0))),...optionalTrimmed(_0x216968[_0x450e45(0xc7)](_0x450e45(0xc4)))?{'sourceSessionId':optionalTrimmed(_0x216968['str'](_0x450e45(0xc4)))}:{}};}function buildUpdateInput(_0x2d9258){const _0x93b2f1=a46_0x4d8292,_0x36fafe={};optionalTrimmed(_0x2d9258[_0x93b2f1(0xc7)](_0x93b2f1(0xfc)))&&(_0x36fafe[_0x93b2f1(0xf6)]=normalizeFunctionName(_0x2d9258[_0x93b2f1(0xc7)](_0x93b2f1(0xfc))));_0x2d9258['flag']('description')!==undefined&&(_0x36fafe[_0x93b2f1(0xdf)]=_0x2d9258['str'](_0x93b2f1(0xdf)));optionalTrimmed(_0x2d9258['str']('file'))&&(_0x36fafe[_0x93b2f1(0xf9)]=readScriptFile(_0x2d9258['str'](_0x93b2f1(0xe0))));_0x2d9258[_0x93b2f1(0xce)]('source-session-id')!==undefined&&(_0x36fafe['sourceSessionId']=_0x2d9258[_0x93b2f1(0xc7)](_0x93b2f1(0xc4)));if(Object[_0x93b2f1(0xfe)](_0x36fafe)['length']===0x0)throw CliErrors[_0x93b2f1(0xc9)](_0x93b2f1(0xf8));return _0x36fafe;}function parseExecParams(_0xf4215){const _0x3da012=a46_0x4d8292,_0x3b8436=parseJsonParams(_0xf4215)??{};if(Array[_0x3da012(0xd1)](_0x3b8436))throw CliErrors[_0x3da012(0xc9)]('--params\x20must\x20be\x20a\x20JSON\x20object.');return _0x3b8436;}function a46_0x5f41(){const _0x1aaa1b=['source-session-id','File\x20is\x20not\x20a\x20regular\x20file:\x20','3868DhTREu','str','Executed\x20personal\x20BFF\x20','validation','num','/update','build','write','flag','416826LmdIza','Show\x20one\x20personal\x20BFF\x20by\x20id','isArray','read','utf8','5648193ofeihP','Path\x20to\x20a\x20local\x20UTF-8\x20JavaScript\x20or\x20TypeScript\x20file','trim','string','978465gFSgPB','Optional\x20source\x20RuntimeAgent\x20session\x20id','684761iSMMfH','List\x20current\x20user\x27s\x20personal\x20BFF\x20scripts\x20for\x20the\x20current\x20app','createTime','--name\x20must\x20be\x20a\x20valid\x20JavaScript\x20identifier,\x20for\x20example\x20loadOrders.','gmtModified','description','file','updateTime','scriptType','Personal\x20BFF\x20script\x20ID','根据\x20ID\x20更新个人\x20BFF','gmtCreate','Created\x20personal\x20BFF\x20','Updated\x20personal\x20BFF\x20','config','Personal\x20BFF\x20script\x20file\x20is\x20blank.','12WTLYWZ','/client/runtime-bff/personal/','body','appCode','bool','根据\x20ID\x20执行个人\x20BFF,并可传入\x20JSON\x20参数','length','1865qbeOJC','Personal\x20BFF\x20description','params','isFile','1247096BEYLIj','functionName','map','personal-bff\x20update\x20requires\x20at\x20least\x20one\x20of\x20--name,\x20--description,\x20--file,\x20or\x20--source-session-id.','scriptContent','File\x20path\x20is\x20required.','1509548pHLLod','name','personal-bff','keys','根据本地脚本文件创建个人\x20BFF','Personal\x20BFF\x20functionName,\x20for\x20example\x20loadOrders','verbose'];a46_0x5f41=function(){return _0x1aaa1b;};return a46_0x5f41();}const personalBffList={'service':a46_0x4d8292(0xfd),'command':'list','description':a46_0x4d8292(0xdb),'risk':a46_0x4d8292(0xd2),'flags':[VERBOSE_FLAG],async 'execute'(_0x3a611f){const _0x58d8c5=a46_0x4d8292,_0x493897=await listPersonalBffs(_0x3a611f[_0x58d8c5(0xed)]);return{'ok':!![],'data':{'total':_0x493897[_0x58d8c5(0xf0)],'items':_0x3a611f[_0x58d8c5(0xee)](_0x58d8c5(0xc3))?_0x493897:_0x493897[_0x58d8c5(0xf7)](summarizeBff)}};}},personalBffDetail={'service':a46_0x4d8292(0xfd),'command':'detail','description':a46_0x4d8292(0xd0),'risk':a46_0x4d8292(0xd2),'flags':[{...ID_FLAG,'description':a46_0x4d8292(0xe3)}],async 'execute'(_0x4107fc){const _0x2ebfde=a46_0x4d8292,_0x6e6d9=await getPersonalBff(_0x4107fc[_0x2ebfde(0xca)]('id'),_0x4107fc[_0x2ebfde(0xed)]);return{'ok':!![],'data':detailBff(_0x6e6d9)};}},personalBffCreate={'service':a46_0x4d8292(0xfd),'command':'create','description':a46_0x4d8292(0xff),'risk':a46_0x4d8292(0xcd),'confirmationDescription':'把本地脚本保存为个人\x20BFF;之后可在当前应用中调用该脚本。','flags':[FUNCTION_NAME_FLAG,{...FILE_FLAG,'required':!![]},DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x256077){const _0x1170b7=a46_0x4d8292,_0xeba8e6=buildCreateInput(_0x256077),_0x4a19ac=await createPersonalBff(_0x256077[_0x1170b7(0xed)],_0xeba8e6);return{'ok':!![],'data':detailBff(_0x4a19ac),'message':_0x1170b7(0xe6)+_0x4a19ac['id']+(_0x4a19ac[_0x1170b7(0xf6)]?'\x20('+_0x4a19ac['functionName']+')':'')};},async 'dryRun'(_0x143295){const _0xe257c7=a46_0x4d8292,_0x32e694=buildCreateInput(_0x143295);return dryRun('POST','/client/runtime-bff/personal/create')[_0xe257c7(0xec)]({'appCode':_0x143295[_0xe257c7(0xed)],..._0x32e694})[_0xe257c7(0xdf)]('Preview:\x20create\x20personal\x20BFF\x20'+_0x32e694[_0xe257c7(0xf6)])[_0xe257c7(0xcc)]();}},personalBffUpdate={'service':'personal-bff','command':'update','description':a46_0x4d8292(0xe4),'risk':a46_0x4d8292(0xcd),'confirmationDescription':'更新个人\x20BFF\x20的脚本或元信息;之后的调用将使用新版本。','flags':[{...ID_FLAG,'description':a46_0x4d8292(0xe3)},{...FUNCTION_NAME_FLAG,'required':![]},FILE_FLAG,DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x43d6cc){const _0x1a469=a46_0x4d8292,_0x4219d2=_0x43d6cc[_0x1a469(0xca)]('id'),_0x5a1952=buildUpdateInput(_0x43d6cc),_0x589506=await updatePersonalBff(_0x4219d2,_0x43d6cc[_0x1a469(0xed)],_0x5a1952);return{'ok':!![],'data':detailBff(_0x589506),'message':_0x1a469(0xe7)+_0x589506['id']+(_0x589506['functionName']?'\x20('+_0x589506[_0x1a469(0xf6)]+')':'')};},async 'dryRun'(_0x1e081b){const _0x153310=a46_0x4d8292,_0x49bbf0=_0x1e081b[_0x153310(0xca)]('id'),_0x272cfa=buildUpdateInput(_0x1e081b);return dryRun('POST',_0x153310(0xeb)+_0x49bbf0+_0x153310(0xcb))['body']({'appCode':_0x1e081b['appCode'],..._0x272cfa})[_0x153310(0xdf)]('Preview:\x20update\x20personal\x20BFF\x20'+_0x49bbf0)[_0x153310(0xcc)]();}},personalBffExec={'service':a46_0x4d8292(0xfd),'command':'exec','description':a46_0x4d8292(0xef),'risk':a46_0x4d8292(0xcd),'confirmationDescription':'执行个人\x20BFF\x20脚本;脚本可能读取或修改业务数据,也可能调用外部服务。','flags':[{...ID_FLAG,'description':a46_0x4d8292(0xe3)},{...PARAMS_FLAG,'description':'JSON\x20object\x20passed\x20to\x20the\x20personal\x20BFF\x20execution'}],async 'validate'(_0x127114){const _0x29d5fd=a46_0x4d8292;parseExecParams(_0x127114[_0x29d5fd(0xc7)](_0x29d5fd(0xf3)));},async 'execute'(_0x23e771){const _0xc86528=a46_0x4d8292,_0x3d10c3=_0x23e771['num']('id'),_0x491931=parseExecParams(_0x23e771['str'](_0xc86528(0xf3))),_0x1824c4=await executePersonalBff(_0x3d10c3,_0x23e771['appCode'],_0x491931);return{'ok':!![],'data':{'result':_0x1824c4},'message':_0xc86528(0xc8)+_0x3d10c3};}};export const personalBffDefinitions=[personalBffList,personalBffDetail,personalBffCreate,personalBffUpdate,personalBffExec];
1
+ const a46_0x488c06=a46_0x5138;(function(_0x3e54ca,_0x56d84a){const _0x5464f6=a46_0x5138,_0x4167cb=_0x3e54ca();while(!![]){try{const _0x5af11e=-parseInt(_0x5464f6(0x138))/0x1+parseInt(_0x5464f6(0x11e))/0x2*(parseInt(_0x5464f6(0x148))/0x3)+parseInt(_0x5464f6(0x13d))/0x4+parseInt(_0x5464f6(0x154))/0x5+-parseInt(_0x5464f6(0x132))/0x6+parseInt(_0x5464f6(0x11d))/0x7+parseInt(_0x5464f6(0x14a))/0x8*(-parseInt(_0x5464f6(0x12d))/0x9);if(_0x5af11e===_0x56d84a)break;else _0x4167cb['push'](_0x4167cb['shift']());}catch(_0x40d37c){_0x4167cb['push'](_0x4167cb['shift']());}}}(a46_0x4eaf,0x8a068));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_0x488c06(0x11b),'type':a46_0x488c06(0x115),'description':a46_0x488c06(0x149)},FUNCTION_NAME_FLAG={'name':a46_0x488c06(0x127),'type':a46_0x488c06(0x115),'required':!![],'description':'Personal\x20BFF\x20functionName,\x20for\x20example\x20loadOrders'},DESCRIPTION_FLAG={'name':a46_0x488c06(0x135),'type':a46_0x488c06(0x115),'description':a46_0x488c06(0x121)},SOURCE_SESSION_FLAG={'name':'source-session-id','type':'string','description':a46_0x488c06(0x12a)};function a46_0x4eaf(){const _0x4660f5=['exec','Created\x20personal\x20BFF\x20','verbose','379554ijxwDa','validation','read','description','File\x20is\x20not\x20a\x20regular\x20file:\x20','/update','65337LXGjFz','--name\x20must\x20be\x20a\x20valid\x20JavaScript\x20identifier,\x20for\x20example\x20loadOrders.','把本地脚本保存为个人\x20BFF;之后可在当前应用中调用该脚本。','/client/runtime-bff/personal/create','--params\x20must\x20be\x20a\x20JSON\x20object.','1563784mfoAav','scriptContent','createTime','personal-bff\x20update\x20requires\x20at\x20least\x20one\x20of\x20--name,\x20--description,\x20--file,\x20or\x20--source-session-id.','isArray','scriptType','Preview:\x20update\x20personal\x20BFF\x20','/client/runtime-bff/personal/','write','更新个人\x20BFF\x20的脚本或元信息;之后的调用将使用新版本。','Preview:\x20create\x20personal\x20BFF\x20','12TFNOmm','Path\x20to\x20a\x20local\x20UTF-8\x20JavaScript\x20or\x20TypeScript\x20file','10217368wHlRNd','Show\x20one\x20personal\x20BFF\x20by\x20id','createUserId','update','根据\x20ID\x20更新个人\x20BFF','params','body','appCode','isFile','Updated\x20personal\x20BFF\x20','2220780HztkOx','length','gmtCreate','List\x20current\x20user\x27s\x20personal\x20BFF\x20scripts\x20for\x20the\x20current\x20app','string','functionName','map','updateTime','trim','sourceSessionId','file','Personal\x20BFF\x20script\x20ID','4464383BFtiYw','249124CpWcwK','bool','flag','Personal\x20BFF\x20description','str','source-session-id','执行个人\x20BFF\x20脚本;脚本可能读取或修改业务数据,也可能调用外部服务。','num','JSON\x20object\x20passed\x20to\x20the\x20personal\x20BFF\x20execution','name','utf8','build','Optional\x20source\x20RuntimeAgent\x20session\x20id','detail','personal-bff','9yGmQCp','POST'];a46_0x4eaf=function(){return _0x4660f5;};return a46_0x4eaf();}function normalizeFunctionName(_0x40902a){const _0x17b020=a46_0x488c06,_0xfb651d=String(_0x40902a||'')[_0x17b020(0x119)]();if(!_0xfb651d||!FUNCTION_NAME_PATTERN['test'](_0xfb651d))throw CliErrors[_0x17b020(0x133)](_0x17b020(0x139));return _0xfb651d;}function readScriptFile(_0x2ba9e2){const _0x5046e3=a46_0x488c06;if(!_0x2ba9e2)throw CliErrors['validation']('File\x20path\x20is\x20required.');if(!existsSync(_0x2ba9e2))throw CliErrors['validation']('File\x20not\x20found:\x20'+_0x2ba9e2);if(!statSync(_0x2ba9e2)[_0x5046e3(0x152)]())throw CliErrors[_0x5046e3(0x133)](_0x5046e3(0x136)+_0x2ba9e2);const _0x28beab=readFileSync(_0x2ba9e2,_0x5046e3(0x128));if(!_0x28beab[_0x5046e3(0x119)]())throw CliErrors[_0x5046e3(0x133)]('Personal\x20BFF\x20script\x20file\x20is\x20blank.');return _0x28beab;}function optionalTrimmed(_0x5c5a81){const _0x2db699=a46_0x488c06,_0x498ae9=String(_0x5c5a81||'')[_0x2db699(0x119)]();return _0x498ae9||undefined;}function summarizeBff(_0x1ab159){const _0x2629ce=a46_0x488c06;return{'id':_0x1ab159['id'],'appCode':_0x1ab159[_0x2629ce(0x151)],'functionName':_0x1ab159[_0x2629ce(0x116)],'description':_0x1ab159[_0x2629ce(0x135)],'scriptType':_0x1ab159[_0x2629ce(0x142)],'version':_0x1ab159['version'],'gmtModified':_0x1ab159['gmtModified'],'updateTime':_0x1ab159[_0x2629ce(0x118)]};}function detailBff(_0x1d915e){const _0x5ec25c=a46_0x488c06;return{'id':_0x1d915e['id'],'appCode':_0x1d915e[_0x5ec25c(0x151)],'functionName':_0x1d915e[_0x5ec25c(0x116)],'description':_0x1d915e[_0x5ec25c(0x135)],'scriptType':_0x1d915e['scriptType'],'scriptContent':_0x1d915e['scriptContent']??'','config':_0x1d915e['config'],'version':_0x1d915e['version'],'createUserId':_0x1d915e[_0x5ec25c(0x14c)],'gmtCreate':_0x1d915e[_0x5ec25c(0x156)],'gmtModified':_0x1d915e['gmtModified'],'createTime':_0x1d915e[_0x5ec25c(0x13f)],'updateTime':_0x1d915e[_0x5ec25c(0x118)]};}function buildCreateInput(_0x13f610){const _0x164248=a46_0x488c06;return{'functionName':normalizeFunctionName(_0x13f610[_0x164248(0x122)](_0x164248(0x127))),...optionalTrimmed(_0x13f610[_0x164248(0x122)](_0x164248(0x135)))?{'description':optionalTrimmed(_0x13f610[_0x164248(0x122)](_0x164248(0x135)))}:{},'scriptContent':readScriptFile(_0x13f610[_0x164248(0x122)](_0x164248(0x11b))),...optionalTrimmed(_0x13f610[_0x164248(0x122)](_0x164248(0x123)))?{'sourceSessionId':optionalTrimmed(_0x13f610[_0x164248(0x122)](_0x164248(0x123)))}:{}};}function buildUpdateInput(_0x401923){const _0x183464=a46_0x488c06,_0x532767={};optionalTrimmed(_0x401923['str'](_0x183464(0x127)))&&(_0x532767[_0x183464(0x116)]=normalizeFunctionName(_0x401923['str'](_0x183464(0x127))));_0x401923[_0x183464(0x120)]('description')!==undefined&&(_0x532767[_0x183464(0x135)]=_0x401923[_0x183464(0x122)](_0x183464(0x135)));optionalTrimmed(_0x401923['str'](_0x183464(0x11b)))&&(_0x532767[_0x183464(0x13e)]=readScriptFile(_0x401923[_0x183464(0x122)](_0x183464(0x11b))));_0x401923[_0x183464(0x120)](_0x183464(0x123))!==undefined&&(_0x532767[_0x183464(0x11a)]=_0x401923['str'](_0x183464(0x123)));if(Object['keys'](_0x532767)[_0x183464(0x155)]===0x0)throw CliErrors[_0x183464(0x133)](_0x183464(0x140));return _0x532767;}function parseExecParams(_0x1a3738){const _0x160523=a46_0x488c06,_0x20b065=parseJsonParams(_0x1a3738)??{};if(Array[_0x160523(0x141)](_0x20b065))throw CliErrors[_0x160523(0x133)](_0x160523(0x13c));return _0x20b065;}function a46_0x5138(_0x357748,_0x5f2f53){_0x357748=_0x357748-0x115;const _0x4eafa9=a46_0x4eaf();let _0x5138fe=_0x4eafa9[_0x357748];return _0x5138fe;}const personalBffList={'service':a46_0x488c06(0x12c),'command':'list','description':a46_0x488c06(0x157),'risk':'read','flags':[VERBOSE_FLAG],async 'execute'(_0x3d5624){const _0x442169=a46_0x488c06,_0x25855b=await listPersonalBffs(_0x3d5624[_0x442169(0x151)]);return{'ok':!![],'data':{'total':_0x25855b[_0x442169(0x155)],'items':_0x3d5624[_0x442169(0x11f)](_0x442169(0x131))?_0x25855b:_0x25855b[_0x442169(0x117)](summarizeBff)}};}},personalBffDetail={'service':a46_0x488c06(0x12c),'command':a46_0x488c06(0x12b),'description':a46_0x488c06(0x14b),'risk':a46_0x488c06(0x134),'flags':[{...ID_FLAG,'description':a46_0x488c06(0x11c)}],async 'execute'(_0xa63cad){const _0x19be90=a46_0x488c06,_0xeeb910=await getPersonalBff(_0xa63cad[_0x19be90(0x125)]('id'),_0xa63cad[_0x19be90(0x151)]);return{'ok':!![],'data':detailBff(_0xeeb910)};}},personalBffCreate={'service':a46_0x488c06(0x12c),'command':'create','description':'根据本地脚本文件创建个人\x20BFF','risk':'write','confirmationDescription':a46_0x488c06(0x13a),'flags':[FUNCTION_NAME_FLAG,{...FILE_FLAG,'required':!![]},DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x253650){const _0x46e858=a46_0x488c06,_0x338a6f=buildCreateInput(_0x253650),_0x774e0c=await createPersonalBff(_0x253650[_0x46e858(0x151)],_0x338a6f);return{'ok':!![],'data':detailBff(_0x774e0c),'message':_0x46e858(0x130)+_0x774e0c['id']+(_0x774e0c['functionName']?'\x20('+_0x774e0c[_0x46e858(0x116)]+')':'')};},async 'dryRun'(_0x31db86){const _0x534351=a46_0x488c06,_0x44e118=buildCreateInput(_0x31db86);return dryRun('POST',_0x534351(0x13b))[_0x534351(0x150)]({'appCode':_0x31db86[_0x534351(0x151)],..._0x44e118})[_0x534351(0x135)](_0x534351(0x147)+_0x44e118[_0x534351(0x116)])[_0x534351(0x129)]();}},personalBffUpdate={'service':a46_0x488c06(0x12c),'command':a46_0x488c06(0x14d),'description':a46_0x488c06(0x14e),'risk':'write','confirmationDescription':a46_0x488c06(0x146),'flags':[{...ID_FLAG,'description':a46_0x488c06(0x11c)},{...FUNCTION_NAME_FLAG,'required':![]},FILE_FLAG,DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x5eaef1){const _0x1ae819=a46_0x488c06,_0x5e2077=_0x5eaef1[_0x1ae819(0x125)]('id'),_0x5cd7eb=buildUpdateInput(_0x5eaef1),_0x37840d=await updatePersonalBff(_0x5e2077,_0x5eaef1[_0x1ae819(0x151)],_0x5cd7eb);return{'ok':!![],'data':detailBff(_0x37840d),'message':_0x1ae819(0x153)+_0x37840d['id']+(_0x37840d[_0x1ae819(0x116)]?'\x20('+_0x37840d[_0x1ae819(0x116)]+')':'')};},async 'dryRun'(_0x5c370c){const _0x14dcdf=a46_0x488c06,_0x188f22=_0x5c370c['num']('id'),_0x4b07bf=buildUpdateInput(_0x5c370c);return dryRun(_0x14dcdf(0x12e),_0x14dcdf(0x144)+_0x188f22+_0x14dcdf(0x137))[_0x14dcdf(0x150)]({'appCode':_0x5c370c[_0x14dcdf(0x151)],..._0x4b07bf})['description'](_0x14dcdf(0x143)+_0x188f22)[_0x14dcdf(0x129)]();}},personalBffExec={'service':a46_0x488c06(0x12c),'command':a46_0x488c06(0x12f),'description':'根据\x20ID\x20执行个人\x20BFF,并可传入\x20JSON\x20参数','risk':a46_0x488c06(0x145),'confirmationDescription':a46_0x488c06(0x124),'flags':[{...ID_FLAG,'description':'Personal\x20BFF\x20script\x20ID'},{...PARAMS_FLAG,'description':a46_0x488c06(0x126)}],async 'validate'(_0x573772){const _0x512eba=a46_0x488c06;parseExecParams(_0x573772[_0x512eba(0x122)](_0x512eba(0x14f)));},async 'execute'(_0x2375ec){const _0x40c33a=a46_0x488c06,_0xbf9352=_0x2375ec[_0x40c33a(0x125)]('id'),_0x289f42=parseExecParams(_0x2375ec[_0x40c33a(0x122)](_0x40c33a(0x14f))),_0x2f01b4=await executePersonalBff(_0xbf9352,_0x2375ec[_0x40c33a(0x151)],_0x289f42);return{'ok':!![],'data':{'result':_0x2f01b4},'message':'Executed\x20personal\x20BFF\x20'+_0xbf9352};}};export const personalBffDefinitions=[personalBffList,personalBffDetail,personalBffCreate,personalBffUpdate,personalBffExec];
@@ -1 +1 @@
1
- const a47_0x5ae341=a47_0x5c61;(function(_0x4a4b09,_0x4b450f){const _0x200d89=a47_0x5c61,_0x564ef1=_0x4a4b09();while(!![]){try{const _0x143689=parseInt(_0x200d89(0xc4))/0x1+parseInt(_0x200d89(0xbd))/0x2+-parseInt(_0x200d89(0xb1))/0x3+-parseInt(_0x200d89(0xb8))/0x4*(parseInt(_0x200d89(0xac))/0x5)+parseInt(_0x200d89(0xab))/0x6+-parseInt(_0x200d89(0xd6))/0x7*(parseInt(_0x200d89(0xd4))/0x8)+-parseInt(_0x200d89(0xdb))/0x9*(parseInt(_0x200d89(0xd2))/0xa);if(_0x143689===_0x4b450f)break;else _0x564ef1['push'](_0x564ef1['shift']());}catch(_0x97dea){_0x564ef1['push'](_0x564ef1['shift']());}}}(a47_0x929b,0x54ed5));function a47_0x5c61(_0x264a66,_0x482f26){_0x264a66=_0x264a66-0xa5;const _0x929bbb=a47_0x929b();let _0x5c61b7=_0x929bbb[_0x264a66];return _0x5c61b7;}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';function a47_0x929b(){const _0x54d0b0=['671709oUWwwh','isSingleCommand','CLI\x20Built-in\x20Skill','Logs','use','`lovrabet\x20app\x20use`\x20has\x20been\x20removed.','get','\x20\x20[high-risk-write]','Authentication','app','Use\x20`lovrabet\x20workspace\x20init\x20--appcode\x20<code>`\x20instead.','BFF\x20Scripts','defaultCommand','write','10ryCLyD','values','107016gNWAhD','File','161eRpuuJ','Runtime\x20Roles','SQL\x20Queries','Runtime\x20Permissions','\x20\x20[write]','3322386djdPJV','description','User\x20Accounts','Personal\x20BFF','push','map','show','2927868yNclyo','2130825TZcnLj','Agent\x20Schedules','from','set','service','670083bjdfiD','API\x20Documentation','Configuration','command','install','app\x20use','Schema','4pCSiaI','risk','App\x20Management','`lovrabet\x20app\x20init`\x20has\x20been\x20removed.','list','1029050WtJdiO','Self\x20Update','Instant\x20API','Runtime\x20App\x20Config','OCR','`lovrabet\x20logs\x20clear`\x20has\x20been\x20removed.','login'];a47_0x929b=function(){return _0x54d0b0;};return a47_0x929b();}import{userAccountDefinitions}from'../commands/user-account/index.js';import{notificationDefinitions}from'../commands/notification/index.js';import{roleDefinitions}from'../commands/role/index.js';import{permitDefinitions}from'../commands/permit/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x507dfa){const _0x392dd6=a47_0x5c61;for(const _0x50e486 of _0x507dfa){definitions[_0x392dd6(0xaf)](_0x50e486['service']+':'+_0x50e486[_0x392dd6(0xb4)],_0x50e486);let _0x25ece8=serviceGroups['get'](_0x50e486[_0x392dd6(0xb0)]);!_0x25ece8&&(_0x25ece8=[],serviceGroups[_0x392dd6(0xaf)](_0x50e486['service'],_0x25ece8)),_0x25ece8['push'](_0x50e486);}}function registerService(_0xfcefbc,_0x216341,_0x38b04f){const _0x4ddc79=a47_0x5c61;registerDefinitions(_0x216341);const _0x1a74d8=_0x11dfae=>_0x11dfae==='read'?'':_0x11dfae===_0x4ddc79(0xd1)?_0x4ddc79(0xda):_0x4ddc79(0xcb),_0x46af98={'service':_0x216341[0x0][_0x4ddc79(0xb0)],'label':_0xfcefbc,'commands':_0x216341[_0x4ddc79(0xa9)](_0x184a0f=>({'command':_0x184a0f['command'],'description':_0x184a0f[_0x4ddc79(0xa5)],'tag':_0x1a74d8(_0x184a0f[_0x4ddc79(0xb9)])})),'defaultCommand':_0x38b04f?.[_0x4ddc79(0xd0)]??(_0x38b04f?.[_0x4ddc79(0xc5)]?_0x216341[0x0][_0x4ddc79(0xb4)]:undefined),'isSingleCommand':_0x38b04f?.['isSingleCommand']};serviceRegistry[_0x4ddc79(0xa8)](_0x46af98),serviceByName[_0x4ddc79(0xaf)](_0x46af98[_0x4ddc79(0xb0)],_0x46af98);}registerService(a47_0x5ae341(0xcc),authDefinitions,{'defaultCommand':a47_0x5ae341(0xc3)}),registerService(a47_0x5ae341(0xa6),userAccountDefinitions),registerService(a47_0x5ae341(0xba),appDefinitions,{'defaultCommand':'list'}),registerService('Workspace',workspaceDefinitions),registerService(a47_0x5ae341(0xc0),appConfigDefinitions),registerService(a47_0x5ae341(0xb3),configDefinitions,{'defaultCommand':a47_0x5ae341(0xbc)}),registerService(a47_0x5ae341(0xd7),roleDefinitions,{'defaultCommand':a47_0x5ae341(0xbc)}),registerService(a47_0x5ae341(0xd9),permitDefinitions),registerService(a47_0x5ae341(0xb2),apiDocDefinitions),registerService('Datasets',datasetDefinitions),registerService(a47_0x5ae341(0xbf),dataDefinitions),registerService(a47_0x5ae341(0xd8),sqlDefinitions),registerService(a47_0x5ae341(0xcf),bffDefinitions),registerService(a47_0x5ae341(0xa7),personalBffDefinitions),registerService('Artifacts',artifactDefinitions),registerService(a47_0x5ae341(0xd5),fileDefinitions),registerService(a47_0x5ae341(0xc1),ocrDefinitions),registerService('Knowledge\x20Base',kbDefinitions),registerService('Notification\x20Configs',notificationDefinitions,{'defaultCommand':'config-list'}),registerService(a47_0x5ae341(0xad),scheduleDefinitions,{'defaultCommand':a47_0x5ae341(0xbc)}),registerService('Service\x20Tree',serviceDefinitions,{'defaultCommand':a47_0x5ae341(0xbc)}),registerService('Skills',skillDefinitions,{'defaultCommand':'install'}),registerService(a47_0x5ae341(0xc6),cliSkillDefinitions,{'defaultCommand':a47_0x5ae341(0xb5)}),registerService(a47_0x5ae341(0xbe),[updateDefinition],{'defaultCommand':'run','isSingleCommand':!![]}),registerService('Diagnostics',[doctorDefinition],{'isSingleCommand':!![]}),registerService(a47_0x5ae341(0xb7),[schemaDefinition],{'isSingleCommand':!![]}),registerService(a47_0x5ae341(0xc7),logsDefinitions,{'defaultCommand':a47_0x5ae341(0xaa)});export function findDefinition(_0xa8f74,_0x55a12c){const _0x2b725f=a47_0x5ae341;return definitions[_0x2b725f(0xca)](_0xa8f74+':'+_0x55a12c);}export function resolveRemovedCommand(_0x35a051,_0x4e7665){const _0x28dead=a47_0x5ae341;if(_0x35a051===_0x28dead(0xcd)&&_0x4e7665==='init')return{'command':'app\x20init','message':_0x28dead(0xbb),'hint':_0x28dead(0xce)};if(_0x35a051===_0x28dead(0xcd)&&_0x4e7665===_0x28dead(0xc8))return{'command':_0x28dead(0xb6),'message':_0x28dead(0xc9),'hint':'Use\x20`lovrabet\x20workspace\x20use\x20--app\x20<name>`\x20instead.'};if(_0x35a051==='logs'&&_0x4e7665==='clear')return{'command':'logs\x20clear','message':_0x28dead(0xc2),'hint':'Use\x20`lovrabet\x20logs\x20show`\x20to\x20view\x20command\x20history.'};return undefined;}export function isKnownService(_0x5ec0f7){return serviceByName['has'](_0x5ec0f7);}export function getServiceEntry(_0x50c189){const _0x142d82=a47_0x5ae341;return serviceByName[_0x142d82(0xca)](_0x50c189);}export function getAllDefinitions(){const _0x397848=a47_0x5ae341;return Array[_0x397848(0xae)](definitions[_0x397848(0xd3)]());}
1
+ const a47_0x213dd8=a47_0xc4ff;(function(_0x157f88,_0x29c145){const _0x502b50=a47_0xc4ff,_0x816e68=_0x157f88();while(!![]){try{const _0x138dbf=parseInt(_0x502b50(0x15f))/0x1+parseInt(_0x502b50(0x15b))/0x2+parseInt(_0x502b50(0x164))/0x3*(parseInt(_0x502b50(0x173))/0x4)+-parseInt(_0x502b50(0x170))/0x5*(-parseInt(_0x502b50(0x145))/0x6)+parseInt(_0x502b50(0x15a))/0x7+-parseInt(_0x502b50(0x155))/0x8+parseInt(_0x502b50(0x161))/0x9*(-parseInt(_0x502b50(0x156))/0xa);if(_0x138dbf===_0x29c145)break;else _0x816e68['push'](_0x816e68['shift']());}catch(_0xd3543a){_0x816e68['push'](_0x816e68['shift']());}}}(a47_0x4930,0xf1f9c));import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';function a47_0x4930(){const _0xdee5ba=['Notification\x20Configs','Schema','install','get','CLI\x20Built-in\x20Skill','Authentication','6418096DpIKaw','31166340XyjwFR','Self\x20Update','SQL\x20Queries','logs\x20clear','4541159TIIibs','3534072rYZaLC','init','Personal\x20BFF','list','1637895NDFtEo','from','9nchHVt','login','description','1590900oVZsqd','Diagnostics','Runtime\x20App\x20Config','config-list','defaultCommand','clear','App\x20Management','Workspace','`lovrabet\x20app\x20init`\x20has\x20been\x20removed.','`lovrabet\x20app\x20use`\x20has\x20been\x20removed.','Use\x20`lovrabet\x20workspace\x20init\x20--appcode\x20<code>`\x20instead.','OCR','35lmxBwK','\x20\x20[high-risk-write]','command','4nxzsCS','push','Runtime\x20Roles','`lovrabet\x20logs\x20clear`\x20has\x20been\x20removed.','app','Service\x20Tree','Configuration','values','BFF\x20Scripts','use','isSingleCommand','app\x20init','279480JXddcc','Artifacts','Use\x20`lovrabet\x20workspace\x20use\x20--app\x20<name>`\x20instead.','service','API\x20Documentation','show','Knowledge\x20Base','Instant\x20API','Agent\x20Schedules','Logs'];a47_0x4930=function(){return _0xdee5ba;};return a47_0x4930();}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';function a47_0xc4ff(_0x42f05b,_0x19e54f){_0x42f05b=_0x42f05b-0x13e;const _0x4930d0=a47_0x4930();let _0xc4ff90=_0x4930d0[_0x42f05b];return _0xc4ff90;}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';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x5ef194){const _0x39ad50=a47_0xc4ff;for(const _0x139a97 of _0x5ef194){definitions['set'](_0x139a97[_0x39ad50(0x148)]+':'+_0x139a97[_0x39ad50(0x172)],_0x139a97);let _0x207ad4=serviceGroups[_0x39ad50(0x152)](_0x139a97['service']);!_0x207ad4&&(_0x207ad4=[],serviceGroups['set'](_0x139a97[_0x39ad50(0x148)],_0x207ad4)),_0x207ad4[_0x39ad50(0x174)](_0x139a97);}}function registerService(_0x46e38a,_0x4e4968,_0x385d24){const _0x5d4e49=a47_0xc4ff;registerDefinitions(_0x4e4968);const _0x24848f=_0x54afc2=>_0x54afc2==='read'?'':_0x54afc2==='write'?'\x20\x20[write]':_0x5d4e49(0x171),_0x1dba54={'service':_0x4e4968[0x0][_0x5d4e49(0x148)],'label':_0x46e38a,'commands':_0x4e4968['map'](_0x35707d=>({'command':_0x35707d[_0x5d4e49(0x172)],'description':_0x35707d[_0x5d4e49(0x163)],'tag':_0x24848f(_0x35707d['risk'])})),'defaultCommand':_0x385d24?.[_0x5d4e49(0x168)]??(_0x385d24?.[_0x5d4e49(0x143)]?_0x4e4968[0x0]['command']:undefined),'isSingleCommand':_0x385d24?.[_0x5d4e49(0x143)]};serviceRegistry[_0x5d4e49(0x174)](_0x1dba54),serviceByName['set'](_0x1dba54[_0x5d4e49(0x148)],_0x1dba54);}registerService(a47_0x213dd8(0x154),authDefinitions,{'defaultCommand':a47_0x213dd8(0x162)}),registerService('User\x20Accounts',userAccountDefinitions),registerService(a47_0x213dd8(0x16a),appDefinitions,{'defaultCommand':a47_0x213dd8(0x15e)}),registerService(a47_0x213dd8(0x16b),workspaceDefinitions),registerService(a47_0x213dd8(0x166),appConfigDefinitions),registerService(a47_0x213dd8(0x13f),configDefinitions,{'defaultCommand':'list'}),registerService(a47_0x213dd8(0x175),roleDefinitions,{'defaultCommand':a47_0x213dd8(0x15e)}),registerService('Runtime\x20Permissions',permitDefinitions),registerService(a47_0x213dd8(0x149),apiDocDefinitions),registerService('Datasets',datasetDefinitions),registerService(a47_0x213dd8(0x14c),dataDefinitions),registerService(a47_0x213dd8(0x158),sqlDefinitions),registerService(a47_0x213dd8(0x141),bffDefinitions),registerService(a47_0x213dd8(0x15d),personalBffDefinitions),registerService(a47_0x213dd8(0x146),artifactDefinitions),registerService('File',fileDefinitions),registerService(a47_0x213dd8(0x16f),ocrDefinitions),registerService(a47_0x213dd8(0x14b),kbDefinitions),registerService(a47_0x213dd8(0x14f),notificationDefinitions,{'defaultCommand':a47_0x213dd8(0x167)}),registerService(a47_0x213dd8(0x14d),scheduleDefinitions,{'defaultCommand':a47_0x213dd8(0x15e)}),registerService(a47_0x213dd8(0x13e),serviceDefinitions,{'defaultCommand':a47_0x213dd8(0x15e)}),registerService('Skills',skillDefinitions,{'defaultCommand':a47_0x213dd8(0x151)}),registerService(a47_0x213dd8(0x153),cliSkillDefinitions,{'defaultCommand':a47_0x213dd8(0x151)}),registerService(a47_0x213dd8(0x157),[updateDefinition],{'defaultCommand':'run','isSingleCommand':!![]}),registerService(a47_0x213dd8(0x165),[doctorDefinition],{'isSingleCommand':!![]}),registerService(a47_0x213dd8(0x150),[schemaDefinition],{'isSingleCommand':!![]}),registerService(a47_0x213dd8(0x14e),logsDefinitions,{'defaultCommand':a47_0x213dd8(0x14a)});export function findDefinition(_0x22bf76,_0x3173c8){return definitions['get'](_0x22bf76+':'+_0x3173c8);}export function resolveRemovedCommand(_0x4f244d,_0x1ceca4){const _0x3a2125=a47_0x213dd8;if(_0x4f244d===_0x3a2125(0x177)&&_0x1ceca4===_0x3a2125(0x15c))return{'command':_0x3a2125(0x144),'message':_0x3a2125(0x16c),'hint':_0x3a2125(0x16e)};if(_0x4f244d===_0x3a2125(0x177)&&_0x1ceca4===_0x3a2125(0x142))return{'command':'app\x20use','message':_0x3a2125(0x16d),'hint':_0x3a2125(0x147)};if(_0x4f244d==='logs'&&_0x1ceca4===_0x3a2125(0x169))return{'command':_0x3a2125(0x159),'message':_0x3a2125(0x176),'hint':'Use\x20`lovrabet\x20logs\x20show`\x20to\x20view\x20command\x20history.'};return undefined;}export function isKnownService(_0x16616e){return serviceByName['has'](_0x16616e);}export function getServiceEntry(_0x3200c2){const _0x48dc8d=a47_0x213dd8;return serviceByName[_0x48dc8d(0x152)](_0x3200c2);}export function getAllDefinitions(){const _0x348b5a=a47_0x213dd8;return Array[_0x348b5a(0x160)](definitions[_0x348b5a(0x140)]());}
@@ -1 +1 @@
1
- const a48_0x1b7188=a48_0x4927;function a48_0x4927(_0x39895b,_0x20072a){_0x39895b=_0x39895b-0xf5;const _0x419363=a48_0x4193();let _0x4927d1=_0x419363[_0x39895b];return _0x4927d1;}(function(_0x4e8d8a,_0x47c77b){const _0x3a79b6=a48_0x4927,_0x9c5413=_0x4e8d8a();while(!![]){try{const _0x528e34=-parseInt(_0x3a79b6(0xf8))/0x1*(-parseInt(_0x3a79b6(0xfb))/0x2)+parseInt(_0x3a79b6(0xf5))/0x3*(parseInt(_0x3a79b6(0x10d))/0x4)+-parseInt(_0x3a79b6(0xfc))/0x5*(parseInt(_0x3a79b6(0xfd))/0x6)+-parseInt(_0x3a79b6(0x101))/0x7*(-parseInt(_0x3a79b6(0x109))/0x8)+-parseInt(_0x3a79b6(0x103))/0x9+parseInt(_0x3a79b6(0x108))/0xa*(-parseInt(_0x3a79b6(0x112))/0xb)+parseInt(_0x3a79b6(0x111))/0xc*(parseInt(_0x3a79b6(0x107))/0xd);if(_0x528e34===_0x47c77b)break;else _0x9c5413['push'](_0x9c5413['shift']());}catch(_0xcc3b16){_0x9c5413['push'](_0x9c5413['shift']());}}}(a48_0x4193,0xa8f97));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 a48_0x4193(){const _0x40a21c=['11574396yYCxCV','Create\x20a\x20runtime\x20CUSTOM\x20role','Optional\x20role\x20remark','string','13bvKLXY','2609690wPeFSh','144STnwTx','POST','build','remark','290596xhexRr','Preview:\x20create\x20a\x20runtime\x20CUSTOM\x20role','trim','在当前运行应用中创建一个自定义角色;创建后可用于成员与资源权限配置。','22149204QbcqLn','33enpwLZ','description','str','validation','39TFoIny','CUSTOM','--name\x20must\x20not\x20be\x20blank.','8354BshzDc','Role\x20name','role','116HzWJJy','7650KKPFEP','2196zokkjr','high-risk-write','create','name','18011pyRjZA','/client/permit/role/create'];a48_0x4193=function(){return _0x40a21c;};return a48_0x4193();}function input(_0x36ecbe){const _0xdfda2e=a48_0x4927,_0x3fb818=_0x36ecbe[_0xdfda2e(0x114)](_0xdfda2e(0x100))[_0xdfda2e(0x10f)]();if(!_0x3fb818)throw CliErrors[_0xdfda2e(0x115)](_0xdfda2e(0xf7));const _0x5eed3d=_0x36ecbe[_0xdfda2e(0x114)](_0xdfda2e(0x10c))[_0xdfda2e(0x10f)]();return{'appCode':_0x36ecbe['appCode'],'roleName':_0x3fb818,..._0x5eed3d?{'remark':_0x5eed3d}:{}};}export const roleCreate={'service':a48_0x1b7188(0xfa),'command':'create','description':a48_0x1b7188(0x104),'risk':a48_0x1b7188(0xfe),'confirmationDescription':a48_0x1b7188(0x110),'flags':[{'name':a48_0x1b7188(0x100),'type':a48_0x1b7188(0x106),'required':!![],'description':a48_0x1b7188(0xf9)},{'name':'remark','type':a48_0x1b7188(0x106),'description':a48_0x1b7188(0x105)}],async 'validate'(_0x3c2ed7){input(_0x3c2ed7);},async 'dryRun'(_0x4ba1e3){const _0x13fca0=a48_0x1b7188;return dryRun(_0x13fca0(0x10a),_0x13fca0(0x102))['body']({'roleType':_0x13fca0(0xf6),...input(_0x4ba1e3)})[_0x13fca0(0x113)](_0x13fca0(0x10e))[_0x13fca0(0x10b)]();},async 'execute'(_0x25f1d2){const _0x134018=a48_0x1b7188,_0x5a91c4=await createRuntimeAppRole(input(_0x25f1d2));return{'ok':!![],'data':runtimeRoleWriteResult(_0x134018(0xff),{'roleId':_0x5a91c4['id']},null,projectRuntimeRole(_0x5a91c4),{'method':_0x134018(0x10a),'path':_0x134018(0x102)})};}};
1
+ const a48_0x19efbf=a48_0x3e77;(function(_0x19d60a,_0x3bfe45){const _0x2a67cc=a48_0x3e77,_0x249782=_0x19d60a();while(!![]){try{const _0x2e45bd=parseInt(_0x2a67cc(0x9b))/0x1+-parseInt(_0x2a67cc(0x9f))/0x2+-parseInt(_0x2a67cc(0xb3))/0x3*(parseInt(_0x2a67cc(0xa9))/0x4)+-parseInt(_0x2a67cc(0xb1))/0x5*(parseInt(_0x2a67cc(0xab))/0x6)+parseInt(_0x2a67cc(0xa3))/0x7*(-parseInt(_0x2a67cc(0xa4))/0x8)+-parseInt(_0x2a67cc(0xa7))/0x9*(-parseInt(_0x2a67cc(0xa1))/0xa)+parseInt(_0x2a67cc(0xaa))/0xb;if(_0x2e45bd===_0x3bfe45)break;else _0x249782['push'](_0x249782['shift']());}catch(_0x4d22c6){_0x249782['push'](_0x249782['shift']());}}}(a48_0x2ae8,0x4d578));function a48_0x2ae8(){const _0x43f71a=['14700ykPqIm','validation','2103241PEJPTW','16AunarY','body','name','135TECqkK','Create\x20a\x20runtime\x20CUSTOM\x20role','516XWtfXy','15574471OzXPGQ','3149838HCzgmQ','在当前运行应用中创建一个自定义角色;创建后可用于成员与资源权限配置。','Preview:\x20create\x20a\x20runtime\x20CUSTOM\x20role','trim','remark','high-risk-write','5EbRyrE','--name\x20must\x20not\x20be\x20blank.','1074pryDAw','/client/permit/role/create','create','build','description','189988XMbgIK','appCode','Optional\x20role\x20remark','string','278052oToHYK','str'];a48_0x2ae8=function(){return _0x43f71a;};return a48_0x2ae8();}import{createRuntimeAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a48_0x3e77(_0x95d248,_0x4c2660){_0x95d248=_0x95d248-0x98;const _0x2ae828=a48_0x2ae8();let _0x3e7746=_0x2ae828[_0x95d248];return _0x3e7746;}import{dryRun}from'../../framework/dryrun.js';import{projectRuntimeRole,runtimeRoleWriteResult}from'../../commands/role/shared.js';function input(_0x1a9955){const _0x226f12=a48_0x3e77,_0x4306c5=_0x1a9955['str'](_0x226f12(0xa6))[_0x226f12(0xae)]();if(!_0x4306c5)throw CliErrors[_0x226f12(0xa2)](_0x226f12(0xb2));const _0x1b7c4c=_0x1a9955[_0x226f12(0xa0)](_0x226f12(0xaf))[_0x226f12(0xae)]();return{'appCode':_0x1a9955[_0x226f12(0x9c)],'roleName':_0x4306c5,..._0x1b7c4c?{'remark':_0x1b7c4c}:{}};}export const roleCreate={'service':'role','command':a48_0x19efbf(0x98),'description':a48_0x19efbf(0xa8),'risk':a48_0x19efbf(0xb0),'confirmationDescription':a48_0x19efbf(0xac),'flags':[{'name':a48_0x19efbf(0xa6),'type':a48_0x19efbf(0x9e),'required':!![],'description':'Role\x20name'},{'name':a48_0x19efbf(0xaf),'type':a48_0x19efbf(0x9e),'description':a48_0x19efbf(0x9d)}],async 'validate'(_0x20b42c){input(_0x20b42c);},async 'dryRun'(_0x26b3f9){const _0x406c6d=a48_0x19efbf;return dryRun('POST','/client/permit/role/create')[_0x406c6d(0xa5)]({'roleType':'CUSTOM',...input(_0x26b3f9)})[_0x406c6d(0x9a)](_0x406c6d(0xad))[_0x406c6d(0x99)]();},async 'execute'(_0x396631){const _0x1aaf95=a48_0x19efbf,_0x2d701e=await createRuntimeAppRole(input(_0x396631));return{'ok':!![],'data':runtimeRoleWriteResult(_0x1aaf95(0x98),{'roleId':_0x2d701e['id']},null,projectRuntimeRole(_0x2d701e),{'method':'POST','path':_0x1aaf95(0xb4)})};}};
@@ -1 +1 @@
1
- const a49_0xfc64b0=a49_0x32b2;(function(_0x51aa9f,_0x11c404){const _0x1809ad=a49_0x32b2,_0x42fcb2=_0x51aa9f();while(!![]){try{const _0x3c68d0=parseInt(_0x1809ad(0x19f))/0x1+-parseInt(_0x1809ad(0x19d))/0x2*(-parseInt(_0x1809ad(0x19a))/0x3)+parseInt(_0x1809ad(0x198))/0x4*(-parseInt(_0x1809ad(0x1a0))/0x5)+parseInt(_0x1809ad(0x1a4))/0x6+parseInt(_0x1809ad(0x19b))/0x7+parseInt(_0x1809ad(0x19c))/0x8*(-parseInt(_0x1809ad(0x1a2))/0x9)+-parseInt(_0x1809ad(0x197))/0xa;if(_0x3c68d0===_0x11c404)break;else _0x42fcb2['push'](_0x42fcb2['shift']());}catch(_0x3958e0){_0x42fcb2['push'](_0x42fcb2['shift']());}}}(a49_0x1886,0x97897));import{deleteRuntimeAppRole}from'../../core/api-client.js';import{dryRun}from'../../framework/dryrun.js';function a49_0x32b2(_0x42e209,_0x57e5c7){_0x42e209=_0x42e209-0x197;const _0x1886b2=a49_0x1886();let _0x32b2df=_0x1886b2[_0x42e209];return _0x32b2df;}import{assertCustomRuntimeRole,getRuntimeRoleById,projectRuntimeRole,ROLE_ID_FLAG,runtimeRoleWriteResult}from'../../commands/role/shared.js';async function prepare(_0x566825){const _0x77b408=a49_0x32b2,_0x4805b1=await getRuntimeRoleById(_0x566825[_0x77b408(0x1a6)],_0x566825[_0x77b408(0x1a5)]('id'));return assertCustomRuntimeRole(_0x4805b1,_0x77b408(0x1a7)),_0x4805b1;}export const roleDelete={'service':'role','command':a49_0xfc64b0(0x1a7),'description':a49_0xfc64b0(0x1a9),'risk':a49_0xfc64b0(0x19e),'confirmationDescription':a49_0xfc64b0(0x199),'flags':[ROLE_ID_FLAG],async 'dryRun'(_0x2124d8){const _0x33ccff=a49_0xfc64b0,_0x5a948f=await prepare(_0x2124d8);return dryRun(_0x33ccff(0x1a8),'/client/permit/role/delete')[_0x33ccff(0x1a1)]({'id':_0x5a948f['id']})['description']('Preview:\x20delete\x20a\x20runtime\x20CUSTOM\x20role')['build']();},async 'execute'(_0x485118){const _0x50560d=a49_0xfc64b0,_0x4ba151=await prepare(_0x485118);return await deleteRuntimeAppRole(_0x4ba151['id']),{'ok':!![],'data':runtimeRoleWriteResult(_0x50560d(0x1a7),{'roleId':_0x4ba151['id']},projectRuntimeRole(_0x4ba151),null,{'method':'POST','path':_0x50560d(0x1a3)})};}};function a49_0x1886(){const _0x56fca7=['body','1281069doDUAK','/client/permit/role/delete','2848200qZZZHW','num','appCode','delete','POST','Delete\x20a\x20runtime\x20CUSTOM\x20role','6935590yshvSh','16788btwuyQ','删除当前运行应用中的自定义角色;该角色的成员关系和权限配置可能随之失效。','35556JEvsKY','3453317bssChG','16AmjLDU','4iqXKro','high-risk-write','804460oTCQeB','235LTDHSK'];a49_0x1886=function(){return _0x56fca7;};return a49_0x1886();}
1
+ function a49_0xb3ed(_0x45a150,_0x435399){_0x45a150=_0x45a150-0x125;const _0x2fb7cc=a49_0x2fb7();let _0xb3edce=_0x2fb7cc[_0x45a150];return _0xb3edce;}const a49_0x5bfad4=a49_0xb3ed;(function(_0x3b9301,_0x68bd56){const _0x5cf886=a49_0xb3ed,_0xf91b2a=_0x3b9301();while(!![]){try{const _0x38e676=-parseInt(_0x5cf886(0x127))/0x1+-parseInt(_0x5cf886(0x12b))/0x2+parseInt(_0x5cf886(0x12a))/0x3+parseInt(_0x5cf886(0x12f))/0x4+parseInt(_0x5cf886(0x128))/0x5+-parseInt(_0x5cf886(0x125))/0x6+parseInt(_0x5cf886(0x135))/0x7;if(_0x38e676===_0x68bd56)break;else _0xf91b2a['push'](_0xf91b2a['shift']());}catch(_0x4cf95a){_0xf91b2a['push'](_0xf91b2a['shift']());}}}(a49_0x2fb7,0x54a97));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(_0x5c9f54){const _0x411f17=a49_0xb3ed,_0x4dc57d=await getRuntimeRoleById(_0x5c9f54['appCode'],_0x5c9f54[_0x411f17(0x130)]('id'));return assertCustomRuntimeRole(_0x4dc57d,_0x411f17(0x129)),_0x4dc57d;}export const roleDelete={'service':a49_0x5bfad4(0x132),'command':a49_0x5bfad4(0x129),'description':a49_0x5bfad4(0x134),'risk':a49_0x5bfad4(0x133),'confirmationDescription':'删除当前运行应用中的自定义角色;该角色的成员关系和权限配置可能随之失效。','flags':[ROLE_ID_FLAG],async 'dryRun'(_0x3816dd){const _0xa2095=a49_0x5bfad4,_0x364aed=await prepare(_0x3816dd);return dryRun(_0xa2095(0x12c),'/client/permit/role/delete')[_0xa2095(0x126)]({'id':_0x364aed['id']})[_0xa2095(0x12d)]('Preview:\x20delete\x20a\x20runtime\x20CUSTOM\x20role')[_0xa2095(0x12e)]();},async 'execute'(_0x2012dd){const _0x26c756=a49_0x5bfad4,_0x39c991=await prepare(_0x2012dd);return await deleteRuntimeAppRole(_0x39c991['id']),{'ok':!![],'data':runtimeRoleWriteResult(_0x26c756(0x129),{'roleId':_0x39c991['id']},projectRuntimeRole(_0x39c991),null,{'method':_0x26c756(0x12c),'path':_0x26c756(0x131)})};}};function a49_0x2fb7(){const _0x2c5c96=['build','144748DuvRVM','num','/client/permit/role/delete','role','high-risk-write','Delete\x20a\x20runtime\x20CUSTOM\x20role','3710868yzDwxQ','2460048OysEuJ','body','419278xLBbto','3035670vwUHZD','delete','122754bPQSog','76604dguLSc','POST','description'];a49_0x2fb7=function(){return _0x2c5c96;};return a49_0x2fb7();}
@@ -1 +1 @@
1
- const a50_0x2b4910=a50_0x55af;(function(_0x1d9c87,_0x4bb347){const _0x3ab5bc=a50_0x55af,_0x3d5e73=_0x1d9c87();while(!![]){try{const _0x3bd0b7=-parseInt(_0x3ab5bc(0x1d0))/0x1+parseInt(_0x3ab5bc(0x1d9))/0x2+-parseInt(_0x3ab5bc(0x1d3))/0x3*(parseInt(_0x3ab5bc(0x1dd))/0x4)+-parseInt(_0x3ab5bc(0x1d8))/0x5+-parseInt(_0x3ab5bc(0x1d7))/0x6+-parseInt(_0x3ab5bc(0x1d1))/0x7*(-parseInt(_0x3ab5bc(0x1da))/0x8)+-parseInt(_0x3ab5bc(0x1db))/0x9*(-parseInt(_0x3ab5bc(0x1d4))/0xa);if(_0x3bd0b7===_0x4bb347)break;else _0x3d5e73['push'](_0x3d5e73['shift']());}catch(_0x508300){_0x3d5e73['push'](_0x3d5e73['shift']());}}}(a50_0x4834,0x8f981));function a50_0x55af(_0x243251,_0x5bfe12){_0x243251=_0x243251-0x1d0;const _0x48345b=a50_0x4834();let _0x55af4f=_0x48345b[_0x243251];return _0x55af4f;}import{getRuntimeRoleById,projectRuntimeRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';function a50_0x4834(){const _0x10c10f=['4179312tniQSE','2152715iZEJGm','644408CbmedS','8WHlelk','720SgUIAs','Show\x20one\x20runtime\x20role\x20by\x20ID','230368CBKovW','423211qjIATN','6726433dUkpTz','detail','24gQGyEI','164510MhwMdj','role','num'];a50_0x4834=function(){return _0x10c10f;};return a50_0x4834();}export const roleDetail={'service':a50_0x2b4910(0x1d5),'command':a50_0x2b4910(0x1d2),'description':a50_0x2b4910(0x1dc),'risk':'read','flags':[ROLE_ID_FLAG],async 'execute'(_0x54eb61){const _0x3d3155=a50_0x2b4910,_0x59addc=await getRuntimeRoleById(_0x54eb61['appCode'],_0x54eb61[_0x3d3155(0x1d6)]('id'));return{'ok':!![],'data':{'scope':'runtime','role':projectRuntimeRole(_0x59addc)}};}};
1
+ const a50_0x545aae=a50_0x108e;(function(_0x8e3c84,_0x8c3514){const _0x16282f=a50_0x108e,_0x23a0bf=_0x8e3c84();while(!![]){try{const _0x567302=parseInt(_0x16282f(0xdf))/0x1+parseInt(_0x16282f(0xe1))/0x2*(-parseInt(_0x16282f(0xeb))/0x3)+parseInt(_0x16282f(0xe8))/0x4+-parseInt(_0x16282f(0xec))/0x5*(parseInt(_0x16282f(0xe4))/0x6)+-parseInt(_0x16282f(0xea))/0x7*(-parseInt(_0x16282f(0xe3))/0x8)+parseInt(_0x16282f(0xee))/0x9+-parseInt(_0x16282f(0xe0))/0xa;if(_0x567302===_0x8c3514)break;else _0x23a0bf['push'](_0x23a0bf['shift']());}catch(_0x5e33bb){_0x23a0bf['push'](_0x23a0bf['shift']());}}}(a50_0x37a1,0x5038e));import{getRuntimeRoleById,projectRuntimeRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';function a50_0x108e(_0x1260e7,_0x147427){_0x1260e7=_0x1260e7-0xdf;const _0x37a161=a50_0x37a1();let _0x108e71=_0x37a161[_0x1260e7];return _0x108e71;}function a50_0x37a1(){const _0x3aa5fc=['2229fwpgol','641595gYHWjp','detail','4922343avHeuS','305904mtCPsg','1189950tBkglm','1246RMemQl','Show\x20one\x20runtime\x20role\x20by\x20ID','24LLPWDf','24zZHLDT','runtime','read','role','1592044cnLmNg','appCode','403452gRWQrv'];a50_0x37a1=function(){return _0x3aa5fc;};return a50_0x37a1();}export const roleDetail={'service':a50_0x545aae(0xe7),'command':a50_0x545aae(0xed),'description':a50_0x545aae(0xe2),'risk':a50_0x545aae(0xe6),'flags':[ROLE_ID_FLAG],async 'execute'(_0x56cfc4){const _0x9ec89f=a50_0x545aae,_0x118bf9=await getRuntimeRoleById(_0x56cfc4[_0x9ec89f(0xe9)],_0x56cfc4['num']('id'));return{'ok':!![],'data':{'scope':_0x9ec89f(0xe5),'role':projectRuntimeRole(_0x118bf9)}};}};
@@ -1 +1 @@
1
- (function(_0x32a71b,_0x119b86){const _0x6de1a8=a51_0x1434,_0x5c120e=_0x32a71b();while(!![]){try{const _0x4cf507=-parseInt(_0x6de1a8(0x72))/0x1+parseInt(_0x6de1a8(0x6d))/0x2+-parseInt(_0x6de1a8(0x74))/0x3+-parseInt(_0x6de1a8(0x6e))/0x4*(parseInt(_0x6de1a8(0x71))/0x5)+-parseInt(_0x6de1a8(0x70))/0x6*(-parseInt(_0x6de1a8(0x73))/0x7)+parseInt(_0x6de1a8(0x75))/0x8*(parseInt(_0x6de1a8(0x6f))/0x9)+parseInt(_0x6de1a8(0x76))/0xa;if(_0x4cf507===_0x119b86)break;else _0x5c120e['push'](_0x5c120e['shift']());}catch(_0x25484c){_0x5c120e['push'](_0x5c120e['shift']());}}}(a51_0x42db,0x4fd97));import{roleList}from'../../commands/role/list.js';import{roleDetail}from'../../commands/role/detail.js';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];function a51_0x1434(_0x22189d,_0x866bf8){_0x22189d=_0x22189d-0x6d;const _0x42db17=a51_0x42db();let _0x143415=_0x42db17[_0x22189d];return _0x143415;}function a51_0x42db(){const _0x178c9e=['65715mwTkVC','434739kXBXzr','1365602kpvGQu','1067313fTqPQM','1683296AVZGgo','4196470QRGMfa','299828BVmDJC','16eKQijr','9FHyQmH','12CsoEnU'];a51_0x42db=function(){return _0x178c9e;};return a51_0x42db();}
1
+ (function(_0xcc4e39,_0x328ab7){const _0x5e8796=a51_0xc72a,_0x2e17a6=_0xcc4e39();while(!![]){try{const _0x593189=parseInt(_0x5e8796(0x15a))/0x1+-parseInt(_0x5e8796(0x15d))/0x2+-parseInt(_0x5e8796(0x156))/0x3+parseInt(_0x5e8796(0x15c))/0x4*(-parseInt(_0x5e8796(0x154))/0x5)+parseInt(_0x5e8796(0x15b))/0x6*(-parseInt(_0x5e8796(0x159))/0x7)+parseInt(_0x5e8796(0x158))/0x8+parseInt(_0x5e8796(0x157))/0x9*(parseInt(_0x5e8796(0x155))/0xa);if(_0x593189===_0x328ab7)break;else _0x2e17a6['push'](_0x2e17a6['shift']());}catch(_0x3f4af5){_0x2e17a6['push'](_0x2e17a6['shift']());}}}(a51_0x43e5,0x38075));import{roleList}from'../../commands/role/list.js';import{roleDetail}from'../../commands/role/detail.js';import{roleCreate}from'../../commands/role/create.js';function a51_0x43e5(){const _0x1f6a0a=['1988696zWUNmE','238hcwDeC','294627DeJCzK','12072MkQliu','26360VoXPKZ','26440sqBPNM','235vZzHFw','80zRXqJf','466137Dvqzku','262143jDHMAR'];a51_0x43e5=function(){return _0x1f6a0a;};return a51_0x43e5();}import{roleUpdate}from'../../commands/role/update.js';import{roleDelete}from'../../commands/role/delete.js';import{roleUserAdd}from'../../commands/role/user-add.js';function a51_0xc72a(_0x167af5,_0x4734d6){_0x167af5=_0x167af5-0x154;const _0x43e558=a51_0x43e5();let _0xc72a87=_0x43e558[_0x167af5];return _0xc72a87;}import{roleUserRemove}from'../../commands/role/user-remove.js';export const roleDefinitions=[roleList,roleDetail,roleCreate,roleUpdate,roleDelete,roleUserAdd,roleUserRemove];
@@ -1 +1 @@
1
- const a52_0x3a9dd1=a52_0x219e;(function(_0x26b32b,_0x119a47){const _0xd9ce74=a52_0x219e,_0x25fac5=_0x26b32b();while(!![]){try{const _0x47ac22=parseInt(_0xd9ce74(0x1a2))/0x1+-parseInt(_0xd9ce74(0x19e))/0x2+-parseInt(_0xd9ce74(0x1ab))/0x3*(parseInt(_0xd9ce74(0x1a3))/0x4)+parseInt(_0xd9ce74(0x1b9))/0x5+parseInt(_0xd9ce74(0x19b))/0x6+-parseInt(_0xd9ce74(0x1a7))/0x7*(-parseInt(_0xd9ce74(0x1a6))/0x8)+-parseInt(_0xd9ce74(0x1a9))/0x9;if(_0x47ac22===_0x119a47)break;else _0x25fac5['push'](_0x25fac5['shift']());}catch(_0x55e809){_0x25fac5['push'](_0x25fac5['shift']());}}}(a52_0x2e20,0x5dac5));import{listRuntimeAppRoles}from'../../core/api-client.js';function a52_0x2e20(){const _0x2bdf23=['num','216yWdwlK','273tgtLTH','map','1132596EHRDwO','isSafeInteger','17997yGtvLi','Runtime\x20role\x20type','string','list','length','read','Fuzzy\x20role-name\x20filter','--pagesize\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.','paging','List\x20runtime\x20roles\x20for\x20the\x20current\x20app','--page\x20must\x20be\x20a\x20positive\x20integer.','type','number','runtime','3412610ZZPRGA','validation','Page\x20number','Page\x20size\x20from\x201\x20to\x20100','name','pagesize','918756JGKKsM','items','appCode','1073770OKluxr','str','page','slice','455672bjSbKb','164VhmrZZ','toUpperCase'];a52_0x2e20=function(){return _0x2bdf23;};return a52_0x2e20();}import{CliErrors}from'../../errors.js';import{listAllRuntimeRoles,projectRuntimeRole,RUNTIME_ROLE_TYPES}from'../../commands/role/shared.js';function a52_0x219e(_0x3fe932,_0x2933da){_0x3fe932=_0x3fe932-0x196;const _0x2e20cd=a52_0x2e20();let _0x219ea0=_0x2e20cd[_0x3fe932];return _0x219ea0;}export const roleList={'service':'role','command':a52_0x3a9dd1(0x1ae),'description':a52_0x3a9dd1(0x1b4),'risk':a52_0x3a9dd1(0x1b0),'flags':[{'name':'type','type':a52_0x3a9dd1(0x1ad),'enum':RUNTIME_ROLE_TYPES,'description':a52_0x3a9dd1(0x1ac)},{'name':a52_0x3a9dd1(0x199),'type':'string','description':a52_0x3a9dd1(0x1b1)},{'name':'page','type':a52_0x3a9dd1(0x1b7),'default':0x1,'description':a52_0x3a9dd1(0x197)},{'name':a52_0x3a9dd1(0x19a),'type':a52_0x3a9dd1(0x1b7),'default':0x64,'description':a52_0x3a9dd1(0x198)}],async 'validate'(_0x5b9fab){const _0x3bfac3=a52_0x3a9dd1,_0x24f2c9=_0x5b9fab['str'](_0x3bfac3(0x1b6))['toUpperCase']();if(_0x24f2c9&&!RUNTIME_ROLE_TYPES['includes'](_0x24f2c9))throw CliErrors[_0x3bfac3(0x196)]('Invalid\x20runtime\x20role\x20type:\x20'+_0x24f2c9+'.');const _0x14327a=_0x5b9fab['num'](_0x3bfac3(0x1a0),0x1),_0x4403e7=_0x5b9fab[_0x3bfac3(0x1a5)](_0x3bfac3(0x19a),0x64);if(!Number[_0x3bfac3(0x1aa)](_0x14327a)||_0x14327a<0x1)throw CliErrors[_0x3bfac3(0x196)](_0x3bfac3(0x1b5));if(!Number['isSafeInteger'](_0x4403e7)||_0x4403e7<0x1||_0x4403e7>0x64)throw CliErrors[_0x3bfac3(0x196)](_0x3bfac3(0x1b2));},async 'execute'(_0x2baf5a){const _0x28bf94=a52_0x3a9dd1,_0x184199=_0x2baf5a['str']('type')[_0x28bf94(0x1a4)](),_0x37ced6=_0x2baf5a[_0x28bf94(0x19f)](_0x28bf94(0x199))['trim'](),_0x1d3e1d=_0x2baf5a[_0x28bf94(0x1a5)]('page',0x1),_0x449474=_0x2baf5a['num'](_0x28bf94(0x19a),0x64);if(_0x184199){const _0x15c329=(await listAllRuntimeRoles(_0x2baf5a[_0x28bf94(0x19d)],{..._0x37ced6?{'roleName':_0x37ced6}:{}}))['filter'](_0x260ea8=>_0x260ea8['roleType']===_0x184199),_0x108dd0=(_0x1d3e1d-0x1)*_0x449474;return{'ok':!![],'data':{'scope':_0x28bf94(0x1b8),'roles':_0x15c329[_0x28bf94(0x1a1)](_0x108dd0,_0x108dd0+_0x449474)[_0x28bf94(0x1a8)](projectRuntimeRole),'paging':{'currentPage':_0x1d3e1d,'pageSize':_0x449474,'totalCount':_0x15c329[_0x28bf94(0x1af)]}}};}const _0x187804=await listRuntimeAppRoles(_0x2baf5a[_0x28bf94(0x19d)],{..._0x37ced6?{'roleName':_0x37ced6}:{},'currentPage':_0x1d3e1d,'pageSize':_0x449474});return{'ok':!![],'data':{'scope':'runtime','roles':_0x187804[_0x28bf94(0x19c)][_0x28bf94(0x1a8)](projectRuntimeRole),'paging':_0x187804[_0x28bf94(0x1b3)]}};}};
1
+ const a52_0x3b54eb=a52_0xe515;function a52_0xe515(_0x19e5d1,_0x43336e){_0x19e5d1=_0x19e5d1-0x19f;const _0x3e24ae=a52_0x3e24();let _0xe515b7=_0x3e24ae[_0x19e5d1];return _0xe515b7;}(function(_0x4d37ca,_0x13d782){const _0x2d6f9c=a52_0xe515,_0x20a951=_0x4d37ca();while(!![]){try{const _0x466653=parseInt(_0x2d6f9c(0x1a4))/0x1*(parseInt(_0x2d6f9c(0x1c3))/0x2)+parseInt(_0x2d6f9c(0x1ad))/0x3+parseInt(_0x2d6f9c(0x1ae))/0x4+-parseInt(_0x2d6f9c(0x1bc))/0x5+parseInt(_0x2d6f9c(0x1c0))/0x6*(parseInt(_0x2d6f9c(0x1ac))/0x7)+-parseInt(_0x2d6f9c(0x1a6))/0x8+parseInt(_0x2d6f9c(0x1a7))/0x9*(-parseInt(_0x2d6f9c(0x1ba))/0xa);if(_0x466653===_0x13d782)break;else _0x20a951['push'](_0x20a951['shift']());}catch(_0x443dbb){_0x20a951['push'](_0x20a951['shift']());}}}(a52_0x3e24,0x920bf));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_0x3b54eb(0x1ab),'command':a52_0x3b54eb(0x1a1),'description':a52_0x3b54eb(0x1a8),'risk':a52_0x3b54eb(0x1b1),'flags':[{'name':a52_0x3b54eb(0x1b2),'type':a52_0x3b54eb(0x1b9),'enum':RUNTIME_ROLE_TYPES,'description':'Runtime\x20role\x20type'},{'name':a52_0x3b54eb(0x1b7),'type':'string','description':a52_0x3b54eb(0x1c2)},{'name':a52_0x3b54eb(0x1aa),'type':a52_0x3b54eb(0x1a3),'default':0x1,'description':a52_0x3b54eb(0x1a2)},{'name':'pagesize','type':a52_0x3b54eb(0x1a3),'default':0x64,'description':'Page\x20size\x20from\x201\x20to\x20100'}],async 'validate'(_0x3d402c){const _0x1dbcba=a52_0x3b54eb,_0x1a8e92=_0x3d402c[_0x1dbcba(0x1a0)]('type')[_0x1dbcba(0x1b6)]();if(_0x1a8e92&&!RUNTIME_ROLE_TYPES[_0x1dbcba(0x1a9)](_0x1a8e92))throw CliErrors['validation'](_0x1dbcba(0x1be)+_0x1a8e92+'.');const _0x25c847=_0x3d402c[_0x1dbcba(0x1c5)]('page',0x1),_0x342d67=_0x3d402c[_0x1dbcba(0x1c5)](_0x1dbcba(0x1b5),0x64);if(!Number['isSafeInteger'](_0x25c847)||_0x25c847<0x1)throw CliErrors[_0x1dbcba(0x19f)]('--page\x20must\x20be\x20a\x20positive\x20integer.');if(!Number[_0x1dbcba(0x1bf)](_0x342d67)||_0x342d67<0x1||_0x342d67>0x64)throw CliErrors[_0x1dbcba(0x19f)](_0x1dbcba(0x1c1));},async 'execute'(_0x202f37){const _0x8753ad=a52_0x3b54eb,_0x533eab=_0x202f37[_0x8753ad(0x1a0)](_0x8753ad(0x1b2))['toUpperCase'](),_0x518c78=_0x202f37[_0x8753ad(0x1a0)](_0x8753ad(0x1b7))['trim'](),_0x291434=_0x202f37[_0x8753ad(0x1c5)](_0x8753ad(0x1aa),0x1),_0x136236=_0x202f37['num'](_0x8753ad(0x1b5),0x64);if(_0x533eab){const _0x4b1cbb=(await listAllRuntimeRoles(_0x202f37[_0x8753ad(0x1b8)],{..._0x518c78?{'roleName':_0x518c78}:{}}))[_0x8753ad(0x1af)](_0x18096b=>_0x18096b[_0x8753ad(0x1b0)]===_0x533eab),_0x220a4e=(_0x291434-0x1)*_0x136236;return{'ok':!![],'data':{'scope':'runtime','roles':_0x4b1cbb[_0x8753ad(0x1c4)](_0x220a4e,_0x220a4e+_0x136236)[_0x8753ad(0x1bd)](projectRuntimeRole),'paging':{'currentPage':_0x291434,'pageSize':_0x136236,'totalCount':_0x4b1cbb[_0x8753ad(0x1b4)]}}};}const _0x3a6c76=await listRuntimeAppRoles(_0x202f37['appCode'],{..._0x518c78?{'roleName':_0x518c78}:{},'currentPage':_0x291434,'pageSize':_0x136236});return{'ok':!![],'data':{'scope':_0x8753ad(0x1b3),'roles':_0x3a6c76[_0x8753ad(0x1a5)][_0x8753ad(0x1bd)](projectRuntimeRole),'paging':_0x3a6c76[_0x8753ad(0x1bb)]}};}};function a52_0x3e24(){const _0x4cd190=['appCode','string','868790GJHpRg','paging','2683665daLDEm','map','Invalid\x20runtime\x20role\x20type:\x20','isSafeInteger','546AlTjYx','--pagesize\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.','Fuzzy\x20role-name\x20filter','1946mmAwhI','slice','num','validation','str','list','Page\x20number','number','1049IHeDAn','items','8641560qlBonH','9ZEpQJT','List\x20runtime\x20roles\x20for\x20the\x20current\x20app','includes','page','role','22967DUoMGE','1475469rhMFXv','1963772VizXhS','filter','roleType','read','type','runtime','length','pagesize','toUpperCase','name'];a52_0x3e24=function(){return _0x4cd190;};return a52_0x3e24();}
@@ -1 +1 @@
1
- const a53_0x5077fe=a53_0x5f3d;(function(_0x21c99a,_0x4ff32f){const _0x2d9b28=a53_0x5f3d,_0x2b2c4e=_0x21c99a();while(!![]){try{const _0x369fa6=-parseInt(_0x2d9b28(0x1be))/0x1+parseInt(_0x2d9b28(0x1c0))/0x2*(-parseInt(_0x2d9b28(0x1ba))/0x3)+parseInt(_0x2d9b28(0x1d9))/0x4+-parseInt(_0x2d9b28(0x1db))/0x5+parseInt(_0x2d9b28(0x1cf))/0x6*(-parseInt(_0x2d9b28(0x1bc))/0x7)+parseInt(_0x2d9b28(0x1eb))/0x8+parseInt(_0x2d9b28(0x1f1))/0x9;if(_0x369fa6===_0x4ff32f)break;else _0x2b2c4e['push'](_0x2b2c4e['shift']());}catch(_0x117252){_0x2b2c4e['push'](_0x2b2c4e['shift']());}}}(a53_0x5b75,0x8a110));import{listRuntimeAppUsers,listRuntimeAppRoles,listRuntimeRoleUsers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const RUNTIME_ROLE_TYPES=[a53_0x5077fe(0x1d3),a53_0x5077fe(0x1c5),a53_0x5077fe(0x1da),a53_0x5077fe(0x1c1)];const BUILTIN_ROLE_TYPES=[a53_0x5077fe(0x1d3),a53_0x5077fe(0x1c5),a53_0x5077fe(0x1da)];export const ROLE_ID_FLAG={'name':'id','type':'number','required':!![],'description':a53_0x5077fe(0x1e8)};export const ROLE_REF_FLAG={'name':'role','type':a53_0x5077fe(0x1cb),'required':!![],'description':a53_0x5077fe(0x1f2)};export const USER_ID_FLAG={'name':a53_0x5077fe(0x1cc),'type':a53_0x5077fe(0x1cb),'required':!![],'description':a53_0x5077fe(0x1ef)};export const EXPECT_USER_COUNT_FLAG={'name':'expect-user-count','type':a53_0x5077fe(0x1e3),'description':a53_0x5077fe(0x1d1)};export function isBuiltinRuntimeRole(_0x23d674){return BUILTIN_ROLE_TYPES['includes'](_0x23d674);}export function assertCustomRuntimeRole(_0x1bec43,_0x6e1562){const _0x170d52=a53_0x5077fe;if(_0x1bec43['roleType']!==_0x170d52(0x1c1))throw CliErrors['validation'](_0x170d52(0x1bd)+_0x6e1562+'\x20built-in\x20runtime\x20role\x20'+_0x1bec43[_0x170d52(0x1c6)]+'\x20('+_0x1bec43[_0x170d52(0x1ec)]+').','Only\x20CUSTOM\x20runtime\x20roles\x20can\x20be\x20modified\x20or\x20deleted.');}function a53_0x5f3d(_0x1677ac,_0x426728){_0x1677ac=_0x1677ac-0x1b2;const _0x5b75c6=a53_0x5b75();let _0x5f3d12=_0x5b75c6[_0x1677ac];return _0x5f3d12;}export function projectRuntimeRole(_0x36c164){const _0x23219b=a53_0x5077fe;return{'id':_0x36c164['id'],'roleName':_0x36c164[_0x23219b(0x1c6)],'roleType':_0x36c164[_0x23219b(0x1ec)],'remark':_0x36c164['remark'],'userCount':_0x36c164[_0x23219b(0x1d7)]??0x0,'permitCount':_0x36c164['permitCount']??0x0,'builtin':isBuiltinRuntimeRole(_0x36c164[_0x23219b(0x1ec)])};}export async function getRuntimeRoleById(_0x1eea11,_0x4618e5){const _0x5dd79e=a53_0x5077fe;if(!Number[_0x5dd79e(0x1cd)](_0x4618e5)||_0x4618e5<=0x0)throw CliErrors[_0x5dd79e(0x1c8)](_0x5dd79e(0x1b9));const _0x140279=(await listAllRuntimeRoles(_0x1eea11))[_0x5dd79e(0x1e6)](_0x2d4ded=>_0x2d4ded['id']===_0x4618e5&&(!_0x2d4ded[_0x5dd79e(0x1b4)]||_0x2d4ded[_0x5dd79e(0x1b4)]===_0x1eea11));if(_0x140279[_0x5dd79e(0x1f3)]!==0x1)throw CliErrors[_0x5dd79e(0x1c8)](_0x5dd79e(0x1e2)+_0x4618e5+_0x5dd79e(0x1f4)+_0x1eea11+'.',_0x5dd79e(0x1ed));return _0x140279[0x0];}export async function listAllRuntimeRoles(_0x46fdae,_0x3fb73b={}){const _0x5ea6de=a53_0x5077fe,_0x40b447=0x64,_0x299349=[];for(let _0x290206=0x1;;_0x290206+=0x1){const _0x1cefcb=await listRuntimeAppRoles(_0x46fdae,{..._0x3fb73b['roleName']?{'roleName':_0x3fb73b[_0x5ea6de(0x1c6)]}:{},'currentPage':_0x290206,'pageSize':_0x40b447});_0x299349[_0x5ea6de(0x1dc)](..._0x1cefcb[_0x5ea6de(0x1c9)]);if(_0x1cefcb['items'][_0x5ea6de(0x1f3)]<_0x40b447||_0x1cefcb[_0x5ea6de(0x1ca)]&&_0x299349[_0x5ea6de(0x1f3)]>=_0x1cefcb[_0x5ea6de(0x1ca)][_0x5ea6de(0x1d5)])return _0x299349;}}export async function resolveRuntimeRoleRef(_0x18d921,_0x28c897){const _0x569335=a53_0x5077fe,_0x1b8e22=_0x28c897['trim']();if(!_0x1b8e22)throw CliErrors['validation']('Missing\x20runtime\x20role\x20reference.',_0x569335(0x1de));if(/^\d+$/['test'](_0x1b8e22))return getRuntimeRoleById(_0x18d921,Number(_0x1b8e22));const _0x3b58ea=(await listAllRuntimeRoles(_0x18d921))[_0x569335(0x1e6)](_0x3eacee=>_0x3eacee[_0x569335(0x1c6)]===_0x1b8e22);if(_0x3b58ea[_0x569335(0x1f3)]===0x0)throw CliErrors[_0x569335(0x1c8)](_0x569335(0x1b7)+_0x1b8e22+_0x569335(0x1b3)+_0x18d921+'.',_0x569335(0x1bf));if(_0x3b58ea['length']>0x1)throw CliErrors[_0x569335(0x1c8)]('Runtime\x20role\x20name\x20\x22'+_0x1b8e22+_0x569335(0x1d8),'Pass\x20one\x20role\x20ID:\x20'+_0x3b58ea['map'](_0x2321e7=>_0x2321e7['id'])[_0x569335(0x1c3)](',\x20')+'.');return _0x3b58ea[0x0];}function parseRuntimeUserId(_0x352438){const _0x4751b6=a53_0x5077fe,_0x1c14bd=_0x352438[_0x4751b6(0x1e0)]();if(!/^\d+$/[_0x4751b6(0x1b2)](_0x1c14bd))throw CliErrors[_0x4751b6(0x1c8)](_0x4751b6(0x1ce),_0x4751b6(0x1c4));const _0x574348=Number(_0x1c14bd);if(!Number[_0x4751b6(0x1cd)](_0x574348)||_0x574348<=0x0)throw CliErrors[_0x4751b6(0x1c8)](_0x4751b6(0x1d6));return _0x574348;}export async function prepareRuntimeMemberMutation(_0x51fc81,_0x4ffea8){const _0x441b78=a53_0x5077fe,_0x4a09b3=await resolveRuntimeRoleRef(_0x51fc81[_0x441b78(0x1b4)],_0x51fc81[_0x441b78(0x1e1)]('role'));if(_0x4a09b3['roleType']===_0x441b78(0x1da))throw CliErrors[_0x441b78(0x1c8)]('OWNER\x20runtime\x20role\x20membership\x20cannot\x20be\x20changed\x20with\x20this\x20command.',_0x441b78(0x1e4));const _0x39faef=parseRuntimeUserId(_0x51fc81[_0x441b78(0x1e1)](_0x441b78(0x1cc))),_0x5c64b3=(await listRuntimeRoleUsers(_0x51fc81['appCode']))[_0x441b78(0x1c2)](_0x156e4a=>({..._0x156e4a,'userList':[..._0x156e4a[_0x441b78(0x1df)]??[]],'applyUserList':[..._0x156e4a[_0x441b78(0x1b5)]??[]]})),_0x28fa32=_0x5c64b3['find'](_0x368bab=>_0x368bab['id']===_0x4a09b3['id']);if(!_0x28fa32)throw CliErrors[_0x441b78(0x1c8)](_0x441b78(0x1b8)+_0x4a09b3['id']+'\x20is\x20missing\x20from\x20the\x20grouped\x20member\x20snapshot.',_0x441b78(0x1e7));const _0x3d1a8e=_0x28fa32['userList']['map'](_0x26e8c6=>_0x26e8c6['userId']),_0x64bded=_0x51fc81['flag']('expect-user-count');if(_0x64bded!==undefined&&_0x64bded!==null&&_0x64bded!==''){const _0xbb90f1=_0x51fc81[_0x441b78(0x1ea)](_0x441b78(0x1d0));if(!Number['isSafeInteger'](_0xbb90f1)||_0xbb90f1<0x0)throw CliErrors[_0x441b78(0x1c8)]('--expect-user-count\x20must\x20be\x20a\x20non-negative\x20integer.');if(_0x3d1a8e[_0x441b78(0x1f3)]!==_0xbb90f1)throw CliErrors[_0x441b78(0x1c8)](_0x441b78(0x1ee)+_0xbb90f1+_0x441b78(0x1e5)+_0x3d1a8e[_0x441b78(0x1f3)]+'.',_0x441b78(0x1d2));}const _0xd1dd94=_0x3d1a8e[_0x441b78(0x1dd)](_0x39faef),_0x16cf7d=[];let _0x2eb74f=!![];if(_0x4ffea8==='user-add'){const _0x5dadc8=await listRuntimeAppUsers(_0x51fc81[_0x441b78(0x1b4)]),_0x1ab0e5=_0x5dadc8[_0x441b78(0x1e6)](_0x46d5d4=>Number(_0x46d5d4['code'])===_0x39faef);if(_0x1ab0e5['length']!==0x1||!_0x1ab0e5[0x0][_0x441b78(0x1f0)]?.[_0x441b78(0x1e0)]())throw CliErrors[_0x441b78(0x1c8)](_0x441b78(0x1c7)+_0x39faef+_0x441b78(0x1f4)+_0x51fc81[_0x441b78(0x1b4)]+'.',_0x441b78(0x1e9));_0xd1dd94?(_0x2eb74f=![],_0x16cf7d[_0x441b78(0x1dc)]('User\x20'+_0x39faef+_0x441b78(0x1b6)+_0x4a09b3['id']+'.')):_0x28fa32[_0x441b78(0x1df)]['push']({'userId':_0x39faef,'username':_0x1ab0e5[0x0][_0x441b78(0x1f0)]});}else!_0xd1dd94?(_0x2eb74f=![],_0x16cf7d[_0x441b78(0x1dc)](_0x441b78(0x1bb)+_0x39faef+'\x20is\x20not\x20in\x20runtime\x20role\x20'+_0x4a09b3['id']+'.')):_0x28fa32[_0x441b78(0x1df)]=_0x28fa32['userList']['filter'](_0x43f192=>_0x43f192[_0x441b78(0x1d4)]!==_0x39faef);return{'role':_0x4a09b3,'userId':_0x39faef,'roleList':_0x5c64b3,'before':{'userIds':_0x3d1a8e},'after':{'userIds':_0x28fa32[_0x441b78(0x1df)][_0x441b78(0x1c2)](_0x2ff942=>_0x2ff942[_0x441b78(0x1d4)])},'shouldWrite':_0x2eb74f,'warnings':_0x16cf7d};}export function runtimeRoleWriteResult(_0x3170e0,_0x52e96a,_0x501fc2,_0x3c9a5a,_0x37f346,_0x323c23=[]){return{'operation':_0x3170e0,'scope':'runtime','selector':_0x52e96a,'before':_0x501fc2,'after':_0x3c9a5a,'dryRun':![],'backend':_0x37f346,'warnings':_0x323c23};}function a53_0x5b75(){const _0x393baf=['11222865ohoWtL','Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name','length','\x20was\x20not\x20found\x20in\x20app\x20','test','\x22\x20was\x20not\x20found\x20in\x20app\x20','appCode','applyUserList','\x20is\x20already\x20in\x20runtime\x20role\x20','Runtime\x20role\x20name\x20\x22','Runtime\x20role\x20','Role\x20ID\x20must\x20be\x20a\x20positive\x20integer.','3FLqfiU','User\x20','3696MGiBer','Cannot\x20','36466NfBdxZ','Run\x20`lovrabet\x20role\x20list`\x20or\x20pass\x20--role\x20<id>.','998724yHPAIf','CUSTOM','map','join','Pass\x20--user\x20<userId>;\x20name\x20and\x20account\x20lookup\x20are\x20not\x20available\x20in\x20runtime\x20scope.','USER','roleName','Runtime\x20user\x20','validation','items','paging','string','user','isSafeInteger','Runtime\x20role\x20membership\x20requires\x20a\x20numeric\x20userId.','4986QumQVE','expect-user-count','Reject\x20when\x20the\x20target\x20role\x20member\x20count\x20has\x20changed','Read\x20the\x20current\x20members\x20and\x20retry\x20with\x20the\x20new\x20expected\x20count.','ADMIN','userId','totalCount','Runtime\x20userId\x20must\x20be\x20a\x20positive\x20safe\x20integer.','userCount','\x22\x20is\x20ambiguous.','3214756gOxkhg','OWNER','4054450Lstnux','push','includes','Pass\x20--role\x20<id|name>.','userList','trim','str','Runtime\x20role\x20id\x20','number','Transfer\x20or\x20manage\x20application\x20ownership\x20through\x20the\x20dedicated\x20application\x20workflow.',',\x20found\x20','filter','Reload\x20the\x20role\x20list\x20and\x20retry\x20after\x20the\x20server\x20state\x20is\x20consistent.','Runtime\x20role\x20ID\x20returned\x20by\x20role\x20list','Use\x20a\x20numeric\x20userId\x20returned\x20by\x20the\x20current\x20application\x27s\x20personnel\x20list.','num','2402656kKIKfg','roleType','Run\x20`lovrabet\x20role\x20list`\x20and\x20use\x20a\x20role\x20from\x20the\x20current\x20app.','Runtime\x20role\x20member\x20count\x20changed:\x20expected\x20','Runtime\x20numeric\x20userId','userName'];a53_0x5b75=function(){return _0x393baf;};return a53_0x5b75();}
1
+ const a53_0x125757=a53_0x555a;(function(_0x9241bc,_0x4f901b){const _0x508a83=a53_0x555a,_0x35e0af=_0x9241bc();while(!![]){try{const _0x5e336f=parseInt(_0x508a83(0x109))/0x1*(-parseInt(_0x508a83(0x11e))/0x2)+parseInt(_0x508a83(0xfa))/0x3+parseInt(_0x508a83(0xfe))/0x4*(parseInt(_0x508a83(0xe9))/0x5)+-parseInt(_0x508a83(0x116))/0x6+parseInt(_0x508a83(0xf9))/0x7+parseInt(_0x508a83(0x10f))/0x8*(-parseInt(_0x508a83(0x11b))/0x9)+-parseInt(_0x508a83(0x105))/0xa*(-parseInt(_0x508a83(0xe0))/0xb);if(_0x5e336f===_0x4f901b)break;else _0x35e0af['push'](_0x35e0af['shift']());}catch(_0x5b1226){_0x35e0af['push'](_0x35e0af['shift']());}}}(a53_0x2f0e,0xf1a41));import{listRuntimeAppUsers,listRuntimeAppRoles,listRuntimeRoleUsers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a53_0x555a(_0x2a0348,_0x4253d1){_0x2a0348=_0x2a0348-0xdd;const _0x2f0ed1=a53_0x2f0e();let _0x555a87=_0x2f0ed1[_0x2a0348];return _0x555a87;}export const RUNTIME_ROLE_TYPES=['ADMIN',a53_0x125757(0x11f),a53_0x125757(0x119),'CUSTOM'];function a53_0x2f0e(){const _0x596470=['filter','User\x20','appCode','Pass\x20one\x20role\x20ID:\x20','trim','\x22\x20is\x20ambiguous.','map','user','number','Runtime\x20userId\x20must\x20be\x20a\x20positive\x20safe\x20integer.','roleName','\x20is\x20already\x20in\x20runtime\x20role\x20','userId','Transfer\x20or\x20manage\x20application\x20ownership\x20through\x20the\x20dedicated\x20application\x20workflow.','5916463qlVsAH','953907wnCoFN','Runtime\x20role\x20','Runtime\x20role\x20member\x20count\x20changed:\x20expected\x20','join','1844WJRyGR','OWNER\x20runtime\x20role\x20membership\x20cannot\x20be\x20changed\x20with\x20this\x20command.','string','runtime','length','test','Runtime\x20user\x20','2195410lqqONU','Pass\x20--role\x20<id|name>.','push','role','1490977sRDzke','CUSTOM','Runtime\x20role\x20ID\x20returned\x20by\x20role\x20list','totalCount','Pass\x20--user\x20<userId>;\x20name\x20and\x20account\x20lookup\x20are\x20not\x20available\x20in\x20runtime\x20scope.','validation','627576DyrvVz','roleType','items','remark','Runtime\x20role\x20membership\x20requires\x20a\x20numeric\x20userId.',',\x20found\x20','\x20is\x20missing\x20from\x20the\x20grouped\x20member\x20snapshot.','7427382ZFSBlq','\x20built-in\x20runtime\x20role\x20','code','OWNER','Missing\x20runtime\x20role\x20reference.','90HNJUYe','Runtime\x20role\x20name\x20\x22','isSafeInteger','2kmmIaq','USER','userList','Run\x20`lovrabet\x20role\x20list`\x20or\x20pass\x20--role\x20<id>.','paging','Read\x20the\x20current\x20members\x20and\x20retry\x20with\x20the\x20new\x20expected\x20count.','Reload\x20the\x20role\x20list\x20and\x20retry\x20after\x20the\x20server\x20state\x20is\x20consistent.','--expect-user-count\x20must\x20be\x20a\x20non-negative\x20integer.','str','Run\x20`lovrabet\x20role\x20list`\x20and\x20use\x20a\x20role\x20from\x20the\x20current\x20app.','flag','143ZdTwnP','Runtime\x20role\x20id\x20','applyUserList','Cannot\x20','expect-user-count','num','\x20was\x20not\x20found\x20in\x20app\x20','includes','find','5270qCCEeG','Only\x20CUSTOM\x20runtime\x20roles\x20can\x20be\x20modified\x20or\x20deleted.'];a53_0x2f0e=function(){return _0x596470;};return a53_0x2f0e();}const BUILTIN_ROLE_TYPES=['ADMIN',a53_0x125757(0x11f),a53_0x125757(0x119)];export const ROLE_ID_FLAG={'name':'id','type':a53_0x125757(0xf3),'required':!![],'description':a53_0x125757(0x10b)};export const ROLE_REF_FLAG={'name':a53_0x125757(0x108),'type':a53_0x125757(0x100),'required':!![],'description':'Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name'};export const USER_ID_FLAG={'name':a53_0x125757(0xf2),'type':a53_0x125757(0x100),'required':!![],'description':'Runtime\x20numeric\x20userId'};export const EXPECT_USER_COUNT_FLAG={'name':a53_0x125757(0xe4),'type':a53_0x125757(0xf3),'description':'Reject\x20when\x20the\x20target\x20role\x20member\x20count\x20has\x20changed'};export function isBuiltinRuntimeRole(_0x4f57ef){const _0x4e0e70=a53_0x125757;return BUILTIN_ROLE_TYPES[_0x4e0e70(0xe7)](_0x4f57ef);}export function assertCustomRuntimeRole(_0x4f3d7a,_0x447bfc){const _0x478a53=a53_0x125757;if(_0x4f3d7a['roleType']!==_0x478a53(0x10a))throw CliErrors[_0x478a53(0x10e)](_0x478a53(0xe3)+_0x447bfc+_0x478a53(0x117)+_0x4f3d7a['roleName']+'\x20('+_0x4f3d7a[_0x478a53(0x110)]+').',_0x478a53(0xea));}export function projectRuntimeRole(_0x43cee3){const _0x31f101=a53_0x125757;return{'id':_0x43cee3['id'],'roleName':_0x43cee3[_0x31f101(0xf5)],'roleType':_0x43cee3[_0x31f101(0x110)],'remark':_0x43cee3[_0x31f101(0x112)],'userCount':_0x43cee3['userCount']??0x0,'permitCount':_0x43cee3['permitCount']??0x0,'builtin':isBuiltinRuntimeRole(_0x43cee3[_0x31f101(0x110)])};}export async function getRuntimeRoleById(_0x448a7b,_0x1dc576){const _0x29ed99=a53_0x125757;if(!Number['isSafeInteger'](_0x1dc576)||_0x1dc576<=0x0)throw CliErrors[_0x29ed99(0x10e)]('Role\x20ID\x20must\x20be\x20a\x20positive\x20integer.');const _0x35f01a=(await listAllRuntimeRoles(_0x448a7b))['filter'](_0x47634a=>_0x47634a['id']===_0x1dc576&&(!_0x47634a[_0x29ed99(0xed)]||_0x47634a[_0x29ed99(0xed)]===_0x448a7b));if(_0x35f01a[_0x29ed99(0x102)]!==0x1)throw CliErrors[_0x29ed99(0x10e)](_0x29ed99(0xe1)+_0x1dc576+_0x29ed99(0xe6)+_0x448a7b+'.',_0x29ed99(0xde));return _0x35f01a[0x0];}export async function listAllRuntimeRoles(_0x5341ab,_0x2e5e0d={}){const _0x3b75d3=a53_0x125757,_0x2b6d94=0x64,_0x34a0fb=[];for(let _0x548e7e=0x1;;_0x548e7e+=0x1){const _0x417a6c=await listRuntimeAppRoles(_0x5341ab,{..._0x2e5e0d['roleName']?{'roleName':_0x2e5e0d[_0x3b75d3(0xf5)]}:{},'currentPage':_0x548e7e,'pageSize':_0x2b6d94});_0x34a0fb['push'](..._0x417a6c['items']);if(_0x417a6c[_0x3b75d3(0x111)][_0x3b75d3(0x102)]<_0x2b6d94||_0x417a6c[_0x3b75d3(0x122)]&&_0x34a0fb[_0x3b75d3(0x102)]>=_0x417a6c['paging'][_0x3b75d3(0x10c)])return _0x34a0fb;}}export async function resolveRuntimeRoleRef(_0x46a214,_0x109631){const _0x26578a=a53_0x125757,_0xbc46ad=_0x109631[_0x26578a(0xef)]();if(!_0xbc46ad)throw CliErrors['validation'](_0x26578a(0x11a),_0x26578a(0x106));if(/^\d+$/[_0x26578a(0x103)](_0xbc46ad))return getRuntimeRoleById(_0x46a214,Number(_0xbc46ad));const _0x5948a9=(await listAllRuntimeRoles(_0x46a214))[_0x26578a(0xeb)](_0x4c756d=>_0x4c756d[_0x26578a(0xf5)]===_0xbc46ad);if(_0x5948a9['length']===0x0)throw CliErrors[_0x26578a(0x10e)]('Runtime\x20role\x20name\x20\x22'+_0xbc46ad+'\x22\x20was\x20not\x20found\x20in\x20app\x20'+_0x46a214+'.',_0x26578a(0x121));if(_0x5948a9[_0x26578a(0x102)]>0x1)throw CliErrors[_0x26578a(0x10e)](_0x26578a(0x11c)+_0xbc46ad+_0x26578a(0xf0),_0x26578a(0xee)+_0x5948a9[_0x26578a(0xf1)](_0x441d2b=>_0x441d2b['id'])[_0x26578a(0xfd)](',\x20')+'.');return _0x5948a9[0x0];}function parseRuntimeUserId(_0x87c6c8){const _0x2ce9bf=a53_0x125757,_0xd98419=_0x87c6c8[_0x2ce9bf(0xef)]();if(!/^\d+$/[_0x2ce9bf(0x103)](_0xd98419))throw CliErrors[_0x2ce9bf(0x10e)](_0x2ce9bf(0x113),_0x2ce9bf(0x10d));const _0x439ed7=Number(_0xd98419);if(!Number[_0x2ce9bf(0x11d)](_0x439ed7)||_0x439ed7<=0x0)throw CliErrors[_0x2ce9bf(0x10e)](_0x2ce9bf(0xf4));return _0x439ed7;}export async function prepareRuntimeMemberMutation(_0x3c6902,_0x247dd2){const _0x5ef42a=a53_0x125757,_0x3f5171=await resolveRuntimeRoleRef(_0x3c6902['appCode'],_0x3c6902[_0x5ef42a(0xdd)](_0x5ef42a(0x108)));if(_0x3f5171[_0x5ef42a(0x110)]===_0x5ef42a(0x119))throw CliErrors[_0x5ef42a(0x10e)](_0x5ef42a(0xff),_0x5ef42a(0xf8));const _0x2d2a15=parseRuntimeUserId(_0x3c6902[_0x5ef42a(0xdd)](_0x5ef42a(0xf2))),_0x7823fc=(await listRuntimeRoleUsers(_0x3c6902[_0x5ef42a(0xed)]))['map'](_0x407eae=>({..._0x407eae,'userList':[..._0x407eae[_0x5ef42a(0x120)]??[]],'applyUserList':[..._0x407eae[_0x5ef42a(0xe2)]??[]]})),_0x10f2c7=_0x7823fc[_0x5ef42a(0xe8)](_0x41a278=>_0x41a278['id']===_0x3f5171['id']);if(!_0x10f2c7)throw CliErrors['validation'](_0x5ef42a(0xfb)+_0x3f5171['id']+_0x5ef42a(0x115),_0x5ef42a(0x124));const _0xe926a5=_0x10f2c7['userList'][_0x5ef42a(0xf1)](_0x3e71ed=>_0x3e71ed[_0x5ef42a(0xf7)]),_0xe474f0=_0x3c6902[_0x5ef42a(0xdf)]('expect-user-count');if(_0xe474f0!==undefined&&_0xe474f0!==null&&_0xe474f0!==''){const _0x552d1c=_0x3c6902[_0x5ef42a(0xe5)](_0x5ef42a(0xe4));if(!Number[_0x5ef42a(0x11d)](_0x552d1c)||_0x552d1c<0x0)throw CliErrors['validation'](_0x5ef42a(0x125));if(_0xe926a5[_0x5ef42a(0x102)]!==_0x552d1c)throw CliErrors[_0x5ef42a(0x10e)](_0x5ef42a(0xfc)+_0x552d1c+_0x5ef42a(0x114)+_0xe926a5[_0x5ef42a(0x102)]+'.',_0x5ef42a(0x123));}const _0x33964e=_0xe926a5[_0x5ef42a(0xe7)](_0x2d2a15),_0xa97be4=[];let _0x2d581f=!![];if(_0x247dd2==='user-add'){const _0x554504=await listRuntimeAppUsers(_0x3c6902['appCode']),_0x3fff95=_0x554504[_0x5ef42a(0xeb)](_0x1f62f7=>Number(_0x1f62f7[_0x5ef42a(0x118)])===_0x2d2a15);if(_0x3fff95[_0x5ef42a(0x102)]!==0x1||!_0x3fff95[0x0]['userName']?.[_0x5ef42a(0xef)]())throw CliErrors[_0x5ef42a(0x10e)](_0x5ef42a(0x104)+_0x2d2a15+'\x20was\x20not\x20found\x20in\x20app\x20'+_0x3c6902[_0x5ef42a(0xed)]+'.','Use\x20a\x20numeric\x20userId\x20returned\x20by\x20the\x20current\x20application\x27s\x20personnel\x20list.');_0x33964e?(_0x2d581f=![],_0xa97be4['push'](_0x5ef42a(0xec)+_0x2d2a15+_0x5ef42a(0xf6)+_0x3f5171['id']+'.')):_0x10f2c7[_0x5ef42a(0x120)][_0x5ef42a(0x107)]({'userId':_0x2d2a15,'username':_0x3fff95[0x0]['userName']});}else!_0x33964e?(_0x2d581f=![],_0xa97be4[_0x5ef42a(0x107)](_0x5ef42a(0xec)+_0x2d2a15+'\x20is\x20not\x20in\x20runtime\x20role\x20'+_0x3f5171['id']+'.')):_0x10f2c7[_0x5ef42a(0x120)]=_0x10f2c7['userList'][_0x5ef42a(0xeb)](_0x4c536b=>_0x4c536b[_0x5ef42a(0xf7)]!==_0x2d2a15);return{'role':_0x3f5171,'userId':_0x2d2a15,'roleList':_0x7823fc,'before':{'userIds':_0xe926a5},'after':{'userIds':_0x10f2c7[_0x5ef42a(0x120)][_0x5ef42a(0xf1)](_0x45963d=>_0x45963d[_0x5ef42a(0xf7)])},'shouldWrite':_0x2d581f,'warnings':_0xa97be4};}export function runtimeRoleWriteResult(_0x4ef7b6,_0x5e6ee,_0xe74b4f,_0x3b4414,_0x198c93,_0x2b588a=[]){const _0x1e1392=a53_0x125757;return{'operation':_0x4ef7b6,'scope':_0x1e1392(0x101),'selector':_0x5e6ee,'before':_0xe74b4f,'after':_0x3b4414,'dryRun':![],'backend':_0x198c93,'warnings':_0x2b588a};}
@@ -1 +1 @@
1
- const a54_0x2dbe45=a54_0x448f;function a54_0x2225(){const _0x7d4050=['2374056zRuMER','flag','1808695QKYfwH','Update\x20a\x20runtime\x20CUSTOM\x20role','160MqVeqD','high-risk-write','build','body','New\x20non-empty\x20role\x20remark','283364bdbCKb','10OEKLHh','update','description','3383181oSCxjF','str','trim','205401ZbcJGp','--name\x20must\x20not\x20be\x20blank.','POST','validation','1610372PmAIHW','修改当前运行应用中的自定义角色名称或备注;变更会立即影响角色展示。','Preview:\x20update\x20a\x20runtime\x20CUSTOM\x20role','role','New\x20role\x20name','/client/permit/role/update','--remark\x20must\x20not\x20be\x20blank.','remark','84918PafVlS','appCode','num','name','string','The\x20current\x20runtime\x20role\x20API\x20does\x20not\x20support\x20clearing\x20an\x20existing\x20remark.'];a54_0x2225=function(){return _0x7d4050;};return a54_0x2225();}function a54_0x448f(_0x32bf49,_0xfea4b3){_0x32bf49=_0x32bf49-0x101;const _0x2225cc=a54_0x2225();let _0x448f8f=_0x2225cc[_0x32bf49];return _0x448f8f;}(function(_0xad12aa,_0x1afd9a){const _0x4a1523=a54_0x448f,_0x21f0a2=_0xad12aa();while(!![]){try{const _0x5b11e0=parseInt(_0x4a1523(0x10d))/0x1+-parseInt(_0x4a1523(0x10e))/0x2*(parseInt(_0x4a1523(0x114))/0x3)+parseInt(_0x4a1523(0x118))/0x4+parseInt(_0x4a1523(0x108))/0x5*(-parseInt(_0x4a1523(0x120))/0x6)+-parseInt(_0x4a1523(0x106))/0x7+parseInt(_0x4a1523(0x104))/0x8+parseInt(_0x4a1523(0x111))/0x9;if(_0x5b11e0===_0x1afd9a)break;else _0x21f0a2['push'](_0x21f0a2['shift']());}catch(_0x4f06c0){_0x21f0a2['push'](_0x21f0a2['shift']());}}}(a54_0x2225,0x4a76f));import{updateRuntimeAppRole}from'../../core/api-client.js';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(_0x3d8c85){const _0x531149=a54_0x448f,_0x511d37=_0x3d8c85[_0x531149(0x105)](_0x531149(0x101))!==undefined,_0x382e6b=_0x3d8c85[_0x531149(0x105)](_0x531149(0x11f))!==undefined;if(!_0x511d37&&!_0x382e6b)throw CliErrors[_0x531149(0x117)]('Pass\x20--name\x20or\x20--remark\x20to\x20update\x20the\x20runtime\x20role.');const _0x24e24c=_0x3d8c85[_0x531149(0x112)](_0x531149(0x101))['trim'](),_0x4b01f5=_0x3d8c85['str'](_0x531149(0x11f))[_0x531149(0x113)]();if(_0x511d37&&!_0x24e24c)throw CliErrors['validation'](_0x531149(0x115));if(_0x382e6b&&!_0x4b01f5)throw CliErrors['validation'](_0x531149(0x11e),_0x531149(0x103));return{..._0x511d37?{'roleName':_0x24e24c}:{},..._0x382e6b?{'remark':_0x4b01f5}:{}};}async function prepare(_0x3cd863){const _0x3d23ff=a54_0x448f,_0x4b6516=await getRuntimeRoleById(_0x3cd863[_0x3d23ff(0x121)],_0x3cd863[_0x3d23ff(0x122)]('id'));return assertCustomRuntimeRole(_0x4b6516,_0x3d23ff(0x10f)),{'role':_0x4b6516,'body':{'id':_0x4b6516['id'],'appCode':_0x3cd863[_0x3d23ff(0x121)],...updateFields(_0x3cd863)}};}export const roleUpdate={'service':a54_0x2dbe45(0x11b),'command':a54_0x2dbe45(0x10f),'description':a54_0x2dbe45(0x107),'risk':a54_0x2dbe45(0x109),'confirmationDescription':a54_0x2dbe45(0x119),'flags':[ROLE_ID_FLAG,{'name':'name','type':a54_0x2dbe45(0x102),'description':a54_0x2dbe45(0x11c)},{'name':a54_0x2dbe45(0x11f),'type':a54_0x2dbe45(0x102),'description':a54_0x2dbe45(0x10c)}],async 'validate'(_0x2dfc47){updateFields(_0x2dfc47);},async 'dryRun'(_0x1b77b3){const _0x292221=a54_0x2dbe45,{body:_0x32c71c}=await prepare(_0x1b77b3);return dryRun('POST',_0x292221(0x11d))[_0x292221(0x10b)](_0x32c71c)[_0x292221(0x110)](_0x292221(0x11a))[_0x292221(0x10a)]();},async 'execute'(_0x5c7fed){const _0x454a35=a54_0x2dbe45,{role:_0x2653f4,body:_0x2b305d}=await prepare(_0x5c7fed),_0x12484a=await updateRuntimeAppRole(_0x2b305d);return{'ok':!![],'data':runtimeRoleWriteResult('update',{'roleId':_0x2653f4['id']},projectRuntimeRole(_0x2653f4),projectRuntimeRole(_0x12484a),{'method':_0x454a35(0x116),'path':_0x454a35(0x11d)})};}};
1
+ const a54_0x1b362d=a54_0x1e24;(function(_0x249914,_0x46edf6){const _0x258d3c=a54_0x1e24,_0x2dc427=_0x249914();while(!![]){try{const _0x7ebeab=parseInt(_0x258d3c(0x1de))/0x1*(-parseInt(_0x258d3c(0x1e9))/0x2)+parseInt(_0x258d3c(0x1f3))/0x3*(-parseInt(_0x258d3c(0x1ee))/0x4)+parseInt(_0x258d3c(0x1e4))/0x5*(-parseInt(_0x258d3c(0x1d9))/0x6)+-parseInt(_0x258d3c(0x1f6))/0x7+parseInt(_0x258d3c(0x1da))/0x8*(-parseInt(_0x258d3c(0x1dd))/0x9)+-parseInt(_0x258d3c(0x1df))/0xa*(-parseInt(_0x258d3c(0x1f5))/0xb)+parseInt(_0x258d3c(0x1f1))/0xc;if(_0x7ebeab===_0x46edf6)break;else _0x2dc427['push'](_0x2dc427['shift']());}catch(_0x29f14f){_0x2dc427['push'](_0x2dc427['shift']());}}}(a54_0x31aa,0x70cec));import{updateRuntimeAppRole}from'../../core/api-client.js';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(_0x1b4743){const _0x2542c1=a54_0x1e24,_0x5f286f=_0x1b4743[_0x2542c1(0x1e7)]('name')!==undefined,_0x2e8d4f=_0x1b4743[_0x2542c1(0x1e7)](_0x2542c1(0x1ea))!==undefined;if(!_0x5f286f&&!_0x2e8d4f)throw CliErrors['validation']('Pass\x20--name\x20or\x20--remark\x20to\x20update\x20the\x20runtime\x20role.');const _0x139365=_0x1b4743[_0x2542c1(0x1e2)](_0x2542c1(0x1e5))[_0x2542c1(0x1e1)](),_0x746034=_0x1b4743[_0x2542c1(0x1e2)]('remark')[_0x2542c1(0x1e1)]();if(_0x5f286f&&!_0x139365)throw CliErrors[_0x2542c1(0x1e6)](_0x2542c1(0x1ed));if(_0x2e8d4f&&!_0x746034)throw CliErrors['validation']('--remark\x20must\x20not\x20be\x20blank.',_0x2542c1(0x1e3));return{..._0x5f286f?{'roleName':_0x139365}:{},..._0x2e8d4f?{'remark':_0x746034}:{}};}async function prepare(_0x280d70){const _0x2b63ea=a54_0x1e24,_0x2e14cb=await getRuntimeRoleById(_0x280d70[_0x2b63ea(0x1e0)],_0x280d70[_0x2b63ea(0x1dc)]('id'));return assertCustomRuntimeRole(_0x2e14cb,_0x2b63ea(0x1f4)),{'role':_0x2e14cb,'body':{'id':_0x2e14cb['id'],'appCode':_0x280d70['appCode'],...updateFields(_0x280d70)}};}function a54_0x1e24(_0x1a9427,_0x4fd4d3){_0x1a9427=_0x1a9427-0x1d9;const _0x31aa11=a54_0x31aa();let _0x1e24b3=_0x31aa11[_0x1a9427];return _0x1e24b3;}export const roleUpdate={'service':'role','command':a54_0x1b362d(0x1f4),'description':'Update\x20a\x20runtime\x20CUSTOM\x20role','risk':'high-risk-write','confirmationDescription':a54_0x1b362d(0x1f0),'flags':[ROLE_ID_FLAG,{'name':'name','type':a54_0x1b362d(0x1ec),'description':a54_0x1b362d(0x1eb)},{'name':a54_0x1b362d(0x1ea),'type':a54_0x1b362d(0x1ec),'description':'New\x20non-empty\x20role\x20remark'}],async 'validate'(_0x3f788f){updateFields(_0x3f788f);},async 'dryRun'(_0x1f01cd){const _0x417ea4=a54_0x1b362d,{body:_0x11718c}=await prepare(_0x1f01cd);return dryRun(_0x417ea4(0x1f7),_0x417ea4(0x1db))[_0x417ea4(0x1e8)](_0x11718c)[_0x417ea4(0x1f8)](_0x417ea4(0x1ef))[_0x417ea4(0x1f2)]();},async 'execute'(_0x5ef6fe){const _0x52754b=a54_0x1b362d,{role:_0x517113,body:_0x406027}=await prepare(_0x5ef6fe),_0x127750=await updateRuntimeAppRole(_0x406027);return{'ok':!![],'data':runtimeRoleWriteResult(_0x52754b(0x1f4),{'roleId':_0x517113['id']},projectRuntimeRole(_0x517113),projectRuntimeRole(_0x127750),{'method':_0x52754b(0x1f7),'path':_0x52754b(0x1db)})};}};function a54_0x31aa(){const _0xea9998=['/client/permit/role/update','num','9FDGLHT','43vDmKnw','20nwVCIq','appCode','trim','str','The\x20current\x20runtime\x20role\x20API\x20does\x20not\x20support\x20clearing\x20an\x20existing\x20remark.','5HoFhiD','name','validation','flag','body','3624tnceVz','remark','New\x20role\x20name','string','--name\x20must\x20not\x20be\x20blank.','17084RFwPBC','Preview:\x20update\x20a\x20runtime\x20CUSTOM\x20role','修改当前运行应用中的自定义角色名称或备注;变更会立即影响角色展示。','26626020nqFFYO','build','309kAjsvm','update','1600907dobPmR','4303544OQwDGy','POST','description','440976OXXRRN','6733856UtWOCm'];a54_0x31aa=function(){return _0xea9998;};return a54_0x31aa();}
@@ -1 +1 @@
1
- const a55_0x129124=a55_0x2eec;(function(_0x41f104,_0x226a6e){const _0x5c9cb8=a55_0x2eec,_0x2f7c63=_0x41f104();while(!![]){try{const _0x11c60c=parseInt(_0x5c9cb8(0xcd))/0x1+parseInt(_0x5c9cb8(0xce))/0x2+-parseInt(_0x5c9cb8(0xd0))/0x3*(parseInt(_0x5c9cb8(0xc1))/0x4)+parseInt(_0x5c9cb8(0xca))/0x5*(parseInt(_0x5c9cb8(0xc2))/0x6)+parseInt(_0x5c9cb8(0xc3))/0x7*(parseInt(_0x5c9cb8(0xbf))/0x8)+-parseInt(_0x5c9cb8(0xc0))/0x9*(parseInt(_0x5c9cb8(0xcb))/0xa)+-parseInt(_0x5c9cb8(0xc9))/0xb;if(_0x11c60c===_0x226a6e)break;else _0x2f7c63['push'](_0x2f7c63['shift']());}catch(_0x42191e){_0x2f7c63['push'](_0x2f7c63['shift']());}}}(a55_0xa0d0,0xd6173));function a55_0x2eec(_0x376b32,_0x317a61){_0x376b32=_0x376b32-0xbb;const _0xa0d0c7=a55_0xa0d0();let _0x2eec8f=_0xa0d0c7[_0x376b32];return _0x2eec8f;}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';export const roleUserAdd={'service':a55_0x129124(0xcf),'command':a55_0x129124(0xc7),'description':a55_0x129124(0xbb),'risk':a55_0x129124(0xc6),'confirmationDescription':a55_0x129124(0xc5),'flags':[ROLE_REF_FLAG,USER_ID_FLAG,EXPECT_USER_COUNT_FLAG],async 'dryRun'(_0x21642d){const _0x169323=a55_0x129124,_0x1dce27=await prepareRuntimeMemberMutation(_0x21642d,_0x169323(0xc7));return dryRun('POST',_0x169323(0xd5))[_0x169323(0xbc)]({'appCode':_0x21642d[_0x169323(0xd3)],'roleList':_0x1dce27[_0x169323(0xbe)]})['description'](_0x1dce27[_0x169323(0xcc)]?_0x169323(0xbd):_0x1dce27['warnings'][0x0])[_0x169323(0xd4)]();},async 'execute'(_0x5baddc){const _0x2fdfbb=a55_0x129124,_0x47659d=await prepareRuntimeMemberMutation(_0x5baddc,_0x2fdfbb(0xc7));return _0x47659d[_0x2fdfbb(0xcc)]&&await updateRuntimeRoleUsers(_0x5baddc[_0x2fdfbb(0xd3)],_0x47659d[_0x2fdfbb(0xbe)]),{'ok':!![],'data':runtimeRoleWriteResult(_0x2fdfbb(0xc7),{'roleId':_0x47659d[_0x2fdfbb(0xcf)]['id'],'userId':_0x47659d['userId']},_0x47659d[_0x2fdfbb(0xc8)],_0x47659d[_0x2fdfbb(0xd1)],{'method':_0x2fdfbb(0xc4),'path':_0x2fdfbb(0xd5)},_0x47659d[_0x2fdfbb(0xd2)])};}};function a55_0xa0d0(){const _0x486e42=['Preview:\x20add\x20runtime\x20role\x20member','roleList','12653768PtztWr','6355458rIIvlY','6424CAYLXI','15378OCsika','7zGDnBV','POST','把指定运行用户加入目标角色;该用户将获得该角色对应的运行权限。','high-risk-write','user-add','before','25863849YLCDTn','2420rgMLRU','10lOFqnq','shouldWrite','297246YGBhRo','3386718RlsalQ','role','1641ETKolb','after','warnings','appCode','build','/client/permit/user-role/update-user-list','Add\x20a\x20numeric\x20userId\x20to\x20one\x20runtime\x20role','body'];a55_0xa0d0=function(){return _0x486e42;};return a55_0xa0d0();}
1
+ const a55_0x148df8=a55_0xd309;(function(_0x168427,_0xa95b61){const _0x27f254=a55_0xd309,_0xf74f76=_0x168427();while(!![]){try{const _0x42e7cb=-parseInt(_0x27f254(0x1fe))/0x1+parseInt(_0x27f254(0x1ef))/0x2*(parseInt(_0x27f254(0x1ea))/0x3)+-parseInt(_0x27f254(0x1f9))/0x4+-parseInt(_0x27f254(0x1f4))/0x5*(-parseInt(_0x27f254(0x1ed))/0x6)+-parseInt(_0x27f254(0x1ec))/0x7+-parseInt(_0x27f254(0x1f6))/0x8+parseInt(_0x27f254(0x1fb))/0x9;if(_0x42e7cb===_0xa95b61)break;else _0xf74f76['push'](_0xf74f76['shift']());}catch(_0x19b9a5){_0xf74f76['push'](_0xf74f76['shift']());}}}(a55_0xbe60,0x2dc8c));import{updateRuntimeRoleUsers}from'../../core/api-client.js';import{dryRun}from'../../framework/dryrun.js';function a55_0xbe60(){const _0x39a1c3=['692840wmgkbc','build','5215806RgXsEz','Preview:\x20add\x20runtime\x20role\x20member','user-add','93811HdbbtR','POST','body','203706mJUpez','roleList','1796214DCImzK','80442IkDGtu','shouldWrite','2fdKnrB','userId','warnings','description','appCode','135dhZzah','high-risk-write','2386160VtNLez','/client/permit/user-role/update-user-list','role'];a55_0xbe60=function(){return _0x39a1c3;};return a55_0xbe60();}import{EXPECT_USER_COUNT_FLAG,prepareRuntimeMemberMutation,ROLE_REF_FLAG,runtimeRoleWriteResult,USER_ID_FLAG}from'../../commands/role/shared.js';function a55_0xd309(_0x1e3037,_0x10db65){_0x1e3037=_0x1e3037-0x1e9;const _0xbe6095=a55_0xbe60();let _0xd3098e=_0xbe6095[_0x1e3037];return _0xd3098e;}export const roleUserAdd={'service':a55_0x148df8(0x1f8),'command':a55_0x148df8(0x1fd),'description':'Add\x20a\x20numeric\x20userId\x20to\x20one\x20runtime\x20role','risk':a55_0x148df8(0x1f5),'confirmationDescription':'把指定运行用户加入目标角色;该用户将获得该角色对应的运行权限。','flags':[ROLE_REF_FLAG,USER_ID_FLAG,EXPECT_USER_COUNT_FLAG],async 'dryRun'(_0x4dd172){const _0x55986a=a55_0x148df8,_0x1d306a=await prepareRuntimeMemberMutation(_0x4dd172,'user-add');return dryRun(_0x55986a(0x1ff),_0x55986a(0x1f7))[_0x55986a(0x1e9)]({'appCode':_0x4dd172[_0x55986a(0x1f3)],'roleList':_0x1d306a['roleList']})[_0x55986a(0x1f2)](_0x1d306a[_0x55986a(0x1ee)]?_0x55986a(0x1fc):_0x1d306a[_0x55986a(0x1f1)][0x0])[_0x55986a(0x1fa)]();},async 'execute'(_0x50fd71){const _0x1b5d77=a55_0x148df8,_0x1ffb3d=await prepareRuntimeMemberMutation(_0x50fd71,'user-add');return _0x1ffb3d[_0x1b5d77(0x1ee)]&&await updateRuntimeRoleUsers(_0x50fd71[_0x1b5d77(0x1f3)],_0x1ffb3d[_0x1b5d77(0x1eb)]),{'ok':!![],'data':runtimeRoleWriteResult(_0x1b5d77(0x1fd),{'roleId':_0x1ffb3d[_0x1b5d77(0x1f8)]['id'],'userId':_0x1ffb3d[_0x1b5d77(0x1f0)]},_0x1ffb3d['before'],_0x1ffb3d['after'],{'method':_0x1b5d77(0x1ff),'path':'/client/permit/user-role/update-user-list'},_0x1ffb3d[_0x1b5d77(0x1f1)])};}};
@@ -1 +1 @@
1
- const a56_0x54b10f=a56_0xf552;(function(_0x2a7569,_0x5f5be8){const _0xa7471d=a56_0xf552,_0x200535=_0x2a7569();while(!![]){try{const _0x1f4dfc=-parseInt(_0xa7471d(0x17c))/0x1*(parseInt(_0xa7471d(0x18e))/0x2)+parseInt(_0xa7471d(0x18f))/0x3+parseInt(_0xa7471d(0x17a))/0x4+-parseInt(_0xa7471d(0x185))/0x5*(parseInt(_0xa7471d(0x180))/0x6)+-parseInt(_0xa7471d(0x178))/0x7+-parseInt(_0xa7471d(0x18b))/0x8+-parseInt(_0xa7471d(0x189))/0x9;if(_0x1f4dfc===_0x5f5be8)break;else _0x200535['push'](_0x200535['shift']());}catch(_0x53e0f0){_0x200535['push'](_0x200535['shift']());}}}(a56_0x2098,0x402bc));import{updateRuntimeRoleUsers}from'../../core/api-client.js';import{dryRun}from'../../framework/dryrun.js';function a56_0x2098(){const _0x36e0af=['appCode','warnings','15yjUZHw','roleList','role','POST','1752435RmKnLP','before','71808gthrOS','把指定运行用户移出目标角色;该用户将失去仅由该角色授予的运行权限。','user-remove','266SQxSPM','813021XSQFCW','description','516880NyxcuW','shouldWrite','1683912lYMQFD','after','71HljOJj','body','/client/permit/user-role/update-user-list','high-risk-write','284334eUWinQ','Preview:\x20remove\x20runtime\x20role\x20member','userId'];a56_0x2098=function(){return _0x36e0af;};return a56_0x2098();}import{EXPECT_USER_COUNT_FLAG,prepareRuntimeMemberMutation,ROLE_REF_FLAG,runtimeRoleWriteResult,USER_ID_FLAG}from'../../commands/role/shared.js';function a56_0xf552(_0x476669,_0x3732cd){_0x476669=_0x476669-0x178;const _0x2098fe=a56_0x2098();let _0xf55277=_0x2098fe[_0x476669];return _0xf55277;}export const roleUserRemove={'service':a56_0x54b10f(0x187),'command':a56_0x54b10f(0x18d),'description':'Remove\x20a\x20numeric\x20userId\x20from\x20one\x20runtime\x20role','risk':a56_0x54b10f(0x17f),'confirmationDescription':a56_0x54b10f(0x18c),'flags':[ROLE_REF_FLAG,USER_ID_FLAG,EXPECT_USER_COUNT_FLAG],async 'dryRun'(_0x40531c){const _0x237a92=a56_0x54b10f,_0x1aad1a=await prepareRuntimeMemberMutation(_0x40531c,_0x237a92(0x18d));return dryRun(_0x237a92(0x188),_0x237a92(0x17e))[_0x237a92(0x17d)]({'appCode':_0x40531c[_0x237a92(0x183)],'roleList':_0x1aad1a['roleList']})[_0x237a92(0x190)](_0x1aad1a[_0x237a92(0x179)]?_0x237a92(0x181):_0x1aad1a[_0x237a92(0x184)][0x0])['build']();},async 'execute'(_0x1cbcb1){const _0x3ab3c2=a56_0x54b10f,_0x4b47de=await prepareRuntimeMemberMutation(_0x1cbcb1,_0x3ab3c2(0x18d));return _0x4b47de['shouldWrite']&&await updateRuntimeRoleUsers(_0x1cbcb1[_0x3ab3c2(0x183)],_0x4b47de[_0x3ab3c2(0x186)]),{'ok':!![],'data':runtimeRoleWriteResult(_0x3ab3c2(0x18d),{'roleId':_0x4b47de['role']['id'],'userId':_0x4b47de[_0x3ab3c2(0x182)]},_0x4b47de[_0x3ab3c2(0x18a)],_0x4b47de[_0x3ab3c2(0x17b)],{'method':_0x3ab3c2(0x188),'path':_0x3ab3c2(0x17e)},_0x4b47de[_0x3ab3c2(0x184)])};}};
1
+ const a56_0x456a85=a56_0xb720;(function(_0x497020,_0x473427){const _0x217ea2=a56_0xb720,_0x40b782=_0x497020();while(!![]){try{const _0x2d0ec5=-parseInt(_0x217ea2(0xb5))/0x1+-parseInt(_0x217ea2(0x9e))/0x2+parseInt(_0x217ea2(0xa7))/0x3+-parseInt(_0x217ea2(0xaa))/0x4+parseInt(_0x217ea2(0xa4))/0x5*(parseInt(_0x217ea2(0x9d))/0x6)+parseInt(_0x217ea2(0xaf))/0x7*(-parseInt(_0x217ea2(0xa8))/0x8)+parseInt(_0x217ea2(0xa9))/0x9;if(_0x2d0ec5===_0x473427)break;else _0x40b782['push'](_0x40b782['shift']());}catch(_0x5df947){_0x40b782['push'](_0x40b782['shift']());}}}(a56_0x54e2,0xec511));import{updateRuntimeRoleUsers}from'../../core/api-client.js';import{dryRun}from'../../framework/dryrun.js';function a56_0x54e2(){const _0x40d1f1=['77688Kontze','1589238TqgYGW','2923552RaGFCa','description','POST','shouldWrite','role','161nwTrNa','Remove\x20a\x20numeric\x20userId\x20from\x20one\x20runtime\x20role','Preview:\x20remove\x20runtime\x20role\x20member','user-remove','body','/client/permit/user-role/update-user-list','1041283BzILxo','userId','10825896SUgFUy','858506ESlrXw','warnings','before','appCode','after','roleList','5Yifsfw','build','把指定运行用户移出目标角色;该用户将失去仅由该角色授予的运行权限。','4235496QjRuhe'];a56_0x54e2=function(){return _0x40d1f1;};return a56_0x54e2();}import{EXPECT_USER_COUNT_FLAG,prepareRuntimeMemberMutation,ROLE_REF_FLAG,runtimeRoleWriteResult,USER_ID_FLAG}from'../../commands/role/shared.js';function a56_0xb720(_0x3e4777,_0x229f66){_0x3e4777=_0x3e4777-0x9c;const _0x54e2dd=a56_0x54e2();let _0xb72028=_0x54e2dd[_0x3e4777];return _0xb72028;}export const roleUserRemove={'service':a56_0x456a85(0xae),'command':a56_0x456a85(0xb2),'description':a56_0x456a85(0xb0),'risk':'high-risk-write','confirmationDescription':a56_0x456a85(0xa6),'flags':[ROLE_REF_FLAG,USER_ID_FLAG,EXPECT_USER_COUNT_FLAG],async 'dryRun'(_0x5ca1a5){const _0x408ea1=a56_0x456a85,_0x2a3b47=await prepareRuntimeMemberMutation(_0x5ca1a5,'user-remove');return dryRun(_0x408ea1(0xac),_0x408ea1(0xb4))[_0x408ea1(0xb3)]({'appCode':_0x5ca1a5[_0x408ea1(0xa1)],'roleList':_0x2a3b47[_0x408ea1(0xa3)]})[_0x408ea1(0xab)](_0x2a3b47[_0x408ea1(0xad)]?_0x408ea1(0xb1):_0x2a3b47[_0x408ea1(0x9f)][0x0])[_0x408ea1(0xa5)]();},async 'execute'(_0x1660b5){const _0x247a34=a56_0x456a85,_0x33d7b7=await prepareRuntimeMemberMutation(_0x1660b5,_0x247a34(0xb2));return _0x33d7b7[_0x247a34(0xad)]&&await updateRuntimeRoleUsers(_0x1660b5[_0x247a34(0xa1)],_0x33d7b7['roleList']),{'ok':!![],'data':runtimeRoleWriteResult('user-remove',{'roleId':_0x33d7b7['role']['id'],'userId':_0x33d7b7[_0x247a34(0x9c)]},_0x33d7b7[_0x247a34(0xa0)],_0x33d7b7[_0x247a34(0xa2)],{'method':'POST','path':_0x247a34(0xb4)},_0x33d7b7[_0x247a34(0x9f)])};}};