@lovrabet/lovrabet-cli 2.2.4-beta.1 → 2.2.4-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. package/lib/cli.js +1 -1
  2. package/lib/commands/api-doc/index.js +1 -1
  3. package/lib/commands/app/cache.js +1 -1
  4. package/lib/commands/app/definitions.js +1 -1
  5. package/lib/commands/app/eligibility.js +1 -1
  6. package/lib/commands/app/mock-loader.js +1 -1
  7. package/lib/commands/app/remote-source.js +1 -1
  8. package/lib/commands/app/shared.js +1 -1
  9. package/lib/commands/app-config/get.js +1 -1
  10. package/lib/commands/app-config/index.js +1 -1
  11. package/lib/commands/artifact/index.js +1 -1
  12. package/lib/commands/auth/device.js +1 -1
  13. package/lib/commands/auth/index.js +1 -1
  14. package/lib/commands/auth/prompt.js +1 -1
  15. package/lib/commands/bff/detail.js +1 -1
  16. package/lib/commands/bff/exec.js +1 -1
  17. package/lib/commands/bff/index.js +1 -1
  18. package/lib/commands/cli-skill/index.js +1 -1
  19. package/lib/commands/common/config-policy.js +1 -1
  20. package/lib/commands/common/constraints.js +1 -1
  21. package/lib/commands/common/flags.js +1 -1
  22. package/lib/commands/common/local-file.js +1 -1
  23. package/lib/commands/config/definitions.js +1 -1
  24. package/lib/commands/config/shared.js +1 -1
  25. package/lib/commands/data/index.js +1 -1
  26. package/lib/commands/dataset/detail.js +1 -1
  27. package/lib/commands/dataset/index.js +1 -1
  28. package/lib/commands/dataset/list.js +1 -1
  29. package/lib/commands/dataset/sdk-doc.js +1 -1
  30. package/lib/commands/doctor.js +1 -1
  31. package/lib/commands/file/index.js +1 -1
  32. package/lib/commands/init.js +1 -1
  33. package/lib/commands/kb/index.js +1 -1
  34. package/lib/commands/logs/index.js +1 -1
  35. package/lib/commands/notification/config-list.js +1 -1
  36. package/lib/commands/notification/index.js +1 -1
  37. package/lib/commands/notification/shared.js +1 -1
  38. package/lib/commands/ocr/index.js +1 -1
  39. package/lib/commands/permit/dataset-get.js +1 -1
  40. package/lib/commands/permit/dataset-set.js +1 -1
  41. package/lib/commands/permit/index.js +1 -1
  42. package/lib/commands/permit/page-get.js +1 -1
  43. package/lib/commands/permit/page-set.js +1 -1
  44. package/lib/commands/permit/role-menus-set.js +1 -1
  45. package/lib/commands/permit/role-menus.js +1 -1
  46. package/lib/commands/permit/shared.js +1 -1
  47. package/lib/commands/personal-bff/index.js +1 -1
  48. package/lib/commands/registry.js +1 -1
  49. package/lib/commands/role/create.js +1 -1
  50. package/lib/commands/role/delete.js +1 -1
  51. package/lib/commands/role/detail.js +1 -1
  52. package/lib/commands/role/index.js +1 -1
  53. package/lib/commands/role/list.js +1 -1
  54. package/lib/commands/role/shared.js +1 -1
  55. package/lib/commands/role/update.js +1 -1
  56. package/lib/commands/role/user-add.js +1 -1
  57. package/lib/commands/role/user-remove.js +1 -1
  58. package/lib/commands/schedule/index.js +1 -1
  59. package/lib/commands/schema.js +1 -1
  60. package/lib/commands/service/dynamic.js +1 -1
  61. package/lib/commands/service/function-name-adapter.js +1 -1
  62. package/lib/commands/service/index.js +1 -1
  63. package/lib/commands/service/registry.js +1 -1
  64. package/lib/commands/skill/commands/create.js +1 -1
  65. package/lib/commands/skill/commands/diagram.js +1 -1
  66. package/lib/commands/skill/commands/install.js +1 -1
  67. package/lib/commands/skill/commands/list.js +1 -1
  68. package/lib/commands/skill/commands/push.js +1 -1
  69. package/lib/commands/skill/commands/validate.js +1 -1
  70. package/lib/commands/skill/diagram.js +1 -1
  71. package/lib/commands/skill/flags.js +1 -1
  72. package/lib/commands/skill/index.js +1 -1
  73. package/lib/commands/skill/manifest-helpers.js +1 -1
  74. package/lib/commands/skill/push-execute.js +1 -1
  75. package/lib/commands/skill/push-flow-helpers.js +1 -1
  76. package/lib/commands/skill/push-retarget.js +1 -1
  77. package/lib/commands/skill/scopes.js +1 -1
  78. package/lib/commands/skill/summary.js +1 -1
  79. package/lib/commands/skill/templates.js +1 -1
  80. package/lib/commands/skill/validate.js +1 -1
  81. package/lib/commands/sql/detail.js +1 -1
  82. package/lib/commands/sql/exec.js +1 -1
  83. package/lib/commands/sql/index.js +1 -1
  84. package/lib/commands/update.js +1 -1
  85. package/lib/commands/user-account/bind.js +1 -1
  86. package/lib/commands/user-account/index.js +1 -1
  87. package/lib/commands/workspace/index.js +1 -1
  88. package/lib/config/schema.js +1 -1
  89. package/lib/constant/app.js +1 -1
  90. package/lib/constant/auth-mode.js +1 -1
  91. package/lib/constant/cli.js +1 -1
  92. package/lib/constant/defaults.js +1 -1
  93. package/lib/constant/distribution.js +1 -1
  94. package/lib/constant/domain.js +1 -1
  95. package/lib/constant/env.js +1 -1
  96. package/lib/constant/output.js +1 -1
  97. package/lib/constant/product.js +1 -1
  98. package/lib/constant/risk.js +1 -1
  99. package/lib/constant/url.js +1 -1
  100. package/lib/context.js +1 -1
  101. package/lib/core/api-client.js +1 -1
  102. package/lib/core/db-resolver.js +1 -1
  103. package/lib/core/sdk-client.js +1 -1
  104. package/lib/errors.js +1 -1
  105. package/lib/framework/build-all-flags.js +1 -1
  106. package/lib/framework/dryrun.js +1 -1
  107. package/lib/framework/flags.js +1 -1
  108. package/lib/framework/help.js +1 -1
  109. package/lib/framework/index.js +1 -1
  110. package/lib/framework/output.js +1 -1
  111. package/lib/framework/preparse.js +1 -1
  112. package/lib/framework/rate-limit.js +1 -1
  113. package/lib/framework/raw-flags.js +1 -1
  114. package/lib/framework/response.js +1 -1
  115. package/lib/framework/runner-confirmation.js +1 -1
  116. package/lib/framework/runner-error.js +1 -1
  117. package/lib/framework/runner.js +1 -1
  118. package/lib/framework/schema-export.js +1 -1
  119. package/lib/framework/service-order.js +1 -1
  120. package/lib/framework/types.js +1 -1
  121. package/lib/generated/build-info.d.ts +4 -4
  122. package/lib/generated/build-info.js +1 -1
  123. package/lib/help.js +1 -1
  124. package/lib/postinstall.js +1 -1
  125. package/lib/runtime/confirmation.js +1 -1
  126. package/lib/runtime/event.js +1 -1
  127. package/lib/runtime/index.js +1 -1
  128. package/lib/runtime/queue.js +1 -1
  129. package/lib/runtime/resolve.js +1 -1
  130. package/lib/skills/builtin-skill.js +1 -1
  131. package/lib/skills/npx-skills-add.js +1 -1
  132. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  133. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  134. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  135. package/lib/skills/runtime-skill-sync/install-target.js +1 -1
  136. package/lib/skills/runtime-skill-sync/links.js +1 -1
  137. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  138. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  139. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  140. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  141. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  142. package/lib/skills/runtime-skill-sync/push.js +1 -1
  143. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  144. package/lib/skills/runtime-skill-sync/types.d.ts +1 -0
  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 +2 -2
  159. package/skills/lovrabet/references/lovrabet-skill-authoring.md +5 -4
  160. package/skills/lovrabet.manifest.json +3 -3
@@ -1 +1 @@
1
- const a43_0xb05171=a43_0x5167;(function(_0xba514a,_0x14332a){const _0x441b82=a43_0x5167,_0x2b1226=_0xba514a();while(!![]){try{const _0x5210ae=-parseInt(_0x441b82(0xc4))/0x1*(-parseInt(_0x441b82(0xb3))/0x2)+parseInt(_0x441b82(0xd3))/0x3+parseInt(_0x441b82(0xc0))/0x4+-parseInt(_0x441b82(0xb7))/0x5+parseInt(_0x441b82(0xbb))/0x6*(-parseInt(_0x441b82(0xbc))/0x7)+parseInt(_0x441b82(0xc8))/0x8*(-parseInt(_0x441b82(0xc9))/0x9)+parseInt(_0x441b82(0xcd))/0xa*(parseInt(_0x441b82(0xc5))/0xb);if(_0x5210ae===_0x14332a)break;else _0x2b1226['push'](_0x2b1226['shift']());}catch(_0x21d393){_0x2b1226['push'](_0x2b1226['shift']());}}}(a43_0x2a6f,0x583a1));import{listRuntimeMenuRolePermits,listRuntimePermitRoles,saveRuntimeMenuRolePermits}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';function a43_0x5167(_0x1fe80e,_0x257cc7){_0x1fe80e=_0x1fe80e-0xa9;const _0x2a6f87=a43_0x2a6f();let _0x516741=_0x2a6f87[_0x1fe80e];return _0x516741;}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_0xb05171(0xae),'type':a43_0xb05171(0xc2),'required':!![],'description':a43_0xb05171(0xb9)};async function prepare(_0x54a6c9){const _0x302db1=a43_0xb05171;await assertRuntimePermissionManager(_0x54a6c9['appCode']);const _0x1c0d60=assertGrantOrRevoke(_0x54a6c9[_0x302db1(0xd7)](_0x302db1(0xc6)),_0x54a6c9[_0x302db1(0xd7)](_0x302db1(0xd4))),_0x49b255=await resolveRuntimeRoleRef(_0x54a6c9[_0x302db1(0xd8)],_0x54a6c9['str'](_0x302db1(0xd0)));assertRuntimePermitRoleConfigurable(_0x49b255);const _0x1e6717=[...new Set(splitRefs(_0x54a6c9[_0x302db1(0xc3)]('menus'),_0x302db1(0xb4))[_0x302db1(0xaf)](_0x1f3a11=>{const _0x3c1a5e=_0x302db1,_0x50e890=Number(_0x1f3a11);if(!/^\d+$/['test'](_0x1f3a11)||!Number['isSafeInteger'](_0x50e890)||_0x50e890<=0x0)throw CliErrors[_0x3c1a5e(0xc1)]('Invalid\x20runtime\x20menu\x20ID:\x20'+_0x1f3a11+'.');return _0x50e890;}))],_0x1f5f2f=flattenRuntimeMenuRolePermits(await listRuntimeMenuRolePermits(_0x54a6c9['appCode'])),_0x436e8c=await listRuntimePermitRoles(_0x54a6c9['appCode']),_0x4173d0=[],_0x426590=[],_0x22ac20=[],_0x49b6d9=[];for(const _0x117097 of _0x1e6717){const _0x5dacf8=_0x1f5f2f['find'](_0x42c028=>_0x42c028['id']===_0x117097);if(!_0x5dacf8)throw CliErrors[_0x302db1(0xc1)](_0x302db1(0xbf)+_0x117097+_0x302db1(0xa9));const _0x52b861=applyRuntimeRolePermission(_0x5dacf8[_0x302db1(0xb0)],_0x49b255,_0x436e8c,_0x1c0d60);_0x426590[_0x302db1(0xca)]({'menuId':_0x117097,'rolePermit':_0x5dacf8[_0x302db1(0xb0)]}),_0x22ac20[_0x302db1(0xca)]({'menuId':_0x117097,'rolePermit':_0x52b861[_0x302db1(0xd1)]});if(_0x52b861[_0x302db1(0xcb)])_0x4173d0[_0x302db1(0xca)](menuPermitDto(_0x54a6c9[_0x302db1(0xd8)],_0x5dacf8,_0x52b861[_0x302db1(0xd1)]));else _0x49b6d9[_0x302db1(0xca)]('Runtime\x20menu\x20'+_0x117097+_0x302db1(0xcf)+_0x1c0d60+_0x302db1(0xab)+_0x49b255['id']+'.');}return{'operation':_0x1c0d60,'role':_0x49b255,'menuIds':_0x1e6717,'permitList':_0x4173d0,'before':_0x426590,'after':_0x22ac20,'warnings':_0x49b6d9};}function a43_0x2a6f(){const _0x31321a=['\x20for\x20role\x20','high-risk-write','warnings','menus','map','rolePermit','/client/permit/resource/batch-save-menu','body','48GAnKlx','--menus','POST','role-menus-set','2002775byBJVS','operation','Comma-separated\x20runtime\x20menu\x20IDs','length','12TajLPl','242494biMjoI','permitList','Grant\x20or\x20revoke\x20selected\x20runtime\x20menus\x20for\x20one\x20role','Runtime\x20menu\x20','2842876GbrHSg','validation','string','str','18017bymnAl','11WDjrZb','grant','build','1587656hnIaiY','27ruPcMP','push','changed','permit','1501070DiNfJO','\x20selected\x20runtime\x20menus','\x20already\x20reflects\x20','role','roles','after','400059ekcbwu','revoke','授予或收回目标角色对指定运行菜单的访问权限;变更会影响该角色用户的菜单可见性。','menu-','bool','appCode','\x20was\x20not\x20found.','Preview:\x20'];a43_0x2a6f=function(){return _0x31321a;};return a43_0x2a6f();}export const permitRoleMenusSet={'service':a43_0xb05171(0xcc),'command':a43_0xb05171(0xb6),'description':a43_0xb05171(0xbe),'risk':a43_0xb05171(0xac),'confirmationDescription':a43_0xb05171(0xd5),'flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,MENUS_FLAG],async 'validate'(_0x4f5dae){const _0x462cd0=a43_0xb05171;assertGrantOrRevoke(_0x4f5dae['bool']('grant'),_0x4f5dae['bool'](_0x462cd0(0xd4)));},async 'dryRun'(_0x128353){const _0x412202=a43_0xb05171,_0x540b4c=await prepare(_0x128353);return dryRun('POST',_0x412202(0xb1))[_0x412202(0xb2)]({'appCode':_0x128353[_0x412202(0xd8)],'permitList':_0x540b4c[_0x412202(0xbd)]})['description'](_0x412202(0xaa)+_0x540b4c[_0x412202(0xb8)]+_0x412202(0xce))[_0x412202(0xc7)]();},async 'execute'(_0x2c4c8f){const _0x270f29=a43_0xb05171,_0x131739=await prepare(_0x2c4c8f);return _0x131739[_0x270f29(0xbd)][_0x270f29(0xba)]>0x0&&await saveRuntimeMenuRolePermits(_0x2c4c8f[_0x270f29(0xd8)],_0x131739[_0x270f29(0xbd)]),{'ok':!![],'data':runtimePermitWriteResult(_0x270f29(0xd6)+_0x131739[_0x270f29(0xb8)],{'roleId':_0x131739[_0x270f29(0xd0)]['id'],'menuIds':_0x131739['menuIds']},_0x131739['before'],_0x131739[_0x270f29(0xd2)],{'method':_0x270f29(0xb5),'path':_0x270f29(0xb1)},_0x131739[_0x270f29(0xad)])};}};
1
+ function a43_0x11e5(){const _0x18e43f=['role','授予或收回目标角色对指定运行菜单的访问权限;变更会影响该角色用户的菜单可见性。','high-risk-write','Runtime\x20menu\x20','menu-','permitList','warnings','menus','POST','menuIds','push','operation','after','isSafeInteger','revoke','336086VpWDYW','Comma-separated\x20runtime\x20menu\x20IDs','Preview:\x20','validation','body','appCode','build','map','\x20selected\x20runtime\x20menus','find','length','802724hNGyaM','\x20was\x20not\x20found.','bool','role-menus-set','--menus','11934636GvmlTL','1710492RlYHDG','grant','25wMpDMa','\x20for\x20role\x20','permit','before','1529361uWHLWW','\x20already\x20reflects\x20','string','str','15312672FvGVfE','Invalid\x20runtime\x20menu\x20ID:\x20','/client/permit/resource/batch-save-menu','rolePermit','roles','6330786OiNesk'];a43_0x11e5=function(){return _0x18e43f;};return a43_0x11e5();}function a43_0x3f4a(_0x50a63d,_0x5d01ac){_0x50a63d=_0x50a63d-0x1a9;const _0x11e5eb=a43_0x11e5();let _0x3f4a80=_0x11e5eb[_0x50a63d];return _0x3f4a80;}const a43_0x536b19=a43_0x3f4a;(function(_0x597b2f,_0x1c6c19){const _0x473772=a43_0x3f4a,_0x15630e=_0x597b2f();while(!![]){try{const _0x4d90a0=parseInt(_0x473772(0x1c1))/0x1+-parseInt(_0x473772(0x1b0))/0x2+-parseInt(_0x473772(0x1c7))/0x3+-parseInt(_0x473772(0x1bb))/0x4*(parseInt(_0x473772(0x1c3))/0x5)+parseInt(_0x473772(0x1d0))/0x6+parseInt(_0x473772(0x1c0))/0x7+-parseInt(_0x473772(0x1cb))/0x8;if(_0x4d90a0===_0x1c6c19)break;else _0x15630e['push'](_0x15630e['shift']());}catch(_0x434f89){_0x15630e['push'](_0x15630e['shift']());}}}(a43_0x11e5,0xd5af4));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':'menus','type':a43_0x536b19(0x1c9),'required':!![],'description':a43_0x536b19(0x1b1)};async function prepare(_0x3ad016){const _0x3c8391=a43_0x536b19;await assertRuntimePermissionManager(_0x3ad016[_0x3c8391(0x1b5)]);const _0x13acd7=assertGrantOrRevoke(_0x3ad016[_0x3c8391(0x1bd)](_0x3c8391(0x1c2)),_0x3ad016[_0x3c8391(0x1bd)](_0x3c8391(0x1af))),_0x3310cc=await resolveRuntimeRoleRef(_0x3ad016[_0x3c8391(0x1b5)],_0x3ad016[_0x3c8391(0x1ca)](_0x3c8391(0x1d1)));assertRuntimePermitRoleConfigurable(_0x3310cc);const _0x490766=[...new Set(splitRefs(_0x3ad016[_0x3c8391(0x1ca)](_0x3c8391(0x1d8)),_0x3c8391(0x1bf))[_0x3c8391(0x1b7)](_0x47f71c=>{const _0xf1c7a3=_0x3c8391,_0x36dffb=Number(_0x47f71c);if(!/^\d+$/['test'](_0x47f71c)||!Number[_0xf1c7a3(0x1ae)](_0x36dffb)||_0x36dffb<=0x0)throw CliErrors['validation'](_0xf1c7a3(0x1cc)+_0x47f71c+'.');return _0x36dffb;}))],_0xcbe7af=flattenRuntimeMenuRolePermits(await listRuntimeMenuRolePermits(_0x3ad016[_0x3c8391(0x1b5)])),_0x1a938b=await listRuntimePermitRoles(_0x3ad016['appCode']),_0x42e4d1=[],_0x585957=[],_0x2e587d=[],_0x233abb=[];for(const _0x13ad7c of _0x490766){const _0x1bf460=_0xcbe7af[_0x3c8391(0x1b9)](_0xd665c1=>_0xd665c1['id']===_0x13ad7c);if(!_0x1bf460)throw CliErrors[_0x3c8391(0x1b3)](_0x3c8391(0x1d4)+_0x13ad7c+_0x3c8391(0x1bc));const _0x317547=applyRuntimeRolePermission(_0x1bf460['rolePermit'],_0x3310cc,_0x1a938b,_0x13acd7);_0x585957[_0x3c8391(0x1ab)]({'menuId':_0x13ad7c,'rolePermit':_0x1bf460[_0x3c8391(0x1ce)]}),_0x2e587d[_0x3c8391(0x1ab)]({'menuId':_0x13ad7c,'rolePermit':_0x317547[_0x3c8391(0x1cf)]});if(_0x317547['changed'])_0x42e4d1['push'](menuPermitDto(_0x3ad016[_0x3c8391(0x1b5)],_0x1bf460,_0x317547[_0x3c8391(0x1cf)]));else _0x233abb[_0x3c8391(0x1ab)](_0x3c8391(0x1d4)+_0x13ad7c+_0x3c8391(0x1c8)+_0x13acd7+_0x3c8391(0x1c4)+_0x3310cc['id']+'.');}return{'operation':_0x13acd7,'role':_0x3310cc,'menuIds':_0x490766,'permitList':_0x42e4d1,'before':_0x585957,'after':_0x2e587d,'warnings':_0x233abb};}export const permitRoleMenusSet={'service':a43_0x536b19(0x1c5),'command':a43_0x536b19(0x1be),'description':'Grant\x20or\x20revoke\x20selected\x20runtime\x20menus\x20for\x20one\x20role','risk':a43_0x536b19(0x1d3),'confirmationDescription':a43_0x536b19(0x1d2),'flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,MENUS_FLAG],async 'validate'(_0x516c71){const _0x57c7bb=a43_0x536b19;assertGrantOrRevoke(_0x516c71[_0x57c7bb(0x1bd)]('grant'),_0x516c71['bool'](_0x57c7bb(0x1af)));},async 'dryRun'(_0x4dfa86){const _0x57140d=a43_0x536b19,_0x56aa93=await prepare(_0x4dfa86);return dryRun(_0x57140d(0x1a9),'/client/permit/resource/batch-save-menu')[_0x57140d(0x1b4)]({'appCode':_0x4dfa86[_0x57140d(0x1b5)],'permitList':_0x56aa93['permitList']})['description'](_0x57140d(0x1b2)+_0x56aa93[_0x57140d(0x1ac)]+_0x57140d(0x1b8))[_0x57140d(0x1b6)]();},async 'execute'(_0x40ed35){const _0x3558d1=a43_0x536b19,_0x36af68=await prepare(_0x40ed35);return _0x36af68[_0x3558d1(0x1d6)][_0x3558d1(0x1ba)]>0x0&&await saveRuntimeMenuRolePermits(_0x40ed35[_0x3558d1(0x1b5)],_0x36af68[_0x3558d1(0x1d6)]),{'ok':!![],'data':runtimePermitWriteResult(_0x3558d1(0x1d5)+_0x36af68[_0x3558d1(0x1ac)],{'roleId':_0x36af68['role']['id'],'menuIds':_0x36af68[_0x3558d1(0x1aa)]},_0x36af68[_0x3558d1(0x1c6)],_0x36af68[_0x3558d1(0x1ad)],{'method':'POST','path':_0x3558d1(0x1cd)},_0x36af68[_0x3558d1(0x1d7)])};}};
@@ -1 +1 @@
1
- const a44_0x15001d=a44_0x210a;(function(_0x133f5f,_0x3bfbc9){const _0x4cb2d2=a44_0x210a,_0x3b2739=_0x133f5f();while(!![]){try{const _0x3457fd=parseInt(_0x4cb2d2(0x1f1))/0x1+-parseInt(_0x4cb2d2(0x1f2))/0x2+-parseInt(_0x4cb2d2(0x1f8))/0x3*(-parseInt(_0x4cb2d2(0x1f4))/0x4)+parseInt(_0x4cb2d2(0x200))/0x5*(parseInt(_0x4cb2d2(0x1f5))/0x6)+parseInt(_0x4cb2d2(0x1f3))/0x7*(-parseInt(_0x4cb2d2(0x1f0))/0x8)+-parseInt(_0x4cb2d2(0x1ff))/0x9*(parseInt(_0x4cb2d2(0x1f7))/0xa)+parseInt(_0x4cb2d2(0x1fb))/0xb;if(_0x3457fd===_0x3bfbc9)break;else _0x3b2739['push'](_0x3b2739['shift']());}catch(_0x4b8cb0){_0x3b2739['push'](_0x3b2739['shift']());}}}(a44_0x1e1b,0xdc030));function a44_0x210a(_0xc02558,_0x39d5d9){_0xc02558=_0xc02558-0x1f0;const _0x1e1b1a=a44_0x1e1b();let _0x210a42=_0x1e1b1a[_0xc02558];return _0x210a42;}import{getRuntimeRoleMenuResources}from'../../core/api-client.js';import{resolveRuntimeRoleRef}from'../../commands/role/shared.js';function a44_0x1e1b(){const _0x46d3ed=['24120ZnThge','1570281wvaDwv','runtime','roleName','27674999FVHMpf','str','roleType','permit','4797KDEUHD','4110nFXmFs','read','11207696EQWLHV','106866arSmyk','425576PBOCiK','7njxBbn','4QnGRMI','4776ZsstPn','Show\x20evaluated\x20runtime\x20menu\x20access\x20for\x20one\x20role'];a44_0x1e1b=function(){return _0x46d3ed;};return a44_0x1e1b();}import{ROLE_REF_FLAG}from'../../commands/permit/shared.js';export const permitRoleMenus={'service':a44_0x15001d(0x1fe),'command':'role-menus','description':a44_0x15001d(0x1f6),'risk':a44_0x15001d(0x201),'flags':[ROLE_REF_FLAG],async 'execute'(_0x3e41e2){const _0x3ad3db=a44_0x15001d,_0x44df4d=await resolveRuntimeRoleRef(_0x3e41e2['appCode'],_0x3e41e2[_0x3ad3db(0x1fc)]('role')),_0xe97299=await getRuntimeRoleMenuResources(_0x3e41e2['appCode'],_0x44df4d['id']);return{'ok':!![],'data':{'scope':_0x3ad3db(0x1f9),'role':{'id':_0x44df4d['id'],'roleName':_0x44df4d[_0x3ad3db(0x1fa)],'roleType':_0x44df4d[_0x3ad3db(0x1fd)]},'menus':_0xe97299}};}};
1
+ const a44_0x19d1e5=a44_0x1633;(function(_0x18668e,_0x15c0cc){const _0x39ca2b=a44_0x1633,_0x5717e8=_0x18668e();while(!![]){try{const _0x10f93a=-parseInt(_0x39ca2b(0xed))/0x1+-parseInt(_0x39ca2b(0xe4))/0x2*(-parseInt(_0x39ca2b(0xf3))/0x3)+parseInt(_0x39ca2b(0xf2))/0x4*(parseInt(_0x39ca2b(0xf4))/0x5)+-parseInt(_0x39ca2b(0xe5))/0x6+-parseInt(_0x39ca2b(0xee))/0x7+-parseInt(_0x39ca2b(0xe6))/0x8*(parseInt(_0x39ca2b(0xeb))/0x9)+parseInt(_0x39ca2b(0xf1))/0xa;if(_0x10f93a===_0x15c0cc)break;else _0x5717e8['push'](_0x5717e8['shift']());}catch(_0x5914d7){_0x5717e8['push'](_0x5717e8['shift']());}}}(a44_0x4657,0x3847d));import{getRuntimeRoleMenuResources}from'../../core/api-client.js';function a44_0x4657(){const _0x505dea=['read','10729460HYdIcd','132SbppIZ','3sBtFLX','23445fsTAqB','str','850758SRuMCF','2680032zwGChm','8XFKzML','appCode','permit','roleType','role-menus','797463RIYuDW','roleName','446372GnEEVx','3086202QCEEdw','Show\x20evaluated\x20runtime\x20menu\x20access\x20for\x20one\x20role'];a44_0x4657=function(){return _0x505dea;};return a44_0x4657();}function a44_0x1633(_0x112c0e,_0x39de21){_0x112c0e=_0x112c0e-0xe3;const _0x4657f4=a44_0x4657();let _0x1633ca=_0x4657f4[_0x112c0e];return _0x1633ca;}import{resolveRuntimeRoleRef}from'../../commands/role/shared.js';import{ROLE_REF_FLAG}from'../../commands/permit/shared.js';export const permitRoleMenus={'service':a44_0x19d1e5(0xe8),'command':a44_0x19d1e5(0xea),'description':a44_0x19d1e5(0xef),'risk':a44_0x19d1e5(0xf0),'flags':[ROLE_REF_FLAG],async 'execute'(_0x1405d0){const _0x328504=a44_0x19d1e5,_0x3d1bc5=await resolveRuntimeRoleRef(_0x1405d0[_0x328504(0xe7)],_0x1405d0[_0x328504(0xe3)]('role')),_0x4492da=await getRuntimeRoleMenuResources(_0x1405d0[_0x328504(0xe7)],_0x3d1bc5['id']);return{'ok':!![],'data':{'scope':'runtime','role':{'id':_0x3d1bc5['id'],'roleName':_0x3d1bc5[_0x328504(0xec)],'roleType':_0x3d1bc5[_0x328504(0xe9)]},'menus':_0x4492da}};}};
@@ -1 +1 @@
1
- const a45_0x52913b=a45_0x5c0f;function a45_0x33ea(){const _0x2bbbe5=['key','2164686AtTUIC','runtime','userId','Configure\x20USER,\x20CUSTOM,\x20or\x20an\x20applicable\x20special\x20role\x20instead.','6CcNYPp','menu-roles','2655BqHxEU','631108WrjYUE','detail-roles','row-roles','\x20has\x20full\x20runtime\x20access\x20and\x20cannot\x20be\x20a\x20resource\x20permission\x20target.','556WjToWJ','SELF','MENU','Ask\x20an\x20application\x20manager\x20to\x20perform\x20this\x20operation.','trim','Permission\x20role\x20\x22','SELF\x20is\x20only\x20valid\x20for\x20--row-roles.','resourceCode','dataCreate','Cannot\x20revoke\x20the\x20last\x20role\x20from\x20a\x20runtime\x20resource.','revoke','Runtime\x20menu\x20ID','13608wKRbpz','OWNER','find','validation','926871mZKAlw','30xSEzyZ','toUpperCase','ALL','map','rolePermit','isSafeInteger','\x22\x20was\x20not\x20found.','appCode','963DiOeFY','filter','roleName','ADMIN','dataExport','children','export-roles','userList','permitId','resourceType','Grant\x20the\x20selected\x20resources\x20to\x20the\x20role','menu-id','boolean','\x20must\x20contain\x20at\x20least\x20one\x20value.','datasetCode','some','values','delete-roles','menuId','1272708TwAlUf','label','roleType','pageId','Runtime\x20resource\x20permission\x20changes\x20require\x20an\x20ADMIN\x20or\x20OWNER\x20role.','30PRBygW','Use\x20a\x20role\x20ID\x20from\x20`lovrabet\x20role\x20list`.','270214ChmTjF','length','dataUpdate','Revoke\x20the\x20selected\x20resources\x20from\x20the\x20role','\x20runtime\x20role\x20','grant','menuPermit','flag','push','Comma-separated\x20runtime\x20role\x20IDs\x20or\x20names','39HwDwVz','string'];a45_0x33ea=function(){return _0x2bbbe5;};return a45_0x33ea();}(function(_0x5574d0,_0x5abbe5){const _0x4eec0c=a45_0x5c0f,_0x394038=_0x5574d0();while(!![]){try{const _0x53778a=parseInt(_0x4eec0c(0xd9))/0x1*(-parseInt(_0x4eec0c(0xc0))/0x2)+-parseInt(_0x4eec0c(0xb5))/0x3+parseInt(_0x4eec0c(0xbc))/0x4*(parseInt(_0x4eec0c(0xd1))/0x5)+-parseInt(_0x4eec0c(0xb9))/0x6*(parseInt(_0x4eec0c(0xf3))/0x7)+-parseInt(_0x4eec0c(0xcc))/0x8*(-parseInt(_0x4eec0c(0xbb))/0x9)+-parseInt(_0x4eec0c(0xf1))/0xa*(parseInt(_0x4eec0c(0xd0))/0xb)+-parseInt(_0x4eec0c(0xec))/0xc*(-parseInt(_0x4eec0c(0xfd))/0xd);if(_0x53778a===_0x5abbe5)break;else _0x394038['push'](_0x394038['shift']());}catch(_0x28b547){_0x394038['push'](_0x394038['shift']());}}}(a45_0x33ea,0x76a55));import{getLoginUserInfo,listRuntimePermitRoles,listRuntimeRoleUsers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const MENU_ID_FLAG={'name':a45_0x52913b(0xe4),'type':'number','required':!![],'description':a45_0x52913b(0xcb)};export const ROLE_REF_FLAG={'name':'role','type':a45_0x52913b(0xfe),'required':!![],'description':'Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name'};export const GRANT_FLAG={'name':a45_0x52913b(0xf8),'type':a45_0x52913b(0xe5),'description':a45_0x52913b(0xe3)};export const REVOKE_FLAG={'name':a45_0x52913b(0xca),'type':'boolean','description':a45_0x52913b(0xf6)};export const PAGE_SLOT_SPECS=[{'flag':a45_0x52913b(0xba),'key':a45_0x52913b(0xf9),'allowSelf':![]},{'flag':'create-roles','key':a45_0x52913b(0xc8),'allowSelf':![]},{'flag':'update-roles','key':a45_0x52913b(0xf5),'allowSelf':![]},{'flag':a45_0x52913b(0xea),'key':'dataDelete','allowSelf':![]},{'flag':a45_0x52913b(0xbd),'key':'dataDetail','allowSelf':![]},{'flag':a45_0x52913b(0xdf),'key':a45_0x52913b(0xdd),'allowSelf':![]},{'flag':a45_0x52913b(0xbe),'key':'dataPermit','allowSelf':!![]}];export const PAGE_ROLE_FLAGS=PAGE_SLOT_SPECS['map'](_0x413913=>({'name':_0x413913[a45_0x52913b(0xfa)],'type':'string','description':a45_0x52913b(0xfc)}));export function splitRefs(_0x428eb1,_0x5766a2){const _0x4c924f=a45_0x52913b,_0xf0eb7d=[...new Set(_0x428eb1['split'](',')[_0x4c924f(0xd4)](_0x2fe435=>_0x2fe435[_0x4c924f(0xc4)]())['filter'](Boolean))];if(_0xf0eb7d[_0x4c924f(0xf4)]===0x0)throw CliErrors['validation'](_0x5766a2+_0x4c924f(0xe6));return _0xf0eb7d;}export function assertGrantOrRevoke(_0xd09d0c,_0x535d8a){const _0x3ef673=a45_0x52913b;if(_0xd09d0c===_0x535d8a)throw CliErrors[_0x3ef673(0xcf)]('Pass\x20exactly\x20one\x20of\x20--grant\x20or\x20--revoke.');return _0xd09d0c?'grant':_0x3ef673(0xca);}function a45_0x5c0f(_0x1ad5c6,_0x88f171){_0x1ad5c6=_0x1ad5c6-0xb5;const _0x33eacf=a45_0x33ea();let _0x5c0f64=_0x33eacf[_0x1ad5c6];return _0x5c0f64;}function resolvePermitRole(_0x27bb26,_0x3ddb85){const _0x42ff84=a45_0x52913b,_0x50a0e9=_0x3ddb85['trim'](),_0x4b86d8=/^-?\d+$/['test'](_0x50a0e9)?_0x27bb26[_0x42ff84(0xda)](_0x5da00a=>_0x5da00a['id']===Number(_0x50a0e9)):_0x27bb26['filter'](_0x2aef0a=>_0x2aef0a[_0x42ff84(0xdb)]===_0x50a0e9||_0x2aef0a[_0x42ff84(0xee)]===_0x50a0e9[_0x42ff84(0xd2)]());if(_0x4b86d8[_0x42ff84(0xf4)]!==0x1)throw CliErrors[_0x42ff84(0xcf)](_0x4b86d8['length']===0x0?_0x42ff84(0xc5)+_0x50a0e9+_0x42ff84(0xd7):_0x42ff84(0xc5)+_0x50a0e9+'\x22\x20is\x20ambiguous.',_0x42ff84(0xf2));return _0x4b86d8[0x0];}export async function resolveRuntimePermitRoles(_0x1309e4,_0x310a40,_0xa7a8d1){const _0x32735b=a45_0x52913b,_0x50155=await listRuntimePermitRoles(_0x1309e4,{'needSelf':!![],'needPublic':!![]}),_0x5acb62=[...new Map(_0x310a40[_0x32735b(0xd4)](_0x44aa81=>resolvePermitRole(_0x50155,_0x44aa81))[_0x32735b(0xd4)](_0xad05b2=>[_0xad05b2['id'],_0xad05b2]))[_0x32735b(0xe9)]()],_0x173e11=_0x5acb62[_0x32735b(0xce)](_0x37dd02=>_0x37dd02[_0x32735b(0xee)]===_0x32735b(0xdc)||_0x37dd02[_0x32735b(0xee)]===_0x32735b(0xcd));if(_0x173e11)throw CliErrors['validation'](_0x173e11[_0x32735b(0xee)]+_0x32735b(0xbf),_0x32735b(0xb8));if(!_0xa7a8d1&&_0x5acb62[_0x32735b(0xe8)](_0x21a8f3=>_0x21a8f3[_0x32735b(0xee)]===_0x32735b(0xc1)))throw CliErrors[_0x32735b(0xcf)](_0x32735b(0xc6));return _0x5acb62;}export async function assertRuntimePermissionManager(_0x1d6fba){const _0x269841=a45_0x52913b,_0x24abd3=await getLoginUserInfo(),_0x22c135=_0x24abd3['userId']??_0x24abd3['id'],_0x310b8f=Number(_0x22c135);if(!Number[_0x269841(0xd6)](_0x310b8f)||_0x310b8f<=0x0)throw CliErrors['validation']('Cannot\x20resolve\x20the\x20current\x20AK\x20userId\x20for\x20permission\x20management.');const _0x33887a=await listRuntimeRoleUsers(_0x1d6fba),_0x4ddc95=_0x33887a[_0x269841(0xe8)](_0x2af7be=>(_0x2af7be[_0x269841(0xee)]===_0x269841(0xdc)||_0x2af7be['roleType']===_0x269841(0xcd))&&_0x2af7be[_0x269841(0xe0)]['some'](_0x1c2e92=>_0x1c2e92[_0x269841(0xb7)]===_0x310b8f));if(!_0x4ddc95)throw CliErrors[_0x269841(0xcf)](_0x269841(0xf0),_0x269841(0xc3));}export function assertRuntimePermitRoleConfigurable(_0x3650b3){const _0x379915=a45_0x52913b;if(_0x3650b3['roleType']==='ADMIN'||_0x3650b3[_0x379915(0xee)]===_0x379915(0xcd))throw CliErrors['validation']('Cannot\x20change\x20resource\x20permissions\x20for\x20'+_0x3650b3[_0x379915(0xee)]+_0x379915(0xf7)+_0x3650b3[_0x379915(0xdb)]+'.','ADMIN\x20and\x20OWNER\x20have\x20full\x20runtime\x20access;\x20configure\x20USER\x20or\x20CUSTOM\x20instead.');}function asPermitRole(_0x2055c9){const _0x15cbc6=a45_0x52913b;return{'id':_0x2055c9['id'],'roleName':_0x2055c9[_0x15cbc6(0xdb)],'roleType':_0x2055c9[_0x15cbc6(0xee)],'allowed':!![]};}export function applyRuntimeRolePermission(_0x5d60d3,_0x115a5a,_0x517e5a,_0x4da496){const _0x4e5ddc=a45_0x52913b,_0x4559e4=!_0x5d60d3||_0x5d60d3[_0x4e5ddc(0xf4)]===0x0,_0x4701ec=_0x5d60d3?.['some'](_0x30507e=>_0x30507e[_0x4e5ddc(0xee)]===_0x4e5ddc(0xd3))??![];if(_0x4da496===_0x4e5ddc(0xf8)&&(_0x4559e4||_0x4701ec))return{'roles':_0x5d60d3??null,'changed':![]};let _0x23daa4=_0x4559e4||_0x4701ec?_0x517e5a[_0x4e5ddc(0xda)](_0x1ffdde=>_0x1ffdde['id']>0x0):[..._0x5d60d3];const _0x5973bf=_0x23daa4[_0x4e5ddc(0xe8)](_0x200071=>_0x200071['id']===_0x115a5a['id']);if(_0x4da496==='grant'){if(_0x5973bf)return{'roles':_0x23daa4,'changed':![]};return _0x23daa4[_0x4e5ddc(0xfb)](asPermitRole(_0x115a5a)),{'roles':_0x23daa4,'changed':!![]};}if(!_0x5973bf)return{'roles':_0x23daa4,'changed':_0x4559e4||_0x4701ec};_0x23daa4=_0x23daa4[_0x4e5ddc(0xda)](_0x42d3d4=>_0x42d3d4['id']!==_0x115a5a['id']);if(_0x23daa4['length']===0x0)throw CliErrors[_0x4e5ddc(0xcf)](_0x4e5ddc(0xc9),'The\x20current\x20service\x20contract\x20does\x20not\x20persist\x20an\x20empty\x20rolePermit;\x20grant\x20another\x20role\x20first.');return{'roles':_0x23daa4,'changed':!![]};}export function projectRuntimePagePermit(_0x39fc2e){const _0x5b26c5=a45_0x52913b,_0x3851eb={'menuId':_0x39fc2e[_0x5b26c5(0xeb)],'pageId':_0x39fc2e[_0x5b26c5(0xef)],'appCode':_0x39fc2e[_0x5b26c5(0xd8)],'datasetCode':_0x39fc2e[_0x5b26c5(0xe7)]};for(const _0x16ca8b of PAGE_SLOT_SPECS){const _0x5c42e4=_0x39fc2e[_0x16ca8b[_0x5b26c5(0xff)]];_0x5c42e4&&(_0x3851eb[_0x16ca8b[_0x5b26c5(0xff)]]={'resourceCode':_0x5c42e4[_0x5b26c5(0xc7)],'resourceType':_0x5c42e4[_0x5b26c5(0xe2)],'roles':(_0x5c42e4[_0x5b26c5(0xd5)]??[])[_0x5b26c5(0xd4)](_0x48c828=>({'id':_0x48c828['id'],'roleName':_0x48c828[_0x5b26c5(0xdb)],'roleType':_0x48c828[_0x5b26c5(0xee)]}))});}return _0x3851eb;}export function flattenRuntimeMenuRolePermits(_0xee6fef){const _0x4b8fa6=[],_0x47221a=_0xec7a60=>{const _0xe19942=a45_0x5c0f;_0x4b8fa6[_0xe19942(0xfb)](_0xec7a60);for(const _0x13dc05 of _0xec7a60[_0xe19942(0xde)]??[])_0x47221a(_0x13dc05);};for(const _0x372578 of _0xee6fef)_0x47221a(_0x372578);return _0x4b8fa6;}export function runtimePermitWriteResult(_0x4296f0,_0x1c8cac,_0x44e31c,_0x19fedb,_0x22a535,_0x54a079=[]){const _0x4fecd0=a45_0x52913b;return{'operation':_0x4296f0,'scope':_0x4fecd0(0xb6),'selector':_0x1c8cac,'before':_0x44e31c,'after':_0x19fedb,'dryRun':![],'backend':_0x22a535,'warnings':_0x54a079};}export function menuPermitDto(_0x2f2fbf,_0x53c583,_0x5dc868){const _0x2fd7f0=a45_0x52913b;return{..._0x53c583[_0x2fd7f0(0xe1)]!=null?{'id':_0x53c583[_0x2fd7f0(0xe1)]}:{},'appCode':_0x2f2fbf,'menuId':_0x53c583['id'],'pageId':_0x53c583[_0x2fd7f0(0xef)]??null,'resourceCode':String(_0x53c583['id']),'resourceType':_0x2fd7f0(0xc2),'resourceName':_0x53c583[_0x2fd7f0(0xed)],'rolePermit':_0x5dc868};}
1
+ const a45_0x1d826f=a45_0x1941;(function(_0x32403a,_0x4a9287){const _0x50d2cb=a45_0x1941,_0x56b6a3=_0x32403a();while(!![]){try{const _0x48bf79=parseInt(_0x50d2cb(0x17d))/0x1*(-parseInt(_0x50d2cb(0x1a5))/0x2)+-parseInt(_0x50d2cb(0x198))/0x3*(-parseInt(_0x50d2cb(0x174))/0x4)+parseInt(_0x50d2cb(0x178))/0x5*(parseInt(_0x50d2cb(0x166))/0x6)+-parseInt(_0x50d2cb(0x191))/0x7+parseInt(_0x50d2cb(0x181))/0x8+-parseInt(_0x50d2cb(0x17e))/0x9+-parseInt(_0x50d2cb(0x179))/0xa*(-parseInt(_0x50d2cb(0x18f))/0xb);if(_0x48bf79===_0x4a9287)break;else _0x56b6a3['push'](_0x56b6a3['shift']());}catch(_0x1a1719){_0x56b6a3['push'](_0x56b6a3['shift']());}}}(a45_0x31af,0x1cdf4));function a45_0x1941(_0x1601e8,_0x3909c4){_0x1601e8=_0x1601e8-0x163;const _0x31af85=a45_0x31af();let _0x19418d=_0x31af85[_0x1601e8];return _0x19418d;}import{getLoginUserInfo,listRuntimePermitRoles,listRuntimeRoleUsers}from'../../core/api-client.js';function a45_0x31af(){const _0x1f0f36=['menu-roles','SELF','resourceCode','revoke','map','menuId','datasetCode','15389wkkxRo','dataDetail','370272xwgpph','number','menu-id','userId','pageId','MENU','length','1209eLajqc','boolean','Runtime\x20resource\x20permission\x20changes\x20require\x20an\x20ADMIN\x20or\x20OWNER\x20role.','\x20must\x20contain\x20at\x20least\x20one\x20value.','Use\x20a\x20role\x20ID\x20from\x20`lovrabet\x20role\x20list`.','isSafeInteger','string','update-roles','resourceType','Ask\x20an\x20application\x20manager\x20to\x20perform\x20this\x20operation.','\x20runtime\x20role\x20','row-roles','trim','5938MsabpH','role','push','dataCreate','dataPermit','toUpperCase','key','roleName','rolePermit','50874rfDMQd','some','permitId','Revoke\x20the\x20selected\x20resources\x20from\x20the\x20role','Comma-separated\x20runtime\x20role\x20IDs\x20or\x20names','delete-roles','appCode','roleType','OWNER','find','Cannot\x20resolve\x20the\x20current\x20AK\x20userId\x20for\x20permission\x20management.','ADMIN','split','children','1328gUDwJi','Permission\x20role\x20\x22','Grant\x20the\x20selected\x20resources\x20to\x20the\x20role','validation','5DBEegG','1430DmjvuM','filter','Configure\x20USER,\x20CUSTOM,\x20or\x20an\x20applicable\x20special\x20role\x20instead.','Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name','56acDodE','146349SQrSQp','ALL','detail-roles','90792lapStc','The\x20current\x20service\x20contract\x20does\x20not\x20persist\x20an\x20empty\x20rolePermit;\x20grant\x20another\x20role\x20first.','label','create-roles','dataDelete','values','grant'];a45_0x31af=function(){return _0x1f0f36;};return a45_0x31af();}import{CliErrors}from'../../errors.js';export const MENU_ID_FLAG={'name':a45_0x1d826f(0x193),'type':a45_0x1d826f(0x192),'required':!![],'description':'Runtime\x20menu\x20ID'};export const ROLE_REF_FLAG={'name':a45_0x1d826f(0x1a6),'type':a45_0x1d826f(0x19e),'required':!![],'description':a45_0x1d826f(0x17c)};export const GRANT_FLAG={'name':a45_0x1d826f(0x187),'type':a45_0x1d826f(0x199),'description':a45_0x1d826f(0x176)};export const REVOKE_FLAG={'name':a45_0x1d826f(0x18b),'type':a45_0x1d826f(0x199),'description':a45_0x1d826f(0x169)};export const PAGE_SLOT_SPECS=[{'flag':a45_0x1d826f(0x188),'key':'menuPermit','allowSelf':![]},{'flag':a45_0x1d826f(0x184),'key':a45_0x1d826f(0x1a8),'allowSelf':![]},{'flag':a45_0x1d826f(0x19f),'key':'dataUpdate','allowSelf':![]},{'flag':a45_0x1d826f(0x16b),'key':a45_0x1d826f(0x185),'allowSelf':![]},{'flag':a45_0x1d826f(0x180),'key':a45_0x1d826f(0x190),'allowSelf':![]},{'flag':'export-roles','key':'dataExport','allowSelf':![]},{'flag':a45_0x1d826f(0x1a3),'key':a45_0x1d826f(0x1a9),'allowSelf':!![]}];export const PAGE_ROLE_FLAGS=PAGE_SLOT_SPECS['map'](_0x31b2eb=>({'name':_0x31b2eb['flag'],'type':'string','description':a45_0x1d826f(0x16a)}));export function splitRefs(_0x2a47fa,_0x1d0c10){const _0x357acb=a45_0x1d826f,_0x41a4f2=[...new Set(_0x2a47fa[_0x357acb(0x172)](',')[_0x357acb(0x18c)](_0x2a8621=>_0x2a8621[_0x357acb(0x1a4)]())[_0x357acb(0x17a)](Boolean))];if(_0x41a4f2[_0x357acb(0x197)]===0x0)throw CliErrors[_0x357acb(0x177)](_0x1d0c10+_0x357acb(0x19b));return _0x41a4f2;}export function assertGrantOrRevoke(_0x52f40b,_0x4d492f){const _0x111b47=a45_0x1d826f;if(_0x52f40b===_0x4d492f)throw CliErrors[_0x111b47(0x177)]('Pass\x20exactly\x20one\x20of\x20--grant\x20or\x20--revoke.');return _0x52f40b?'grant':_0x111b47(0x18b);}function resolvePermitRole(_0x3a63ad,_0x1d049a){const _0x3ad77d=a45_0x1d826f,_0x428e3e=_0x1d049a[_0x3ad77d(0x1a4)](),_0x2e5175=/^-?\d+$/['test'](_0x428e3e)?_0x3a63ad[_0x3ad77d(0x17a)](_0x33be8a=>_0x33be8a['id']===Number(_0x428e3e)):_0x3a63ad['filter'](_0x172fef=>_0x172fef[_0x3ad77d(0x164)]===_0x428e3e||_0x172fef[_0x3ad77d(0x16d)]===_0x428e3e[_0x3ad77d(0x1aa)]());if(_0x2e5175[_0x3ad77d(0x197)]!==0x1)throw CliErrors[_0x3ad77d(0x177)](_0x2e5175['length']===0x0?_0x3ad77d(0x175)+_0x428e3e+'\x22\x20was\x20not\x20found.':_0x3ad77d(0x175)+_0x428e3e+'\x22\x20is\x20ambiguous.',_0x3ad77d(0x19c));return _0x2e5175[0x0];}export async function resolveRuntimePermitRoles(_0x159906,_0x3c4a32,_0x58239c){const _0x44df46=a45_0x1d826f,_0x403160=await listRuntimePermitRoles(_0x159906,{'needSelf':!![],'needPublic':!![]}),_0x383ee7=[...new Map(_0x3c4a32[_0x44df46(0x18c)](_0x565215=>resolvePermitRole(_0x403160,_0x565215))[_0x44df46(0x18c)](_0x341942=>[_0x341942['id'],_0x341942]))[_0x44df46(0x186)]()],_0x32f235=_0x383ee7[_0x44df46(0x16f)](_0x1866b2=>_0x1866b2[_0x44df46(0x16d)]===_0x44df46(0x171)||_0x1866b2[_0x44df46(0x16d)]==='OWNER');if(_0x32f235)throw CliErrors['validation'](_0x32f235[_0x44df46(0x16d)]+'\x20has\x20full\x20runtime\x20access\x20and\x20cannot\x20be\x20a\x20resource\x20permission\x20target.',_0x44df46(0x17b));if(!_0x58239c&&_0x383ee7[_0x44df46(0x167)](_0x3eb00d=>_0x3eb00d['roleType']===_0x44df46(0x189)))throw CliErrors[_0x44df46(0x177)]('SELF\x20is\x20only\x20valid\x20for\x20--row-roles.');return _0x383ee7;}export async function assertRuntimePermissionManager(_0x397c71){const _0x345a96=a45_0x1d826f,_0x488125=await getLoginUserInfo(),_0x1294a=_0x488125['userId']??_0x488125['id'],_0x4a885b=Number(_0x1294a);if(!Number[_0x345a96(0x19d)](_0x4a885b)||_0x4a885b<=0x0)throw CliErrors[_0x345a96(0x177)](_0x345a96(0x170));const _0x11f27c=await listRuntimeRoleUsers(_0x397c71),_0x77ec5=_0x11f27c[_0x345a96(0x167)](_0x20a1d5=>(_0x20a1d5[_0x345a96(0x16d)]===_0x345a96(0x171)||_0x20a1d5[_0x345a96(0x16d)]===_0x345a96(0x16e))&&_0x20a1d5['userList'][_0x345a96(0x167)](_0x3ce769=>_0x3ce769[_0x345a96(0x194)]===_0x4a885b));if(!_0x77ec5)throw CliErrors['validation'](_0x345a96(0x19a),_0x345a96(0x1a1));}export function assertRuntimePermitRoleConfigurable(_0x230516){const _0x372e05=a45_0x1d826f;if(_0x230516[_0x372e05(0x16d)]==='ADMIN'||_0x230516[_0x372e05(0x16d)]===_0x372e05(0x16e))throw CliErrors['validation']('Cannot\x20change\x20resource\x20permissions\x20for\x20'+_0x230516[_0x372e05(0x16d)]+_0x372e05(0x1a2)+_0x230516[_0x372e05(0x164)]+'.','ADMIN\x20and\x20OWNER\x20have\x20full\x20runtime\x20access;\x20configure\x20USER\x20or\x20CUSTOM\x20instead.');}function asPermitRole(_0xd6669f){const _0x186fec=a45_0x1d826f;return{'id':_0xd6669f['id'],'roleName':_0xd6669f[_0x186fec(0x164)],'roleType':_0xd6669f[_0x186fec(0x16d)],'allowed':!![]};}export function applyRuntimeRolePermission(_0x2cb0f8,_0x6d9c74,_0x885a02,_0x443384){const _0x4dedfb=a45_0x1d826f,_0x3da321=!_0x2cb0f8||_0x2cb0f8[_0x4dedfb(0x197)]===0x0,_0x1aa543=_0x2cb0f8?.['some'](_0x54ade4=>_0x54ade4[_0x4dedfb(0x16d)]===_0x4dedfb(0x17f))??![];if(_0x443384===_0x4dedfb(0x187)&&(_0x3da321||_0x1aa543))return{'roles':_0x2cb0f8??null,'changed':![]};let _0xb49e3c=_0x3da321||_0x1aa543?_0x885a02[_0x4dedfb(0x17a)](_0x48db77=>_0x48db77['id']>0x0):[..._0x2cb0f8];const _0xa88e85=_0xb49e3c[_0x4dedfb(0x167)](_0x269276=>_0x269276['id']===_0x6d9c74['id']);if(_0x443384===_0x4dedfb(0x187)){if(_0xa88e85)return{'roles':_0xb49e3c,'changed':![]};return _0xb49e3c[_0x4dedfb(0x1a7)](asPermitRole(_0x6d9c74)),{'roles':_0xb49e3c,'changed':!![]};}if(!_0xa88e85)return{'roles':_0xb49e3c,'changed':_0x3da321||_0x1aa543};_0xb49e3c=_0xb49e3c[_0x4dedfb(0x17a)](_0x13733=>_0x13733['id']!==_0x6d9c74['id']);if(_0xb49e3c[_0x4dedfb(0x197)]===0x0)throw CliErrors[_0x4dedfb(0x177)]('Cannot\x20revoke\x20the\x20last\x20role\x20from\x20a\x20runtime\x20resource.',_0x4dedfb(0x182));return{'roles':_0xb49e3c,'changed':!![]};}export function projectRuntimePagePermit(_0x3818cb){const _0xcc661a=a45_0x1d826f,_0x470c55={'menuId':_0x3818cb[_0xcc661a(0x18d)],'pageId':_0x3818cb[_0xcc661a(0x195)],'appCode':_0x3818cb[_0xcc661a(0x16c)],'datasetCode':_0x3818cb[_0xcc661a(0x18e)]};for(const _0x1f6fe2 of PAGE_SLOT_SPECS){const _0x37b592=_0x3818cb[_0x1f6fe2[_0xcc661a(0x163)]];_0x37b592&&(_0x470c55[_0x1f6fe2[_0xcc661a(0x163)]]={'resourceCode':_0x37b592[_0xcc661a(0x18a)],'resourceType':_0x37b592[_0xcc661a(0x1a0)],'roles':(_0x37b592[_0xcc661a(0x165)]??[])[_0xcc661a(0x18c)](_0x1c1b15=>({'id':_0x1c1b15['id'],'roleName':_0x1c1b15[_0xcc661a(0x164)],'roleType':_0x1c1b15[_0xcc661a(0x16d)]}))});}return _0x470c55;}export function flattenRuntimeMenuRolePermits(_0x28aa90){const _0x3e0ca4=[],_0x5665f5=_0x2c3ecd=>{const _0x5f35e7=a45_0x1941;_0x3e0ca4[_0x5f35e7(0x1a7)](_0x2c3ecd);for(const _0xeb29cc of _0x2c3ecd[_0x5f35e7(0x173)]??[])_0x5665f5(_0xeb29cc);};for(const _0x9198c8 of _0x28aa90)_0x5665f5(_0x9198c8);return _0x3e0ca4;}export function runtimePermitWriteResult(_0x2282ed,_0x32ca87,_0x48ed15,_0x1f8742,_0x348be,_0x13e262=[]){return{'operation':_0x2282ed,'scope':'runtime','selector':_0x32ca87,'before':_0x48ed15,'after':_0x1f8742,'dryRun':![],'backend':_0x348be,'warnings':_0x13e262};}export function menuPermitDto(_0xb20ae3,_0x70f267,_0x3fddb4){const _0x1b9a3e=a45_0x1d826f;return{..._0x70f267[_0x1b9a3e(0x168)]!=null?{'id':_0x70f267[_0x1b9a3e(0x168)]}:{},'appCode':_0xb20ae3,'menuId':_0x70f267['id'],'pageId':_0x70f267[_0x1b9a3e(0x195)]??null,'resourceCode':String(_0x70f267['id']),'resourceType':_0x1b9a3e(0x196),'resourceName':_0x70f267[_0x1b9a3e(0x183)],'rolePermit':_0x3fddb4};}
@@ -1 +1 @@
1
- const a46_0x2aa409=a46_0x13a1;(function(_0x2a74fd,_0x37f90e){const _0x89d9ec=a46_0x13a1,_0x319744=_0x2a74fd();while(!![]){try{const _0x2a5cee=parseInt(_0x89d9ec(0xb7))/0x1+-parseInt(_0x89d9ec(0xda))/0x2*(parseInt(_0x89d9ec(0xbf))/0x3)+parseInt(_0x89d9ec(0xd6))/0x4+parseInt(_0x89d9ec(0xe1))/0x5+-parseInt(_0x89d9ec(0xa8))/0x6+-parseInt(_0x89d9ec(0xb6))/0x7+parseInt(_0x89d9ec(0xc0))/0x8;if(_0x2a5cee===_0x37f90e)break;else _0x319744['push'](_0x319744['shift']());}catch(_0x2393ab){_0x319744['push'](_0x319744['shift']());}}}(a46_0xae56,0xedf9e));import{existsSync,readFileSync,statSync}from'node:fs';function a46_0xae56(){const _0x54c019=['read','File\x20is\x20not\x20a\x20regular\x20file:\x20','length','3855QXiepu','36825464upZHzB','config','Personal\x20BFF\x20script\x20file\x20is\x20blank.','List\x20current\x20user\x27s\x20personal\x20BFF\x20scripts\x20for\x20the\x20current\x20app','Path\x20to\x20a\x20local\x20UTF-8\x20JavaScript\x20or\x20TypeScript\x20file','File\x20path\x20is\x20required.','Updated\x20personal\x20BFF\x20','num','scriptContent','根据本地脚本文件创建个人\x20BFF','map','isArray','scriptType','--params\x20must\x20be\x20a\x20JSON\x20object.','validation','/update','执行个人\x20BFF\x20脚本;脚本可能读取或修改业务数据,也可能调用外部服务。','source-session-id','body','personal-bff','flag','appCode','398380tQJuTV','write','description','--name\x20must\x20be\x20a\x20valid\x20JavaScript\x20identifier,\x20for\x20example\x20loadOrders.','2362IzDCua','updateTime','file','string','gmtCreate','POST','gmtModified','3650800mfpvCN','params','/client/runtime-bff/personal/create','Optional\x20source\x20RuntimeAgent\x20session\x20id','list','trim','version','detail','Created\x20personal\x20BFF\x20','personal-bff\x20update\x20requires\x20at\x20least\x20one\x20of\x20--name,\x20--description,\x20--file,\x20or\x20--source-session-id.','test','9120126uWjScf','name','Personal\x20BFF\x20script\x20ID','bool','utf8','Personal\x20BFF\x20functionName,\x20for\x20example\x20loadOrders','/client/runtime-bff/personal/','create','verbose','Executed\x20personal\x20BFF\x20','build','functionName','update','Show\x20one\x20personal\x20BFF\x20by\x20id','12476674OrDZCq','361800jJmCVR','把本地脚本保存为个人\x20BFF;之后可在当前应用中调用该脚本。','根据\x20ID\x20执行个人\x20BFF,并可传入\x20JSON\x20参数','keys','str'];a46_0xae56=function(){return _0x54c019;};return a46_0xae56();}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_0x2aa409(0xdc),'type':a46_0x2aa409(0xdd),'description':a46_0x2aa409(0xc4)},FUNCTION_NAME_FLAG={'name':a46_0x2aa409(0xa9),'type':a46_0x2aa409(0xdd),'required':!![],'description':a46_0x2aa409(0xad)},DESCRIPTION_FLAG={'name':a46_0x2aa409(0xd8),'type':a46_0x2aa409(0xdd),'description':'Personal\x20BFF\x20description'},SOURCE_SESSION_FLAG={'name':'source-session-id','type':a46_0x2aa409(0xdd),'description':a46_0x2aa409(0xe4)};function normalizeFunctionName(_0x1a0180){const _0x47ca7a=a46_0x2aa409,_0x1378ed=String(_0x1a0180||'')['trim']();if(!_0x1378ed||!FUNCTION_NAME_PATTERN[_0x47ca7a(0xa7)](_0x1378ed))throw CliErrors['validation'](_0x47ca7a(0xd9));return _0x1378ed;}function readScriptFile(_0x171748){const _0x1a07ed=a46_0x2aa409;if(!_0x171748)throw CliErrors['validation'](_0x1a07ed(0xc5));if(!existsSync(_0x171748))throw CliErrors[_0x1a07ed(0xce)]('File\x20not\x20found:\x20'+_0x171748);if(!statSync(_0x171748)['isFile']())throw CliErrors[_0x1a07ed(0xce)](_0x1a07ed(0xbd)+_0x171748);const _0x11b57c=readFileSync(_0x171748,_0x1a07ed(0xac));if(!_0x11b57c[_0x1a07ed(0xe6)]())throw CliErrors[_0x1a07ed(0xce)](_0x1a07ed(0xc2));return _0x11b57c;}function optionalTrimmed(_0x4ad635){const _0x5af341=a46_0x2aa409,_0x3c6ea7=String(_0x4ad635||'')[_0x5af341(0xe6)]();return _0x3c6ea7||undefined;}function summarizeBff(_0x1582a2){const _0x2d8e6e=a46_0x2aa409;return{'id':_0x1582a2['id'],'appCode':_0x1582a2[_0x2d8e6e(0xd5)],'functionName':_0x1582a2[_0x2d8e6e(0xb3)],'description':_0x1582a2[_0x2d8e6e(0xd8)],'scriptType':_0x1582a2['scriptType'],'version':_0x1582a2['version'],'gmtModified':_0x1582a2[_0x2d8e6e(0xe0)],'updateTime':_0x1582a2['updateTime']};}function detailBff(_0x3d5715){const _0x33815e=a46_0x2aa409;return{'id':_0x3d5715['id'],'appCode':_0x3d5715['appCode'],'functionName':_0x3d5715['functionName'],'description':_0x3d5715[_0x33815e(0xd8)],'scriptType':_0x3d5715[_0x33815e(0xcc)],'scriptContent':_0x3d5715[_0x33815e(0xc8)]??'','config':_0x3d5715[_0x33815e(0xc1)],'version':_0x3d5715[_0x33815e(0xa3)],'createUserId':_0x3d5715['createUserId'],'gmtCreate':_0x3d5715[_0x33815e(0xde)],'gmtModified':_0x3d5715[_0x33815e(0xe0)],'createTime':_0x3d5715['createTime'],'updateTime':_0x3d5715[_0x33815e(0xdb)]};}function buildCreateInput(_0x22d1f7){const _0x18c327=a46_0x2aa409;return{'functionName':normalizeFunctionName(_0x22d1f7[_0x18c327(0xbb)]('name')),...optionalTrimmed(_0x22d1f7['str']('description'))?{'description':optionalTrimmed(_0x22d1f7[_0x18c327(0xbb)](_0x18c327(0xd8)))}:{},'scriptContent':readScriptFile(_0x22d1f7[_0x18c327(0xbb)](_0x18c327(0xdc))),...optionalTrimmed(_0x22d1f7[_0x18c327(0xbb)](_0x18c327(0xd1)))?{'sourceSessionId':optionalTrimmed(_0x22d1f7[_0x18c327(0xbb)](_0x18c327(0xd1)))}:{}};}function buildUpdateInput(_0x221fac){const _0x5626cd=a46_0x2aa409,_0x31f790={};optionalTrimmed(_0x221fac['str'](_0x5626cd(0xa9)))&&(_0x31f790[_0x5626cd(0xb3)]=normalizeFunctionName(_0x221fac[_0x5626cd(0xbb)](_0x5626cd(0xa9))));_0x221fac['flag'](_0x5626cd(0xd8))!==undefined&&(_0x31f790[_0x5626cd(0xd8)]=_0x221fac['str'](_0x5626cd(0xd8)));optionalTrimmed(_0x221fac[_0x5626cd(0xbb)]('file'))&&(_0x31f790[_0x5626cd(0xc8)]=readScriptFile(_0x221fac[_0x5626cd(0xbb)]('file')));_0x221fac[_0x5626cd(0xd4)](_0x5626cd(0xd1))!==undefined&&(_0x31f790['sourceSessionId']=_0x221fac[_0x5626cd(0xbb)]('source-session-id'));if(Object[_0x5626cd(0xba)](_0x31f790)[_0x5626cd(0xbe)]===0x0)throw CliErrors[_0x5626cd(0xce)](_0x5626cd(0xa6));return _0x31f790;}function parseExecParams(_0x2d7279){const _0x3bd3ea=a46_0x2aa409,_0x22e485=parseJsonParams(_0x2d7279)??{};if(Array[_0x3bd3ea(0xcb)](_0x22e485))throw CliErrors[_0x3bd3ea(0xce)](_0x3bd3ea(0xcd));return _0x22e485;}function a46_0x13a1(_0x41f274,_0x2a932a){_0x41f274=_0x41f274-0xa3;const _0xae566=a46_0xae56();let _0x13a109=_0xae566[_0x41f274];return _0x13a109;}const personalBffList={'service':a46_0x2aa409(0xd3),'command':a46_0x2aa409(0xe5),'description':a46_0x2aa409(0xc3),'risk':'read','flags':[VERBOSE_FLAG],async 'execute'(_0x453d42){const _0x44f916=a46_0x2aa409,_0x4956f2=await listPersonalBffs(_0x453d42[_0x44f916(0xd5)]);return{'ok':!![],'data':{'total':_0x4956f2['length'],'items':_0x453d42[_0x44f916(0xab)](_0x44f916(0xb0))?_0x4956f2:_0x4956f2[_0x44f916(0xca)](summarizeBff)}};}},personalBffDetail={'service':a46_0x2aa409(0xd3),'command':a46_0x2aa409(0xa4),'description':a46_0x2aa409(0xb5),'risk':a46_0x2aa409(0xbc),'flags':[{...ID_FLAG,'description':a46_0x2aa409(0xaa)}],async 'execute'(_0x3da794){const _0x45ab53=a46_0x2aa409,_0x34043e=await getPersonalBff(_0x3da794['num']('id'),_0x3da794[_0x45ab53(0xd5)]);return{'ok':!![],'data':detailBff(_0x34043e)};}},personalBffCreate={'service':a46_0x2aa409(0xd3),'command':a46_0x2aa409(0xaf),'description':a46_0x2aa409(0xc9),'risk':'write','confirmationDescription':a46_0x2aa409(0xb8),'flags':[FUNCTION_NAME_FLAG,{...FILE_FLAG,'required':!![]},DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x56d59f){const _0x28188d=a46_0x2aa409,_0x1efc5d=buildCreateInput(_0x56d59f),_0x12a919=await createPersonalBff(_0x56d59f[_0x28188d(0xd5)],_0x1efc5d);return{'ok':!![],'data':detailBff(_0x12a919),'message':_0x28188d(0xa5)+_0x12a919['id']+(_0x12a919[_0x28188d(0xb3)]?'\x20('+_0x12a919['functionName']+')':'')};},async 'dryRun'(_0x37d66b){const _0x56c668=a46_0x2aa409,_0x2a6508=buildCreateInput(_0x37d66b);return dryRun(_0x56c668(0xdf),_0x56c668(0xe3))[_0x56c668(0xd2)]({'appCode':_0x37d66b[_0x56c668(0xd5)],..._0x2a6508})[_0x56c668(0xd8)]('Preview:\x20create\x20personal\x20BFF\x20'+_0x2a6508[_0x56c668(0xb3)])['build']();}},personalBffUpdate={'service':a46_0x2aa409(0xd3),'command':a46_0x2aa409(0xb4),'description':'根据\x20ID\x20更新个人\x20BFF','risk':a46_0x2aa409(0xd7),'confirmationDescription':'更新个人\x20BFF\x20的脚本或元信息;之后的调用将使用新版本。','flags':[{...ID_FLAG,'description':a46_0x2aa409(0xaa)},{...FUNCTION_NAME_FLAG,'required':![]},FILE_FLAG,DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x4e009c){const _0x12ed4b=a46_0x2aa409,_0x317f8d=_0x4e009c[_0x12ed4b(0xc7)]('id'),_0x476b96=buildUpdateInput(_0x4e009c),_0x14d34d=await updatePersonalBff(_0x317f8d,_0x4e009c[_0x12ed4b(0xd5)],_0x476b96);return{'ok':!![],'data':detailBff(_0x14d34d),'message':_0x12ed4b(0xc6)+_0x14d34d['id']+(_0x14d34d[_0x12ed4b(0xb3)]?'\x20('+_0x14d34d[_0x12ed4b(0xb3)]+')':'')};},async 'dryRun'(_0x2c68d8){const _0x46284b=a46_0x2aa409,_0x290186=_0x2c68d8['num']('id'),_0x3ed224=buildUpdateInput(_0x2c68d8);return dryRun('POST',_0x46284b(0xae)+_0x290186+_0x46284b(0xcf))['body']({'appCode':_0x2c68d8[_0x46284b(0xd5)],..._0x3ed224})[_0x46284b(0xd8)]('Preview:\x20update\x20personal\x20BFF\x20'+_0x290186)[_0x46284b(0xb2)]();}},personalBffExec={'service':a46_0x2aa409(0xd3),'command':'exec','description':a46_0x2aa409(0xb9),'risk':a46_0x2aa409(0xd7),'confirmationDescription':a46_0x2aa409(0xd0),'flags':[{...ID_FLAG,'description':'Personal\x20BFF\x20script\x20ID'},{...PARAMS_FLAG,'description':'JSON\x20object\x20passed\x20to\x20the\x20personal\x20BFF\x20execution'}],async 'validate'(_0x2779a3){const _0x222706=a46_0x2aa409;parseExecParams(_0x2779a3[_0x222706(0xbb)](_0x222706(0xe2)));},async 'execute'(_0x22cf7f){const _0x12d738=a46_0x2aa409,_0x4ca1c1=_0x22cf7f[_0x12d738(0xc7)]('id'),_0x49eaf8=parseExecParams(_0x22cf7f[_0x12d738(0xbb)](_0x12d738(0xe2))),_0x5e6325=await executePersonalBff(_0x4ca1c1,_0x22cf7f[_0x12d738(0xd5)],_0x49eaf8);return{'ok':!![],'data':{'result':_0x5e6325},'message':_0x12d738(0xb1)+_0x4ca1c1};}};export const personalBffDefinitions=[personalBffList,personalBffDetail,personalBffCreate,personalBffUpdate,personalBffExec];
1
+ const a46_0x124b85=a46_0x480b;function a46_0x480b(_0x2dbd73,_0x4e524a){_0x2dbd73=_0x2dbd73-0x147;const _0x1a3e4b=a46_0x1a3e();let _0x480b05=_0x1a3e4b[_0x2dbd73];return _0x480b05;}(function(_0x1ab5cc,_0xad3c47){const _0x5e27c3=a46_0x480b,_0x32c5d7=_0x1ab5cc();while(!![]){try{const _0x5f03e8=-parseInt(_0x5e27c3(0x14e))/0x1+-parseInt(_0x5e27c3(0x173))/0x2+-parseInt(_0x5e27c3(0x157))/0x3+parseInt(_0x5e27c3(0x18a))/0x4*(parseInt(_0x5e27c3(0x18c))/0x5)+-parseInt(_0x5e27c3(0x17b))/0x6+-parseInt(_0x5e27c3(0x165))/0x7+parseInt(_0x5e27c3(0x167))/0x8;if(_0x5f03e8===_0xad3c47)break;else _0x32c5d7['push'](_0x32c5d7['shift']());}catch(_0x1d79bf){_0x32c5d7['push'](_0x32c5d7['shift']());}}}(a46_0x1a3e,0x53cb0));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_0x124b85(0x171),'type':a46_0x124b85(0x169),'description':a46_0x124b85(0x18b)},FUNCTION_NAME_FLAG={'name':'name','type':'string','required':!![],'description':a46_0x124b85(0x186)},DESCRIPTION_FLAG={'name':a46_0x124b85(0x14f),'type':a46_0x124b85(0x169),'description':a46_0x124b85(0x14a)},SOURCE_SESSION_FLAG={'name':a46_0x124b85(0x178),'type':a46_0x124b85(0x169),'description':a46_0x124b85(0x182)};function normalizeFunctionName(_0x36654d){const _0x43d3a5=a46_0x124b85,_0x1aaa55=String(_0x36654d||'')[_0x43d3a5(0x158)]();if(!_0x1aaa55||!FUNCTION_NAME_PATTERN[_0x43d3a5(0x151)](_0x1aaa55))throw CliErrors['validation'](_0x43d3a5(0x154));return _0x1aaa55;}function readScriptFile(_0x27b947){const _0x55c92b=a46_0x124b85;if(!_0x27b947)throw CliErrors[_0x55c92b(0x15f)](_0x55c92b(0x172));if(!existsSync(_0x27b947))throw CliErrors[_0x55c92b(0x15f)](_0x55c92b(0x16d)+_0x27b947);if(!statSync(_0x27b947)[_0x55c92b(0x17c)]())throw CliErrors[_0x55c92b(0x15f)](_0x55c92b(0x184)+_0x27b947);const _0x36c835=readFileSync(_0x27b947,'utf8');if(!_0x36c835[_0x55c92b(0x158)]())throw CliErrors[_0x55c92b(0x15f)](_0x55c92b(0x189));return _0x36c835;}function optionalTrimmed(_0x55113a){const _0x114453=String(_0x55113a||'')['trim']();return _0x114453||undefined;}function summarizeBff(_0x31d983){const _0x191051=a46_0x124b85;return{'id':_0x31d983['id'],'appCode':_0x31d983[_0x191051(0x176)],'functionName':_0x31d983[_0x191051(0x164)],'description':_0x31d983['description'],'scriptType':_0x31d983[_0x191051(0x163)],'version':_0x31d983['version'],'gmtModified':_0x31d983[_0x191051(0x183)],'updateTime':_0x31d983[_0x191051(0x14c)]};}function a46_0x1a3e(){const _0x3eaef8=['write','appCode','create','source-session-id','body','num','2298108TtxmZl','isFile','执行个人\x20BFF\x20脚本;脚本可能读取或修改业务数据,也可能调用外部服务。','list','把本地脚本保存为个人\x20BFF;之后可在当前应用中调用该脚本。','/client/runtime-bff/personal/','config','Optional\x20source\x20RuntimeAgent\x20session\x20id','gmtModified','File\x20is\x20not\x20a\x20regular\x20file:\x20','length','Personal\x20BFF\x20functionName,\x20for\x20example\x20loadOrders','更新个人\x20BFF\x20的脚本或元信息;之后的调用将使用新版本。','version','Personal\x20BFF\x20script\x20file\x20is\x20blank.','1096JmyJBj','Path\x20to\x20a\x20local\x20UTF-8\x20JavaScript\x20or\x20TypeScript\x20file','195UFNXSH','detail','params','build','Personal\x20BFF\x20description','Executed\x20personal\x20BFF\x20','updateTime','根据\x20ID\x20更新个人\x20BFF','232792uEbFeL','description','gmtCreate','test','personal-bff\x20update\x20requires\x20at\x20least\x20one\x20of\x20--name,\x20--description,\x20--file,\x20or\x20--source-session-id.','name','--name\x20must\x20be\x20a\x20valid\x20JavaScript\x20identifier,\x20for\x20example\x20loadOrders.','bool','根据本地脚本文件创建个人\x20BFF','979500TvzzDK','trim','createTime','Preview:\x20create\x20personal\x20BFF\x20','map','personal-bff','scriptContent','read','validation','createUserId','/client/runtime-bff/personal/create','Personal\x20BFF\x20script\x20ID','scriptType','functionName','3219664sHCkHE','POST','18597352OlhnNm','List\x20current\x20user\x27s\x20personal\x20BFF\x20scripts\x20for\x20the\x20current\x20app','string','str','flag','JSON\x20object\x20passed\x20to\x20the\x20personal\x20BFF\x20execution','File\x20not\x20found:\x20','sourceSessionId','Created\x20personal\x20BFF\x20','isArray','file','File\x20path\x20is\x20required.','1179754tuCqzc','--params\x20must\x20be\x20a\x20JSON\x20object.'];a46_0x1a3e=function(){return _0x3eaef8;};return a46_0x1a3e();}function detailBff(_0x8a622a){const _0x2f8204=a46_0x124b85;return{'id':_0x8a622a['id'],'appCode':_0x8a622a['appCode'],'functionName':_0x8a622a[_0x2f8204(0x164)],'description':_0x8a622a[_0x2f8204(0x14f)],'scriptType':_0x8a622a[_0x2f8204(0x163)],'scriptContent':_0x8a622a[_0x2f8204(0x15d)]??'','config':_0x8a622a[_0x2f8204(0x181)],'version':_0x8a622a[_0x2f8204(0x188)],'createUserId':_0x8a622a[_0x2f8204(0x160)],'gmtCreate':_0x8a622a[_0x2f8204(0x150)],'gmtModified':_0x8a622a[_0x2f8204(0x183)],'createTime':_0x8a622a[_0x2f8204(0x159)],'updateTime':_0x8a622a[_0x2f8204(0x14c)]};}function buildCreateInput(_0x579159){const _0x3a3c91=a46_0x124b85;return{'functionName':normalizeFunctionName(_0x579159[_0x3a3c91(0x16a)]('name')),...optionalTrimmed(_0x579159[_0x3a3c91(0x16a)](_0x3a3c91(0x14f)))?{'description':optionalTrimmed(_0x579159['str'](_0x3a3c91(0x14f)))}:{},'scriptContent':readScriptFile(_0x579159[_0x3a3c91(0x16a)](_0x3a3c91(0x171))),...optionalTrimmed(_0x579159[_0x3a3c91(0x16a)](_0x3a3c91(0x178)))?{'sourceSessionId':optionalTrimmed(_0x579159[_0x3a3c91(0x16a)](_0x3a3c91(0x178)))}:{}};}function buildUpdateInput(_0x5b5f9e){const _0x38999a=a46_0x124b85,_0x5f3977={};optionalTrimmed(_0x5b5f9e[_0x38999a(0x16a)](_0x38999a(0x153)))&&(_0x5f3977[_0x38999a(0x164)]=normalizeFunctionName(_0x5b5f9e[_0x38999a(0x16a)](_0x38999a(0x153))));_0x5b5f9e[_0x38999a(0x16b)]('description')!==undefined&&(_0x5f3977[_0x38999a(0x14f)]=_0x5b5f9e[_0x38999a(0x16a)](_0x38999a(0x14f)));optionalTrimmed(_0x5b5f9e[_0x38999a(0x16a)](_0x38999a(0x171)))&&(_0x5f3977[_0x38999a(0x15d)]=readScriptFile(_0x5b5f9e['str'](_0x38999a(0x171))));_0x5b5f9e[_0x38999a(0x16b)](_0x38999a(0x178))!==undefined&&(_0x5f3977[_0x38999a(0x16e)]=_0x5b5f9e[_0x38999a(0x16a)]('source-session-id'));if(Object['keys'](_0x5f3977)[_0x38999a(0x185)]===0x0)throw CliErrors[_0x38999a(0x15f)](_0x38999a(0x152));return _0x5f3977;}function parseExecParams(_0x210aaf){const _0x379980=a46_0x124b85,_0xedf6ee=parseJsonParams(_0x210aaf)??{};if(Array[_0x379980(0x170)](_0xedf6ee))throw CliErrors[_0x379980(0x15f)](_0x379980(0x174));return _0xedf6ee;}const personalBffList={'service':'personal-bff','command':a46_0x124b85(0x17e),'description':a46_0x124b85(0x168),'risk':a46_0x124b85(0x15e),'flags':[VERBOSE_FLAG],async 'execute'(_0x55cbdf){const _0x241707=a46_0x124b85,_0x12ab3c=await listPersonalBffs(_0x55cbdf[_0x241707(0x176)]);return{'ok':!![],'data':{'total':_0x12ab3c[_0x241707(0x185)],'items':_0x55cbdf[_0x241707(0x155)]('verbose')?_0x12ab3c:_0x12ab3c[_0x241707(0x15b)](summarizeBff)}};}},personalBffDetail={'service':'personal-bff','command':a46_0x124b85(0x147),'description':'Show\x20one\x20personal\x20BFF\x20by\x20id','risk':a46_0x124b85(0x15e),'flags':[{...ID_FLAG,'description':'Personal\x20BFF\x20script\x20ID'}],async 'execute'(_0x556a93){const _0x518dde=a46_0x124b85,_0x483d27=await getPersonalBff(_0x556a93[_0x518dde(0x17a)]('id'),_0x556a93[_0x518dde(0x176)]);return{'ok':!![],'data':detailBff(_0x483d27)};}},personalBffCreate={'service':'personal-bff','command':a46_0x124b85(0x177),'description':a46_0x124b85(0x156),'risk':a46_0x124b85(0x175),'confirmationDescription':a46_0x124b85(0x17f),'flags':[FUNCTION_NAME_FLAG,{...FILE_FLAG,'required':!![]},DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x165d61){const _0x56454e=a46_0x124b85,_0xadd4b4=buildCreateInput(_0x165d61),_0x4e93e3=await createPersonalBff(_0x165d61['appCode'],_0xadd4b4);return{'ok':!![],'data':detailBff(_0x4e93e3),'message':_0x56454e(0x16f)+_0x4e93e3['id']+(_0x4e93e3[_0x56454e(0x164)]?'\x20('+_0x4e93e3[_0x56454e(0x164)]+')':'')};},async 'dryRun'(_0x39121a){const _0x36e957=a46_0x124b85,_0x47f634=buildCreateInput(_0x39121a);return dryRun(_0x36e957(0x166),_0x36e957(0x161))[_0x36e957(0x179)]({'appCode':_0x39121a['appCode'],..._0x47f634})[_0x36e957(0x14f)](_0x36e957(0x15a)+_0x47f634[_0x36e957(0x164)])[_0x36e957(0x149)]();}},personalBffUpdate={'service':a46_0x124b85(0x15c),'command':'update','description':a46_0x124b85(0x14d),'risk':a46_0x124b85(0x175),'confirmationDescription':a46_0x124b85(0x187),'flags':[{...ID_FLAG,'description':a46_0x124b85(0x162)},{...FUNCTION_NAME_FLAG,'required':![]},FILE_FLAG,DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x6d3e6f){const _0x1400f4=a46_0x124b85,_0x3c10b1=_0x6d3e6f[_0x1400f4(0x17a)]('id'),_0x573be0=buildUpdateInput(_0x6d3e6f),_0x2628b9=await updatePersonalBff(_0x3c10b1,_0x6d3e6f[_0x1400f4(0x176)],_0x573be0);return{'ok':!![],'data':detailBff(_0x2628b9),'message':'Updated\x20personal\x20BFF\x20'+_0x2628b9['id']+(_0x2628b9[_0x1400f4(0x164)]?'\x20('+_0x2628b9[_0x1400f4(0x164)]+')':'')};},async 'dryRun'(_0x5d3e35){const _0x148489=a46_0x124b85,_0x881d2b=_0x5d3e35['num']('id'),_0x595d36=buildUpdateInput(_0x5d3e35);return dryRun(_0x148489(0x166),_0x148489(0x180)+_0x881d2b+'/update')[_0x148489(0x179)]({'appCode':_0x5d3e35[_0x148489(0x176)],..._0x595d36})[_0x148489(0x14f)]('Preview:\x20update\x20personal\x20BFF\x20'+_0x881d2b)[_0x148489(0x149)]();}},personalBffExec={'service':a46_0x124b85(0x15c),'command':'exec','description':'根据\x20ID\x20执行个人\x20BFF,并可传入\x20JSON\x20参数','risk':a46_0x124b85(0x175),'confirmationDescription':a46_0x124b85(0x17d),'flags':[{...ID_FLAG,'description':'Personal\x20BFF\x20script\x20ID'},{...PARAMS_FLAG,'description':a46_0x124b85(0x16c)}],async 'validate'(_0x459ec2){const _0x305ce3=a46_0x124b85;parseExecParams(_0x459ec2[_0x305ce3(0x16a)](_0x305ce3(0x148)));},async 'execute'(_0x4fba94){const _0x1f521f=a46_0x124b85,_0x1c8c55=_0x4fba94[_0x1f521f(0x17a)]('id'),_0x120f91=parseExecParams(_0x4fba94[_0x1f521f(0x16a)](_0x1f521f(0x148))),_0x312991=await executePersonalBff(_0x1c8c55,_0x4fba94['appCode'],_0x120f91);return{'ok':!![],'data':{'result':_0x312991},'message':_0x1f521f(0x14b)+_0x1c8c55};}};export const personalBffDefinitions=[personalBffList,personalBffDetail,personalBffCreate,personalBffUpdate,personalBffExec];
@@ -1 +1 @@
1
- const a47_0x4462af=a47_0x40bd;(function(_0x1afba7,_0x3bd988){const _0x5b4ac1=a47_0x40bd,_0x557c07=_0x1afba7();while(!![]){try{const _0x5ec7c6=parseInt(_0x5b4ac1(0x206))/0x1+parseInt(_0x5b4ac1(0x1e4))/0x2+parseInt(_0x5b4ac1(0x21e))/0x3+-parseInt(_0x5b4ac1(0x1fa))/0x4*(-parseInt(_0x5b4ac1(0x214))/0x5)+parseInt(_0x5b4ac1(0x1e2))/0x6*(parseInt(_0x5b4ac1(0x21f))/0x7)+-parseInt(_0x5b4ac1(0x1ec))/0x8+-parseInt(_0x5b4ac1(0x1e8))/0x9;if(_0x5ec7c6===_0x3bd988)break;else _0x557c07['push'](_0x557c07['shift']());}catch(_0x49e965){_0x557c07['push'](_0x557c07['shift']());}}}(a47_0x41df,0xa383c));import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';function a47_0x40bd(_0x548bc2,_0x37ce25){_0x548bc2=_0x548bc2-0x1e2;const _0x41df4c=a47_0x41df();let _0x40bdec=_0x41df4c[_0x548bc2];return _0x40bdec;}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';function a47_0x41df(){const _0x33a7b8=['40516XEBILF','1326iLyZpi','Knowledge\x20Base','2478298QrxGqw','set','BFF\x20Scripts','Workspace','34575732VsFRYG','SQL\x20Queries','OCR','read','988032UIIusn','login','File','Service\x20Tree','Skills','app','map','use','Runtime\x20App\x20Config','Artifacts','service','from','Use\x20`lovrabet\x20logs\x20show`\x20to\x20view\x20command\x20history.','list','3919388wSjmfF','install','show','logs','Schema','risk','Logs','logs\x20clear','Personal\x20BFF','Configuration','Diagnostics','isSingleCommand','810632oCnxwF','User\x20Accounts','description','`lovrabet\x20app\x20use`\x20has\x20been\x20removed.','Use\x20`lovrabet\x20workspace\x20init\x20--appcode\x20<code>`\x20instead.','config-list','has','push','write','CLI\x20Built-in\x20Skill','Authentication','run','Runtime\x20Roles','command','5NPkfJE','values','`lovrabet\x20logs\x20clear`\x20has\x20been\x20removed.','init','app\x20use','App\x20Management','Runtime\x20Permissions','get','Notification\x20Configs','\x20\x20[high-risk-write]','978696UPJrtO'];a47_0x41df=function(){return _0x33a7b8;};return a47_0x41df();}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(_0x206683){const _0x5aeee6=a47_0x40bd;for(const _0x174480 of _0x206683){definitions['set'](_0x174480[_0x5aeee6(0x1f6)]+':'+_0x174480[_0x5aeee6(0x213)],_0x174480);let _0x350741=serviceGroups[_0x5aeee6(0x21b)](_0x174480[_0x5aeee6(0x1f6)]);!_0x350741&&(_0x350741=[],serviceGroups[_0x5aeee6(0x1e5)](_0x174480[_0x5aeee6(0x1f6)],_0x350741)),_0x350741[_0x5aeee6(0x20d)](_0x174480);}}function registerService(_0x330109,_0x4fcc52,_0x433227){const _0x1ca5e2=a47_0x40bd;registerDefinitions(_0x4fcc52);const _0x40397d=_0x2c0a18=>_0x2c0a18===_0x1ca5e2(0x1eb)?'':_0x2c0a18===_0x1ca5e2(0x20e)?'\x20\x20[write]':_0x1ca5e2(0x21d),_0x5f5bd3={'service':_0x4fcc52[0x0][_0x1ca5e2(0x1f6)],'label':_0x330109,'commands':_0x4fcc52[_0x1ca5e2(0x1f2)](_0x2efb14=>({'command':_0x2efb14[_0x1ca5e2(0x213)],'description':_0x2efb14[_0x1ca5e2(0x208)],'tag':_0x40397d(_0x2efb14[_0x1ca5e2(0x1ff)])})),'defaultCommand':_0x433227?.['defaultCommand']??(_0x433227?.[_0x1ca5e2(0x205)]?_0x4fcc52[0x0]['command']:undefined),'isSingleCommand':_0x433227?.[_0x1ca5e2(0x205)]};serviceRegistry[_0x1ca5e2(0x20d)](_0x5f5bd3),serviceByName[_0x1ca5e2(0x1e5)](_0x5f5bd3[_0x1ca5e2(0x1f6)],_0x5f5bd3);}registerService(a47_0x4462af(0x210),authDefinitions,{'defaultCommand':a47_0x4462af(0x1ed)}),registerService(a47_0x4462af(0x207),userAccountDefinitions),registerService(a47_0x4462af(0x219),appDefinitions,{'defaultCommand':'list'}),registerService(a47_0x4462af(0x1e7),workspaceDefinitions),registerService(a47_0x4462af(0x1f4),appConfigDefinitions),registerService(a47_0x4462af(0x203),configDefinitions,{'defaultCommand':a47_0x4462af(0x1f9)}),registerService(a47_0x4462af(0x212),roleDefinitions,{'defaultCommand':a47_0x4462af(0x1f9)}),registerService(a47_0x4462af(0x21a),permitDefinitions),registerService('API\x20Documentation',apiDocDefinitions),registerService('Datasets',datasetDefinitions),registerService('Instant\x20API',dataDefinitions),registerService(a47_0x4462af(0x1e9),sqlDefinitions),registerService(a47_0x4462af(0x1e6),bffDefinitions),registerService(a47_0x4462af(0x202),personalBffDefinitions),registerService(a47_0x4462af(0x1f5),artifactDefinitions),registerService(a47_0x4462af(0x1ee),fileDefinitions),registerService(a47_0x4462af(0x1ea),ocrDefinitions),registerService(a47_0x4462af(0x1e3),kbDefinitions),registerService(a47_0x4462af(0x21c),notificationDefinitions,{'defaultCommand':a47_0x4462af(0x20b)}),registerService('Agent\x20Schedules',scheduleDefinitions,{'defaultCommand':'list'}),registerService(a47_0x4462af(0x1ef),serviceDefinitions,{'defaultCommand':'list'}),registerService(a47_0x4462af(0x1f0),skillDefinitions,{'defaultCommand':'install'}),registerService(a47_0x4462af(0x20f),cliSkillDefinitions,{'defaultCommand':a47_0x4462af(0x1fb)}),registerService('Self\x20Update',[updateDefinition],{'defaultCommand':a47_0x4462af(0x211),'isSingleCommand':!![]}),registerService(a47_0x4462af(0x204),[doctorDefinition],{'isSingleCommand':!![]}),registerService(a47_0x4462af(0x1fe),[schemaDefinition],{'isSingleCommand':!![]}),registerService(a47_0x4462af(0x200),logsDefinitions,{'defaultCommand':a47_0x4462af(0x1fc)});export function findDefinition(_0x5658df,_0x2b1494){const _0x5df769=a47_0x4462af;return definitions[_0x5df769(0x21b)](_0x5658df+':'+_0x2b1494);}export function resolveRemovedCommand(_0x184a3c,_0x62d96f){const _0x4ed515=a47_0x4462af;if(_0x184a3c===_0x4ed515(0x1f1)&&_0x62d96f===_0x4ed515(0x217))return{'command':'app\x20init','message':'`lovrabet\x20app\x20init`\x20has\x20been\x20removed.','hint':_0x4ed515(0x20a)};if(_0x184a3c==='app'&&_0x62d96f===_0x4ed515(0x1f3))return{'command':_0x4ed515(0x218),'message':_0x4ed515(0x209),'hint':'Use\x20`lovrabet\x20workspace\x20use\x20--app\x20<name>`\x20instead.'};if(_0x184a3c===_0x4ed515(0x1fd)&&_0x62d96f==='clear')return{'command':_0x4ed515(0x201),'message':_0x4ed515(0x216),'hint':_0x4ed515(0x1f8)};return undefined;}export function isKnownService(_0x5dcf51){const _0x4d9e63=a47_0x4462af;return serviceByName[_0x4d9e63(0x20c)](_0x5dcf51);}export function getServiceEntry(_0x3278e1){return serviceByName['get'](_0x3278e1);}export function getAllDefinitions(){const _0x5eb26c=a47_0x4462af;return Array[_0x5eb26c(0x1f7)](definitions[_0x5eb26c(0x215)]());}
1
+ const a47_0x31d57a=a47_0x354d;(function(_0x2a0f01,_0x2945a2){const _0x356de2=a47_0x354d,_0x361f0a=_0x2a0f01();while(!![]){try{const _0x5ca8ea=-parseInt(_0x356de2(0x102))/0x1*(parseInt(_0x356de2(0x122))/0x2)+-parseInt(_0x356de2(0x104))/0x3*(parseInt(_0x356de2(0x134))/0x4)+-parseInt(_0x356de2(0x103))/0x5*(-parseInt(_0x356de2(0x109))/0x6)+parseInt(_0x356de2(0x127))/0x7*(-parseInt(_0x356de2(0x105))/0x8)+-parseInt(_0x356de2(0x12e))/0x9+parseInt(_0x356de2(0x115))/0xa+parseInt(_0x356de2(0x128))/0xb*(parseInt(_0x356de2(0x10d))/0xc);if(_0x5ca8ea===_0x2945a2)break;else _0x361f0a['push'](_0x361f0a['shift']());}catch(_0x90940b){_0x361f0a['push'](_0x361f0a['shift']());}}}(a47_0x2e01,0x8f434));function a47_0x354d(_0x1ff634,_0x2731af){_0x1ff634=_0x1ff634-0xfd;const _0x2e0104=a47_0x2e01();let _0x354de2=_0x2e0104[_0x1ff634];return _0x354de2;}import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{skillDefinitions}from'../commands/skill/index.js';import{cliSkillDefinitions}from'../commands/cli-skill/index.js';import{serviceDefinitions}from'../commands/service/index.js';import{updateDefinition}from'../commands/update.js';import{doctorDefinition}from'../commands/doctor.js';import{schemaDefinition}from'../commands/schema.js';import{appDefinitions}from'../commands/app/definitions.js';import{workspaceDefinitions}from'../commands/workspace/index.js';import{configDefinitions}from'../commands/config/definitions.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{dataDefinitions}from'../commands/data/index.js';import{kbDefinitions}from'../commands/kb/index.js';import{artifactDefinitions}from'../commands/artifact/index.js';import{personalBffDefinitions}from'../commands/personal-bff/index.js';import{apiDocDefinitions}from'../commands/api-doc/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';import{fileDefinitions}from'../commands/file/index.js';import{ocrDefinitions}from'../commands/ocr/index.js';import{scheduleDefinitions}from'../commands/schedule/index.js';import{userAccountDefinitions}from'../commands/user-account/index.js';function a47_0x2e01(){const _0x500b02=['File','2666436CwPRuJ','command','OCR','Workspace','Use\x20`lovrabet\x20workspace\x20init\x20--appcode\x20<code>`\x20instead.','app\x20use','init','map','10387180RdGHqM','set','defaultCommand','Service\x20Tree','logs','`lovrabet\x20app\x20init`\x20has\x20been\x20removed.','login','service','Logs','SQL\x20Queries','Instant\x20API','Runtime\x20Roles','isSingleCommand','22SXIPgZ','logs\x20clear','Skills','BFF\x20Scripts','list','7uUdZhr','66egKHcs','config-list','risk','Knowledge\x20Base','\x20\x20[high-risk-write]','Authentication','1844046RpEiHU','Use\x20`lovrabet\x20workspace\x20use\x20--app\x20<name>`\x20instead.','get','Use\x20`lovrabet\x20logs\x20show`\x20to\x20view\x20command\x20history.','Artifacts','install','1648876vMSnpc','app','App\x20Management','description','`lovrabet\x20app\x20use`\x20has\x20been\x20removed.','User\x20Accounts','run','\x20\x20[write]','Diagnostics','4799ePsnUl','5JChnnm','6YwOdNF','6972296agBsoB','Runtime\x20Permissions','Schema','Self\x20Update','1011156dnUXpv','`lovrabet\x20logs\x20clear`\x20has\x20been\x20removed.','Datasets'];a47_0x2e01=function(){return _0x500b02;};return a47_0x2e01();}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(_0x40ae09){const _0x5b6bc6=a47_0x354d;for(const _0x183b69 of _0x40ae09){definitions[_0x5b6bc6(0x116)](_0x183b69[_0x5b6bc6(0x11c)]+':'+_0x183b69['command'],_0x183b69);let _0x429c7a=serviceGroups[_0x5b6bc6(0x130)](_0x183b69['service']);!_0x429c7a&&(_0x429c7a=[],serviceGroups[_0x5b6bc6(0x116)](_0x183b69[_0x5b6bc6(0x11c)],_0x429c7a)),_0x429c7a['push'](_0x183b69);}}function registerService(_0x5d0e0c,_0x4f9133,_0x14969f){const _0x26248f=a47_0x354d;registerDefinitions(_0x4f9133);const _0x369258=_0x304813=>_0x304813==='read'?'':_0x304813==='write'?_0x26248f(0x100):_0x26248f(0x12c),_0x51e411={'service':_0x4f9133[0x0][_0x26248f(0x11c)],'label':_0x5d0e0c,'commands':_0x4f9133[_0x26248f(0x114)](_0x2930f6=>({'command':_0x2930f6[_0x26248f(0x10e)],'description':_0x2930f6[_0x26248f(0x137)],'tag':_0x369258(_0x2930f6[_0x26248f(0x12a)])})),'defaultCommand':_0x14969f?.[_0x26248f(0x117)]??(_0x14969f?.[_0x26248f(0x121)]?_0x4f9133[0x0][_0x26248f(0x10e)]:undefined),'isSingleCommand':_0x14969f?.[_0x26248f(0x121)]};serviceRegistry['push'](_0x51e411),serviceByName[_0x26248f(0x116)](_0x51e411[_0x26248f(0x11c)],_0x51e411);}registerService(a47_0x31d57a(0x12d),authDefinitions,{'defaultCommand':a47_0x31d57a(0x11b)}),registerService(a47_0x31d57a(0xfe),userAccountDefinitions),registerService(a47_0x31d57a(0x136),appDefinitions,{'defaultCommand':'list'}),registerService(a47_0x31d57a(0x110),workspaceDefinitions),registerService('Runtime\x20App\x20Config',appConfigDefinitions),registerService('Configuration',configDefinitions,{'defaultCommand':'list'}),registerService(a47_0x31d57a(0x120),roleDefinitions,{'defaultCommand':a47_0x31d57a(0x126)}),registerService(a47_0x31d57a(0x106),permitDefinitions),registerService('API\x20Documentation',apiDocDefinitions),registerService(a47_0x31d57a(0x10b),datasetDefinitions),registerService(a47_0x31d57a(0x11f),dataDefinitions),registerService(a47_0x31d57a(0x11e),sqlDefinitions),registerService(a47_0x31d57a(0x125),bffDefinitions),registerService('Personal\x20BFF',personalBffDefinitions),registerService(a47_0x31d57a(0x132),artifactDefinitions),registerService(a47_0x31d57a(0x10c),fileDefinitions),registerService(a47_0x31d57a(0x10f),ocrDefinitions),registerService(a47_0x31d57a(0x12b),kbDefinitions),registerService('Notification\x20Configs',notificationDefinitions,{'defaultCommand':a47_0x31d57a(0x129)}),registerService('Agent\x20Schedules',scheduleDefinitions,{'defaultCommand':'list'}),registerService(a47_0x31d57a(0x118),serviceDefinitions,{'defaultCommand':a47_0x31d57a(0x126)}),registerService(a47_0x31d57a(0x124),skillDefinitions,{'defaultCommand':'install'}),registerService('CLI\x20Built-in\x20Skill',cliSkillDefinitions,{'defaultCommand':a47_0x31d57a(0x133)}),registerService(a47_0x31d57a(0x108),[updateDefinition],{'defaultCommand':a47_0x31d57a(0xff),'isSingleCommand':!![]}),registerService(a47_0x31d57a(0x101),[doctorDefinition],{'isSingleCommand':!![]}),registerService(a47_0x31d57a(0x107),[schemaDefinition],{'isSingleCommand':!![]}),registerService(a47_0x31d57a(0x11d),logsDefinitions,{'defaultCommand':'show'});export function findDefinition(_0x45926c,_0x1008d4){const _0x1f74ee=a47_0x31d57a;return definitions[_0x1f74ee(0x130)](_0x45926c+':'+_0x1008d4);}export function resolveRemovedCommand(_0x59bda6,_0x1ac8ff){const _0x11844e=a47_0x31d57a;if(_0x59bda6===_0x11844e(0x135)&&_0x1ac8ff===_0x11844e(0x113))return{'command':'app\x20init','message':_0x11844e(0x11a),'hint':_0x11844e(0x111)};if(_0x59bda6==='app'&&_0x1ac8ff==='use')return{'command':_0x11844e(0x112),'message':_0x11844e(0xfd),'hint':_0x11844e(0x12f)};if(_0x59bda6===_0x11844e(0x119)&&_0x1ac8ff==='clear')return{'command':_0x11844e(0x123),'message':_0x11844e(0x10a),'hint':_0x11844e(0x131)};return undefined;}export function isKnownService(_0x5935a8){return serviceByName['has'](_0x5935a8);}export function getServiceEntry(_0x4a03c3){return serviceByName['get'](_0x4a03c3);}export function getAllDefinitions(){return Array['from'](definitions['values']());}
@@ -1 +1 @@
1
- const a48_0x11a3da=a48_0x4db7;function a48_0x1e44(){const _0x4c8336=['4268Zsvdrt','38583564fqiFXO','name','2362AoXoDl','797844TmCBqv','CUSTOM','description','832UDjleS','206338uYQFia','validation','15zUqEPr','/client/permit/role/create','13NnKsWM','body','4551LnVCTB','12495825CvYmwv','string','141491CKVioG','Create\x20a\x20runtime\x20CUSTOM\x20role','role','create','Optional\x20role\x20remark','POST','remark','670ZNAQFs','str','8uNqhZI','trim','--name\x20must\x20not\x20be\x20blank.'];a48_0x1e44=function(){return _0x4c8336;};return a48_0x1e44();}(function(_0x4e4341,_0x4451d6){const _0x3db76b=a48_0x4db7,_0x3b895b=_0x4e4341();while(!![]){try{const _0x4fcdb7=parseInt(_0x3db76b(0x180))/0x1*(-parseInt(_0x3db76b(0x17c))/0x2)+parseInt(_0x3db76b(0x187))/0x3*(-parseInt(_0x3db76b(0x179))/0x4)+-parseInt(_0x3db76b(0x183))/0x5*(-parseInt(_0x3db76b(0x17d))/0x6)+-parseInt(_0x3db76b(0x18a))/0x7*(parseInt(_0x3db76b(0x193))/0x8)+-parseInt(_0x3db76b(0x188))/0x9+parseInt(_0x3db76b(0x191))/0xa*(parseInt(_0x3db76b(0x181))/0xb)+-parseInt(_0x3db76b(0x17a))/0xc*(-parseInt(_0x3db76b(0x185))/0xd);if(_0x4fcdb7===_0x4451d6)break;else _0x3b895b['push'](_0x3b895b['shift']());}catch(_0x3289a1){_0x3b895b['push'](_0x3b895b['shift']());}}}(a48_0x1e44,0xd23d0));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(_0x1125da){const _0x11de1c=a48_0x4db7,_0x316c61=_0x1125da[_0x11de1c(0x192)](_0x11de1c(0x17b))[_0x11de1c(0x194)]();if(!_0x316c61)throw CliErrors[_0x11de1c(0x182)](_0x11de1c(0x195));const _0x209ef5=_0x1125da[_0x11de1c(0x192)](_0x11de1c(0x190))[_0x11de1c(0x194)]();return{'appCode':_0x1125da['appCode'],'roleName':_0x316c61,..._0x209ef5?{'remark':_0x209ef5}:{}};}function a48_0x4db7(_0x4e0d16,_0x3a5389){_0x4e0d16=_0x4e0d16-0x179;const _0x1e4440=a48_0x1e44();let _0x4db774=_0x1e4440[_0x4e0d16];return _0x4db774;}export const roleCreate={'service':a48_0x11a3da(0x18c),'command':'create','description':a48_0x11a3da(0x18b),'risk':'high-risk-write','confirmationDescription':'在当前运行应用中创建一个自定义角色;创建后可用于成员与资源权限配置。','flags':[{'name':a48_0x11a3da(0x17b),'type':a48_0x11a3da(0x189),'required':!![],'description':'Role\x20name'},{'name':a48_0x11a3da(0x190),'type':a48_0x11a3da(0x189),'description':a48_0x11a3da(0x18e)}],async 'validate'(_0x214f95){input(_0x214f95);},async 'dryRun'(_0x1ac17f){const _0x2e6668=a48_0x11a3da;return dryRun(_0x2e6668(0x18f),'/client/permit/role/create')[_0x2e6668(0x186)]({'roleType':_0x2e6668(0x17e),...input(_0x1ac17f)})[_0x2e6668(0x17f)]('Preview:\x20create\x20a\x20runtime\x20CUSTOM\x20role')['build']();},async 'execute'(_0x2c5e05){const _0x30bf5a=a48_0x11a3da,_0x33f507=await createRuntimeAppRole(input(_0x2c5e05));return{'ok':!![],'data':runtimeRoleWriteResult(_0x30bf5a(0x18d),{'roleId':_0x33f507['id']},null,projectRuntimeRole(_0x33f507),{'method':'POST','path':_0x30bf5a(0x184)})};}};
1
+ const a48_0x27159c=a48_0x2bac;(function(_0x9b10da,_0x10fd82){const _0x3bcd30=a48_0x2bac,_0x2961e3=_0x9b10da();while(!![]){try{const _0x562c47=-parseInt(_0x3bcd30(0x80))/0x1*(-parseInt(_0x3bcd30(0x8c))/0x2)+-parseInt(_0x3bcd30(0x78))/0x3+parseInt(_0x3bcd30(0x7d))/0x4*(parseInt(_0x3bcd30(0x83))/0x5)+parseInt(_0x3bcd30(0x88))/0x6+parseInt(_0x3bcd30(0x77))/0x7*(parseInt(_0x3bcd30(0x85))/0x8)+parseInt(_0x3bcd30(0x8b))/0x9+-parseInt(_0x3bcd30(0x8a))/0xa;if(_0x562c47===_0x10fd82)break;else _0x2961e3['push'](_0x2961e3['shift']());}catch(_0x5f5a43){_0x2961e3['push'](_0x2961e3['shift']());}}}(a48_0x39b9,0x55930));import{createRuntimeAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a48_0x2bac(_0x1c9393,_0x1e63ec){_0x1c9393=_0x1c9393-0x74;const _0x39b97e=a48_0x39b9();let _0x2bacfb=_0x39b97e[_0x1c9393];return _0x2bacfb;}import{dryRun}from'../../framework/dryrun.js';import{projectRuntimeRole,runtimeRoleWriteResult}from'../../commands/role/shared.js';function input(_0x4a4936){const _0x3d06ef=a48_0x2bac,_0x179f57=_0x4a4936[_0x3d06ef(0x7a)]('name')[_0x3d06ef(0x79)]();if(!_0x179f57)throw CliErrors['validation'](_0x3d06ef(0x74));const _0x366613=_0x4a4936[_0x3d06ef(0x7a)](_0x3d06ef(0x7f))['trim']();return{'appCode':_0x4a4936[_0x3d06ef(0x76)],'roleName':_0x179f57,..._0x366613?{'remark':_0x366613}:{}};}function a48_0x39b9(){const _0x2caf5d=['description','remark','4277GTaZhA','在当前运行应用中创建一个自定义角色;创建后可用于成员与资源权限配置。','/client/permit/role/create','8200PrUawo','body','2795224ujeMcs','Create\x20a\x20runtime\x20CUSTOM\x20role','POST','3643506fkLebw','Role\x20name','12607680QOnrKL','3890970iFksij','122tKmxoe','string','--name\x20must\x20not\x20be\x20blank.','build','appCode','7QezGkn','1404843bIfJSF','trim','str','high-risk-write','create','1048XkCrNr'];a48_0x39b9=function(){return _0x2caf5d;};return a48_0x39b9();}export const roleCreate={'service':'role','command':a48_0x27159c(0x7c),'description':a48_0x27159c(0x86),'risk':a48_0x27159c(0x7b),'confirmationDescription':a48_0x27159c(0x81),'flags':[{'name':'name','type':a48_0x27159c(0x8d),'required':!![],'description':a48_0x27159c(0x89)},{'name':'remark','type':a48_0x27159c(0x8d),'description':'Optional\x20role\x20remark'}],async 'validate'(_0x2d9cdb){input(_0x2d9cdb);},async 'dryRun'(_0x9aec68){const _0x15198c=a48_0x27159c;return dryRun(_0x15198c(0x87),'/client/permit/role/create')[_0x15198c(0x84)]({'roleType':'CUSTOM',...input(_0x9aec68)})[_0x15198c(0x7e)]('Preview:\x20create\x20a\x20runtime\x20CUSTOM\x20role')[_0x15198c(0x75)]();},async 'execute'(_0x3f893d){const _0x164975=a48_0x27159c,_0x4a6bda=await createRuntimeAppRole(input(_0x3f893d));return{'ok':!![],'data':runtimeRoleWriteResult(_0x164975(0x7c),{'roleId':_0x4a6bda['id']},null,projectRuntimeRole(_0x4a6bda),{'method':_0x164975(0x87),'path':_0x164975(0x82)})};}};
@@ -1 +1 @@
1
- const a49_0x3086ee=a49_0x1803;(function(_0x374ba5,_0x3bebc8){const _0x3ce3aa=a49_0x1803,_0x2e4462=_0x374ba5();while(!![]){try{const _0x987b3=parseInt(_0x3ce3aa(0xb4))/0x1*(parseInt(_0x3ce3aa(0xc0))/0x2)+-parseInt(_0x3ce3aa(0xc5))/0x3+-parseInt(_0x3ce3aa(0xbb))/0x4+parseInt(_0x3ce3aa(0xbd))/0x5*(-parseInt(_0x3ce3aa(0xc2))/0x6)+parseInt(_0x3ce3aa(0xc6))/0x7+-parseInt(_0x3ce3aa(0xc4))/0x8+-parseInt(_0x3ce3aa(0xb9))/0x9*(-parseInt(_0x3ce3aa(0xb5))/0xa);if(_0x987b3===_0x3bebc8)break;else _0x2e4462['push'](_0x2e4462['shift']());}catch(_0x55b14c){_0x2e4462['push'](_0x2e4462['shift']());}}}(a49_0x3b4a,0x5d3c9));import{deleteRuntimeAppRole}from'../../core/api-client.js';function a49_0x1803(_0x3b3623,_0x25d848){_0x3b3623=_0x3b3623-0xb4;const _0x3b4ad4=a49_0x3b4a();let _0x180358=_0x3b4ad4[_0x3b3623];return _0x180358;}import{dryRun}from'../../framework/dryrun.js';function a49_0x3b4a(){const _0x4394e4=['2175753xypZdk','677950lxSMPd','删除当前运行应用中的自定义角色;该角色的成员关系和权限配置可能随之失效。','build','43LEcONZ','1270yAIQwb','body','delete','POST','110781TDskml','Delete\x20a\x20runtime\x20CUSTOM\x20role','1210328MyhOVH','description','48210byRGdk','role','appCode','18174Agaewd','Preview:\x20delete\x20a\x20runtime\x20CUSTOM\x20role','270YOMLlt','/client/permit/role/delete','1657712IKcHBV'];a49_0x3b4a=function(){return _0x4394e4;};return a49_0x3b4a();}import{assertCustomRuntimeRole,getRuntimeRoleById,projectRuntimeRole,ROLE_ID_FLAG,runtimeRoleWriteResult}from'../../commands/role/shared.js';async function prepare(_0xb08e85){const _0x5aca6d=a49_0x1803,_0x5a5cbc=await getRuntimeRoleById(_0xb08e85[_0x5aca6d(0xbf)],_0xb08e85['num']('id'));return assertCustomRuntimeRole(_0x5a5cbc,_0x5aca6d(0xb7)),_0x5a5cbc;}export const roleDelete={'service':a49_0x3086ee(0xbe),'command':a49_0x3086ee(0xb7),'description':a49_0x3086ee(0xba),'risk':'high-risk-write','confirmationDescription':a49_0x3086ee(0xc7),'flags':[ROLE_ID_FLAG],async 'dryRun'(_0x482ed8){const _0x423814=a49_0x3086ee,_0x2b1e6d=await prepare(_0x482ed8);return dryRun(_0x423814(0xb8),_0x423814(0xc3))[_0x423814(0xb6)]({'id':_0x2b1e6d['id']})[_0x423814(0xbc)](_0x423814(0xc1))[_0x423814(0xc8)]();},async 'execute'(_0x4da772){const _0x3fea7b=a49_0x3086ee,_0x3999ae=await prepare(_0x4da772);return await deleteRuntimeAppRole(_0x3999ae['id']),{'ok':!![],'data':runtimeRoleWriteResult(_0x3fea7b(0xb7),{'roleId':_0x3999ae['id']},projectRuntimeRole(_0x3999ae),null,{'method':'POST','path':_0x3fea7b(0xc3)})};}};
1
+ const a49_0x29953b=a49_0x23e0;(function(_0x378fef,_0x41bb80){const _0x4d7949=a49_0x23e0,_0x4635b4=_0x378fef();while(!![]){try{const _0xd4a75=parseInt(_0x4d7949(0x17c))/0x1+parseInt(_0x4d7949(0x181))/0x2*(-parseInt(_0x4d7949(0x17a))/0x3)+parseInt(_0x4d7949(0x18c))/0x4*(parseInt(_0x4d7949(0x187))/0x5)+-parseInt(_0x4d7949(0x18b))/0x6+parseInt(_0x4d7949(0x180))/0x7*(parseInt(_0x4d7949(0x186))/0x8)+-parseInt(_0x4d7949(0x189))/0x9+-parseInt(_0x4d7949(0x17e))/0xa;if(_0xd4a75===_0x41bb80)break;else _0x4635b4['push'](_0x4635b4['shift']());}catch(_0x1dad98){_0x4635b4['push'](_0x4635b4['shift']());}}}(a49_0x285c,0x465a7));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(_0x25d4d0){const _0x4df5f1=a49_0x23e0,_0x315853=await getRuntimeRoleById(_0x25d4d0[_0x4df5f1(0x18a)],_0x25d4d0[_0x4df5f1(0x17d)]('id'));return assertCustomRuntimeRole(_0x315853,_0x4df5f1(0x183)),_0x315853;}export const roleDelete={'service':'role','command':'delete','description':a49_0x29953b(0x179),'risk':'high-risk-write','confirmationDescription':a49_0x29953b(0x17b),'flags':[ROLE_ID_FLAG],async 'dryRun'(_0x17150d){const _0x3d7e33=a49_0x29953b,_0x1dc1a9=await prepare(_0x17150d);return dryRun(_0x3d7e33(0x188),_0x3d7e33(0x182))['body']({'id':_0x1dc1a9['id']})[_0x3d7e33(0x17f)](_0x3d7e33(0x184))[_0x3d7e33(0x185)]();},async 'execute'(_0x6da37a){const _0x45b7a9=a49_0x29953b,_0x57b578=await prepare(_0x6da37a);return await deleteRuntimeAppRole(_0x57b578['id']),{'ok':!![],'data':runtimeRoleWriteResult('delete',{'roleId':_0x57b578['id']},projectRuntimeRole(_0x57b578),null,{'method':'POST','path':_0x45b7a9(0x182)})};}};function a49_0x23e0(_0x234ef3,_0x4d2ce9){_0x234ef3=_0x234ef3-0x179;const _0x285cd7=a49_0x285c();let _0x23e02b=_0x285cd7[_0x234ef3];return _0x23e02b;}function a49_0x285c(){const _0x4cb7c4=['description','21ttpJAp','35206kooLdV','/client/permit/role/delete','delete','Preview:\x20delete\x20a\x20runtime\x20CUSTOM\x20role','build','1274856EeiJQD','1157230PqgBDh','POST','3010077mvAnxe','appCode','1628844VARQFn','4ivnCWs','Delete\x20a\x20runtime\x20CUSTOM\x20role','30FfiBXn','删除当前运行应用中的自定义角色;该角色的成员关系和权限配置可能随之失效。','492484LEOLwz','num','1318770OznYUL'];a49_0x285c=function(){return _0x4cb7c4;};return a49_0x285c();}
@@ -1 +1 @@
1
- const a50_0x311c0b=a50_0x4ab9;(function(_0x53e830,_0x5a62d7){const _0x3545ff=a50_0x4ab9,_0x1b84d8=_0x53e830();while(!![]){try{const _0xec1b5b=-parseInt(_0x3545ff(0x6f))/0x1*(-parseInt(_0x3545ff(0x6e))/0x2)+-parseInt(_0x3545ff(0x76))/0x3*(-parseInt(_0x3545ff(0x79))/0x4)+parseInt(_0x3545ff(0x77))/0x5*(-parseInt(_0x3545ff(0x6d))/0x6)+-parseInt(_0x3545ff(0x7a))/0x7*(parseInt(_0x3545ff(0x73))/0x8)+parseInt(_0x3545ff(0x7c))/0x9*(-parseInt(_0x3545ff(0x7d))/0xa)+-parseInt(_0x3545ff(0x74))/0xb+-parseInt(_0x3545ff(0x75))/0xc*(-parseInt(_0x3545ff(0x70))/0xd);if(_0xec1b5b===_0x5a62d7)break;else _0x1b84d8['push'](_0x1b84d8['shift']());}catch(_0x4906c3){_0x1b84d8['push'](_0x1b84d8['shift']());}}}(a50_0x4967,0x2247a));function a50_0x4ab9(_0x42d2e4,_0x5ba418){_0x42d2e4=_0x42d2e4-0x6d;const _0x4967f6=a50_0x4967();let _0x4ab97b=_0x4967f6[_0x42d2e4];return _0x4ab97b;}import{getRuntimeRoleById,projectRuntimeRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';function a50_0x4967(){const _0x1046ee=['8IVMsuI','1461570qjghyu','12LSWBGc','4794qqVcis','4025bronzt','runtime','12fIasbb','1256276QpUEcz','num','27tpWCnc','117410pakZON','1746KAJwGl','34jdwBsr','7186XVXFAV','7738510xqHzVR','read','Show\x20one\x20runtime\x20role\x20by\x20ID'];a50_0x4967=function(){return _0x1046ee;};return a50_0x4967();}export const roleDetail={'service':'role','command':'detail','description':a50_0x311c0b(0x72),'risk':a50_0x311c0b(0x71),'flags':[ROLE_ID_FLAG],async 'execute'(_0x2390dc){const _0x2a0c31=a50_0x311c0b,_0xa3182e=await getRuntimeRoleById(_0x2390dc['appCode'],_0x2390dc[_0x2a0c31(0x7b)]('id'));return{'ok':!![],'data':{'scope':_0x2a0c31(0x78),'role':projectRuntimeRole(_0xa3182e)}};}};
1
+ function a50_0x235d(_0x1f13ed,_0x588fee){_0x1f13ed=_0x1f13ed-0x17d;const _0x21bf58=a50_0x21bf();let _0x235d60=_0x21bf58[_0x1f13ed];return _0x235d60;}function a50_0x21bf(){const _0x45881c=['59750OnXOuA','8919nLoaFJ','detail','76476NbiEYB','Show\x20one\x20runtime\x20role\x20by\x20ID','2291973mVaBzN','1449316OgnlFo','1379294oRzvxU','appCode','num','read','763QFSzMF','5048ERzmpT','runtime','316wPGVjb','role','18772100IzcSOt'];a50_0x21bf=function(){return _0x45881c;};return a50_0x21bf();}const a50_0x4993ed=a50_0x235d;(function(_0x1b4a63,_0x3c73a3){const _0x2dd61a=a50_0x235d,_0x3177e9=_0x1b4a63();while(!![]){try{const _0x38ee51=parseInt(_0x2dd61a(0x182))/0x1+-parseInt(_0x2dd61a(0x181))/0x2+-parseInt(_0x2dd61a(0x180))/0x3+-parseInt(_0x2dd61a(0x189))/0x4*(-parseInt(_0x2dd61a(0x18c))/0x5)+-parseInt(_0x2dd61a(0x17e))/0x6*(parseInt(_0x2dd61a(0x186))/0x7)+parseInt(_0x2dd61a(0x187))/0x8*(-parseInt(_0x2dd61a(0x18d))/0x9)+parseInt(_0x2dd61a(0x18b))/0xa;if(_0x38ee51===_0x3c73a3)break;else _0x3177e9['push'](_0x3177e9['shift']());}catch(_0x495338){_0x3177e9['push'](_0x3177e9['shift']());}}}(a50_0x21bf,0xaa3b6));import{getRuntimeRoleById,projectRuntimeRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';export const roleDetail={'service':a50_0x4993ed(0x18a),'command':a50_0x4993ed(0x17d),'description':a50_0x4993ed(0x17f),'risk':a50_0x4993ed(0x185),'flags':[ROLE_ID_FLAG],async 'execute'(_0x1341ae){const _0x4299ce=a50_0x4993ed,_0x554c81=await getRuntimeRoleById(_0x1341ae[_0x4299ce(0x183)],_0x1341ae[_0x4299ce(0x184)]('id'));return{'ok':!![],'data':{'scope':_0x4299ce(0x188),'role':projectRuntimeRole(_0x554c81)}};}};
@@ -1 +1 @@
1
- (function(_0x292e3f,_0x1c6657){const _0x3504e4=a51_0x3ebb,_0x2c7fd9=_0x292e3f();while(!![]){try{const _0x1cca2a=-parseInt(_0x3504e4(0x82))/0x1*(parseInt(_0x3504e4(0x85))/0x2)+parseInt(_0x3504e4(0x7d))/0x3+-parseInt(_0x3504e4(0x83))/0x4*(-parseInt(_0x3504e4(0x86))/0x5)+-parseInt(_0x3504e4(0x80))/0x6*(-parseInt(_0x3504e4(0x87))/0x7)+-parseInt(_0x3504e4(0x81))/0x8+-parseInt(_0x3504e4(0x7e))/0x9+parseInt(_0x3504e4(0x7f))/0xa*(parseInt(_0x3504e4(0x84))/0xb);if(_0x1cca2a===_0x1c6657)break;else _0x2c7fd9['push'](_0x2c7fd9['shift']());}catch(_0x3679e8){_0x2c7fd9['push'](_0x2c7fd9['shift']());}}}(a51_0x1000,0x87088));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';function a51_0x3ebb(_0x2577ca,_0x2b9ee4){_0x2577ca=_0x2577ca-0x7d;const _0x10001c=a51_0x1000();let _0x3ebbad=_0x10001c[_0x2577ca];return _0x3ebbad;}import{roleUserAdd}from'../../commands/role/user-add.js';import{roleUserRemove}from'../../commands/role/user-remove.js';function a51_0x1000(){const _0x5b7bfb=['77IRDTjb','325654cQvjrp','96745MpOJdA','2518775mYWBgL','2248845RsVLyA','7436691QxtLqL','449330COmwoz','12vgzbGs','5492808XSyCCX','1GYOCPb','92glEqio'];a51_0x1000=function(){return _0x5b7bfb;};return a51_0x1000();}export const roleDefinitions=[roleList,roleDetail,roleCreate,roleUpdate,roleDelete,roleUserAdd,roleUserRemove];
1
+ (function(_0x136b17,_0x541f1c){const _0x55c274=a51_0x9f04,_0x59272c=_0x136b17();while(!![]){try{const _0x585178=parseInt(_0x55c274(0x1e8))/0x1*(-parseInt(_0x55c274(0x1e5))/0x2)+-parseInt(_0x55c274(0x1de))/0x3+-parseInt(_0x55c274(0x1e1))/0x4+-parseInt(_0x55c274(0x1e3))/0x5+parseInt(_0x55c274(0x1df))/0x6*(-parseInt(_0x55c274(0x1e6))/0x7)+parseInt(_0x55c274(0x1e0))/0x8*(-parseInt(_0x55c274(0x1e7))/0x9)+-parseInt(_0x55c274(0x1e4))/0xa*(-parseInt(_0x55c274(0x1e2))/0xb);if(_0x585178===_0x541f1c)break;else _0x59272c['push'](_0x59272c['shift']());}catch(_0x2d1207){_0x59272c['push'](_0x59272c['shift']());}}}(a51_0x3ab4,0xd1822));import{roleList}from'../../commands/role/list.js';import{roleDetail}from'../../commands/role/detail.js';import{roleCreate}from'../../commands/role/create.js';function a51_0x9f04(_0x105ef1,_0x2f53d5){_0x105ef1=_0x105ef1-0x1de;const _0x3ab412=a51_0x3ab4();let _0x9f04fb=_0x3ab412[_0x105ef1];return _0x9f04fb;}import{roleUpdate}from'../../commands/role/update.js';import{roleDelete}from'../../commands/role/delete.js';function a51_0x3ab4(){const _0x61f54=['407252bWqHwU','56439427pTFrce','2045065tsTbrm','10HndMZe','508XzIxPo','2830037BmOIME','9oTCZGY','2777AqfPIj','1945617WrpMuY','18BoeTNT','9560920dpEZYG'];a51_0x3ab4=function(){return _0x61f54;};return a51_0x3ab4();}import{roleUserAdd}from'../../commands/role/user-add.js';import{roleUserRemove}from'../../commands/role/user-remove.js';export const roleDefinitions=[roleList,roleDetail,roleCreate,roleUpdate,roleDelete,roleUserAdd,roleUserRemove];
@@ -1 +1 @@
1
- const a52_0x4d1de4=a52_0x1a60;(function(_0x54cf78,_0x2b2699){const _0x39490d=a52_0x1a60,_0x58cd5d=_0x54cf78();while(!![]){try{const _0x5b42fe=parseInt(_0x39490d(0xd0))/0x1+parseInt(_0x39490d(0xcf))/0x2*(parseInt(_0x39490d(0xe2))/0x3)+parseInt(_0x39490d(0xf1))/0x4+-parseInt(_0x39490d(0xee))/0x5*(parseInt(_0x39490d(0xec))/0x6)+parseInt(_0x39490d(0xe8))/0x7*(-parseInt(_0x39490d(0xdf))/0x8)+parseInt(_0x39490d(0xea))/0x9*(parseInt(_0x39490d(0xdb))/0xa)+-parseInt(_0x39490d(0xd3))/0xb;if(_0x5b42fe===_0x2b2699)break;else _0x58cd5d['push'](_0x58cd5d['shift']());}catch(_0xe6716f){_0x58cd5d['push'](_0x58cd5d['shift']());}}}(a52_0x208e,0x3f3ef));import{listRuntimeAppRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a52_0x1a60(_0x1a8e3b,_0x6f0045){_0x1a8e3b=_0x1a8e3b-0xcc;const _0x208e88=a52_0x208e();let _0x1a600a=_0x208e88[_0x1a8e3b];return _0x1a600a;}import{listAllRuntimeRoles,projectRuntimeRole,RUNTIME_ROLE_TYPES}from'../../commands/role/shared.js';export const roleList={'service':a52_0x4d1de4(0xe3),'command':'list','description':a52_0x4d1de4(0xd8),'risk':a52_0x4d1de4(0xde),'flags':[{'name':a52_0x4d1de4(0xd5),'type':'string','enum':RUNTIME_ROLE_TYPES,'description':a52_0x4d1de4(0xd6)},{'name':a52_0x4d1de4(0xed),'type':a52_0x4d1de4(0xef),'description':a52_0x4d1de4(0xf2)},{'name':a52_0x4d1de4(0xf0),'type':a52_0x4d1de4(0xe6),'default':0x1,'description':'Page\x20number'},{'name':a52_0x4d1de4(0xce),'type':a52_0x4d1de4(0xe6),'default':0x64,'description':a52_0x4d1de4(0xdd)}],async 'validate'(_0x219a00){const _0x299d12=a52_0x4d1de4,_0x5cc743=_0x219a00['str'](_0x299d12(0xd5))[_0x299d12(0xd4)]();if(_0x5cc743&&!RUNTIME_ROLE_TYPES['includes'](_0x5cc743))throw CliErrors[_0x299d12(0xeb)](_0x299d12(0xd1)+_0x5cc743+'.');const _0x214857=_0x219a00['num'](_0x299d12(0xf0),0x1),_0x2f32ce=_0x219a00[_0x299d12(0xe4)](_0x299d12(0xce),0x64);if(!Number[_0x299d12(0xe5)](_0x214857)||_0x214857<0x1)throw CliErrors['validation'](_0x299d12(0xcc));if(!Number['isSafeInteger'](_0x2f32ce)||_0x2f32ce<0x1||_0x2f32ce>0x64)throw CliErrors[_0x299d12(0xeb)](_0x299d12(0xd9));},async 'execute'(_0x55479c){const _0x3e4abb=a52_0x4d1de4,_0x4f4dc1=_0x55479c[_0x3e4abb(0xe7)](_0x3e4abb(0xd5))['toUpperCase'](),_0x427bc0=_0x55479c[_0x3e4abb(0xe7)]('name')[_0x3e4abb(0xdc)](),_0x333498=_0x55479c['num'](_0x3e4abb(0xf0),0x1),_0x537974=_0x55479c[_0x3e4abb(0xe4)]('pagesize',0x64);if(_0x4f4dc1){const _0x388eba=(await listAllRuntimeRoles(_0x55479c['appCode'],{..._0x427bc0?{'roleName':_0x427bc0}:{}}))[_0x3e4abb(0xd7)](_0x9a8677=>_0x9a8677[_0x3e4abb(0xe9)]===_0x4f4dc1),_0x504e5b=(_0x333498-0x1)*_0x537974;return{'ok':!![],'data':{'scope':'runtime','roles':_0x388eba['slice'](_0x504e5b,_0x504e5b+_0x537974)[_0x3e4abb(0xd2)](projectRuntimeRole),'paging':{'currentPage':_0x333498,'pageSize':_0x537974,'totalCount':_0x388eba['length']}}};}const _0x2296b4=await listRuntimeAppRoles(_0x55479c[_0x3e4abb(0xe1)],{..._0x427bc0?{'roleName':_0x427bc0}:{},'currentPage':_0x333498,'pageSize':_0x537974});return{'ok':!![],'data':{'scope':_0x3e4abb(0xcd),'roles':_0x2296b4[_0x3e4abb(0xda)][_0x3e4abb(0xd2)](projectRuntimeRole),'paging':_0x2296b4[_0x3e4abb(0xe0)]}};}};function a52_0x208e(){const _0x4f22a4=['items','1608690Atyksv','trim','Page\x20size\x20from\x201\x20to\x20100','read','1890704YKDxzc','paging','appCode','595233hkujBL','role','num','isSafeInteger','number','str','7vybhMX','roleType','18UyWydc','validation','1068vDJSdv','name','4855CUYeDI','string','page','1744884NOwgvu','Fuzzy\x20role-name\x20filter','--page\x20must\x20be\x20a\x20positive\x20integer.','runtime','pagesize','2XyoMZJ','404088QtaYAB','Invalid\x20runtime\x20role\x20type:\x20','map','7614497NzEbGE','toUpperCase','type','Runtime\x20role\x20type','filter','List\x20runtime\x20roles\x20for\x20the\x20current\x20app','--pagesize\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.'];a52_0x208e=function(){return _0x4f22a4;};return a52_0x208e();}
1
+ const a52_0xa06acd=a52_0x18f0;(function(_0x63ce12,_0x3d7dbd){const _0xc09223=a52_0x18f0,_0x542eff=_0x63ce12();while(!![]){try{const _0x24b1e5=-parseInt(_0xc09223(0x1bc))/0x1*(-parseInt(_0xc09223(0x1b4))/0x2)+parseInt(_0xc09223(0x1aa))/0x3*(-parseInt(_0xc09223(0x1be))/0x4)+-parseInt(_0xc09223(0x1a8))/0x5*(parseInt(_0xc09223(0x19b))/0x6)+parseInt(_0xc09223(0x1a9))/0x7*(-parseInt(_0xc09223(0x1a2))/0x8)+parseInt(_0xc09223(0x1bf))/0x9+-parseInt(_0xc09223(0x1b6))/0xa*(parseInt(_0xc09223(0x19e))/0xb)+parseInt(_0xc09223(0x1b1))/0xc;if(_0x24b1e5===_0x3d7dbd)break;else _0x542eff['push'](_0x542eff['shift']());}catch(_0x2d35c9){_0x542eff['push'](_0x542eff['shift']());}}}(a52_0xc39f,0x56149));import{listRuntimeAppRoles}from'../../core/api-client.js';function a52_0xc39f(){const _0x29c788=['pagesize','10uGlRRH','type','map','number','Page\x20size\x20from\x201\x20to\x20100','appCode','34vDByiD','paging','1266344umKYaX','5956227CdGUfv','Fuzzy\x20role-name\x20filter','List\x20runtime\x20roles\x20for\x20the\x20current\x20app','--page\x20must\x20be\x20a\x20positive\x20integer.','validation','16032GQhnsh','list','Page\x20number','3736777PDwMDM','runtime','page','str','8gxmUzp','Runtime\x20role\x20type','num','toUpperCase','items','name','435xPpSLY','1805909tQygae','6dGCjfo','roleType','includes','role','--pagesize\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.','slice','string','11786496plYGow','Invalid\x20runtime\x20role\x20type:\x20','isSafeInteger','10112QTJmOd'];a52_0xc39f=function(){return _0x29c788;};return a52_0xc39f();}function a52_0x18f0(_0x276787,_0x4d5c6d){_0x276787=_0x276787-0x198;const _0xc39f9a=a52_0xc39f();let _0x18f0d3=_0xc39f9a[_0x276787];return _0x18f0d3;}import{CliErrors}from'../../errors.js';import{listAllRuntimeRoles,projectRuntimeRole,RUNTIME_ROLE_TYPES}from'../../commands/role/shared.js';export const roleList={'service':a52_0xa06acd(0x1ad),'command':a52_0xa06acd(0x19c),'description':a52_0xa06acd(0x198),'risk':'read','flags':[{'name':a52_0xa06acd(0x1b7),'type':a52_0xa06acd(0x1b0),'enum':RUNTIME_ROLE_TYPES,'description':a52_0xa06acd(0x1a3)},{'name':'name','type':a52_0xa06acd(0x1b0),'description':a52_0xa06acd(0x1c0)},{'name':a52_0xa06acd(0x1a0),'type':a52_0xa06acd(0x1b9),'default':0x1,'description':a52_0xa06acd(0x19d)},{'name':'pagesize','type':a52_0xa06acd(0x1b9),'default':0x64,'description':a52_0xa06acd(0x1ba)}],async 'validate'(_0x7bac32){const _0x25aab9=a52_0xa06acd,_0x2c2b66=_0x7bac32[_0x25aab9(0x1a1)](_0x25aab9(0x1b7))[_0x25aab9(0x1a5)]();if(_0x2c2b66&&!RUNTIME_ROLE_TYPES[_0x25aab9(0x1ac)](_0x2c2b66))throw CliErrors['validation'](_0x25aab9(0x1b2)+_0x2c2b66+'.');const _0x18b8be=_0x7bac32[_0x25aab9(0x1a4)](_0x25aab9(0x1a0),0x1),_0x24c0a0=_0x7bac32[_0x25aab9(0x1a4)](_0x25aab9(0x1b5),0x64);if(!Number[_0x25aab9(0x1b3)](_0x18b8be)||_0x18b8be<0x1)throw CliErrors[_0x25aab9(0x19a)](_0x25aab9(0x199));if(!Number[_0x25aab9(0x1b3)](_0x24c0a0)||_0x24c0a0<0x1||_0x24c0a0>0x64)throw CliErrors[_0x25aab9(0x19a)](_0x25aab9(0x1ae));},async 'execute'(_0x2e7d1d){const _0x330b30=a52_0xa06acd,_0x2760eb=_0x2e7d1d[_0x330b30(0x1a1)](_0x330b30(0x1b7))['toUpperCase'](),_0x50f61a=_0x2e7d1d[_0x330b30(0x1a1)](_0x330b30(0x1a7))['trim'](),_0x15c7a1=_0x2e7d1d['num'](_0x330b30(0x1a0),0x1),_0x33d357=_0x2e7d1d[_0x330b30(0x1a4)](_0x330b30(0x1b5),0x64);if(_0x2760eb){const _0x352cf5=(await listAllRuntimeRoles(_0x2e7d1d[_0x330b30(0x1bb)],{..._0x50f61a?{'roleName':_0x50f61a}:{}}))['filter'](_0x343e39=>_0x343e39[_0x330b30(0x1ab)]===_0x2760eb),_0x5090f6=(_0x15c7a1-0x1)*_0x33d357;return{'ok':!![],'data':{'scope':_0x330b30(0x19f),'roles':_0x352cf5[_0x330b30(0x1af)](_0x5090f6,_0x5090f6+_0x33d357)[_0x330b30(0x1b8)](projectRuntimeRole),'paging':{'currentPage':_0x15c7a1,'pageSize':_0x33d357,'totalCount':_0x352cf5['length']}}};}const _0x102e85=await listRuntimeAppRoles(_0x2e7d1d[_0x330b30(0x1bb)],{..._0x50f61a?{'roleName':_0x50f61a}:{},'currentPage':_0x15c7a1,'pageSize':_0x33d357});return{'ok':!![],'data':{'scope':_0x330b30(0x19f),'roles':_0x102e85[_0x330b30(0x1a6)][_0x330b30(0x1b8)](projectRuntimeRole),'paging':_0x102e85[_0x330b30(0x1bd)]}};}};
@@ -1 +1 @@
1
- const a53_0x2c3188=a53_0x3803;(function(_0x1a8ca5,_0x5948c1){const _0x469644=a53_0x3803,_0x5ea0bb=_0x1a8ca5();while(!![]){try{const _0x4ef3e8=parseInt(_0x469644(0x1df))/0x1+parseInt(_0x469644(0x1f1))/0x2*(-parseInt(_0x469644(0x209))/0x3)+parseInt(_0x469644(0x212))/0x4+parseInt(_0x469644(0x204))/0x5+-parseInt(_0x469644(0x1ea))/0x6+parseInt(_0x469644(0x207))/0x7+parseInt(_0x469644(0x1de))/0x8*(parseInt(_0x469644(0x1fc))/0x9);if(_0x4ef3e8===_0x5948c1)break;else _0x5ea0bb['push'](_0x5ea0bb['shift']());}catch(_0x464924){_0x5ea0bb['push'](_0x5ea0bb['shift']());}}}(a53_0x4eb0,0x5e86d));import{listRuntimeAppUsers,listRuntimeAppRoles,listRuntimeRoleUsers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const RUNTIME_ROLE_TYPES=[a53_0x2c3188(0x1e3),'USER',a53_0x2c3188(0x1e2),'CUSTOM'];const BUILTIN_ROLE_TYPES=[a53_0x2c3188(0x1e3),'USER',a53_0x2c3188(0x1e2)];export const ROLE_ID_FLAG={'name':'id','type':'number','required':!![],'description':a53_0x2c3188(0x205)};export const ROLE_REF_FLAG={'name':'role','type':a53_0x2c3188(0x203),'required':!![],'description':'Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name'};export const USER_ID_FLAG={'name':a53_0x2c3188(0x1f4),'type':a53_0x2c3188(0x203),'required':!![],'description':'Runtime\x20numeric\x20userId'};export const EXPECT_USER_COUNT_FLAG={'name':a53_0x2c3188(0x1e7),'type':'number','description':a53_0x2c3188(0x1f8)};export function isBuiltinRuntimeRole(_0x13a9f4){const _0x38735c=a53_0x2c3188;return BUILTIN_ROLE_TYPES[_0x38735c(0x1f2)](_0x13a9f4);}export function assertCustomRuntimeRole(_0x5e2595,_0x1e4dca){const _0x4ea101=a53_0x2c3188;if(_0x5e2595[_0x4ea101(0x1e9)]!==_0x4ea101(0x1eb))throw CliErrors[_0x4ea101(0x1fe)](_0x4ea101(0x208)+_0x1e4dca+_0x4ea101(0x1f6)+_0x5e2595[_0x4ea101(0x1ed)]+'\x20('+_0x5e2595[_0x4ea101(0x1e9)]+').',_0x4ea101(0x1d4));}export function projectRuntimeRole(_0x7d7b1){const _0x123a0a=a53_0x2c3188;return{'id':_0x7d7b1['id'],'roleName':_0x7d7b1[_0x123a0a(0x1ed)],'roleType':_0x7d7b1[_0x123a0a(0x1e9)],'remark':_0x7d7b1[_0x123a0a(0x211)],'userCount':_0x7d7b1[_0x123a0a(0x1f7)]??0x0,'permitCount':_0x7d7b1[_0x123a0a(0x1ce)]??0x0,'builtin':isBuiltinRuntimeRole(_0x7d7b1[_0x123a0a(0x1e9)])};}function a53_0x4eb0(){const _0x5f9b4=['\x20was\x20not\x20found\x20in\x20app\x20','totalCount','Runtime\x20user\x20','length','624JNCeXw','397101LIxRvL','Runtime\x20userId\x20must\x20be\x20a\x20positive\x20safe\x20integer.','userName','OWNER','ADMIN','trim',',\x20found\x20','Runtime\x20role\x20','expect-user-count','appCode','roleType','278418jjNlHE','CUSTOM','Run\x20`lovrabet\x20role\x20list`\x20and\x20use\x20a\x20role\x20from\x20the\x20current\x20app.','roleName','isSafeInteger','Run\x20`lovrabet\x20role\x20list`\x20or\x20pass\x20--role\x20<id>.','paging','1491916zySTxv','includes','\x22\x20was\x20not\x20found\x20in\x20app\x20','user','User\x20','\x20built-in\x20runtime\x20role\x20','userCount','Reject\x20when\x20the\x20target\x20role\x20member\x20count\x20has\x20changed','userList','Runtime\x20role\x20member\x20count\x20changed:\x20expected\x20','str','6687mUlvTV','Use\x20a\x20numeric\x20userId\x20returned\x20by\x20the\x20current\x20application\x27s\x20personnel\x20list.','validation','Transfer\x20or\x20manage\x20application\x20ownership\x20through\x20the\x20dedicated\x20application\x20workflow.','\x20is\x20missing\x20from\x20the\x20grouped\x20member\x20snapshot.','push','Missing\x20runtime\x20role\x20reference.','string','25080GumHkk','Runtime\x20role\x20ID\x20returned\x20by\x20role\x20list','Pass\x20--user\x20<userId>;\x20name\x20and\x20account\x20lookup\x20are\x20not\x20available\x20in\x20runtime\x20scope.','995162RBWJoj','Cannot\x20','3JMUaDZ','OWNER\x20runtime\x20role\x20membership\x20cannot\x20be\x20changed\x20with\x20this\x20command.','filter','Pass\x20--role\x20<id|name>.','--expect-user-count\x20must\x20be\x20a\x20non-negative\x20integer.','\x20is\x20already\x20in\x20runtime\x20role\x20','user-add','role','remark','2309220QqKrcl','find','permitCount','flag','test','items','Runtime\x20role\x20name\x20\x22','Pass\x20one\x20role\x20ID:\x20','Only\x20CUSTOM\x20runtime\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','Read\x20the\x20current\x20members\x20and\x20retry\x20with\x20the\x20new\x20expected\x20count.','userId','\x22\x20is\x20ambiguous.','num','map'];a53_0x4eb0=function(){return _0x5f9b4;};return a53_0x4eb0();}export async function getRuntimeRoleById(_0x155b86,_0x56f53a){const _0x5de926=a53_0x2c3188;if(!Number[_0x5de926(0x1ee)](_0x56f53a)||_0x56f53a<=0x0)throw CliErrors[_0x5de926(0x1fe)]('Role\x20ID\x20must\x20be\x20a\x20positive\x20integer.');const _0x2919a1=(await listAllRuntimeRoles(_0x155b86))[_0x5de926(0x20b)](_0x2d094b=>_0x2d094b['id']===_0x56f53a&&(!_0x2d094b[_0x5de926(0x1e8)]||_0x2d094b[_0x5de926(0x1e8)]===_0x155b86));if(_0x2919a1['length']!==0x1)throw CliErrors['validation']('Runtime\x20role\x20id\x20'+_0x56f53a+_0x5de926(0x1da)+_0x155b86+'.',_0x5de926(0x1ec));return _0x2919a1[0x0];}function a53_0x3803(_0x258a4d,_0x23c1c2){_0x258a4d=_0x258a4d-0x1ce;const _0x4eb04a=a53_0x4eb0();let _0x380312=_0x4eb04a[_0x258a4d];return _0x380312;}export async function listAllRuntimeRoles(_0x430a61,_0x56afee={}){const _0x343c2b=a53_0x2c3188,_0x4c758f=0x64,_0x57c9e5=[];for(let _0x516989=0x1;;_0x516989+=0x1){const _0x1927e7=await listRuntimeAppRoles(_0x430a61,{..._0x56afee[_0x343c2b(0x1ed)]?{'roleName':_0x56afee[_0x343c2b(0x1ed)]}:{},'currentPage':_0x516989,'pageSize':_0x4c758f});_0x57c9e5[_0x343c2b(0x201)](..._0x1927e7[_0x343c2b(0x1d1)]);if(_0x1927e7['items'][_0x343c2b(0x1dd)]<_0x4c758f||_0x1927e7[_0x343c2b(0x1f0)]&&_0x57c9e5[_0x343c2b(0x1dd)]>=_0x1927e7[_0x343c2b(0x1f0)][_0x343c2b(0x1db)])return _0x57c9e5;}}export async function resolveRuntimeRoleRef(_0x29c49b,_0x56ea8c){const _0x1718f5=a53_0x2c3188,_0x28301a=_0x56ea8c[_0x1718f5(0x1e4)]();if(!_0x28301a)throw CliErrors[_0x1718f5(0x1fe)](_0x1718f5(0x202),_0x1718f5(0x20c));if(/^\d+$/[_0x1718f5(0x1d0)](_0x28301a))return getRuntimeRoleById(_0x29c49b,Number(_0x28301a));const _0x5dc726=(await listAllRuntimeRoles(_0x29c49b))[_0x1718f5(0x20b)](_0x3c72d9=>_0x3c72d9[_0x1718f5(0x1ed)]===_0x28301a);if(_0x5dc726[_0x1718f5(0x1dd)]===0x0)throw CliErrors[_0x1718f5(0x1fe)](_0x1718f5(0x1d2)+_0x28301a+_0x1718f5(0x1f3)+_0x29c49b+'.',_0x1718f5(0x1ef));if(_0x5dc726[_0x1718f5(0x1dd)]>0x1)throw CliErrors['validation'](_0x1718f5(0x1d2)+_0x28301a+_0x1718f5(0x1d7),_0x1718f5(0x1d3)+_0x5dc726['map'](_0x4608fc=>_0x4608fc['id'])['join'](',\x20')+'.');return _0x5dc726[0x0];}function parseRuntimeUserId(_0xde3a25){const _0x39bced=a53_0x2c3188,_0x4793df=_0xde3a25['trim']();if(!/^\d+$/[_0x39bced(0x1d0)](_0x4793df))throw CliErrors['validation']('Runtime\x20role\x20membership\x20requires\x20a\x20numeric\x20userId.',_0x39bced(0x206));const _0x286f7e=Number(_0x4793df);if(!Number[_0x39bced(0x1ee)](_0x286f7e)||_0x286f7e<=0x0)throw CliErrors[_0x39bced(0x1fe)](_0x39bced(0x1e0));return _0x286f7e;}export async function prepareRuntimeMemberMutation(_0x3c72e7,_0x347d57){const _0x50d6d7=a53_0x2c3188,_0x3874b9=await resolveRuntimeRoleRef(_0x3c72e7[_0x50d6d7(0x1e8)],_0x3c72e7[_0x50d6d7(0x1fb)](_0x50d6d7(0x210)));if(_0x3874b9[_0x50d6d7(0x1e9)]==='OWNER')throw CliErrors[_0x50d6d7(0x1fe)](_0x50d6d7(0x20a),_0x50d6d7(0x1ff));const _0x59cb1c=parseRuntimeUserId(_0x3c72e7[_0x50d6d7(0x1fb)](_0x50d6d7(0x1f4))),_0x3abd08=(await listRuntimeRoleUsers(_0x3c72e7[_0x50d6d7(0x1e8)]))[_0x50d6d7(0x1d9)](_0x309838=>({..._0x309838,'userList':[..._0x309838[_0x50d6d7(0x1f9)]??[]],'applyUserList':[..._0x309838['applyUserList']??[]]})),_0x5bb30d=_0x3abd08[_0x50d6d7(0x213)](_0x5cbc9b=>_0x5cbc9b['id']===_0x3874b9['id']);if(!_0x5bb30d)throw CliErrors[_0x50d6d7(0x1fe)](_0x50d6d7(0x1e6)+_0x3874b9['id']+_0x50d6d7(0x200),'Reload\x20the\x20role\x20list\x20and\x20retry\x20after\x20the\x20server\x20state\x20is\x20consistent.');const _0x24cf8d=_0x5bb30d[_0x50d6d7(0x1f9)]['map'](_0x58cd99=>_0x58cd99[_0x50d6d7(0x1d6)]),_0x5eba68=_0x3c72e7[_0x50d6d7(0x1cf)](_0x50d6d7(0x1e7));if(_0x5eba68!==undefined&&_0x5eba68!==null&&_0x5eba68!==''){const _0x20fa05=_0x3c72e7[_0x50d6d7(0x1d8)](_0x50d6d7(0x1e7));if(!Number[_0x50d6d7(0x1ee)](_0x20fa05)||_0x20fa05<0x0)throw CliErrors[_0x50d6d7(0x1fe)](_0x50d6d7(0x20d));if(_0x24cf8d[_0x50d6d7(0x1dd)]!==_0x20fa05)throw CliErrors['validation'](_0x50d6d7(0x1fa)+_0x20fa05+_0x50d6d7(0x1e5)+_0x24cf8d[_0x50d6d7(0x1dd)]+'.',_0x50d6d7(0x1d5));}const _0x1f94d0=_0x24cf8d[_0x50d6d7(0x1f2)](_0x59cb1c),_0xe322ce=[];let _0x26d8c3=!![];if(_0x347d57===_0x50d6d7(0x20f)){const _0x202232=await listRuntimeAppUsers(_0x3c72e7[_0x50d6d7(0x1e8)]),_0x1ec840=_0x202232[_0x50d6d7(0x20b)](_0x23dbf3=>Number(_0x23dbf3['code'])===_0x59cb1c);if(_0x1ec840[_0x50d6d7(0x1dd)]!==0x1||!_0x1ec840[0x0][_0x50d6d7(0x1e1)]?.['trim']())throw CliErrors[_0x50d6d7(0x1fe)](_0x50d6d7(0x1dc)+_0x59cb1c+_0x50d6d7(0x1da)+_0x3c72e7[_0x50d6d7(0x1e8)]+'.',_0x50d6d7(0x1fd));_0x1f94d0?(_0x26d8c3=![],_0xe322ce['push'](_0x50d6d7(0x1f5)+_0x59cb1c+_0x50d6d7(0x20e)+_0x3874b9['id']+'.')):_0x5bb30d[_0x50d6d7(0x1f9)][_0x50d6d7(0x201)]({'userId':_0x59cb1c,'username':_0x1ec840[0x0][_0x50d6d7(0x1e1)]});}else!_0x1f94d0?(_0x26d8c3=![],_0xe322ce[_0x50d6d7(0x201)]('User\x20'+_0x59cb1c+'\x20is\x20not\x20in\x20runtime\x20role\x20'+_0x3874b9['id']+'.')):_0x5bb30d[_0x50d6d7(0x1f9)]=_0x5bb30d['userList']['filter'](_0x1f23e9=>_0x1f23e9[_0x50d6d7(0x1d6)]!==_0x59cb1c);return{'role':_0x3874b9,'userId':_0x59cb1c,'roleList':_0x3abd08,'before':{'userIds':_0x24cf8d},'after':{'userIds':_0x5bb30d[_0x50d6d7(0x1f9)][_0x50d6d7(0x1d9)](_0x14922c=>_0x14922c[_0x50d6d7(0x1d6)])},'shouldWrite':_0x26d8c3,'warnings':_0xe322ce};}export function runtimeRoleWriteResult(_0x222f31,_0x21d6e6,_0x5e91ea,_0x16178c,_0x2a9bc4,_0x38c834=[]){return{'operation':_0x222f31,'scope':'runtime','selector':_0x21d6e6,'before':_0x5e91ea,'after':_0x16178c,'dryRun':![],'backend':_0x2a9bc4,'warnings':_0x38c834};}
1
+ const a53_0x2f5680=a53_0xc2a1;(function(_0x8ecc8b,_0x4d1154){const _0x2b8e75=a53_0xc2a1,_0x4210f5=_0x8ecc8b();while(!![]){try{const _0x123bf3=parseInt(_0x2b8e75(0x9e))/0x1+parseInt(_0x2b8e75(0x87))/0x2+parseInt(_0x2b8e75(0x97))/0x3*(-parseInt(_0x2b8e75(0x7b))/0x4)+-parseInt(_0x2b8e75(0x96))/0x5+parseInt(_0x2b8e75(0xa5))/0x6+parseInt(_0x2b8e75(0x8c))/0x7*(parseInt(_0x2b8e75(0xa0))/0x8)+-parseInt(_0x2b8e75(0xb0))/0x9;if(_0x123bf3===_0x4d1154)break;else _0x4210f5['push'](_0x4210f5['shift']());}catch(_0x1732af){_0x4210f5['push'](_0x4210f5['shift']());}}}(a53_0x4134,0xf301a));import{listRuntimeAppUsers,listRuntimeAppRoles,listRuntimeRoleUsers}from'../../core/api-client.js';function a53_0x4134(){const _0x43267e=['User\x20','role','1953595vmzvgL','2001ZqQqnD','items','userName','Run\x20`lovrabet\x20role\x20list`\x20and\x20use\x20a\x20role\x20from\x20the\x20current\x20app.','Pass\x20--role\x20<id|name>.','paging','test','914656jQglOM','Transfer\x20or\x20manage\x20application\x20ownership\x20through\x20the\x20dedicated\x20application\x20workflow.','6767144bQpmLx','\x20built-in\x20runtime\x20role\x20','map','\x20is\x20missing\x20from\x20the\x20grouped\x20member\x20snapshot.','Runtime\x20role\x20member\x20count\x20changed:\x20expected\x20','6058098GbupnD','Only\x20CUSTOM\x20runtime\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','Runtime\x20role\x20name\x20\x22','Role\x20ID\x20must\x20be\x20a\x20positive\x20integer.','Reload\x20the\x20role\x20list\x20and\x20retry\x20after\x20the\x20server\x20state\x20is\x20consistent.','length','string','isSafeInteger','\x22\x20is\x20ambiguous.','ADMIN','user-add','31811697YIrRSQ','Runtime\x20role\x20ID\x20returned\x20by\x20role\x20list','OWNER','filter','Use\x20a\x20numeric\x20userId\x20returned\x20by\x20the\x20current\x20application\x27s\x20personnel\x20list.','number','Pass\x20--user\x20<userId>;\x20name\x20and\x20account\x20lookup\x20are\x20not\x20available\x20in\x20runtime\x20scope.','Cannot\x20','\x20was\x20not\x20found\x20in\x20app\x20','flag','USER','Runtime\x20userId\x20must\x20be\x20a\x20positive\x20safe\x20integer.','trim','totalCount','Run\x20`lovrabet\x20role\x20list`\x20or\x20pass\x20--role\x20<id>.','Reject\x20when\x20the\x20target\x20role\x20member\x20count\x20has\x20changed','--expect-user-count\x20must\x20be\x20a\x20non-negative\x20integer.','2452msjuec','validation','roleName','num','join','Pass\x20one\x20role\x20ID:\x20','Runtime\x20role\x20id\x20','find','code','CUSTOM','Runtime\x20role\x20membership\x20requires\x20a\x20numeric\x20userId.','Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name','3426904qwDutg','runtime','Missing\x20runtime\x20role\x20reference.','Runtime\x20role\x20','roleType','14wiMySk','appCode','user','push','userId','userList','expect-user-count','str'];a53_0x4134=function(){return _0x43267e;};return a53_0x4134();}import{CliErrors}from'../../errors.js';export const RUNTIME_ROLE_TYPES=['ADMIN','USER',a53_0x2f5680(0xb2),a53_0x2f5680(0x84)];const BUILTIN_ROLE_TYPES=[a53_0x2f5680(0xae),a53_0x2f5680(0xba),a53_0x2f5680(0xb2)];export const ROLE_ID_FLAG={'name':'id','type':a53_0x2f5680(0xb5),'required':!![],'description':a53_0x2f5680(0xb1)};function a53_0xc2a1(_0x463ce0,_0x215998){_0x463ce0=_0x463ce0-0x79;const _0x41341d=a53_0x4134();let _0xc2a15a=_0x41341d[_0x463ce0];return _0xc2a15a;}export const ROLE_REF_FLAG={'name':a53_0x2f5680(0x95),'type':a53_0x2f5680(0xab),'required':!![],'description':a53_0x2f5680(0x86)};export const USER_ID_FLAG={'name':a53_0x2f5680(0x8e),'type':'string','required':!![],'description':'Runtime\x20numeric\x20userId'};export const EXPECT_USER_COUNT_FLAG={'name':a53_0x2f5680(0x92),'type':'number','description':a53_0x2f5680(0x79)};export function isBuiltinRuntimeRole(_0x5c9f15){return BUILTIN_ROLE_TYPES['includes'](_0x5c9f15);}export function assertCustomRuntimeRole(_0x4bf729,_0x529a10){const _0x503d4d=a53_0x2f5680;if(_0x4bf729[_0x503d4d(0x8b)]!==_0x503d4d(0x84))throw CliErrors[_0x503d4d(0x7c)](_0x503d4d(0xb7)+_0x529a10+_0x503d4d(0xa1)+_0x4bf729[_0x503d4d(0x7d)]+'\x20('+_0x4bf729['roleType']+').',_0x503d4d(0xa6));}export function projectRuntimeRole(_0xd2cec6){const _0x17a6e3=a53_0x2f5680;return{'id':_0xd2cec6['id'],'roleName':_0xd2cec6[_0x17a6e3(0x7d)],'roleType':_0xd2cec6[_0x17a6e3(0x8b)],'remark':_0xd2cec6['remark'],'userCount':_0xd2cec6['userCount']??0x0,'permitCount':_0xd2cec6['permitCount']??0x0,'builtin':isBuiltinRuntimeRole(_0xd2cec6[_0x17a6e3(0x8b)])};}export async function getRuntimeRoleById(_0xf1cd99,_0x3091c8){const _0x7e7a3=a53_0x2f5680;if(!Number[_0x7e7a3(0xac)](_0x3091c8)||_0x3091c8<=0x0)throw CliErrors[_0x7e7a3(0x7c)](_0x7e7a3(0xa8));const _0x2eb357=(await listAllRuntimeRoles(_0xf1cd99))['filter'](_0x4300c8=>_0x4300c8['id']===_0x3091c8&&(!_0x4300c8[_0x7e7a3(0x8d)]||_0x4300c8[_0x7e7a3(0x8d)]===_0xf1cd99));if(_0x2eb357[_0x7e7a3(0xaa)]!==0x1)throw CliErrors[_0x7e7a3(0x7c)](_0x7e7a3(0x81)+_0x3091c8+_0x7e7a3(0xb8)+_0xf1cd99+'.',_0x7e7a3(0x9a));return _0x2eb357[0x0];}export async function listAllRuntimeRoles(_0x27405e,_0x244bc2={}){const _0xf919f5=a53_0x2f5680,_0x34152a=0x64,_0x56b126=[];for(let _0x1a5784=0x1;;_0x1a5784+=0x1){const _0x478d44=await listRuntimeAppRoles(_0x27405e,{..._0x244bc2[_0xf919f5(0x7d)]?{'roleName':_0x244bc2['roleName']}:{},'currentPage':_0x1a5784,'pageSize':_0x34152a});_0x56b126['push'](..._0x478d44['items']);if(_0x478d44[_0xf919f5(0x98)][_0xf919f5(0xaa)]<_0x34152a||_0x478d44[_0xf919f5(0x9c)]&&_0x56b126[_0xf919f5(0xaa)]>=_0x478d44[_0xf919f5(0x9c)][_0xf919f5(0xbd)])return _0x56b126;}}export async function resolveRuntimeRoleRef(_0x53725e,_0x557dad){const _0x3106d5=a53_0x2f5680,_0x5f13fa=_0x557dad[_0x3106d5(0xbc)]();if(!_0x5f13fa)throw CliErrors[_0x3106d5(0x7c)](_0x3106d5(0x89),_0x3106d5(0x9b));if(/^\d+$/[_0x3106d5(0x9d)](_0x5f13fa))return getRuntimeRoleById(_0x53725e,Number(_0x5f13fa));const _0x31383b=(await listAllRuntimeRoles(_0x53725e))[_0x3106d5(0xb3)](_0x5b438c=>_0x5b438c[_0x3106d5(0x7d)]===_0x5f13fa);if(_0x31383b[_0x3106d5(0xaa)]===0x0)throw CliErrors[_0x3106d5(0x7c)]('Runtime\x20role\x20name\x20\x22'+_0x5f13fa+'\x22\x20was\x20not\x20found\x20in\x20app\x20'+_0x53725e+'.',_0x3106d5(0xbe));if(_0x31383b[_0x3106d5(0xaa)]>0x1)throw CliErrors[_0x3106d5(0x7c)](_0x3106d5(0xa7)+_0x5f13fa+_0x3106d5(0xad),_0x3106d5(0x80)+_0x31383b[_0x3106d5(0xa2)](_0x21c93a=>_0x21c93a['id'])[_0x3106d5(0x7f)](',\x20')+'.');return _0x31383b[0x0];}function parseRuntimeUserId(_0x4a03ea){const _0x52ab1c=a53_0x2f5680,_0x47ff5d=_0x4a03ea[_0x52ab1c(0xbc)]();if(!/^\d+$/['test'](_0x47ff5d))throw CliErrors[_0x52ab1c(0x7c)](_0x52ab1c(0x85),_0x52ab1c(0xb6));const _0x5a1cbd=Number(_0x47ff5d);if(!Number['isSafeInteger'](_0x5a1cbd)||_0x5a1cbd<=0x0)throw CliErrors[_0x52ab1c(0x7c)](_0x52ab1c(0xbb));return _0x5a1cbd;}export async function prepareRuntimeMemberMutation(_0x1c9efc,_0x3f2651){const _0x1c4e00=a53_0x2f5680,_0x4bc1b=await resolveRuntimeRoleRef(_0x1c9efc['appCode'],_0x1c9efc[_0x1c4e00(0x93)](_0x1c4e00(0x95)));if(_0x4bc1b[_0x1c4e00(0x8b)]===_0x1c4e00(0xb2))throw CliErrors[_0x1c4e00(0x7c)]('OWNER\x20runtime\x20role\x20membership\x20cannot\x20be\x20changed\x20with\x20this\x20command.',_0x1c4e00(0x9f));const _0x15d99b=parseRuntimeUserId(_0x1c9efc['str'](_0x1c4e00(0x8e))),_0x10c219=(await listRuntimeRoleUsers(_0x1c9efc[_0x1c4e00(0x8d)]))[_0x1c4e00(0xa2)](_0x2edf47=>({..._0x2edf47,'userList':[..._0x2edf47['userList']??[]],'applyUserList':[..._0x2edf47['applyUserList']??[]]})),_0x282968=_0x10c219[_0x1c4e00(0x82)](_0x14a255=>_0x14a255['id']===_0x4bc1b['id']);if(!_0x282968)throw CliErrors[_0x1c4e00(0x7c)](_0x1c4e00(0x8a)+_0x4bc1b['id']+_0x1c4e00(0xa3),_0x1c4e00(0xa9));const _0x3af4c1=_0x282968['userList'][_0x1c4e00(0xa2)](_0x47cece=>_0x47cece[_0x1c4e00(0x90)]),_0x3839d7=_0x1c9efc[_0x1c4e00(0xb9)](_0x1c4e00(0x92));if(_0x3839d7!==undefined&&_0x3839d7!==null&&_0x3839d7!==''){const _0x2e3b2a=_0x1c9efc[_0x1c4e00(0x7e)](_0x1c4e00(0x92));if(!Number[_0x1c4e00(0xac)](_0x2e3b2a)||_0x2e3b2a<0x0)throw CliErrors[_0x1c4e00(0x7c)](_0x1c4e00(0x7a));if(_0x3af4c1['length']!==_0x2e3b2a)throw CliErrors['validation'](_0x1c4e00(0xa4)+_0x2e3b2a+',\x20found\x20'+_0x3af4c1[_0x1c4e00(0xaa)]+'.','Read\x20the\x20current\x20members\x20and\x20retry\x20with\x20the\x20new\x20expected\x20count.');}const _0x518811=_0x3af4c1['includes'](_0x15d99b),_0x1df72d=[];let _0x6e678d=!![];if(_0x3f2651===_0x1c4e00(0xaf)){const _0x58e613=await listRuntimeAppUsers(_0x1c9efc['appCode']),_0x28f975=_0x58e613[_0x1c4e00(0xb3)](_0x4bf11a=>Number(_0x4bf11a[_0x1c4e00(0x83)])===_0x15d99b);if(_0x28f975[_0x1c4e00(0xaa)]!==0x1||!_0x28f975[0x0][_0x1c4e00(0x99)]?.[_0x1c4e00(0xbc)]())throw CliErrors[_0x1c4e00(0x7c)]('Runtime\x20user\x20'+_0x15d99b+_0x1c4e00(0xb8)+_0x1c9efc[_0x1c4e00(0x8d)]+'.',_0x1c4e00(0xb4));_0x518811?(_0x6e678d=![],_0x1df72d['push'](_0x1c4e00(0x94)+_0x15d99b+'\x20is\x20already\x20in\x20runtime\x20role\x20'+_0x4bc1b['id']+'.')):_0x282968[_0x1c4e00(0x91)][_0x1c4e00(0x8f)]({'userId':_0x15d99b,'username':_0x28f975[0x0][_0x1c4e00(0x99)]});}else!_0x518811?(_0x6e678d=![],_0x1df72d['push'](_0x1c4e00(0x94)+_0x15d99b+'\x20is\x20not\x20in\x20runtime\x20role\x20'+_0x4bc1b['id']+'.')):_0x282968['userList']=_0x282968[_0x1c4e00(0x91)][_0x1c4e00(0xb3)](_0x1bc508=>_0x1bc508[_0x1c4e00(0x90)]!==_0x15d99b);return{'role':_0x4bc1b,'userId':_0x15d99b,'roleList':_0x10c219,'before':{'userIds':_0x3af4c1},'after':{'userIds':_0x282968[_0x1c4e00(0x91)][_0x1c4e00(0xa2)](_0x21f622=>_0x21f622[_0x1c4e00(0x90)])},'shouldWrite':_0x6e678d,'warnings':_0x1df72d};}export function runtimeRoleWriteResult(_0x40cbe5,_0x1d3615,_0x585fd5,_0x1bb1c6,_0x566479,_0x2a2022=[]){const _0x52f0ad=a53_0x2f5680;return{'operation':_0x40cbe5,'scope':_0x52f0ad(0x88),'selector':_0x1d3615,'before':_0x585fd5,'after':_0x1bb1c6,'dryRun':![],'backend':_0x566479,'warnings':_0x2a2022};}
@@ -1 +1 @@
1
- const a54_0x501f06=a54_0x1a2f;function a54_0x1a2f(_0x1089fb,_0x47d611){_0x1089fb=_0x1089fb-0x1de;const _0x1ab2e2=a54_0x1ab2();let _0x1a2f7a=_0x1ab2e2[_0x1089fb];return _0x1a2f7a;}(function(_0x40e11d,_0x467ae4){const _0x285f53=a54_0x1a2f,_0x18247c=_0x40e11d();while(!![]){try{const _0x43a7d5=-parseInt(_0x285f53(0x1fc))/0x1*(-parseInt(_0x285f53(0x1e5))/0x2)+parseInt(_0x285f53(0x1f9))/0x3+parseInt(_0x285f53(0x1fa))/0x4+parseInt(_0x285f53(0x1e9))/0x5+parseInt(_0x285f53(0x1ea))/0x6*(parseInt(_0x285f53(0x1ec))/0x7)+-parseInt(_0x285f53(0x1fb))/0x8+-parseInt(_0x285f53(0x1f5))/0x9;if(_0x43a7d5===_0x467ae4)break;else _0x18247c['push'](_0x18247c['shift']());}catch(_0x55cb4f){_0x18247c['push'](_0x18247c['shift']());}}}(a54_0x1ab2,0xa680a));import{updateRuntimeAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a54_0x1ab2(){const _0x420c88=['--remark\x20must\x20not\x20be\x20blank.','307977aUSgsB','1549856HJEGsz','5356984QOARwz','38jCqdAx','name','update','The\x20current\x20runtime\x20role\x20API\x20does\x20not\x20support\x20clearing\x20an\x20existing\x20remark.','str','POST','Pass\x20--name\x20or\x20--remark\x20to\x20update\x20the\x20runtime\x20role.','remark','/client/permit/role/update','4962xxyVoo','--name\x20must\x20not\x20be\x20blank.','role','high-risk-write','3617765qEPEKe','153444PqUDFw','body','168igaIbL','Preview:\x20update\x20a\x20runtime\x20CUSTOM\x20role','string','New\x20role\x20name','appCode','build','validation','flag','New\x20non-empty\x20role\x20remark','5131017lhghIN','修改当前运行应用中的自定义角色名称或备注;变更会立即影响角色展示。','trim'];a54_0x1ab2=function(){return _0x420c88;};return a54_0x1ab2();}import{dryRun}from'../../framework/dryrun.js';import{assertCustomRuntimeRole,getRuntimeRoleById,projectRuntimeRole,ROLE_ID_FLAG,runtimeRoleWriteResult}from'../../commands/role/shared.js';function updateFields(_0x452a32){const _0x5a8243=a54_0x1a2f,_0x134d20=_0x452a32['flag'](_0x5a8243(0x1fd))!==undefined,_0x3ed1a7=_0x452a32[_0x5a8243(0x1f3)](_0x5a8243(0x1e3))!==undefined;if(!_0x134d20&&!_0x3ed1a7)throw CliErrors[_0x5a8243(0x1f2)](_0x5a8243(0x1e2));const _0x56ebb6=_0x452a32[_0x5a8243(0x1e0)](_0x5a8243(0x1fd))[_0x5a8243(0x1f7)](),_0xc30606=_0x452a32[_0x5a8243(0x1e0)](_0x5a8243(0x1e3))[_0x5a8243(0x1f7)]();if(_0x134d20&&!_0x56ebb6)throw CliErrors['validation'](_0x5a8243(0x1e6));if(_0x3ed1a7&&!_0xc30606)throw CliErrors[_0x5a8243(0x1f2)](_0x5a8243(0x1f8),_0x5a8243(0x1df));return{..._0x134d20?{'roleName':_0x56ebb6}:{},..._0x3ed1a7?{'remark':_0xc30606}:{}};}async function prepare(_0x1e8bdd){const _0x49d6c1=a54_0x1a2f,_0x4def2b=await getRuntimeRoleById(_0x1e8bdd['appCode'],_0x1e8bdd['num']('id'));return assertCustomRuntimeRole(_0x4def2b,_0x49d6c1(0x1de)),{'role':_0x4def2b,'body':{'id':_0x4def2b['id'],'appCode':_0x1e8bdd[_0x49d6c1(0x1f0)],...updateFields(_0x1e8bdd)}};}export const roleUpdate={'service':a54_0x501f06(0x1e7),'command':a54_0x501f06(0x1de),'description':'Update\x20a\x20runtime\x20CUSTOM\x20role','risk':a54_0x501f06(0x1e8),'confirmationDescription':a54_0x501f06(0x1f6),'flags':[ROLE_ID_FLAG,{'name':a54_0x501f06(0x1fd),'type':a54_0x501f06(0x1ee),'description':a54_0x501f06(0x1ef)},{'name':a54_0x501f06(0x1e3),'type':a54_0x501f06(0x1ee),'description':a54_0x501f06(0x1f4)}],async 'validate'(_0x2b6c24){updateFields(_0x2b6c24);},async 'dryRun'(_0x2b8093){const _0x57d608=a54_0x501f06,{body:_0x477290}=await prepare(_0x2b8093);return dryRun(_0x57d608(0x1e1),_0x57d608(0x1e4))[_0x57d608(0x1eb)](_0x477290)['description'](_0x57d608(0x1ed))[_0x57d608(0x1f1)]();},async 'execute'(_0x16c063){const _0x44e1e1=a54_0x501f06,{role:_0xae7e48,body:_0x503876}=await prepare(_0x16c063),_0x1b755c=await updateRuntimeAppRole(_0x503876);return{'ok':!![],'data':runtimeRoleWriteResult(_0x44e1e1(0x1de),{'roleId':_0xae7e48['id']},projectRuntimeRole(_0xae7e48),projectRuntimeRole(_0x1b755c),{'method':_0x44e1e1(0x1e1),'path':_0x44e1e1(0x1e4)})};}};
1
+ const a54_0x45ac2a=a54_0x4e3e;function a54_0x2396(){const _0x1ab84b=['POST','The\x20current\x20runtime\x20role\x20API\x20does\x20not\x20support\x20clearing\x20an\x20existing\x20remark.','name','1974500UAILkz','New\x20role\x20name','role','Pass\x20--name\x20or\x20--remark\x20to\x20update\x20the\x20runtime\x20role.','update','405TYMtOg','build','6325wnmYcp','str','17556ObaQbr','high-risk-write','Preview:\x20update\x20a\x20runtime\x20CUSTOM\x20role','appCode','修改当前运行应用中的自定义角色名称或备注;变更会立即影响角色展示。','112830hKrqBK','num','description','18dLbGzn','trim','208GUBiht','body','579320LXbuyT','171nySIdI','validation','498nGSsjZ','1005263xmvnYN','358wpZNmo','--name\x20must\x20not\x20be\x20blank.','remark','flag'];a54_0x2396=function(){return _0x1ab84b;};return a54_0x2396();}(function(_0x478fef,_0x4aced3){const _0x2ef8e8=a54_0x4e3e,_0x4a77a3=_0x478fef();while(!![]){try{const _0x2f2c1e=parseInt(_0x2ef8e8(0x115))/0x1*(parseInt(_0x2ef8e8(0xf6))/0x2)+parseInt(_0x2ef8e8(0x102))/0x3*(parseInt(_0x2ef8e8(0x110))/0x4)+parseInt(_0x2ef8e8(0xfd))/0x5+-parseInt(_0x2ef8e8(0x10e))/0x6*(-parseInt(_0x2ef8e8(0x116))/0x7)+-parseInt(_0x2ef8e8(0x112))/0x8+-parseInt(_0x2ef8e8(0x113))/0x9*(-parseInt(_0x2ef8e8(0x10b))/0xa)+-parseInt(_0x2ef8e8(0x104))/0xb*(parseInt(_0x2ef8e8(0x106))/0xc);if(_0x2f2c1e===_0x4aced3)break;else _0x4a77a3['push'](_0x4a77a3['shift']());}catch(_0xd48fec){_0x4a77a3['push'](_0x4a77a3['shift']());}}}(a54_0x2396,0x365a2));import{updateRuntimeAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';function a54_0x4e3e(_0x259818,_0x2030be){_0x259818=_0x259818-0xf6;const _0x239690=a54_0x2396();let _0x4e3e46=_0x239690[_0x259818];return _0x4e3e46;}import{assertCustomRuntimeRole,getRuntimeRoleById,projectRuntimeRole,ROLE_ID_FLAG,runtimeRoleWriteResult}from'../../commands/role/shared.js';function updateFields(_0xd5ceb8){const _0x1016c4=a54_0x4e3e,_0x3599ec=_0xd5ceb8[_0x1016c4(0xf9)]('name')!==undefined,_0x167b6a=_0xd5ceb8['flag'](_0x1016c4(0xf8))!==undefined;if(!_0x3599ec&&!_0x167b6a)throw CliErrors[_0x1016c4(0x114)](_0x1016c4(0x100));const _0xe10b1c=_0xd5ceb8['str'](_0x1016c4(0xfc))['trim'](),_0x334a9f=_0xd5ceb8[_0x1016c4(0x105)](_0x1016c4(0xf8))[_0x1016c4(0x10f)]();if(_0x3599ec&&!_0xe10b1c)throw CliErrors['validation'](_0x1016c4(0xf7));if(_0x167b6a&&!_0x334a9f)throw CliErrors[_0x1016c4(0x114)]('--remark\x20must\x20not\x20be\x20blank.',_0x1016c4(0xfb));return{..._0x3599ec?{'roleName':_0xe10b1c}:{},..._0x167b6a?{'remark':_0x334a9f}:{}};}async function prepare(_0x2a0496){const _0x39cc04=a54_0x4e3e,_0x11aaa9=await getRuntimeRoleById(_0x2a0496[_0x39cc04(0x109)],_0x2a0496[_0x39cc04(0x10c)]('id'));return assertCustomRuntimeRole(_0x11aaa9,_0x39cc04(0x101)),{'role':_0x11aaa9,'body':{'id':_0x11aaa9['id'],'appCode':_0x2a0496['appCode'],...updateFields(_0x2a0496)}};}export const roleUpdate={'service':a54_0x45ac2a(0xff),'command':'update','description':'Update\x20a\x20runtime\x20CUSTOM\x20role','risk':a54_0x45ac2a(0x107),'confirmationDescription':a54_0x45ac2a(0x10a),'flags':[ROLE_ID_FLAG,{'name':a54_0x45ac2a(0xfc),'type':'string','description':a54_0x45ac2a(0xfe)},{'name':a54_0x45ac2a(0xf8),'type':'string','description':'New\x20non-empty\x20role\x20remark'}],async 'validate'(_0x1636f0){updateFields(_0x1636f0);},async 'dryRun'(_0x538185){const _0x3c8f9a=a54_0x45ac2a,{body:_0x1300bd}=await prepare(_0x538185);return dryRun(_0x3c8f9a(0xfa),'/client/permit/role/update')[_0x3c8f9a(0x111)](_0x1300bd)[_0x3c8f9a(0x10d)](_0x3c8f9a(0x108))[_0x3c8f9a(0x103)]();},async 'execute'(_0x1bd7ef){const _0x33ad5d=a54_0x45ac2a,{role:_0x3fe476,body:_0x4ab5e1}=await prepare(_0x1bd7ef),_0x3b330b=await updateRuntimeAppRole(_0x4ab5e1);return{'ok':!![],'data':runtimeRoleWriteResult(_0x33ad5d(0x101),{'roleId':_0x3fe476['id']},projectRuntimeRole(_0x3fe476),projectRuntimeRole(_0x3b330b),{'method':_0x33ad5d(0xfa),'path':'/client/permit/role/update'})};}};
@@ -1 +1 @@
1
- const a55_0x390124=a55_0x4a3f;function a55_0x4a3f(_0x2b463d,_0x56d973){_0x2b463d=_0x2b463d-0x86;const _0x5ac73c=a55_0x5ac7();let _0x4a3f36=_0x5ac73c[_0x2b463d];return _0x4a3f36;}(function(_0x2667bd,_0x330d9c){const _0x35072c=a55_0x4a3f,_0x350ad6=_0x2667bd();while(!![]){try{const _0x57ec04=-parseInt(_0x35072c(0x87))/0x1+parseInt(_0x35072c(0x93))/0x2+parseInt(_0x35072c(0x94))/0x3+-parseInt(_0x35072c(0x86))/0x4+parseInt(_0x35072c(0x9a))/0x5+parseInt(_0x35072c(0x91))/0x6*(-parseInt(_0x35072c(0x9e))/0x7)+-parseInt(_0x35072c(0x98))/0x8;if(_0x57ec04===_0x330d9c)break;else _0x350ad6['push'](_0x350ad6['shift']());}catch(_0x3baf54){_0x350ad6['push'](_0x350ad6['shift']());}}}(a55_0x5ac7,0xbe098));function a55_0x5ac7(){const _0x436fb2=['appCode','user-add','/client/permit/user-role/update-user-list','49400GhbqIK','description','899425QirqpG','build','high-risk-write','把指定运行用户加入目标角色;该用户将获得该角色对应的运行权限。','112TiDMjo','796428GnfZgz','910379ufiCIn','POST','after','warnings','roleList','Add\x20a\x20numeric\x20userId\x20to\x20one\x20runtime\x20role','role','body','shouldWrite','Preview:\x20add\x20runtime\x20role\x20member','197130nBvTRr','userId','1594200eIqFXY','4328244edoXVC'];a55_0x5ac7=function(){return _0x436fb2;};return a55_0x5ac7();}import{updateRuntimeRoleUsers}from'../../core/api-client.js';import{dryRun}from'../../framework/dryrun.js';import{EXPECT_USER_COUNT_FLAG,prepareRuntimeMemberMutation,ROLE_REF_FLAG,runtimeRoleWriteResult,USER_ID_FLAG}from'../../commands/role/shared.js';export const roleUserAdd={'service':a55_0x390124(0x8d),'command':'user-add','description':a55_0x390124(0x8c),'risk':a55_0x390124(0x9c),'confirmationDescription':a55_0x390124(0x9d),'flags':[ROLE_REF_FLAG,USER_ID_FLAG,EXPECT_USER_COUNT_FLAG],async 'dryRun'(_0x58a105){const _0x48d096=a55_0x390124,_0x10a1c5=await prepareRuntimeMemberMutation(_0x58a105,'user-add');return dryRun(_0x48d096(0x88),_0x48d096(0x97))[_0x48d096(0x8e)]({'appCode':_0x58a105[_0x48d096(0x95)],'roleList':_0x10a1c5[_0x48d096(0x8b)]})[_0x48d096(0x99)](_0x10a1c5[_0x48d096(0x8f)]?_0x48d096(0x90):_0x10a1c5[_0x48d096(0x8a)][0x0])[_0x48d096(0x9b)]();},async 'execute'(_0x2007ea){const _0x4d42d6=a55_0x390124,_0x39da05=await prepareRuntimeMemberMutation(_0x2007ea,_0x4d42d6(0x96));return _0x39da05[_0x4d42d6(0x8f)]&&await updateRuntimeRoleUsers(_0x2007ea[_0x4d42d6(0x95)],_0x39da05[_0x4d42d6(0x8b)]),{'ok':!![],'data':runtimeRoleWriteResult('user-add',{'roleId':_0x39da05[_0x4d42d6(0x8d)]['id'],'userId':_0x39da05[_0x4d42d6(0x92)]},_0x39da05['before'],_0x39da05[_0x4d42d6(0x89)],{'method':_0x4d42d6(0x88),'path':_0x4d42d6(0x97)},_0x39da05[_0x4d42d6(0x8a)])};}};
1
+ function a55_0x24ba(){const _0x446a9d=['description','7VWGTIc','warnings','build','902332GBbpcP','52136FFpNpb','after','16703028qaGJsb','5235304JQTyoB','POST','roleList','role','user-add','6nbaLWB','high-risk-write','userId','5175035xuLawh','appCode','2585862ODFIUY','把指定运行用户加入目标角色;该用户将获得该角色对应的运行权限。','863242nXQEqV','shouldWrite','Add\x20a\x20numeric\x20userId\x20to\x20one\x20runtime\x20role','/client/permit/user-role/update-user-list'];a55_0x24ba=function(){return _0x446a9d;};return a55_0x24ba();}function a55_0x4616(_0x51930b,_0x511f2a){_0x51930b=_0x51930b-0x1ee;const _0x24bacf=a55_0x24ba();let _0x461602=_0x24bacf[_0x51930b];return _0x461602;}const a55_0x6eb1c1=a55_0x4616;(function(_0x504ef9,_0x81cfcd){const _0x5bb293=a55_0x4616,_0x1ec5ad=_0x504ef9();while(!![]){try{const _0x589e12=parseInt(_0x5bb293(0x1f2))/0x1+parseInt(_0x5bb293(0x202))/0x2+parseInt(_0x5bb293(0x200))/0x3+-parseInt(_0x5bb293(0x1f3))/0x4+parseInt(_0x5bb293(0x1fe))/0x5*(parseInt(_0x5bb293(0x1fb))/0x6)+parseInt(_0x5bb293(0x1ef))/0x7*(-parseInt(_0x5bb293(0x1f6))/0x8)+-parseInt(_0x5bb293(0x1f5))/0x9;if(_0x589e12===_0x81cfcd)break;else _0x1ec5ad['push'](_0x1ec5ad['shift']());}catch(_0x52cf12){_0x1ec5ad['push'](_0x1ec5ad['shift']());}}}(a55_0x24ba,0xacbf7));import{updateRuntimeRoleUsers}from'../../core/api-client.js';import{dryRun}from'../../framework/dryrun.js';import{EXPECT_USER_COUNT_FLAG,prepareRuntimeMemberMutation,ROLE_REF_FLAG,runtimeRoleWriteResult,USER_ID_FLAG}from'../../commands/role/shared.js';export const roleUserAdd={'service':a55_0x6eb1c1(0x1f9),'command':a55_0x6eb1c1(0x1fa),'description':a55_0x6eb1c1(0x204),'risk':a55_0x6eb1c1(0x1fc),'confirmationDescription':a55_0x6eb1c1(0x201),'flags':[ROLE_REF_FLAG,USER_ID_FLAG,EXPECT_USER_COUNT_FLAG],async 'dryRun'(_0x290d44){const _0x5653b4=a55_0x6eb1c1,_0x5279b7=await prepareRuntimeMemberMutation(_0x290d44,_0x5653b4(0x1fa));return dryRun(_0x5653b4(0x1f7),_0x5653b4(0x205))['body']({'appCode':_0x290d44[_0x5653b4(0x1ff)],'roleList':_0x5279b7['roleList']})[_0x5653b4(0x1ee)](_0x5279b7[_0x5653b4(0x203)]?'Preview:\x20add\x20runtime\x20role\x20member':_0x5279b7[_0x5653b4(0x1f0)][0x0])[_0x5653b4(0x1f1)]();},async 'execute'(_0x9a9fc6){const _0x389d4d=a55_0x6eb1c1,_0x548b3f=await prepareRuntimeMemberMutation(_0x9a9fc6,_0x389d4d(0x1fa));return _0x548b3f['shouldWrite']&&await updateRuntimeRoleUsers(_0x9a9fc6[_0x389d4d(0x1ff)],_0x548b3f[_0x389d4d(0x1f8)]),{'ok':!![],'data':runtimeRoleWriteResult('user-add',{'roleId':_0x548b3f[_0x389d4d(0x1f9)]['id'],'userId':_0x548b3f[_0x389d4d(0x1fd)]},_0x548b3f['before'],_0x548b3f[_0x389d4d(0x1f4)],{'method':_0x389d4d(0x1f7),'path':'/client/permit/user-role/update-user-list'},_0x548b3f[_0x389d4d(0x1f0)])};}};
@@ -1 +1 @@
1
- const a56_0xa41b07=a56_0x37f8;(function(_0x598283,_0x41f029){const _0x5a0a68=a56_0x37f8,_0xa73143=_0x598283();while(!![]){try{const _0x570bd3=-parseInt(_0x5a0a68(0xa1))/0x1*(parseInt(_0x5a0a68(0xac))/0x2)+parseInt(_0x5a0a68(0xa0))/0x3+-parseInt(_0x5a0a68(0xb3))/0x4*(-parseInt(_0x5a0a68(0xae))/0x5)+parseInt(_0x5a0a68(0xa5))/0x6*(-parseInt(_0x5a0a68(0xb2))/0x7)+parseInt(_0x5a0a68(0xad))/0x8*(-parseInt(_0x5a0a68(0xab))/0x9)+-parseInt(_0x5a0a68(0xaf))/0xa*(-parseInt(_0x5a0a68(0xb7))/0xb)+parseInt(_0x5a0a68(0xa4))/0xc;if(_0x570bd3===_0x41f029)break;else _0xa73143['push'](_0xa73143['shift']());}catch(_0x2841f2){_0xa73143['push'](_0xa73143['shift']());}}}(a56_0x33ca,0x5f481));function a56_0x33ca(){const _0x155462=['55565bCwcCK','305240MmLEbo','build','userId','8806brmxZE','52KxMNfW','roleList','user-remove','POST','187QEaSpD','body','/client/permit/user-role/update-user-list','825744cvxmOv','3023sMSMgU','appCode','Remove\x20a\x20numeric\x20userId\x20from\x20one\x20runtime\x20role','4391844NzJcbW','2694glsVdS','role','before','description','shouldWrite','warnings','9YpxPIK','42IPgijl','2288112ZsYlkO'];a56_0x33ca=function(){return _0x155462;};return a56_0x33ca();}function a56_0x37f8(_0x1f6f76,_0x5a2cb4){_0x1f6f76=_0x1f6f76-0x9f;const _0x33ca49=a56_0x33ca();let _0x37f88d=_0x33ca49[_0x1f6f76];return _0x37f88d;}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':'role','command':a56_0xa41b07(0xb5),'description':a56_0xa41b07(0xa3),'risk':'high-risk-write','confirmationDescription':'把指定运行用户移出目标角色;该用户将失去仅由该角色授予的运行权限。','flags':[ROLE_REF_FLAG,USER_ID_FLAG,EXPECT_USER_COUNT_FLAG],async 'dryRun'(_0x1f4635){const _0x1e8c3f=a56_0xa41b07,_0x4bf481=await prepareRuntimeMemberMutation(_0x1f4635,_0x1e8c3f(0xb5));return dryRun(_0x1e8c3f(0xb6),_0x1e8c3f(0x9f))[_0x1e8c3f(0xb8)]({'appCode':_0x1f4635[_0x1e8c3f(0xa2)],'roleList':_0x4bf481[_0x1e8c3f(0xb4)]})[_0x1e8c3f(0xa8)](_0x4bf481[_0x1e8c3f(0xa9)]?'Preview:\x20remove\x20runtime\x20role\x20member':_0x4bf481[_0x1e8c3f(0xaa)][0x0])[_0x1e8c3f(0xb0)]();},async 'execute'(_0x38a761){const _0x13ee1a=a56_0xa41b07,_0x328784=await prepareRuntimeMemberMutation(_0x38a761,_0x13ee1a(0xb5));return _0x328784['shouldWrite']&&await updateRuntimeRoleUsers(_0x38a761[_0x13ee1a(0xa2)],_0x328784[_0x13ee1a(0xb4)]),{'ok':!![],'data':runtimeRoleWriteResult(_0x13ee1a(0xb5),{'roleId':_0x328784[_0x13ee1a(0xa6)]['id'],'userId':_0x328784[_0x13ee1a(0xb1)]},_0x328784[_0x13ee1a(0xa7)],_0x328784['after'],{'method':_0x13ee1a(0xb6),'path':_0x13ee1a(0x9f)},_0x328784[_0x13ee1a(0xaa)])};}};
1
+ function a56_0x28b9(){const _0xd40dd9=['high-risk-write','Preview:\x20remove\x20runtime\x20role\x20member','113438ASEUnl','Remove\x20a\x20numeric\x20userId\x20from\x20one\x20runtime\x20role','appCode','POST','shouldWrite','296EEhksT','user-remove','warnings','7467nlHAmF','3243114VCiqVk','body','build','2712660lzMeFn','roleList','9598136iWDKBO','role','after','before','913507VmExpi','description','/client/permit/user-role/update-user-list','3779890AanIqt','把指定运行用户移出目标角色;该用户将失去仅由该角色授予的运行权限。','18pQgVHM'];a56_0x28b9=function(){return _0xd40dd9;};return a56_0x28b9();}const a56_0x110574=a56_0x1337;(function(_0x530cf7,_0x49e037){const _0x3687a0=a56_0x1337,_0x6ff73b=_0x530cf7();while(!![]){try{const _0x459303=-parseInt(_0x3687a0(0x126))/0x1+-parseInt(_0x3687a0(0x12b))/0x2*(-parseInt(_0x3687a0(0x12e))/0x3)+-parseInt(_0x3687a0(0x132))/0x4+-parseInt(_0x3687a0(0x121))/0x5+-parseInt(_0x3687a0(0x12f))/0x6+-parseInt(_0x3687a0(0x138))/0x7+parseInt(_0x3687a0(0x134))/0x8*(parseInt(_0x3687a0(0x123))/0x9);if(_0x459303===_0x49e037)break;else _0x6ff73b['push'](_0x6ff73b['shift']());}catch(_0xbc721a){_0x6ff73b['push'](_0x6ff73b['shift']());}}}(a56_0x28b9,0x861b9));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 a56_0x1337(_0x1bbd31,_0x280eca){_0x1bbd31=_0x1bbd31-0x121;const _0x28b90b=a56_0x28b9();let _0x133798=_0x28b90b[_0x1bbd31];return _0x133798;}export const roleUserRemove={'service':a56_0x110574(0x135),'command':'user-remove','description':a56_0x110574(0x127),'risk':a56_0x110574(0x124),'confirmationDescription':a56_0x110574(0x122),'flags':[ROLE_REF_FLAG,USER_ID_FLAG,EXPECT_USER_COUNT_FLAG],async 'dryRun'(_0x19d12a){const _0x5da049=a56_0x110574,_0x94121b=await prepareRuntimeMemberMutation(_0x19d12a,_0x5da049(0x12c));return dryRun('POST',_0x5da049(0x13a))[_0x5da049(0x130)]({'appCode':_0x19d12a['appCode'],'roleList':_0x94121b['roleList']})[_0x5da049(0x139)](_0x94121b[_0x5da049(0x12a)]?_0x5da049(0x125):_0x94121b[_0x5da049(0x12d)][0x0])[_0x5da049(0x131)]();},async 'execute'(_0x5b7d2f){const _0x228372=a56_0x110574,_0x14ec19=await prepareRuntimeMemberMutation(_0x5b7d2f,_0x228372(0x12c));return _0x14ec19['shouldWrite']&&await updateRuntimeRoleUsers(_0x5b7d2f[_0x228372(0x128)],_0x14ec19[_0x228372(0x133)]),{'ok':!![],'data':runtimeRoleWriteResult(_0x228372(0x12c),{'roleId':_0x14ec19['role']['id'],'userId':_0x14ec19['userId']},_0x14ec19[_0x228372(0x137)],_0x14ec19[_0x228372(0x136)],{'method':_0x228372(0x129),'path':_0x228372(0x13a)},_0x14ec19[_0x228372(0x12d)])};}};