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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (158) hide show
  1. package/lib/cli.js +1 -1
  2. package/lib/commands/api-doc/index.js +1 -1
  3. package/lib/commands/app/cache.js +1 -1
  4. package/lib/commands/app/definitions.js +1 -1
  5. package/lib/commands/app/eligibility.js +1 -1
  6. package/lib/commands/app/mock-loader.js +1 -1
  7. package/lib/commands/app/remote-source.js +1 -1
  8. package/lib/commands/app/shared.js +1 -1
  9. package/lib/commands/app-config/get.js +1 -1
  10. package/lib/commands/app-config/index.js +1 -1
  11. package/lib/commands/artifact/index.js +1 -1
  12. package/lib/commands/auth/device.js +1 -1
  13. package/lib/commands/auth/index.js +1 -1
  14. package/lib/commands/auth/prompt.js +1 -1
  15. package/lib/commands/bff/detail.js +1 -1
  16. package/lib/commands/bff/exec.js +1 -1
  17. package/lib/commands/bff/index.js +1 -1
  18. package/lib/commands/cli-skill/index.js +1 -1
  19. package/lib/commands/common/config-policy.js +1 -1
  20. package/lib/commands/common/constraints.js +1 -1
  21. package/lib/commands/common/flags.js +1 -1
  22. package/lib/commands/common/local-file.js +1 -1
  23. package/lib/commands/config/definitions.js +1 -1
  24. package/lib/commands/config/shared.js +1 -1
  25. package/lib/commands/data/index.js +1 -1
  26. package/lib/commands/dataset/detail.js +1 -1
  27. package/lib/commands/dataset/index.js +1 -1
  28. package/lib/commands/dataset/list.js +1 -1
  29. package/lib/commands/dataset/sdk-doc.js +1 -1
  30. package/lib/commands/doctor.js +1 -1
  31. package/lib/commands/file/index.js +1 -1
  32. package/lib/commands/init.js +1 -1
  33. package/lib/commands/kb/index.js +1 -1
  34. package/lib/commands/logs/index.js +1 -1
  35. package/lib/commands/notification/config-list.js +1 -1
  36. package/lib/commands/notification/index.js +1 -1
  37. package/lib/commands/notification/shared.js +1 -1
  38. package/lib/commands/ocr/index.js +1 -1
  39. package/lib/commands/permit/dataset-get.js +1 -1
  40. package/lib/commands/permit/dataset-set.js +1 -1
  41. package/lib/commands/permit/index.js +1 -1
  42. package/lib/commands/permit/page-get.js +1 -1
  43. package/lib/commands/permit/page-set.js +1 -1
  44. package/lib/commands/permit/role-menus-set.js +1 -1
  45. package/lib/commands/permit/role-menus.js +1 -1
  46. package/lib/commands/permit/shared.js +1 -1
  47. package/lib/commands/personal-bff/index.js +1 -1
  48. package/lib/commands/registry.js +1 -1
  49. package/lib/commands/role/create.js +1 -1
  50. package/lib/commands/role/delete.js +1 -1
  51. package/lib/commands/role/detail.js +1 -1
  52. package/lib/commands/role/index.js +1 -1
  53. package/lib/commands/role/list.js +1 -1
  54. package/lib/commands/role/shared.js +1 -1
  55. package/lib/commands/role/update.js +1 -1
  56. package/lib/commands/role/user-add.js +1 -1
  57. package/lib/commands/role/user-remove.js +1 -1
  58. package/lib/commands/schedule/index.js +1 -1
  59. package/lib/commands/schema.js +1 -1
  60. package/lib/commands/service/dynamic.js +1 -1
  61. package/lib/commands/service/function-name-adapter.js +1 -1
  62. package/lib/commands/service/index.js +1 -1
  63. package/lib/commands/service/registry.js +1 -1
  64. package/lib/commands/skill/commands/create.js +1 -1
  65. package/lib/commands/skill/commands/diagram.js +1 -1
  66. package/lib/commands/skill/commands/install.js +1 -1
  67. package/lib/commands/skill/commands/list.js +1 -1
  68. package/lib/commands/skill/commands/push.js +1 -1
  69. package/lib/commands/skill/commands/validate.js +1 -1
  70. package/lib/commands/skill/diagram.js +1 -1
  71. package/lib/commands/skill/flags.js +1 -1
  72. package/lib/commands/skill/index.js +1 -1
  73. package/lib/commands/skill/manifest-helpers.js +1 -1
  74. package/lib/commands/skill/push-execute.js +1 -1
  75. package/lib/commands/skill/push-flow-helpers.js +1 -1
  76. package/lib/commands/skill/push-retarget.js +1 -1
  77. package/lib/commands/skill/scopes.js +1 -1
  78. package/lib/commands/skill/summary.js +1 -1
  79. package/lib/commands/skill/templates.js +1 -1
  80. package/lib/commands/skill/validate.js +1 -1
  81. package/lib/commands/sql/detail.js +1 -1
  82. package/lib/commands/sql/exec.js +1 -1
  83. package/lib/commands/sql/index.js +1 -1
  84. package/lib/commands/update.js +1 -1
  85. package/lib/commands/user-account/bind.js +1 -1
  86. package/lib/commands/user-account/index.js +1 -1
  87. package/lib/commands/workspace/index.js +1 -1
  88. package/lib/config/schema.js +1 -1
  89. package/lib/constant/app.js +1 -1
  90. package/lib/constant/auth-mode.js +1 -1
  91. package/lib/constant/cli.js +1 -1
  92. package/lib/constant/defaults.js +1 -1
  93. package/lib/constant/distribution.js +1 -1
  94. package/lib/constant/domain.js +1 -1
  95. package/lib/constant/env.js +1 -1
  96. package/lib/constant/output.js +1 -1
  97. package/lib/constant/product.js +1 -1
  98. package/lib/constant/risk.js +1 -1
  99. package/lib/constant/url.js +1 -1
  100. package/lib/context.js +1 -1
  101. package/lib/core/api-client.js +1 -1
  102. package/lib/core/db-resolver.js +1 -1
  103. package/lib/core/sdk-client.js +1 -1
  104. package/lib/errors.js +1 -1
  105. package/lib/framework/build-all-flags.js +1 -1
  106. package/lib/framework/dryrun.js +1 -1
  107. package/lib/framework/flags.js +1 -1
  108. package/lib/framework/help.js +1 -1
  109. package/lib/framework/index.js +1 -1
  110. package/lib/framework/output.js +1 -1
  111. package/lib/framework/preparse.js +1 -1
  112. package/lib/framework/rate-limit.js +1 -1
  113. package/lib/framework/raw-flags.js +1 -1
  114. package/lib/framework/response.js +1 -1
  115. package/lib/framework/runner-confirmation.js +1 -1
  116. package/lib/framework/runner-error.js +1 -1
  117. package/lib/framework/runner.js +1 -1
  118. package/lib/framework/schema-export.js +1 -1
  119. package/lib/framework/service-order.js +1 -1
  120. package/lib/framework/types.js +1 -1
  121. package/lib/generated/build-info.d.ts +4 -4
  122. package/lib/generated/build-info.js +1 -1
  123. package/lib/help.js +1 -1
  124. package/lib/postinstall.js +1 -1
  125. package/lib/runtime/confirmation.js +1 -1
  126. package/lib/runtime/event.js +1 -1
  127. package/lib/runtime/index.js +1 -1
  128. package/lib/runtime/queue.js +1 -1
  129. package/lib/runtime/resolve.js +1 -1
  130. package/lib/skills/builtin-skill.js +1 -1
  131. package/lib/skills/npx-skills-add.js +1 -1
  132. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  133. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  134. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  135. package/lib/skills/runtime-skill-sync/install-target.js +1 -1
  136. package/lib/skills/runtime-skill-sync/links.js +1 -1
  137. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  138. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  139. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  140. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  141. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  142. package/lib/skills/runtime-skill-sync/push.js +1 -1
  143. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  144. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  145. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  146. package/lib/skills/runtime-skill-sync.js +1 -1
  147. package/lib/skills/skill-presence.js +1 -1
  148. package/lib/utils/apply-jq-filter.js +1 -1
  149. package/lib/utils/logger.js +1 -1
  150. package/lib/utils/lossless-json.js +1 -1
  151. package/lib/utils/params.js +1 -1
  152. package/lib/utils/platform.js +1 -1
  153. package/lib/utils/update-notice.js +1 -1
  154. package/lib/utils/version.js +1 -1
  155. package/lib/utils/write-cli-side-channel.js +1 -1
  156. package/package.json +1 -1
  157. package/skills/lovrabet/SKILL.md +1 -1
  158. package/skills/lovrabet.manifest.json +3 -3
@@ -1 +1 @@
1
- const a43_0x112302=a43_0x34ce;(function(_0x3a963d,_0x564fbe){const _0x3f1992=a43_0x34ce,_0x53cd4b=_0x3a963d();while(!![]){try{const _0x558c63=-parseInt(_0x3f1992(0x127))/0x1*(-parseInt(_0x3f1992(0x115))/0x2)+parseInt(_0x3f1992(0x134))/0x3*(parseInt(_0x3f1992(0x13c))/0x4)+parseInt(_0x3f1992(0x13f))/0x5*(-parseInt(_0x3f1992(0x13e))/0x6)+-parseInt(_0x3f1992(0x131))/0x7*(-parseInt(_0x3f1992(0x11f))/0x8)+-parseInt(_0x3f1992(0x11d))/0x9*(parseInt(_0x3f1992(0x143))/0xa)+parseInt(_0x3f1992(0x13d))/0xb+parseInt(_0x3f1992(0x123))/0xc*(-parseInt(_0x3f1992(0x116))/0xd);if(_0x558c63===_0x564fbe)break;else _0x53cd4b['push'](_0x53cd4b['shift']());}catch(_0x199c8c){_0x53cd4b['push'](_0x53cd4b['shift']());}}}(a43_0x2865,0xbad8a));import{listRuntimeMenuRolePermits,listRuntimePermitRoles,saveRuntimeMenuRolePermits}from'../../core/api-client.js';function a43_0x34ce(_0x4968f3,_0xe058af){_0x4968f3=_0x4968f3-0x111;const _0x286544=a43_0x2865();let _0x34ce2f=_0x286544[_0x4968f3];return _0x34ce2f;}import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';import{resolveRuntimeRoleRef}from'../../commands/role/shared.js';import{applyRuntimeRolePermission,assertGrantOrRevoke,assertRuntimePermissionManager,assertRuntimePermitRoleConfigurable,flattenRuntimeMenuRolePermits,GRANT_FLAG,menuPermitDto,REVOKE_FLAG,ROLE_REF_FLAG,runtimePermitWriteResult,splitRefs}from'../../commands/permit/shared.js';const MENUS_FLAG={'name':a43_0x112302(0x11c),'type':a43_0x112302(0x141),'required':!![],'description':a43_0x112302(0x139)};async function prepare(_0x2c444e){const _0x307dfe=a43_0x112302;await assertRuntimePermissionManager(_0x2c444e[_0x307dfe(0x133)]);const _0x58408a=assertGrantOrRevoke(_0x2c444e[_0x307dfe(0x13a)](_0x307dfe(0x114)),_0x2c444e[_0x307dfe(0x13a)]('revoke')),_0x4f6eb8=await resolveRuntimeRoleRef(_0x2c444e['appCode'],_0x2c444e[_0x307dfe(0x138)](_0x307dfe(0x12a)));assertRuntimePermitRoleConfigurable(_0x4f6eb8);const _0x1f9707=[...new Set(splitRefs(_0x2c444e[_0x307dfe(0x138)](_0x307dfe(0x11c)),_0x307dfe(0x121))[_0x307dfe(0x132)](_0x41686c=>{const _0x3f536f=_0x307dfe,_0x2931ea=Number(_0x41686c);if(!/^\d+$/[_0x3f536f(0x136)](_0x41686c)||!Number['isSafeInteger'](_0x2931ea)||_0x2931ea<=0x0)throw CliErrors[_0x3f536f(0x13b)]('Invalid\x20runtime\x20menu\x20ID:\x20'+_0x41686c+'.');return _0x2931ea;}))],_0x3a488e=flattenRuntimeMenuRolePermits(await listRuntimeMenuRolePermits(_0x2c444e[_0x307dfe(0x133)])),_0x35295e=await listRuntimePermitRoles(_0x2c444e[_0x307dfe(0x133)]),_0x27eec2=[],_0x509300=[],_0x20eb19=[],_0x410296=[];for(const _0x46fa68 of _0x1f9707){const _0x7705e4=_0x3a488e[_0x307dfe(0x12b)](_0x42caaa=>_0x42caaa['id']===_0x46fa68);if(!_0x7705e4)throw CliErrors[_0x307dfe(0x13b)](_0x307dfe(0x122)+_0x46fa68+'\x20was\x20not\x20found.');const _0x410c96=applyRuntimeRolePermission(_0x7705e4['rolePermit'],_0x4f6eb8,_0x35295e,_0x58408a);_0x509300[_0x307dfe(0x125)]({'menuId':_0x46fa68,'rolePermit':_0x7705e4[_0x307dfe(0x137)]}),_0x20eb19['push']({'menuId':_0x46fa68,'rolePermit':_0x410c96[_0x307dfe(0x128)]});if(_0x410c96[_0x307dfe(0x119)])_0x27eec2[_0x307dfe(0x125)](menuPermitDto(_0x2c444e[_0x307dfe(0x133)],_0x7705e4,_0x410c96['roles']));else _0x410296[_0x307dfe(0x125)](_0x307dfe(0x122)+_0x46fa68+_0x307dfe(0x124)+_0x58408a+_0x307dfe(0x126)+_0x4f6eb8['id']+'.');}return{'operation':_0x58408a,'role':_0x4f6eb8,'menuIds':_0x1f9707,'permitList':_0x27eec2,'before':_0x509300,'after':_0x20eb19,'warnings':_0x410296};}function a43_0x2865(){const _0x5c937b=['push','\x20for\x20role\x20','52966PmTgIl','roles','permit','role','find','body','\x20selected\x20runtime\x20menus','permitList','before','build','6097021SdtUDx','map','appCode','13290seKWwQ','operation','test','rolePermit','str','Comma-separated\x20runtime\x20menu\x20IDs','bool','validation','1292INyShB','12443310xnZXJv','102NDWSCr','94935qNFwet','after','string','授予或收回目标角色对指定运行菜单的访问权限;变更会影响该角色用户的菜单可见性。','3560VLaCXr','/client/permit/resource/batch-save-menu','role-menus-set','Grant\x20or\x20revoke\x20selected\x20runtime\x20menus\x20for\x20one\x20role','length','grant','30tiJRKr','883051dUiVhc','description','high-risk-write','changed','revoke','menuIds','menus','24417QIZuew','POST','8EuxoOU','Preview:\x20','--menus','Runtime\x20menu\x20','384JixMhn','\x20already\x20reflects\x20'];a43_0x2865=function(){return _0x5c937b;};return a43_0x2865();}export const permitRoleMenusSet={'service':a43_0x112302(0x129),'command':a43_0x112302(0x111),'description':a43_0x112302(0x112),'risk':a43_0x112302(0x118),'confirmationDescription':a43_0x112302(0x142),'flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,MENUS_FLAG],async 'validate'(_0x563233){const _0x43d46d=a43_0x112302;assertGrantOrRevoke(_0x563233[_0x43d46d(0x13a)](_0x43d46d(0x114)),_0x563233[_0x43d46d(0x13a)](_0x43d46d(0x11a)));},async 'dryRun'(_0x8bb313){const _0x31c298=a43_0x112302,_0x825e7=await prepare(_0x8bb313);return dryRun(_0x31c298(0x11e),_0x31c298(0x144))[_0x31c298(0x12c)]({'appCode':_0x8bb313[_0x31c298(0x133)],'permitList':_0x825e7[_0x31c298(0x12e)]})[_0x31c298(0x117)](_0x31c298(0x120)+_0x825e7[_0x31c298(0x135)]+_0x31c298(0x12d))[_0x31c298(0x130)]();},async 'execute'(_0x459fa4){const _0x9589a1=a43_0x112302,_0x35a56a=await prepare(_0x459fa4);return _0x35a56a[_0x9589a1(0x12e)][_0x9589a1(0x113)]>0x0&&await saveRuntimeMenuRolePermits(_0x459fa4[_0x9589a1(0x133)],_0x35a56a[_0x9589a1(0x12e)]),{'ok':!![],'data':runtimePermitWriteResult('menu-'+_0x35a56a[_0x9589a1(0x135)],{'roleId':_0x35a56a[_0x9589a1(0x12a)]['id'],'menuIds':_0x35a56a[_0x9589a1(0x11b)]},_0x35a56a[_0x9589a1(0x12f)],_0x35a56a[_0x9589a1(0x140)],{'method':_0x9589a1(0x11e),'path':_0x9589a1(0x144)},_0x35a56a['warnings'])};}};
1
+ const a43_0x2bc6e4=a43_0x48d5;(function(_0x39847c,_0x566cf3){const _0x129eb6=a43_0x48d5,_0x21f290=_0x39847c();while(!![]){try{const _0x2b0f28=-parseInt(_0x129eb6(0x9a))/0x1*(-parseInt(_0x129eb6(0x89))/0x2)+parseInt(_0x129eb6(0xb7))/0x3*(parseInt(_0x129eb6(0x8b))/0x4)+parseInt(_0x129eb6(0xae))/0x5*(parseInt(_0x129eb6(0x95))/0x6)+parseInt(_0x129eb6(0xa1))/0x7+parseInt(_0x129eb6(0xb4))/0x8+parseInt(_0x129eb6(0x8a))/0x9+-parseInt(_0x129eb6(0x9d))/0xa;if(_0x2b0f28===_0x566cf3)break;else _0x21f290['push'](_0x21f290['shift']());}catch(_0x2f185d){_0x21f290['push'](_0x21f290['shift']());}}}(a43_0x5075,0xa6fee));import{listRuntimeMenuRolePermits,listRuntimePermitRoles,saveRuntimeMenuRolePermits}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a43_0x5075(){const _0x185fe0=['operation','validation','/client/permit/resource/batch-save-menu','changed','rolePermit','menus','授予或收回目标角色对指定运行菜单的访问权限;变更会影响该角色用户的菜单可见性。','\x20for\x20role\x20','67938XVlXcj','permitList','description','length','Invalid\x20runtime\x20menu\x20ID:\x20','19JVtGfZ','--menus','POST','40414260kTjOTT','before','isSafeInteger','menu-','7250873xgPbfV','body','map','Grant\x20or\x20revoke\x20selected\x20runtime\x20menus\x20for\x20one\x20role','after','revoke','role-menus-set','str','Runtime\x20menu\x20','Comma-separated\x20runtime\x20menu\x20IDs','bool','grant','string','215HRsRPW','role','\x20selected\x20runtime\x20menus','push','Preview:\x20','find','10921800IxpHLm','menuIds','warnings','1398GfxgBZ','\x20already\x20reflects\x20','appCode','build','permit','9526hIqjXv','8903466upreRk','6504LcfnSN','roles'];a43_0x5075=function(){return _0x185fe0;};return a43_0x5075();}function a43_0x48d5(_0x5650f7,_0x455c0f){_0x5650f7=_0x5650f7-0x85;const _0x507543=a43_0x5075();let _0x48d5e3=_0x507543[_0x5650f7];return _0x48d5e3;}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_0x2bc6e4(0x92),'type':a43_0x2bc6e4(0xad),'required':!![],'description':a43_0x2bc6e4(0xaa)};async function prepare(_0x46db70){const _0x556b3c=a43_0x2bc6e4;await assertRuntimePermissionManager(_0x46db70['appCode']);const _0x1b642c=assertGrantOrRevoke(_0x46db70['bool'](_0x556b3c(0xac)),_0x46db70[_0x556b3c(0xab)](_0x556b3c(0xa6))),_0x2b836b=await resolveRuntimeRoleRef(_0x46db70[_0x556b3c(0x86)],_0x46db70[_0x556b3c(0xa8)](_0x556b3c(0xaf)));assertRuntimePermitRoleConfigurable(_0x2b836b);const _0x92c09f=[...new Set(splitRefs(_0x46db70['str'](_0x556b3c(0x92)),_0x556b3c(0x9b))[_0x556b3c(0xa3)](_0x388dcd=>{const _0x36b2d2=_0x556b3c,_0x363815=Number(_0x388dcd);if(!/^\d+$/['test'](_0x388dcd)||!Number[_0x36b2d2(0x9f)](_0x363815)||_0x363815<=0x0)throw CliErrors[_0x36b2d2(0x8e)](_0x36b2d2(0x99)+_0x388dcd+'.');return _0x363815;}))],_0x9f1f52=flattenRuntimeMenuRolePermits(await listRuntimeMenuRolePermits(_0x46db70[_0x556b3c(0x86)])),_0x41dd4c=await listRuntimePermitRoles(_0x46db70[_0x556b3c(0x86)]),_0x407d09=[],_0x1840a4=[],_0xbb3e3d=[],_0x33e97e=[];for(const _0x38860d of _0x92c09f){const _0x3ee231=_0x9f1f52[_0x556b3c(0xb3)](_0x589f4c=>_0x589f4c['id']===_0x38860d);if(!_0x3ee231)throw CliErrors[_0x556b3c(0x8e)](_0x556b3c(0xa9)+_0x38860d+'\x20was\x20not\x20found.');const _0x400f11=applyRuntimeRolePermission(_0x3ee231[_0x556b3c(0x91)],_0x2b836b,_0x41dd4c,_0x1b642c);_0x1840a4[_0x556b3c(0xb1)]({'menuId':_0x38860d,'rolePermit':_0x3ee231[_0x556b3c(0x91)]}),_0xbb3e3d[_0x556b3c(0xb1)]({'menuId':_0x38860d,'rolePermit':_0x400f11['roles']});if(_0x400f11[_0x556b3c(0x90)])_0x407d09[_0x556b3c(0xb1)](menuPermitDto(_0x46db70['appCode'],_0x3ee231,_0x400f11[_0x556b3c(0x8c)]));else _0x33e97e[_0x556b3c(0xb1)](_0x556b3c(0xa9)+_0x38860d+_0x556b3c(0x85)+_0x1b642c+_0x556b3c(0x94)+_0x2b836b['id']+'.');}return{'operation':_0x1b642c,'role':_0x2b836b,'menuIds':_0x92c09f,'permitList':_0x407d09,'before':_0x1840a4,'after':_0xbb3e3d,'warnings':_0x33e97e};}export const permitRoleMenusSet={'service':a43_0x2bc6e4(0x88),'command':a43_0x2bc6e4(0xa7),'description':a43_0x2bc6e4(0xa4),'risk':'high-risk-write','confirmationDescription':a43_0x2bc6e4(0x93),'flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,MENUS_FLAG],async 'validate'(_0x403d7e){const _0x2828ae=a43_0x2bc6e4;assertGrantOrRevoke(_0x403d7e['bool'](_0x2828ae(0xac)),_0x403d7e[_0x2828ae(0xab)](_0x2828ae(0xa6)));},async 'dryRun'(_0xd1427e){const _0x1b3d60=a43_0x2bc6e4,_0x42d3db=await prepare(_0xd1427e);return dryRun(_0x1b3d60(0x9c),_0x1b3d60(0x8f))[_0x1b3d60(0xa2)]({'appCode':_0xd1427e[_0x1b3d60(0x86)],'permitList':_0x42d3db[_0x1b3d60(0x96)]})[_0x1b3d60(0x97)](_0x1b3d60(0xb2)+_0x42d3db[_0x1b3d60(0x8d)]+_0x1b3d60(0xb0))[_0x1b3d60(0x87)]();},async 'execute'(_0xc3209b){const _0x34750c=a43_0x2bc6e4,_0x6317ea=await prepare(_0xc3209b);return _0x6317ea[_0x34750c(0x96)][_0x34750c(0x98)]>0x0&&await saveRuntimeMenuRolePermits(_0xc3209b[_0x34750c(0x86)],_0x6317ea['permitList']),{'ok':!![],'data':runtimePermitWriteResult(_0x34750c(0xa0)+_0x6317ea[_0x34750c(0x8d)],{'roleId':_0x6317ea['role']['id'],'menuIds':_0x6317ea[_0x34750c(0xb5)]},_0x6317ea[_0x34750c(0x9e)],_0x6317ea[_0x34750c(0xa5)],{'method':'POST','path':_0x34750c(0x8f)},_0x6317ea[_0x34750c(0xb6)])};}};
@@ -1 +1 @@
1
- function a44_0x1ad7(){const _0x15a0d2=['3402285HToInH','role','roleType','2151246EpfejL','role-menus','367888ayPdOA','read','12805210mFPdJb','appCode','Show\x20evaluated\x20runtime\x20menu\x20access\x20for\x20one\x20role','351YYOSHI','2VNCeAH','48967160AimYCl','76KLgsMG','1160489hAVYrf','permit','roleName','21moMfWP','435355FNYIUF'];a44_0x1ad7=function(){return _0x15a0d2;};return a44_0x1ad7();}const a44_0xcd2177=a44_0x1499;function a44_0x1499(_0x334856,_0x125cb7){_0x334856=_0x334856-0xda;const _0x1ad767=a44_0x1ad7();let _0x1499d0=_0x1ad767[_0x334856];return _0x1499d0;}(function(_0x50d9cd,_0x3fffc6){const _0x26183b=a44_0x1499,_0x1ce996=_0x50d9cd();while(!![]){try{const _0x3d258f=parseInt(_0x26183b(0xe4))/0x1+parseInt(_0x26183b(0xe1))/0x2*(parseInt(_0x26183b(0xe9))/0x3)+parseInt(_0x26183b(0xe3))/0x4*(-parseInt(_0x26183b(0xe8))/0x5)+parseInt(_0x26183b(0xec))/0x6*(-parseInt(_0x26183b(0xe7))/0x7)+parseInt(_0x26183b(0xdb))/0x8*(-parseInt(_0x26183b(0xe0))/0x9)+-parseInt(_0x26183b(0xdd))/0xa+parseInt(_0x26183b(0xe2))/0xb;if(_0x3d258f===_0x3fffc6)break;else _0x1ce996['push'](_0x1ce996['shift']());}catch(_0x2579b5){_0x1ce996['push'](_0x1ce996['shift']());}}}(a44_0x1ad7,0xe6075));import{getRuntimeRoleMenuResources}from'../../core/api-client.js';import{resolveRuntimeRoleRef}from'../../commands/role/shared.js';import{ROLE_REF_FLAG}from'../../commands/permit/shared.js';export const permitRoleMenus={'service':a44_0xcd2177(0xe5),'command':a44_0xcd2177(0xda),'description':a44_0xcd2177(0xdf),'risk':a44_0xcd2177(0xdc),'flags':[ROLE_REF_FLAG],async 'execute'(_0x11e7d5){const _0x2eea65=a44_0xcd2177,_0x1db6ef=await resolveRuntimeRoleRef(_0x11e7d5[_0x2eea65(0xde)],_0x11e7d5['str'](_0x2eea65(0xea))),_0x35c9df=await getRuntimeRoleMenuResources(_0x11e7d5[_0x2eea65(0xde)],_0x1db6ef['id']);return{'ok':!![],'data':{'scope':'runtime','role':{'id':_0x1db6ef['id'],'roleName':_0x1db6ef[_0x2eea65(0xe6)],'roleType':_0x1db6ef[_0x2eea65(0xeb)]},'menus':_0x35c9df}};}};
1
+ const a44_0xf79b0d=a44_0x3a6d;(function(_0x144818,_0x5743e1){const _0x20036d=a44_0x3a6d,_0x45cc59=_0x144818();while(!![]){try{const _0x1b931c=parseInt(_0x20036d(0x1c7))/0x1*(parseInt(_0x20036d(0x1d5))/0x2)+parseInt(_0x20036d(0x1cc))/0x3*(parseInt(_0x20036d(0x1d4))/0x4)+parseInt(_0x20036d(0x1d7))/0x5*(parseInt(_0x20036d(0x1c6))/0x6)+-parseInt(_0x20036d(0x1c8))/0x7+-parseInt(_0x20036d(0x1d0))/0x8+parseInt(_0x20036d(0x1cb))/0x9*(-parseInt(_0x20036d(0x1c5))/0xa)+parseInt(_0x20036d(0x1d2))/0xb;if(_0x1b931c===_0x5743e1)break;else _0x45cc59['push'](_0x45cc59['shift']());}catch(_0x431dec){_0x45cc59['push'](_0x45cc59['shift']());}}}(a44_0x56e2,0xc8e9e));import{getRuntimeRoleMenuResources}from'../../core/api-client.js';import{resolveRuntimeRoleRef}from'../../commands/role/shared.js';function a44_0x3a6d(_0x36251f,_0xbfa945){_0x36251f=_0x36251f-0x1c5;const _0x56e26a=a44_0x56e2();let _0x3a6d25=_0x56e26a[_0x36251f];return _0x3a6d25;}import{ROLE_REF_FLAG}from'../../commands/permit/shared.js';function a44_0x56e2(){const _0x56b7e1=['1308069TSUXCf','read','runtime','1164591wWtsEQ','11862SsMgsD','appCode','roleName','permit','9693512whDLSc','role-menus','13024066RRujCE','role','440Tbpngm','4vVyXsm','roleType','55MVVPnS','30HypDFe','238386MPOPEU','276854OICrDr'];a44_0x56e2=function(){return _0x56b7e1;};return a44_0x56e2();}export const permitRoleMenus={'service':a44_0xf79b0d(0x1cf),'command':a44_0xf79b0d(0x1d1),'description':'Show\x20evaluated\x20runtime\x20menu\x20access\x20for\x20one\x20role','risk':a44_0xf79b0d(0x1c9),'flags':[ROLE_REF_FLAG],async 'execute'(_0x1b115a){const _0x27cdda=a44_0xf79b0d,_0x247333=await resolveRuntimeRoleRef(_0x1b115a['appCode'],_0x1b115a['str'](_0x27cdda(0x1d3))),_0x2c0441=await getRuntimeRoleMenuResources(_0x1b115a[_0x27cdda(0x1cd)],_0x247333['id']);return{'ok':!![],'data':{'scope':_0x27cdda(0x1ca),'role':{'id':_0x247333['id'],'roleName':_0x247333[_0x27cdda(0x1ce)],'roleType':_0x247333[_0x27cdda(0x1d6)]},'menus':_0x2c0441}};}};
@@ -1 +1 @@
1
- const a45_0x545b67=a45_0x3010;(function(_0x4e411d,_0x482de1){const _0x28ef38=a45_0x3010,_0x322c0b=_0x4e411d();while(!![]){try{const _0x50d8e9=-parseInt(_0x28ef38(0xd6))/0x1*(-parseInt(_0x28ef38(0xd3))/0x2)+parseInt(_0x28ef38(0xc4))/0x3+-parseInt(_0x28ef38(0xa6))/0x4+-parseInt(_0x28ef38(0xa4))/0x5+parseInt(_0x28ef38(0x93))/0x6*(-parseInt(_0x28ef38(0xb9))/0x7)+parseInt(_0x28ef38(0xcc))/0x8*(parseInt(_0x28ef38(0xb0))/0x9)+parseInt(_0x28ef38(0x97))/0xa*(parseInt(_0x28ef38(0xa0))/0xb);if(_0x50d8e9===_0x482de1)break;else _0x322c0b['push'](_0x322c0b['shift']());}catch(_0x3f2eef){_0x322c0b['push'](_0x322c0b['shift']());}}}(a45_0x3a85,0xe6c23));import{getLoginUserInfo,listRuntimePermitRoles,listRuntimeRoleUsers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const MENU_ID_FLAG={'name':'menu-id','type':a45_0x545b67(0xb1),'required':!![],'description':a45_0x545b67(0xa8)};export const ROLE_REF_FLAG={'name':a45_0x545b67(0xd1),'type':'string','required':!![],'description':a45_0x545b67(0xac)};export const GRANT_FLAG={'name':'grant','type':a45_0x545b67(0x95),'description':a45_0x545b67(0xd7)};export const REVOKE_FLAG={'name':'revoke','type':a45_0x545b67(0x95),'description':a45_0x545b67(0x9c)};export const PAGE_SLOT_SPECS=[{'flag':a45_0x545b67(0xcb),'key':a45_0x545b67(0xc1),'allowSelf':![]},{'flag':a45_0x545b67(0x9b),'key':a45_0x545b67(0x9f),'allowSelf':![]},{'flag':a45_0x545b67(0xd8),'key':'dataUpdate','allowSelf':![]},{'flag':a45_0x545b67(0x9a),'key':a45_0x545b67(0x99),'allowSelf':![]},{'flag':a45_0x545b67(0x96),'key':a45_0x545b67(0xc0),'allowSelf':![]},{'flag':a45_0x545b67(0xd9),'key':'dataExport','allowSelf':![]},{'flag':'row-roles','key':'dataPermit','allowSelf':!![]}];export const PAGE_ROLE_FLAGS=PAGE_SLOT_SPECS[a45_0x545b67(0xaa)](_0x31d714=>({'name':_0x31d714[a45_0x545b67(0xd2)],'type':a45_0x545b67(0xc8),'description':'Comma-separated\x20runtime\x20role\x20IDs\x20or\x20names'}));export function splitRefs(_0x2a8126,_0x4914f9){const _0x5133aa=a45_0x545b67,_0x3ccf91=[...new Set(_0x2a8126[_0x5133aa(0xbe)](',')[_0x5133aa(0xaa)](_0x4b6830=>_0x4b6830[_0x5133aa(0xa7)]())[_0x5133aa(0xc5)](Boolean))];if(_0x3ccf91[_0x5133aa(0xb3)]===0x0)throw CliErrors[_0x5133aa(0xbd)](_0x4914f9+_0x5133aa(0xd4));return _0x3ccf91;}export function assertGrantOrRevoke(_0x52112e,_0x6b5ccb){const _0x2d4f97=a45_0x545b67;if(_0x52112e===_0x6b5ccb)throw CliErrors[_0x2d4f97(0xbd)](_0x2d4f97(0xdd));return _0x52112e?_0x2d4f97(0xcd):'revoke';}function resolvePermitRole(_0x2514dc,_0x382e44){const _0x2ec144=a45_0x545b67,_0x17fe89=_0x382e44[_0x2ec144(0xa7)](),_0x447e09=/^-?\d+$/['test'](_0x17fe89)?_0x2514dc[_0x2ec144(0xc5)](_0x2aabd7=>_0x2aabd7['id']===Number(_0x17fe89)):_0x2514dc[_0x2ec144(0xc5)](_0x51da49=>_0x51da49[_0x2ec144(0xaf)]===_0x17fe89||_0x51da49[_0x2ec144(0xbf)]===_0x17fe89[_0x2ec144(0xd0)]());if(_0x447e09[_0x2ec144(0xb3)]!==0x1)throw CliErrors['validation'](_0x447e09['length']===0x0?_0x2ec144(0xc2)+_0x17fe89+_0x2ec144(0xce):_0x2ec144(0xc2)+_0x17fe89+_0x2ec144(0xca),_0x2ec144(0x94));return _0x447e09[0x0];}export async function resolveRuntimePermitRoles(_0x52bf3d,_0x1629b1,_0x1615d0){const _0x1431ac=a45_0x545b67,_0x66613c=await listRuntimePermitRoles(_0x52bf3d,{'needSelf':!![],'needPublic':!![]}),_0x54d439=[...new Map(_0x1629b1[_0x1431ac(0xaa)](_0x308447=>resolvePermitRole(_0x66613c,_0x308447))[_0x1431ac(0xaa)](_0x4a1322=>[_0x4a1322['id'],_0x4a1322]))['values']()],_0x158a5b=_0x54d439[_0x1431ac(0xb2)](_0x3636c5=>_0x3636c5[_0x1431ac(0xbf)]===_0x1431ac(0xa9)||_0x3636c5[_0x1431ac(0xbf)]===_0x1431ac(0xc3));if(_0x158a5b)throw CliErrors[_0x1431ac(0xbd)](_0x158a5b['roleType']+_0x1431ac(0xad),'Configure\x20USER,\x20CUSTOM,\x20or\x20an\x20applicable\x20special\x20role\x20instead.');if(!_0x1615d0&&_0x54d439['some'](_0x18a7b1=>_0x18a7b1['roleType']===_0x1431ac(0xa3)))throw CliErrors[_0x1431ac(0xbd)](_0x1431ac(0xdc));return _0x54d439;}export async function assertRuntimePermissionManager(_0x276cde){const _0x5ec757=a45_0x545b67,_0x3dd3e4=await getLoginUserInfo(),_0x34c686=_0x3dd3e4[_0x5ec757(0xa1)]??_0x3dd3e4['id'],_0x47d104=Number(_0x34c686);if(!Number[_0x5ec757(0xb5)](_0x47d104)||_0x47d104<=0x0)throw CliErrors['validation'](_0x5ec757(0x98));const _0x32be8e=await listRuntimeRoleUsers(_0x276cde),_0x2c3000=_0x32be8e[_0x5ec757(0xda)](_0x5bc06e=>(_0x5bc06e[_0x5ec757(0xbf)]===_0x5ec757(0xa9)||_0x5bc06e['roleType']===_0x5ec757(0xc3))&&_0x5bc06e['userList'][_0x5ec757(0xda)](_0x122d56=>_0x122d56[_0x5ec757(0xa1)]===_0x47d104));if(!_0x2c3000)throw CliErrors[_0x5ec757(0xbd)]('Runtime\x20resource\x20permission\x20changes\x20require\x20an\x20ADMIN\x20or\x20OWNER\x20role.',_0x5ec757(0xa5));}export function assertRuntimePermitRoleConfigurable(_0x1bea3f){const _0x3a0f36=a45_0x545b67;if(_0x1bea3f[_0x3a0f36(0xbf)]==='ADMIN'||_0x1bea3f[_0x3a0f36(0xbf)]===_0x3a0f36(0xc3))throw CliErrors[_0x3a0f36(0xbd)](_0x3a0f36(0xbb)+_0x1bea3f[_0x3a0f36(0xbf)]+_0x3a0f36(0xbc)+_0x1bea3f[_0x3a0f36(0xaf)]+'.',_0x3a0f36(0x9d));}function asPermitRole(_0x128b52){const _0x15e2ea=a45_0x545b67;return{'id':_0x128b52['id'],'roleName':_0x128b52[_0x15e2ea(0xaf)],'roleType':_0x128b52['roleType'],'allowed':!![]};}export function applyRuntimeRolePermission(_0x3ac49a,_0x2cfc89,_0x16ce9a,_0x307eaf){const _0x401a78=a45_0x545b67,_0x564b98=!_0x3ac49a||_0x3ac49a[_0x401a78(0xb3)]===0x0,_0x42c468=_0x3ac49a?.[_0x401a78(0xda)](_0x1003c7=>_0x1003c7['roleType']===_0x401a78(0xb7))??![];if(_0x307eaf===_0x401a78(0xcd)&&(_0x564b98||_0x42c468))return{'roles':_0x3ac49a??null,'changed':![]};let _0x2b8ab7=_0x564b98||_0x42c468?_0x16ce9a[_0x401a78(0xc5)](_0x5827d4=>_0x5827d4['id']>0x0):[..._0x3ac49a];const _0x1543b9=_0x2b8ab7['some'](_0x5e3cc0=>_0x5e3cc0['id']===_0x2cfc89['id']);if(_0x307eaf===_0x401a78(0xcd)){if(_0x1543b9)return{'roles':_0x2b8ab7,'changed':![]};return _0x2b8ab7[_0x401a78(0xde)](asPermitRole(_0x2cfc89)),{'roles':_0x2b8ab7,'changed':!![]};}if(!_0x1543b9)return{'roles':_0x2b8ab7,'changed':_0x564b98||_0x42c468};_0x2b8ab7=_0x2b8ab7[_0x401a78(0xc5)](_0x4dbde0=>_0x4dbde0['id']!==_0x2cfc89['id']);if(_0x2b8ab7[_0x401a78(0xb3)]===0x0)throw CliErrors[_0x401a78(0xbd)](_0x401a78(0xd5),_0x401a78(0xae));return{'roles':_0x2b8ab7,'changed':!![]};}function a45_0x3a85(){const _0x4d515b=['roleType','dataDetail','menuPermit','Permission\x20role\x20\x22','OWNER','624705loBmto','filter','permitId','menuId','string','resourceType','\x22\x20is\x20ambiguous.','menu-roles','2955464OpkkZI','grant','\x22\x20was\x20not\x20found.','pageId','toUpperCase','role','flag','135742DoZVjs','\x20must\x20contain\x20at\x20least\x20one\x20value.','Cannot\x20revoke\x20the\x20last\x20role\x20from\x20a\x20runtime\x20resource.','1mmMCkc','Grant\x20the\x20selected\x20resources\x20to\x20the\x20role','update-roles','export-roles','some','key','SELF\x20is\x20only\x20valid\x20for\x20--row-roles.','Pass\x20exactly\x20one\x20of\x20--grant\x20or\x20--revoke.','push','5241408yGjUlC','Use\x20a\x20role\x20ID\x20from\x20`lovrabet\x20role\x20list`.','boolean','detail-roles','1501490iUgSCs','Cannot\x20resolve\x20the\x20current\x20AK\x20userId\x20for\x20permission\x20management.','dataDelete','delete-roles','create-roles','Revoke\x20the\x20selected\x20resources\x20from\x20the\x20role','ADMIN\x20and\x20OWNER\x20have\x20full\x20runtime\x20access;\x20configure\x20USER\x20or\x20CUSTOM\x20instead.','appCode','dataCreate','77lvXOXc','userId','runtime','SELF','358020fDvWyo','Ask\x20an\x20application\x20manager\x20to\x20perform\x20this\x20operation.','3658088YNwrCC','trim','Runtime\x20menu\x20ID','ADMIN','map','datasetCode','Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name','\x20has\x20full\x20runtime\x20access\x20and\x20cannot\x20be\x20a\x20resource\x20permission\x20target.','The\x20current\x20service\x20contract\x20does\x20not\x20persist\x20an\x20empty\x20rolePermit;\x20grant\x20another\x20role\x20first.','roleName','36CaIobm','number','find','length','label','isSafeInteger','resourceCode','ALL','MENU','7vCZnAy','rolePermit','Cannot\x20change\x20resource\x20permissions\x20for\x20','\x20runtime\x20role\x20','validation','split'];a45_0x3a85=function(){return _0x4d515b;};return a45_0x3a85();}function a45_0x3010(_0x2c5943,_0x3c96c6){_0x2c5943=_0x2c5943-0x93;const _0x3a8554=a45_0x3a85();let _0x3010db=_0x3a8554[_0x2c5943];return _0x3010db;}export function projectRuntimePagePermit(_0x1913e4){const _0x4ba969=a45_0x545b67,_0x551a58={'menuId':_0x1913e4[_0x4ba969(0xc7)],'pageId':_0x1913e4[_0x4ba969(0xcf)],'appCode':_0x1913e4[_0x4ba969(0x9e)],'datasetCode':_0x1913e4[_0x4ba969(0xab)]};for(const _0x492945 of PAGE_SLOT_SPECS){const _0x3be8aa=_0x1913e4[_0x492945[_0x4ba969(0xdb)]];_0x3be8aa&&(_0x551a58[_0x492945[_0x4ba969(0xdb)]]={'resourceCode':_0x3be8aa[_0x4ba969(0xb6)],'resourceType':_0x3be8aa[_0x4ba969(0xc9)],'roles':(_0x3be8aa[_0x4ba969(0xba)]??[])[_0x4ba969(0xaa)](_0x1eac39=>({'id':_0x1eac39['id'],'roleName':_0x1eac39[_0x4ba969(0xaf)],'roleType':_0x1eac39[_0x4ba969(0xbf)]}))});}return _0x551a58;}export function flattenRuntimeMenuRolePermits(_0xadaa14){const _0x50494f=[],_0x4a6f5a=_0x2bc781=>{const _0x34120f=a45_0x3010;_0x50494f[_0x34120f(0xde)](_0x2bc781);for(const _0x38d0a0 of _0x2bc781['children']??[])_0x4a6f5a(_0x38d0a0);};for(const _0x3a1f30 of _0xadaa14)_0x4a6f5a(_0x3a1f30);return _0x50494f;}export function runtimePermitWriteResult(_0x234d75,_0x62659f,_0x284bf4,_0x2e5b3b,_0x113551,_0x89b64e=[]){const _0x17a0aa=a45_0x545b67;return{'operation':_0x234d75,'scope':_0x17a0aa(0xa2),'selector':_0x62659f,'before':_0x284bf4,'after':_0x2e5b3b,'dryRun':![],'backend':_0x113551,'warnings':_0x89b64e};}export function menuPermitDto(_0x273d78,_0x5b8948,_0x31738c){const _0x30539c=a45_0x545b67;return{..._0x5b8948[_0x30539c(0xc6)]!=null?{'id':_0x5b8948[_0x30539c(0xc6)]}:{},'appCode':_0x273d78,'menuId':_0x5b8948['id'],'pageId':_0x5b8948['pageId']??null,'resourceCode':String(_0x5b8948['id']),'resourceType':_0x30539c(0xb8),'resourceName':_0x5b8948[_0x30539c(0xb4)],'rolePermit':_0x31738c};}
1
+ const a45_0x2b2ab9=a45_0x3c99;(function(_0x3372e8,_0x224720){const _0x4fda76=a45_0x3c99,_0x593de4=_0x3372e8();while(!![]){try{const _0x3b3686=-parseInt(_0x4fda76(0x17f))/0x1*(parseInt(_0x4fda76(0x178))/0x2)+parseInt(_0x4fda76(0x152))/0x3+-parseInt(_0x4fda76(0x15c))/0x4+-parseInt(_0x4fda76(0x16f))/0x5+parseInt(_0x4fda76(0x184))/0x6*(-parseInt(_0x4fda76(0x168))/0x7)+-parseInt(_0x4fda76(0x147))/0x8*(parseInt(_0x4fda76(0x183))/0x9)+-parseInt(_0x4fda76(0x176))/0xa*(-parseInt(_0x4fda76(0x169))/0xb);if(_0x3b3686===_0x224720)break;else _0x593de4['push'](_0x593de4['shift']());}catch(_0x158abd){_0x593de4['push'](_0x593de4['shift']());}}}(a45_0x5e47,0xa1d38));import{getLoginUserInfo,listRuntimePermitRoles,listRuntimeRoleUsers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const MENU_ID_FLAG={'name':a45_0x2b2ab9(0x153),'type':'number','required':!![],'description':a45_0x2b2ab9(0x15b)};export const ROLE_REF_FLAG={'name':'role','type':a45_0x2b2ab9(0x16e),'required':!![],'description':'Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name'};function a45_0x5e47(){const _0x4f322c=['length','isSafeInteger','resourceCode','values','roleName','Cannot\x20resolve\x20the\x20current\x20AK\x20userId\x20for\x20permission\x20management.','Cannot\x20change\x20resource\x20permissions\x20for\x20','Revoke\x20the\x20selected\x20resources\x20from\x20the\x20role','8KZfidt','Comma-separated\x20runtime\x20role\x20IDs\x20or\x20names','MENU','label','ADMIN\x20and\x20OWNER\x20have\x20full\x20runtime\x20access;\x20configure\x20USER\x20or\x20CUSTOM\x20instead.','create-roles','OWNER','map','menu-roles','resourceType','test','548661KgYgeC','menu-id','dataUpdate','children','\x20must\x20contain\x20at\x20least\x20one\x20value.','SELF','dataDetail','userId','rolePermit','Runtime\x20menu\x20ID','1887924IymDtZ','row-roles','pageId','some','Ask\x20an\x20application\x20manager\x20to\x20perform\x20this\x20operation.','boolean','push','\x20runtime\x20role\x20','grant','trim','runtime','Use\x20a\x20role\x20ID\x20from\x20`lovrabet\x20role\x20list`.','3776311LCmRuk','12034utrTXc','Grant\x20the\x20selected\x20resources\x20to\x20the\x20role','datasetCode','roleType','menuId','string','3370310zavdxQ','update-roles','appCode','revoke','Configure\x20USER,\x20CUSTOM,\x20or\x20an\x20applicable\x20special\x20role\x20instead.','ALL','Pass\x20exactly\x20one\x20of\x20--grant\x20or\x20--revoke.','41610KklaGq','key','1278swapIj','permitId','dataCreate','validation','Permission\x20role\x20\x22','The\x20current\x20service\x20contract\x20does\x20not\x20persist\x20an\x20empty\x20rolePermit;\x20grant\x20another\x20role\x20first.','filter','1801dZVTyQ','split','find','dataExport','11122434MTDxlb','6JLbjDS','\x22\x20is\x20ambiguous.','SELF\x20is\x20only\x20valid\x20for\x20--row-roles.','Cannot\x20revoke\x20the\x20last\x20role\x20from\x20a\x20runtime\x20resource.','menuPermit','dataPermit','detail-roles','dataDelete'];a45_0x5e47=function(){return _0x4f322c;};return a45_0x5e47();}export const GRANT_FLAG={'name':'grant','type':a45_0x2b2ab9(0x161),'description':a45_0x2b2ab9(0x16a)};export const REVOKE_FLAG={'name':a45_0x2b2ab9(0x172),'type':a45_0x2b2ab9(0x161),'description':a45_0x2b2ab9(0x146)};export const PAGE_SLOT_SPECS=[{'flag':a45_0x2b2ab9(0x14f),'key':a45_0x2b2ab9(0x188),'allowSelf':![]},{'flag':a45_0x2b2ab9(0x14c),'key':a45_0x2b2ab9(0x17a),'allowSelf':![]},{'flag':a45_0x2b2ab9(0x170),'key':a45_0x2b2ab9(0x154),'allowSelf':![]},{'flag':'delete-roles','key':a45_0x2b2ab9(0x18b),'allowSelf':![]},{'flag':a45_0x2b2ab9(0x18a),'key':a45_0x2b2ab9(0x158),'allowSelf':![]},{'flag':'export-roles','key':a45_0x2b2ab9(0x182),'allowSelf':![]},{'flag':a45_0x2b2ab9(0x15d),'key':a45_0x2b2ab9(0x189),'allowSelf':!![]}];export const PAGE_ROLE_FLAGS=PAGE_SLOT_SPECS[a45_0x2b2ab9(0x14e)](_0xd080ee=>({'name':_0xd080ee['flag'],'type':a45_0x2b2ab9(0x16e),'description':a45_0x2b2ab9(0x148)}));export function splitRefs(_0x5c4dd1,_0x338fb1){const _0x30cbfa=a45_0x2b2ab9,_0x191755=[...new Set(_0x5c4dd1[_0x30cbfa(0x180)](',')[_0x30cbfa(0x14e)](_0x28a8af=>_0x28a8af[_0x30cbfa(0x165)]())[_0x30cbfa(0x17e)](Boolean))];if(_0x191755[_0x30cbfa(0x18c)]===0x0)throw CliErrors['validation'](_0x338fb1+_0x30cbfa(0x156));return _0x191755;}export function assertGrantOrRevoke(_0x2d4660,_0x1f62d8){const _0x487965=a45_0x2b2ab9;if(_0x2d4660===_0x1f62d8)throw CliErrors[_0x487965(0x17b)](_0x487965(0x175));return _0x2d4660?_0x487965(0x164):'revoke';}function resolvePermitRole(_0x30d484,_0x26ef32){const _0x53815a=a45_0x2b2ab9,_0xbc37c9=_0x26ef32[_0x53815a(0x165)](),_0x1bfaf0=/^-?\d+$/[_0x53815a(0x151)](_0xbc37c9)?_0x30d484[_0x53815a(0x17e)](_0x2cb37c=>_0x2cb37c['id']===Number(_0xbc37c9)):_0x30d484[_0x53815a(0x17e)](_0x42901e=>_0x42901e['roleName']===_0xbc37c9||_0x42901e['roleType']===_0xbc37c9['toUpperCase']());if(_0x1bfaf0[_0x53815a(0x18c)]!==0x1)throw CliErrors[_0x53815a(0x17b)](_0x1bfaf0['length']===0x0?'Permission\x20role\x20\x22'+_0xbc37c9+'\x22\x20was\x20not\x20found.':_0x53815a(0x17c)+_0xbc37c9+_0x53815a(0x185),_0x53815a(0x167));return _0x1bfaf0[0x0];}export async function resolveRuntimePermitRoles(_0xa5e1e2,_0x33070d,_0x47aa9e){const _0x4fe9a9=a45_0x2b2ab9,_0x87dc5e=await listRuntimePermitRoles(_0xa5e1e2,{'needSelf':!![],'needPublic':!![]}),_0x59403c=[...new Map(_0x33070d['map'](_0x5701f5=>resolvePermitRole(_0x87dc5e,_0x5701f5))['map'](_0x34c3a0=>[_0x34c3a0['id'],_0x34c3a0]))[_0x4fe9a9(0x142)]()],_0x40448a=_0x59403c[_0x4fe9a9(0x181)](_0x35874b=>_0x35874b[_0x4fe9a9(0x16c)]==='ADMIN'||_0x35874b[_0x4fe9a9(0x16c)]===_0x4fe9a9(0x14d));if(_0x40448a)throw CliErrors[_0x4fe9a9(0x17b)](_0x40448a[_0x4fe9a9(0x16c)]+'\x20has\x20full\x20runtime\x20access\x20and\x20cannot\x20be\x20a\x20resource\x20permission\x20target.',_0x4fe9a9(0x173));if(!_0x47aa9e&&_0x59403c['some'](_0x22600d=>_0x22600d[_0x4fe9a9(0x16c)]===_0x4fe9a9(0x157)))throw CliErrors[_0x4fe9a9(0x17b)](_0x4fe9a9(0x186));return _0x59403c;}function a45_0x3c99(_0x56aaed,_0x29300c){_0x56aaed=_0x56aaed-0x141;const _0x5e47d3=a45_0x5e47();let _0x3c9981=_0x5e47d3[_0x56aaed];return _0x3c9981;}export async function assertRuntimePermissionManager(_0x2bb144){const _0x1bd192=a45_0x2b2ab9,_0xee578f=await getLoginUserInfo(),_0x57b2d3=_0xee578f['userId']??_0xee578f['id'],_0x9bcff9=Number(_0x57b2d3);if(!Number[_0x1bd192(0x18d)](_0x9bcff9)||_0x9bcff9<=0x0)throw CliErrors[_0x1bd192(0x17b)](_0x1bd192(0x144));const _0x223374=await listRuntimeRoleUsers(_0x2bb144),_0x58da3b=_0x223374[_0x1bd192(0x15f)](_0x4f98b9=>(_0x4f98b9[_0x1bd192(0x16c)]==='ADMIN'||_0x4f98b9['roleType']==='OWNER')&&_0x4f98b9['userList'][_0x1bd192(0x15f)](_0x460377=>_0x460377[_0x1bd192(0x159)]===_0x9bcff9));if(!_0x58da3b)throw CliErrors[_0x1bd192(0x17b)]('Runtime\x20resource\x20permission\x20changes\x20require\x20an\x20ADMIN\x20or\x20OWNER\x20role.',_0x1bd192(0x160));}export function assertRuntimePermitRoleConfigurable(_0x5a9631){const _0x2e2e3a=a45_0x2b2ab9;if(_0x5a9631['roleType']==='ADMIN'||_0x5a9631[_0x2e2e3a(0x16c)]===_0x2e2e3a(0x14d))throw CliErrors['validation'](_0x2e2e3a(0x145)+_0x5a9631[_0x2e2e3a(0x16c)]+_0x2e2e3a(0x163)+_0x5a9631['roleName']+'.',_0x2e2e3a(0x14b));}function asPermitRole(_0x46f190){const _0x1560b9=a45_0x2b2ab9;return{'id':_0x46f190['id'],'roleName':_0x46f190[_0x1560b9(0x143)],'roleType':_0x46f190[_0x1560b9(0x16c)],'allowed':!![]};}export function applyRuntimeRolePermission(_0x1cdea1,_0xe6ca5a,_0x2fd7ec,_0x1f22ae){const _0x121834=a45_0x2b2ab9,_0x181131=!_0x1cdea1||_0x1cdea1[_0x121834(0x18c)]===0x0,_0x33b6b0=_0x1cdea1?.[_0x121834(0x15f)](_0x586110=>_0x586110[_0x121834(0x16c)]===_0x121834(0x174))??![];if(_0x1f22ae==='grant'&&(_0x181131||_0x33b6b0))return{'roles':_0x1cdea1??null,'changed':![]};let _0x202430=_0x181131||_0x33b6b0?_0x2fd7ec['filter'](_0x2faefa=>_0x2faefa['id']>0x0):[..._0x1cdea1];const _0x5ced4a=_0x202430['some'](_0x452028=>_0x452028['id']===_0xe6ca5a['id']);if(_0x1f22ae===_0x121834(0x164)){if(_0x5ced4a)return{'roles':_0x202430,'changed':![]};return _0x202430[_0x121834(0x162)](asPermitRole(_0xe6ca5a)),{'roles':_0x202430,'changed':!![]};}if(!_0x5ced4a)return{'roles':_0x202430,'changed':_0x181131||_0x33b6b0};_0x202430=_0x202430[_0x121834(0x17e)](_0x5a21e9=>_0x5a21e9['id']!==_0xe6ca5a['id']);if(_0x202430[_0x121834(0x18c)]===0x0)throw CliErrors[_0x121834(0x17b)](_0x121834(0x187),_0x121834(0x17d));return{'roles':_0x202430,'changed':!![]};}export function projectRuntimePagePermit(_0x22f212){const _0x220c60=a45_0x2b2ab9,_0x3cd295={'menuId':_0x22f212[_0x220c60(0x16d)],'pageId':_0x22f212['pageId'],'appCode':_0x22f212[_0x220c60(0x171)],'datasetCode':_0x22f212[_0x220c60(0x16b)]};for(const _0x469dc6 of PAGE_SLOT_SPECS){const _0x130ad1=_0x22f212[_0x469dc6[_0x220c60(0x177)]];_0x130ad1&&(_0x3cd295[_0x469dc6[_0x220c60(0x177)]]={'resourceCode':_0x130ad1[_0x220c60(0x141)],'resourceType':_0x130ad1[_0x220c60(0x150)],'roles':(_0x130ad1[_0x220c60(0x15a)]??[])['map'](_0x2633b5=>({'id':_0x2633b5['id'],'roleName':_0x2633b5['roleName'],'roleType':_0x2633b5[_0x220c60(0x16c)]}))});}return _0x3cd295;}export function flattenRuntimeMenuRolePermits(_0xd75d3a){const _0x4675d6=[],_0x21a195=_0x1ed77f=>{const _0x5c8062=a45_0x3c99;_0x4675d6[_0x5c8062(0x162)](_0x1ed77f);for(const _0x320263 of _0x1ed77f[_0x5c8062(0x155)]??[])_0x21a195(_0x320263);};for(const _0x576340 of _0xd75d3a)_0x21a195(_0x576340);return _0x4675d6;}export function runtimePermitWriteResult(_0xe6b2c1,_0x5b860f,_0x5563d3,_0x16145d,_0xa98ecb,_0x300685=[]){const _0x3f3b2e=a45_0x2b2ab9;return{'operation':_0xe6b2c1,'scope':_0x3f3b2e(0x166),'selector':_0x5b860f,'before':_0x5563d3,'after':_0x16145d,'dryRun':![],'backend':_0xa98ecb,'warnings':_0x300685};}export function menuPermitDto(_0x3cb5ba,_0x5cfd3a,_0x43b100){const _0x544de0=a45_0x2b2ab9;return{..._0x5cfd3a[_0x544de0(0x179)]!=null?{'id':_0x5cfd3a['permitId']}:{},'appCode':_0x3cb5ba,'menuId':_0x5cfd3a['id'],'pageId':_0x5cfd3a[_0x544de0(0x15e)]??null,'resourceCode':String(_0x5cfd3a['id']),'resourceType':_0x544de0(0x149),'resourceName':_0x5cfd3a[_0x544de0(0x14a)],'rolePermit':_0x43b100};}
@@ -1 +1 @@
1
- const a46_0x448f28=a46_0x40f8;(function(_0x3737ba,_0x569349){const _0x5bc5de=a46_0x40f8,_0x24e6f5=_0x3737ba();while(!![]){try{const _0x391b94=parseInt(_0x5bc5de(0x18c))/0x1+parseInt(_0x5bc5de(0x170))/0x2+parseInt(_0x5bc5de(0x19e))/0x3*(parseInt(_0x5bc5de(0x175))/0x4)+parseInt(_0x5bc5de(0x155))/0x5+parseInt(_0x5bc5de(0x157))/0x6*(-parseInt(_0x5bc5de(0x185))/0x7)+-parseInt(_0x5bc5de(0x164))/0x8*(parseInt(_0x5bc5de(0x198))/0x9)+parseInt(_0x5bc5de(0x187))/0xa;if(_0x391b94===_0x569349)break;else _0x24e6f5['push'](_0x24e6f5['shift']());}catch(_0x5f1301){_0x24e6f5['push'](_0x24e6f5['shift']());}}}(a46_0x1dcb,0xcf4ef));function a46_0x40f8(_0x434da7,_0x9a4045){_0x434da7=_0x434da7-0x155;const _0x1dcb66=a46_0x1dcb();let _0x40f8a7=_0x1dcb66[_0x434da7];return _0x40f8a7;}import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalBff,executePersonalBff,getPersonalBff,listPersonalBffs,updatePersonalBff}from'../../core/api-client.js';import{ID_FLAG,PARAMS_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';import{parseJsonParams}from'../../utils/params.js';const FUNCTION_NAME_PATTERN=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/,FILE_FLAG={'name':a46_0x448f28(0x197),'type':a46_0x448f28(0x17d),'description':a46_0x448f28(0x19a)},FUNCTION_NAME_FLAG={'name':a46_0x448f28(0x167),'type':a46_0x448f28(0x17d),'required':!![],'description':a46_0x448f28(0x178)},DESCRIPTION_FLAG={'name':'description','type':a46_0x448f28(0x17d),'description':a46_0x448f28(0x184)},SOURCE_SESSION_FLAG={'name':a46_0x448f28(0x195),'type':a46_0x448f28(0x17d),'description':a46_0x448f28(0x15e)};function normalizeFunctionName(_0x3aef89){const _0x330a76=a46_0x448f28,_0x34acd9=String(_0x3aef89||'')[_0x330a76(0x174)]();if(!_0x34acd9||!FUNCTION_NAME_PATTERN[_0x330a76(0x199)](_0x34acd9))throw CliErrors[_0x330a76(0x19f)](_0x330a76(0x192));return _0x34acd9;}function readScriptFile(_0x41fcb8){const _0x940301=a46_0x448f28;if(!_0x41fcb8)throw CliErrors[_0x940301(0x19f)](_0x940301(0x16c));if(!existsSync(_0x41fcb8))throw CliErrors[_0x940301(0x19f)](_0x940301(0x16e)+_0x41fcb8);if(!statSync(_0x41fcb8)[_0x940301(0x162)]())throw CliErrors[_0x940301(0x19f)](_0x940301(0x191)+_0x41fcb8);const _0x54c790=readFileSync(_0x41fcb8,_0x940301(0x165));if(!_0x54c790['trim']())throw CliErrors[_0x940301(0x19f)](_0x940301(0x186));return _0x54c790;}function optionalTrimmed(_0x4b7f8c){const _0x528d59=a46_0x448f28,_0x4ea299=String(_0x4b7f8c||'')[_0x528d59(0x174)]();return _0x4ea299||undefined;}function summarizeBff(_0x213ed2){const _0x52378a=a46_0x448f28;return{'id':_0x213ed2['id'],'appCode':_0x213ed2[_0x52378a(0x18e)],'functionName':_0x213ed2[_0x52378a(0x18a)],'description':_0x213ed2[_0x52378a(0x172)],'scriptType':_0x213ed2['scriptType'],'version':_0x213ed2[_0x52378a(0x163)],'gmtModified':_0x213ed2[_0x52378a(0x161)],'updateTime':_0x213ed2[_0x52378a(0x180)]};}function detailBff(_0x5672ab){const _0x3e06a8=a46_0x448f28;return{'id':_0x5672ab['id'],'appCode':_0x5672ab[_0x3e06a8(0x18e)],'functionName':_0x5672ab[_0x3e06a8(0x18a)],'description':_0x5672ab[_0x3e06a8(0x172)],'scriptType':_0x5672ab[_0x3e06a8(0x16a)],'scriptContent':_0x5672ab[_0x3e06a8(0x16b)]??'','config':_0x5672ab[_0x3e06a8(0x173)],'version':_0x5672ab[_0x3e06a8(0x163)],'createUserId':_0x5672ab[_0x3e06a8(0x196)],'gmtCreate':_0x5672ab[_0x3e06a8(0x17c)],'gmtModified':_0x5672ab[_0x3e06a8(0x161)],'createTime':_0x5672ab[_0x3e06a8(0x159)],'updateTime':_0x5672ab['updateTime']};}function buildCreateInput(_0x3bb932){const _0x3ac512=a46_0x448f28;return{'functionName':normalizeFunctionName(_0x3bb932[_0x3ac512(0x15f)]('name')),...optionalTrimmed(_0x3bb932['str']('description'))?{'description':optionalTrimmed(_0x3bb932[_0x3ac512(0x15f)](_0x3ac512(0x172)))}:{},'scriptContent':readScriptFile(_0x3bb932[_0x3ac512(0x15f)](_0x3ac512(0x197))),...optionalTrimmed(_0x3bb932['str']('source-session-id'))?{'sourceSessionId':optionalTrimmed(_0x3bb932['str'](_0x3ac512(0x195)))}:{}};}function buildUpdateInput(_0x478180){const _0x475b38=a46_0x448f28,_0x7b0ca0={};optionalTrimmed(_0x478180[_0x475b38(0x15f)](_0x475b38(0x167)))&&(_0x7b0ca0[_0x475b38(0x18a)]=normalizeFunctionName(_0x478180['str'](_0x475b38(0x167))));_0x478180[_0x475b38(0x15c)](_0x475b38(0x172))!==undefined&&(_0x7b0ca0[_0x475b38(0x172)]=_0x478180[_0x475b38(0x15f)](_0x475b38(0x172)));optionalTrimmed(_0x478180['str'](_0x475b38(0x197)))&&(_0x7b0ca0['scriptContent']=readScriptFile(_0x478180[_0x475b38(0x15f)](_0x475b38(0x197))));_0x478180[_0x475b38(0x15c)](_0x475b38(0x195))!==undefined&&(_0x7b0ca0[_0x475b38(0x190)]=_0x478180[_0x475b38(0x15f)](_0x475b38(0x195)));if(Object[_0x475b38(0x168)](_0x7b0ca0)[_0x475b38(0x16d)]===0x0)throw CliErrors['validation']('personal-bff\x20update\x20requires\x20at\x20least\x20one\x20of\x20--name,\x20--description,\x20--file,\x20or\x20--source-session-id.');return _0x7b0ca0;}function parseExecParams(_0x532064){const _0x1b0c8e=a46_0x448f28,_0x58ed7f=parseJsonParams(_0x532064)??{};if(Array['isArray'](_0x58ed7f))throw CliErrors[_0x1b0c8e(0x19f)](_0x1b0c8e(0x19b));return _0x58ed7f;}const personalBffList={'service':'personal-bff','command':a46_0x448f28(0x15b),'description':a46_0x448f28(0x15d),'risk':a46_0x448f28(0x18b),'flags':[VERBOSE_FLAG],async 'execute'(_0x5d6eb0){const _0x1b844b=a46_0x448f28,_0x3f3735=await listPersonalBffs(_0x5d6eb0[_0x1b844b(0x18e)]);return{'ok':!![],'data':{'total':_0x3f3735[_0x1b844b(0x16d)],'items':_0x5d6eb0[_0x1b844b(0x183)](_0x1b844b(0x177))?_0x3f3735:_0x3f3735['map'](summarizeBff)}};}},personalBffDetail={'service':a46_0x448f28(0x166),'command':a46_0x448f28(0x188),'description':a46_0x448f28(0x19d),'risk':a46_0x448f28(0x18b),'flags':[{...ID_FLAG,'description':'Personal\x20Backend\x20Function\x20script\x20ID'}],async 'execute'(_0x4861e1){const _0x2514b1=a46_0x448f28,_0x427f6=await getPersonalBff(_0x4861e1[_0x2514b1(0x181)]('id'),_0x4861e1['appCode']);return{'ok':!![],'data':detailBff(_0x427f6)};}},personalBffCreate={'service':a46_0x448f28(0x166),'command':a46_0x448f28(0x160),'description':a46_0x448f28(0x179),'risk':'write','confirmationDescription':a46_0x448f28(0x194),'flags':[FUNCTION_NAME_FLAG,{...FILE_FLAG,'required':!![]},DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0xa4613){const _0x28df5e=a46_0x448f28,_0x4d1595=buildCreateInput(_0xa4613),_0x1af41c=await createPersonalBff(_0xa4613[_0x28df5e(0x18e)],_0x4d1595);return{'ok':!![],'data':detailBff(_0x1af41c),'message':_0x28df5e(0x17b)+_0x1af41c['id']+(_0x1af41c[_0x28df5e(0x18a)]?'\x20('+_0x1af41c[_0x28df5e(0x18a)]+')':'')};},async 'dryRun'(_0x5f29f3){const _0x377209=a46_0x448f28,_0x396793=buildCreateInput(_0x5f29f3);return dryRun(_0x377209(0x171),_0x377209(0x18f))['body']({'appCode':_0x5f29f3['appCode'],..._0x396793})[_0x377209(0x172)](_0x377209(0x158)+_0x396793[_0x377209(0x18a)])[_0x377209(0x189)]();}},personalBffUpdate={'service':a46_0x448f28(0x166),'command':a46_0x448f28(0x156),'description':a46_0x448f28(0x17e),'risk':a46_0x448f28(0x15a),'confirmationDescription':a46_0x448f28(0x16f),'flags':[{...ID_FLAG,'description':a46_0x448f28(0x169)},{...FUNCTION_NAME_FLAG,'required':![]},FILE_FLAG,DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x15d547){const _0x4dde3a=a46_0x448f28,_0x4cc66d=_0x15d547[_0x4dde3a(0x181)]('id'),_0xe6537f=buildUpdateInput(_0x15d547),_0x226012=await updatePersonalBff(_0x4cc66d,_0x15d547[_0x4dde3a(0x18e)],_0xe6537f);return{'ok':!![],'data':detailBff(_0x226012),'message':_0x4dde3a(0x19c)+_0x226012['id']+(_0x226012['functionName']?'\x20('+_0x226012[_0x4dde3a(0x18a)]+')':'')};},async 'dryRun'(_0x58ba66){const _0x34b2d7=a46_0x448f28,_0x15d971=_0x58ba66[_0x34b2d7(0x181)]('id'),_0x3ceef2=buildUpdateInput(_0x58ba66);return dryRun(_0x34b2d7(0x171),_0x34b2d7(0x18d)+_0x15d971+'/update')['body']({'appCode':_0x58ba66[_0x34b2d7(0x18e)],..._0x3ceef2})[_0x34b2d7(0x172)]('Preview:\x20update\x20Personal\x20Backend\x20Function\x20'+_0x15d971)[_0x34b2d7(0x189)]();}},personalBffExec={'service':'personal-bff','command':a46_0x448f28(0x17a),'description':'根据\x20ID\x20执行Personal\x20Backend\x20Function,并可传入\x20JSON\x20参数','risk':a46_0x448f28(0x15a),'confirmationDescription':a46_0x448f28(0x193),'flags':[{...ID_FLAG,'description':a46_0x448f28(0x169)},{...PARAMS_FLAG,'description':a46_0x448f28(0x182)}],async 'validate'(_0x120529){const _0x51d1d4=a46_0x448f28;parseExecParams(_0x120529[_0x51d1d4(0x15f)]('params'));},async 'execute'(_0x41e6cc){const _0x12ef76=a46_0x448f28,_0x53d2eb=_0x41e6cc[_0x12ef76(0x181)]('id'),_0x2033c2=parseExecParams(_0x41e6cc[_0x12ef76(0x15f)](_0x12ef76(0x176))),_0x18f5d9=await executePersonalBff(_0x53d2eb,_0x41e6cc['appCode'],_0x2033c2);return{'ok':!![],'data':{'result':_0x18f5d9},'message':_0x12ef76(0x17f)+_0x53d2eb};}};export const personalBffDefinitions=[personalBffList,personalBffDetail,personalBffCreate,personalBffUpdate,personalBffExec];function a46_0x1dcb(){const _0x51b0a1=['keys','Personal\x20Backend\x20Function\x20script\x20ID','scriptType','scriptContent','File\x20path\x20is\x20required.','length','File\x20not\x20found:\x20','更新Personal\x20Backend\x20Function\x20的脚本或元信息;之后的调用将使用新版本。','1334194fasWus','POST','description','config','trim','144DOgSgx','params','verbose','Personal\x20Backend\x20Function\x20name,\x20for\x20example\x20loadOrders','根据本地脚本文件创建Personal\x20Backend\x20Function','exec','Created\x20Personal\x20Backend\x20Function\x20','gmtCreate','string','根据\x20ID\x20更新Personal\x20Backend\x20Function','Executed\x20Personal\x20Backend\x20Function\x20','updateTime','num','JSON\x20object\x20passed\x20to\x20the\x20Personal\x20Backend\x20Function\x20execution','bool','Personal\x20Backend\x20Function\x20description','4249UXkgPw','Personal\x20Backend\x20Function\x20script\x20file\x20is\x20blank.','2093810RHRVPi','detail','build','functionName','read','1389489QJJgIe','/client/runtime-bff/personal/','appCode','/client/runtime-bff/personal/create','sourceSessionId','File\x20is\x20not\x20a\x20regular\x20file:\x20','--name\x20must\x20be\x20a\x20valid\x20JavaScript\x20identifier,\x20for\x20example\x20loadOrders.','执行Personal\x20Backend\x20Function\x20脚本;脚本可能读取或修改业务数据,也可能调用外部服务。','把本地脚本保存为Personal\x20Backend\x20Function;之后可在当前应用中调用该脚本。','source-session-id','createUserId','file','9PzttMI','test','Path\x20to\x20a\x20local\x20UTF-8\x20JavaScript\x20or\x20TypeScript\x20file','--params\x20must\x20be\x20a\x20JSON\x20object.','Updated\x20Personal\x20Backend\x20Function\x20','Show\x20one\x20Personal\x20Backend\x20Function\x20by\x20id','14793cKzZYJ','validation','4473615jggFqj','update','11280VgehQF','Preview:\x20create\x20Personal\x20Backend\x20Function\x20','createTime','write','list','flag','List\x20current\x20user\x27s\x20Personal\x20Backend\x20Function\x20scripts\x20for\x20the\x20current\x20app','Optional\x20source\x20RuntimeAgent\x20session\x20id','str','create','gmtModified','isFile','version','10783288wCHbHf','utf8','personal-bff','name'];a46_0x1dcb=function(){return _0x51b0a1;};return a46_0x1dcb();}
1
+ const a46_0x9d3956=a46_0x2bd1;function a46_0x2bd1(_0x3e26ff,_0x4d7d05){_0x3e26ff=_0x3e26ff-0x9e;const _0x249073=a46_0x2490();let _0x2bd1e8=_0x249073[_0x3e26ff];return _0x2bd1e8;}(function(_0x4f90eb,_0xceefb2){const _0x590ed2=a46_0x2bd1,_0x496e95=_0x4f90eb();while(!![]){try{const _0x34c247=-parseInt(_0x590ed2(0xd9))/0x1*(-parseInt(_0x590ed2(0xb6))/0x2)+-parseInt(_0x590ed2(0xa2))/0x3+-parseInt(_0x590ed2(0xcf))/0x4*(-parseInt(_0x590ed2(0xa7))/0x5)+parseInt(_0x590ed2(0xdd))/0x6*(parseInt(_0x590ed2(0xa1))/0x7)+-parseInt(_0x590ed2(0xd2))/0x8*(parseInt(_0x590ed2(0xbe))/0x9)+-parseInt(_0x590ed2(0xb8))/0xa+parseInt(_0x590ed2(0xcb))/0xb;if(_0x34c247===_0xceefb2)break;else _0x496e95['push'](_0x496e95['shift']());}catch(_0x5a8a33){_0x496e95['push'](_0x496e95['shift']());}}}(a46_0x2490,0x727ef));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_0x9d3956(0xd7),'type':'string','description':a46_0x9d3956(0xc7)},FUNCTION_NAME_FLAG={'name':a46_0x9d3956(0xab),'type':a46_0x9d3956(0xdf),'required':!![],'description':a46_0x9d3956(0xa8)},DESCRIPTION_FLAG={'name':a46_0x9d3956(0xc2),'type':a46_0x9d3956(0xdf),'description':'Personal\x20Backend\x20Function\x20description'},SOURCE_SESSION_FLAG={'name':'source-session-id','type':a46_0x9d3956(0xdf),'description':a46_0x9d3956(0xa5)};function normalizeFunctionName(_0x595597){const _0x354e02=a46_0x9d3956,_0x550408=String(_0x595597||'')[_0x354e02(0xc5)]();if(!_0x550408||!FUNCTION_NAME_PATTERN[_0x354e02(0xdc)](_0x550408))throw CliErrors[_0x354e02(0xc3)]('--name\x20must\x20be\x20a\x20valid\x20JavaScript\x20identifier,\x20for\x20example\x20loadOrders.');return _0x550408;}function readScriptFile(_0x280fa0){const _0x4391f7=a46_0x9d3956;if(!_0x280fa0)throw CliErrors[_0x4391f7(0xc3)](_0x4391f7(0xaa));if(!existsSync(_0x280fa0))throw CliErrors['validation'](_0x4391f7(0x9e)+_0x280fa0);if(!statSync(_0x280fa0)[_0x4391f7(0xa9)]())throw CliErrors[_0x4391f7(0xc3)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x280fa0);const _0x3bf47a=readFileSync(_0x280fa0,_0x4391f7(0xad));if(!_0x3bf47a[_0x4391f7(0xc5)]())throw CliErrors[_0x4391f7(0xc3)]('Personal\x20Backend\x20Function\x20script\x20file\x20is\x20blank.');return _0x3bf47a;}function optionalTrimmed(_0x5e0fce){const _0x432471=a46_0x9d3956,_0x491198=String(_0x5e0fce||'')[_0x432471(0xc5)]();return _0x491198||undefined;}function summarizeBff(_0x576cfc){const _0x51b5ef=a46_0x9d3956;return{'id':_0x576cfc['id'],'appCode':_0x576cfc[_0x51b5ef(0xa6)],'functionName':_0x576cfc['functionName'],'description':_0x576cfc[_0x51b5ef(0xc2)],'scriptType':_0x576cfc[_0x51b5ef(0xd1)],'version':_0x576cfc[_0x51b5ef(0xb5)],'gmtModified':_0x576cfc[_0x51b5ef(0xb2)],'updateTime':_0x576cfc[_0x51b5ef(0xc0)]};}function detailBff(_0x4c3671){const _0x1951e0=a46_0x9d3956;return{'id':_0x4c3671['id'],'appCode':_0x4c3671[_0x1951e0(0xa6)],'functionName':_0x4c3671[_0x1951e0(0xd8)],'description':_0x4c3671[_0x1951e0(0xc2)],'scriptType':_0x4c3671[_0x1951e0(0xd1)],'scriptContent':_0x4c3671[_0x1951e0(0xa0)]??'','config':_0x4c3671[_0x1951e0(0xd6)],'version':_0x4c3671['version'],'createUserId':_0x4c3671[_0x1951e0(0xba)],'gmtCreate':_0x4c3671['gmtCreate'],'gmtModified':_0x4c3671['gmtModified'],'createTime':_0x4c3671[_0x1951e0(0xce)],'updateTime':_0x4c3671['updateTime']};}function buildCreateInput(_0x3c198f){const _0x2e7087=a46_0x9d3956;return{'functionName':normalizeFunctionName(_0x3c198f[_0x2e7087(0xae)](_0x2e7087(0xab))),...optionalTrimmed(_0x3c198f[_0x2e7087(0xae)]('description'))?{'description':optionalTrimmed(_0x3c198f[_0x2e7087(0xae)](_0x2e7087(0xc2)))}:{},'scriptContent':readScriptFile(_0x3c198f[_0x2e7087(0xae)](_0x2e7087(0xd7))),...optionalTrimmed(_0x3c198f[_0x2e7087(0xae)]('source-session-id'))?{'sourceSessionId':optionalTrimmed(_0x3c198f[_0x2e7087(0xae)](_0x2e7087(0xb7)))}:{}};}function buildUpdateInput(_0x5ac12a){const _0x2d852d=a46_0x9d3956,_0x38f58e={};optionalTrimmed(_0x5ac12a[_0x2d852d(0xae)](_0x2d852d(0xab)))&&(_0x38f58e[_0x2d852d(0xd8)]=normalizeFunctionName(_0x5ac12a[_0x2d852d(0xae)]('name')));_0x5ac12a[_0x2d852d(0xe2)](_0x2d852d(0xc2))!==undefined&&(_0x38f58e[_0x2d852d(0xc2)]=_0x5ac12a[_0x2d852d(0xae)](_0x2d852d(0xc2)));optionalTrimmed(_0x5ac12a[_0x2d852d(0xae)](_0x2d852d(0xd7)))&&(_0x38f58e[_0x2d852d(0xa0)]=readScriptFile(_0x5ac12a[_0x2d852d(0xae)](_0x2d852d(0xd7))));_0x5ac12a['flag'](_0x2d852d(0xb7))!==undefined&&(_0x38f58e['sourceSessionId']=_0x5ac12a['str']('source-session-id'));if(Object[_0x2d852d(0xbd)](_0x38f58e)[_0x2d852d(0xe4)]===0x0)throw CliErrors[_0x2d852d(0xc3)](_0x2d852d(0xbc));return _0x38f58e;}function parseExecParams(_0x36b626){const _0x164e8d=a46_0x9d3956,_0x219920=parseJsonParams(_0x36b626)??{};if(Array[_0x164e8d(0xc1)](_0x219920))throw CliErrors[_0x164e8d(0xc3)](_0x164e8d(0xa3));return _0x219920;}const personalBffList={'service':'personal-bff','command':a46_0x9d3956(0xd4),'description':a46_0x9d3956(0xd3),'risk':a46_0x9d3956(0xcc),'flags':[VERBOSE_FLAG],async 'execute'(_0xcf009d){const _0x494d36=a46_0x9d3956,_0x3a5b14=await listPersonalBffs(_0xcf009d[_0x494d36(0xa6)]);return{'ok':!![],'data':{'total':_0x3a5b14[_0x494d36(0xe4)],'items':_0xcf009d['bool'](_0x494d36(0xc8))?_0x3a5b14:_0x3a5b14[_0x494d36(0xb0)](summarizeBff)}};}},personalBffDetail={'service':a46_0x9d3956(0xb3),'command':'detail','description':a46_0x9d3956(0xcd),'risk':'read','flags':[{...ID_FLAG,'description':a46_0x9d3956(0xe3)}],async 'execute'(_0x32dfaa){const _0x5f583b=a46_0x9d3956,_0x17a66e=await getPersonalBff(_0x32dfaa[_0x5f583b(0xe1)]('id'),_0x32dfaa[_0x5f583b(0xa6)]);return{'ok':!![],'data':detailBff(_0x17a66e)};}},personalBffCreate={'service':a46_0x9d3956(0xb3),'command':'create','description':a46_0x9d3956(0xda),'risk':a46_0x9d3956(0xd5),'confirmationDescription':'把本地脚本保存为Personal\x20Backend\x20Function;之后可在当前应用中调用该脚本。','flags':[FUNCTION_NAME_FLAG,{...FILE_FLAG,'required':!![]},DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x19cac4){const _0x7c4521=a46_0x9d3956,_0x135ab9=buildCreateInput(_0x19cac4),_0x166521=await createPersonalBff(_0x19cac4['appCode'],_0x135ab9);return{'ok':!![],'data':detailBff(_0x166521),'message':_0x7c4521(0xa4)+_0x166521['id']+(_0x166521['functionName']?'\x20('+_0x166521[_0x7c4521(0xd8)]+')':'')};},async 'dryRun'(_0xbed3b5){const _0x593cbe=a46_0x9d3956,_0x569373=buildCreateInput(_0xbed3b5);return dryRun(_0x593cbe(0xdb),_0x593cbe(0xbb))[_0x593cbe(0xb1)]({'appCode':_0xbed3b5[_0x593cbe(0xa6)],..._0x569373})['description'](_0x593cbe(0xde)+_0x569373['functionName'])['build']();}},personalBffUpdate={'service':'personal-bff','command':a46_0x9d3956(0xb9),'description':a46_0x9d3956(0xca),'risk':'write','confirmationDescription':a46_0x9d3956(0xac),'flags':[{...ID_FLAG,'description':a46_0x9d3956(0xe3)},{...FUNCTION_NAME_FLAG,'required':![]},FILE_FLAG,DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x461b88){const _0x1e6a35=a46_0x9d3956,_0x58f85e=_0x461b88[_0x1e6a35(0xe1)]('id'),_0x14c759=buildUpdateInput(_0x461b88),_0x517683=await updatePersonalBff(_0x58f85e,_0x461b88['appCode'],_0x14c759);return{'ok':!![],'data':detailBff(_0x517683),'message':_0x1e6a35(0xe0)+_0x517683['id']+(_0x517683[_0x1e6a35(0xd8)]?'\x20('+_0x517683[_0x1e6a35(0xd8)]+')':'')};},async 'dryRun'(_0x5d9bf5){const _0x3371ee=a46_0x9d3956,_0x3ce294=_0x5d9bf5[_0x3371ee(0xe1)]('id'),_0xf144b5=buildUpdateInput(_0x5d9bf5);return dryRun('POST',_0x3371ee(0x9f)+_0x3ce294+_0x3371ee(0xaf))['body']({'appCode':_0x5d9bf5['appCode'],..._0xf144b5})[_0x3371ee(0xc2)]('Preview:\x20update\x20Personal\x20Backend\x20Function\x20'+_0x3ce294)['build']();}},personalBffExec={'service':a46_0x9d3956(0xb3),'command':a46_0x9d3956(0xc9),'description':a46_0x9d3956(0xc6),'risk':'write','confirmationDescription':a46_0x9d3956(0xc4),'flags':[{...ID_FLAG,'description':'Personal\x20Backend\x20Function\x20script\x20ID'},{...PARAMS_FLAG,'description':a46_0x9d3956(0xbf)}],async 'validate'(_0x26c639){const _0x55f9d1=a46_0x9d3956;parseExecParams(_0x26c639[_0x55f9d1(0xae)]('params'));},async 'execute'(_0x1a9c31){const _0x27b413=a46_0x9d3956,_0x574e1e=_0x1a9c31[_0x27b413(0xe1)]('id'),_0x5c94bb=parseExecParams(_0x1a9c31[_0x27b413(0xae)](_0x27b413(0xd0))),_0x19ed5e=await executePersonalBff(_0x574e1e,_0x1a9c31[_0x27b413(0xa6)],_0x5c94bb);return{'ok':!![],'data':{'result':_0x19ed5e},'message':_0x27b413(0xb4)+_0x574e1e};}};export const personalBffDefinitions=[personalBffList,personalBffDetail,personalBffCreate,personalBffUpdate,personalBffExec];function a46_0x2490(){const _0x43c4fe=['File\x20not\x20found:\x20','/client/runtime-bff/personal/','scriptContent','1498742dKYJax','2462871hqXjzG','--params\x20must\x20be\x20a\x20JSON\x20object.','Created\x20Personal\x20Backend\x20Function\x20','Optional\x20source\x20RuntimeAgent\x20session\x20id','appCode','5XNwkol','Personal\x20Backend\x20Function\x20name,\x20for\x20example\x20loadOrders','isFile','File\x20path\x20is\x20required.','name','更新Personal\x20Backend\x20Function\x20的脚本或元信息;之后的调用将使用新版本。','utf8','str','/update','map','body','gmtModified','personal-bff','Executed\x20Personal\x20Backend\x20Function\x20','version','1094IesUUN','source-session-id','3982360OPJSCh','update','createUserId','/client/runtime-bff/personal/create','personal-bff\x20update\x20requires\x20at\x20least\x20one\x20of\x20--name,\x20--description,\x20--file,\x20or\x20--source-session-id.','keys','6759288ZpMZjI','JSON\x20object\x20passed\x20to\x20the\x20Personal\x20Backend\x20Function\x20execution','updateTime','isArray','description','validation','执行Personal\x20Backend\x20Function\x20脚本;脚本可能读取或修改业务数据,也可能调用外部服务。','trim','根据\x20ID\x20执行Personal\x20Backend\x20Function,并可传入\x20JSON\x20参数','Path\x20to\x20a\x20local\x20UTF-8\x20JavaScript\x20or\x20TypeScript\x20file','verbose','exec','根据\x20ID\x20更新Personal\x20Backend\x20Function','14894704HlDjTL','read','Show\x20one\x20Personal\x20Backend\x20Function\x20by\x20id','createTime','2724884yyDTfH','params','scriptType','8VGNUsM','List\x20current\x20user\x27s\x20Personal\x20Backend\x20Function\x20scripts\x20for\x20the\x20current\x20app','list','write','config','file','functionName','347TmMYkR','根据本地脚本文件创建Personal\x20Backend\x20Function','POST','test','6GzuNED','Preview:\x20create\x20Personal\x20Backend\x20Function\x20','string','Updated\x20Personal\x20Backend\x20Function\x20','num','flag','Personal\x20Backend\x20Function\x20script\x20ID','length'];a46_0x2490=function(){return _0x43c4fe;};return a46_0x2490();}
@@ -1 +1 @@
1
- const a47_0x2261bf=a47_0x8534;(function(_0x1a4303,_0x5b2ff8){const _0x51df6e=a47_0x8534,_0x5823ba=_0x1a4303();while(!![]){try{const _0x3a633a=-parseInt(_0x51df6e(0x223))/0x1*(parseInt(_0x51df6e(0x22a))/0x2)+parseInt(_0x51df6e(0x1fa))/0x3*(-parseInt(_0x51df6e(0x1fd))/0x4)+parseInt(_0x51df6e(0x207))/0x5+parseInt(_0x51df6e(0x1f1))/0x6+parseInt(_0x51df6e(0x201))/0x7*(-parseInt(_0x51df6e(0x1ee))/0x8)+-parseInt(_0x51df6e(0x21f))/0x9*(parseInt(_0x51df6e(0x1f6))/0xa)+-parseInt(_0x51df6e(0x203))/0xb*(-parseInt(_0x51df6e(0x22c))/0xc);if(_0x3a633a===_0x5b2ff8)break;else _0x5823ba['push'](_0x5823ba['shift']());}catch(_0x26f40d){_0x5823ba['push'](_0x5823ba['shift']());}}}(a47_0x2c90,0xc088d));import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{skillDefinitions}from'../commands/skill/index.js';import{cliSkillDefinitions}from'../commands/cli-skill/index.js';import{serviceDefinitions}from'../commands/service/index.js';import{updateDefinition}from'../commands/update.js';import{doctorDefinition}from'../commands/doctor.js';import{schemaDefinition}from'../commands/schema.js';import{appDefinitions}from'../commands/app/definitions.js';import{workspaceDefinitions}from'../commands/workspace/index.js';import{configDefinitions}from'../commands/config/definitions.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{dataDefinitions}from'../commands/data/index.js';import{kbDefinitions}from'../commands/kb/index.js';import{artifactDefinitions}from'../commands/artifact/index.js';import{personalBffDefinitions}from'../commands/personal-bff/index.js';import{apiDocDefinitions}from'../commands/api-doc/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';import{fileDefinitions}from'../commands/file/index.js';import{ocrDefinitions}from'../commands/ocr/index.js';import{scheduleDefinitions}from'../commands/schedule/index.js';import{userAccountDefinitions}from'../commands/user-account/index.js';function a47_0x8534(_0x33a05a,_0x3f1d7b){_0x33a05a=_0x33a05a-0x1ee;const _0x2c9040=a47_0x2c90();let _0x85348d=_0x2c9040[_0x33a05a];return _0x85348d;}import{notificationDefinitions}from'../commands/notification/index.js';import{roleDefinitions}from'../commands/role/index.js';import{permitDefinitions}from'../commands/permit/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();function a47_0x2c90(){const _0x3f3805=['read','12tZoSaF','logs\x20clear','8ZyxjGb','Runtime\x20Roles','values','4340652CqLeMN','write','`lovrabet\x20app\x20use`\x20has\x20been\x20removed.','User\x20Accounts','\x20\x20[write]','803630OgJMkx','push','app','defaultCommand','3462234leFtiC','API\x20Documentation','Use\x20`lovrabet\x20logs\x20show`\x20to\x20view\x20command\x20history.','4AZVSko','Datasets','set','command','2612106siOdAc','install','4316257UqASAT','Notification\x20Configs','description','init','7303180xCZoqN','CLI\x20Built-in\x20Skill','Self\x20Update','service','Instant\x20API','`lovrabet\x20logs\x20clear`\x20has\x20been\x20removed.','show','Backend\x20Function\x20Scripts','App\x20Management','\x20\x20[high-risk-write]','risk','File','login','Agent\x20Schedules','Runtime\x20Permissions','config-list','Workspace','isSingleCommand','Artifacts','get','Diagnostics','app\x20use','Use\x20`lovrabet\x20workspace\x20init\x20--appcode\x20<code>`\x20instead.','has','9kLpjSP','Logs','Runtime\x20App\x20Config','app\x20init','13865yFrrNw','Use\x20`lovrabet\x20workspace\x20use\x20--app\x20<name>`\x20instead.','from','list','Personal\x20Backend\x20Function','Knowledge\x20Base','use','26cDlKAg'];a47_0x2c90=function(){return _0x3f3805;};return a47_0x2c90();}export const serviceGroups=new Map();function registerDefinitions(_0x4da594){const _0x2def4a=a47_0x8534;for(const _0x12b87a of _0x4da594){definitions[_0x2def4a(0x1ff)](_0x12b87a['service']+':'+_0x12b87a['command'],_0x12b87a);let _0x1b1963=serviceGroups[_0x2def4a(0x21a)](_0x12b87a[_0x2def4a(0x20a)]);!_0x1b1963&&(_0x1b1963=[],serviceGroups['set'](_0x12b87a[_0x2def4a(0x20a)],_0x1b1963)),_0x1b1963[_0x2def4a(0x1f7)](_0x12b87a);}}function registerService(_0x56e36f,_0x60a597,_0x12de46){const _0x2888e6=a47_0x8534;registerDefinitions(_0x60a597);const _0x39c525=_0x19c847=>_0x19c847===_0x2888e6(0x22b)?'':_0x19c847===_0x2888e6(0x1f2)?_0x2888e6(0x1f5):_0x2888e6(0x210),_0x259de3={'service':_0x60a597[0x0]['service'],'label':_0x56e36f,'commands':_0x60a597['map'](_0x4fd7b2=>({'command':_0x4fd7b2[_0x2888e6(0x200)],'description':_0x4fd7b2[_0x2888e6(0x205)],'tag':_0x39c525(_0x4fd7b2[_0x2888e6(0x211)])})),'defaultCommand':_0x12de46?.[_0x2888e6(0x1f9)]??(_0x12de46?.['isSingleCommand']?_0x60a597[0x0][_0x2888e6(0x200)]:undefined),'isSingleCommand':_0x12de46?.[_0x2888e6(0x218)]};serviceRegistry[_0x2888e6(0x1f7)](_0x259de3),serviceByName[_0x2888e6(0x1ff)](_0x259de3[_0x2888e6(0x20a)],_0x259de3);}registerService('Authentication',authDefinitions,{'defaultCommand':a47_0x2261bf(0x213)}),registerService(a47_0x2261bf(0x1f4),userAccountDefinitions),registerService(a47_0x2261bf(0x20f),appDefinitions,{'defaultCommand':a47_0x2261bf(0x226)}),registerService(a47_0x2261bf(0x217),workspaceDefinitions),registerService(a47_0x2261bf(0x221),appConfigDefinitions),registerService('Configuration',configDefinitions,{'defaultCommand':a47_0x2261bf(0x226)}),registerService(a47_0x2261bf(0x1ef),roleDefinitions,{'defaultCommand':a47_0x2261bf(0x226)}),registerService(a47_0x2261bf(0x215),permitDefinitions),registerService(a47_0x2261bf(0x1fb),apiDocDefinitions),registerService(a47_0x2261bf(0x1fe),datasetDefinitions),registerService(a47_0x2261bf(0x20b),dataDefinitions),registerService('SQL\x20Queries',sqlDefinitions),registerService(a47_0x2261bf(0x20e),bffDefinitions),registerService(a47_0x2261bf(0x227),personalBffDefinitions),registerService(a47_0x2261bf(0x219),artifactDefinitions),registerService(a47_0x2261bf(0x212),fileDefinitions),registerService('OCR',ocrDefinitions),registerService(a47_0x2261bf(0x228),kbDefinitions),registerService(a47_0x2261bf(0x204),notificationDefinitions,{'defaultCommand':a47_0x2261bf(0x216)}),registerService(a47_0x2261bf(0x214),scheduleDefinitions,{'defaultCommand':'list'}),registerService('Service\x20Tree',serviceDefinitions,{'defaultCommand':a47_0x2261bf(0x226)}),registerService('Skills',skillDefinitions,{'defaultCommand':a47_0x2261bf(0x202)}),registerService(a47_0x2261bf(0x208),cliSkillDefinitions,{'defaultCommand':'install'}),registerService(a47_0x2261bf(0x209),[updateDefinition],{'defaultCommand':'run','isSingleCommand':!![]}),registerService(a47_0x2261bf(0x21b),[doctorDefinition],{'isSingleCommand':!![]}),registerService('Schema',[schemaDefinition],{'isSingleCommand':!![]}),registerService(a47_0x2261bf(0x220),logsDefinitions,{'defaultCommand':a47_0x2261bf(0x20d)});export function findDefinition(_0xd58ab1,_0xb0c2fb){const _0x4f01db=a47_0x2261bf;return definitions[_0x4f01db(0x21a)](_0xd58ab1+':'+_0xb0c2fb);}export function resolveRemovedCommand(_0x3544eb,_0x2ab679){const _0x57077f=a47_0x2261bf;if(_0x3544eb===_0x57077f(0x1f8)&&_0x2ab679===_0x57077f(0x206))return{'command':_0x57077f(0x222),'message':'`lovrabet\x20app\x20init`\x20has\x20been\x20removed.','hint':_0x57077f(0x21d)};if(_0x3544eb===_0x57077f(0x1f8)&&_0x2ab679===_0x57077f(0x229))return{'command':_0x57077f(0x21c),'message':_0x57077f(0x1f3),'hint':_0x57077f(0x224)};if(_0x3544eb==='logs'&&_0x2ab679==='clear')return{'command':_0x57077f(0x22d),'message':_0x57077f(0x20c),'hint':_0x57077f(0x1fc)};return undefined;}export function isKnownService(_0x7b2e5e){const _0x1bf0a1=a47_0x2261bf;return serviceByName[_0x1bf0a1(0x21e)](_0x7b2e5e);}export function getServiceEntry(_0x46c558){const _0x29c97d=a47_0x2261bf;return serviceByName[_0x29c97d(0x21a)](_0x46c558);}export function getAllDefinitions(){const _0x5d727e=a47_0x2261bf;return Array[_0x5d727e(0x225)](definitions[_0x5d727e(0x1f0)]());}
1
+ const a47_0x42fdb7=a47_0x3e5d;function a47_0x3b67(){const _0x18c32d=['Agent\x20Schedules','set','Personal\x20Backend\x20Function','Schema','app\x20use','Skills','defaultCommand','map','4735566VwhSTS','run','Use\x20`lovrabet\x20logs\x20show`\x20to\x20view\x20command\x20history.','init','874539APFLaN','Knowledge\x20Base','Self\x20Update','`lovrabet\x20app\x20init`\x20has\x20been\x20removed.','app','33813307GFMflo','File','Use\x20`lovrabet\x20workspace\x20init\x20--appcode\x20<code>`\x20instead.','5754784fqhdgT','values','push','`lovrabet\x20app\x20use`\x20has\x20been\x20removed.','15055QLWEpH','has','10OYtQZH','2730MhNkaH','service','User\x20Accounts','Notification\x20Configs','logs\x20clear','isSingleCommand','write','get','12FdNYhL','app\x20init','command','logs','Artifacts','Configuration','Runtime\x20Roles','show','6503744tiSsrR','list','use','API\x20Documentation','config-list','install','Datasets','description','Workspace','Instant\x20API','Diagnostics','from','2gAyFmS','login','Runtime\x20Permissions','711249VjbslS','clear'];a47_0x3b67=function(){return _0x18c32d;};return a47_0x3b67();}(function(_0x577b8c,_0x12161c){const _0x2ee3a7=a47_0x3e5d,_0x2789d6=_0x577b8c();while(!![]){try{const _0x16714f=parseInt(_0x2ee3a7(0x158))/0x1*(-parseInt(_0x2ee3a7(0x147))/0x2)+-parseInt(_0x2ee3a7(0x14a))/0x3*(parseInt(_0x2ee3a7(0x16f))/0x4)+-parseInt(_0x2ee3a7(0x164))/0x5*(-parseInt(_0x2ee3a7(0x167))/0x6)+-parseInt(_0x2ee3a7(0x160))/0x7+-parseInt(_0x2ee3a7(0x177))/0x8+-parseInt(_0x2ee3a7(0x154))/0x9+-parseInt(_0x2ee3a7(0x166))/0xa*(-parseInt(_0x2ee3a7(0x15d))/0xb);if(_0x16714f===_0x12161c)break;else _0x2789d6['push'](_0x2789d6['shift']());}catch(_0x4f7be0){_0x2789d6['push'](_0x2789d6['shift']());}}}(a47_0x3b67,0xaa244));import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{skillDefinitions}from'../commands/skill/index.js';import{cliSkillDefinitions}from'../commands/cli-skill/index.js';import{serviceDefinitions}from'../commands/service/index.js';import{updateDefinition}from'../commands/update.js';import{doctorDefinition}from'../commands/doctor.js';import{schemaDefinition}from'../commands/schema.js';import{appDefinitions}from'../commands/app/definitions.js';import{workspaceDefinitions}from'../commands/workspace/index.js';import{configDefinitions}from'../commands/config/definitions.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{dataDefinitions}from'../commands/data/index.js';import{kbDefinitions}from'../commands/kb/index.js';import{artifactDefinitions}from'../commands/artifact/index.js';import{personalBffDefinitions}from'../commands/personal-bff/index.js';import{apiDocDefinitions}from'../commands/api-doc/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';import{fileDefinitions}from'../commands/file/index.js';import{ocrDefinitions}from'../commands/ocr/index.js';import{scheduleDefinitions}from'../commands/schedule/index.js';import{userAccountDefinitions}from'../commands/user-account/index.js';import{notificationDefinitions}from'../commands/notification/index.js';import{roleDefinitions}from'../commands/role/index.js';import{permitDefinitions}from'../commands/permit/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0xa94f68){const _0x169ff8=a47_0x3e5d;for(const _0x1a55cd of _0xa94f68){definitions[_0x169ff8(0x14d)](_0x1a55cd[_0x169ff8(0x168)]+':'+_0x1a55cd[_0x169ff8(0x171)],_0x1a55cd);let _0x2492e6=serviceGroups[_0x169ff8(0x16e)](_0x1a55cd[_0x169ff8(0x168)]);!_0x2492e6&&(_0x2492e6=[],serviceGroups['set'](_0x1a55cd[_0x169ff8(0x168)],_0x2492e6)),_0x2492e6[_0x169ff8(0x162)](_0x1a55cd);}}function registerService(_0x13264f,_0x18accd,_0xb12e2b){const _0x25610f=a47_0x3e5d;registerDefinitions(_0x18accd);const _0x42a968=_0x15ee1e=>_0x15ee1e==='read'?'':_0x15ee1e===_0x25610f(0x16d)?'\x20\x20[write]':'\x20\x20[high-risk-write]',_0x11850b={'service':_0x18accd[0x0][_0x25610f(0x168)],'label':_0x13264f,'commands':_0x18accd[_0x25610f(0x153)](_0x326e87=>({'command':_0x326e87['command'],'description':_0x326e87[_0x25610f(0x17e)],'tag':_0x42a968(_0x326e87['risk'])})),'defaultCommand':_0xb12e2b?.[_0x25610f(0x152)]??(_0xb12e2b?.[_0x25610f(0x16c)]?_0x18accd[0x0]['command']:undefined),'isSingleCommand':_0xb12e2b?.[_0x25610f(0x16c)]};serviceRegistry[_0x25610f(0x162)](_0x11850b),serviceByName[_0x25610f(0x14d)](_0x11850b[_0x25610f(0x168)],_0x11850b);}registerService('Authentication',authDefinitions,{'defaultCommand':a47_0x42fdb7(0x148)}),registerService(a47_0x42fdb7(0x169),userAccountDefinitions),registerService('App\x20Management',appDefinitions,{'defaultCommand':a47_0x42fdb7(0x178)}),registerService(a47_0x42fdb7(0x17f),workspaceDefinitions),registerService('Runtime\x20App\x20Config',appConfigDefinitions),registerService(a47_0x42fdb7(0x174),configDefinitions,{'defaultCommand':'list'}),registerService(a47_0x42fdb7(0x175),roleDefinitions,{'defaultCommand':a47_0x42fdb7(0x178)}),registerService(a47_0x42fdb7(0x149),permitDefinitions),registerService(a47_0x42fdb7(0x17a),apiDocDefinitions),registerService(a47_0x42fdb7(0x17d),datasetDefinitions),registerService(a47_0x42fdb7(0x144),dataDefinitions),registerService('SQL\x20Queries',sqlDefinitions),registerService('Backend\x20Function\x20Scripts',bffDefinitions),registerService(a47_0x42fdb7(0x14e),personalBffDefinitions),registerService(a47_0x42fdb7(0x173),artifactDefinitions),registerService(a47_0x42fdb7(0x15e),fileDefinitions),registerService('OCR',ocrDefinitions),registerService(a47_0x42fdb7(0x159),kbDefinitions),registerService(a47_0x42fdb7(0x16a),notificationDefinitions,{'defaultCommand':a47_0x42fdb7(0x17b)}),registerService(a47_0x42fdb7(0x14c),scheduleDefinitions,{'defaultCommand':'list'}),registerService('Service\x20Tree',serviceDefinitions,{'defaultCommand':a47_0x42fdb7(0x178)}),registerService(a47_0x42fdb7(0x151),skillDefinitions,{'defaultCommand':a47_0x42fdb7(0x17c)}),registerService('CLI\x20Built-in\x20Skill',cliSkillDefinitions,{'defaultCommand':a47_0x42fdb7(0x17c)}),registerService(a47_0x42fdb7(0x15a),[updateDefinition],{'defaultCommand':a47_0x42fdb7(0x155),'isSingleCommand':!![]}),registerService(a47_0x42fdb7(0x145),[doctorDefinition],{'isSingleCommand':!![]}),registerService(a47_0x42fdb7(0x14f),[schemaDefinition],{'isSingleCommand':!![]}),registerService('Logs',logsDefinitions,{'defaultCommand':a47_0x42fdb7(0x176)});export function findDefinition(_0x589ab7,_0x17da34){const _0x11d853=a47_0x42fdb7;return definitions[_0x11d853(0x16e)](_0x589ab7+':'+_0x17da34);}export function resolveRemovedCommand(_0x1e6002,_0x35d31a){const _0xf85d74=a47_0x42fdb7;if(_0x1e6002===_0xf85d74(0x15c)&&_0x35d31a===_0xf85d74(0x157))return{'command':_0xf85d74(0x170),'message':_0xf85d74(0x15b),'hint':_0xf85d74(0x15f)};if(_0x1e6002===_0xf85d74(0x15c)&&_0x35d31a===_0xf85d74(0x179))return{'command':_0xf85d74(0x150),'message':_0xf85d74(0x163),'hint':'Use\x20`lovrabet\x20workspace\x20use\x20--app\x20<name>`\x20instead.'};if(_0x1e6002===_0xf85d74(0x172)&&_0x35d31a===_0xf85d74(0x14b))return{'command':_0xf85d74(0x16b),'message':'`lovrabet\x20logs\x20clear`\x20has\x20been\x20removed.','hint':_0xf85d74(0x156)};return undefined;}export function isKnownService(_0x2da882){const _0x18c9db=a47_0x42fdb7;return serviceByName[_0x18c9db(0x165)](_0x2da882);}export function getServiceEntry(_0x41be68){const _0x58cb8e=a47_0x42fdb7;return serviceByName[_0x58cb8e(0x16e)](_0x41be68);}function a47_0x3e5d(_0x220bf2,_0x143e3f){_0x220bf2=_0x220bf2-0x144;const _0x3b6710=a47_0x3b67();let _0x3e5d23=_0x3b6710[_0x220bf2];return _0x3e5d23;}export function getAllDefinitions(){const _0x4b0dc3=a47_0x42fdb7;return Array[_0x4b0dc3(0x146)](definitions[_0x4b0dc3(0x161)]());}
@@ -1 +1 @@
1
- const a48_0x3d642e=a48_0x471f;(function(_0x398dd7,_0x4f763e){const _0x1451e6=a48_0x471f,_0x514514=_0x398dd7();while(!![]){try{const _0xbb313e=parseInt(_0x1451e6(0x144))/0x1*(parseInt(_0x1451e6(0x13a))/0x2)+-parseInt(_0x1451e6(0x13b))/0x3+parseInt(_0x1451e6(0x13d))/0x4+parseInt(_0x1451e6(0x148))/0x5*(parseInt(_0x1451e6(0x154))/0x6)+parseInt(_0x1451e6(0x13e))/0x7*(-parseInt(_0x1451e6(0x155))/0x8)+parseInt(_0x1451e6(0x14b))/0x9*(-parseInt(_0x1451e6(0x142))/0xa)+parseInt(_0x1451e6(0x146))/0xb;if(_0xbb313e===_0x4f763e)break;else _0x514514['push'](_0x514514['shift']());}catch(_0x2b5383){_0x514514['push'](_0x514514['shift']());}}}(a48_0x3e0a,0x2b5f1));function a48_0x3e0a(){const _0x463ad3=['CUSTOM','Create\x20a\x20runtime\x20CUSTOM\x20role','5787IMdqHh','Role\x20name','POST','role','body','remark','string','--name\x20must\x20not\x20be\x20blank.','Preview:\x20create\x20a\x20runtime\x20CUSTOM\x20role','110178CYdHhv','9640pqAbOl','appCode','trim','build','874aPDOZp','765936EAhMnD','validation','772188InYTAo','1967TqDqSv','name','Optional\x20role\x20remark','create','1580ZbIIiw','high-risk-write','275EkIFuI','description','5149353AibzpX','/client/permit/role/create','25xiUwGd'];a48_0x3e0a=function(){return _0x463ad3;};return a48_0x3e0a();}function a48_0x471f(_0x49e9b4,_0x38d80c){_0x49e9b4=_0x49e9b4-0x13a;const _0x3e0a07=a48_0x3e0a();let _0x471ffa=_0x3e0a07[_0x49e9b4];return _0x471ffa;}import{createRuntimeAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';import{projectRuntimeRole,runtimeRoleWriteResult}from'../../commands/role/shared.js';function input(_0x52a0c8){const _0x49fd25=a48_0x471f,_0x33e08e=_0x52a0c8['str']('name')[_0x49fd25(0x157)]();if(!_0x33e08e)throw CliErrors[_0x49fd25(0x13c)](_0x49fd25(0x152));const _0x5d561c=_0x52a0c8['str']('remark')[_0x49fd25(0x157)]();return{'appCode':_0x52a0c8[_0x49fd25(0x156)],'roleName':_0x33e08e,..._0x5d561c?{'remark':_0x5d561c}:{}};}export const roleCreate={'service':a48_0x3d642e(0x14e),'command':a48_0x3d642e(0x141),'description':a48_0x3d642e(0x14a),'risk':a48_0x3d642e(0x143),'confirmationDescription':'在当前运行应用中创建一个自定义角色;创建后可用于成员与资源权限配置。','flags':[{'name':a48_0x3d642e(0x13f),'type':a48_0x3d642e(0x151),'required':!![],'description':a48_0x3d642e(0x14c)},{'name':a48_0x3d642e(0x150),'type':'string','description':a48_0x3d642e(0x140)}],async 'validate'(_0x392f02){input(_0x392f02);},async 'dryRun'(_0x1c8ede){const _0x4e7ece=a48_0x3d642e;return dryRun(_0x4e7ece(0x14d),_0x4e7ece(0x147))[_0x4e7ece(0x14f)]({'roleType':_0x4e7ece(0x149),...input(_0x1c8ede)})[_0x4e7ece(0x145)](_0x4e7ece(0x153))[_0x4e7ece(0x158)]();},async 'execute'(_0x45b4b1){const _0x2ba4af=a48_0x3d642e,_0x1d15e6=await createRuntimeAppRole(input(_0x45b4b1));return{'ok':!![],'data':runtimeRoleWriteResult('create',{'roleId':_0x1d15e6['id']},null,projectRuntimeRole(_0x1d15e6),{'method':_0x2ba4af(0x14d),'path':_0x2ba4af(0x147)})};}};
1
+ const a48_0x146977=a48_0x50b6;(function(_0x1ae014,_0x440a7e){const _0x3b839d=a48_0x50b6,_0x5cc0f7=_0x1ae014();while(!![]){try{const _0x10ae3e=parseInt(_0x3b839d(0x100))/0x1+-parseInt(_0x3b839d(0xf5))/0x2*(parseInt(_0x3b839d(0x109))/0x3)+-parseInt(_0x3b839d(0x10d))/0x4*(-parseInt(_0x3b839d(0xf8))/0x5)+-parseInt(_0x3b839d(0xfe))/0x6+-parseInt(_0x3b839d(0xf2))/0x7+-parseInt(_0x3b839d(0x107))/0x8+parseInt(_0x3b839d(0x103))/0x9;if(_0x10ae3e===_0x440a7e)break;else _0x5cc0f7['push'](_0x5cc0f7['shift']());}catch(_0x507edb){_0x5cc0f7['push'](_0x5cc0f7['shift']());}}}(a48_0x199a,0x98305));import{createRuntimeAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';function a48_0x199a(){const _0x489bc2=['POST','role','2868568hlTDMm','Create\x20a\x20runtime\x20CUSTOM\x20role','2991JtIxiA','CUSTOM','trim','/client/permit/role/create','536aUeAxt','8509067feQfLF','str','build','234DvFpwC','string','Preview:\x20create\x20a\x20runtime\x20CUSTOM\x20role','17860aiwjlA','description','Role\x20name','create','appCode','validation','1969740NZXEDj','remark','853272MuhETY','body','--name\x20must\x20not\x20be\x20blank.','11794824WCMgIy','high-risk-write'];a48_0x199a=function(){return _0x489bc2;};return a48_0x199a();}import{projectRuntimeRole,runtimeRoleWriteResult}from'../../commands/role/shared.js';function input(_0x3cc330){const _0x5bb027=a48_0x50b6,_0x338bdf=_0x3cc330[_0x5bb027(0xf3)]('name')[_0x5bb027(0x10b)]();if(!_0x338bdf)throw CliErrors[_0x5bb027(0xfd)](_0x5bb027(0x102));const _0x1219f1=_0x3cc330[_0x5bb027(0xf3)](_0x5bb027(0xff))[_0x5bb027(0x10b)]();return{'appCode':_0x3cc330[_0x5bb027(0xfc)],'roleName':_0x338bdf,..._0x1219f1?{'remark':_0x1219f1}:{}};}function a48_0x50b6(_0x1c3fc3,_0xc59246){_0x1c3fc3=_0x1c3fc3-0xf2;const _0x199ab7=a48_0x199a();let _0x50b650=_0x199ab7[_0x1c3fc3];return _0x50b650;}export const roleCreate={'service':a48_0x146977(0x106),'command':a48_0x146977(0xfb),'description':a48_0x146977(0x108),'risk':a48_0x146977(0x104),'confirmationDescription':'在当前运行应用中创建一个自定义角色;创建后可用于成员与资源权限配置。','flags':[{'name':'name','type':a48_0x146977(0xf6),'required':!![],'description':a48_0x146977(0xfa)},{'name':'remark','type':a48_0x146977(0xf6),'description':'Optional\x20role\x20remark'}],async 'validate'(_0x131845){input(_0x131845);},async 'dryRun'(_0x10e9b0){const _0xf6aa1=a48_0x146977;return dryRun(_0xf6aa1(0x105),_0xf6aa1(0x10c))[_0xf6aa1(0x101)]({'roleType':_0xf6aa1(0x10a),...input(_0x10e9b0)})[_0xf6aa1(0xf9)](_0xf6aa1(0xf7))[_0xf6aa1(0xf4)]();},async 'execute'(_0x4a85d3){const _0x203313=a48_0x146977,_0x123c00=await createRuntimeAppRole(input(_0x4a85d3));return{'ok':!![],'data':runtimeRoleWriteResult(_0x203313(0xfb),{'roleId':_0x123c00['id']},null,projectRuntimeRole(_0x123c00),{'method':_0x203313(0x105),'path':'/client/permit/role/create'})};}};
@@ -1 +1 @@
1
- const a49_0x5539cf=a49_0x2b3e;(function(_0x3261e9,_0xc20174){const _0x12b401=a49_0x2b3e,_0x5ab33a=_0x3261e9();while(!![]){try{const _0x468640=parseInt(_0x12b401(0x1f1))/0x1*(parseInt(_0x12b401(0x1f3))/0x2)+-parseInt(_0x12b401(0x1f7))/0x3*(parseInt(_0x12b401(0x1f5))/0x4)+parseInt(_0x12b401(0x1e7))/0x5*(-parseInt(_0x12b401(0x1e3))/0x6)+parseInt(_0x12b401(0x1e6))/0x7+-parseInt(_0x12b401(0x1ed))/0x8+-parseInt(_0x12b401(0x1eb))/0x9+parseInt(_0x12b401(0x1e4))/0xa;if(_0x468640===_0xc20174)break;else _0x5ab33a['push'](_0x5ab33a['shift']());}catch(_0x320f73){_0x5ab33a['push'](_0x5ab33a['shift']());}}}(a49_0x4b87,0x72842));function a49_0x4b87(){const _0x438bd8=['/client/permit/role/delete','164414NXBoeV','Preview:\x20delete\x20a\x20runtime\x20CUSTOM\x20role','8GOMpoE','role','764406hCKWcU','78LDtcKZ','19458650NJWNJW','appCode','428750jtNqcX','57370HNIOWO','body','delete','description','6875910tuLVAJ','build','4868344mQDWwU','删除当前运行应用中的自定义角色;该角色的成员关系和权限配置可能随之失效。','Delete\x20a\x20runtime\x20CUSTOM\x20role','high-risk-write','6dUWaNa'];a49_0x4b87=function(){return _0x438bd8;};return a49_0x4b87();}import{deleteRuntimeAppRole}from'../../core/api-client.js';import{dryRun}from'../../framework/dryrun.js';import{assertCustomRuntimeRole,getRuntimeRoleById,projectRuntimeRole,ROLE_ID_FLAG,runtimeRoleWriteResult}from'../../commands/role/shared.js';async function prepare(_0x582a74){const _0x570d8f=a49_0x2b3e,_0x31c749=await getRuntimeRoleById(_0x582a74[_0x570d8f(0x1e5)],_0x582a74['num']('id'));return assertCustomRuntimeRole(_0x31c749,_0x570d8f(0x1e9)),_0x31c749;}function a49_0x2b3e(_0x2f6efb,_0xd76b49){_0x2f6efb=_0x2f6efb-0x1e3;const _0x4b87a4=a49_0x4b87();let _0x2b3e1e=_0x4b87a4[_0x2f6efb];return _0x2b3e1e;}export const roleDelete={'service':a49_0x5539cf(0x1f6),'command':a49_0x5539cf(0x1e9),'description':a49_0x5539cf(0x1ef),'risk':a49_0x5539cf(0x1f0),'confirmationDescription':a49_0x5539cf(0x1ee),'flags':[ROLE_ID_FLAG],async 'dryRun'(_0x29a585){const _0x2ae034=a49_0x5539cf,_0x4a730a=await prepare(_0x29a585);return dryRun('POST','/client/permit/role/delete')[_0x2ae034(0x1e8)]({'id':_0x4a730a['id']})[_0x2ae034(0x1ea)](_0x2ae034(0x1f4))[_0x2ae034(0x1ec)]();},async 'execute'(_0x2a4090){const _0x2dabd5=a49_0x5539cf,_0xcfa8b6=await prepare(_0x2a4090);return await deleteRuntimeAppRole(_0xcfa8b6['id']),{'ok':!![],'data':runtimeRoleWriteResult(_0x2dabd5(0x1e9),{'roleId':_0xcfa8b6['id']},projectRuntimeRole(_0xcfa8b6),null,{'method':'POST','path':_0x2dabd5(0x1f2)})};}};
1
+ const a49_0x56591a=a49_0x2d19;(function(_0x175f75,_0x5667c9){const _0x4e4a81=a49_0x2d19,_0xeba193=_0x175f75();while(!![]){try{const _0x5070ab=parseInt(_0x4e4a81(0x1ce))/0x1+parseInt(_0x4e4a81(0x1c8))/0x2+-parseInt(_0x4e4a81(0x1bc))/0x3+-parseInt(_0x4e4a81(0x1bf))/0x4*(-parseInt(_0x4e4a81(0x1c1))/0x5)+parseInt(_0x4e4a81(0x1bb))/0x6*(parseInt(_0x4e4a81(0x1c5))/0x7)+-parseInt(_0x4e4a81(0x1cc))/0x8*(-parseInt(_0x4e4a81(0x1c6))/0x9)+-parseInt(_0x4e4a81(0x1c4))/0xa;if(_0x5070ab===_0x5667c9)break;else _0xeba193['push'](_0xeba193['shift']());}catch(_0x1ef97b){_0xeba193['push'](_0xeba193['shift']());}}}(a49_0x7366,0xdbd1d));function a49_0x2d19(_0x1681b6,_0x5cecfa){_0x1681b6=_0x1681b6-0x1bb;const _0x736629=a49_0x7366();let _0x2d19a9=_0x736629[_0x1681b6];return _0x2d19a9;}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';function a49_0x7366(){const _0x350ce3=['402YDCRzq','1151763ZMbiaS','delete','body','652072ZGVRld','Preview:\x20delete\x20a\x20runtime\x20CUSTOM\x20role','10WhErwd','appCode','high-risk-write','27838180DcWbWm','130249JJeMcj','7688007lbbEzx','删除当前运行应用中的自定义角色;该角色的成员关系和权限配置可能随之失效。','1736286qmMgrR','num','description','role','8xbmvpy','/client/permit/role/delete','773049HPMOYa','POST'];a49_0x7366=function(){return _0x350ce3;};return a49_0x7366();}async function prepare(_0x26cf98){const _0x4b4f67=a49_0x2d19,_0x580c40=await getRuntimeRoleById(_0x26cf98[_0x4b4f67(0x1c2)],_0x26cf98[_0x4b4f67(0x1c9)]('id'));return assertCustomRuntimeRole(_0x580c40,_0x4b4f67(0x1bd)),_0x580c40;}export const roleDelete={'service':a49_0x56591a(0x1cb),'command':a49_0x56591a(0x1bd),'description':'Delete\x20a\x20runtime\x20CUSTOM\x20role','risk':a49_0x56591a(0x1c3),'confirmationDescription':a49_0x56591a(0x1c7),'flags':[ROLE_ID_FLAG],async 'dryRun'(_0x369708){const _0x297970=a49_0x56591a,_0x17b50b=await prepare(_0x369708);return dryRun('POST',_0x297970(0x1cd))[_0x297970(0x1be)]({'id':_0x17b50b['id']})[_0x297970(0x1ca)](_0x297970(0x1c0))['build']();},async 'execute'(_0x2f5463){const _0x50ba20=a49_0x56591a,_0x36062d=await prepare(_0x2f5463);return await deleteRuntimeAppRole(_0x36062d['id']),{'ok':!![],'data':runtimeRoleWriteResult(_0x50ba20(0x1bd),{'roleId':_0x36062d['id']},projectRuntimeRole(_0x36062d),null,{'method':_0x50ba20(0x1cf),'path':_0x50ba20(0x1cd)})};}};
@@ -1 +1 @@
1
- const a50_0x542e5b=a50_0x3337;function a50_0x3337(_0x3e5bb0,_0x331641){_0x3e5bb0=_0x3e5bb0-0x124;const _0x9991f2=a50_0x9991();let _0x3337bf=_0x9991f2[_0x3e5bb0];return _0x3337bf;}(function(_0x106a6e,_0x4eb4fd){const _0x4472ba=a50_0x3337,_0x5818fd=_0x106a6e();while(!![]){try{const _0x283dfd=parseInt(_0x4472ba(0x129))/0x1+parseInt(_0x4472ba(0x12b))/0x2+-parseInt(_0x4472ba(0x12d))/0x3*(parseInt(_0x4472ba(0x12e))/0x4)+parseInt(_0x4472ba(0x126))/0x5+-parseInt(_0x4472ba(0x12f))/0x6*(parseInt(_0x4472ba(0x12c))/0x7)+-parseInt(_0x4472ba(0x125))/0x8+parseInt(_0x4472ba(0x12a))/0x9;if(_0x283dfd===_0x4eb4fd)break;else _0x5818fd['push'](_0x5818fd['shift']());}catch(_0x46fb00){_0x5818fd['push'](_0x5818fd['shift']());}}}(a50_0x9991,0xbf932));import{getRuntimeRoleById,projectRuntimeRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';export const roleDetail={'service':'role','command':a50_0x542e5b(0x128),'description':'Show\x20one\x20runtime\x20role\x20by\x20ID','risk':a50_0x542e5b(0x131),'flags':[ROLE_ID_FLAG],async 'execute'(_0x328ed0){const _0x5b9012=a50_0x542e5b,_0x51ccfc=await getRuntimeRoleById(_0x328ed0[_0x5b9012(0x130)],_0x328ed0[_0x5b9012(0x124)]('id'));return{'ok':!![],'data':{'scope':_0x5b9012(0x127),'role':projectRuntimeRole(_0x51ccfc)}};}};function a50_0x9991(){const _0x512030=['7497216YSvEGn','2540875PmXYsU','runtime','detail','1277564WAhrVX','12288762VrWdjX','207030njYlQj','3438694rkQEXr','96uYFbqu','7388ZBDhAA','18lzLMZP','appCode','read','num'];a50_0x9991=function(){return _0x512030;};return a50_0x9991();}
1
+ const a50_0xcefe7f=a50_0x2442;function a50_0x1ead(){const _0x5a9480=['3308535DLaKYI','1510MPFdzn','read','85TZpFgD','62018tNWDuY','role','12093352ArAbjj','Show\x20one\x20runtime\x20role\x20by\x20ID','1455642qUTpXR','runtime','224KpmCEi','14JfWWCP','appCode','284XwgIFY','3404CzVzrC','num','11794752yokDTE'];a50_0x1ead=function(){return _0x5a9480;};return a50_0x1ead();}(function(_0x463f49,_0x1d31f5){const _0x4349cd=a50_0x2442,_0x3c5453=_0x463f49();while(!![]){try{const _0xc2ce7d=parseInt(_0x4349cd(0xfb))/0x1*(parseInt(_0x4349cd(0xff))/0x2)+parseInt(_0x4349cd(0x102))/0x3+parseInt(_0x4349cd(0xfe))/0x4*(-parseInt(_0x4349cd(0x105))/0x5)+-parseInt(_0x4349cd(0xf9))/0x6*(-parseInt(_0x4349cd(0xfc))/0x7)+-parseInt(_0x4349cd(0xf7))/0x8+parseInt(_0x4349cd(0x101))/0x9+parseInt(_0x4349cd(0x103))/0xa*(-parseInt(_0x4349cd(0xf5))/0xb);if(_0xc2ce7d===_0x1d31f5)break;else _0x3c5453['push'](_0x3c5453['shift']());}catch(_0x11da23){_0x3c5453['push'](_0x3c5453['shift']());}}}(a50_0x1ead,0xdf8a5));function a50_0x2442(_0x21b1df,_0x15d55f){_0x21b1df=_0x21b1df-0xf5;const _0x1ead5d=a50_0x1ead();let _0x24421a=_0x1ead5d[_0x21b1df];return _0x24421a;}import{getRuntimeRoleById,projectRuntimeRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';export const roleDetail={'service':a50_0xcefe7f(0xf6),'command':'detail','description':a50_0xcefe7f(0xf8),'risk':a50_0xcefe7f(0x104),'flags':[ROLE_ID_FLAG],async 'execute'(_0x234c34){const _0x4e506a=a50_0xcefe7f,_0x4efed2=await getRuntimeRoleById(_0x234c34[_0x4e506a(0xfd)],_0x234c34[_0x4e506a(0x100)]('id'));return{'ok':!![],'data':{'scope':_0x4e506a(0xfa),'role':projectRuntimeRole(_0x4efed2)}};}};
@@ -1 +1 @@
1
- (function(_0x50657e,_0x366c26){const _0x490d81=a51_0x3abc,_0x25e399=_0x50657e();while(!![]){try{const _0x1f4183=parseInt(_0x490d81(0x6f))/0x1+parseInt(_0x490d81(0x6e))/0x2+-parseInt(_0x490d81(0x71))/0x3+-parseInt(_0x490d81(0x73))/0x4+-parseInt(_0x490d81(0x6d))/0x5+parseInt(_0x490d81(0x6b))/0x6*(parseInt(_0x490d81(0x72))/0x7)+parseInt(_0x490d81(0x6c))/0x8*(parseInt(_0x490d81(0x70))/0x9);if(_0x1f4183===_0x366c26)break;else _0x25e399['push'](_0x25e399['shift']());}catch(_0x5707cd){_0x25e399['push'](_0x25e399['shift']());}}}(a51_0x3a41,0xa75af));import{roleList}from'../../commands/role/list.js';function a51_0x3a41(){const _0x2a6b57=['803803qvuFjP','3203164pyOepo','6bsyLso','760DaFeqZ','5218455MCoxWb','1105244AqTEcV','509611XwVGRq','244143PUzgPx','3672474VumipR'];a51_0x3a41=function(){return _0x2a6b57;};return a51_0x3a41();}import{roleDetail}from'../../commands/role/detail.js';function a51_0x3abc(_0x19b740,_0x18f59b){_0x19b740=_0x19b740-0x6b;const _0x3a41b3=a51_0x3a41();let _0x3abccb=_0x3a41b3[_0x19b740];return _0x3abccb;}import{roleCreate}from'../../commands/role/create.js';import{roleUpdate}from'../../commands/role/update.js';import{roleDelete}from'../../commands/role/delete.js';import{roleUserAdd}from'../../commands/role/user-add.js';import{roleUserRemove}from'../../commands/role/user-remove.js';export const roleDefinitions=[roleList,roleDetail,roleCreate,roleUpdate,roleDelete,roleUserAdd,roleUserRemove];
1
+ (function(_0xbdcdf1,_0x2106f4){const _0x5516b3=a51_0x2e9b,_0x3baf96=_0xbdcdf1();while(!![]){try{const _0x367b86=-parseInt(_0x5516b3(0xff))/0x1*(parseInt(_0x5516b3(0x101))/0x2)+parseInt(_0x5516b3(0x106))/0x3*(parseInt(_0x5516b3(0x107))/0x4)+-parseInt(_0x5516b3(0x103))/0x5+parseInt(_0x5516b3(0x105))/0x6*(-parseInt(_0x5516b3(0xfd))/0x7)+-parseInt(_0x5516b3(0x100))/0x8+-parseInt(_0x5516b3(0xfe))/0x9*(-parseInt(_0x5516b3(0x104))/0xa)+-parseInt(_0x5516b3(0x102))/0xb;if(_0x367b86===_0x2106f4)break;else _0x3baf96['push'](_0x3baf96['shift']());}catch(_0x119f8f){_0x3baf96['push'](_0x3baf96['shift']());}}}(a51_0x5ed0,0x45e81));import{roleList}from'../../commands/role/list.js';import{roleDetail}from'../../commands/role/detail.js';import{roleCreate}from'../../commands/role/create.js';function a51_0x2e9b(_0x29041e,_0x28b29b){_0x29041e=_0x29041e-0xfd;const _0x5ed0d2=a51_0x5ed0();let _0x2e9bc8=_0x5ed0d2[_0x29041e];return _0x2e9bc8;}import{roleUpdate}from'../../commands/role/update.js';import{roleDelete}from'../../commands/role/delete.js';function a51_0x5ed0(){const _0xa4241d=['4lrEVeY','7861pDmMLu','1665Ciwylr','6287gfMrOj','3300272JTjjZo','6IBJNAp','359887CKknAd','433970XxImRk','18230QNrzeA','150yFJvhc','1584189oWESsg'];a51_0x5ed0=function(){return _0xa4241d;};return a51_0x5ed0();}import{roleUserAdd}from'../../commands/role/user-add.js';import{roleUserRemove}from'../../commands/role/user-remove.js';export const roleDefinitions=[roleList,roleDetail,roleCreate,roleUpdate,roleDelete,roleUserAdd,roleUserRemove];
@@ -1 +1 @@
1
- const a52_0x442876=a52_0x1e1d;function a52_0x1b3c(){const _0x1df24e=['--page\x20must\x20be\x20a\x20positive\x20integer.','number','11000yOGWAL','page','slice','Invalid\x20runtime\x20role\x20type:\x20','--pagesize\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.','trim','215BxHqvw','13209130SqGxSy','runtime','string','pagesize','Page\x20number','read','Fuzzy\x20role-name\x20filter','4SvvNvz','61722lNNWAI','validation','num','appCode','name','List\x20runtime\x20roles\x20for\x20the\x20current\x20app','includes','750081PBDtAT','str','items','24stBniC','length','Page\x20size\x20from\x201\x20to\x20100','3375nVMMHr','isSafeInteger','3397232JzkyUl','paging','role','toUpperCase','map','Runtime\x20role\x20type','702683fhcosH','854959qOARtp','type'];a52_0x1b3c=function(){return _0x1df24e;};return a52_0x1b3c();}function a52_0x1e1d(_0x9b0a59,_0x4af2e0){_0x9b0a59=_0x9b0a59-0x138;const _0x1b3c3d=a52_0x1b3c();let _0x1e1db8=_0x1b3c3d[_0x9b0a59];return _0x1e1db8;}(function(_0x4cd0d1,_0x4ddabf){const _0x2ccaf5=a52_0x1e1d,_0x3a5615=_0x4cd0d1();while(!![]){try{const _0x2ea2b0=parseInt(_0x2ccaf5(0x138))/0x1+-parseInt(_0x2ccaf5(0x14b))/0x2*(-parseInt(_0x2ccaf5(0x153))/0x3)+parseInt(_0x2ccaf5(0x15b))/0x4+-parseInt(_0x2ccaf5(0x143))/0x5*(parseInt(_0x2ccaf5(0x14c))/0x6)+parseInt(_0x2ccaf5(0x139))/0x7*(-parseInt(_0x2ccaf5(0x156))/0x8)+parseInt(_0x2ccaf5(0x159))/0x9*(parseInt(_0x2ccaf5(0x13d))/0xa)+-parseInt(_0x2ccaf5(0x144))/0xb;if(_0x2ea2b0===_0x4ddabf)break;else _0x3a5615['push'](_0x3a5615['shift']());}catch(_0x3289a1){_0x3a5615['push'](_0x3a5615['shift']());}}}(a52_0x1b3c,0x6f133));import{listRuntimeAppRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{listAllRuntimeRoles,projectRuntimeRole,RUNTIME_ROLE_TYPES}from'../../commands/role/shared.js';export const roleList={'service':a52_0x442876(0x15d),'command':'list','description':a52_0x442876(0x151),'risk':a52_0x442876(0x149),'flags':[{'name':a52_0x442876(0x13a),'type':a52_0x442876(0x146),'enum':RUNTIME_ROLE_TYPES,'description':a52_0x442876(0x160)},{'name':a52_0x442876(0x150),'type':a52_0x442876(0x146),'description':a52_0x442876(0x14a)},{'name':'page','type':'number','default':0x1,'description':a52_0x442876(0x148)},{'name':'pagesize','type':a52_0x442876(0x13c),'default':0x64,'description':a52_0x442876(0x158)}],async 'validate'(_0x904689){const _0xe37785=a52_0x442876,_0x49b152=_0x904689['str'](_0xe37785(0x13a))[_0xe37785(0x15e)]();if(_0x49b152&&!RUNTIME_ROLE_TYPES[_0xe37785(0x152)](_0x49b152))throw CliErrors[_0xe37785(0x14d)](_0xe37785(0x140)+_0x49b152+'.');const _0x2b3578=_0x904689[_0xe37785(0x14e)](_0xe37785(0x13e),0x1),_0x18b5ad=_0x904689[_0xe37785(0x14e)]('pagesize',0x64);if(!Number['isSafeInteger'](_0x2b3578)||_0x2b3578<0x1)throw CliErrors[_0xe37785(0x14d)](_0xe37785(0x13b));if(!Number[_0xe37785(0x15a)](_0x18b5ad)||_0x18b5ad<0x1||_0x18b5ad>0x64)throw CliErrors[_0xe37785(0x14d)](_0xe37785(0x141));},async 'execute'(_0x3fe5be){const _0xd14371=a52_0x442876,_0x114236=_0x3fe5be[_0xd14371(0x154)](_0xd14371(0x13a))[_0xd14371(0x15e)](),_0x1473c7=_0x3fe5be[_0xd14371(0x154)](_0xd14371(0x150))[_0xd14371(0x142)](),_0x406124=_0x3fe5be[_0xd14371(0x14e)]('page',0x1),_0x191cfd=_0x3fe5be['num'](_0xd14371(0x147),0x64);if(_0x114236){const _0x5b724f=(await listAllRuntimeRoles(_0x3fe5be[_0xd14371(0x14f)],{..._0x1473c7?{'roleName':_0x1473c7}:{}}))['filter'](_0x4f3498=>_0x4f3498['roleType']===_0x114236),_0x5d4adc=(_0x406124-0x1)*_0x191cfd;return{'ok':!![],'data':{'scope':_0xd14371(0x145),'roles':_0x5b724f[_0xd14371(0x13f)](_0x5d4adc,_0x5d4adc+_0x191cfd)[_0xd14371(0x15f)](projectRuntimeRole),'paging':{'currentPage':_0x406124,'pageSize':_0x191cfd,'totalCount':_0x5b724f[_0xd14371(0x157)]}}};}const _0x355e39=await listRuntimeAppRoles(_0x3fe5be[_0xd14371(0x14f)],{..._0x1473c7?{'roleName':_0x1473c7}:{},'currentPage':_0x406124,'pageSize':_0x191cfd});return{'ok':!![],'data':{'scope':_0xd14371(0x145),'roles':_0x355e39[_0xd14371(0x155)][_0xd14371(0x15f)](projectRuntimeRole),'paging':_0x355e39[_0xd14371(0x15c)]}};}};
1
+ const a52_0x515c44=a52_0xba48;function a52_0xba48(_0x40bc20,_0x4a0503){_0x40bc20=_0x40bc20-0x196;const _0x2bfefc=a52_0x2bfe();let _0xba48df=_0x2bfefc[_0x40bc20];return _0xba48df;}(function(_0x5cb927,_0x486d4a){const _0xc1a603=a52_0xba48,_0x52f9c7=_0x5cb927();while(!![]){try{const _0x117044=-parseInt(_0xc1a603(0x196))/0x1*(parseInt(_0xc1a603(0x19c))/0x2)+-parseInt(_0xc1a603(0x1a8))/0x3+parseInt(_0xc1a603(0x1b0))/0x4*(-parseInt(_0xc1a603(0x1b6))/0x5)+-parseInt(_0xc1a603(0x1a1))/0x6+parseInt(_0xc1a603(0x1a2))/0x7*(parseInt(_0xc1a603(0x19e))/0x8)+parseInt(_0xc1a603(0x1ae))/0x9+parseInt(_0xc1a603(0x1af))/0xa;if(_0x117044===_0x486d4a)break;else _0x52f9c7['push'](_0x52f9c7['shift']());}catch(_0xa78410){_0x52f9c7['push'](_0x52f9c7['shift']());}}}(a52_0x2bfe,0x23ac3));import{listRuntimeAppRoles}from'../../core/api-client.js';function a52_0x2bfe(){const _0x2b6979=['roleType','20874IFWzmJ','includes','number','str','List\x20runtime\x20roles\x20for\x20the\x20current\x20app','Page\x20size\x20from\x201\x20to\x20100','344052xeGPbH','4059330qZDUKW','8FGTsUR','items','name','appCode','length','trim','235295hAFuIR','filter','map','role','2LIXSkl','string','Runtime\x20role\x20type','paging','type','page','91282pNTIvZ','validation','224WHaZeS','num','isSafeInteger','1513440WcmJbi','36638VRoZLj','runtime','pagesize','toUpperCase','Page\x20number'];a52_0x2bfe=function(){return _0x2b6979;};return a52_0x2bfe();}import{CliErrors}from'../../errors.js';import{listAllRuntimeRoles,projectRuntimeRole,RUNTIME_ROLE_TYPES}from'../../commands/role/shared.js';export const roleList={'service':a52_0x515c44(0x1b9),'command':'list','description':a52_0x515c44(0x1ac),'risk':'read','flags':[{'name':a52_0x515c44(0x19a),'type':'string','enum':RUNTIME_ROLE_TYPES,'description':a52_0x515c44(0x198)},{'name':a52_0x515c44(0x1b2),'type':a52_0x515c44(0x197),'description':'Fuzzy\x20role-name\x20filter'},{'name':a52_0x515c44(0x19b),'type':a52_0x515c44(0x1aa),'default':0x1,'description':a52_0x515c44(0x1a6)},{'name':'pagesize','type':'number','default':0x64,'description':a52_0x515c44(0x1ad)}],async 'validate'(_0x26b9c0){const _0x5d9ede=a52_0x515c44,_0x5cf11a=_0x26b9c0[_0x5d9ede(0x1ab)](_0x5d9ede(0x19a))['toUpperCase']();if(_0x5cf11a&&!RUNTIME_ROLE_TYPES[_0x5d9ede(0x1a9)](_0x5cf11a))throw CliErrors[_0x5d9ede(0x19d)]('Invalid\x20runtime\x20role\x20type:\x20'+_0x5cf11a+'.');const _0x48fdf0=_0x26b9c0[_0x5d9ede(0x19f)](_0x5d9ede(0x19b),0x1),_0x52ca6c=_0x26b9c0['num']('pagesize',0x64);if(!Number[_0x5d9ede(0x1a0)](_0x48fdf0)||_0x48fdf0<0x1)throw CliErrors[_0x5d9ede(0x19d)]('--page\x20must\x20be\x20a\x20positive\x20integer.');if(!Number[_0x5d9ede(0x1a0)](_0x52ca6c)||_0x52ca6c<0x1||_0x52ca6c>0x64)throw CliErrors['validation']('--pagesize\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.');},async 'execute'(_0x102363){const _0x3e8a82=a52_0x515c44,_0x803418=_0x102363['str'](_0x3e8a82(0x19a))[_0x3e8a82(0x1a5)](),_0x8ff7a2=_0x102363['str'](_0x3e8a82(0x1b2))[_0x3e8a82(0x1b5)](),_0x2265dc=_0x102363[_0x3e8a82(0x19f)](_0x3e8a82(0x19b),0x1),_0x4027d7=_0x102363[_0x3e8a82(0x19f)](_0x3e8a82(0x1a4),0x64);if(_0x803418){const _0x43d57f=(await listAllRuntimeRoles(_0x102363[_0x3e8a82(0x1b3)],{..._0x8ff7a2?{'roleName':_0x8ff7a2}:{}}))[_0x3e8a82(0x1b7)](_0x5e3d9b=>_0x5e3d9b[_0x3e8a82(0x1a7)]===_0x803418),_0x504786=(_0x2265dc-0x1)*_0x4027d7;return{'ok':!![],'data':{'scope':_0x3e8a82(0x1a3),'roles':_0x43d57f['slice'](_0x504786,_0x504786+_0x4027d7)[_0x3e8a82(0x1b8)](projectRuntimeRole),'paging':{'currentPage':_0x2265dc,'pageSize':_0x4027d7,'totalCount':_0x43d57f[_0x3e8a82(0x1b4)]}}};}const _0x36e576=await listRuntimeAppRoles(_0x102363['appCode'],{..._0x8ff7a2?{'roleName':_0x8ff7a2}:{},'currentPage':_0x2265dc,'pageSize':_0x4027d7});return{'ok':!![],'data':{'scope':'runtime','roles':_0x36e576[_0x3e8a82(0x1b1)][_0x3e8a82(0x1b8)](projectRuntimeRole),'paging':_0x36e576[_0x3e8a82(0x199)]}};}};
@@ -1 +1 @@
1
- const a53_0x4f3d18=a53_0x4195;(function(_0x15b4df,_0x5c534f){const _0x81511e=a53_0x4195,_0x1922d5=_0x15b4df();while(!![]){try{const _0x1ad1ee=-parseInt(_0x81511e(0x19b))/0x1*(-parseInt(_0x81511e(0x18a))/0x2)+-parseInt(_0x81511e(0x1b1))/0x3*(parseInt(_0x81511e(0x183))/0x4)+-parseInt(_0x81511e(0x187))/0x5*(parseInt(_0x81511e(0x19f))/0x6)+-parseInt(_0x81511e(0x1a6))/0x7+-parseInt(_0x81511e(0x1a5))/0x8*(parseInt(_0x81511e(0x1af))/0x9)+-parseInt(_0x81511e(0x1a8))/0xa*(-parseInt(_0x81511e(0x1b0))/0xb)+-parseInt(_0x81511e(0x1ad))/0xc*(-parseInt(_0x81511e(0x1c6))/0xd);if(_0x1ad1ee===_0x5c534f)break;else _0x1922d5['push'](_0x1922d5['shift']());}catch(_0x15aba5){_0x1922d5['push'](_0x1922d5['shift']());}}}(a53_0x3dc5,0xad0e3));import{listRuntimeAppUsers,listRuntimeAppRoles,listRuntimeRoleUsers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const RUNTIME_ROLE_TYPES=[a53_0x4f3d18(0x194),a53_0x4f3d18(0x1c4),a53_0x4f3d18(0x1ab),a53_0x4f3d18(0x181)];const BUILTIN_ROLE_TYPES=[a53_0x4f3d18(0x194),a53_0x4f3d18(0x1c4),a53_0x4f3d18(0x1ab)];export const ROLE_ID_FLAG={'name':'id','type':'number','required':!![],'description':a53_0x4f3d18(0x18e)};export const ROLE_REF_FLAG={'name':'role','type':a53_0x4f3d18(0x189),'required':!![],'description':a53_0x4f3d18(0x1b3)};export const USER_ID_FLAG={'name':a53_0x4f3d18(0x1c8),'type':a53_0x4f3d18(0x189),'required':!![],'description':a53_0x4f3d18(0x19c)};export const EXPECT_USER_COUNT_FLAG={'name':a53_0x4f3d18(0x1ac),'type':a53_0x4f3d18(0x18f),'description':'Reject\x20when\x20the\x20target\x20role\x20member\x20count\x20has\x20changed'};function a53_0x3dc5(){const _0x44c6ce=['282VyylBK','Pass\x20one\x20role\x20ID:\x20','test','remark','Transfer\x20or\x20manage\x20application\x20ownership\x20through\x20the\x20dedicated\x20application\x20workflow.','\x20built-in\x20runtime\x20role\x20','8VmjnwO','8744295QBiXoK','push','120UVtnvD','str','userList','OWNER','expect-user-count','23171676XuoVde','Runtime\x20role\x20name\x20\x22','2337705DVAndm','806399jQrnoe','1456491lVCVzk','\x22\x20is\x20ambiguous.','Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name','userId','runtime','user-add','Role\x20ID\x20must\x20be\x20a\x20positive\x20integer.','userName','roleType','paging','includes','length','roleName','Pass\x20--user\x20<userId>;\x20name\x20and\x20account\x20lookup\x20are\x20not\x20available\x20in\x20runtime\x20scope.','Run\x20`lovrabet\x20role\x20list`\x20or\x20pass\x20--role\x20<id>.','Use\x20a\x20numeric\x20userId\x20returned\x20by\x20the\x20current\x20application\x27s\x20personnel\x20list.','isSafeInteger','User\x20','\x20is\x20already\x20in\x20runtime\x20role\x20','USER','items','13eBKkby','validation','user','role','Run\x20`lovrabet\x20role\x20list`\x20and\x20use\x20a\x20role\x20from\x20the\x20current\x20app.','CUSTOM','Runtime\x20role\x20id\x20','8YTyIOh','applyUserList','Missing\x20runtime\x20role\x20reference.','\x20was\x20not\x20found\x20in\x20app\x20','35185UGIbtv','map','string','2518CiwSmu','\x22\x20was\x20not\x20found\x20in\x20app\x20','Pass\x20--role\x20<id|name>.','\x20is\x20missing\x20from\x20the\x20grouped\x20member\x20snapshot.','Runtime\x20role\x20ID\x20returned\x20by\x20role\x20list','number','Runtime\x20user\x20','Runtime\x20role\x20','trim',',\x20found\x20','ADMIN','userCount','filter','Reload\x20the\x20role\x20list\x20and\x20retry\x20after\x20the\x20server\x20state\x20is\x20consistent.','Runtime\x20role\x20membership\x20requires\x20a\x20numeric\x20userId.','Only\x20CUSTOM\x20runtime\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','permitCount','563ZlEBVx','Runtime\x20numeric\x20userId','\x20is\x20not\x20in\x20runtime\x20role\x20','appCode'];a53_0x3dc5=function(){return _0x44c6ce;};return a53_0x3dc5();}export function isBuiltinRuntimeRole(_0x1359ea){return BUILTIN_ROLE_TYPES['includes'](_0x1359ea);}export function assertCustomRuntimeRole(_0x25a1a5,_0x33ef9f){const _0x5f4c9e=a53_0x4f3d18;if(_0x25a1a5['roleType']!==_0x5f4c9e(0x181))throw CliErrors['validation']('Cannot\x20'+_0x33ef9f+_0x5f4c9e(0x1a4)+_0x25a1a5[_0x5f4c9e(0x1bd)]+'\x20('+_0x25a1a5[_0x5f4c9e(0x1b9)]+').',_0x5f4c9e(0x199));}export function projectRuntimeRole(_0x472de7){const _0x5ecf7e=a53_0x4f3d18;return{'id':_0x472de7['id'],'roleName':_0x472de7[_0x5ecf7e(0x1bd)],'roleType':_0x472de7[_0x5ecf7e(0x1b9)],'remark':_0x472de7[_0x5ecf7e(0x1a2)],'userCount':_0x472de7[_0x5ecf7e(0x195)]??0x0,'permitCount':_0x472de7[_0x5ecf7e(0x19a)]??0x0,'builtin':isBuiltinRuntimeRole(_0x472de7[_0x5ecf7e(0x1b9)])};}export async function getRuntimeRoleById(_0x531448,_0x26404f){const _0x3f94b8=a53_0x4f3d18;if(!Number[_0x3f94b8(0x1c1)](_0x26404f)||_0x26404f<=0x0)throw CliErrors[_0x3f94b8(0x1c7)](_0x3f94b8(0x1b7));const _0x4f7458=(await listAllRuntimeRoles(_0x531448))['filter'](_0x5bc700=>_0x5bc700['id']===_0x26404f&&(!_0x5bc700[_0x3f94b8(0x19e)]||_0x5bc700[_0x3f94b8(0x19e)]===_0x531448));if(_0x4f7458['length']!==0x1)throw CliErrors[_0x3f94b8(0x1c7)](_0x3f94b8(0x182)+_0x26404f+_0x3f94b8(0x186)+_0x531448+'.',_0x3f94b8(0x1ca));return _0x4f7458[0x0];}export async function listAllRuntimeRoles(_0x53390e,_0x3df216={}){const _0x317a01=a53_0x4f3d18,_0x54aceb=0x64,_0x337a60=[];for(let _0x633da3=0x1;;_0x633da3+=0x1){const _0x555bd1=await listRuntimeAppRoles(_0x53390e,{..._0x3df216['roleName']?{'roleName':_0x3df216[_0x317a01(0x1bd)]}:{},'currentPage':_0x633da3,'pageSize':_0x54aceb});_0x337a60[_0x317a01(0x1a7)](..._0x555bd1['items']);if(_0x555bd1[_0x317a01(0x1c5)][_0x317a01(0x1bc)]<_0x54aceb||_0x555bd1[_0x317a01(0x1ba)]&&_0x337a60[_0x317a01(0x1bc)]>=_0x555bd1[_0x317a01(0x1ba)]['totalCount'])return _0x337a60;}}export async function resolveRuntimeRoleRef(_0x57ddff,_0x533fc4){const _0x4b6340=a53_0x4f3d18,_0x11a8c1=_0x533fc4[_0x4b6340(0x192)]();if(!_0x11a8c1)throw CliErrors[_0x4b6340(0x1c7)](_0x4b6340(0x185),_0x4b6340(0x18c));if(/^\d+$/[_0x4b6340(0x1a1)](_0x11a8c1))return getRuntimeRoleById(_0x57ddff,Number(_0x11a8c1));const _0x5a728e=(await listAllRuntimeRoles(_0x57ddff))[_0x4b6340(0x196)](_0x29c628=>_0x29c628[_0x4b6340(0x1bd)]===_0x11a8c1);if(_0x5a728e['length']===0x0)throw CliErrors[_0x4b6340(0x1c7)](_0x4b6340(0x1ae)+_0x11a8c1+_0x4b6340(0x18b)+_0x57ddff+'.',_0x4b6340(0x1bf));if(_0x5a728e[_0x4b6340(0x1bc)]>0x1)throw CliErrors[_0x4b6340(0x1c7)](_0x4b6340(0x1ae)+_0x11a8c1+_0x4b6340(0x1b2),_0x4b6340(0x1a0)+_0x5a728e[_0x4b6340(0x188)](_0x4ce321=>_0x4ce321['id'])['join'](',\x20')+'.');return _0x5a728e[0x0];}function a53_0x4195(_0x3a8a95,_0x34803a){_0x3a8a95=_0x3a8a95-0x181;const _0x3dc506=a53_0x3dc5();let _0x4195b2=_0x3dc506[_0x3a8a95];return _0x4195b2;}function parseRuntimeUserId(_0x1f9c68){const _0x32c843=a53_0x4f3d18,_0x35bc8b=_0x1f9c68[_0x32c843(0x192)]();if(!/^\d+$/['test'](_0x35bc8b))throw CliErrors[_0x32c843(0x1c7)](_0x32c843(0x198),_0x32c843(0x1be));const _0x260238=Number(_0x35bc8b);if(!Number[_0x32c843(0x1c1)](_0x260238)||_0x260238<=0x0)throw CliErrors[_0x32c843(0x1c7)]('Runtime\x20userId\x20must\x20be\x20a\x20positive\x20safe\x20integer.');return _0x260238;}export async function prepareRuntimeMemberMutation(_0x2568fe,_0xf19fb9){const _0x3a832c=a53_0x4f3d18,_0x527755=await resolveRuntimeRoleRef(_0x2568fe[_0x3a832c(0x19e)],_0x2568fe[_0x3a832c(0x1a9)](_0x3a832c(0x1c9)));if(_0x527755['roleType']===_0x3a832c(0x1ab))throw CliErrors[_0x3a832c(0x1c7)]('OWNER\x20runtime\x20role\x20membership\x20cannot\x20be\x20changed\x20with\x20this\x20command.',_0x3a832c(0x1a3));const _0x52f881=parseRuntimeUserId(_0x2568fe[_0x3a832c(0x1a9)]('user')),_0x256920=(await listRuntimeRoleUsers(_0x2568fe['appCode']))[_0x3a832c(0x188)](_0x160b8d=>({..._0x160b8d,'userList':[..._0x160b8d[_0x3a832c(0x1aa)]??[]],'applyUserList':[..._0x160b8d[_0x3a832c(0x184)]??[]]})),_0x5f141c=_0x256920['find'](_0x1f37d8=>_0x1f37d8['id']===_0x527755['id']);if(!_0x5f141c)throw CliErrors[_0x3a832c(0x1c7)](_0x3a832c(0x191)+_0x527755['id']+_0x3a832c(0x18d),_0x3a832c(0x197));const _0x3c650d=_0x5f141c['userList']['map'](_0x106995=>_0x106995['userId']),_0x3be42c=_0x2568fe['flag']('expect-user-count');if(_0x3be42c!==undefined&&_0x3be42c!==null&&_0x3be42c!==''){const _0x4d3553=_0x2568fe['num'](_0x3a832c(0x1ac));if(!Number[_0x3a832c(0x1c1)](_0x4d3553)||_0x4d3553<0x0)throw CliErrors[_0x3a832c(0x1c7)]('--expect-user-count\x20must\x20be\x20a\x20non-negative\x20integer.');if(_0x3c650d[_0x3a832c(0x1bc)]!==_0x4d3553)throw CliErrors[_0x3a832c(0x1c7)]('Runtime\x20role\x20member\x20count\x20changed:\x20expected\x20'+_0x4d3553+_0x3a832c(0x193)+_0x3c650d[_0x3a832c(0x1bc)]+'.','Read\x20the\x20current\x20members\x20and\x20retry\x20with\x20the\x20new\x20expected\x20count.');}const _0x4fe468=_0x3c650d[_0x3a832c(0x1bb)](_0x52f881),_0x1d310a=[];let _0x44e3ea=!![];if(_0xf19fb9===_0x3a832c(0x1b6)){const _0x5eb624=await listRuntimeAppUsers(_0x2568fe[_0x3a832c(0x19e)]),_0x59bdd8=_0x5eb624['filter'](_0x5a48f1=>Number(_0x5a48f1['code'])===_0x52f881);if(_0x59bdd8['length']!==0x1||!_0x59bdd8[0x0][_0x3a832c(0x1b8)]?.[_0x3a832c(0x192)]())throw CliErrors['validation'](_0x3a832c(0x190)+_0x52f881+'\x20was\x20not\x20found\x20in\x20app\x20'+_0x2568fe[_0x3a832c(0x19e)]+'.',_0x3a832c(0x1c0));_0x4fe468?(_0x44e3ea=![],_0x1d310a['push']('User\x20'+_0x52f881+_0x3a832c(0x1c3)+_0x527755['id']+'.')):_0x5f141c[_0x3a832c(0x1aa)][_0x3a832c(0x1a7)]({'userId':_0x52f881,'username':_0x59bdd8[0x0][_0x3a832c(0x1b8)]});}else!_0x4fe468?(_0x44e3ea=![],_0x1d310a['push'](_0x3a832c(0x1c2)+_0x52f881+_0x3a832c(0x19d)+_0x527755['id']+'.')):_0x5f141c[_0x3a832c(0x1aa)]=_0x5f141c[_0x3a832c(0x1aa)][_0x3a832c(0x196)](_0x2f8af4=>_0x2f8af4[_0x3a832c(0x1b4)]!==_0x52f881);return{'role':_0x527755,'userId':_0x52f881,'roleList':_0x256920,'before':{'userIds':_0x3c650d},'after':{'userIds':_0x5f141c[_0x3a832c(0x1aa)]['map'](_0x257a78=>_0x257a78[_0x3a832c(0x1b4)])},'shouldWrite':_0x44e3ea,'warnings':_0x1d310a};}export function runtimeRoleWriteResult(_0x388426,_0x56bde8,_0x52b6f5,_0x4f5ff2,_0x522ea1,_0x37f86f=[]){const _0x4a19ef=a53_0x4f3d18;return{'operation':_0x388426,'scope':_0x4a19ef(0x1b5),'selector':_0x56bde8,'before':_0x52b6f5,'after':_0x4f5ff2,'dryRun':![],'backend':_0x522ea1,'warnings':_0x37f86f};}
1
+ const a53_0x1790ff=a53_0x3498;(function(_0x2c2643,_0x46b5d8){const _0x538973=a53_0x3498,_0xa38d77=_0x2c2643();while(!![]){try{const _0xd34ff7=-parseInt(_0x538973(0xbe))/0x1*(-parseInt(_0x538973(0xe2))/0x2)+parseInt(_0x538973(0xce))/0x3+-parseInt(_0x538973(0xf7))/0x4*(parseInt(_0x538973(0xb9))/0x5)+parseInt(_0x538973(0xcd))/0x6*(-parseInt(_0x538973(0xd4))/0x7)+parseInt(_0x538973(0xc5))/0x8*(parseInt(_0x538973(0xb5))/0x9)+parseInt(_0x538973(0xd9))/0xa+parseInt(_0x538973(0xe6))/0xb;if(_0xd34ff7===_0x46b5d8)break;else _0xa38d77['push'](_0xa38d77['shift']());}catch(_0x36b095){_0xa38d77['push'](_0xa38d77['shift']());}}}(a53_0x350c,0x9cce4));function a53_0x3498(_0x59bc3e,_0x17654c){_0x59bc3e=_0x59bc3e-0xb5;const _0x350cfd=a53_0x350c();let _0x349812=_0x350cfd[_0x59bc3e];return _0x349812;}import{listRuntimeAppUsers,listRuntimeAppRoles,listRuntimeRoleUsers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const RUNTIME_ROLE_TYPES=[a53_0x1790ff(0xdf),a53_0x1790ff(0xcc),a53_0x1790ff(0xf1),'CUSTOM'];const BUILTIN_ROLE_TYPES=[a53_0x1790ff(0xdf),a53_0x1790ff(0xcc),a53_0x1790ff(0xf1)];export const ROLE_ID_FLAG={'name':'id','type':a53_0x1790ff(0xc9),'required':!![],'description':a53_0x1790ff(0xe7)};export const ROLE_REF_FLAG={'name':a53_0x1790ff(0xbd),'type':a53_0x1790ff(0xf3),'required':!![],'description':a53_0x1790ff(0xb7)};export const USER_ID_FLAG={'name':a53_0x1790ff(0xba),'type':a53_0x1790ff(0xf3),'required':!![],'description':a53_0x1790ff(0xdb)};export const EXPECT_USER_COUNT_FLAG={'name':a53_0x1790ff(0xf4),'type':'number','description':a53_0x1790ff(0xf6)};export function isBuiltinRuntimeRole(_0x378aa3){const _0x9b523d=a53_0x1790ff;return BUILTIN_ROLE_TYPES[_0x9b523d(0xb6)](_0x378aa3);}export function assertCustomRuntimeRole(_0x4ea0f3,_0x2b0cb7){const _0x273c5a=a53_0x1790ff;if(_0x4ea0f3[_0x273c5a(0xfd)]!==_0x273c5a(0xf2))throw CliErrors[_0x273c5a(0xc4)](_0x273c5a(0xc8)+_0x2b0cb7+'\x20built-in\x20runtime\x20role\x20'+_0x4ea0f3[_0x273c5a(0xf0)]+'\x20('+_0x4ea0f3['roleType']+').',_0x273c5a(0xff));}export function projectRuntimeRole(_0x2e5474){const _0x3389e0=a53_0x1790ff;return{'id':_0x2e5474['id'],'roleName':_0x2e5474['roleName'],'roleType':_0x2e5474[_0x3389e0(0xfd)],'remark':_0x2e5474[_0x3389e0(0xd7)],'userCount':_0x2e5474[_0x3389e0(0xfa)]??0x0,'permitCount':_0x2e5474[_0x3389e0(0xbf)]??0x0,'builtin':isBuiltinRuntimeRole(_0x2e5474[_0x3389e0(0xfd)])};}export async function getRuntimeRoleById(_0x4356a0,_0x15864b){const _0x402212=a53_0x1790ff;if(!Number[_0x402212(0xcb)](_0x15864b)||_0x15864b<=0x0)throw CliErrors[_0x402212(0xc4)](_0x402212(0xd8));const _0x865784=(await listAllRuntimeRoles(_0x4356a0))[_0x402212(0xd0)](_0x24965c=>_0x24965c['id']===_0x15864b&&(!_0x24965c['appCode']||_0x24965c['appCode']===_0x4356a0));if(_0x865784[_0x402212(0xe0)]!==0x1)throw CliErrors[_0x402212(0xc4)](_0x402212(0xde)+_0x15864b+'\x20was\x20not\x20found\x20in\x20app\x20'+_0x4356a0+'.',_0x402212(0x101));return _0x865784[0x0];}export async function listAllRuntimeRoles(_0x13c330,_0x1faa49={}){const _0x9a09d1=a53_0x1790ff,_0x592dee=0x64,_0x21925e=[];for(let _0x91dcef=0x1;;_0x91dcef+=0x1){const _0x463634=await listRuntimeAppRoles(_0x13c330,{..._0x1faa49['roleName']?{'roleName':_0x1faa49['roleName']}:{},'currentPage':_0x91dcef,'pageSize':_0x592dee});_0x21925e['push'](..._0x463634[_0x9a09d1(0xdd)]);if(_0x463634[_0x9a09d1(0xdd)][_0x9a09d1(0xe0)]<_0x592dee||_0x463634[_0x9a09d1(0xda)]&&_0x21925e['length']>=_0x463634[_0x9a09d1(0xda)][_0x9a09d1(0xe4)])return _0x21925e;}}export async function resolveRuntimeRoleRef(_0x4b799c,_0x5b1099){const _0x3aa611=a53_0x1790ff,_0x747973=_0x5b1099[_0x3aa611(0xf5)]();if(!_0x747973)throw CliErrors[_0x3aa611(0xc4)](_0x3aa611(0xd5),'Pass\x20--role\x20<id|name>.');if(/^\d+$/[_0x3aa611(0xfe)](_0x747973))return getRuntimeRoleById(_0x4b799c,Number(_0x747973));const _0x209b3e=(await listAllRuntimeRoles(_0x4b799c))[_0x3aa611(0xd0)](_0x1196b1=>_0x1196b1[_0x3aa611(0xf0)]===_0x747973);if(_0x209b3e[_0x3aa611(0xe0)]===0x0)throw CliErrors['validation']('Runtime\x20role\x20name\x20\x22'+_0x747973+_0x3aa611(0xd1)+_0x4b799c+'.',_0x3aa611(0xbc));if(_0x209b3e[_0x3aa611(0xe0)]>0x1)throw CliErrors[_0x3aa611(0xc4)](_0x3aa611(0xca)+_0x747973+_0x3aa611(0xbb),_0x3aa611(0xee)+_0x209b3e['map'](_0xfcd077=>_0xfcd077['id'])[_0x3aa611(0xc7)](',\x20')+'.');return _0x209b3e[0x0];}function a53_0x350c(){const _0x385672=['14496JxwgNn','userId','join','Cannot\x20','number','Runtime\x20role\x20name\x20\x22','isSafeInteger','USER','186LDLSVQ','3160980YITYyw','Runtime\x20user\x20','filter','\x22\x20was\x20not\x20found\x20in\x20app\x20','Read\x20the\x20current\x20members\x20and\x20retry\x20with\x20the\x20new\x20expected\x20count.','\x20was\x20not\x20found\x20in\x20app\x20','249781lksyxJ','Missing\x20runtime\x20role\x20reference.','Runtime\x20role\x20membership\x20requires\x20a\x20numeric\x20userId.','remark','Role\x20ID\x20must\x20be\x20a\x20positive\x20integer.','1867490dupZMT','paging','Runtime\x20numeric\x20userId','runtime','items','Runtime\x20role\x20id\x20','ADMIN','length','User\x20','2Bqpkju','flag','totalCount','map','1273206AMoJeK','Runtime\x20role\x20ID\x20returned\x20by\x20role\x20list','find',',\x20found\x20','Runtime\x20role\x20member\x20count\x20changed:\x20expected\x20','\x20is\x20missing\x20from\x20the\x20grouped\x20member\x20snapshot.','user-add','Reload\x20the\x20role\x20list\x20and\x20retry\x20after\x20the\x20server\x20state\x20is\x20consistent.','Pass\x20one\x20role\x20ID:\x20','userList','roleName','OWNER','CUSTOM','string','expect-user-count','trim','Reject\x20when\x20the\x20target\x20role\x20member\x20count\x20has\x20changed','875608CgFIji','Runtime\x20userId\x20must\x20be\x20a\x20positive\x20safe\x20integer.','code','userCount','\x20is\x20already\x20in\x20runtime\x20role\x20','Transfer\x20or\x20manage\x20application\x20ownership\x20through\x20the\x20dedicated\x20application\x20workflow.','roleType','test','Only\x20CUSTOM\x20runtime\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','str','Run\x20`lovrabet\x20role\x20list`\x20and\x20use\x20a\x20role\x20from\x20the\x20current\x20app.','495fvcyyc','includes','Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name','\x20is\x20not\x20in\x20runtime\x20role\x20','10XkYvoV','user','\x22\x20is\x20ambiguous.','Run\x20`lovrabet\x20role\x20list`\x20or\x20pass\x20--role\x20<id>.','role','730438FAOZHP','permitCount','--expect-user-count\x20must\x20be\x20a\x20non-negative\x20integer.','appCode','userName','push','validation'];a53_0x350c=function(){return _0x385672;};return a53_0x350c();}function parseRuntimeUserId(_0x1935ea){const _0x539e6b=a53_0x1790ff,_0x4407a3=_0x1935ea[_0x539e6b(0xf5)]();if(!/^\d+$/[_0x539e6b(0xfe)](_0x4407a3))throw CliErrors[_0x539e6b(0xc4)](_0x539e6b(0xd6),'Pass\x20--user\x20<userId>;\x20name\x20and\x20account\x20lookup\x20are\x20not\x20available\x20in\x20runtime\x20scope.');const _0x45ee8e=Number(_0x4407a3);if(!Number[_0x539e6b(0xcb)](_0x45ee8e)||_0x45ee8e<=0x0)throw CliErrors[_0x539e6b(0xc4)](_0x539e6b(0xf8));return _0x45ee8e;}export async function prepareRuntimeMemberMutation(_0x3c9b16,_0x3b7e92){const _0x214dbf=a53_0x1790ff,_0x3e7cef=await resolveRuntimeRoleRef(_0x3c9b16['appCode'],_0x3c9b16[_0x214dbf(0x100)]('role'));if(_0x3e7cef[_0x214dbf(0xfd)]==='OWNER')throw CliErrors[_0x214dbf(0xc4)]('OWNER\x20runtime\x20role\x20membership\x20cannot\x20be\x20changed\x20with\x20this\x20command.',_0x214dbf(0xfc));const _0x3b30ac=parseRuntimeUserId(_0x3c9b16[_0x214dbf(0x100)](_0x214dbf(0xba))),_0x48d5eb=(await listRuntimeRoleUsers(_0x3c9b16[_0x214dbf(0xc1)]))['map'](_0x596791=>({..._0x596791,'userList':[..._0x596791['userList']??[]],'applyUserList':[..._0x596791['applyUserList']??[]]})),_0x59cd22=_0x48d5eb[_0x214dbf(0xe8)](_0x16f09b=>_0x16f09b['id']===_0x3e7cef['id']);if(!_0x59cd22)throw CliErrors[_0x214dbf(0xc4)]('Runtime\x20role\x20'+_0x3e7cef['id']+_0x214dbf(0xeb),_0x214dbf(0xed));const _0x3529c1=_0x59cd22['userList'][_0x214dbf(0xe5)](_0x5b4d66=>_0x5b4d66[_0x214dbf(0xc6)]),_0x503e96=_0x3c9b16[_0x214dbf(0xe3)](_0x214dbf(0xf4));if(_0x503e96!==undefined&&_0x503e96!==null&&_0x503e96!==''){const _0x3c67db=_0x3c9b16['num'](_0x214dbf(0xf4));if(!Number[_0x214dbf(0xcb)](_0x3c67db)||_0x3c67db<0x0)throw CliErrors[_0x214dbf(0xc4)](_0x214dbf(0xc0));if(_0x3529c1[_0x214dbf(0xe0)]!==_0x3c67db)throw CliErrors[_0x214dbf(0xc4)](_0x214dbf(0xea)+_0x3c67db+_0x214dbf(0xe9)+_0x3529c1[_0x214dbf(0xe0)]+'.',_0x214dbf(0xd2));}const _0x5abf64=_0x3529c1['includes'](_0x3b30ac),_0x3c2f99=[];let _0x270f74=!![];if(_0x3b7e92===_0x214dbf(0xec)){const _0x53d251=await listRuntimeAppUsers(_0x3c9b16['appCode']),_0x162a8d=_0x53d251['filter'](_0x2ead08=>Number(_0x2ead08[_0x214dbf(0xf9)])===_0x3b30ac);if(_0x162a8d[_0x214dbf(0xe0)]!==0x1||!_0x162a8d[0x0][_0x214dbf(0xc2)]?.['trim']())throw CliErrors[_0x214dbf(0xc4)](_0x214dbf(0xcf)+_0x3b30ac+_0x214dbf(0xd3)+_0x3c9b16[_0x214dbf(0xc1)]+'.','Use\x20a\x20numeric\x20userId\x20returned\x20by\x20the\x20current\x20application\x27s\x20personnel\x20list.');_0x5abf64?(_0x270f74=![],_0x3c2f99[_0x214dbf(0xc3)](_0x214dbf(0xe1)+_0x3b30ac+_0x214dbf(0xfb)+_0x3e7cef['id']+'.')):_0x59cd22['userList'][_0x214dbf(0xc3)]({'userId':_0x3b30ac,'username':_0x162a8d[0x0][_0x214dbf(0xc2)]});}else!_0x5abf64?(_0x270f74=![],_0x3c2f99[_0x214dbf(0xc3)](_0x214dbf(0xe1)+_0x3b30ac+_0x214dbf(0xb8)+_0x3e7cef['id']+'.')):_0x59cd22[_0x214dbf(0xef)]=_0x59cd22[_0x214dbf(0xef)][_0x214dbf(0xd0)](_0x4a7bb=>_0x4a7bb[_0x214dbf(0xc6)]!==_0x3b30ac);return{'role':_0x3e7cef,'userId':_0x3b30ac,'roleList':_0x48d5eb,'before':{'userIds':_0x3529c1},'after':{'userIds':_0x59cd22[_0x214dbf(0xef)][_0x214dbf(0xe5)](_0x42fe18=>_0x42fe18[_0x214dbf(0xc6)])},'shouldWrite':_0x270f74,'warnings':_0x3c2f99};}export function runtimeRoleWriteResult(_0x5f1fbf,_0x3ba453,_0x19019c,_0x4bac2d,_0x1489c0,_0x4b7e0b=[]){const _0x51810b=a53_0x1790ff;return{'operation':_0x5f1fbf,'scope':_0x51810b(0xdc),'selector':_0x3ba453,'before':_0x19019c,'after':_0x4bac2d,'dryRun':![],'backend':_0x1489c0,'warnings':_0x4b7e0b};}
@@ -1 +1 @@
1
- const a54_0x114178=a54_0x16c9;function a54_0x43e3(){const _0x2ff7b2=['New\x20non-empty\x20role\x20remark','Update\x20a\x20runtime\x20CUSTOM\x20role','trim','470qmiEWJ','修改当前运行应用中的自定义角色名称或备注;变更会立即影响角色展示。','New\x20role\x20name','str','Pass\x20--name\x20or\x20--remark\x20to\x20update\x20the\x20runtime\x20role.','build','high-risk-write','name','remark','body','2325120VmcpYa','The\x20current\x20runtime\x20role\x20API\x20does\x20not\x20support\x20clearing\x20an\x20existing\x20remark.','23070evITcW','appCode','--name\x20must\x20not\x20be\x20blank.','415101kXyPMz','2ONSsay','description','482877Frsyen','835feoitp','validation','update','9904580qmGwYb','1151391uMYrYo','--remark\x20must\x20not\x20be\x20blank.','POST','string','role','Preview:\x20update\x20a\x20runtime\x20CUSTOM\x20role','/client/permit/role/update','flag','3231228xOuhGK'];a54_0x43e3=function(){return _0x2ff7b2;};return a54_0x43e3();}(function(_0x1d7e88,_0x3498b5){const _0x3b3b1f=a54_0x16c9,_0x5202e1=_0x1d7e88();while(!![]){try{const _0x3e8c2d=-parseInt(_0x3b3b1f(0x100))/0x1+-parseInt(_0x3b3b1f(0x101))/0x2*(-parseInt(_0x3b3b1f(0x108))/0x3)+parseInt(_0x3b3b1f(0x110))/0x4+-parseInt(_0x3b3b1f(0x104))/0x5*(parseInt(_0x3b3b1f(0xfd))/0x6)+-parseInt(_0x3b3b1f(0x107))/0x7+-parseInt(_0x3b3b1f(0xfb))/0x8+parseInt(_0x3b3b1f(0x103))/0x9*(parseInt(_0x3b3b1f(0x114))/0xa);if(_0x3e8c2d===_0x3498b5)break;else _0x5202e1['push'](_0x5202e1['shift']());}catch(_0x49208e){_0x5202e1['push'](_0x5202e1['shift']());}}}(a54_0x43e3,0xe80e3));import{updateRuntimeAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';function a54_0x16c9(_0xdfc690,_0x149b9c){_0xdfc690=_0xdfc690-0xf2;const _0x43e348=a54_0x43e3();let _0x16c96c=_0x43e348[_0xdfc690];return _0x16c96c;}import{assertCustomRuntimeRole,getRuntimeRoleById,projectRuntimeRole,ROLE_ID_FLAG,runtimeRoleWriteResult}from'../../commands/role/shared.js';function updateFields(_0x12f566){const _0x16167c=a54_0x16c9,_0x531a3a=_0x12f566[_0x16167c(0x10f)](_0x16167c(0xf8))!==undefined,_0x2dd5d3=_0x12f566[_0x16167c(0x10f)](_0x16167c(0xf9))!==undefined;if(!_0x531a3a&&!_0x2dd5d3)throw CliErrors['validation'](_0x16167c(0xf5));const _0x1c00f5=_0x12f566['str'](_0x16167c(0xf8))['trim'](),_0x205d96=_0x12f566[_0x16167c(0xf4)](_0x16167c(0xf9))[_0x16167c(0x113)]();if(_0x531a3a&&!_0x1c00f5)throw CliErrors[_0x16167c(0x105)](_0x16167c(0xff));if(_0x2dd5d3&&!_0x205d96)throw CliErrors['validation'](_0x16167c(0x109),_0x16167c(0xfc));return{..._0x531a3a?{'roleName':_0x1c00f5}:{},..._0x2dd5d3?{'remark':_0x205d96}:{}};}async function prepare(_0x4df768){const _0x3aebdf=a54_0x16c9,_0x351b05=await getRuntimeRoleById(_0x4df768[_0x3aebdf(0xfe)],_0x4df768['num']('id'));return assertCustomRuntimeRole(_0x351b05,'update'),{'role':_0x351b05,'body':{'id':_0x351b05['id'],'appCode':_0x4df768[_0x3aebdf(0xfe)],...updateFields(_0x4df768)}};}export const roleUpdate={'service':a54_0x114178(0x10c),'command':a54_0x114178(0x106),'description':a54_0x114178(0x112),'risk':a54_0x114178(0xf7),'confirmationDescription':a54_0x114178(0xf2),'flags':[ROLE_ID_FLAG,{'name':a54_0x114178(0xf8),'type':a54_0x114178(0x10b),'description':a54_0x114178(0xf3)},{'name':a54_0x114178(0xf9),'type':'string','description':a54_0x114178(0x111)}],async 'validate'(_0x35421b){updateFields(_0x35421b);},async 'dryRun'(_0x4ecad5){const _0x9e6e05=a54_0x114178,{body:_0x5fe7b8}=await prepare(_0x4ecad5);return dryRun(_0x9e6e05(0x10a),_0x9e6e05(0x10e))[_0x9e6e05(0xfa)](_0x5fe7b8)[_0x9e6e05(0x102)](_0x9e6e05(0x10d))[_0x9e6e05(0xf6)]();},async 'execute'(_0x107031){const _0x4e79f8=a54_0x114178,{role:_0x5b7e43,body:_0x5c4454}=await prepare(_0x107031),_0x3e8016=await updateRuntimeAppRole(_0x5c4454);return{'ok':!![],'data':runtimeRoleWriteResult('update',{'roleId':_0x5b7e43['id']},projectRuntimeRole(_0x5b7e43),projectRuntimeRole(_0x3e8016),{'method':'POST','path':_0x4e79f8(0x10e)})};}};
1
+ const a54_0x409fba=a54_0x23d9;(function(_0x2a613e,_0x1f7ee0){const _0x47437d=a54_0x23d9,_0x3ac4b7=_0x2a613e();while(!![]){try{const _0x1bf336=-parseInt(_0x47437d(0xb7))/0x1+parseInt(_0x47437d(0xa9))/0x2*(-parseInt(_0x47437d(0xa1))/0x3)+-parseInt(_0x47437d(0xa2))/0x4+-parseInt(_0x47437d(0xbe))/0x5+parseInt(_0x47437d(0xac))/0x6*(-parseInt(_0x47437d(0xbc))/0x7)+parseInt(_0x47437d(0xa3))/0x8+parseInt(_0x47437d(0xbf))/0x9;if(_0x1bf336===_0x1f7ee0)break;else _0x3ac4b7['push'](_0x3ac4b7['shift']());}catch(_0x190dec){_0x3ac4b7['push'](_0x3ac4b7['shift']());}}}(a54_0x442e,0xe7fca));function a54_0x23d9(_0x30b3c9,_0x548b2f){_0x30b3c9=_0x30b3c9-0xa1;const _0x442e20=a54_0x442e();let _0x23d987=_0x442e20[_0x30b3c9];return _0x23d987;}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(_0x212183){const _0x3a864d=a54_0x23d9,_0x441f68=_0x212183[_0x3a864d(0xb6)](_0x3a864d(0xbd))!==undefined,_0xd53d73=_0x212183['flag'](_0x3a864d(0xae))!==undefined;if(!_0x441f68&&!_0xd53d73)throw CliErrors[_0x3a864d(0xa5)](_0x3a864d(0xba));const _0x153d81=_0x212183[_0x3a864d(0xb8)](_0x3a864d(0xbd))[_0x3a864d(0xaf)](),_0x2db897=_0x212183['str'](_0x3a864d(0xae))[_0x3a864d(0xaf)]();if(_0x441f68&&!_0x153d81)throw CliErrors['validation'](_0x3a864d(0xb9));if(_0xd53d73&&!_0x2db897)throw CliErrors[_0x3a864d(0xa5)]('--remark\x20must\x20not\x20be\x20blank.',_0x3a864d(0xb1));return{..._0x441f68?{'roleName':_0x153d81}:{},..._0xd53d73?{'remark':_0x2db897}:{}};}async function prepare(_0x49699d){const _0xeddff=a54_0x23d9,_0x436956=await getRuntimeRoleById(_0x49699d[_0xeddff(0xa4)],_0x49699d[_0xeddff(0xa8)]('id'));return assertCustomRuntimeRole(_0x436956,_0xeddff(0xb4)),{'role':_0x436956,'body':{'id':_0x436956['id'],'appCode':_0x49699d[_0xeddff(0xa4)],...updateFields(_0x49699d)}};}function a54_0x442e(){const _0x5b9425=['45912rnuVUc','role','remark','trim','修改当前运行应用中的自定义角色名称或备注;变更会立即影响角色展示。','The\x20current\x20runtime\x20role\x20API\x20does\x20not\x20support\x20clearing\x20an\x20existing\x20remark.','body','New\x20non-empty\x20role\x20remark','update','/client/permit/role/update','flag','149453ZIiyEK','str','--name\x20must\x20not\x20be\x20blank.','Pass\x20--name\x20or\x20--remark\x20to\x20update\x20the\x20runtime\x20role.','New\x20role\x20name','203MkKjNf','name','1507515nOJbXs','20098881lKfKXf','741594vicDCW','4633048mZgdFM','10317832ntIupm','appCode','validation','description','Preview:\x20update\x20a\x20runtime\x20CUSTOM\x20role','num','6qRLTgI','string','POST'];a54_0x442e=function(){return _0x5b9425;};return a54_0x442e();}export const roleUpdate={'service':a54_0x409fba(0xad),'command':a54_0x409fba(0xb4),'description':'Update\x20a\x20runtime\x20CUSTOM\x20role','risk':'high-risk-write','confirmationDescription':a54_0x409fba(0xb0),'flags':[ROLE_ID_FLAG,{'name':a54_0x409fba(0xbd),'type':a54_0x409fba(0xaa),'description':a54_0x409fba(0xbb)},{'name':'remark','type':'string','description':a54_0x409fba(0xb3)}],async 'validate'(_0x2cedd9){updateFields(_0x2cedd9);},async 'dryRun'(_0x30296d){const _0x134291=a54_0x409fba,{body:_0x3fddbf}=await prepare(_0x30296d);return dryRun(_0x134291(0xab),_0x134291(0xb5))[_0x134291(0xb2)](_0x3fddbf)[_0x134291(0xa6)](_0x134291(0xa7))['build']();},async 'execute'(_0x7146c7){const _0x4b8792=a54_0x409fba,{role:_0xa15f14,body:_0x22f901}=await prepare(_0x7146c7),_0x14df46=await updateRuntimeAppRole(_0x22f901);return{'ok':!![],'data':runtimeRoleWriteResult(_0x4b8792(0xb4),{'roleId':_0xa15f14['id']},projectRuntimeRole(_0xa15f14),projectRuntimeRole(_0x14df46),{'method':'POST','path':'/client/permit/role/update'})};}};
@@ -1 +1 @@
1
- const a55_0x254de4=a55_0x2458;(function(_0x3b6105,_0x5ae341){const _0x343005=a55_0x2458,_0x3e9bce=_0x3b6105();while(!![]){try{const _0x890b80=parseInt(_0x343005(0x188))/0x1*(parseInt(_0x343005(0x186))/0x2)+-parseInt(_0x343005(0x194))/0x3+parseInt(_0x343005(0x183))/0x4+-parseInt(_0x343005(0x182))/0x5+-parseInt(_0x343005(0x191))/0x6+-parseInt(_0x343005(0x18e))/0x7+parseInt(_0x343005(0x192))/0x8;if(_0x890b80===_0x5ae341)break;else _0x3e9bce['push'](_0x3e9bce['shift']());}catch(_0x184769){_0x3e9bce['push'](_0x3e9bce['shift']());}}}(a55_0x1737,0x9d5ab));function a55_0x2458(_0x242a62,_0x2d959b){_0x242a62=_0x242a62-0x181;const _0x173714=a55_0x1737();let _0x24585a=_0x173714[_0x242a62];return _0x24585a;}import{updateRuntimeRoleUsers}from'../../core/api-client.js';import{dryRun}from'../../framework/dryrun.js';import{EXPECT_USER_COUNT_FLAG,prepareRuntimeMemberMutation,ROLE_REF_FLAG,runtimeRoleWriteResult,USER_ID_FLAG}from'../../commands/role/shared.js';function a55_0x1737(){const _0x39265f=['after','warnings','2134BFLKNQ','roleList','1065InLmOw','description','POST','user-add','build','userId','3499741VOhkDL','Add\x20a\x20numeric\x20userId\x20to\x20one\x20runtime\x20role','role','5015988ORreCi','2523040tePtxM','把指定运行用户加入目标角色;该用户将获得该角色对应的运行权限。','1475019lzREYJ','shouldWrite','body','high-risk-write','/client/permit/user-role/update-user-list','Preview:\x20add\x20runtime\x20role\x20member','752545IPPSoV','4683724LuTaXG'];a55_0x1737=function(){return _0x39265f;};return a55_0x1737();}export const roleUserAdd={'service':a55_0x254de4(0x190),'command':'user-add','description':a55_0x254de4(0x18f),'risk':a55_0x254de4(0x197),'confirmationDescription':a55_0x254de4(0x193),'flags':[ROLE_REF_FLAG,USER_ID_FLAG,EXPECT_USER_COUNT_FLAG],async 'dryRun'(_0x62315){const _0x4378a1=a55_0x254de4,_0x4a510f=await prepareRuntimeMemberMutation(_0x62315,_0x4378a1(0x18b));return dryRun(_0x4378a1(0x18a),_0x4378a1(0x198))[_0x4378a1(0x196)]({'appCode':_0x62315['appCode'],'roleList':_0x4a510f[_0x4378a1(0x187)]})[_0x4378a1(0x189)](_0x4a510f[_0x4378a1(0x195)]?_0x4378a1(0x181):_0x4a510f[_0x4378a1(0x185)][0x0])[_0x4378a1(0x18c)]();},async 'execute'(_0x323b9d){const _0x31d47b=a55_0x254de4,_0x54391c=await prepareRuntimeMemberMutation(_0x323b9d,_0x31d47b(0x18b));return _0x54391c['shouldWrite']&&await updateRuntimeRoleUsers(_0x323b9d['appCode'],_0x54391c[_0x31d47b(0x187)]),{'ok':!![],'data':runtimeRoleWriteResult('user-add',{'roleId':_0x54391c['role']['id'],'userId':_0x54391c[_0x31d47b(0x18d)]},_0x54391c['before'],_0x54391c[_0x31d47b(0x184)],{'method':'POST','path':_0x31d47b(0x198)},_0x54391c[_0x31d47b(0x185)])};}};
1
+ const a55_0x229948=a55_0x41c0;function a55_0xc893(){const _0xf3de40=['Add\x20a\x20numeric\x20userId\x20to\x20one\x20runtime\x20role','1464552xOaWOq','roleList','/client/permit/user-role/update-user-list','1326171HowRKi','after','high-risk-write','725607wBcvkT','2267IiVSax','appCode','6JdEENW','role','POST','186170LxqPth','description','480DmegHr','body','build','130pQlKKZ','把指定运行用户加入目标角色;该用户将获得该角色对应的运行权限。','shouldWrite','before','Preview:\x20add\x20runtime\x20role\x20member','7788ZulrdV','762768sRrOXR','user-add','warnings'];a55_0xc893=function(){return _0xf3de40;};return a55_0xc893();}(function(_0x275841,_0x2fb680){const _0x108e0e=a55_0x41c0,_0x54ecf6=_0x275841();while(!![]){try{const _0x978b8c=parseInt(_0x108e0e(0x139))/0x1*(parseInt(_0x108e0e(0x143))/0x2)+-parseInt(_0x108e0e(0x13b))/0x3*(parseInt(_0x108e0e(0x149))/0x4)+parseInt(_0x108e0e(0x140))/0x5*(parseInt(_0x108e0e(0x148))/0x6)+parseInt(_0x108e0e(0x135))/0x7+parseInt(_0x108e0e(0x14d))/0x8+-parseInt(_0x108e0e(0x138))/0x9+parseInt(_0x108e0e(0x13e))/0xa;if(_0x978b8c===_0x2fb680)break;else _0x54ecf6['push'](_0x54ecf6['shift']());}catch(_0x1eb688){_0x54ecf6['push'](_0x54ecf6['shift']());}}}(a55_0xc893,0x31187));import{updateRuntimeRoleUsers}from'../../core/api-client.js';import{dryRun}from'../../framework/dryrun.js';function a55_0x41c0(_0x16587b,_0x2318d2){_0x16587b=_0x16587b-0x134;const _0xc893a3=a55_0xc893();let _0x41c03a=_0xc893a3[_0x16587b];return _0x41c03a;}import{EXPECT_USER_COUNT_FLAG,prepareRuntimeMemberMutation,ROLE_REF_FLAG,runtimeRoleWriteResult,USER_ID_FLAG}from'../../commands/role/shared.js';export const roleUserAdd={'service':a55_0x229948(0x13c),'command':a55_0x229948(0x14a),'description':a55_0x229948(0x14c),'risk':a55_0x229948(0x137),'confirmationDescription':a55_0x229948(0x144),'flags':[ROLE_REF_FLAG,USER_ID_FLAG,EXPECT_USER_COUNT_FLAG],async 'dryRun'(_0x40cedd){const _0x497c16=a55_0x229948,_0x2997c9=await prepareRuntimeMemberMutation(_0x40cedd,_0x497c16(0x14a));return dryRun(_0x497c16(0x13d),'/client/permit/user-role/update-user-list')[_0x497c16(0x141)]({'appCode':_0x40cedd[_0x497c16(0x13a)],'roleList':_0x2997c9[_0x497c16(0x14e)]})[_0x497c16(0x13f)](_0x2997c9[_0x497c16(0x145)]?_0x497c16(0x147):_0x2997c9[_0x497c16(0x14b)][0x0])[_0x497c16(0x142)]();},async 'execute'(_0xe97deb){const _0x2822be=a55_0x229948,_0x10ba18=await prepareRuntimeMemberMutation(_0xe97deb,_0x2822be(0x14a));return _0x10ba18[_0x2822be(0x145)]&&await updateRuntimeRoleUsers(_0xe97deb[_0x2822be(0x13a)],_0x10ba18[_0x2822be(0x14e)]),{'ok':!![],'data':runtimeRoleWriteResult(_0x2822be(0x14a),{'roleId':_0x10ba18[_0x2822be(0x13c)]['id'],'userId':_0x10ba18['userId']},_0x10ba18[_0x2822be(0x146)],_0x10ba18[_0x2822be(0x136)],{'method':_0x2822be(0x13d),'path':_0x2822be(0x134)},_0x10ba18[_0x2822be(0x14b)])};}};
@@ -1 +1 @@
1
- const a56_0x326184=a56_0x1b40;(function(_0x5979bb,_0x203d3e){const _0x1c87e4=a56_0x1b40,_0x47ae09=_0x5979bb();while(!![]){try{const _0x53b6b6=-parseInt(_0x1c87e4(0x1ea))/0x1*(-parseInt(_0x1c87e4(0x1f3))/0x2)+parseInt(_0x1c87e4(0x1f9))/0x3+-parseInt(_0x1c87e4(0x1fb))/0x4*(-parseInt(_0x1c87e4(0x1ff))/0x5)+parseInt(_0x1c87e4(0x1f2))/0x6*(-parseInt(_0x1c87e4(0x1fa))/0x7)+-parseInt(_0x1c87e4(0x1f7))/0x8+parseInt(_0x1c87e4(0x1fd))/0x9+-parseInt(_0x1c87e4(0x1f4))/0xa;if(_0x53b6b6===_0x203d3e)break;else _0x47ae09['push'](_0x47ae09['shift']());}catch(_0x3d6b68){_0x47ae09['push'](_0x47ae09['shift']());}}}(a56_0x37dc,0xa8036));function a56_0x37dc(){const _0x5823ef=['high-risk-write','roleList','102798fjmPOd','1475742ssGDNk','10400490tzvsOz','Preview:\x20remove\x20runtime\x20role\x20member','after','666152aNLtXB','user-remove','1323147IAFWgY','301uJrTiE','4RbMjox','Remove\x20a\x20numeric\x20userId\x20from\x20one\x20runtime\x20role','3771153heBWCa','shouldWrite','4751410rYtKXB','把指定运行用户移出目标角色;该用户将失去仅由该角色授予的运行权限。','warnings','1wLiLsu','POST','build','/client/permit/user-role/update-user-list','role','userId'];a56_0x37dc=function(){return _0x5823ef;};return a56_0x37dc();}import{updateRuntimeRoleUsers}from'../../core/api-client.js';import{dryRun}from'../../framework/dryrun.js';function a56_0x1b40(_0xb96dab,_0x222e1f){_0xb96dab=_0xb96dab-0x1ea;const _0x37dc7d=a56_0x37dc();let _0x1b4088=_0x37dc7d[_0xb96dab];return _0x1b4088;}import{EXPECT_USER_COUNT_FLAG,prepareRuntimeMemberMutation,ROLE_REF_FLAG,runtimeRoleWriteResult,USER_ID_FLAG}from'../../commands/role/shared.js';export const roleUserRemove={'service':'role','command':'user-remove','description':a56_0x326184(0x1fc),'risk':a56_0x326184(0x1f0),'confirmationDescription':a56_0x326184(0x200),'flags':[ROLE_REF_FLAG,USER_ID_FLAG,EXPECT_USER_COUNT_FLAG],async 'dryRun'(_0x45e047){const _0x3bd2b0=a56_0x326184,_0x14cd0f=await prepareRuntimeMemberMutation(_0x45e047,_0x3bd2b0(0x1f8));return dryRun(_0x3bd2b0(0x1eb),'/client/permit/user-role/update-user-list')['body']({'appCode':_0x45e047['appCode'],'roleList':_0x14cd0f[_0x3bd2b0(0x1f1)]})['description'](_0x14cd0f[_0x3bd2b0(0x1fe)]?_0x3bd2b0(0x1f5):_0x14cd0f[_0x3bd2b0(0x201)][0x0])[_0x3bd2b0(0x1ec)]();},async 'execute'(_0x8f7b37){const _0x35a44b=a56_0x326184,_0x859d7c=await prepareRuntimeMemberMutation(_0x8f7b37,_0x35a44b(0x1f8));return _0x859d7c['shouldWrite']&&await updateRuntimeRoleUsers(_0x8f7b37['appCode'],_0x859d7c[_0x35a44b(0x1f1)]),{'ok':!![],'data':runtimeRoleWriteResult(_0x35a44b(0x1f8),{'roleId':_0x859d7c[_0x35a44b(0x1ee)]['id'],'userId':_0x859d7c[_0x35a44b(0x1ef)]},_0x859d7c['before'],_0x859d7c[_0x35a44b(0x1f6)],{'method':'POST','path':_0x35a44b(0x1ed)},_0x859d7c[_0x35a44b(0x201)])};}};
1
+ function a56_0x41d7(_0xa42729,_0x42422e){_0xa42729=_0xa42729-0x1b1;const _0x466c3c=a56_0x466c();let _0x41d74a=_0x466c3c[_0xa42729];return _0x41d74a;}const a56_0x4fc5a1=a56_0x41d7;(function(_0xa1415f,_0x114bed){const _0x83fbff=a56_0x41d7,_0x34794a=_0xa1415f();while(!![]){try{const _0x41def7=parseInt(_0x83fbff(0x1c4))/0x1+-parseInt(_0x83fbff(0x1b7))/0x2+-parseInt(_0x83fbff(0x1c6))/0x3+parseInt(_0x83fbff(0x1bb))/0x4*(-parseInt(_0x83fbff(0x1ba))/0x5)+parseInt(_0x83fbff(0x1c2))/0x6*(parseInt(_0x83fbff(0x1c1))/0x7)+parseInt(_0x83fbff(0x1b9))/0x8*(parseInt(_0x83fbff(0x1c3))/0x9)+-parseInt(_0x83fbff(0x1b2))/0xa*(-parseInt(_0x83fbff(0x1b4))/0xb);if(_0x41def7===_0x114bed)break;else _0x34794a['push'](_0x34794a['shift']());}catch(_0x5f445c){_0x34794a['push'](_0x34794a['shift']());}}}(a56_0x466c,0x62a44));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 roleUserRemove={'service':a56_0x4fc5a1(0x1b5),'command':a56_0x4fc5a1(0x1b1),'description':a56_0x4fc5a1(0x1bc),'risk':a56_0x4fc5a1(0x1b8),'confirmationDescription':'把指定运行用户移出目标角色;该用户将失去仅由该角色授予的运行权限。','flags':[ROLE_REF_FLAG,USER_ID_FLAG,EXPECT_USER_COUNT_FLAG],async 'dryRun'(_0x1c8bbe){const _0x164b6a=a56_0x4fc5a1,_0x3cc0eb=await prepareRuntimeMemberMutation(_0x1c8bbe,_0x164b6a(0x1b1));return dryRun(_0x164b6a(0x1be),_0x164b6a(0x1c5))[_0x164b6a(0x1b6)]({'appCode':_0x1c8bbe[_0x164b6a(0x1b3)],'roleList':_0x3cc0eb[_0x164b6a(0x1bd)]})['description'](_0x3cc0eb[_0x164b6a(0x1c0)]?'Preview:\x20remove\x20runtime\x20role\x20member':_0x3cc0eb[_0x164b6a(0x1bf)][0x0])['build']();},async 'execute'(_0x3e2167){const _0x3ac865=a56_0x4fc5a1,_0x5b5f93=await prepareRuntimeMemberMutation(_0x3e2167,'user-remove');return _0x5b5f93[_0x3ac865(0x1c0)]&&await updateRuntimeRoleUsers(_0x3e2167[_0x3ac865(0x1b3)],_0x5b5f93[_0x3ac865(0x1bd)]),{'ok':!![],'data':runtimeRoleWriteResult(_0x3ac865(0x1b1),{'roleId':_0x5b5f93[_0x3ac865(0x1b5)]['id'],'userId':_0x5b5f93['userId']},_0x5b5f93['before'],_0x5b5f93['after'],{'method':'POST','path':_0x3ac865(0x1c5)},_0x5b5f93[_0x3ac865(0x1bf)])};}};function a56_0x466c(){const _0x412bf1=['1100786jHpymF','high-risk-write','1603024lsfMya','10FZEmDJ','816580fnnxpe','Remove\x20a\x20numeric\x20userId\x20from\x20one\x20runtime\x20role','roleList','POST','warnings','shouldWrite','112168BhimsL','12bXTiVv','9PyiDvO','535745miCmOG','/client/permit/user-role/update-user-list','421074JGbawm','user-remove','20NWBRWZ','appCode','4041983kONvdf','role','body'];a56_0x466c=function(){return _0x412bf1;};return a56_0x466c();}