@lovrabet/lovrabet-cli 2.2.5-beta.2 → 2.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. package/lib/cli.js +1 -1
  2. package/lib/commands/api-doc/index.js +1 -1
  3. package/lib/commands/app/cache.js +1 -1
  4. package/lib/commands/app/definitions.js +1 -1
  5. package/lib/commands/app/eligibility.js +1 -1
  6. package/lib/commands/app/mock-loader.js +1 -1
  7. package/lib/commands/app/remote-source.js +1 -1
  8. package/lib/commands/app/shared.js +1 -1
  9. package/lib/commands/app-config/get.js +1 -1
  10. package/lib/commands/app-config/index.js +1 -1
  11. package/lib/commands/artifact/index.js +1 -1
  12. package/lib/commands/auth/device.js +1 -1
  13. package/lib/commands/auth/index.js +1 -1
  14. package/lib/commands/auth/prompt.js +1 -1
  15. package/lib/commands/bff/detail.js +1 -1
  16. package/lib/commands/bff/exec.js +1 -1
  17. package/lib/commands/bff/index.js +1 -1
  18. package/lib/commands/cli-skill/index.js +1 -1
  19. package/lib/commands/common/config-policy.js +1 -1
  20. package/lib/commands/common/constraints.js +1 -1
  21. package/lib/commands/common/flags.js +1 -1
  22. package/lib/commands/common/local-file.js +1 -1
  23. package/lib/commands/config/definitions.js +1 -1
  24. package/lib/commands/config/shared.js +1 -1
  25. package/lib/commands/data/index.js +1 -1
  26. package/lib/commands/dataset/detail.js +1 -1
  27. package/lib/commands/dataset/index.js +1 -1
  28. package/lib/commands/dataset/list.js +1 -1
  29. package/lib/commands/dataset/sdk-doc.js +1 -1
  30. package/lib/commands/doctor.js +1 -1
  31. package/lib/commands/file/index.js +1 -1
  32. package/lib/commands/init.js +1 -1
  33. package/lib/commands/kb/index.js +1 -1
  34. package/lib/commands/logs/index.js +1 -1
  35. package/lib/commands/notification/config-list.js +1 -1
  36. package/lib/commands/notification/index.js +1 -1
  37. package/lib/commands/notification/shared.js +1 -1
  38. package/lib/commands/ocr/index.js +1 -1
  39. package/lib/commands/permit/dataset-get.js +1 -1
  40. package/lib/commands/permit/dataset-set.js +1 -1
  41. package/lib/commands/permit/index.js +1 -1
  42. package/lib/commands/permit/page-get.js +1 -1
  43. package/lib/commands/permit/page-set.js +1 -1
  44. package/lib/commands/permit/role-menus-set.js +1 -1
  45. package/lib/commands/permit/role-menus.js +1 -1
  46. package/lib/commands/permit/shared.js +1 -1
  47. package/lib/commands/personal-bff/index.js +1 -1
  48. package/lib/commands/registry.js +1 -1
  49. package/lib/commands/role/create.js +1 -1
  50. package/lib/commands/role/delete.js +1 -1
  51. package/lib/commands/role/detail.js +1 -1
  52. package/lib/commands/role/index.js +1 -1
  53. package/lib/commands/role/list.js +1 -1
  54. package/lib/commands/role/shared.js +1 -1
  55. package/lib/commands/role/update.js +1 -1
  56. package/lib/commands/role/user-add.js +1 -1
  57. package/lib/commands/role/user-remove.js +1 -1
  58. package/lib/commands/schedule/index.js +1 -1
  59. package/lib/commands/schema.js +1 -1
  60. package/lib/commands/service/dynamic.js +1 -1
  61. package/lib/commands/service/function-name-adapter.js +1 -1
  62. package/lib/commands/service/index.js +1 -1
  63. package/lib/commands/service/registry.js +1 -1
  64. package/lib/commands/skill/commands/create.js +1 -1
  65. package/lib/commands/skill/commands/diagram.js +1 -1
  66. package/lib/commands/skill/commands/install.js +1 -1
  67. package/lib/commands/skill/commands/list.js +1 -1
  68. package/lib/commands/skill/commands/push.js +1 -1
  69. package/lib/commands/skill/commands/validate.js +1 -1
  70. package/lib/commands/skill/diagram.js +1 -1
  71. package/lib/commands/skill/flags.js +1 -1
  72. package/lib/commands/skill/index.js +1 -1
  73. package/lib/commands/skill/manifest-helpers.js +1 -1
  74. package/lib/commands/skill/push-execute.js +1 -1
  75. package/lib/commands/skill/push-flow-helpers.js +1 -1
  76. package/lib/commands/skill/push-retarget.js +1 -1
  77. package/lib/commands/skill/scopes.js +1 -1
  78. package/lib/commands/skill/summary.js +1 -1
  79. package/lib/commands/skill/templates.js +1 -1
  80. package/lib/commands/skill/validate.js +1 -1
  81. package/lib/commands/sql/detail.js +1 -1
  82. package/lib/commands/sql/exec.js +1 -1
  83. package/lib/commands/sql/index.js +1 -1
  84. package/lib/commands/update.js +1 -1
  85. package/lib/commands/user-account/bind.js +1 -1
  86. package/lib/commands/user-account/index.js +1 -1
  87. package/lib/commands/workspace/index.js +1 -1
  88. package/lib/config/schema.js +1 -1
  89. package/lib/constant/app.js +1 -1
  90. package/lib/constant/auth-mode.js +1 -1
  91. package/lib/constant/cli.js +1 -1
  92. package/lib/constant/defaults.js +1 -1
  93. package/lib/constant/distribution.js +1 -1
  94. package/lib/constant/domain.js +1 -1
  95. package/lib/constant/env.js +1 -1
  96. package/lib/constant/output.js +1 -1
  97. package/lib/constant/product.js +1 -1
  98. package/lib/constant/risk.js +1 -1
  99. package/lib/constant/url.js +1 -1
  100. package/lib/context.js +1 -1
  101. package/lib/core/api-client.d.ts +3 -3
  102. package/lib/core/api-client.js +1 -1
  103. package/lib/core/db-resolver.js +1 -1
  104. package/lib/core/sdk-client.js +1 -1
  105. package/lib/errors.js +1 -1
  106. package/lib/framework/build-all-flags.js +1 -1
  107. package/lib/framework/dryrun.js +1 -1
  108. package/lib/framework/flags.js +1 -1
  109. package/lib/framework/help.js +1 -1
  110. package/lib/framework/index.js +1 -1
  111. package/lib/framework/output.js +1 -1
  112. package/lib/framework/preparse.js +1 -1
  113. package/lib/framework/rate-limit.js +1 -1
  114. package/lib/framework/raw-flags.js +1 -1
  115. package/lib/framework/response.js +1 -1
  116. package/lib/framework/runner-confirmation.js +1 -1
  117. package/lib/framework/runner-error.js +1 -1
  118. package/lib/framework/runner.js +1 -1
  119. package/lib/framework/schema-export.js +1 -1
  120. package/lib/framework/service-order.js +1 -1
  121. package/lib/framework/types.js +1 -1
  122. package/lib/generated/build-info.d.ts +4 -4
  123. package/lib/generated/build-info.js +1 -1
  124. package/lib/help.js +1 -1
  125. package/lib/postinstall.js +1 -1
  126. package/lib/runtime/confirmation.js +1 -1
  127. package/lib/runtime/event.js +1 -1
  128. package/lib/runtime/index.js +1 -1
  129. package/lib/runtime/queue.js +1 -1
  130. package/lib/runtime/resolve.js +1 -1
  131. package/lib/skills/builtin-skill.js +1 -1
  132. package/lib/skills/npx-skills-add.js +1 -1
  133. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  134. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  135. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  136. package/lib/skills/runtime-skill-sync/install-target.js +1 -1
  137. package/lib/skills/runtime-skill-sync/links.js +1 -1
  138. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  139. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  140. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  141. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  142. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  143. package/lib/skills/runtime-skill-sync/push.js +1 -1
  144. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  145. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  146. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  147. package/lib/skills/runtime-skill-sync.js +1 -1
  148. package/lib/skills/skill-presence.js +1 -1
  149. package/lib/utils/apply-jq-filter.js +1 -1
  150. package/lib/utils/logger.js +1 -1
  151. package/lib/utils/lossless-json.js +1 -1
  152. package/lib/utils/params.js +1 -1
  153. package/lib/utils/platform.js +1 -1
  154. package/lib/utils/update-notice.js +1 -1
  155. package/lib/utils/version.js +1 -1
  156. package/lib/utils/write-cli-side-channel.js +1 -1
  157. package/package.json +1 -1
  158. package/skills/lovrabet/SKILL.md +4 -4
  159. package/skills/lovrabet/references/lovrabet-schedule-workflow.md +7 -6
  160. package/skills/lovrabet.manifest.json +3 -3
@@ -1 +1 @@
1
- function a43_0x3e1b(_0x1e2ac6,_0x4a44d8){_0x1e2ac6=_0x1e2ac6-0x13d;const _0x17ad46=a43_0x17ad();let _0x3e1bcf=_0x17ad46[_0x1e2ac6];return _0x3e1bcf;}function a43_0x17ad(){const _0x23ebc2=['isSafeInteger','changed','323460BHcQHW','rolePermit','\x20selected\x20runtime\x20menus','231704wcjJEu','menus','grant','menu-','384040EtQunn','Runtime\x20menu\x20','push','string','length','18sgWXmq','description','permitList','role','Invalid\x20runtime\x20menu\x20ID:\x20','131950aklRtx','before','str','warnings','appCode','/client/permit/resource/batch-save-menu','\x20for\x20role\x20','body','授予或收回目标角色对指定运行菜单的访问权限;变更会影响该角色用户的菜单可见性。','role-menus-set','131525ExmAcv','bool','1474448EIjECs','POST','roles','--menus','operation','build','revoke','validation','Comma-separated\x20runtime\x20menu\x20IDs','after','1gjUFGv','6418242VOASMu'];a43_0x17ad=function(){return _0x23ebc2;};return a43_0x17ad();}const a43_0xb61dc3=a43_0x3e1b;(function(_0x127668,_0x36ddcb){const _0x39f472=a43_0x3e1b,_0x24f81c=_0x127668();while(!![]){try{const _0x47ad30=-parseInt(_0x39f472(0x15d))/0x1*(parseInt(_0x39f472(0x164))/0x2)+-parseInt(_0x39f472(0x161))/0x3+-parseInt(_0x39f472(0x13d))/0x4+parseInt(_0x39f472(0x151))/0x5*(-parseInt(_0x39f472(0x142))/0x6)+-parseInt(_0x39f472(0x147))/0x7+-parseInt(_0x39f472(0x153))/0x8+parseInt(_0x39f472(0x15e))/0x9;if(_0x47ad30===_0x36ddcb)break;else _0x24f81c['push'](_0x24f81c['shift']());}catch(_0x427ef5){_0x24f81c['push'](_0x24f81c['shift']());}}}(a43_0x17ad,0x1b319));import{listRuntimeMenuRolePermits,listRuntimePermitRoles,saveRuntimeMenuRolePermits}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';import{resolveRuntimeRoleRef}from'../../commands/role/shared.js';import{applyRuntimeRolePermission,assertGrantOrRevoke,assertRuntimePermissionManager,assertRuntimePermitRoleConfigurable,flattenRuntimeMenuRolePermits,GRANT_FLAG,menuPermitDto,REVOKE_FLAG,ROLE_REF_FLAG,runtimePermitWriteResult,splitRefs}from'../../commands/permit/shared.js';const MENUS_FLAG={'name':a43_0xb61dc3(0x165),'type':a43_0xb61dc3(0x140),'required':!![],'description':a43_0xb61dc3(0x15b)};async function prepare(_0x201b5f){const _0x3422d4=a43_0xb61dc3;await assertRuntimePermissionManager(_0x201b5f[_0x3422d4(0x14b)]);const _0x9dce60=assertGrantOrRevoke(_0x201b5f[_0x3422d4(0x152)](_0x3422d4(0x166)),_0x201b5f[_0x3422d4(0x152)]('revoke')),_0x4a63e8=await resolveRuntimeRoleRef(_0x201b5f[_0x3422d4(0x14b)],_0x201b5f['str'](_0x3422d4(0x145)));assertRuntimePermitRoleConfigurable(_0x4a63e8);const _0x52abbe=[...new Set(splitRefs(_0x201b5f[_0x3422d4(0x149)](_0x3422d4(0x165)),_0x3422d4(0x156))['map'](_0x439ecf=>{const _0x5a0b41=_0x3422d4,_0x12d1c8=Number(_0x439ecf);if(!/^\d+$/['test'](_0x439ecf)||!Number[_0x5a0b41(0x15f)](_0x12d1c8)||_0x12d1c8<=0x0)throw CliErrors[_0x5a0b41(0x15a)](_0x5a0b41(0x146)+_0x439ecf+'.');return _0x12d1c8;}))],_0x510ae6=flattenRuntimeMenuRolePermits(await listRuntimeMenuRolePermits(_0x201b5f[_0x3422d4(0x14b)])),_0x123ba1=await listRuntimePermitRoles(_0x201b5f[_0x3422d4(0x14b)]),_0x1dee2e=[],_0x1d026e=[],_0x56cbda=[],_0x94594a=[];for(const _0x4bd422 of _0x52abbe){const _0x426958=_0x510ae6['find'](_0x3045cd=>_0x3045cd['id']===_0x4bd422);if(!_0x426958)throw CliErrors[_0x3422d4(0x15a)](_0x3422d4(0x13e)+_0x4bd422+'\x20was\x20not\x20found.');const _0x23176a=applyRuntimeRolePermission(_0x426958[_0x3422d4(0x162)],_0x4a63e8,_0x123ba1,_0x9dce60);_0x1d026e['push']({'menuId':_0x4bd422,'rolePermit':_0x426958[_0x3422d4(0x162)]}),_0x56cbda[_0x3422d4(0x13f)]({'menuId':_0x4bd422,'rolePermit':_0x23176a[_0x3422d4(0x155)]});if(_0x23176a[_0x3422d4(0x160)])_0x1dee2e[_0x3422d4(0x13f)](menuPermitDto(_0x201b5f[_0x3422d4(0x14b)],_0x426958,_0x23176a[_0x3422d4(0x155)]));else _0x94594a[_0x3422d4(0x13f)]('Runtime\x20menu\x20'+_0x4bd422+'\x20already\x20reflects\x20'+_0x9dce60+_0x3422d4(0x14d)+_0x4a63e8['id']+'.');}return{'operation':_0x9dce60,'role':_0x4a63e8,'menuIds':_0x52abbe,'permitList':_0x1dee2e,'before':_0x1d026e,'after':_0x56cbda,'warnings':_0x94594a};}export const permitRoleMenusSet={'service':'permit','command':a43_0xb61dc3(0x150),'description':'Grant\x20or\x20revoke\x20selected\x20runtime\x20menus\x20for\x20one\x20role','risk':'high-risk-write','confirmationDescription':a43_0xb61dc3(0x14f),'flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,MENUS_FLAG],async 'validate'(_0xeef783){const _0x3f2b5d=a43_0xb61dc3;assertGrantOrRevoke(_0xeef783['bool']('grant'),_0xeef783[_0x3f2b5d(0x152)](_0x3f2b5d(0x159)));},async 'dryRun'(_0x3cd67e){const _0x12f87f=a43_0xb61dc3,_0x5aa62b=await prepare(_0x3cd67e);return dryRun(_0x12f87f(0x154),_0x12f87f(0x14c))[_0x12f87f(0x14e)]({'appCode':_0x3cd67e['appCode'],'permitList':_0x5aa62b['permitList']})[_0x12f87f(0x143)]('Preview:\x20'+_0x5aa62b[_0x12f87f(0x157)]+_0x12f87f(0x163))[_0x12f87f(0x158)]();},async 'execute'(_0x1925d9){const _0x5e7eb6=a43_0xb61dc3,_0x2a368e=await prepare(_0x1925d9);return _0x2a368e[_0x5e7eb6(0x144)][_0x5e7eb6(0x141)]>0x0&&await saveRuntimeMenuRolePermits(_0x1925d9[_0x5e7eb6(0x14b)],_0x2a368e[_0x5e7eb6(0x144)]),{'ok':!![],'data':runtimePermitWriteResult(_0x5e7eb6(0x167)+_0x2a368e[_0x5e7eb6(0x157)],{'roleId':_0x2a368e[_0x5e7eb6(0x145)]['id'],'menuIds':_0x2a368e['menuIds']},_0x2a368e[_0x5e7eb6(0x148)],_0x2a368e[_0x5e7eb6(0x15c)],{'method':_0x5e7eb6(0x154),'path':_0x5e7eb6(0x14c)},_0x2a368e[_0x5e7eb6(0x14a)])};}};
1
+ const a43_0xac55d1=a43_0x5368;(function(_0x39cac9,_0x5a4f4f){const _0x5cea9f=a43_0x5368,_0x38f0c0=_0x39cac9();while(!![]){try{const _0x12b357=-parseInt(_0x5cea9f(0xa6))/0x1*(parseInt(_0x5cea9f(0xa0))/0x2)+parseInt(_0x5cea9f(0xbd))/0x3+parseInt(_0x5cea9f(0xa1))/0x4*(parseInt(_0x5cea9f(0xac))/0x5)+parseInt(_0x5cea9f(0x9b))/0x6*(parseInt(_0x5cea9f(0xab))/0x7)+parseInt(_0x5cea9f(0xad))/0x8+-parseInt(_0x5cea9f(0xa9))/0x9*(parseInt(_0x5cea9f(0xc1))/0xa)+-parseInt(_0x5cea9f(0xbb))/0xb;if(_0x12b357===_0x5a4f4f)break;else _0x38f0c0['push'](_0x38f0c0['shift']());}catch(_0x51782d){_0x38f0c0['push'](_0x38f0c0['shift']());}}}(a43_0x23f9,0xc6dc8));function a43_0x5368(_0x3c289c,_0x51371b){_0x3c289c=_0x3c289c-0x99;const _0x23f92d=a43_0x23f9();let _0x53686e=_0x23f92d[_0x3c289c];return _0x53686e;}import{listRuntimeMenuRolePermits,listRuntimePermitRoles,saveRuntimeMenuRolePermits}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';import{resolveRuntimeRoleRef}from'../../commands/role/shared.js';import{applyRuntimeRolePermission,assertGrantOrRevoke,assertRuntimePermissionManager,assertRuntimePermitRoleConfigurable,flattenRuntimeMenuRolePermits,GRANT_FLAG,menuPermitDto,REVOKE_FLAG,ROLE_REF_FLAG,runtimePermitWriteResult,splitRefs}from'../../commands/permit/shared.js';const MENUS_FLAG={'name':a43_0xac55d1(0x9e),'type':a43_0xac55d1(0x9f),'required':!![],'description':'Comma-separated\x20runtime\x20menu\x20IDs'};async function prepare(_0x4b714e){const _0x25d89d=a43_0xac55d1;await assertRuntimePermissionManager(_0x4b714e[_0x25d89d(0xb5)]);const _0xc13ade=assertGrantOrRevoke(_0x4b714e['bool'](_0x25d89d(0xbc)),_0x4b714e[_0x25d89d(0xc3)]('revoke')),_0x167d47=await resolveRuntimeRoleRef(_0x4b714e[_0x25d89d(0xb5)],_0x4b714e[_0x25d89d(0xb1)]('role'));assertRuntimePermitRoleConfigurable(_0x167d47);const _0x576420=[...new Set(splitRefs(_0x4b714e[_0x25d89d(0xb1)]('menus'),_0x25d89d(0xa3))[_0x25d89d(0x99)](_0xf1611d=>{const _0x5d4ecd=_0x25d89d,_0x190cc1=Number(_0xf1611d);if(!/^\d+$/['test'](_0xf1611d)||!Number[_0x5d4ecd(0xc2)](_0x190cc1)||_0x190cc1<=0x0)throw CliErrors[_0x5d4ecd(0xaf)]('Invalid\x20runtime\x20menu\x20ID:\x20'+_0xf1611d+'.');return _0x190cc1;}))],_0x150405=flattenRuntimeMenuRolePermits(await listRuntimeMenuRolePermits(_0x4b714e[_0x25d89d(0xb5)])),_0x574a97=await listRuntimePermitRoles(_0x4b714e[_0x25d89d(0xb5)]),_0x36e14a=[],_0x19e5cb=[],_0x5373ea=[],_0x4d901d=[];for(const _0x367b75 of _0x576420){const _0x5ac5ba=_0x150405[_0x25d89d(0xbe)](_0x4b9091=>_0x4b9091['id']===_0x367b75);if(!_0x5ac5ba)throw CliErrors[_0x25d89d(0xaf)](_0x25d89d(0xb4)+_0x367b75+'\x20was\x20not\x20found.');const _0xa36b14=applyRuntimeRolePermission(_0x5ac5ba['rolePermit'],_0x167d47,_0x574a97,_0xc13ade);_0x19e5cb[_0x25d89d(0xa7)]({'menuId':_0x367b75,'rolePermit':_0x5ac5ba['rolePermit']}),_0x5373ea['push']({'menuId':_0x367b75,'rolePermit':_0xa36b14[_0x25d89d(0x9c)]});if(_0xa36b14['changed'])_0x36e14a[_0x25d89d(0xa7)](menuPermitDto(_0x4b714e[_0x25d89d(0xb5)],_0x5ac5ba,_0xa36b14[_0x25d89d(0x9c)]));else _0x4d901d[_0x25d89d(0xa7)]('Runtime\x20menu\x20'+_0x367b75+_0x25d89d(0xb6)+_0xc13ade+_0x25d89d(0x9d)+_0x167d47['id']+'.');}return{'operation':_0xc13ade,'role':_0x167d47,'menuIds':_0x576420,'permitList':_0x36e14a,'before':_0x19e5cb,'after':_0x5373ea,'warnings':_0x4d901d};}export const permitRoleMenusSet={'service':a43_0xac55d1(0xa8),'command':'role-menus-set','description':a43_0xac55d1(0xaa),'risk':'high-risk-write','confirmationDescription':'授予或收回目标角色对指定运行菜单的访问权限;变更会影响该角色用户的菜单可见性。','flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,MENUS_FLAG],async 'validate'(_0x9f22b2){const _0x46a355=a43_0xac55d1;assertGrantOrRevoke(_0x9f22b2[_0x46a355(0xc3)](_0x46a355(0xbc)),_0x9f22b2[_0x46a355(0xc3)](_0x46a355(0xb8)));},async 'dryRun'(_0x3d9f2b){const _0x141cf5=a43_0xac55d1,_0x55ff26=await prepare(_0x3d9f2b);return dryRun(_0x141cf5(0xb9),_0x141cf5(0xa5))[_0x141cf5(0xa4)]({'appCode':_0x3d9f2b[_0x141cf5(0xb5)],'permitList':_0x55ff26[_0x141cf5(0xb2)]})[_0x141cf5(0xb0)](_0x141cf5(0xbf)+_0x55ff26[_0x141cf5(0xb7)]+'\x20selected\x20runtime\x20menus')[_0x141cf5(0xb3)]();},async 'execute'(_0x5e0e28){const _0x46dabb=a43_0xac55d1,_0x17151c=await prepare(_0x5e0e28);return _0x17151c[_0x46dabb(0xb2)][_0x46dabb(0x9a)]>0x0&&await saveRuntimeMenuRolePermits(_0x5e0e28['appCode'],_0x17151c[_0x46dabb(0xb2)]),{'ok':!![],'data':runtimePermitWriteResult(_0x46dabb(0xa2)+_0x17151c[_0x46dabb(0xb7)],{'roleId':_0x17151c[_0x46dabb(0xc0)]['id'],'menuIds':_0x17151c['menuIds']},_0x17151c[_0x46dabb(0xba)],_0x17151c['after'],{'method':_0x46dabb(0xb9),'path':'/client/permit/resource/batch-save-menu'},_0x17151c[_0x46dabb(0xae)])};}};function a43_0x23f9(){const _0x50567=['30201028NwAYJW','grant','4667100ONELOX','find','Preview:\x20','role','30lgtKkS','isSafeInteger','bool','map','length','34302KhGJdt','roles','\x20for\x20role\x20','menus','string','2900038RstFYH','2372igpCIW','menu-','--menus','body','/client/permit/resource/batch-save-menu','1jKMeLe','push','permit','796347rHIMNA','Grant\x20or\x20revoke\x20selected\x20runtime\x20menus\x20for\x20one\x20role','1393dWarZy','11155MDYitl','10073488Yhemzq','warnings','validation','description','str','permitList','build','Runtime\x20menu\x20','appCode','\x20already\x20reflects\x20','operation','revoke','POST','before'];a43_0x23f9=function(){return _0x50567;};return a43_0x23f9();}
@@ -1 +1 @@
1
- const a44_0x223516=a44_0x228a;(function(_0x2f6aff,_0x263d1b){const _0x3ab4db=a44_0x228a,_0x50fe09=_0x2f6aff();while(!![]){try{const _0x1c5765=parseInt(_0x3ab4db(0xb0))/0x1+parseInt(_0x3ab4db(0xa9))/0x2+parseInt(_0x3ab4db(0xad))/0x3+parseInt(_0x3ab4db(0xb1))/0x4+parseInt(_0x3ab4db(0xaf))/0x5*(parseInt(_0x3ab4db(0xb3))/0x6)+-parseInt(_0x3ab4db(0xb6))/0x7+parseInt(_0x3ab4db(0xab))/0x8*(-parseInt(_0x3ab4db(0xb4))/0x9);if(_0x1c5765===_0x263d1b)break;else _0x50fe09['push'](_0x50fe09['shift']());}catch(_0xe65e87){_0x50fe09['push'](_0x50fe09['shift']());}}}(a44_0x16fa,0xba333));import{getRuntimeRoleMenuResources}from'../../core/api-client.js';function a44_0x228a(_0x553c51,_0x5c5d87){_0x553c51=_0x553c51-0xa8;const _0x16fa1d=a44_0x16fa();let _0x228a3f=_0x16fa1d[_0x553c51];return _0x228a3f;}import{resolveRuntimeRoleRef}from'../../commands/role/shared.js';import{ROLE_REF_FLAG}from'../../commands/permit/shared.js';export const permitRoleMenus={'service':'permit','command':'role-menus','description':'Show\x20evaluated\x20runtime\x20menu\x20access\x20for\x20one\x20role','risk':a44_0x223516(0xb5),'flags':[ROLE_REF_FLAG],async 'execute'(_0xff5a9d){const _0x527e1b=a44_0x223516,_0x1aa709=await resolveRuntimeRoleRef(_0xff5a9d[_0x527e1b(0xaa)],_0xff5a9d[_0x527e1b(0xb2)](_0x527e1b(0xa8))),_0x4dedad=await getRuntimeRoleMenuResources(_0xff5a9d[_0x527e1b(0xaa)],_0x1aa709['id']);return{'ok':!![],'data':{'scope':_0x527e1b(0xae),'role':{'id':_0x1aa709['id'],'roleName':_0x1aa709['roleName'],'roleType':_0x1aa709[_0x527e1b(0xac)]},'menus':_0x4dedad}};}};function a44_0x16fa(){const _0x4da6cc=['str','4082124syrjLd','27221553lJsVTh','read','5261907YKNiGE','role','904598BMDLDy','appCode','8SDjdEZ','roleType','3081789rngTIy','runtime','5FKGVjV','882382hOWvgN','5986780lWwhOP'];a44_0x16fa=function(){return _0x4da6cc;};return a44_0x16fa();}
1
+ const a44_0xa39916=a44_0x1e67;(function(_0x25e251,_0x48a0b3){const _0xfd9668=a44_0x1e67,_0x50a480=_0x25e251();while(!![]){try{const _0x560ffa=parseInt(_0xfd9668(0x83))/0x1*(parseInt(_0xfd9668(0x7c))/0x2)+-parseInt(_0xfd9668(0x80))/0x3*(-parseInt(_0xfd9668(0x86))/0x4)+parseInt(_0xfd9668(0x87))/0x5*(parseInt(_0xfd9668(0x8a))/0x6)+parseInt(_0xfd9668(0x7f))/0x7+parseInt(_0xfd9668(0x88))/0x8*(-parseInt(_0xfd9668(0x7e))/0x9)+parseInt(_0xfd9668(0x84))/0xa+-parseInt(_0xfd9668(0x7d))/0xb;if(_0x560ffa===_0x48a0b3)break;else _0x50a480['push'](_0x50a480['shift']());}catch(_0x1004ea){_0x50a480['push'](_0x50a480['shift']());}}}(a44_0x2c3d,0x6a877));import{getRuntimeRoleMenuResources}from'../../core/api-client.js';import{resolveRuntimeRoleRef}from'../../commands/role/shared.js';import{ROLE_REF_FLAG}from'../../commands/permit/shared.js';function a44_0x1e67(_0x5b8a4a,_0x4b1427){_0x5b8a4a=_0x5b8a4a-0x7c;const _0x2c3d01=a44_0x2c3d();let _0x1e67a1=_0x2c3d01[_0x5b8a4a];return _0x1e67a1;}function a44_0x2c3d(){const _0x9b0087=['9120WygeOQ','7424810bwdWpQ','roleName','167844pESoch','478240ulaIjj','8mEyJIu','role-menus','48HloUDB','appCode','10GSevdu','27069218uVjnEE','552798veGsrr','4256553hWxpfW','57nuVxHM','roleType','permit'];a44_0x2c3d=function(){return _0x9b0087;};return a44_0x2c3d();}export const permitRoleMenus={'service':a44_0xa39916(0x82),'command':a44_0xa39916(0x89),'description':'Show\x20evaluated\x20runtime\x20menu\x20access\x20for\x20one\x20role','risk':'read','flags':[ROLE_REF_FLAG],async 'execute'(_0x385f2d){const _0x156b10=a44_0xa39916,_0x17a579=await resolveRuntimeRoleRef(_0x385f2d[_0x156b10(0x8b)],_0x385f2d['str']('role')),_0x52a2ec=await getRuntimeRoleMenuResources(_0x385f2d[_0x156b10(0x8b)],_0x17a579['id']);return{'ok':!![],'data':{'scope':'runtime','role':{'id':_0x17a579['id'],'roleName':_0x17a579[_0x156b10(0x85)],'roleType':_0x17a579[_0x156b10(0x81)]},'menus':_0x52a2ec}};}};
@@ -1 +1 @@
1
- const a45_0x26527e=a45_0xca9a;(function(_0x461803,_0x67e2a2){const _0x29779a=a45_0xca9a,_0x276ca8=_0x461803();while(!![]){try{const _0x1d67a7=-parseInt(_0x29779a(0x106))/0x1+-parseInt(_0x29779a(0xfa))/0x2*(parseInt(_0x29779a(0x107))/0x3)+-parseInt(_0x29779a(0x103))/0x4*(-parseInt(_0x29779a(0x100))/0x5)+parseInt(_0x29779a(0xeb))/0x6+-parseInt(_0x29779a(0xd1))/0x7+parseInt(_0x29779a(0xe9))/0x8+-parseInt(_0x29779a(0xea))/0x9*(-parseInt(_0x29779a(0xdd))/0xa);if(_0x1d67a7===_0x67e2a2)break;else _0x276ca8['push'](_0x276ca8['shift']());}catch(_0x5724e4){_0x276ca8['push'](_0x276ca8['shift']());}}}(a45_0x4d69,0x3f302));import{getLoginUserInfo,listRuntimePermitRoles,listRuntimeRoleUsers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const MENU_ID_FLAG={'name':a45_0x26527e(0x109),'type':a45_0x26527e(0x10b),'required':!![],'description':a45_0x26527e(0xd3)};export const ROLE_REF_FLAG={'name':'role','type':a45_0x26527e(0x10a),'required':!![],'description':a45_0x26527e(0xf5)};export const GRANT_FLAG={'name':'grant','type':a45_0x26527e(0xd9),'description':a45_0x26527e(0xf9)};export const REVOKE_FLAG={'name':a45_0x26527e(0xec),'type':'boolean','description':a45_0x26527e(0xd8)};export const PAGE_SLOT_SPECS=[{'flag':a45_0x26527e(0xfe),'key':a45_0x26527e(0xce),'allowSelf':![]},{'flag':a45_0x26527e(0xda),'key':'dataCreate','allowSelf':![]},{'flag':'update-roles','key':a45_0x26527e(0xcf),'allowSelf':![]},{'flag':a45_0x26527e(0xdf),'key':'dataDelete','allowSelf':![]},{'flag':a45_0x26527e(0xf1),'key':a45_0x26527e(0x105),'allowSelf':![]},{'flag':a45_0x26527e(0x110),'key':a45_0x26527e(0xff),'allowSelf':![]},{'flag':a45_0x26527e(0x10d),'key':a45_0x26527e(0xcd),'allowSelf':!![]}];export const PAGE_ROLE_FLAGS=PAGE_SLOT_SPECS['map'](_0x3a2564=>({'name':_0x3a2564['flag'],'type':'string','description':'Comma-separated\x20runtime\x20role\x20IDs\x20or\x20names'}));export function splitRefs(_0x59428f,_0x224401){const _0x3c289d=a45_0x26527e,_0xdadf18=[...new Set(_0x59428f['split'](',')['map'](_0x1abb73=>_0x1abb73['trim']())[_0x3c289d(0xcc)](Boolean))];if(_0xdadf18[_0x3c289d(0x10f)]===0x0)throw CliErrors[_0x3c289d(0xd7)](_0x224401+_0x3c289d(0xca));return _0xdadf18;}export function assertGrantOrRevoke(_0x23565d,_0x34d19e){const _0x223cd0=a45_0x26527e;if(_0x23565d===_0x34d19e)throw CliErrors[_0x223cd0(0xd7)](_0x223cd0(0xe2));return _0x23565d?_0x223cd0(0xe3):_0x223cd0(0xec);}function resolvePermitRole(_0x4be2ba,_0x4bd1ab){const _0x894c30=a45_0x26527e,_0x731802=_0x4bd1ab['trim'](),_0x58c9e4=/^-?\d+$/[_0x894c30(0xee)](_0x731802)?_0x4be2ba[_0x894c30(0xcc)](_0x241ac6=>_0x241ac6['id']===Number(_0x731802)):_0x4be2ba[_0x894c30(0xcc)](_0x578d52=>_0x578d52[_0x894c30(0xdc)]===_0x731802||_0x578d52[_0x894c30(0xf0)]===_0x731802[_0x894c30(0xef)]());if(_0x58c9e4['length']!==0x1)throw CliErrors['validation'](_0x58c9e4[_0x894c30(0x10f)]===0x0?'Permission\x20role\x20\x22'+_0x731802+_0x894c30(0x10e):_0x894c30(0x108)+_0x731802+_0x894c30(0xed),'Use\x20a\x20role\x20ID\x20from\x20`lovrabet\x20role\x20list`.');return _0x58c9e4[0x0];}export async function resolveRuntimePermitRoles(_0x3aabed,_0x6217f7,_0x4d1bf1){const _0x1cd7bb=a45_0x26527e,_0x3af453=await listRuntimePermitRoles(_0x3aabed,{'needSelf':!![],'needPublic':!![]}),_0x70c2ed=[...new Map(_0x6217f7[_0x1cd7bb(0x102)](_0x4a4073=>resolvePermitRole(_0x3af453,_0x4a4073))['map'](_0x310412=>[_0x310412['id'],_0x310412]))[_0x1cd7bb(0xfc)]()],_0x2ba6ad=_0x70c2ed['find'](_0x3e7dc0=>_0x3e7dc0['roleType']===_0x1cd7bb(0x10c)||_0x3e7dc0[_0x1cd7bb(0xf0)]===_0x1cd7bb(0x101));if(_0x2ba6ad)throw CliErrors[_0x1cd7bb(0xd7)](_0x2ba6ad[_0x1cd7bb(0xf0)]+_0x1cd7bb(0xd4),'Configure\x20USER,\x20CUSTOM,\x20or\x20an\x20applicable\x20special\x20role\x20instead.');if(!_0x4d1bf1&&_0x70c2ed[_0x1cd7bb(0xe8)](_0x5aaa68=>_0x5aaa68[_0x1cd7bb(0xf0)]==='SELF'))throw CliErrors[_0x1cd7bb(0xd7)](_0x1cd7bb(0xe0));return _0x70c2ed;}export async function assertRuntimePermissionManager(_0x350ddc){const _0xe6c325=a45_0x26527e,_0x582d35=await getLoginUserInfo(),_0x3e0ec2=_0x582d35[_0xe6c325(0xe1)]??_0x582d35['id'],_0x1e6622=Number(_0x3e0ec2);if(!Number[_0xe6c325(0xcb)](_0x1e6622)||_0x1e6622<=0x0)throw CliErrors[_0xe6c325(0xd7)](_0xe6c325(0xf3));const _0xc25b21=await listRuntimeRoleUsers(_0x350ddc),_0x131a6b=_0xc25b21['some'](_0x43d9f6=>(_0x43d9f6[_0xe6c325(0xf0)]===_0xe6c325(0x10c)||_0x43d9f6[_0xe6c325(0xf0)]===_0xe6c325(0x101))&&_0x43d9f6['userList'][_0xe6c325(0xe8)](_0x3b843b=>_0x3b843b['userId']===_0x1e6622));if(!_0x131a6b)throw CliErrors['validation'](_0xe6c325(0xd5),_0xe6c325(0xe6));}function a45_0x4d69(){const _0x12fd0c=['detail-roles','label','Cannot\x20resolve\x20the\x20current\x20AK\x20userId\x20for\x20permission\x20management.','pageId','Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name','resourceType','ALL','Cannot\x20revoke\x20the\x20last\x20role\x20from\x20a\x20runtime\x20resource.','Grant\x20the\x20selected\x20resources\x20to\x20the\x20role','42uCFSYK','Cannot\x20change\x20resource\x20permissions\x20for\x20','values','rolePermit','menu-roles','dataExport','26590YMAVPU','OWNER','map','292EuaYlm','ADMIN\x20and\x20OWNER\x20have\x20full\x20runtime\x20access;\x20configure\x20USER\x20or\x20CUSTOM\x20instead.','dataDetail','278147fxIvSz','49785erkGGQ','Permission\x20role\x20\x22','menu-id','string','number','ADMIN','row-roles','\x22\x20was\x20not\x20found.','length','export-roles','children','\x20must\x20contain\x20at\x20least\x20one\x20value.','isSafeInteger','filter','dataPermit','menuPermit','dataUpdate','resourceCode','2430414aqQiCA','\x20runtime\x20role\x20','Runtime\x20menu\x20ID','\x20has\x20full\x20runtime\x20access\x20and\x20cannot\x20be\x20a\x20resource\x20permission\x20target.','Runtime\x20resource\x20permission\x20changes\x20require\x20an\x20ADMIN\x20or\x20OWNER\x20role.','runtime','validation','Revoke\x20the\x20selected\x20resources\x20from\x20the\x20role','boolean','create-roles','datasetCode','roleName','65990IZnNHR','appCode','delete-roles','SELF\x20is\x20only\x20valid\x20for\x20--row-roles.','userId','Pass\x20exactly\x20one\x20of\x20--grant\x20or\x20--revoke.','grant','menuId','MENU','Ask\x20an\x20application\x20manager\x20to\x20perform\x20this\x20operation.','permitId','some','1525792abjyPt','234BIFNmP','2892900bLcLkE','revoke','\x22\x20is\x20ambiguous.','test','toUpperCase','roleType'];a45_0x4d69=function(){return _0x12fd0c;};return a45_0x4d69();}export function assertRuntimePermitRoleConfigurable(_0x3f628b){const _0x32f207=a45_0x26527e;if(_0x3f628b['roleType']===_0x32f207(0x10c)||_0x3f628b[_0x32f207(0xf0)]===_0x32f207(0x101))throw CliErrors[_0x32f207(0xd7)](_0x32f207(0xfb)+_0x3f628b[_0x32f207(0xf0)]+_0x32f207(0xd2)+_0x3f628b['roleName']+'.',_0x32f207(0x104));}function a45_0xca9a(_0x42499f,_0x1e19af){_0x42499f=_0x42499f-0xca;const _0x4d6990=a45_0x4d69();let _0xca9a9c=_0x4d6990[_0x42499f];return _0xca9a9c;}function asPermitRole(_0x23fd07){return{'id':_0x23fd07['id'],'roleName':_0x23fd07['roleName'],'roleType':_0x23fd07['roleType'],'allowed':!![]};}export function applyRuntimeRolePermission(_0x3d3aca,_0x27d279,_0x2f29f6,_0x2ffdf2){const _0x56b883=a45_0x26527e,_0x16c68a=!_0x3d3aca||_0x3d3aca[_0x56b883(0x10f)]===0x0,_0x3aed0d=_0x3d3aca?.[_0x56b883(0xe8)](_0x4fe94f=>_0x4fe94f['roleType']===_0x56b883(0xf7))??![];if(_0x2ffdf2==='grant'&&(_0x16c68a||_0x3aed0d))return{'roles':_0x3d3aca??null,'changed':![]};let _0x3a1d92=_0x16c68a||_0x3aed0d?_0x2f29f6[_0x56b883(0xcc)](_0x3719b2=>_0x3719b2['id']>0x0):[..._0x3d3aca];const _0xde7d64=_0x3a1d92[_0x56b883(0xe8)](_0x39397d=>_0x39397d['id']===_0x27d279['id']);if(_0x2ffdf2===_0x56b883(0xe3)){if(_0xde7d64)return{'roles':_0x3a1d92,'changed':![]};return _0x3a1d92['push'](asPermitRole(_0x27d279)),{'roles':_0x3a1d92,'changed':!![]};}if(!_0xde7d64)return{'roles':_0x3a1d92,'changed':_0x16c68a||_0x3aed0d};_0x3a1d92=_0x3a1d92['filter'](_0x431394=>_0x431394['id']!==_0x27d279['id']);if(_0x3a1d92[_0x56b883(0x10f)]===0x0)throw CliErrors['validation'](_0x56b883(0xf8),'The\x20current\x20service\x20contract\x20does\x20not\x20persist\x20an\x20empty\x20rolePermit;\x20grant\x20another\x20role\x20first.');return{'roles':_0x3a1d92,'changed':!![]};}export function projectRuntimePagePermit(_0xbb5f20){const _0x2ce0ed=a45_0x26527e,_0x4402d7={'menuId':_0xbb5f20[_0x2ce0ed(0xe4)],'pageId':_0xbb5f20[_0x2ce0ed(0xf4)],'appCode':_0xbb5f20[_0x2ce0ed(0xde)],'datasetCode':_0xbb5f20[_0x2ce0ed(0xdb)]};for(const _0x49adc5 of PAGE_SLOT_SPECS){const _0x1d0ef6=_0xbb5f20[_0x49adc5['key']];_0x1d0ef6&&(_0x4402d7[_0x49adc5['key']]={'resourceCode':_0x1d0ef6[_0x2ce0ed(0xd0)],'resourceType':_0x1d0ef6[_0x2ce0ed(0xf6)],'roles':(_0x1d0ef6[_0x2ce0ed(0xfd)]??[])['map'](_0x21304a=>({'id':_0x21304a['id'],'roleName':_0x21304a[_0x2ce0ed(0xdc)],'roleType':_0x21304a['roleType']}))});}return _0x4402d7;}export function flattenRuntimeMenuRolePermits(_0x2c4d35){const _0x47ffc9=[],_0x33168f=_0x514001=>{const _0x14d93b=a45_0xca9a;_0x47ffc9['push'](_0x514001);for(const _0x4fd433 of _0x514001[_0x14d93b(0x111)]??[])_0x33168f(_0x4fd433);};for(const _0x5060a2 of _0x2c4d35)_0x33168f(_0x5060a2);return _0x47ffc9;}export function runtimePermitWriteResult(_0x26e8fa,_0x28ace7,_0x232083,_0x11d264,_0x4943da,_0x5008ee=[]){const _0x426079=a45_0x26527e;return{'operation':_0x26e8fa,'scope':_0x426079(0xd6),'selector':_0x28ace7,'before':_0x232083,'after':_0x11d264,'dryRun':![],'backend':_0x4943da,'warnings':_0x5008ee};}export function menuPermitDto(_0x14e6b3,_0x123658,_0x371781){const _0x49948f=a45_0x26527e;return{..._0x123658[_0x49948f(0xe7)]!=null?{'id':_0x123658[_0x49948f(0xe7)]}:{},'appCode':_0x14e6b3,'menuId':_0x123658['id'],'pageId':_0x123658['pageId']??null,'resourceCode':String(_0x123658['id']),'resourceType':_0x49948f(0xe5),'resourceName':_0x123658[_0x49948f(0xf2)],'rolePermit':_0x371781};}
1
+ const a45_0x5bed06=a45_0x2438;(function(_0xfa5b0f,_0x27462d){const _0x59defa=a45_0x2438,_0x4ac8eb=_0xfa5b0f();while(!![]){try{const _0x553d78=parseInt(_0x59defa(0xe2))/0x1*(parseInt(_0x59defa(0xe4))/0x2)+-parseInt(_0x59defa(0x104))/0x3*(-parseInt(_0x59defa(0xdf))/0x4)+-parseInt(_0x59defa(0xf7))/0x5*(-parseInt(_0x59defa(0xc0))/0x6)+-parseInt(_0x59defa(0xf6))/0x7+-parseInt(_0x59defa(0xe9))/0x8*(-parseInt(_0x59defa(0xf3))/0x9)+-parseInt(_0x59defa(0xbc))/0xa*(-parseInt(_0x59defa(0xfc))/0xb)+-parseInt(_0x59defa(0xec))/0xc;if(_0x553d78===_0x27462d)break;else _0x4ac8eb['push'](_0x4ac8eb['shift']());}catch(_0x81fefa){_0x4ac8eb['push'](_0x4ac8eb['shift']());}}}(a45_0x325d,0xb88bb));function a45_0x2438(_0x2c5131,_0x53e10e){_0x2c5131=_0x2c5131-0xba;const _0x325d72=a45_0x325d();let _0x2438a8=_0x325d72[_0x2c5131];return _0x2438a8;}function a45_0x325d(){const _0x4b7dfa=['24EDoWKx','\x22\x20is\x20ambiguous.','menuId','23YNnlwy','trim','73154JcIrXg','push','find','key','Pass\x20exactly\x20one\x20of\x20--grant\x20or\x20--revoke.','1618888mApemZ','Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name','\x20has\x20full\x20runtime\x20access\x20and\x20cannot\x20be\x20a\x20resource\x20permission\x20target.','26060460emXPLn','\x22\x20was\x20not\x20found.','The\x20current\x20service\x20contract\x20does\x20not\x20persist\x20an\x20empty\x20rolePermit;\x20grant\x20another\x20role\x20first.','some','dataDelete','ALL','Cannot\x20change\x20resource\x20permissions\x20for\x20','27klcVVu','grant','export-roles','5887910touJjn','2180590IHsTST','MENU','dataCreate','ADMIN','filter','88zRMObF','SELF\x20is\x20only\x20valid\x20for\x20--row-roles.','Grant\x20the\x20selected\x20resources\x20to\x20the\x20role','menu-id','revoke','validation','detail-roles','children','134796lnqREl','Cannot\x20revoke\x20the\x20last\x20role\x20from\x20a\x20runtime\x20resource.','Runtime\x20menu\x20ID','string','length','pageId','menuPermit','Ask\x20an\x20application\x20manager\x20to\x20perform\x20this\x20operation.','create-roles','1473190CCLsiZ','update-roles','datasetCode','Use\x20a\x20role\x20ID\x20from\x20`lovrabet\x20role\x20list`.','12whBVwB','values','ADMIN\x20and\x20OWNER\x20have\x20full\x20runtime\x20access;\x20configure\x20USER\x20or\x20CUSTOM\x20instead.','Revoke\x20the\x20selected\x20resources\x20from\x20the\x20role','\x20must\x20contain\x20at\x20least\x20one\x20value.','role','Permission\x20role\x20\x22','roleName','dataUpdate','rolePermit','Cannot\x20resolve\x20the\x20current\x20AK\x20userId\x20for\x20permission\x20management.','OWNER','userId','toUpperCase','boolean','roleType','test','isSafeInteger','label','appCode','Runtime\x20resource\x20permission\x20changes\x20require\x20an\x20ADMIN\x20or\x20OWNER\x20role.','Comma-separated\x20runtime\x20role\x20IDs\x20or\x20names','split','Configure\x20USER,\x20CUSTOM,\x20or\x20an\x20applicable\x20special\x20role\x20instead.','map','flag','dataPermit','delete-roles','resourceType','\x20runtime\x20role\x20','permitId'];a45_0x325d=function(){return _0x4b7dfa;};return a45_0x325d();}import{getLoginUserInfo,listRuntimePermitRoles,listRuntimeRoleUsers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const MENU_ID_FLAG={'name':a45_0x5bed06(0xff),'type':'number','required':!![],'description':a45_0x5bed06(0x106)};export const ROLE_REF_FLAG={'name':a45_0x5bed06(0xc5),'type':a45_0x5bed06(0x107),'required':!![],'description':a45_0x5bed06(0xea)};export const GRANT_FLAG={'name':a45_0x5bed06(0xf4),'type':a45_0x5bed06(0xce),'description':a45_0x5bed06(0xfe)};export const REVOKE_FLAG={'name':a45_0x5bed06(0x100),'type':a45_0x5bed06(0xce),'description':a45_0x5bed06(0xc3)};export const PAGE_SLOT_SPECS=[{'flag':'menu-roles','key':a45_0x5bed06(0x10a),'allowSelf':![]},{'flag':a45_0x5bed06(0xbb),'key':a45_0x5bed06(0xf9),'allowSelf':![]},{'flag':a45_0x5bed06(0xbd),'key':a45_0x5bed06(0xc8),'allowSelf':![]},{'flag':a45_0x5bed06(0xdb),'key':a45_0x5bed06(0xf0),'allowSelf':![]},{'flag':a45_0x5bed06(0x102),'key':'dataDetail','allowSelf':![]},{'flag':a45_0x5bed06(0xf5),'key':'dataExport','allowSelf':![]},{'flag':'row-roles','key':a45_0x5bed06(0xda),'allowSelf':!![]}];export const PAGE_ROLE_FLAGS=PAGE_SLOT_SPECS[a45_0x5bed06(0xd8)](_0x4ef2e2=>({'name':_0x4ef2e2[a45_0x5bed06(0xd9)],'type':a45_0x5bed06(0x107),'description':a45_0x5bed06(0xd5)}));export function splitRefs(_0xa96626,_0x2d7bd3){const _0x146e91=a45_0x5bed06,_0xb9181c=[...new Set(_0xa96626[_0x146e91(0xd6)](',')[_0x146e91(0xd8)](_0x33ee5d=>_0x33ee5d[_0x146e91(0xe3)]())[_0x146e91(0xfb)](Boolean))];if(_0xb9181c[_0x146e91(0x108)]===0x0)throw CliErrors['validation'](_0x2d7bd3+_0x146e91(0xc4));return _0xb9181c;}export function assertGrantOrRevoke(_0x13064f,_0xc99858){const _0x45106f=a45_0x5bed06;if(_0x13064f===_0xc99858)throw CliErrors[_0x45106f(0x101)](_0x45106f(0xe8));return _0x13064f?_0x45106f(0xf4):_0x45106f(0x100);}function resolvePermitRole(_0x258dc4,_0x327ab2){const _0x48d718=a45_0x5bed06,_0x2da6c8=_0x327ab2[_0x48d718(0xe3)](),_0x1703cf=/^-?\d+$/[_0x48d718(0xd0)](_0x2da6c8)?_0x258dc4[_0x48d718(0xfb)](_0x238c58=>_0x238c58['id']===Number(_0x2da6c8)):_0x258dc4[_0x48d718(0xfb)](_0x65ab8c=>_0x65ab8c[_0x48d718(0xc7)]===_0x2da6c8||_0x65ab8c['roleType']===_0x2da6c8[_0x48d718(0xcd)]());if(_0x1703cf[_0x48d718(0x108)]!==0x1)throw CliErrors[_0x48d718(0x101)](_0x1703cf[_0x48d718(0x108)]===0x0?'Permission\x20role\x20\x22'+_0x2da6c8+_0x48d718(0xed):_0x48d718(0xc6)+_0x2da6c8+_0x48d718(0xe0),_0x48d718(0xbf));return _0x1703cf[0x0];}export async function resolveRuntimePermitRoles(_0x3f8849,_0x6e1f7a,_0x276917){const _0xf0de24=a45_0x5bed06,_0x3d5779=await listRuntimePermitRoles(_0x3f8849,{'needSelf':!![],'needPublic':!![]}),_0x47130b=[...new Map(_0x6e1f7a[_0xf0de24(0xd8)](_0xbf6fe3=>resolvePermitRole(_0x3d5779,_0xbf6fe3))['map'](_0x5083d2=>[_0x5083d2['id'],_0x5083d2]))[_0xf0de24(0xc1)]()],_0x1f6e6b=_0x47130b[_0xf0de24(0xe6)](_0x186a35=>_0x186a35[_0xf0de24(0xcf)]===_0xf0de24(0xfa)||_0x186a35['roleType']==='OWNER');if(_0x1f6e6b)throw CliErrors['validation'](_0x1f6e6b[_0xf0de24(0xcf)]+_0xf0de24(0xeb),_0xf0de24(0xd7));if(!_0x276917&&_0x47130b[_0xf0de24(0xef)](_0x287d89=>_0x287d89[_0xf0de24(0xcf)]==='SELF'))throw CliErrors[_0xf0de24(0x101)](_0xf0de24(0xfd));return _0x47130b;}export async function assertRuntimePermissionManager(_0x9d9d74){const _0x476f74=a45_0x5bed06,_0x15d50e=await getLoginUserInfo(),_0x29c15f=_0x15d50e[_0x476f74(0xcc)]??_0x15d50e['id'],_0x2c6878=Number(_0x29c15f);if(!Number[_0x476f74(0xd1)](_0x2c6878)||_0x2c6878<=0x0)throw CliErrors[_0x476f74(0x101)](_0x476f74(0xca));const _0x82be4a=await listRuntimeRoleUsers(_0x9d9d74),_0x1976d1=_0x82be4a[_0x476f74(0xef)](_0x27315e=>(_0x27315e[_0x476f74(0xcf)]==='ADMIN'||_0x27315e['roleType']===_0x476f74(0xcb))&&_0x27315e['userList']['some'](_0x216b0c=>_0x216b0c[_0x476f74(0xcc)]===_0x2c6878));if(!_0x1976d1)throw CliErrors['validation'](_0x476f74(0xd4),_0x476f74(0xba));}export function assertRuntimePermitRoleConfigurable(_0x1bded4){const _0x2e6fd6=a45_0x5bed06;if(_0x1bded4[_0x2e6fd6(0xcf)]===_0x2e6fd6(0xfa)||_0x1bded4[_0x2e6fd6(0xcf)]===_0x2e6fd6(0xcb))throw CliErrors[_0x2e6fd6(0x101)](_0x2e6fd6(0xf2)+_0x1bded4[_0x2e6fd6(0xcf)]+_0x2e6fd6(0xdd)+_0x1bded4[_0x2e6fd6(0xc7)]+'.',_0x2e6fd6(0xc2));}function asPermitRole(_0x3176a9){return{'id':_0x3176a9['id'],'roleName':_0x3176a9['roleName'],'roleType':_0x3176a9['roleType'],'allowed':!![]};}export function applyRuntimeRolePermission(_0x5a4952,_0x40a26a,_0x2c6ccf,_0x310a28){const _0xdb5216=a45_0x5bed06,_0x1548b9=!_0x5a4952||_0x5a4952[_0xdb5216(0x108)]===0x0,_0x388b46=_0x5a4952?.[_0xdb5216(0xef)](_0x1d2829=>_0x1d2829[_0xdb5216(0xcf)]===_0xdb5216(0xf1))??![];if(_0x310a28===_0xdb5216(0xf4)&&(_0x1548b9||_0x388b46))return{'roles':_0x5a4952??null,'changed':![]};let _0x44fc6e=_0x1548b9||_0x388b46?_0x2c6ccf[_0xdb5216(0xfb)](_0x34e670=>_0x34e670['id']>0x0):[..._0x5a4952];const _0x434302=_0x44fc6e[_0xdb5216(0xef)](_0x2c1a70=>_0x2c1a70['id']===_0x40a26a['id']);if(_0x310a28===_0xdb5216(0xf4)){if(_0x434302)return{'roles':_0x44fc6e,'changed':![]};return _0x44fc6e[_0xdb5216(0xe5)](asPermitRole(_0x40a26a)),{'roles':_0x44fc6e,'changed':!![]};}if(!_0x434302)return{'roles':_0x44fc6e,'changed':_0x1548b9||_0x388b46};_0x44fc6e=_0x44fc6e['filter'](_0x532321=>_0x532321['id']!==_0x40a26a['id']);if(_0x44fc6e['length']===0x0)throw CliErrors['validation'](_0xdb5216(0x105),_0xdb5216(0xee));return{'roles':_0x44fc6e,'changed':!![]};}export function projectRuntimePagePermit(_0x143044){const _0x2212ec=a45_0x5bed06,_0x175bd8={'menuId':_0x143044[_0x2212ec(0xe1)],'pageId':_0x143044[_0x2212ec(0x109)],'appCode':_0x143044[_0x2212ec(0xd3)],'datasetCode':_0x143044[_0x2212ec(0xbe)]};for(const _0x13ccc8 of PAGE_SLOT_SPECS){const _0x8f5d05=_0x143044[_0x13ccc8[_0x2212ec(0xe7)]];_0x8f5d05&&(_0x175bd8[_0x13ccc8['key']]={'resourceCode':_0x8f5d05['resourceCode'],'resourceType':_0x8f5d05[_0x2212ec(0xdc)],'roles':(_0x8f5d05[_0x2212ec(0xc9)]??[])[_0x2212ec(0xd8)](_0x4a6117=>({'id':_0x4a6117['id'],'roleName':_0x4a6117[_0x2212ec(0xc7)],'roleType':_0x4a6117[_0x2212ec(0xcf)]}))});}return _0x175bd8;}export function flattenRuntimeMenuRolePermits(_0x285eed){const _0x1dbb06=[],_0x3e2b01=_0x166cbb=>{const _0x4d3ced=a45_0x2438;_0x1dbb06[_0x4d3ced(0xe5)](_0x166cbb);for(const _0x6d228a of _0x166cbb[_0x4d3ced(0x103)]??[])_0x3e2b01(_0x6d228a);};for(const _0xea76f1 of _0x285eed)_0x3e2b01(_0xea76f1);return _0x1dbb06;}export function runtimePermitWriteResult(_0x37b7dd,_0x2f029b,_0x3bef19,_0x3de874,_0x22a6e5,_0xa8aa9e=[]){return{'operation':_0x37b7dd,'scope':'runtime','selector':_0x2f029b,'before':_0x3bef19,'after':_0x3de874,'dryRun':![],'backend':_0x22a6e5,'warnings':_0xa8aa9e};}export function menuPermitDto(_0x1ee9cd,_0x149991,_0x12edd5){const _0xc5f787=a45_0x5bed06;return{..._0x149991[_0xc5f787(0xde)]!=null?{'id':_0x149991[_0xc5f787(0xde)]}:{},'appCode':_0x1ee9cd,'menuId':_0x149991['id'],'pageId':_0x149991[_0xc5f787(0x109)]??null,'resourceCode':String(_0x149991['id']),'resourceType':_0xc5f787(0xf8),'resourceName':_0x149991[_0xc5f787(0xd2)],'rolePermit':_0x12edd5};}
@@ -1 +1 @@
1
- const a46_0x386d4b=a46_0xfefd;(function(_0x5e9911,_0x148b07){const _0x5e9642=a46_0xfefd,_0x248e15=_0x5e9911();while(!![]){try{const _0x1638b9=-parseInt(_0x5e9642(0x21c))/0x1+-parseInt(_0x5e9642(0x1fb))/0x2+-parseInt(_0x5e9642(0x21b))/0x3*(-parseInt(_0x5e9642(0x206))/0x4)+-parseInt(_0x5e9642(0x1fa))/0x5*(parseInt(_0x5e9642(0x1f9))/0x6)+-parseInt(_0x5e9642(0x211))/0x7+parseInt(_0x5e9642(0x1ea))/0x8+parseInt(_0x5e9642(0x1e8))/0x9;if(_0x1638b9===_0x148b07)break;else _0x248e15['push'](_0x248e15['shift']());}catch(_0x4f9f0e){_0x248e15['push'](_0x248e15['shift']());}}}(a46_0x7a76,0x399e7));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalBff,executePersonalBff,getPersonalBff,listPersonalBffs,updatePersonalBff}from'../../core/api-client.js';import{ID_FLAG,PARAMS_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';function a46_0xfefd(_0x1b631,_0xb3b2f){_0x1b631=_0x1b631-0x1de;const _0x7a7632=a46_0x7a76();let _0xfefd99=_0x7a7632[_0x1b631];return _0xfefd99;}import{parseJsonParams}from'../../utils/params.js';const FUNCTION_NAME_PATTERN=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/,FILE_FLAG={'name':'file','type':'string','description':a46_0x386d4b(0x205)},FUNCTION_NAME_FLAG={'name':a46_0x386d4b(0x21f),'type':'string','required':!![],'description':a46_0x386d4b(0x207)},DESCRIPTION_FLAG={'name':a46_0x386d4b(0x1ec),'type':a46_0x386d4b(0x1eb),'description':a46_0x386d4b(0x20f)},SOURCE_SESSION_FLAG={'name':a46_0x386d4b(0x201),'type':'string','description':a46_0x386d4b(0x1e5)};function normalizeFunctionName(_0x148cf3){const _0x15ce21=a46_0x386d4b,_0x5f0818=String(_0x148cf3||'')[_0x15ce21(0x21a)]();if(!_0x5f0818||!FUNCTION_NAME_PATTERN['test'](_0x5f0818))throw CliErrors['validation'](_0x15ce21(0x1df));return _0x5f0818;}function readScriptFile(_0x5de2dc){const _0x43f685=a46_0x386d4b;if(!_0x5de2dc)throw CliErrors[_0x43f685(0x212)](_0x43f685(0x20c));if(!existsSync(_0x5de2dc))throw CliErrors[_0x43f685(0x212)](_0x43f685(0x1fd)+_0x5de2dc);if(!statSync(_0x5de2dc)[_0x43f685(0x1de)]())throw CliErrors[_0x43f685(0x212)](_0x43f685(0x219)+_0x5de2dc);const _0x3d95f9=readFileSync(_0x5de2dc,_0x43f685(0x20b));if(!_0x3d95f9[_0x43f685(0x21a)]())throw CliErrors[_0x43f685(0x212)](_0x43f685(0x200));return _0x3d95f9;}function optionalTrimmed(_0x1d7eb9){const _0x162aba=a46_0x386d4b,_0xff11ea=String(_0x1d7eb9||'')[_0x162aba(0x21a)]();return _0xff11ea||undefined;}function summarizeBff(_0x516800){const _0x3bb80d=a46_0x386d4b;return{'id':_0x516800['id'],'appCode':_0x516800['appCode'],'functionName':_0x516800[_0x3bb80d(0x1e9)],'description':_0x516800[_0x3bb80d(0x1ec)],'scriptType':_0x516800[_0x3bb80d(0x1f7)],'version':_0x516800[_0x3bb80d(0x20d)],'gmtModified':_0x516800[_0x3bb80d(0x1f1)],'updateTime':_0x516800[_0x3bb80d(0x1e7)]};}function detailBff(_0x172bfa){const _0x31c346=a46_0x386d4b;return{'id':_0x172bfa['id'],'appCode':_0x172bfa[_0x31c346(0x208)],'functionName':_0x172bfa[_0x31c346(0x1e9)],'description':_0x172bfa[_0x31c346(0x1ec)],'scriptType':_0x172bfa[_0x31c346(0x1f7)],'scriptContent':_0x172bfa['scriptContent']??'','config':_0x172bfa[_0x31c346(0x20a)],'version':_0x172bfa[_0x31c346(0x20d)],'createUserId':_0x172bfa[_0x31c346(0x1e3)],'gmtCreate':_0x172bfa['gmtCreate'],'gmtModified':_0x172bfa[_0x31c346(0x1f1)],'createTime':_0x172bfa[_0x31c346(0x202)],'updateTime':_0x172bfa['updateTime']};}function a46_0x7a76(){const _0x2b00fd=['create','gmtModified','read','exec','把本地脚本保存为个人\x20BFF;之后可在当前应用中调用该脚本。','length','Preview:\x20create\x20personal\x20BFF\x20','scriptType','personal-bff\x20update\x20requires\x20at\x20least\x20one\x20of\x20--name,\x20--description,\x20--file,\x20or\x20--source-session-id.','16974vcoopd','460ZVYMya','669526bNUpKS','personal-bff','File\x20not\x20found:\x20','list','scriptContent','Personal\x20BFF\x20script\x20file\x20is\x20blank.','source-session-id','createTime','keys','Preview:\x20update\x20personal\x20BFF\x20','Path\x20to\x20a\x20local\x20UTF-8\x20JavaScript\x20or\x20TypeScript\x20file','24PFBQWy','Personal\x20BFF\x20functionName,\x20for\x20example\x20loadOrders','appCode','bool','config','utf8','File\x20path\x20is\x20required.','version','根据\x20ID\x20执行个人\x20BFF,并可传入\x20JSON\x20参数','Personal\x20BFF\x20description','detail','1611519AhxitC','validation','Show\x20one\x20personal\x20BFF\x20by\x20id','根据\x20ID\x20更新个人\x20BFF','build','/client/runtime-bff/personal/','执行个人\x20BFF\x20脚本;脚本可能读取或修改业务数据,也可能调用外部服务。','List\x20current\x20user\x27s\x20personal\x20BFF\x20scripts\x20for\x20the\x20current\x20app','File\x20is\x20not\x20a\x20regular\x20file:\x20','trim','151773xJsHyb','175563vBzdVS','update','map','name','verbose','JSON\x20object\x20passed\x20to\x20the\x20personal\x20BFF\x20execution','flag','Personal\x20BFF\x20script\x20ID','file','/client/runtime-bff/personal/create','POST','isFile','--name\x20must\x20be\x20a\x20valid\x20JavaScript\x20identifier,\x20for\x20example\x20loadOrders.','write','num','isArray','createUserId','params','Optional\x20source\x20RuntimeAgent\x20session\x20id','--params\x20must\x20be\x20a\x20JSON\x20object.','updateTime','6980085UYdEji','functionName','1261656bCspXY','string','description','更新个人\x20BFF\x20的脚本或元信息;之后的调用将使用新版本。','str','body'];a46_0x7a76=function(){return _0x2b00fd;};return a46_0x7a76();}function buildCreateInput(_0x42e872){const _0x1cc679=a46_0x386d4b;return{'functionName':normalizeFunctionName(_0x42e872['str'](_0x1cc679(0x21f))),...optionalTrimmed(_0x42e872[_0x1cc679(0x1ee)](_0x1cc679(0x1ec)))?{'description':optionalTrimmed(_0x42e872['str']('description'))}:{},'scriptContent':readScriptFile(_0x42e872[_0x1cc679(0x1ee)](_0x1cc679(0x224))),...optionalTrimmed(_0x42e872['str'](_0x1cc679(0x201)))?{'sourceSessionId':optionalTrimmed(_0x42e872[_0x1cc679(0x1ee)]('source-session-id'))}:{}};}function buildUpdateInput(_0x3dd959){const _0xbedb3d=a46_0x386d4b,_0x38d65d={};optionalTrimmed(_0x3dd959[_0xbedb3d(0x1ee)](_0xbedb3d(0x21f)))&&(_0x38d65d['functionName']=normalizeFunctionName(_0x3dd959[_0xbedb3d(0x1ee)]('name')));_0x3dd959[_0xbedb3d(0x222)]('description')!==undefined&&(_0x38d65d[_0xbedb3d(0x1ec)]=_0x3dd959[_0xbedb3d(0x1ee)]('description'));optionalTrimmed(_0x3dd959[_0xbedb3d(0x1ee)]('file'))&&(_0x38d65d[_0xbedb3d(0x1ff)]=readScriptFile(_0x3dd959[_0xbedb3d(0x1ee)](_0xbedb3d(0x224))));_0x3dd959[_0xbedb3d(0x222)](_0xbedb3d(0x201))!==undefined&&(_0x38d65d['sourceSessionId']=_0x3dd959['str'](_0xbedb3d(0x201)));if(Object[_0xbedb3d(0x203)](_0x38d65d)[_0xbedb3d(0x1f5)]===0x0)throw CliErrors['validation'](_0xbedb3d(0x1f8));return _0x38d65d;}function parseExecParams(_0x48822d){const _0x44fe46=a46_0x386d4b,_0x3d7dd1=parseJsonParams(_0x48822d)??{};if(Array[_0x44fe46(0x1e2)](_0x3d7dd1))throw CliErrors['validation'](_0x44fe46(0x1e6));return _0x3d7dd1;}const personalBffList={'service':a46_0x386d4b(0x1fc),'command':a46_0x386d4b(0x1fe),'description':a46_0x386d4b(0x218),'risk':a46_0x386d4b(0x1f2),'flags':[VERBOSE_FLAG],async 'execute'(_0x9799d6){const _0x404fff=a46_0x386d4b,_0x576a9a=await listPersonalBffs(_0x9799d6[_0x404fff(0x208)]);return{'ok':!![],'data':{'total':_0x576a9a[_0x404fff(0x1f5)],'items':_0x9799d6[_0x404fff(0x209)](_0x404fff(0x220))?_0x576a9a:_0x576a9a[_0x404fff(0x21e)](summarizeBff)}};}},personalBffDetail={'service':a46_0x386d4b(0x1fc),'command':a46_0x386d4b(0x210),'description':a46_0x386d4b(0x213),'risk':a46_0x386d4b(0x1f2),'flags':[{...ID_FLAG,'description':a46_0x386d4b(0x223)}],async 'execute'(_0x3ed416){const _0x2384a4=a46_0x386d4b,_0x2b02ef=await getPersonalBff(_0x3ed416['num']('id'),_0x3ed416[_0x2384a4(0x208)]);return{'ok':!![],'data':detailBff(_0x2b02ef)};}},personalBffCreate={'service':a46_0x386d4b(0x1fc),'command':a46_0x386d4b(0x1f0),'description':'根据本地脚本文件创建个人\x20BFF','risk':a46_0x386d4b(0x1e0),'confirmationDescription':a46_0x386d4b(0x1f4),'flags':[FUNCTION_NAME_FLAG,{...FILE_FLAG,'required':!![]},DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x1534af){const _0x73d94b=a46_0x386d4b,_0x1f4768=buildCreateInput(_0x1534af),_0x3858b0=await createPersonalBff(_0x1534af[_0x73d94b(0x208)],_0x1f4768);return{'ok':!![],'data':detailBff(_0x3858b0),'message':'Created\x20personal\x20BFF\x20'+_0x3858b0['id']+(_0x3858b0[_0x73d94b(0x1e9)]?'\x20('+_0x3858b0[_0x73d94b(0x1e9)]+')':'')};},async 'dryRun'(_0x1beeb9){const _0x2710c8=a46_0x386d4b,_0x1d9a62=buildCreateInput(_0x1beeb9);return dryRun(_0x2710c8(0x226),_0x2710c8(0x225))[_0x2710c8(0x1ef)]({'appCode':_0x1beeb9[_0x2710c8(0x208)],..._0x1d9a62})[_0x2710c8(0x1ec)](_0x2710c8(0x1f6)+_0x1d9a62[_0x2710c8(0x1e9)])[_0x2710c8(0x215)]();}},personalBffUpdate={'service':a46_0x386d4b(0x1fc),'command':a46_0x386d4b(0x21d),'description':a46_0x386d4b(0x214),'risk':a46_0x386d4b(0x1e0),'confirmationDescription':a46_0x386d4b(0x1ed),'flags':[{...ID_FLAG,'description':a46_0x386d4b(0x223)},{...FUNCTION_NAME_FLAG,'required':![]},FILE_FLAG,DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x40a010){const _0xa896c4=a46_0x386d4b,_0x5c0947=_0x40a010[_0xa896c4(0x1e1)]('id'),_0x464310=buildUpdateInput(_0x40a010),_0xc585d7=await updatePersonalBff(_0x5c0947,_0x40a010[_0xa896c4(0x208)],_0x464310);return{'ok':!![],'data':detailBff(_0xc585d7),'message':'Updated\x20personal\x20BFF\x20'+_0xc585d7['id']+(_0xc585d7[_0xa896c4(0x1e9)]?'\x20('+_0xc585d7[_0xa896c4(0x1e9)]+')':'')};},async 'dryRun'(_0x3cf4d6){const _0x3aca13=a46_0x386d4b,_0xcec296=_0x3cf4d6[_0x3aca13(0x1e1)]('id'),_0x592033=buildUpdateInput(_0x3cf4d6);return dryRun(_0x3aca13(0x226),_0x3aca13(0x216)+_0xcec296+'/update')[_0x3aca13(0x1ef)]({'appCode':_0x3cf4d6[_0x3aca13(0x208)],..._0x592033})[_0x3aca13(0x1ec)](_0x3aca13(0x204)+_0xcec296)[_0x3aca13(0x215)]();}},personalBffExec={'service':a46_0x386d4b(0x1fc),'command':a46_0x386d4b(0x1f3),'description':a46_0x386d4b(0x20e),'risk':a46_0x386d4b(0x1e0),'confirmationDescription':a46_0x386d4b(0x217),'flags':[{...ID_FLAG,'description':a46_0x386d4b(0x223)},{...PARAMS_FLAG,'description':a46_0x386d4b(0x221)}],async 'validate'(_0x5f1fc4){const _0x1a6c73=a46_0x386d4b;parseExecParams(_0x5f1fc4['str'](_0x1a6c73(0x1e4)));},async 'execute'(_0x3b9bd2){const _0x88e831=a46_0x386d4b,_0x11ad00=_0x3b9bd2[_0x88e831(0x1e1)]('id'),_0x848e9a=parseExecParams(_0x3b9bd2['str']('params')),_0x555a5d=await executePersonalBff(_0x11ad00,_0x3b9bd2[_0x88e831(0x208)],_0x848e9a);return{'ok':!![],'data':{'result':_0x555a5d},'message':'Executed\x20personal\x20BFF\x20'+_0x11ad00};}};export const personalBffDefinitions=[personalBffList,personalBffDetail,personalBffCreate,personalBffUpdate,personalBffExec];
1
+ const a46_0x1f2b98=a46_0x4c85;(function(_0xa1d500,_0x448f7a){const _0x1f2bd5=a46_0x4c85,_0x237d9a=_0xa1d500();while(!![]){try{const _0x342f67=parseInt(_0x1f2bd5(0x7f))/0x1+-parseInt(_0x1f2bd5(0x99))/0x2+-parseInt(_0x1f2bd5(0x7d))/0x3+-parseInt(_0x1f2bd5(0xac))/0x4*(-parseInt(_0x1f2bd5(0xae))/0x5)+-parseInt(_0x1f2bd5(0x83))/0x6+parseInt(_0x1f2bd5(0x9e))/0x7*(-parseInt(_0x1f2bd5(0x78))/0x8)+parseInt(_0x1f2bd5(0x79))/0x9*(parseInt(_0x1f2bd5(0xb3))/0xa);if(_0x342f67===_0x448f7a)break;else _0x237d9a['push'](_0x237d9a['shift']());}catch(_0x156fbb){_0x237d9a['push'](_0x237d9a['shift']());}}}(a46_0xa12b,0x27e19));function a46_0xa12b(){const _0x330450=['verbose','test','description','isArray','7MzeZrP','detail','执行个人\x20BFF\x20脚本;脚本可能读取或修改业务数据,也可能调用外部服务。','string','build','createUserId','Preview:\x20update\x20personal\x20BFF\x20','根据本地脚本文件创建个人\x20BFF','str','updateTime','update','functionName','gmtModified','更新个人\x20BFF\x20的脚本或元信息;之后的调用将使用新版本。','348092UqTvDT','Personal\x20BFF\x20description','5ZoHlBQ','length','Updated\x20personal\x20BFF\x20','File\x20path\x20is\x20required.','source-session-id','140HopTYj','POST','create','file','appCode','/client/runtime-bff/personal/','Personal\x20BFF\x20script\x20file\x20is\x20blank.','scriptContent','read','scriptType','List\x20current\x20user\x27s\x20personal\x20BFF\x20scripts\x20for\x20the\x20current\x20app','169064OMFHHU','330633OyImFO','keys','把本地脚本保存为个人\x20BFF;之后可在当前应用中调用该脚本。','Show\x20one\x20personal\x20BFF\x20by\x20id','711096UPxbtf','config','46811TKDgCO','validation','--name\x20must\x20be\x20a\x20valid\x20JavaScript\x20identifier,\x20for\x20example\x20loadOrders.','根据\x20ID\x20执行个人\x20BFF,并可传入\x20JSON\x20参数','441396jUlxdw','write','personal-bff','flag','num','trim','Preview:\x20create\x20personal\x20BFF\x20','name','/update','Personal\x20BFF\x20functionName,\x20for\x20example\x20loadOrders','File\x20not\x20found:\x20','map','JSON\x20object\x20passed\x20to\x20the\x20personal\x20BFF\x20execution','根据\x20ID\x20更新个人\x20BFF','Personal\x20BFF\x20script\x20ID','params','body','gmtCreate','File\x20is\x20not\x20a\x20regular\x20file:\x20','version','/client/runtime-bff/personal/create','bool','306136ubxMPD'];a46_0xa12b=function(){return _0x330450;};return a46_0xa12b();}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_0x1f2b98(0xb6),'type':a46_0x1f2b98(0xa1),'description':'Path\x20to\x20a\x20local\x20UTF-8\x20JavaScript\x20or\x20TypeScript\x20file'},FUNCTION_NAME_FLAG={'name':a46_0x1f2b98(0x8a),'type':a46_0x1f2b98(0xa1),'required':!![],'description':a46_0x1f2b98(0x8c)},DESCRIPTION_FLAG={'name':a46_0x1f2b98(0x9c),'type':a46_0x1f2b98(0xa1),'description':a46_0x1f2b98(0xad)},SOURCE_SESSION_FLAG={'name':a46_0x1f2b98(0xb2),'type':a46_0x1f2b98(0xa1),'description':'Optional\x20source\x20RuntimeAgent\x20session\x20id'};function normalizeFunctionName(_0x221018){const _0x48e4ee=a46_0x1f2b98,_0x514385=String(_0x221018||'')[_0x48e4ee(0x88)]();if(!_0x514385||!FUNCTION_NAME_PATTERN[_0x48e4ee(0x9b)](_0x514385))throw CliErrors[_0x48e4ee(0x80)](_0x48e4ee(0x81));return _0x514385;}function readScriptFile(_0x4304a4){const _0x4965fe=a46_0x1f2b98;if(!_0x4304a4)throw CliErrors[_0x4965fe(0x80)](_0x4965fe(0xb1));if(!existsSync(_0x4304a4))throw CliErrors[_0x4965fe(0x80)](_0x4965fe(0x8d)+_0x4304a4);if(!statSync(_0x4304a4)['isFile']())throw CliErrors[_0x4965fe(0x80)](_0x4965fe(0x95)+_0x4304a4);const _0x21236b=readFileSync(_0x4304a4,'utf8');if(!_0x21236b['trim']())throw CliErrors['validation'](_0x4965fe(0x73));return _0x21236b;}function optionalTrimmed(_0x77a0a9){const _0x4a6c65=String(_0x77a0a9||'')['trim']();return _0x4a6c65||undefined;}function summarizeBff(_0x4ab334){const _0x31d178=a46_0x1f2b98;return{'id':_0x4ab334['id'],'appCode':_0x4ab334[_0x31d178(0xb7)],'functionName':_0x4ab334[_0x31d178(0xa9)],'description':_0x4ab334[_0x31d178(0x9c)],'scriptType':_0x4ab334[_0x31d178(0x76)],'version':_0x4ab334[_0x31d178(0x96)],'gmtModified':_0x4ab334[_0x31d178(0xaa)],'updateTime':_0x4ab334[_0x31d178(0xa7)]};}function detailBff(_0x82452c){const _0x36b733=a46_0x1f2b98;return{'id':_0x82452c['id'],'appCode':_0x82452c['appCode'],'functionName':_0x82452c[_0x36b733(0xa9)],'description':_0x82452c[_0x36b733(0x9c)],'scriptType':_0x82452c[_0x36b733(0x76)],'scriptContent':_0x82452c[_0x36b733(0x74)]??'','config':_0x82452c[_0x36b733(0x7e)],'version':_0x82452c[_0x36b733(0x96)],'createUserId':_0x82452c[_0x36b733(0xa3)],'gmtCreate':_0x82452c[_0x36b733(0x94)],'gmtModified':_0x82452c[_0x36b733(0xaa)],'createTime':_0x82452c['createTime'],'updateTime':_0x82452c[_0x36b733(0xa7)]};}function buildCreateInput(_0x240350){const _0x11dbb5=a46_0x1f2b98;return{'functionName':normalizeFunctionName(_0x240350['str'](_0x11dbb5(0x8a))),...optionalTrimmed(_0x240350[_0x11dbb5(0xa6)]('description'))?{'description':optionalTrimmed(_0x240350[_0x11dbb5(0xa6)](_0x11dbb5(0x9c)))}:{},'scriptContent':readScriptFile(_0x240350[_0x11dbb5(0xa6)](_0x11dbb5(0xb6))),...optionalTrimmed(_0x240350[_0x11dbb5(0xa6)]('source-session-id'))?{'sourceSessionId':optionalTrimmed(_0x240350['str']('source-session-id'))}:{}};}function buildUpdateInput(_0x4d9ebb){const _0x11a847=a46_0x1f2b98,_0x3aa95f={};optionalTrimmed(_0x4d9ebb[_0x11a847(0xa6)](_0x11a847(0x8a)))&&(_0x3aa95f['functionName']=normalizeFunctionName(_0x4d9ebb[_0x11a847(0xa6)]('name')));_0x4d9ebb[_0x11a847(0x86)](_0x11a847(0x9c))!==undefined&&(_0x3aa95f['description']=_0x4d9ebb['str']('description'));optionalTrimmed(_0x4d9ebb[_0x11a847(0xa6)](_0x11a847(0xb6)))&&(_0x3aa95f[_0x11a847(0x74)]=readScriptFile(_0x4d9ebb[_0x11a847(0xa6)](_0x11a847(0xb6))));_0x4d9ebb[_0x11a847(0x86)](_0x11a847(0xb2))!==undefined&&(_0x3aa95f['sourceSessionId']=_0x4d9ebb[_0x11a847(0xa6)](_0x11a847(0xb2)));if(Object[_0x11a847(0x7a)](_0x3aa95f)[_0x11a847(0xaf)]===0x0)throw CliErrors[_0x11a847(0x80)]('personal-bff\x20update\x20requires\x20at\x20least\x20one\x20of\x20--name,\x20--description,\x20--file,\x20or\x20--source-session-id.');return _0x3aa95f;}function a46_0x4c85(_0x30c986,_0x4431d9){_0x30c986=_0x30c986-0x73;const _0xa12b58=a46_0xa12b();let _0x4c8591=_0xa12b58[_0x30c986];return _0x4c8591;}function parseExecParams(_0x467bd9){const _0x112e3c=a46_0x1f2b98,_0x57dab3=parseJsonParams(_0x467bd9)??{};if(Array[_0x112e3c(0x9d)](_0x57dab3))throw CliErrors[_0x112e3c(0x80)]('--params\x20must\x20be\x20a\x20JSON\x20object.');return _0x57dab3;}const personalBffList={'service':a46_0x1f2b98(0x85),'command':'list','description':a46_0x1f2b98(0x77),'risk':a46_0x1f2b98(0x75),'flags':[VERBOSE_FLAG],async 'execute'(_0x534944){const _0x2535f7=a46_0x1f2b98,_0xb4999b=await listPersonalBffs(_0x534944[_0x2535f7(0xb7)]);return{'ok':!![],'data':{'total':_0xb4999b['length'],'items':_0x534944[_0x2535f7(0x98)](_0x2535f7(0x9a))?_0xb4999b:_0xb4999b[_0x2535f7(0x8e)](summarizeBff)}};}},personalBffDetail={'service':a46_0x1f2b98(0x85),'command':a46_0x1f2b98(0x9f),'description':a46_0x1f2b98(0x7c),'risk':a46_0x1f2b98(0x75),'flags':[{...ID_FLAG,'description':a46_0x1f2b98(0x91)}],async 'execute'(_0x50289f){const _0xa40301=a46_0x1f2b98,_0x43cd92=await getPersonalBff(_0x50289f[_0xa40301(0x87)]('id'),_0x50289f[_0xa40301(0xb7)]);return{'ok':!![],'data':detailBff(_0x43cd92)};}},personalBffCreate={'service':a46_0x1f2b98(0x85),'command':a46_0x1f2b98(0xb5),'description':a46_0x1f2b98(0xa5),'risk':a46_0x1f2b98(0x84),'confirmationDescription':a46_0x1f2b98(0x7b),'flags':[FUNCTION_NAME_FLAG,{...FILE_FLAG,'required':!![]},DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x5a5791){const _0x25c2a4=a46_0x1f2b98,_0x5d6f3b=buildCreateInput(_0x5a5791),_0x267155=await createPersonalBff(_0x5a5791[_0x25c2a4(0xb7)],_0x5d6f3b);return{'ok':!![],'data':detailBff(_0x267155),'message':'Created\x20personal\x20BFF\x20'+_0x267155['id']+(_0x267155[_0x25c2a4(0xa9)]?'\x20('+_0x267155['functionName']+')':'')};},async 'dryRun'(_0x1c5ea0){const _0x3c96de=a46_0x1f2b98,_0x289d3f=buildCreateInput(_0x1c5ea0);return dryRun('POST',_0x3c96de(0x97))[_0x3c96de(0x93)]({'appCode':_0x1c5ea0['appCode'],..._0x289d3f})['description'](_0x3c96de(0x89)+_0x289d3f[_0x3c96de(0xa9)])['build']();}},personalBffUpdate={'service':a46_0x1f2b98(0x85),'command':a46_0x1f2b98(0xa8),'description':a46_0x1f2b98(0x90),'risk':'write','confirmationDescription':a46_0x1f2b98(0xab),'flags':[{...ID_FLAG,'description':a46_0x1f2b98(0x91)},{...FUNCTION_NAME_FLAG,'required':![]},FILE_FLAG,DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x41b060){const _0x57654d=a46_0x1f2b98,_0x58f998=_0x41b060['num']('id'),_0x5b5e1c=buildUpdateInput(_0x41b060),_0x1c7999=await updatePersonalBff(_0x58f998,_0x41b060[_0x57654d(0xb7)],_0x5b5e1c);return{'ok':!![],'data':detailBff(_0x1c7999),'message':_0x57654d(0xb0)+_0x1c7999['id']+(_0x1c7999[_0x57654d(0xa9)]?'\x20('+_0x1c7999[_0x57654d(0xa9)]+')':'')};},async 'dryRun'(_0x54af4c){const _0x2c34d0=a46_0x1f2b98,_0x18249e=_0x54af4c['num']('id'),_0x27c9c5=buildUpdateInput(_0x54af4c);return dryRun(_0x2c34d0(0xb4),_0x2c34d0(0xb8)+_0x18249e+_0x2c34d0(0x8b))['body']({'appCode':_0x54af4c[_0x2c34d0(0xb7)],..._0x27c9c5})[_0x2c34d0(0x9c)](_0x2c34d0(0xa4)+_0x18249e)[_0x2c34d0(0xa2)]();}},personalBffExec={'service':a46_0x1f2b98(0x85),'command':'exec','description':a46_0x1f2b98(0x82),'risk':a46_0x1f2b98(0x84),'confirmationDescription':a46_0x1f2b98(0xa0),'flags':[{...ID_FLAG,'description':a46_0x1f2b98(0x91)},{...PARAMS_FLAG,'description':a46_0x1f2b98(0x8f)}],async 'validate'(_0x1c7a16){const _0x4b50f9=a46_0x1f2b98;parseExecParams(_0x1c7a16[_0x4b50f9(0xa6)]('params'));},async 'execute'(_0x502179){const _0x2aa6dd=a46_0x1f2b98,_0x417591=_0x502179['num']('id'),_0x19631a=parseExecParams(_0x502179[_0x2aa6dd(0xa6)](_0x2aa6dd(0x92))),_0x4b461e=await executePersonalBff(_0x417591,_0x502179['appCode'],_0x19631a);return{'ok':!![],'data':{'result':_0x4b461e},'message':'Executed\x20personal\x20BFF\x20'+_0x417591};}};export const personalBffDefinitions=[personalBffList,personalBffDetail,personalBffCreate,personalBffUpdate,personalBffExec];
@@ -1 +1 @@
1
- const a47_0x4de89e=a47_0x2aaa;(function(_0x2d71a2,_0x140f46){const _0x225b23=a47_0x2aaa,_0x59bcd1=_0x2d71a2();while(!![]){try{const _0x783240=-parseInt(_0x225b23(0xd6))/0x1+parseInt(_0x225b23(0xc3))/0x2+parseInt(_0x225b23(0xb2))/0x3*(parseInt(_0x225b23(0xb8))/0x4)+parseInt(_0x225b23(0xae))/0x5*(parseInt(_0x225b23(0xbb))/0x6)+-parseInt(_0x225b23(0xd7))/0x7+-parseInt(_0x225b23(0xa9))/0x8+parseInt(_0x225b23(0xd9))/0x9;if(_0x783240===_0x140f46)break;else _0x59bcd1['push'](_0x59bcd1['shift']());}catch(_0x43e55d){_0x59bcd1['push'](_0x59bcd1['shift']());}}}(a47_0x1876,0xeece1));import{authDefinitions}from'../commands/auth/index.js';function a47_0x2aaa(_0x5a8d26,_0x21b8e9){_0x5a8d26=_0x5a8d26-0xa6;const _0x18769c=a47_0x1876();let _0x2aaa82=_0x18769c[_0x5a8d26];return _0x2aaa82;}import{logsDefinitions}from'../commands/logs/index.js';import{skillDefinitions}from'../commands/skill/index.js';import{cliSkillDefinitions}from'../commands/cli-skill/index.js';function a47_0x1876(){const _0x254ef6=['15200696AMbLzO','set','\x20\x20[high-risk-write]','User\x20Accounts','show','305285fSSuDi','Configuration','read','push','10173UiBdPJ','Runtime\x20App\x20Config','app','install','BFF\x20Scripts','app\x20init','1176zDQTKY','login','list','6nazDmU','Use\x20`lovrabet\x20workspace\x20use\x20--app\x20<name>`\x20instead.','service','Datasets','Agent\x20Schedules','write','config-list','values','2717642KlLIJG','Use\x20`lovrabet\x20workspace\x20init\x20--appcode\x20<code>`\x20instead.','Knowledge\x20Base','logs','Runtime\x20Permissions','Skills','File','`lovrabet\x20app\x20init`\x20has\x20been\x20removed.','App\x20Management','Personal\x20BFF','init','Instant\x20API','risk','`lovrabet\x20app\x20use`\x20has\x20been\x20removed.','Authentication','CLI\x20Built-in\x20Skill','defaultCommand','Self\x20Update','get','1272694kMbDwX','11090513ynwBjp','has','29866077hXEoPG','Notification\x20Configs','isSingleCommand','clear','Runtime\x20Roles','map','Workspace','Logs','command','`lovrabet\x20logs\x20clear`\x20has\x20been\x20removed.'];a47_0x1876=function(){return _0x254ef6;};return a47_0x1876();}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(_0x3fc353){const _0x4504e7=a47_0x2aaa;for(const _0x24d6a3 of _0x3fc353){definitions[_0x4504e7(0xaa)](_0x24d6a3[_0x4504e7(0xbd)]+':'+_0x24d6a3[_0x4504e7(0xa7)],_0x24d6a3);let _0x1902fc=serviceGroups[_0x4504e7(0xd5)](_0x24d6a3[_0x4504e7(0xbd)]);!_0x1902fc&&(_0x1902fc=[],serviceGroups[_0x4504e7(0xaa)](_0x24d6a3[_0x4504e7(0xbd)],_0x1902fc)),_0x1902fc['push'](_0x24d6a3);}}function registerService(_0x450847,_0x4f41a8,_0x39d5ba){const _0x47257a=a47_0x2aaa;registerDefinitions(_0x4f41a8);const _0x2ad453=_0x32a067=>_0x32a067===_0x47257a(0xb0)?'':_0x32a067===_0x47257a(0xc0)?'\x20\x20[write]':_0x47257a(0xab),_0x2f3554={'service':_0x4f41a8[0x0][_0x47257a(0xbd)],'label':_0x450847,'commands':_0x4f41a8[_0x47257a(0xde)](_0x3203a3=>({'command':_0x3203a3[_0x47257a(0xa7)],'description':_0x3203a3['description'],'tag':_0x2ad453(_0x3203a3[_0x47257a(0xcf)])})),'defaultCommand':_0x39d5ba?.[_0x47257a(0xd3)]??(_0x39d5ba?.[_0x47257a(0xdb)]?_0x4f41a8[0x0][_0x47257a(0xa7)]:undefined),'isSingleCommand':_0x39d5ba?.['isSingleCommand']};serviceRegistry[_0x47257a(0xb1)](_0x2f3554),serviceByName[_0x47257a(0xaa)](_0x2f3554['service'],_0x2f3554);}registerService(a47_0x4de89e(0xd1),authDefinitions,{'defaultCommand':a47_0x4de89e(0xb9)}),registerService(a47_0x4de89e(0xac),userAccountDefinitions),registerService(a47_0x4de89e(0xcb),appDefinitions,{'defaultCommand':'list'}),registerService(a47_0x4de89e(0xdf),workspaceDefinitions),registerService(a47_0x4de89e(0xb3),appConfigDefinitions),registerService(a47_0x4de89e(0xaf),configDefinitions,{'defaultCommand':a47_0x4de89e(0xba)}),registerService(a47_0x4de89e(0xdd),roleDefinitions,{'defaultCommand':'list'}),registerService(a47_0x4de89e(0xc7),permitDefinitions),registerService('API\x20Documentation',apiDocDefinitions),registerService(a47_0x4de89e(0xbe),datasetDefinitions),registerService(a47_0x4de89e(0xce),dataDefinitions),registerService('SQL\x20Queries',sqlDefinitions),registerService(a47_0x4de89e(0xb6),bffDefinitions),registerService(a47_0x4de89e(0xcc),personalBffDefinitions),registerService('Artifacts',artifactDefinitions),registerService(a47_0x4de89e(0xc9),fileDefinitions),registerService('OCR',ocrDefinitions),registerService(a47_0x4de89e(0xc5),kbDefinitions),registerService(a47_0x4de89e(0xda),notificationDefinitions,{'defaultCommand':a47_0x4de89e(0xc1)}),registerService(a47_0x4de89e(0xbf),scheduleDefinitions,{'defaultCommand':'list'}),registerService('Service\x20Tree',serviceDefinitions,{'defaultCommand':a47_0x4de89e(0xba)}),registerService(a47_0x4de89e(0xc8),skillDefinitions,{'defaultCommand':'install'}),registerService(a47_0x4de89e(0xd2),cliSkillDefinitions,{'defaultCommand':a47_0x4de89e(0xb5)}),registerService(a47_0x4de89e(0xd4),[updateDefinition],{'defaultCommand':'run','isSingleCommand':!![]}),registerService('Diagnostics',[doctorDefinition],{'isSingleCommand':!![]}),registerService('Schema',[schemaDefinition],{'isSingleCommand':!![]}),registerService(a47_0x4de89e(0xa6),logsDefinitions,{'defaultCommand':a47_0x4de89e(0xad)});export function findDefinition(_0xb9fed,_0x40b257){return definitions['get'](_0xb9fed+':'+_0x40b257);}export function resolveRemovedCommand(_0x28bc06,_0xe4e454){const _0x518a04=a47_0x4de89e;if(_0x28bc06===_0x518a04(0xb4)&&_0xe4e454===_0x518a04(0xcd))return{'command':_0x518a04(0xb7),'message':_0x518a04(0xca),'hint':_0x518a04(0xc4)};if(_0x28bc06===_0x518a04(0xb4)&&_0xe4e454==='use')return{'command':'app\x20use','message':_0x518a04(0xd0),'hint':_0x518a04(0xbc)};if(_0x28bc06===_0x518a04(0xc6)&&_0xe4e454===_0x518a04(0xdc))return{'command':'logs\x20clear','message':_0x518a04(0xa8),'hint':'Use\x20`lovrabet\x20logs\x20show`\x20to\x20view\x20command\x20history.'};return undefined;}export function isKnownService(_0x40f774){const _0x3eea0e=a47_0x4de89e;return serviceByName[_0x3eea0e(0xd8)](_0x40f774);}export function getServiceEntry(_0x2d5080){return serviceByName['get'](_0x2d5080);}export function getAllDefinitions(){const _0x330d45=a47_0x4de89e;return Array['from'](definitions[_0x330d45(0xc2)]());}
1
+ const a47_0x4c5f0a=a47_0x1d12;(function(_0x4167bf,_0x981895){const _0x50eb94=a47_0x1d12,_0x44e612=_0x4167bf();while(!![]){try{const _0x3d4b81=-parseInt(_0x50eb94(0xf1))/0x1+parseInt(_0x50eb94(0xd1))/0x2*(parseInt(_0x50eb94(0xd2))/0x3)+-parseInt(_0x50eb94(0xdc))/0x4+parseInt(_0x50eb94(0xca))/0x5*(-parseInt(_0x50eb94(0xe6))/0x6)+-parseInt(_0x50eb94(0xbe))/0x7+-parseInt(_0x50eb94(0xf0))/0x8+parseInt(_0x50eb94(0xc6))/0x9;if(_0x3d4b81===_0x981895)break;else _0x44e612['push'](_0x44e612['shift']());}catch(_0x237340){_0x44e612['push'](_0x44e612['shift']());}}}(a47_0x31ad,0x2cacc));import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{skillDefinitions}from'../commands/skill/index.js';import{cliSkillDefinitions}from'../commands/cli-skill/index.js';import{serviceDefinitions}from'../commands/service/index.js';import{updateDefinition}from'../commands/update.js';import{doctorDefinition}from'../commands/doctor.js';import{schemaDefinition}from'../commands/schema.js';import{appDefinitions}from'../commands/app/definitions.js';import{workspaceDefinitions}from'../commands/workspace/index.js';import{configDefinitions}from'../commands/config/definitions.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{dataDefinitions}from'../commands/data/index.js';import{kbDefinitions}from'../commands/kb/index.js';import{artifactDefinitions}from'../commands/artifact/index.js';import{personalBffDefinitions}from'../commands/personal-bff/index.js';import{apiDocDefinitions}from'../commands/api-doc/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';import{fileDefinitions}from'../commands/file/index.js';import{ocrDefinitions}from'../commands/ocr/index.js';import{scheduleDefinitions}from'../commands/schedule/index.js';function a47_0x1d12(_0x1179c0,_0x632cd7){_0x1179c0=_0x1179c0-0xbe;const _0x31adad=a47_0x31ad();let _0x1d120b=_0x31adad[_0x1179c0];return _0x1d120b;}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(_0x59dd97){const _0x47d7ef=a47_0x1d12;for(const _0x19ee10 of _0x59dd97){definitions[_0x47d7ef(0xeb)](_0x19ee10['service']+':'+_0x19ee10['command'],_0x19ee10);let _0x35a65c=serviceGroups[_0x47d7ef(0xc2)](_0x19ee10[_0x47d7ef(0xe0)]);!_0x35a65c&&(_0x35a65c=[],serviceGroups[_0x47d7ef(0xeb)](_0x19ee10[_0x47d7ef(0xe0)],_0x35a65c)),_0x35a65c[_0x47d7ef(0xf3)](_0x19ee10);}}function registerService(_0x23645d,_0x36d77b,_0x524d62){const _0x4affc5=a47_0x1d12;registerDefinitions(_0x36d77b);const _0xa56b2d=_0x4548c7=>_0x4548c7==='read'?'':_0x4548c7==='write'?_0x4affc5(0xce):'\x20\x20[high-risk-write]',_0xcfbbc1={'service':_0x36d77b[0x0][_0x4affc5(0xe0)],'label':_0x23645d,'commands':_0x36d77b[_0x4affc5(0xed)](_0x3f3874=>({'command':_0x3f3874[_0x4affc5(0xf5)],'description':_0x3f3874[_0x4affc5(0xd4)],'tag':_0xa56b2d(_0x3f3874[_0x4affc5(0xde)])})),'defaultCommand':_0x524d62?.['defaultCommand']??(_0x524d62?.[_0x4affc5(0xcb)]?_0x36d77b[0x0]['command']:undefined),'isSingleCommand':_0x524d62?.[_0x4affc5(0xcb)]};serviceRegistry[_0x4affc5(0xf3)](_0xcfbbc1),serviceByName[_0x4affc5(0xeb)](_0xcfbbc1[_0x4affc5(0xe0)],_0xcfbbc1);}registerService(a47_0x4c5f0a(0xc1),authDefinitions,{'defaultCommand':a47_0x4c5f0a(0xe9)}),registerService(a47_0x4c5f0a(0xc0),userAccountDefinitions),registerService(a47_0x4c5f0a(0xcf),appDefinitions,{'defaultCommand':a47_0x4c5f0a(0xd7)}),registerService('Workspace',workspaceDefinitions),registerService('Runtime\x20App\x20Config',appConfigDefinitions),registerService(a47_0x4c5f0a(0xcc),configDefinitions,{'defaultCommand':'list'}),registerService(a47_0x4c5f0a(0xd3),roleDefinitions,{'defaultCommand':'list'}),registerService(a47_0x4c5f0a(0xf2),permitDefinitions),registerService(a47_0x4c5f0a(0xef),apiDocDefinitions),registerService('Datasets',datasetDefinitions),registerService(a47_0x4c5f0a(0xe4),dataDefinitions),registerService(a47_0x4c5f0a(0xda),sqlDefinitions),registerService(a47_0x4c5f0a(0xcd),bffDefinitions),registerService('Personal\x20BFF',personalBffDefinitions),registerService('Artifacts',artifactDefinitions),registerService(a47_0x4c5f0a(0xe2),fileDefinitions),registerService('OCR',ocrDefinitions),registerService('Knowledge\x20Base',kbDefinitions),registerService(a47_0x4c5f0a(0xd5),notificationDefinitions,{'defaultCommand':'config-list'}),registerService(a47_0x4c5f0a(0xd8),scheduleDefinitions,{'defaultCommand':a47_0x4c5f0a(0xd7)}),registerService(a47_0x4c5f0a(0xc8),serviceDefinitions,{'defaultCommand':'list'}),registerService(a47_0x4c5f0a(0xd6),skillDefinitions,{'defaultCommand':a47_0x4c5f0a(0xe8)}),registerService(a47_0x4c5f0a(0xdb),cliSkillDefinitions,{'defaultCommand':a47_0x4c5f0a(0xe8)}),registerService(a47_0x4c5f0a(0xc9),[updateDefinition],{'defaultCommand':a47_0x4c5f0a(0xc3),'isSingleCommand':!![]}),registerService(a47_0x4c5f0a(0xd9),[doctorDefinition],{'isSingleCommand':!![]}),registerService('Schema',[schemaDefinition],{'isSingleCommand':!![]}),registerService(a47_0x4c5f0a(0xea),logsDefinitions,{'defaultCommand':a47_0x4c5f0a(0xc5)});export function findDefinition(_0xddc77a,_0x43fb6f){const _0x6ffa98=a47_0x4c5f0a;return definitions[_0x6ffa98(0xc2)](_0xddc77a+':'+_0x43fb6f);}export function resolveRemovedCommand(_0x1aabda,_0x394f74){const _0x5e6ef3=a47_0x4c5f0a;if(_0x1aabda==='app'&&_0x394f74===_0x5e6ef3(0xc4))return{'command':_0x5e6ef3(0xf4),'message':_0x5e6ef3(0xd0),'hint':'Use\x20`lovrabet\x20workspace\x20init\x20--appcode\x20<code>`\x20instead.'};if(_0x1aabda===_0x5e6ef3(0xe1)&&_0x394f74==='use')return{'command':_0x5e6ef3(0xe7),'message':'`lovrabet\x20app\x20use`\x20has\x20been\x20removed.','hint':_0x5e6ef3(0xe3)};if(_0x1aabda===_0x5e6ef3(0xbf)&&_0x394f74===_0x5e6ef3(0xdf))return{'command':_0x5e6ef3(0xc7),'message':_0x5e6ef3(0xe5),'hint':_0x5e6ef3(0xec)};return undefined;}export function isKnownService(_0x52e5ca){const _0x2437a3=a47_0x4c5f0a;return serviceByName[_0x2437a3(0xee)](_0x52e5ca);}function a47_0x31ad(){const _0x169cab=['Authentication','get','run','init','show','9714051qNtslh','logs\x20clear','Service\x20Tree','Self\x20Update','145WmrqMa','isSingleCommand','Configuration','BFF\x20Scripts','\x20\x20[write]','App\x20Management','`lovrabet\x20app\x20init`\x20has\x20been\x20removed.','151248ZmswdV','6zPYaaZ','Runtime\x20Roles','description','Notification\x20Configs','Skills','list','Agent\x20Schedules','Diagnostics','SQL\x20Queries','CLI\x20Built-in\x20Skill','1100724QPyNiw','from','risk','clear','service','app','File','Use\x20`lovrabet\x20workspace\x20use\x20--app\x20<name>`\x20instead.','Instant\x20API','`lovrabet\x20logs\x20clear`\x20has\x20been\x20removed.','44766fXLdbg','app\x20use','install','login','Logs','set','Use\x20`lovrabet\x20logs\x20show`\x20to\x20view\x20command\x20history.','map','has','API\x20Documentation','4336PPcTBB','289445IhSJtY','Runtime\x20Permissions','push','app\x20init','command','1862434AgyyqW','logs','User\x20Accounts'];a47_0x31ad=function(){return _0x169cab;};return a47_0x31ad();}export function getServiceEntry(_0x4f9b75){const _0x1c277d=a47_0x4c5f0a;return serviceByName[_0x1c277d(0xc2)](_0x4f9b75);}export function getAllDefinitions(){const _0x55615a=a47_0x4c5f0a;return Array[_0x55615a(0xdd)](definitions['values']());}
@@ -1 +1 @@
1
- function a48_0x4f1d(_0x5a9aa0,_0x1702de){_0x5a9aa0=_0x5a9aa0-0x160;const _0x4469f1=a48_0x4469();let _0x4f1db2=_0x4469f1[_0x5a9aa0];return _0x4f1db2;}const a48_0x18c7a5=a48_0x4f1d;(function(_0x475845,_0x571853){const _0x137719=a48_0x4f1d,_0x53d687=_0x475845();while(!![]){try{const _0x40eed4=parseInt(_0x137719(0x175))/0x1*(-parseInt(_0x137719(0x17b))/0x2)+-parseInt(_0x137719(0x168))/0x3+parseInt(_0x137719(0x178))/0x4+-parseInt(_0x137719(0x174))/0x5+-parseInt(_0x137719(0x170))/0x6+-parseInt(_0x137719(0x16a))/0x7*(-parseInt(_0x137719(0x163))/0x8)+-parseInt(_0x137719(0x17a))/0x9*(-parseInt(_0x137719(0x16c))/0xa);if(_0x40eed4===_0x571853)break;else _0x53d687['push'](_0x53d687['shift']());}catch(_0x563ad0){_0x53d687['push'](_0x53d687['shift']());}}}(a48_0x4469,0x56dfe));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(_0x28a053){const _0x118505=a48_0x4f1d,_0x39bbbb=_0x28a053[_0x118505(0x177)](_0x118505(0x166))[_0x118505(0x162)]();if(!_0x39bbbb)throw CliErrors[_0x118505(0x16d)](_0x118505(0x167));const _0x118753=_0x28a053[_0x118505(0x177)]('remark')['trim']();return{'appCode':_0x28a053[_0x118505(0x160)],'roleName':_0x39bbbb,..._0x118753?{'remark':_0x118753}:{}};}function a48_0x4469(){const _0xbcffa6=['3618000lGSLSR','string','high-risk-write','body','933240nJhnIM','1EEDtaT','Create\x20a\x20runtime\x20CUSTOM\x20role','str','2720192WjVNdD','build','29259sUmqaw','328252LLAODr','在当前运行应用中创建一个自定义角色;创建后可用于成员与资源权限配置。','CUSTOM','appCode','Optional\x20role\x20remark','trim','3711568EuqYzJ','Preview:\x20create\x20a\x20runtime\x20CUSTOM\x20role','/client/permit/role/create','name','--name\x20must\x20not\x20be\x20blank.','156597NhCNsR','create','7uJSSRt','description','670eyHPkB','validation','POST','role'];a48_0x4469=function(){return _0xbcffa6;};return a48_0x4469();}export const roleCreate={'service':a48_0x18c7a5(0x16f),'command':a48_0x18c7a5(0x169),'description':a48_0x18c7a5(0x176),'risk':a48_0x18c7a5(0x172),'confirmationDescription':a48_0x18c7a5(0x17c),'flags':[{'name':'name','type':a48_0x18c7a5(0x171),'required':!![],'description':'Role\x20name'},{'name':'remark','type':a48_0x18c7a5(0x171),'description':a48_0x18c7a5(0x161)}],async 'validate'(_0x5cec46){input(_0x5cec46);},async 'dryRun'(_0x10d3a1){const _0x1725e4=a48_0x18c7a5;return dryRun(_0x1725e4(0x16e),'/client/permit/role/create')[_0x1725e4(0x173)]({'roleType':_0x1725e4(0x17d),...input(_0x10d3a1)})[_0x1725e4(0x16b)](_0x1725e4(0x164))[_0x1725e4(0x179)]();},async 'execute'(_0x152a34){const _0x27def7=a48_0x18c7a5,_0x4f2596=await createRuntimeAppRole(input(_0x152a34));return{'ok':!![],'data':runtimeRoleWriteResult(_0x27def7(0x169),{'roleId':_0x4f2596['id']},null,projectRuntimeRole(_0x4f2596),{'method':_0x27def7(0x16e),'path':_0x27def7(0x165)})};}};
1
+ const a48_0x4f8148=a48_0xd0aa;function a48_0xd0aa(_0x553149,_0x555dd6){_0x553149=_0x553149-0x102;const _0x403331=a48_0x4033();let _0xd0aa3d=_0x403331[_0x553149];return _0xd0aa3d;}(function(_0x1cff9b,_0x3c2c14){const _0x1cf2cd=a48_0xd0aa,_0x4019ec=_0x1cff9b();while(!![]){try{const _0x3880a3=-parseInt(_0x1cf2cd(0x10b))/0x1*(-parseInt(_0x1cf2cd(0x10c))/0x2)+-parseInt(_0x1cf2cd(0x11b))/0x3+-parseInt(_0x1cf2cd(0x105))/0x4+parseInt(_0x1cf2cd(0x112))/0x5*(-parseInt(_0x1cf2cd(0x113))/0x6)+-parseInt(_0x1cf2cd(0x10d))/0x7+-parseInt(_0x1cf2cd(0x10e))/0x8+-parseInt(_0x1cf2cd(0x114))/0x9*(-parseInt(_0x1cf2cd(0x102))/0xa);if(_0x3880a3===_0x3c2c14)break;else _0x4019ec['push'](_0x4019ec['shift']());}catch(_0x4264f6){_0x4019ec['push'](_0x4019ec['shift']());}}}(a48_0x4033,0x53ff1));import{createRuntimeAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';function a48_0x4033(){const _0x1693b1=['role','string','validation','385LCPzVQ','3006sswspi','18OgxbSo','trim','name','Create\x20a\x20runtime\x20CUSTOM\x20role','POST','--name\x20must\x20not\x20be\x20blank.','create','494388OafMhP','6517330fSUGnb','appCode','在当前运行应用中创建一个自定义角色;创建后可用于成员与资源权限配置。','567888mSYjqq','str','CUSTOM','high-risk-write','/client/permit/role/create','Optional\x20role\x20remark','83bTgIJv','14114WkPfOY','4240320AELMzv','4752344diCLOK'];a48_0x4033=function(){return _0x1693b1;};return a48_0x4033();}import{projectRuntimeRole,runtimeRoleWriteResult}from'../../commands/role/shared.js';function input(_0x498460){const _0x365455=a48_0xd0aa,_0x201aaa=_0x498460[_0x365455(0x106)]('name')[_0x365455(0x115)]();if(!_0x201aaa)throw CliErrors[_0x365455(0x111)](_0x365455(0x119));const _0x686851=_0x498460[_0x365455(0x106)]('remark')[_0x365455(0x115)]();return{'appCode':_0x498460[_0x365455(0x103)],'roleName':_0x201aaa,..._0x686851?{'remark':_0x686851}:{}};}export const roleCreate={'service':a48_0x4f8148(0x10f),'command':'create','description':a48_0x4f8148(0x117),'risk':a48_0x4f8148(0x108),'confirmationDescription':a48_0x4f8148(0x104),'flags':[{'name':a48_0x4f8148(0x116),'type':'string','required':!![],'description':'Role\x20name'},{'name':'remark','type':a48_0x4f8148(0x110),'description':a48_0x4f8148(0x10a)}],async 'validate'(_0x4024f1){input(_0x4024f1);},async 'dryRun'(_0x1dec03){const _0x1909e2=a48_0x4f8148;return dryRun(_0x1909e2(0x118),_0x1909e2(0x109))['body']({'roleType':_0x1909e2(0x107),...input(_0x1dec03)})['description']('Preview:\x20create\x20a\x20runtime\x20CUSTOM\x20role')['build']();},async 'execute'(_0x5a3db9){const _0x50d3e3=a48_0x4f8148,_0x482486=await createRuntimeAppRole(input(_0x5a3db9));return{'ok':!![],'data':runtimeRoleWriteResult(_0x50d3e3(0x11a),{'roleId':_0x482486['id']},null,projectRuntimeRole(_0x482486),{'method':_0x50d3e3(0x118),'path':_0x50d3e3(0x109)})};}};
@@ -1 +1 @@
1
- function a49_0x485b(_0x5ea36a,_0x748c95){_0x5ea36a=_0x5ea36a-0x13d;const _0x469869=a49_0x4698();let _0x485b63=_0x469869[_0x5ea36a];return _0x485b63;}const a49_0x283485=a49_0x485b;(function(_0x478153,_0x5adaa8){const _0x8758b4=a49_0x485b,_0x1e0384=_0x478153();while(!![]){try{const _0xa49592=-parseInt(_0x8758b4(0x14d))/0x1+parseInt(_0x8758b4(0x14e))/0x2+parseInt(_0x8758b4(0x151))/0x3*(parseInt(_0x8758b4(0x143))/0x4)+-parseInt(_0x8758b4(0x144))/0x5*(parseInt(_0x8758b4(0x13f))/0x6)+-parseInt(_0x8758b4(0x146))/0x7*(-parseInt(_0x8758b4(0x14b))/0x8)+parseInt(_0x8758b4(0x14c))/0x9+-parseInt(_0x8758b4(0x140))/0xa;if(_0xa49592===_0x5adaa8)break;else _0x1e0384['push'](_0x1e0384['shift']());}catch(_0x5eac94){_0x1e0384['push'](_0x1e0384['shift']());}}}(a49_0x4698,0xeb9b7));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(_0x1cd084){const _0x36818c=a49_0x485b,_0x287a40=await getRuntimeRoleById(_0x1cd084[_0x36818c(0x150)],_0x1cd084[_0x36818c(0x147)]('id'));return assertCustomRuntimeRole(_0x287a40,_0x36818c(0x148)),_0x287a40;}export const roleDelete={'service':a49_0x283485(0x14a),'command':a49_0x283485(0x148),'description':'Delete\x20a\x20runtime\x20CUSTOM\x20role','risk':a49_0x283485(0x142),'confirmationDescription':a49_0x283485(0x149),'flags':[ROLE_ID_FLAG],async 'dryRun'(_0x1e97f4){const _0x5e990a=a49_0x283485,_0x2a0d0a=await prepare(_0x1e97f4);return dryRun('POST',_0x5e990a(0x14f))['body']({'id':_0x2a0d0a['id']})[_0x5e990a(0x145)](_0x5e990a(0x13e))[_0x5e990a(0x13d)]();},async 'execute'(_0x5ed5fc){const _0x350419=a49_0x283485,_0x5b2aaa=await prepare(_0x5ed5fc);return await deleteRuntimeAppRole(_0x5b2aaa['id']),{'ok':!![],'data':runtimeRoleWriteResult('delete',{'roleId':_0x5b2aaa['id']},projectRuntimeRole(_0x5b2aaa),null,{'method':_0x350419(0x141),'path':_0x350419(0x14f)})};}};function a49_0x4698(){const _0x1efa10=['25375470JHJxXe','POST','high-risk-write','27828RoNeIW','134905hlVYFv','description','28sQUHZr','num','delete','删除当前运行应用中的自定义角色;该角色的成员关系和权限配置可能随之失效。','role','3504152NRTuVh','15640875ttsqGq','1233008zXquEh','2815436ElSBiA','/client/permit/role/delete','appCode','93BokIYY','build','Preview:\x20delete\x20a\x20runtime\x20CUSTOM\x20role','84rFFwvS'];a49_0x4698=function(){return _0x1efa10;};return a49_0x4698();}
1
+ const a49_0x837e1d=a49_0xf154;(function(_0x2c6114,_0x19ee50){const _0x48ac15=a49_0xf154,_0x2db1a3=_0x2c6114();while(!![]){try{const _0x5e7ff7=-parseInt(_0x48ac15(0x6c))/0x1+-parseInt(_0x48ac15(0x6b))/0x2+parseInt(_0x48ac15(0x68))/0x3*(-parseInt(_0x48ac15(0x69))/0x4)+-parseInt(_0x48ac15(0x78))/0x5*(-parseInt(_0x48ac15(0x76))/0x6)+-parseInt(_0x48ac15(0x79))/0x7+parseInt(_0x48ac15(0x72))/0x8*(parseInt(_0x48ac15(0x7a))/0x9)+parseInt(_0x48ac15(0x74))/0xa;if(_0x5e7ff7===_0x19ee50)break;else _0x2db1a3['push'](_0x2db1a3['shift']());}catch(_0xfed520){_0x2db1a3['push'](_0x2db1a3['shift']());}}}(a49_0x4784,0x26029));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_0x4784(){const _0x2f5159=['/client/permit/role/delete','1077640nKemNg','high-risk-write','1706322qgPprJ','Delete\x20a\x20runtime\x20CUSTOM\x20role','5SudeoV','352429RAwSza','27ZZIlTL','description','build','Preview:\x20delete\x20a\x20runtime\x20CUSTOM\x20role','174579BWwabu','4XMOAHV','body','353374UhflJN','165318LlLMLI','POST','appCode','删除当前运行应用中的自定义角色;该角色的成员关系和权限配置可能随之失效。','delete','num','570888JmrBGz'];a49_0x4784=function(){return _0x2f5159;};return a49_0x4784();}async function prepare(_0x543473){const _0xc8feab=a49_0xf154,_0x173740=await getRuntimeRoleById(_0x543473[_0xc8feab(0x6e)],_0x543473[_0xc8feab(0x71)]('id'));return assertCustomRuntimeRole(_0x173740,_0xc8feab(0x70)),_0x173740;}function a49_0xf154(_0x41911c,_0x1143e3){_0x41911c=_0x41911c-0x67;const _0x4784ca=a49_0x4784();let _0xf1541=_0x4784ca[_0x41911c];return _0xf1541;}export const roleDelete={'service':'role','command':'delete','description':a49_0x837e1d(0x77),'risk':a49_0x837e1d(0x75),'confirmationDescription':a49_0x837e1d(0x6f),'flags':[ROLE_ID_FLAG],async 'dryRun'(_0x13aed4){const _0xaa0db3=a49_0x837e1d,_0x5cfe66=await prepare(_0x13aed4);return dryRun(_0xaa0db3(0x6d),_0xaa0db3(0x73))[_0xaa0db3(0x6a)]({'id':_0x5cfe66['id']})[_0xaa0db3(0x7b)](_0xaa0db3(0x67))[_0xaa0db3(0x7c)]();},async 'execute'(_0x48dffd){const _0x320614=a49_0x837e1d,_0x5e499b=await prepare(_0x48dffd);return await deleteRuntimeAppRole(_0x5e499b['id']),{'ok':!![],'data':runtimeRoleWriteResult(_0x320614(0x70),{'roleId':_0x5e499b['id']},projectRuntimeRole(_0x5e499b),null,{'method':_0x320614(0x6d),'path':_0x320614(0x73)})};}};
@@ -1 +1 @@
1
- function a50_0x440c(){const _0x3259df=['172832URElmk','Show\x20one\x20runtime\x20role\x20by\x20ID','1700192HDcNxp','num','8033040ihSYWo','detail','935415nXxWFV','263074FTdGcV','runtime','785835XHFtVf','appCode','528936CfnRAJ','4hCdxwj'];a50_0x440c=function(){return _0x3259df;};return a50_0x440c();}const a50_0x49612d=a50_0x3d17;(function(_0x18719e,_0x4b7cad){const _0x129709=a50_0x3d17,_0x11a68e=_0x18719e();while(!![]){try{const _0x1c067f=-parseInt(_0x129709(0x6e))/0x1*(-parseInt(_0x129709(0x6f))/0x2)+parseInt(_0x129709(0x78))/0x3+parseInt(_0x129709(0x71))/0x4+parseInt(_0x129709(0x75))/0x5+parseInt(_0x129709(0x6d))/0x6+-parseInt(_0x129709(0x76))/0x7+-parseInt(_0x129709(0x73))/0x8;if(_0x1c067f===_0x4b7cad)break;else _0x11a68e['push'](_0x11a68e['shift']());}catch(_0x333d4a){_0x11a68e['push'](_0x11a68e['shift']());}}}(a50_0x440c,0x40fc8));function a50_0x3d17(_0x3af1bc,_0xa72f2d){_0x3af1bc=_0x3af1bc-0x6d;const _0x440c80=a50_0x440c();let _0x3d176d=_0x440c80[_0x3af1bc];return _0x3d176d;}import{getRuntimeRoleById,projectRuntimeRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';export const roleDetail={'service':'role','command':a50_0x49612d(0x74),'description':a50_0x49612d(0x70),'risk':'read','flags':[ROLE_ID_FLAG],async 'execute'(_0x5d810e){const _0x39681f=a50_0x49612d,_0x1ac66e=await getRuntimeRoleById(_0x5d810e[_0x39681f(0x79)],_0x5d810e[_0x39681f(0x72)]('id'));return{'ok':!![],'data':{'scope':_0x39681f(0x77),'role':projectRuntimeRole(_0x1ac66e)}};}};
1
+ const a50_0x3e2e8c=a50_0x4eea;(function(_0x5e7e22,_0x589508){const _0x94409d=a50_0x4eea,_0x2818bf=_0x5e7e22();while(!![]){try{const _0xfced=parseInt(_0x94409d(0x182))/0x1*(-parseInt(_0x94409d(0x17c))/0x2)+parseInt(_0x94409d(0x180))/0x3*(parseInt(_0x94409d(0x17f))/0x4)+-parseInt(_0x94409d(0x173))/0x5+parseInt(_0x94409d(0x178))/0x6*(-parseInt(_0x94409d(0x177))/0x7)+-parseInt(_0x94409d(0x183))/0x8*(-parseInt(_0x94409d(0x17d))/0x9)+parseInt(_0x94409d(0x176))/0xa*(parseInt(_0x94409d(0x171))/0xb)+-parseInt(_0x94409d(0x17e))/0xc*(-parseInt(_0x94409d(0x175))/0xd);if(_0xfced===_0x589508)break;else _0x2818bf['push'](_0x2818bf['shift']());}catch(_0x6c37a){_0x2818bf['push'](_0x2818bf['shift']());}}}(a50_0x119e,0x5abaf));function a50_0x4eea(_0x502f96,_0x2feb22){_0x502f96=_0x502f96-0x170;const _0x119e8c=a50_0x119e();let _0x4eea9f=_0x119e8c[_0x502f96];return _0x4eea9f;}function a50_0x119e(){const _0x1a02d1=['154xcqJXv','read','3049185wsAJwN','appCode','1443kqtzdz','342790mnxvJb','2184112VRKRZx','12ehmORf','runtime','detail','role','6oZnJjE','91404Dbyehx','42792hpUpSu','2333684mEcKwu','3duVsPM','Show\x20one\x20runtime\x20role\x20by\x20ID','56163xpOTBl','248yZanOS','num'];a50_0x119e=function(){return _0x1a02d1;};return a50_0x119e();}import{getRuntimeRoleById,projectRuntimeRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';export const roleDetail={'service':a50_0x3e2e8c(0x17b),'command':a50_0x3e2e8c(0x17a),'description':a50_0x3e2e8c(0x181),'risk':a50_0x3e2e8c(0x172),'flags':[ROLE_ID_FLAG],async 'execute'(_0x58bc9c){const _0x309863=a50_0x3e2e8c,_0x133743=await getRuntimeRoleById(_0x58bc9c[_0x309863(0x174)],_0x58bc9c[_0x309863(0x170)]('id'));return{'ok':!![],'data':{'scope':_0x309863(0x179),'role':projectRuntimeRole(_0x133743)}};}};
@@ -1 +1 @@
1
- (function(_0x29f9e5,_0x1e0d64){const _0x328fc1=a51_0x4587,_0x2c261e=_0x29f9e5();while(!![]){try{const _0x4b8b00=-parseInt(_0x328fc1(0x16a))/0x1+-parseInt(_0x328fc1(0x16f))/0x2*(parseInt(_0x328fc1(0x16e))/0x3)+parseInt(_0x328fc1(0x166))/0x4+parseInt(_0x328fc1(0x169))/0x5*(-parseInt(_0x328fc1(0x168))/0x6)+parseInt(_0x328fc1(0x167))/0x7*(-parseInt(_0x328fc1(0x16d))/0x8)+parseInt(_0x328fc1(0x16b))/0x9+parseInt(_0x328fc1(0x16c))/0xa;if(_0x4b8b00===_0x1e0d64)break;else _0x2c261e['push'](_0x2c261e['shift']());}catch(_0x14e184){_0x2c261e['push'](_0x2c261e['shift']());}}}(a51_0x5dc5,0xabea4));import{roleList}from'../../commands/role/list.js';import{roleDetail}from'../../commands/role/detail.js';import{roleCreate}from'../../commands/role/create.js';function a51_0x5dc5(){const _0x353f6b=['2YqyjFg','1256224lVPFiD','63HcqrFL','6mpXlYk','1595115tNntKb','1184825qXZtNs','11585349uSSCTx','26289110gAshgq','651768IdjQEk','3866931yaJrKa'];a51_0x5dc5=function(){return _0x353f6b;};return a51_0x5dc5();}import{roleUpdate}from'../../commands/role/update.js';import{roleDelete}from'../../commands/role/delete.js';function a51_0x4587(_0xcdfc07,_0x39294e){_0xcdfc07=_0xcdfc07-0x166;const _0x5dc554=a51_0x5dc5();let _0x45874e=_0x5dc554[_0xcdfc07];return _0x45874e;}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(_0x5add14,_0x38ebf9){const _0x1e2686=a51_0x2d46,_0xe4653c=_0x5add14();while(!![]){try{const _0x1b795e=-parseInt(_0x1e2686(0x126))/0x1+parseInt(_0x1e2686(0x123))/0x2*(parseInt(_0x1e2686(0x124))/0x3)+-parseInt(_0x1e2686(0x127))/0x4*(-parseInt(_0x1e2686(0x121))/0x5)+-parseInt(_0x1e2686(0x125))/0x6+-parseInt(_0x1e2686(0x120))/0x7*(-parseInt(_0x1e2686(0x128))/0x8)+-parseInt(_0x1e2686(0x11e))/0x9*(parseInt(_0x1e2686(0x11f))/0xa)+parseInt(_0x1e2686(0x122))/0xb;if(_0x1b795e===_0x38ebf9)break;else _0xe4653c['push'](_0xe4653c['shift']());}catch(_0x51518f){_0xe4653c['push'](_0xe4653c['shift']());}}}(a51_0x2bf6,0x9b0d1));import{roleList}from'../../commands/role/list.js';import{roleDetail}from'../../commands/role/detail.js';import{roleCreate}from'../../commands/role/create.js';import{roleUpdate}from'../../commands/role/update.js';import{roleDelete}from'../../commands/role/delete.js';import{roleUserAdd}from'../../commands/role/user-add.js';import{roleUserRemove}from'../../commands/role/user-remove.js';function a51_0x2d46(_0x291ae6,_0x17319e){_0x291ae6=_0x291ae6-0x11e;const _0x2bf608=a51_0x2bf6();let _0x2d4698=_0x2bf608[_0x291ae6];return _0x2d4698;}function a51_0x2bf6(){const _0x5e7145=['328098MpGICl','52mgFMyR','891464DQjHBs','3433788HFTzIt','30brOqPm','21RlhgTo','425210otSULj','2064832LDEpSi','2aBRbPs','3207201cMmDgh','3533046ThkFoC'];a51_0x2bf6=function(){return _0x5e7145;};return a51_0x2bf6();}export const roleDefinitions=[roleList,roleDetail,roleCreate,roleUpdate,roleDelete,roleUserAdd,roleUserRemove];
@@ -1 +1 @@
1
- const a52_0x46ba53=a52_0x36b0;(function(_0x2c3d56,_0x45a92b){const _0xe9778d=a52_0x36b0,_0x438261=_0x2c3d56();while(!![]){try{const _0x432411=parseInt(_0xe9778d(0xb4))/0x1*(parseInt(_0xe9778d(0xa4))/0x2)+-parseInt(_0xe9778d(0xad))/0x3*(parseInt(_0xe9778d(0xa2))/0x4)+-parseInt(_0xe9778d(0xbf))/0x5*(parseInt(_0xe9778d(0xa5))/0x6)+-parseInt(_0xe9778d(0xb6))/0x7+parseInt(_0xe9778d(0xba))/0x8+-parseInt(_0xe9778d(0xb1))/0x9*(-parseInt(_0xe9778d(0xaf))/0xa)+parseInt(_0xe9778d(0xb9))/0xb;if(_0x432411===_0x45a92b)break;else _0x438261['push'](_0x438261['shift']());}catch(_0x4bf777){_0x438261['push'](_0x438261['shift']());}}}(a52_0x2bbd,0xb83c2));function a52_0x36b0(_0x25b93d,_0x5f1e9e){_0x25b93d=_0x25b93d-0x9c;const _0x2bbdd7=a52_0x2bbd();let _0x36b043=_0x2bbdd7[_0x25b93d];return _0x36b043;}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_0x46ba53(0xbd),'command':'list','description':a52_0x46ba53(0xa1),'risk':a52_0x46ba53(0xac),'flags':[{'name':a52_0x46ba53(0xae),'type':a52_0x46ba53(0xa6),'enum':RUNTIME_ROLE_TYPES,'description':'Runtime\x20role\x20type'},{'name':a52_0x46ba53(0xbb),'type':a52_0x46ba53(0xa6),'description':a52_0x46ba53(0xb5)},{'name':'page','type':'number','default':0x1,'description':a52_0x46ba53(0xab)},{'name':'pagesize','type':a52_0x46ba53(0xb7),'default':0x64,'description':'Page\x20size\x20from\x201\x20to\x20100'}],async 'validate'(_0x420b95){const _0x5588ac=a52_0x46ba53,_0x3b3d1b=_0x420b95[_0x5588ac(0xaa)](_0x5588ac(0xae))[_0x5588ac(0xb8)]();if(_0x3b3d1b&&!RUNTIME_ROLE_TYPES[_0x5588ac(0x9c)](_0x3b3d1b))throw CliErrors['validation'](_0x5588ac(0xb3)+_0x3b3d1b+'.');const _0x56aa01=_0x420b95[_0x5588ac(0xb2)](_0x5588ac(0xa0),0x1),_0x5b7702=_0x420b95[_0x5588ac(0xb2)]('pagesize',0x64);if(!Number['isSafeInteger'](_0x56aa01)||_0x56aa01<0x1)throw CliErrors[_0x5588ac(0xa3)](_0x5588ac(0x9d));if(!Number[_0x5588ac(0xc1)](_0x5b7702)||_0x5b7702<0x1||_0x5b7702>0x64)throw CliErrors[_0x5588ac(0xa3)](_0x5588ac(0xc0));},async 'execute'(_0x49e618){const _0x5acd16=a52_0x46ba53,_0xb9c74=_0x49e618['str'](_0x5acd16(0xae))[_0x5acd16(0xb8)](),_0x2529aa=_0x49e618[_0x5acd16(0xaa)](_0x5acd16(0xbb))[_0x5acd16(0x9e)](),_0x4a8e1c=_0x49e618[_0x5acd16(0xb2)](_0x5acd16(0xa0),0x1),_0x45bf35=_0x49e618[_0x5acd16(0xb2)](_0x5acd16(0xa8),0x64);if(_0xb9c74){const _0x7e9aaa=(await listAllRuntimeRoles(_0x49e618[_0x5acd16(0xbe)],{..._0x2529aa?{'roleName':_0x2529aa}:{}}))[_0x5acd16(0xc2)](_0x3837b0=>_0x3837b0['roleType']===_0xb9c74),_0x164fb7=(_0x4a8e1c-0x1)*_0x45bf35;return{'ok':!![],'data':{'scope':_0x5acd16(0xb0),'roles':_0x7e9aaa[_0x5acd16(0xbc)](_0x164fb7,_0x164fb7+_0x45bf35)[_0x5acd16(0x9f)](projectRuntimeRole),'paging':{'currentPage':_0x4a8e1c,'pageSize':_0x45bf35,'totalCount':_0x7e9aaa['length']}}};}const _0x1acd30=await listRuntimeAppRoles(_0x49e618['appCode'],{..._0x2529aa?{'roleName':_0x2529aa}:{},'currentPage':_0x4a8e1c,'pageSize':_0x45bf35});return{'ok':!![],'data':{'scope':_0x5acd16(0xb0),'roles':_0x1acd30[_0x5acd16(0xa7)]['map'](projectRuntimeRole),'paging':_0x1acd30[_0x5acd16(0xa9)]}};}};function a52_0x2bbd(){const _0x566285=['str','Page\x20number','read','339jAanob','type','90OYFUTp','runtime','320265rfPkKh','num','Invalid\x20runtime\x20role\x20type:\x20','37531adTCOY','Fuzzy\x20role-name\x20filter','4106732KghgxJ','number','toUpperCase','2063413KNLqUs','10061456sOJlOA','name','slice','role','appCode','136095LDPniu','--pagesize\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.','isSafeInteger','filter','includes','--page\x20must\x20be\x20a\x20positive\x20integer.','trim','map','page','List\x20runtime\x20roles\x20for\x20the\x20current\x20app','44304rwfNeK','validation','76iEIKQr','132JmKSqN','string','items','pagesize','paging'];a52_0x2bbd=function(){return _0x566285;};return a52_0x2bbd();}
1
+ function a52_0x5694(){const _0x3510b2=['name','108516yurJRp','1203660ckUuZW','pagesize','toUpperCase','number','items','list','trim','4373288XzsleH','slice','4741TKfZhP','validation','length','isSafeInteger','Fuzzy\x20role-name\x20filter','string','str','4IGtDZA','18hEPrpW','List\x20runtime\x20roles\x20for\x20the\x20current\x20app','role','num','appCode','674472bAaeXQ','map','Page\x20number','28kVVpNN','5072740MqNdAi','Runtime\x20role\x20type','roleType','4joXyEq','type','runtime','filter','27400224ZIpgGW','paging','15270eOurjl','includes','page'];a52_0x5694=function(){return _0x3510b2;};return a52_0x5694();}const a52_0x25ffc1=a52_0x3b26;(function(_0x533fcc,_0xbd95c5){const _0x2435b2=a52_0x3b26,_0xe32923=_0x533fcc();while(!![]){try{const _0x365827=-parseInt(_0x2435b2(0x17a))/0x1*(parseInt(_0x2435b2(0x184))/0x2)+parseInt(_0x2435b2(0x173))/0x3+-parseInt(_0x2435b2(0x16d))/0x4*(parseInt(_0x2435b2(0x177))/0x5)+parseInt(_0x2435b2(0x185))/0x6*(-parseInt(_0x2435b2(0x176))/0x7)+parseInt(_0x2435b2(0x18c))/0x8*(parseInt(_0x2435b2(0x16e))/0x9)+-parseInt(_0x2435b2(0x180))/0xa*(parseInt(_0x2435b2(0x18e))/0xb)+parseInt(_0x2435b2(0x17e))/0xc;if(_0x365827===_0xbd95c5)break;else _0xe32923['push'](_0xe32923['shift']());}catch(_0x266a8a){_0xe32923['push'](_0xe32923['shift']());}}}(a52_0x5694,0xde01d));function a52_0x3b26(_0x3a7e2d,_0x4816f8){_0x3a7e2d=_0x3a7e2d-0x16b;const _0x56942d=a52_0x5694();let _0x3b2612=_0x56942d[_0x3a7e2d];return _0x3b2612;}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_0x25ffc1(0x170),'command':a52_0x25ffc1(0x18a),'description':a52_0x25ffc1(0x16f),'risk':'read','flags':[{'name':a52_0x25ffc1(0x17b),'type':a52_0x25ffc1(0x16b),'enum':RUNTIME_ROLE_TYPES,'description':a52_0x25ffc1(0x178)},{'name':a52_0x25ffc1(0x183),'type':'string','description':a52_0x25ffc1(0x192)},{'name':a52_0x25ffc1(0x182),'type':a52_0x25ffc1(0x188),'default':0x1,'description':a52_0x25ffc1(0x175)},{'name':a52_0x25ffc1(0x186),'type':'number','default':0x64,'description':'Page\x20size\x20from\x201\x20to\x20100'}],async 'validate'(_0x40fd95){const _0x44f1c9=a52_0x25ffc1,_0x45fc9f=_0x40fd95[_0x44f1c9(0x16c)](_0x44f1c9(0x17b))[_0x44f1c9(0x187)]();if(_0x45fc9f&&!RUNTIME_ROLE_TYPES[_0x44f1c9(0x181)](_0x45fc9f))throw CliErrors['validation']('Invalid\x20runtime\x20role\x20type:\x20'+_0x45fc9f+'.');const _0x567382=_0x40fd95['num'](_0x44f1c9(0x182),0x1),_0x522e65=_0x40fd95[_0x44f1c9(0x171)](_0x44f1c9(0x186),0x64);if(!Number[_0x44f1c9(0x191)](_0x567382)||_0x567382<0x1)throw CliErrors[_0x44f1c9(0x18f)]('--page\x20must\x20be\x20a\x20positive\x20integer.');if(!Number[_0x44f1c9(0x191)](_0x522e65)||_0x522e65<0x1||_0x522e65>0x64)throw CliErrors[_0x44f1c9(0x18f)]('--pagesize\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.');},async 'execute'(_0x1a11b0){const _0x126656=a52_0x25ffc1,_0x520d02=_0x1a11b0[_0x126656(0x16c)](_0x126656(0x17b))['toUpperCase'](),_0x546fe3=_0x1a11b0[_0x126656(0x16c)](_0x126656(0x183))[_0x126656(0x18b)](),_0x50204f=_0x1a11b0[_0x126656(0x171)](_0x126656(0x182),0x1),_0x1bc412=_0x1a11b0['num'](_0x126656(0x186),0x64);if(_0x520d02){const _0x5aaaba=(await listAllRuntimeRoles(_0x1a11b0[_0x126656(0x172)],{..._0x546fe3?{'roleName':_0x546fe3}:{}}))[_0x126656(0x17d)](_0x55f55b=>_0x55f55b[_0x126656(0x179)]===_0x520d02),_0x16a126=(_0x50204f-0x1)*_0x1bc412;return{'ok':!![],'data':{'scope':_0x126656(0x17c),'roles':_0x5aaaba[_0x126656(0x18d)](_0x16a126,_0x16a126+_0x1bc412)['map'](projectRuntimeRole),'paging':{'currentPage':_0x50204f,'pageSize':_0x1bc412,'totalCount':_0x5aaaba[_0x126656(0x190)]}}};}const _0x4346b5=await listRuntimeAppRoles(_0x1a11b0[_0x126656(0x172)],{..._0x546fe3?{'roleName':_0x546fe3}:{},'currentPage':_0x50204f,'pageSize':_0x1bc412});return{'ok':!![],'data':{'scope':'runtime','roles':_0x4346b5[_0x126656(0x189)][_0x126656(0x174)](projectRuntimeRole),'paging':_0x4346b5[_0x126656(0x17f)]}};}};
@@ -1 +1 @@
1
- const a53_0x41d362=a53_0x575d;(function(_0xcaca55,_0x382cdc){const _0x1d0cae=a53_0x575d,_0x5ba1c6=_0xcaca55();while(!![]){try{const _0x2f65f0=-parseInt(_0x1d0cae(0x1bb))/0x1*(parseInt(_0x1d0cae(0x1b1))/0x2)+-parseInt(_0x1d0cae(0x199))/0x3+parseInt(_0x1d0cae(0x186))/0x4+-parseInt(_0x1d0cae(0x194))/0x5*(parseInt(_0x1d0cae(0x18f))/0x6)+parseInt(_0x1d0cae(0x1a3))/0x7+parseInt(_0x1d0cae(0x1ca))/0x8*(-parseInt(_0x1d0cae(0x1a7))/0x9)+parseInt(_0x1d0cae(0x1b9))/0xa*(parseInt(_0x1d0cae(0x1cd))/0xb);if(_0x2f65f0===_0x382cdc)break;else _0x5ba1c6['push'](_0x5ba1c6['shift']());}catch(_0x133695){_0x5ba1c6['push'](_0x5ba1c6['shift']());}}}(a53_0xd773,0xb968a));import{listRuntimeAppUsers,listRuntimeAppRoles,listRuntimeRoleUsers}from'../../core/api-client.js';function a53_0xd773(){const _0x1b20da=['includes','Runtime\x20role\x20ID\x20returned\x20by\x20role\x20list','ADMIN','isSafeInteger','Pass\x20--user\x20<userId>;\x20name\x20and\x20account\x20lookup\x20are\x20not\x20available\x20in\x20runtime\x20scope.','userCount','code','18282900Xbtogv','CUSTOM','57041vgCaIf','\x20was\x20not\x20found\x20in\x20app\x20','validation','test','runtime','Runtime\x20role\x20id\x20','--expect-user-count\x20must\x20be\x20a\x20non-negative\x20integer.','expect-user-count','number','userId','Runtime\x20role\x20membership\x20requires\x20a\x20numeric\x20userId.','flag','User\x20','Only\x20CUSTOM\x20runtime\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','find','8wsoWOH','length','Reject\x20when\x20the\x20target\x20role\x20member\x20count\x20has\x20changed','11tFCyha','4321564rWVVlt','items','OWNER\x20runtime\x20role\x20membership\x20cannot\x20be\x20changed\x20with\x20this\x20command.','Runtime\x20numeric\x20userId','appCode','Runtime\x20user\x20','userList','Cannot\x20','USER','2861076umCMFm','OWNER','Pass\x20--role\x20<id|name>.','Runtime\x20role\x20','Runtime\x20role\x20member\x20count\x20changed:\x20expected\x20','10aGxJdh','string','\x20is\x20not\x20in\x20runtime\x20role\x20','roleType',',\x20found\x20','563403VQCORG','Use\x20a\x20numeric\x20userId\x20returned\x20by\x20the\x20current\x20application\x27s\x20personnel\x20list.','paging','roleName','\x20is\x20missing\x20from\x20the\x20grouped\x20member\x20snapshot.','Transfer\x20or\x20manage\x20application\x20ownership\x20through\x20the\x20dedicated\x20application\x20workflow.','str','map','Missing\x20runtime\x20role\x20reference.','user','5344269MVrsnP','Reload\x20the\x20role\x20list\x20and\x20retry\x20after\x20the\x20server\x20state\x20is\x20consistent.','\x20is\x20already\x20in\x20runtime\x20role\x20','user-add','4646871mtTBJz','applyUserList','role','num','filter','totalCount','Run\x20`lovrabet\x20role\x20list`\x20and\x20use\x20a\x20role\x20from\x20the\x20current\x20app.','trim','userName','push','44ouyHuw'];a53_0xd773=function(){return _0x1b20da;};return a53_0xd773();}import{CliErrors}from'../../errors.js';export const RUNTIME_ROLE_TYPES=[a53_0x41d362(0x1b4),a53_0x41d362(0x18e),a53_0x41d362(0x190),a53_0x41d362(0x1ba)];const BUILTIN_ROLE_TYPES=[a53_0x41d362(0x1b4),a53_0x41d362(0x18e),'OWNER'];export const ROLE_ID_FLAG={'name':'id','type':a53_0x41d362(0x1c3),'required':!![],'description':a53_0x41d362(0x1b3)};export const ROLE_REF_FLAG={'name':a53_0x41d362(0x1a9),'type':a53_0x41d362(0x195),'required':!![],'description':'Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name'};export const USER_ID_FLAG={'name':'user','type':'string','required':!![],'description':a53_0x41d362(0x189)};export const EXPECT_USER_COUNT_FLAG={'name':a53_0x41d362(0x1c2),'type':a53_0x41d362(0x1c3),'description':a53_0x41d362(0x1cc)};export function isBuiltinRuntimeRole(_0x12072f){const _0x137981=a53_0x41d362;return BUILTIN_ROLE_TYPES[_0x137981(0x1b2)](_0x12072f);}export function assertCustomRuntimeRole(_0x4e505f,_0x3fbee4){const _0x4ae143=a53_0x41d362;if(_0x4e505f[_0x4ae143(0x197)]!==_0x4ae143(0x1ba))throw CliErrors['validation'](_0x4ae143(0x18d)+_0x3fbee4+'\x20built-in\x20runtime\x20role\x20'+_0x4e505f['roleName']+'\x20('+_0x4e505f[_0x4ae143(0x197)]+').',_0x4ae143(0x1c8));}export function projectRuntimeRole(_0x249914){const _0x4cdf55=a53_0x41d362;return{'id':_0x249914['id'],'roleName':_0x249914['roleName'],'roleType':_0x249914[_0x4cdf55(0x197)],'remark':_0x249914['remark'],'userCount':_0x249914[_0x4cdf55(0x1b7)]??0x0,'permitCount':_0x249914['permitCount']??0x0,'builtin':isBuiltinRuntimeRole(_0x249914['roleType'])};}function a53_0x575d(_0x1e75f9,_0x338e81){_0x1e75f9=_0x1e75f9-0x186;const _0xd77356=a53_0xd773();let _0x575d22=_0xd77356[_0x1e75f9];return _0x575d22;}export async function getRuntimeRoleById(_0x87e57c,_0x22a3dd){const _0x5d8bce=a53_0x41d362;if(!Number[_0x5d8bce(0x1b5)](_0x22a3dd)||_0x22a3dd<=0x0)throw CliErrors[_0x5d8bce(0x1bd)]('Role\x20ID\x20must\x20be\x20a\x20positive\x20integer.');const _0x3376d7=(await listAllRuntimeRoles(_0x87e57c))[_0x5d8bce(0x1ab)](_0x1c31f3=>_0x1c31f3['id']===_0x22a3dd&&(!_0x1c31f3[_0x5d8bce(0x18a)]||_0x1c31f3[_0x5d8bce(0x18a)]===_0x87e57c));if(_0x3376d7[_0x5d8bce(0x1cb)]!==0x1)throw CliErrors[_0x5d8bce(0x1bd)](_0x5d8bce(0x1c0)+_0x22a3dd+_0x5d8bce(0x1bc)+_0x87e57c+'.',_0x5d8bce(0x1ad));return _0x3376d7[0x0];}export async function listAllRuntimeRoles(_0x625e40,_0x134c4b={}){const _0x5a09a2=a53_0x41d362,_0x38d04b=0x64,_0x556348=[];for(let _0x1ed5b8=0x1;;_0x1ed5b8+=0x1){const _0x28ff6a=await listRuntimeAppRoles(_0x625e40,{..._0x134c4b[_0x5a09a2(0x19c)]?{'roleName':_0x134c4b[_0x5a09a2(0x19c)]}:{},'currentPage':_0x1ed5b8,'pageSize':_0x38d04b});_0x556348[_0x5a09a2(0x1b0)](..._0x28ff6a[_0x5a09a2(0x187)]);if(_0x28ff6a[_0x5a09a2(0x187)][_0x5a09a2(0x1cb)]<_0x38d04b||_0x28ff6a['paging']&&_0x556348[_0x5a09a2(0x1cb)]>=_0x28ff6a[_0x5a09a2(0x19b)][_0x5a09a2(0x1ac)])return _0x556348;}}export async function resolveRuntimeRoleRef(_0xdd46d0,_0x7f7b88){const _0x13a5bb=a53_0x41d362,_0x3255bf=_0x7f7b88[_0x13a5bb(0x1ae)]();if(!_0x3255bf)throw CliErrors[_0x13a5bb(0x1bd)](_0x13a5bb(0x1a1),_0x13a5bb(0x191));if(/^\d+$/[_0x13a5bb(0x1be)](_0x3255bf))return getRuntimeRoleById(_0xdd46d0,Number(_0x3255bf));const _0x2badb6=(await listAllRuntimeRoles(_0xdd46d0))[_0x13a5bb(0x1ab)](_0x2d1e92=>_0x2d1e92['roleName']===_0x3255bf);if(_0x2badb6[_0x13a5bb(0x1cb)]===0x0)throw CliErrors[_0x13a5bb(0x1bd)]('Runtime\x20role\x20name\x20\x22'+_0x3255bf+'\x22\x20was\x20not\x20found\x20in\x20app\x20'+_0xdd46d0+'.','Run\x20`lovrabet\x20role\x20list`\x20or\x20pass\x20--role\x20<id>.');if(_0x2badb6['length']>0x1)throw CliErrors[_0x13a5bb(0x1bd)]('Runtime\x20role\x20name\x20\x22'+_0x3255bf+'\x22\x20is\x20ambiguous.','Pass\x20one\x20role\x20ID:\x20'+_0x2badb6[_0x13a5bb(0x1a0)](_0x4e9541=>_0x4e9541['id'])['join'](',\x20')+'.');return _0x2badb6[0x0];}function parseRuntimeUserId(_0x2d3bc0){const _0x2b14a7=a53_0x41d362,_0x3f8995=_0x2d3bc0['trim']();if(!/^\d+$/[_0x2b14a7(0x1be)](_0x3f8995))throw CliErrors[_0x2b14a7(0x1bd)](_0x2b14a7(0x1c5),_0x2b14a7(0x1b6));const _0xafc7ff=Number(_0x3f8995);if(!Number[_0x2b14a7(0x1b5)](_0xafc7ff)||_0xafc7ff<=0x0)throw CliErrors[_0x2b14a7(0x1bd)]('Runtime\x20userId\x20must\x20be\x20a\x20positive\x20safe\x20integer.');return _0xafc7ff;}export async function prepareRuntimeMemberMutation(_0x26e9d0,_0x26b93e){const _0x3a5635=a53_0x41d362,_0x2cbe99=await resolveRuntimeRoleRef(_0x26e9d0['appCode'],_0x26e9d0[_0x3a5635(0x19f)]('role'));if(_0x2cbe99[_0x3a5635(0x197)]==='OWNER')throw CliErrors[_0x3a5635(0x1bd)](_0x3a5635(0x188),_0x3a5635(0x19e));const _0x3b1b83=parseRuntimeUserId(_0x26e9d0['str'](_0x3a5635(0x1a2))),_0x1b4b68=(await listRuntimeRoleUsers(_0x26e9d0[_0x3a5635(0x18a)]))[_0x3a5635(0x1a0)](_0x3676e6=>({..._0x3676e6,'userList':[..._0x3676e6['userList']??[]],'applyUserList':[..._0x3676e6[_0x3a5635(0x1a8)]??[]]})),_0x559f27=_0x1b4b68[_0x3a5635(0x1c9)](_0x5980c2=>_0x5980c2['id']===_0x2cbe99['id']);if(!_0x559f27)throw CliErrors[_0x3a5635(0x1bd)](_0x3a5635(0x192)+_0x2cbe99['id']+_0x3a5635(0x19d),_0x3a5635(0x1a4));const _0x1ebdf7=_0x559f27[_0x3a5635(0x18c)][_0x3a5635(0x1a0)](_0x3f4d9a=>_0x3f4d9a[_0x3a5635(0x1c4)]),_0x1c2e1c=_0x26e9d0[_0x3a5635(0x1c6)](_0x3a5635(0x1c2));if(_0x1c2e1c!==undefined&&_0x1c2e1c!==null&&_0x1c2e1c!==''){const _0x2a6290=_0x26e9d0[_0x3a5635(0x1aa)]('expect-user-count');if(!Number['isSafeInteger'](_0x2a6290)||_0x2a6290<0x0)throw CliErrors[_0x3a5635(0x1bd)](_0x3a5635(0x1c1));if(_0x1ebdf7[_0x3a5635(0x1cb)]!==_0x2a6290)throw CliErrors[_0x3a5635(0x1bd)](_0x3a5635(0x193)+_0x2a6290+_0x3a5635(0x198)+_0x1ebdf7[_0x3a5635(0x1cb)]+'.','Read\x20the\x20current\x20members\x20and\x20retry\x20with\x20the\x20new\x20expected\x20count.');}const _0x1da287=_0x1ebdf7[_0x3a5635(0x1b2)](_0x3b1b83),_0x530552=[];let _0x1c288f=!![];if(_0x26b93e===_0x3a5635(0x1a6)){const _0xe5a78f=await listRuntimeAppUsers(_0x26e9d0[_0x3a5635(0x18a)]),_0x209cd2=_0xe5a78f['filter'](_0x4de4b1=>Number(_0x4de4b1[_0x3a5635(0x1b8)])===_0x3b1b83);if(_0x209cd2[_0x3a5635(0x1cb)]!==0x1||!_0x209cd2[0x0]['userName']?.['trim']())throw CliErrors['validation'](_0x3a5635(0x18b)+_0x3b1b83+_0x3a5635(0x1bc)+_0x26e9d0[_0x3a5635(0x18a)]+'.',_0x3a5635(0x19a));_0x1da287?(_0x1c288f=![],_0x530552[_0x3a5635(0x1b0)](_0x3a5635(0x1c7)+_0x3b1b83+_0x3a5635(0x1a5)+_0x2cbe99['id']+'.')):_0x559f27[_0x3a5635(0x18c)][_0x3a5635(0x1b0)]({'userId':_0x3b1b83,'username':_0x209cd2[0x0][_0x3a5635(0x1af)]});}else!_0x1da287?(_0x1c288f=![],_0x530552[_0x3a5635(0x1b0)](_0x3a5635(0x1c7)+_0x3b1b83+_0x3a5635(0x196)+_0x2cbe99['id']+'.')):_0x559f27[_0x3a5635(0x18c)]=_0x559f27['userList']['filter'](_0x3947e2=>_0x3947e2[_0x3a5635(0x1c4)]!==_0x3b1b83);return{'role':_0x2cbe99,'userId':_0x3b1b83,'roleList':_0x1b4b68,'before':{'userIds':_0x1ebdf7},'after':{'userIds':_0x559f27[_0x3a5635(0x18c)][_0x3a5635(0x1a0)](_0x1625ed=>_0x1625ed[_0x3a5635(0x1c4)])},'shouldWrite':_0x1c288f,'warnings':_0x530552};}export function runtimeRoleWriteResult(_0x2d9f73,_0x173eb7,_0x24d93c,_0x1325bc,_0x1d6b18,_0x476efc=[]){const _0x56bb29=a53_0x41d362;return{'operation':_0x2d9f73,'scope':_0x56bb29(0x1bf),'selector':_0x173eb7,'before':_0x24d93c,'after':_0x1325bc,'dryRun':![],'backend':_0x1d6b18,'warnings':_0x476efc};}
1
+ const a53_0x5ee2d8=a53_0x2a2a;(function(_0x57edea,_0x400964){const _0x42b336=a53_0x2a2a,_0x554d4a=_0x57edea();while(!![]){try{const _0x5b1628=-parseInt(_0x42b336(0x18e))/0x1*(-parseInt(_0x42b336(0x199))/0x2)+-parseInt(_0x42b336(0x19b))/0x3*(parseInt(_0x42b336(0x176))/0x4)+parseInt(_0x42b336(0x1a9))/0x5+parseInt(_0x42b336(0x175))/0x6+-parseInt(_0x42b336(0x1a5))/0x7+-parseInt(_0x42b336(0x190))/0x8+parseInt(_0x42b336(0x196))/0x9*(parseInt(_0x42b336(0x17c))/0xa);if(_0x5b1628===_0x400964)break;else _0x554d4a['push'](_0x554d4a['shift']());}catch(_0x26ef76){_0x554d4a['push'](_0x554d4a['shift']());}}}(a53_0x27a5,0xf039e));import{listRuntimeAppUsers,listRuntimeAppRoles,listRuntimeRoleUsers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a53_0x2a2a(_0x1d3244,_0xf892d){_0x1d3244=_0x1d3244-0x16b;const _0x27a5e3=a53_0x27a5();let _0x2a2ad0=_0x27a5e3[_0x1d3244];return _0x2a2ad0;}export const RUNTIME_ROLE_TYPES=[a53_0x5ee2d8(0x16c),a53_0x5ee2d8(0x1ac),a53_0x5ee2d8(0x18d),'CUSTOM'];const BUILTIN_ROLE_TYPES=['ADMIN',a53_0x5ee2d8(0x1ac),a53_0x5ee2d8(0x18d)];export const ROLE_ID_FLAG={'name':'id','type':a53_0x5ee2d8(0x182),'required':!![],'description':a53_0x5ee2d8(0x193)};export const ROLE_REF_FLAG={'name':a53_0x5ee2d8(0x198),'type':'string','required':!![],'description':a53_0x5ee2d8(0x184)};export const USER_ID_FLAG={'name':a53_0x5ee2d8(0x171),'type':a53_0x5ee2d8(0x16e),'required':!![],'description':a53_0x5ee2d8(0x177)};export const EXPECT_USER_COUNT_FLAG={'name':'expect-user-count','type':a53_0x5ee2d8(0x182),'description':'Reject\x20when\x20the\x20target\x20role\x20member\x20count\x20has\x20changed'};export function isBuiltinRuntimeRole(_0x2bd68d){const _0x4ea955=a53_0x5ee2d8;return BUILTIN_ROLE_TYPES[_0x4ea955(0x194)](_0x2bd68d);}export function assertCustomRuntimeRole(_0x2f0287,_0x3dd979){const _0x3812fc=a53_0x5ee2d8;if(_0x2f0287[_0x3812fc(0x17d)]!=='CUSTOM')throw CliErrors[_0x3812fc(0x18c)]('Cannot\x20'+_0x3dd979+_0x3812fc(0x185)+_0x2f0287[_0x3812fc(0x19d)]+'\x20('+_0x2f0287[_0x3812fc(0x17d)]+').','Only\x20CUSTOM\x20runtime\x20roles\x20can\x20be\x20modified\x20or\x20deleted.');}export function projectRuntimeRole(_0x5ac4c5){const _0x48a2d6=a53_0x5ee2d8;return{'id':_0x5ac4c5['id'],'roleName':_0x5ac4c5['roleName'],'roleType':_0x5ac4c5['roleType'],'remark':_0x5ac4c5['remark'],'userCount':_0x5ac4c5[_0x48a2d6(0x1a3)]??0x0,'permitCount':_0x5ac4c5[_0x48a2d6(0x18a)]??0x0,'builtin':isBuiltinRuntimeRole(_0x5ac4c5[_0x48a2d6(0x17d)])};}export async function getRuntimeRoleById(_0x11a3af,_0x66d53e){const _0x43a13e=a53_0x5ee2d8;if(!Number[_0x43a13e(0x16f)](_0x66d53e)||_0x66d53e<=0x0)throw CliErrors['validation'](_0x43a13e(0x1a8));const _0x2bd924=(await listAllRuntimeRoles(_0x11a3af))['filter'](_0x40f136=>_0x40f136['id']===_0x66d53e&&(!_0x40f136[_0x43a13e(0x188)]||_0x40f136[_0x43a13e(0x188)]===_0x11a3af));if(_0x2bd924[_0x43a13e(0x183)]!==0x1)throw CliErrors[_0x43a13e(0x18c)]('Runtime\x20role\x20id\x20'+_0x66d53e+_0x43a13e(0x172)+_0x11a3af+'.','Run\x20`lovrabet\x20role\x20list`\x20and\x20use\x20a\x20role\x20from\x20the\x20current\x20app.');return _0x2bd924[0x0];}export async function listAllRuntimeRoles(_0x2814ba,_0x2df917={}){const _0x525c28=a53_0x5ee2d8,_0x4de116=0x64,_0x428d16=[];for(let _0x3f08f4=0x1;;_0x3f08f4+=0x1){const _0x4b81c5=await listRuntimeAppRoles(_0x2814ba,{..._0x2df917['roleName']?{'roleName':_0x2df917[_0x525c28(0x19d)]}:{},'currentPage':_0x3f08f4,'pageSize':_0x4de116});_0x428d16[_0x525c28(0x17b)](..._0x4b81c5[_0x525c28(0x170)]);if(_0x4b81c5[_0x525c28(0x170)][_0x525c28(0x183)]<_0x4de116||_0x4b81c5[_0x525c28(0x181)]&&_0x428d16[_0x525c28(0x183)]>=_0x4b81c5[_0x525c28(0x181)][_0x525c28(0x1a6)])return _0x428d16;}}export async function resolveRuntimeRoleRef(_0x23c57e,_0x4ba3f3){const _0x5ad83f=a53_0x5ee2d8,_0x44ccd3=_0x4ba3f3['trim']();if(!_0x44ccd3)throw CliErrors[_0x5ad83f(0x18c)](_0x5ad83f(0x1ad),_0x5ad83f(0x180));if(/^\d+$/['test'](_0x44ccd3))return getRuntimeRoleById(_0x23c57e,Number(_0x44ccd3));const _0x4b08a0=(await listAllRuntimeRoles(_0x23c57e))[_0x5ad83f(0x1a1)](_0x41fa2e=>_0x41fa2e[_0x5ad83f(0x19d)]===_0x44ccd3);if(_0x4b08a0[_0x5ad83f(0x183)]===0x0)throw CliErrors[_0x5ad83f(0x18c)](_0x5ad83f(0x191)+_0x44ccd3+'\x22\x20was\x20not\x20found\x20in\x20app\x20'+_0x23c57e+'.',_0x5ad83f(0x1a2));if(_0x4b08a0[_0x5ad83f(0x183)]>0x1)throw CliErrors[_0x5ad83f(0x18c)]('Runtime\x20role\x20name\x20\x22'+_0x44ccd3+_0x5ad83f(0x19e),_0x5ad83f(0x16d)+_0x4b08a0['map'](_0x11da2b=>_0x11da2b['id'])[_0x5ad83f(0x18b)](',\x20')+'.');return _0x4b08a0[0x0];}function parseRuntimeUserId(_0x1fc34c){const _0x3955aa=a53_0x5ee2d8,_0x35a20f=_0x1fc34c['trim']();if(!/^\d+$/['test'](_0x35a20f))throw CliErrors['validation'](_0x3955aa(0x1a0),'Pass\x20--user\x20<userId>;\x20name\x20and\x20account\x20lookup\x20are\x20not\x20available\x20in\x20runtime\x20scope.');const _0x5632c5=Number(_0x35a20f);if(!Number['isSafeInteger'](_0x5632c5)||_0x5632c5<=0x0)throw CliErrors['validation'](_0x3955aa(0x186));return _0x5632c5;}export async function prepareRuntimeMemberMutation(_0x12ca44,_0x496c81){const _0x45df49=a53_0x5ee2d8,_0x408110=await resolveRuntimeRoleRef(_0x12ca44[_0x45df49(0x188)],_0x12ca44['str'](_0x45df49(0x198)));if(_0x408110['roleType']===_0x45df49(0x18d))throw CliErrors[_0x45df49(0x18c)](_0x45df49(0x178),_0x45df49(0x19f));const _0x1dfbe1=parseRuntimeUserId(_0x12ca44[_0x45df49(0x1ab)](_0x45df49(0x171))),_0x3ed9eb=(await listRuntimeRoleUsers(_0x12ca44['appCode']))[_0x45df49(0x192)](_0x36f9e8=>({..._0x36f9e8,'userList':[..._0x36f9e8['userList']??[]],'applyUserList':[..._0x36f9e8['applyUserList']??[]]})),_0x1e6840=_0x3ed9eb[_0x45df49(0x19c)](_0x1e8c1e=>_0x1e8c1e['id']===_0x408110['id']);if(!_0x1e6840)throw CliErrors[_0x45df49(0x18c)](_0x45df49(0x18f)+_0x408110['id']+_0x45df49(0x189),_0x45df49(0x197));const _0x555bfd=_0x1e6840['userList']['map'](_0x3a0a05=>_0x3a0a05[_0x45df49(0x16b)]),_0x392d7e=_0x12ca44[_0x45df49(0x17e)](_0x45df49(0x173));if(_0x392d7e!==undefined&&_0x392d7e!==null&&_0x392d7e!==''){const _0x2696dc=_0x12ca44[_0x45df49(0x17a)](_0x45df49(0x173));if(!Number['isSafeInteger'](_0x2696dc)||_0x2696dc<0x0)throw CliErrors[_0x45df49(0x18c)](_0x45df49(0x19a));if(_0x555bfd[_0x45df49(0x183)]!==_0x2696dc)throw CliErrors[_0x45df49(0x18c)](_0x45df49(0x1af)+_0x2696dc+',\x20found\x20'+_0x555bfd['length']+'.','Read\x20the\x20current\x20members\x20and\x20retry\x20with\x20the\x20new\x20expected\x20count.');}const _0x188c7f=_0x555bfd['includes'](_0x1dfbe1),_0x3f6628=[];let _0x9dfd24=!![];if(_0x496c81===_0x45df49(0x195)){const _0x18ff24=await listRuntimeAppUsers(_0x12ca44[_0x45df49(0x188)]),_0x226305=_0x18ff24[_0x45df49(0x1a1)](_0x257fd9=>Number(_0x257fd9[_0x45df49(0x174)])===_0x1dfbe1);if(_0x226305[_0x45df49(0x183)]!==0x1||!_0x226305[0x0][_0x45df49(0x1a4)]?.[_0x45df49(0x179)]())throw CliErrors[_0x45df49(0x18c)](_0x45df49(0x187)+_0x1dfbe1+'\x20was\x20not\x20found\x20in\x20app\x20'+_0x12ca44[_0x45df49(0x188)]+'.',_0x45df49(0x17f));_0x188c7f?(_0x9dfd24=![],_0x3f6628[_0x45df49(0x17b)](_0x45df49(0x1aa)+_0x1dfbe1+'\x20is\x20already\x20in\x20runtime\x20role\x20'+_0x408110['id']+'.')):_0x1e6840['userList'][_0x45df49(0x17b)]({'userId':_0x1dfbe1,'username':_0x226305[0x0][_0x45df49(0x1a4)]});}else!_0x188c7f?(_0x9dfd24=![],_0x3f6628[_0x45df49(0x17b)](_0x45df49(0x1aa)+_0x1dfbe1+_0x45df49(0x1a7)+_0x408110['id']+'.')):_0x1e6840['userList']=_0x1e6840['userList']['filter'](_0x1f6712=>_0x1f6712[_0x45df49(0x16b)]!==_0x1dfbe1);return{'role':_0x408110,'userId':_0x1dfbe1,'roleList':_0x3ed9eb,'before':{'userIds':_0x555bfd},'after':{'userIds':_0x1e6840[_0x45df49(0x1ae)]['map'](_0x4c2ca8=>_0x4c2ca8[_0x45df49(0x16b)])},'shouldWrite':_0x9dfd24,'warnings':_0x3f6628};}function a53_0x27a5(){const _0x4c4909=['Run\x20`lovrabet\x20role\x20list`\x20or\x20pass\x20--role\x20<id>.','userCount','userName','3856797LdahLU','totalCount','\x20is\x20not\x20in\x20runtime\x20role\x20','Role\x20ID\x20must\x20be\x20a\x20positive\x20integer.','649255IDAQax','User\x20','str','USER','Missing\x20runtime\x20role\x20reference.','userList','Runtime\x20role\x20member\x20count\x20changed:\x20expected\x20','userId','ADMIN','Pass\x20one\x20role\x20ID:\x20','string','isSafeInteger','items','user','\x20was\x20not\x20found\x20in\x20app\x20','expect-user-count','code','7387806vgkZBN','6275028RQZvAR','Runtime\x20numeric\x20userId','OWNER\x20runtime\x20role\x20membership\x20cannot\x20be\x20changed\x20with\x20this\x20command.','trim','num','push','32870xcggdo','roleType','flag','Use\x20a\x20numeric\x20userId\x20returned\x20by\x20the\x20current\x20application\x27s\x20personnel\x20list.','Pass\x20--role\x20<id|name>.','paging','number','length','Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name','\x20built-in\x20runtime\x20role\x20','Runtime\x20userId\x20must\x20be\x20a\x20positive\x20safe\x20integer.','Runtime\x20user\x20','appCode','\x20is\x20missing\x20from\x20the\x20grouped\x20member\x20snapshot.','permitCount','join','validation','OWNER','9184yBnCgQ','Runtime\x20role\x20','14041528cUdEYq','Runtime\x20role\x20name\x20\x22','map','Runtime\x20role\x20ID\x20returned\x20by\x20role\x20list','includes','user-add','7515VhvUQW','Reload\x20the\x20role\x20list\x20and\x20retry\x20after\x20the\x20server\x20state\x20is\x20consistent.','role','164uhQhJD','--expect-user-count\x20must\x20be\x20a\x20non-negative\x20integer.','3nJRtbL','find','roleName','\x22\x20is\x20ambiguous.','Transfer\x20or\x20manage\x20application\x20ownership\x20through\x20the\x20dedicated\x20application\x20workflow.','Runtime\x20role\x20membership\x20requires\x20a\x20numeric\x20userId.','filter'];a53_0x27a5=function(){return _0x4c4909;};return a53_0x27a5();}export function runtimeRoleWriteResult(_0x317c21,_0x409fde,_0x4ed05e,_0x5a70e1,_0x2b8cfe,_0x20306f=[]){return{'operation':_0x317c21,'scope':'runtime','selector':_0x409fde,'before':_0x4ed05e,'after':_0x5a70e1,'dryRun':![],'backend':_0x2b8cfe,'warnings':_0x20306f};}
@@ -1 +1 @@
1
- function a54_0x2c17(){const _0x33f392=['The\x20current\x20runtime\x20role\x20API\x20does\x20not\x20support\x20clearing\x20an\x20existing\x20remark.','--name\x20must\x20not\x20be\x20blank.','2cPWZoF','1353789AfcYcu','5kDkBLd','num','Preview:\x20update\x20a\x20runtime\x20CUSTOM\x20role','6817632CfsjxH','New\x20non-empty\x20role\x20remark','build','remark','name','update','/client/permit/role/update','Pass\x20--name\x20or\x20--remark\x20to\x20update\x20the\x20runtime\x20role.','New\x20role\x20name','description','string','12SkzGDy','243489hdRWMy','108HmNmLc','POST','3988NZVAtd','appCode','756077yRHpbe','40oabuWs','trim','role','3487908wIaXYA','high-risk-write','2139973SxJsJP','str','--remark\x20must\x20not\x20be\x20blank.','validation','body','flag','修改当前运行应用中的自定义角色名称或备注;变更会立即影响角色展示。'];a54_0x2c17=function(){return _0x33f392;};return a54_0x2c17();}const a54_0x19216b=a54_0x3ad9;(function(_0x2b6ef8,_0x386a97){const _0x6655ec=a54_0x3ad9,_0x181195=_0x2b6ef8();while(!![]){try{const _0x94976a=-parseInt(_0x6655ec(0x174))/0x1*(parseInt(_0x6655ec(0x188))/0x2)+-parseInt(_0x6655ec(0x175))/0x3*(parseInt(_0x6655ec(0x177))/0x4)+parseInt(_0x6655ec(0x18a))/0x5*(parseInt(_0x6655ec(0x17d))/0x6)+parseInt(_0x6655ec(0x179))/0x7+parseInt(_0x6655ec(0x18d))/0x8+parseInt(_0x6655ec(0x189))/0x9*(-parseInt(_0x6655ec(0x17a))/0xa)+parseInt(_0x6655ec(0x17f))/0xb*(-parseInt(_0x6655ec(0x173))/0xc);if(_0x94976a===_0x386a97)break;else _0x181195['push'](_0x181195['shift']());}catch(_0x1cdd3d){_0x181195['push'](_0x181195['shift']());}}}(a54_0x2c17,0x71c05));import{updateRuntimeAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';function a54_0x3ad9(_0x30edd4,_0x53330f){_0x30edd4=_0x30edd4-0x169;const _0x2c17f7=a54_0x2c17();let _0x3ad92b=_0x2c17f7[_0x30edd4];return _0x3ad92b;}import{assertCustomRuntimeRole,getRuntimeRoleById,projectRuntimeRole,ROLE_ID_FLAG,runtimeRoleWriteResult}from'../../commands/role/shared.js';function updateFields(_0x256d73){const _0x3cf6a6=a54_0x3ad9,_0x50b2f8=_0x256d73['flag']('name')!==undefined,_0x43e3bb=_0x256d73[_0x3cf6a6(0x184)](_0x3cf6a6(0x16b))!==undefined;if(!_0x50b2f8&&!_0x43e3bb)throw CliErrors[_0x3cf6a6(0x182)](_0x3cf6a6(0x16f));const _0x104da7=_0x256d73[_0x3cf6a6(0x180)](_0x3cf6a6(0x16c))['trim'](),_0x4e5066=_0x256d73[_0x3cf6a6(0x180)](_0x3cf6a6(0x16b))[_0x3cf6a6(0x17b)]();if(_0x50b2f8&&!_0x104da7)throw CliErrors[_0x3cf6a6(0x182)](_0x3cf6a6(0x187));if(_0x43e3bb&&!_0x4e5066)throw CliErrors[_0x3cf6a6(0x182)](_0x3cf6a6(0x181),_0x3cf6a6(0x186));return{..._0x50b2f8?{'roleName':_0x104da7}:{},..._0x43e3bb?{'remark':_0x4e5066}:{}};}async function prepare(_0x152dcd){const _0x5b7b72=a54_0x3ad9,_0x90b41=await getRuntimeRoleById(_0x152dcd['appCode'],_0x152dcd[_0x5b7b72(0x18b)]('id'));return assertCustomRuntimeRole(_0x90b41,'update'),{'role':_0x90b41,'body':{'id':_0x90b41['id'],'appCode':_0x152dcd[_0x5b7b72(0x178)],...updateFields(_0x152dcd)}};}export const roleUpdate={'service':a54_0x19216b(0x17c),'command':a54_0x19216b(0x16d),'description':'Update\x20a\x20runtime\x20CUSTOM\x20role','risk':a54_0x19216b(0x17e),'confirmationDescription':a54_0x19216b(0x185),'flags':[ROLE_ID_FLAG,{'name':a54_0x19216b(0x16c),'type':a54_0x19216b(0x172),'description':a54_0x19216b(0x170)},{'name':a54_0x19216b(0x16b),'type':'string','description':a54_0x19216b(0x169)}],async 'validate'(_0x2b985c){updateFields(_0x2b985c);},async 'dryRun'(_0x3af87c){const _0x58d409=a54_0x19216b,{body:_0x469065}=await prepare(_0x3af87c);return dryRun(_0x58d409(0x176),_0x58d409(0x16e))[_0x58d409(0x183)](_0x469065)[_0x58d409(0x171)](_0x58d409(0x18c))[_0x58d409(0x16a)]();},async 'execute'(_0x390a2d){const _0x40c938=a54_0x19216b,{role:_0x48208a,body:_0x3deac6}=await prepare(_0x390a2d),_0x5d2b3f=await updateRuntimeAppRole(_0x3deac6);return{'ok':!![],'data':runtimeRoleWriteResult(_0x40c938(0x16d),{'roleId':_0x48208a['id']},projectRuntimeRole(_0x48208a),projectRuntimeRole(_0x5d2b3f),{'method':_0x40c938(0x176),'path':_0x40c938(0x16e)})};}};
1
+ const a54_0x5d128a=a54_0x3443;(function(_0x54d06c,_0x10d948){const _0x23e520=a54_0x3443,_0x127a46=_0x54d06c();while(!![]){try{const _0x881621=parseInt(_0x23e520(0x174))/0x1*(parseInt(_0x23e520(0x167))/0x2)+-parseInt(_0x23e520(0x15f))/0x3*(parseInt(_0x23e520(0x16f))/0x4)+parseInt(_0x23e520(0x177))/0x5+parseInt(_0x23e520(0x179))/0x6*(parseInt(_0x23e520(0x165))/0x7)+-parseInt(_0x23e520(0x173))/0x8+parseInt(_0x23e520(0x166))/0x9*(-parseInt(_0x23e520(0x172))/0xa)+parseInt(_0x23e520(0x161))/0xb;if(_0x881621===_0x10d948)break;else _0x127a46['push'](_0x127a46['shift']());}catch(_0x3d9ef6){_0x127a46['push'](_0x127a46['shift']());}}}(a54_0x16ae,0x1949d));import{updateRuntimeAppRole}from'../../core/api-client.js';function a54_0x3443(_0x307f23,_0x9018a6){_0x307f23=_0x307f23-0x15f;const _0x16ae9e=a54_0x16ae();let _0x3443e3=_0x16ae9e[_0x307f23];return _0x3443e3;}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(_0x2d5b9e){const _0xc4d9c8=a54_0x3443,_0x36128e=_0x2d5b9e[_0xc4d9c8(0x16d)](_0xc4d9c8(0x171))!==undefined,_0x578433=_0x2d5b9e['flag'](_0xc4d9c8(0x16c))!==undefined;if(!_0x36128e&&!_0x578433)throw CliErrors[_0xc4d9c8(0x17b)](_0xc4d9c8(0x176));const _0x3b5d17=_0x2d5b9e['str'](_0xc4d9c8(0x171))[_0xc4d9c8(0x164)](),_0x19d517=_0x2d5b9e[_0xc4d9c8(0x162)](_0xc4d9c8(0x16c))[_0xc4d9c8(0x164)]();if(_0x36128e&&!_0x3b5d17)throw CliErrors[_0xc4d9c8(0x17b)]('--name\x20must\x20not\x20be\x20blank.');if(_0x578433&&!_0x19d517)throw CliErrors[_0xc4d9c8(0x17b)](_0xc4d9c8(0x178),_0xc4d9c8(0x168));return{..._0x36128e?{'roleName':_0x3b5d17}:{},..._0x578433?{'remark':_0x19d517}:{}};}async function prepare(_0x1aba5d){const _0x12a9a3=a54_0x3443,_0x479cc9=await getRuntimeRoleById(_0x1aba5d[_0x12a9a3(0x16a)],_0x1aba5d['num']('id'));return assertCustomRuntimeRole(_0x479cc9,_0x12a9a3(0x17a)),{'role':_0x479cc9,'body':{'id':_0x479cc9['id'],'appCode':_0x1aba5d[_0x12a9a3(0x16a)],...updateFields(_0x1aba5d)}};}function a54_0x16ae(){const _0x509136=['flag','修改当前运行应用中的自定义角色名称或备注;变更会立即影响角色展示。','4PXnjqF','body','name','890SWJuwU','985392tqMJGQ','20uGGZyq','string','Pass\x20--name\x20or\x20--remark\x20to\x20update\x20the\x20runtime\x20role.','218690sOHQEt','--remark\x20must\x20not\x20be\x20blank.','4722lqKGjY','update','validation','high-risk-write','role','36579JeUOnQ','description','1676279XKQzMm','str','/client/permit/role/update','trim','847tPFlDx','10386GbYlpB','5030ycwcGg','The\x20current\x20runtime\x20role\x20API\x20does\x20not\x20support\x20clearing\x20an\x20existing\x20remark.','New\x20role\x20name','appCode','Update\x20a\x20runtime\x20CUSTOM\x20role','remark'];a54_0x16ae=function(){return _0x509136;};return a54_0x16ae();}export const roleUpdate={'service':a54_0x5d128a(0x17d),'command':a54_0x5d128a(0x17a),'description':a54_0x5d128a(0x16b),'risk':a54_0x5d128a(0x17c),'confirmationDescription':a54_0x5d128a(0x16e),'flags':[ROLE_ID_FLAG,{'name':'name','type':a54_0x5d128a(0x175),'description':a54_0x5d128a(0x169)},{'name':'remark','type':a54_0x5d128a(0x175),'description':'New\x20non-empty\x20role\x20remark'}],async 'validate'(_0x183605){updateFields(_0x183605);},async 'dryRun'(_0x254df3){const _0x58b6c4=a54_0x5d128a,{body:_0x334b7c}=await prepare(_0x254df3);return dryRun('POST','/client/permit/role/update')[_0x58b6c4(0x170)](_0x334b7c)[_0x58b6c4(0x160)]('Preview:\x20update\x20a\x20runtime\x20CUSTOM\x20role')['build']();},async 'execute'(_0x5444e0){const _0x2c05aa=a54_0x5d128a,{role:_0x667e71,body:_0x2206fd}=await prepare(_0x5444e0),_0x77442f=await updateRuntimeAppRole(_0x2206fd);return{'ok':!![],'data':runtimeRoleWriteResult('update',{'roleId':_0x667e71['id']},projectRuntimeRole(_0x667e71),projectRuntimeRole(_0x77442f),{'method':'POST','path':_0x2c05aa(0x163)})};}};
@@ -1 +1 @@
1
- const a55_0x3c9f04=a55_0x6e8c;(function(_0x5b23ca,_0x5a84af){const _0x58eecc=a55_0x6e8c,_0x5f050b=_0x5b23ca();while(!![]){try{const _0x1ebd55=parseInt(_0x58eecc(0xa7))/0x1+parseInt(_0x58eecc(0xa8))/0x2+-parseInt(_0x58eecc(0xaf))/0x3*(parseInt(_0x58eecc(0xad))/0x4)+parseInt(_0x58eecc(0xbe))/0x5*(parseInt(_0x58eecc(0xb0))/0x6)+parseInt(_0x58eecc(0xba))/0x7*(-parseInt(_0x58eecc(0xb8))/0x8)+-parseInt(_0x58eecc(0xc0))/0x9+parseInt(_0x58eecc(0xa9))/0xa;if(_0x1ebd55===_0x5a84af)break;else _0x5f050b['push'](_0x5f050b['shift']());}catch(_0x28773c){_0x5f050b['push'](_0x5f050b['shift']());}}}(a55_0x58fa,0x5b58c));function a55_0x6e8c(_0x36de80,_0x38174f){_0x36de80=_0x36de80-0xa7;const _0x58fab9=a55_0x58fa();let _0x6e8cb7=_0x58fab9[_0x36de80];return _0x6e8cb7;}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_0x58fa(){const _0x5c3a13=['user-add','298434pVzpdM','65298FhJnWg','before','Preview:\x20add\x20runtime\x20role\x20member','POST','high-risk-write','把指定运行用户加入目标角色;该用户将获得该角色对应的运行权限。','roleList','body','8jTHiSy','role','5063947bOGexB','warnings','shouldWrite','description','220embXTQ','Add\x20a\x20numeric\x20userId\x20to\x20one\x20runtime\x20role','3601584XmTZSj','appCode','9991QxHVIS','538806jKARex','13363750TXgwDJ','build','userId','/client/permit/user-role/update-user-list','24aHaOJs'];a55_0x58fa=function(){return _0x5c3a13;};return a55_0x58fa();}export const roleUserAdd={'service':a55_0x3c9f04(0xb9),'command':a55_0x3c9f04(0xae),'description':a55_0x3c9f04(0xbf),'risk':a55_0x3c9f04(0xb4),'confirmationDescription':a55_0x3c9f04(0xb5),'flags':[ROLE_REF_FLAG,USER_ID_FLAG,EXPECT_USER_COUNT_FLAG],async 'dryRun'(_0x1bbb03){const _0x4c1ef6=a55_0x3c9f04,_0x49aee4=await prepareRuntimeMemberMutation(_0x1bbb03,'user-add');return dryRun('POST',_0x4c1ef6(0xac))[_0x4c1ef6(0xb7)]({'appCode':_0x1bbb03[_0x4c1ef6(0xc1)],'roleList':_0x49aee4[_0x4c1ef6(0xb6)]})[_0x4c1ef6(0xbd)](_0x49aee4[_0x4c1ef6(0xbc)]?_0x4c1ef6(0xb2):_0x49aee4[_0x4c1ef6(0xbb)][0x0])[_0x4c1ef6(0xaa)]();},async 'execute'(_0x5e3981){const _0x10eaec=a55_0x3c9f04,_0x573a60=await prepareRuntimeMemberMutation(_0x5e3981,_0x10eaec(0xae));return _0x573a60[_0x10eaec(0xbc)]&&await updateRuntimeRoleUsers(_0x5e3981[_0x10eaec(0xc1)],_0x573a60['roleList']),{'ok':!![],'data':runtimeRoleWriteResult('user-add',{'roleId':_0x573a60['role']['id'],'userId':_0x573a60[_0x10eaec(0xab)]},_0x573a60[_0x10eaec(0xb1)],_0x573a60['after'],{'method':_0x10eaec(0xb3),'path':'/client/permit/user-role/update-user-list'},_0x573a60[_0x10eaec(0xbb)])};}};
1
+ function a55_0x2bbe(){const _0x51a035=['102394oXYAPk','2897488VEknah','roleList','appCode','/client/permit/user-role/update-user-list','8FOVQdD','userId','body','589243lUzAUp','Preview:\x20add\x20runtime\x20role\x20member','725275jmlQuF','before','user-add','6xuSWCw','8380665lahZvR','role','POST','high-risk-write','warnings','39zPQsOX','5139421OomiiN','shouldWrite','build','24339090PgLxQC'];a55_0x2bbe=function(){return _0x51a035;};return a55_0x2bbe();}const a55_0x21613d=a55_0x1870;(function(_0x5e975f,_0x4b3285){const _0x16ae02=a55_0x1870,_0x3af1d1=_0x5e975f();while(!![]){try{const _0x3a0373=-parseInt(_0x16ae02(0x14a))/0x1+-parseInt(_0x16ae02(0x15a))/0x2*(parseInt(_0x16ae02(0x155))/0x3)+-parseInt(_0x16ae02(0x15b))/0x4+-parseInt(_0x16ae02(0x14c))/0x5*(parseInt(_0x16ae02(0x14f))/0x6)+-parseInt(_0x16ae02(0x156))/0x7*(parseInt(_0x16ae02(0x147))/0x8)+parseInt(_0x16ae02(0x150))/0x9+parseInt(_0x16ae02(0x159))/0xa;if(_0x3a0373===_0x4b3285)break;else _0x3af1d1['push'](_0x3af1d1['shift']());}catch(_0x25ca7b){_0x3af1d1['push'](_0x3af1d1['shift']());}}}(a55_0x2bbe,0x7bb24));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_0x1870(_0x2f022d,_0x293585){_0x2f022d=_0x2f022d-0x146;const _0x2bbe17=a55_0x2bbe();let _0x18701e=_0x2bbe17[_0x2f022d];return _0x18701e;}export const roleUserAdd={'service':a55_0x21613d(0x151),'command':a55_0x21613d(0x14e),'description':'Add\x20a\x20numeric\x20userId\x20to\x20one\x20runtime\x20role','risk':a55_0x21613d(0x153),'confirmationDescription':'把指定运行用户加入目标角色;该用户将获得该角色对应的运行权限。','flags':[ROLE_REF_FLAG,USER_ID_FLAG,EXPECT_USER_COUNT_FLAG],async 'dryRun'(_0x162f94){const _0x4c0236=a55_0x21613d,_0x52f212=await prepareRuntimeMemberMutation(_0x162f94,_0x4c0236(0x14e));return dryRun(_0x4c0236(0x152),_0x4c0236(0x146))[_0x4c0236(0x149)]({'appCode':_0x162f94[_0x4c0236(0x15d)],'roleList':_0x52f212[_0x4c0236(0x15c)]})['description'](_0x52f212[_0x4c0236(0x157)]?_0x4c0236(0x14b):_0x52f212[_0x4c0236(0x154)][0x0])[_0x4c0236(0x158)]();},async 'execute'(_0xb76889){const _0x59989c=a55_0x21613d,_0x2443b7=await prepareRuntimeMemberMutation(_0xb76889,'user-add');return _0x2443b7[_0x59989c(0x157)]&&await updateRuntimeRoleUsers(_0xb76889[_0x59989c(0x15d)],_0x2443b7[_0x59989c(0x15c)]),{'ok':!![],'data':runtimeRoleWriteResult('user-add',{'roleId':_0x2443b7['role']['id'],'userId':_0x2443b7[_0x59989c(0x148)]},_0x2443b7[_0x59989c(0x14d)],_0x2443b7['after'],{'method':_0x59989c(0x152),'path':_0x59989c(0x146)},_0x2443b7[_0x59989c(0x154)])};}};
@@ -1 +1 @@
1
- const a56_0x39b84e=a56_0x5324;function a56_0x5792(){const _0x3b2bc1=['roleList','role','168142cWjAsS','before','after','1043736fMzogd','userId','827373Xqfseo','appCode','3784736jZyFJo','Remove\x20a\x20numeric\x20userId\x20from\x20one\x20runtime\x20role','把指定运行用户移出目标角色;该用户将失去仅由该角色授予的运行权限。','5515osWeeK','description','2529297nrnwzP','user-remove','body','POST','warnings','2116TbzXoL','21847uzctTh','build','shouldWrite','534HUkcXm'];a56_0x5792=function(){return _0x3b2bc1;};return a56_0x5792();}(function(_0x23ce76,_0x5e16b9){const _0x4380c9=a56_0x5324,_0x34ec00=_0x23ce76();while(!![]){try{const _0x312512=parseInt(_0x4380c9(0x92))/0x1+parseInt(_0x4380c9(0x95))/0x2+parseInt(_0x4380c9(0x97))/0x3+parseInt(_0x4380c9(0xa3))/0x4*(-parseInt(_0x4380c9(0x9c))/0x5)+-parseInt(_0x4380c9(0x8f))/0x6*(parseInt(_0x4380c9(0xa4))/0x7)+parseInt(_0x4380c9(0x99))/0x8+-parseInt(_0x4380c9(0x9e))/0x9;if(_0x312512===_0x5e16b9)break;else _0x34ec00['push'](_0x34ec00['shift']());}catch(_0x14b9b2){_0x34ec00['push'](_0x34ec00['shift']());}}}(a56_0x5792,0x4869c));import{updateRuntimeRoleUsers}from'../../core/api-client.js';function a56_0x5324(_0x44572d,_0x286f74){_0x44572d=_0x44572d-0x8f;const _0x5792a8=a56_0x5792();let _0x5324bb=_0x5792a8[_0x44572d];return _0x5324bb;}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_0x39b84e(0x91),'command':a56_0x39b84e(0x9f),'description':a56_0x39b84e(0x9a),'risk':'high-risk-write','confirmationDescription':a56_0x39b84e(0x9b),'flags':[ROLE_REF_FLAG,USER_ID_FLAG,EXPECT_USER_COUNT_FLAG],async 'dryRun'(_0x458fb7){const _0x8b1a8=a56_0x39b84e,_0x5d1f16=await prepareRuntimeMemberMutation(_0x458fb7,_0x8b1a8(0x9f));return dryRun(_0x8b1a8(0xa1),'/client/permit/user-role/update-user-list')[_0x8b1a8(0xa0)]({'appCode':_0x458fb7['appCode'],'roleList':_0x5d1f16[_0x8b1a8(0x90)]})[_0x8b1a8(0x9d)](_0x5d1f16['shouldWrite']?'Preview:\x20remove\x20runtime\x20role\x20member':_0x5d1f16[_0x8b1a8(0xa2)][0x0])[_0x8b1a8(0xa5)]();},async 'execute'(_0x360ac5){const _0x125372=a56_0x39b84e,_0x2142c2=await prepareRuntimeMemberMutation(_0x360ac5,_0x125372(0x9f));return _0x2142c2[_0x125372(0xa6)]&&await updateRuntimeRoleUsers(_0x360ac5[_0x125372(0x98)],_0x2142c2['roleList']),{'ok':!![],'data':runtimeRoleWriteResult(_0x125372(0x9f),{'roleId':_0x2142c2['role']['id'],'userId':_0x2142c2[_0x125372(0x96)]},_0x2142c2[_0x125372(0x93)],_0x2142c2[_0x125372(0x94)],{'method':_0x125372(0xa1),'path':'/client/permit/user-role/update-user-list'},_0x2142c2[_0x125372(0xa2)])};}};
1
+ function a56_0x4fa4(_0x547615,_0x1943cd){_0x547615=_0x547615-0x86;const _0x2db2e5=a56_0x2db2();let _0x4fa45d=_0x2db2e5[_0x547615];return _0x4fa45d;}function a56_0x2db2(){const _0x2cf66b=['before','/client/permit/user-role/update-user-list','role','1304615PJEKSn','2295163qzuMTa','2513770wVLNsn','11ccuzAy','117qfCcSg','140990pLUMvn','warnings','Remove\x20a\x20numeric\x20userId\x20from\x20one\x20runtime\x20role','12oUSggu','userId','把指定运行用户移出目标角色;该用户将失去仅由该角色授予的运行权限。','shouldWrite','after','Preview:\x20remove\x20runtime\x20role\x20member','1AEhwpF','build','820390uwekFM','170672bMwjQB','6099rURROZ','POST','appCode','user-remove','12ZXQyWx','6SFyOVn'];a56_0x2db2=function(){return _0x2cf66b;};return a56_0x2db2();}const a56_0x26cf12=a56_0x4fa4;(function(_0x46ace2,_0x159e22){const _0xb41739=a56_0x4fa4,_0x42f549=_0x46ace2();while(!![]){try{const _0x1faed5=-parseInt(_0xb41739(0x8b))/0x1*(parseInt(_0xb41739(0x9d))/0x2)+parseInt(_0xb41739(0x8f))/0x3*(-parseInt(_0xb41739(0xa0))/0x4)+-parseInt(_0xb41739(0x98))/0x5+-parseInt(_0xb41739(0x94))/0x6*(-parseInt(_0xb41739(0x9a))/0x7)+-parseInt(_0xb41739(0x8e))/0x8*(-parseInt(_0xb41739(0x9c))/0x9)+parseInt(_0xb41739(0x8d))/0xa*(parseInt(_0xb41739(0x9b))/0xb)+parseInt(_0xb41739(0x93))/0xc*(-parseInt(_0xb41739(0x99))/0xd);if(_0x1faed5===_0x159e22)break;else _0x42f549['push'](_0x42f549['shift']());}catch(_0x17ff92){_0x42f549['push'](_0x42f549['shift']());}}}(a56_0x2db2,0x31e87));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_0x26cf12(0x97),'command':a56_0x26cf12(0x92),'description':a56_0x26cf12(0x9f),'risk':'high-risk-write','confirmationDescription':a56_0x26cf12(0x87),'flags':[ROLE_REF_FLAG,USER_ID_FLAG,EXPECT_USER_COUNT_FLAG],async 'dryRun'(_0x409fa4){const _0x2573ce=a56_0x26cf12,_0x879a5e=await prepareRuntimeMemberMutation(_0x409fa4,_0x2573ce(0x92));return dryRun(_0x2573ce(0x90),_0x2573ce(0x96))['body']({'appCode':_0x409fa4[_0x2573ce(0x91)],'roleList':_0x879a5e['roleList']})['description'](_0x879a5e[_0x2573ce(0x88)]?_0x2573ce(0x8a):_0x879a5e[_0x2573ce(0x9e)][0x0])[_0x2573ce(0x8c)]();},async 'execute'(_0x1c3ae5){const _0x42d364=a56_0x26cf12,_0x3be4fc=await prepareRuntimeMemberMutation(_0x1c3ae5,_0x42d364(0x92));return _0x3be4fc['shouldWrite']&&await updateRuntimeRoleUsers(_0x1c3ae5[_0x42d364(0x91)],_0x3be4fc['roleList']),{'ok':!![],'data':runtimeRoleWriteResult(_0x42d364(0x92),{'roleId':_0x3be4fc[_0x42d364(0x97)]['id'],'userId':_0x3be4fc[_0x42d364(0x86)]},_0x3be4fc[_0x42d364(0x95)],_0x3be4fc[_0x42d364(0x89)],{'method':_0x42d364(0x90),'path':_0x42d364(0x96)},_0x3be4fc['warnings'])};}};