@lovrabet/lovrabet-cli 2.3.2-beta.3 → 2.3.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 (166) 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/init.js +1 -1
  25. package/lib/commands/config/shared.js +1 -1
  26. package/lib/commands/data/index.js +1 -1
  27. package/lib/commands/dataset/detail.js +1 -1
  28. package/lib/commands/dataset/index.js +1 -1
  29. package/lib/commands/dataset/list.js +1 -1
  30. package/lib/commands/dataset/sdk-doc.js +1 -1
  31. package/lib/commands/doctor.js +1 -1
  32. package/lib/commands/file/index.js +1 -1
  33. package/lib/commands/init.js +1 -1
  34. package/lib/commands/kb/index.js +1 -1
  35. package/lib/commands/logs/index.js +1 -1
  36. package/lib/commands/notification/config-list.js +1 -1
  37. package/lib/commands/notification/index.js +1 -1
  38. package/lib/commands/notification/shared.js +1 -1
  39. package/lib/commands/ocr/index.js +1 -1
  40. package/lib/commands/permit/dataset-get.js +1 -1
  41. package/lib/commands/permit/dataset-set.js +1 -1
  42. package/lib/commands/permit/index.js +1 -1
  43. package/lib/commands/permit/page-get.js +1 -1
  44. package/lib/commands/permit/page-set.js +1 -1
  45. package/lib/commands/permit/role-menus-set.js +1 -1
  46. package/lib/commands/permit/role-menus.js +1 -1
  47. package/lib/commands/permit/shared.js +1 -1
  48. package/lib/commands/personal-bff/index.js +1 -1
  49. package/lib/commands/registry.js +1 -1
  50. package/lib/commands/role/create.js +1 -1
  51. package/lib/commands/role/delete.js +1 -1
  52. package/lib/commands/role/detail.js +1 -1
  53. package/lib/commands/role/index.js +1 -1
  54. package/lib/commands/role/list.js +1 -1
  55. package/lib/commands/role/shared.js +1 -1
  56. package/lib/commands/role/update.js +1 -1
  57. package/lib/commands/role/user-add.js +1 -1
  58. package/lib/commands/role/user-remove.js +1 -1
  59. package/lib/commands/schedule/index.js +1 -1
  60. package/lib/commands/schema.js +1 -1
  61. package/lib/commands/service/dynamic.js +1 -1
  62. package/lib/commands/service/function-name-adapter.js +1 -1
  63. package/lib/commands/service/index.js +1 -1
  64. package/lib/commands/service/registry.js +1 -1
  65. package/lib/commands/skill/commands/create.js +1 -1
  66. package/lib/commands/skill/commands/diagram.js +1 -1
  67. package/lib/commands/skill/commands/install.js +1 -1
  68. package/lib/commands/skill/commands/list.js +1 -1
  69. package/lib/commands/skill/commands/push.js +1 -1
  70. package/lib/commands/skill/commands/validate.js +1 -1
  71. package/lib/commands/skill/diagram.js +1 -1
  72. package/lib/commands/skill/flags.js +1 -1
  73. package/lib/commands/skill/index.js +1 -1
  74. package/lib/commands/skill/manifest-helpers.js +1 -1
  75. package/lib/commands/skill/push-execute.js +1 -1
  76. package/lib/commands/skill/push-flow-helpers.js +1 -1
  77. package/lib/commands/skill/push-retarget.js +1 -1
  78. package/lib/commands/skill/scopes.js +1 -1
  79. package/lib/commands/skill/summary.js +1 -1
  80. package/lib/commands/skill/templates.js +1 -1
  81. package/lib/commands/skill/validate.js +1 -1
  82. package/lib/commands/sql/detail.js +1 -1
  83. package/lib/commands/sql/exec.js +1 -1
  84. package/lib/commands/sql/index.js +1 -1
  85. package/lib/commands/update.js +1 -1
  86. package/lib/commands/user-account/bind.js +1 -1
  87. package/lib/commands/user-account/index.js +1 -1
  88. package/lib/commands/workspace/index.js +1 -1
  89. package/lib/config/domain-config.js +1 -1
  90. package/lib/config/schema.js +1 -1
  91. package/lib/constant/app.js +1 -1
  92. package/lib/constant/auth-mode.js +1 -1
  93. package/lib/constant/cli.js +1 -1
  94. package/lib/constant/defaults.js +1 -1
  95. package/lib/constant/distribution.js +1 -1
  96. package/lib/constant/domain.js +1 -1
  97. package/lib/constant/env.js +1 -1
  98. package/lib/constant/output.js +1 -1
  99. package/lib/constant/product.js +1 -1
  100. package/lib/constant/region.js +1 -1
  101. package/lib/constant/risk.js +1 -1
  102. package/lib/constant/url.js +1 -1
  103. package/lib/context.js +1 -1
  104. package/lib/core/api-client.js +1 -1
  105. package/lib/core/db-resolver.js +1 -1
  106. package/lib/core/kb-search-client.js +1 -1
  107. package/lib/core/sdk-client.js +1 -1
  108. package/lib/errors.js +1 -1
  109. package/lib/framework/build-all-flags.js +1 -1
  110. package/lib/framework/dryrun.js +1 -1
  111. package/lib/framework/flags.js +1 -1
  112. package/lib/framework/help.js +1 -1
  113. package/lib/framework/index.js +1 -1
  114. package/lib/framework/output.js +1 -1
  115. package/lib/framework/preparse.js +1 -1
  116. package/lib/framework/rate-limit.js +1 -1
  117. package/lib/framework/raw-flags.js +1 -1
  118. package/lib/framework/response.js +1 -1
  119. package/lib/framework/runner-confirmation.js +1 -1
  120. package/lib/framework/runner-error.js +1 -1
  121. package/lib/framework/runner.js +1 -1
  122. package/lib/framework/schema-export.js +1 -1
  123. package/lib/framework/service-order.js +1 -1
  124. package/lib/framework/types.js +1 -1
  125. package/lib/generated/build-info.d.ts +4 -4
  126. package/lib/generated/build-info.js +1 -1
  127. package/lib/generated/official-routing.js +1 -1
  128. package/lib/generated/routing-contract.js +1 -1
  129. package/lib/help.js +1 -1
  130. package/lib/postinstall.js +1 -1
  131. package/lib/runtime/confirmation.js +1 -1
  132. package/lib/runtime/event.js +1 -1
  133. package/lib/runtime/index.js +1 -1
  134. package/lib/runtime/queue.js +1 -1
  135. package/lib/runtime/resolve.js +1 -1
  136. package/lib/skills/builtin-skill.js +1 -1
  137. package/lib/skills/npx-skills-add.js +1 -1
  138. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  139. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  140. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  141. package/lib/skills/runtime-skill-sync/install-target.js +1 -1
  142. package/lib/skills/runtime-skill-sync/links.js +1 -1
  143. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  144. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  145. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  146. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  147. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  148. package/lib/skills/runtime-skill-sync/push.js +1 -1
  149. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  150. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  151. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  152. package/lib/skills/runtime-skill-sync.js +1 -1
  153. package/lib/skills/skill-presence.js +1 -1
  154. package/lib/utils/access-key-redaction.js +1 -1
  155. package/lib/utils/apply-jq-filter.js +1 -1
  156. package/lib/utils/cli-version-check.js +1 -1
  157. package/lib/utils/cli-version-policy.js +1 -1
  158. package/lib/utils/logger.js +1 -1
  159. package/lib/utils/lossless-json.js +1 -1
  160. package/lib/utils/params.js +1 -1
  161. package/lib/utils/update-notice.js +1 -1
  162. package/lib/utils/version.js +1 -1
  163. package/lib/utils/write-cli-side-channel.js +1 -1
  164. package/package.json +1 -1
  165. package/skills/lovrabet/SKILL.md +1 -1
  166. package/skills/lovrabet.manifest.json +3 -3
@@ -1 +1 @@
1
- const a40_0xb2bec6=a40_0x3491;function a40_0x3491(_0x213bce,_0x35185f){_0x213bce=_0x213bce-0x125;const _0x3b53e2=a40_0x3b53();let _0x3491c9=_0x3b53e2[_0x213bce];return _0x3491c9;}(function(_0x49b5ba,_0xce6328){const _0x2c644f=a40_0x3491,_0x2bccba=_0x49b5ba();while(!![]){try{const _0x2accdb=parseInt(_0x2c644f(0x14c))/0x1*(-parseInt(_0x2c644f(0x151))/0x2)+parseInt(_0x2c644f(0x134))/0x3+parseInt(_0x2c644f(0x13f))/0x4+-parseInt(_0x2c644f(0x14a))/0x5*(parseInt(_0x2c644f(0x140))/0x6)+-parseInt(_0x2c644f(0x12d))/0x7*(-parseInt(_0x2c644f(0x144))/0x8)+-parseInt(_0x2c644f(0x15f))/0x9+-parseInt(_0x2c644f(0x147))/0xa;if(_0x2accdb===_0xce6328)break;else _0x2bccba['push'](_0x2bccba['shift']());}catch(_0x136398){_0x2bccba['push'](_0x2bccba['shift']());}}}(a40_0x3b53,0x60616));function a40_0x3b53(){const _0x29b841=['resourceType','appCode','2264004gBKmDF','DATA_DELETE','DATA_ROW','includes','join','bool','string','Comma-separated\x20runtime\x20dataset\x20codes','find','resourceName','datasetCode','1158944OYWIzb','6PbSvFd','validation','permit','high-risk-write','696qvDRza','DATA_DETAIL','permitList','3218000BZcVNN','revoke','rolePermit','232905AZEvRk','Dataset\x20','15027ZSPqUV','permitId','datasetCodes','--actions','dataPermitList','34GtAYRP','operation','actions','DATA_CREATE','\x20for\x20role\x20','grant','push','Runtime\x20dataset\x20','DATA_UPDATE','length','build','description','--datasets','after','6384924wZusOn','/client/permit/resource/batch-save-dataset','Preview:\x20','filter','Comma-separated\x20actions:\x20','warnings','datasets','\x20was\x20not\x20found.','dataset-','\x20does\x20not\x20expose\x20','55006StmCTj','roles','dataset-set','role','str'];a40_0x3b53=function(){return _0x29b841;};return a40_0x3b53();}import{listRuntimeDatasetRolePermits,listRuntimePermitRoles,saveRuntimeDatasetRolePermits}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,GRANT_FLAG,REVOKE_FLAG,ROLE_REF_FLAG,runtimePermitWriteResult,splitRefs}from'../../commands/permit/shared.js';const DATA_ACTIONS=[a40_0xb2bec6(0x154),a40_0xb2bec6(0x159),a40_0xb2bec6(0x135),a40_0xb2bec6(0x145),'DATA_EXPORT',a40_0xb2bec6(0x136)],DATASETS_FLAG={'name':a40_0xb2bec6(0x129),'type':a40_0xb2bec6(0x13a),'required':!![],'description':a40_0xb2bec6(0x13b)},ACTIONS_FLAG={'name':'actions','type':a40_0xb2bec6(0x13a),'required':!![],'description':a40_0xb2bec6(0x127)+DATA_ACTIONS[a40_0xb2bec6(0x138)](',\x20')};async function prepare(_0x36240c){const _0x355051=a40_0xb2bec6;await assertRuntimePermissionManager(_0x36240c['appCode']);const _0x4e3a3c=assertGrantOrRevoke(_0x36240c[_0x355051(0x139)](_0x355051(0x156)),_0x36240c['bool']('revoke')),_0x37a108=await resolveRuntimeRoleRef(_0x36240c[_0x355051(0x133)],_0x36240c[_0x355051(0x131)]('role'));assertRuntimePermitRoleConfigurable(_0x37a108);const _0x5b375c=splitRefs(_0x36240c[_0x355051(0x131)](_0x355051(0x129)),_0x355051(0x15d)),_0x480f36=[...new Set(splitRefs(_0x36240c[_0x355051(0x131)](_0x355051(0x153)),_0x355051(0x14f))['map'](_0x4c59bb=>_0x4c59bb['toUpperCase']()))],_0x23a215=_0x480f36[_0x355051(0x126)](_0x1c49a3=>!DATA_ACTIONS[_0x355051(0x137)](_0x1c49a3));if(_0x23a215[_0x355051(0x15a)]>0x0)throw CliErrors[_0x355051(0x141)]('Invalid\x20dataset\x20actions:\x20'+_0x23a215[_0x355051(0x138)](',\x20')+'.');const _0x9e3b6f=await listRuntimeDatasetRolePermits(_0x36240c[_0x355051(0x133)]),_0x51dfe7=await listRuntimePermitRoles(_0x36240c[_0x355051(0x133)]),_0x4e45f6=[],_0x187144=[],_0x563938=[],_0x200d39=[];for(const _0x3aa7de of _0x5b375c){const _0x159881=_0x9e3b6f[_0x355051(0x13c)](_0xae1c61=>_0xae1c61[_0x355051(0x13e)]===_0x3aa7de);if(!_0x159881)throw CliErrors[_0x355051(0x141)](_0x355051(0x158)+_0x3aa7de+_0x355051(0x12a));for(const _0x296724 of _0x480f36){const _0x16db6a=_0x159881[_0x355051(0x150)][_0x355051(0x13c)](_0x4e6cae=>_0x4e6cae[_0x355051(0x132)]===_0x296724);if(!_0x16db6a)throw CliErrors['validation'](_0x355051(0x14b)+_0x3aa7de+_0x355051(0x12c)+_0x296724+'.');const _0x6313bf=applyRuntimeRolePermission(_0x16db6a[_0x355051(0x149)],_0x37a108,_0x51dfe7,_0x4e3a3c);_0x187144[_0x355051(0x157)]({'datasetCode':_0x3aa7de,'resourceType':_0x296724,'rolePermit':_0x16db6a[_0x355051(0x149)]}),_0x563938['push']({'datasetCode':_0x3aa7de,'resourceType':_0x296724,'rolePermit':_0x6313bf[_0x355051(0x12e)]}),_0x6313bf['changed']?_0x4e45f6[_0x355051(0x157)]({..._0x16db6a[_0x355051(0x14d)]!=null?{'id':_0x16db6a[_0x355051(0x14d)]}:{},'appCode':_0x36240c[_0x355051(0x133)],'resourceCode':_0x3aa7de,'resourceType':_0x296724,'resourceName':_0x16db6a[_0x355051(0x13d)],'rolePermit':_0x6313bf[_0x355051(0x12e)]}):_0x200d39[_0x355051(0x157)](_0x3aa7de+'/'+_0x296724+'\x20already\x20reflects\x20'+_0x4e3a3c+_0x355051(0x155)+_0x37a108['id']+'.');}}return{'operation':_0x4e3a3c,'role':_0x37a108,'datasetCodes':_0x5b375c,'actions':_0x480f36,'permitList':_0x4e45f6,'before':_0x187144,'after':_0x563938,'warnings':_0x200d39};}export const permitDatasetSet={'service':a40_0xb2bec6(0x142),'command':a40_0xb2bec6(0x12f),'description':'Grant\x20or\x20revoke\x20selected\x20runtime\x20dataset\x20actions\x20for\x20one\x20role','risk':a40_0xb2bec6(0x143),'confirmationDescription':'Grants\x20or\x20revokes\x20the\x20target\x20role\x20permission\x20for\x20the\x20given\x20dataset\x20actions.\x20Data\x20operations\x20for\x20users\x20in\x20that\x20role\x20will\x20change.','flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,DATASETS_FLAG,ACTIONS_FLAG],async 'validate'(_0x82f21c){const _0x9764f0=a40_0xb2bec6;assertGrantOrRevoke(_0x82f21c[_0x9764f0(0x139)](_0x9764f0(0x156)),_0x82f21c['bool'](_0x9764f0(0x148)));},async 'dryRun'(_0x13315e){const _0x2881ea=a40_0xb2bec6,_0x1372f1=await prepare(_0x13315e);return dryRun('POST','/client/permit/resource/batch-save-dataset')['body']({'appCode':_0x13315e['appCode'],'permitList':_0x1372f1[_0x2881ea(0x146)]})[_0x2881ea(0x15c)](_0x2881ea(0x125)+_0x1372f1['operation']+'\x20selected\x20runtime\x20dataset\x20actions')[_0x2881ea(0x15b)]();},async 'execute'(_0x1afd67){const _0x481607=a40_0xb2bec6,_0x19efe3=await prepare(_0x1afd67);return _0x19efe3[_0x481607(0x146)][_0x481607(0x15a)]>0x0&&await saveRuntimeDatasetRolePermits(_0x1afd67['appCode'],_0x19efe3[_0x481607(0x146)]),{'ok':!![],'data':runtimePermitWriteResult(_0x481607(0x12b)+_0x19efe3[_0x481607(0x152)],{'roleId':_0x19efe3[_0x481607(0x130)]['id'],'datasetCodes':_0x19efe3[_0x481607(0x14e)],'actions':_0x19efe3['actions']},_0x19efe3['before'],_0x19efe3[_0x481607(0x15e)],{'method':'POST','path':_0x481607(0x160)},_0x19efe3[_0x481607(0x128)])};}};
1
+ function a40_0x53c7(){const _0x325770=['length','filter','\x20does\x20not\x20expose\x20','\x20was\x20not\x20found.','string','27594jqMHoD','dataset-set','DATA_ROW','str','actions','/client/permit/resource/batch-save-dataset','join','11627143MgWmoR','--actions','datasets','permitId','appCode','60MEUvjJ','description','push','--datasets','permit','Grants\x20or\x20revokes\x20the\x20target\x20role\x20permission\x20for\x20the\x20given\x20dataset\x20actions.\x20Data\x20operations\x20for\x20users\x20in\x20that\x20role\x20will\x20change.','Dataset\x20','DATA_UPDATE','body','30IAAGLD','844670RaSGBU','operation','changed','build','validation','datasetCode','datasetCodes','role','\x20selected\x20runtime\x20dataset\x20actions','toUpperCase','52905hPQrxF','dataset-','27nnBbPn','Comma-separated\x20runtime\x20dataset\x20codes','POST','rolePermit','171YLSeIU','before','493064oIlLCb','DATA_EXPORT','revoke','DATA_DELETE','bool','Preview:\x20','6014vMHPmQ','dataPermitList','Grant\x20or\x20revoke\x20selected\x20runtime\x20dataset\x20actions\x20for\x20one\x20role','permitList','resourceName','2424331OrNnxa','Invalid\x20dataset\x20actions:\x20','roles','includes'];a40_0x53c7=function(){return _0x325770;};return a40_0x53c7();}const a40_0x13a6b5=a40_0x21e1;(function(_0x3b3c07,_0x9dfb3e){const _0x525695=a40_0x21e1,_0x28d768=_0x3b3c07();while(!![]){try{const _0x3b81ee=parseInt(_0x525695(0xf8))/0x1*(parseInt(_0x525695(0xc4))/0x2)+parseInt(_0x525695(0xf2))/0x3*(parseInt(_0x525695(0xde))/0x4)+parseInt(_0x525695(0xe7))/0x5*(parseInt(_0x525695(0xd2))/0x6)+parseInt(_0x525695(0xc9))/0x7+-parseInt(_0x525695(0xbe))/0x8+-parseInt(_0x525695(0xf4))/0x9*(-parseInt(_0x525695(0xe8))/0xa)+-parseInt(_0x525695(0xd9))/0xb;if(_0x3b81ee===_0x9dfb3e)break;else _0x28d768['push'](_0x28d768['shift']());}catch(_0x437e30){_0x28d768['push'](_0x28d768['shift']());}}}(a40_0x53c7,0x462ac));import{listRuntimeDatasetRolePermits,listRuntimePermitRoles,saveRuntimeDatasetRolePermits}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a40_0x21e1(_0x4204fa,_0x526229){_0x4204fa=_0x4204fa-0xbd;const _0x53c784=a40_0x53c7();let _0x21e19f=_0x53c784[_0x4204fa];return _0x21e19f;}import{dryRun}from'../../framework/dryrun.js';import{resolveRuntimeRoleRef}from'../../commands/role/shared.js';import{applyRuntimeRolePermission,assertGrantOrRevoke,assertRuntimePermissionManager,assertRuntimePermitRoleConfigurable,GRANT_FLAG,REVOKE_FLAG,ROLE_REF_FLAG,runtimePermitWriteResult,splitRefs}from'../../commands/permit/shared.js';const DATA_ACTIONS=['DATA_CREATE',a40_0x13a6b5(0xe5),a40_0x13a6b5(0xc1),'DATA_DETAIL',a40_0x13a6b5(0xbf),a40_0x13a6b5(0xd4)],DATASETS_FLAG={'name':a40_0x13a6b5(0xdb),'type':a40_0x13a6b5(0xd1),'required':!![],'description':a40_0x13a6b5(0xf5)},ACTIONS_FLAG={'name':'actions','type':'string','required':!![],'description':'Comma-separated\x20actions:\x20'+DATA_ACTIONS['join'](',\x20')};async function prepare(_0x4a3dea){const _0xf1f280=a40_0x13a6b5;await assertRuntimePermissionManager(_0x4a3dea[_0xf1f280(0xdd)]);const _0x35c79e=assertGrantOrRevoke(_0x4a3dea[_0xf1f280(0xc2)]('grant'),_0x4a3dea[_0xf1f280(0xc2)](_0xf1f280(0xc0))),_0x86ad7b=await resolveRuntimeRoleRef(_0x4a3dea[_0xf1f280(0xdd)],_0x4a3dea['str'](_0xf1f280(0xef)));assertRuntimePermitRoleConfigurable(_0x86ad7b);const _0x4fb010=splitRefs(_0x4a3dea[_0xf1f280(0xd5)](_0xf1f280(0xdb)),_0xf1f280(0xe1)),_0x4e7d93=[...new Set(splitRefs(_0x4a3dea[_0xf1f280(0xd5)](_0xf1f280(0xd6)),_0xf1f280(0xda))['map'](_0x29a23f=>_0x29a23f[_0xf1f280(0xf1)]()))],_0x153001=_0x4e7d93[_0xf1f280(0xce)](_0x467d3d=>!DATA_ACTIONS[_0xf1f280(0xcc)](_0x467d3d));if(_0x153001[_0xf1f280(0xcd)]>0x0)throw CliErrors[_0xf1f280(0xec)](_0xf1f280(0xca)+_0x153001[_0xf1f280(0xd8)](',\x20')+'.');const _0x52a64f=await listRuntimeDatasetRolePermits(_0x4a3dea[_0xf1f280(0xdd)]),_0x334bf2=await listRuntimePermitRoles(_0x4a3dea[_0xf1f280(0xdd)]),_0x1bbabf=[],_0x847963=[],_0x15c1bf=[],_0x181928=[];for(const _0x378164 of _0x4fb010){const _0x2533f1=_0x52a64f['find'](_0x5f1996=>_0x5f1996[_0xf1f280(0xed)]===_0x378164);if(!_0x2533f1)throw CliErrors[_0xf1f280(0xec)]('Runtime\x20dataset\x20'+_0x378164+_0xf1f280(0xd0));for(const _0x5e6ce6 of _0x4e7d93){const _0x234231=_0x2533f1[_0xf1f280(0xc5)]['find'](_0x2b0c35=>_0x2b0c35['resourceType']===_0x5e6ce6);if(!_0x234231)throw CliErrors['validation'](_0xf1f280(0xe4)+_0x378164+_0xf1f280(0xcf)+_0x5e6ce6+'.');const _0x1d9fdf=applyRuntimeRolePermission(_0x234231[_0xf1f280(0xf7)],_0x86ad7b,_0x334bf2,_0x35c79e);_0x847963[_0xf1f280(0xe0)]({'datasetCode':_0x378164,'resourceType':_0x5e6ce6,'rolePermit':_0x234231[_0xf1f280(0xf7)]}),_0x15c1bf[_0xf1f280(0xe0)]({'datasetCode':_0x378164,'resourceType':_0x5e6ce6,'rolePermit':_0x1d9fdf[_0xf1f280(0xcb)]}),_0x1d9fdf[_0xf1f280(0xea)]?_0x1bbabf['push']({..._0x234231['permitId']!=null?{'id':_0x234231[_0xf1f280(0xdc)]}:{},'appCode':_0x4a3dea['appCode'],'resourceCode':_0x378164,'resourceType':_0x5e6ce6,'resourceName':_0x234231[_0xf1f280(0xc8)],'rolePermit':_0x1d9fdf[_0xf1f280(0xcb)]}):_0x181928['push'](_0x378164+'/'+_0x5e6ce6+'\x20already\x20reflects\x20'+_0x35c79e+'\x20for\x20role\x20'+_0x86ad7b['id']+'.');}}return{'operation':_0x35c79e,'role':_0x86ad7b,'datasetCodes':_0x4fb010,'actions':_0x4e7d93,'permitList':_0x1bbabf,'before':_0x847963,'after':_0x15c1bf,'warnings':_0x181928};}export const permitDatasetSet={'service':a40_0x13a6b5(0xe2),'command':a40_0x13a6b5(0xd3),'description':a40_0x13a6b5(0xc6),'risk':'high-risk-write','confirmationDescription':a40_0x13a6b5(0xe3),'flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,DATASETS_FLAG,ACTIONS_FLAG],async 'validate'(_0x3458fe){const _0x171cfd=a40_0x13a6b5;assertGrantOrRevoke(_0x3458fe[_0x171cfd(0xc2)]('grant'),_0x3458fe[_0x171cfd(0xc2)](_0x171cfd(0xc0)));},async 'dryRun'(_0x2c6843){const _0x1734e9=a40_0x13a6b5,_0x2ec1f3=await prepare(_0x2c6843);return dryRun(_0x1734e9(0xf6),_0x1734e9(0xd7))[_0x1734e9(0xe6)]({'appCode':_0x2c6843[_0x1734e9(0xdd)],'permitList':_0x2ec1f3[_0x1734e9(0xc7)]})[_0x1734e9(0xdf)](_0x1734e9(0xc3)+_0x2ec1f3['operation']+_0x1734e9(0xf0))[_0x1734e9(0xeb)]();},async 'execute'(_0x433834){const _0x1ff0aa=a40_0x13a6b5,_0x21930b=await prepare(_0x433834);return _0x21930b[_0x1ff0aa(0xc7)][_0x1ff0aa(0xcd)]>0x0&&await saveRuntimeDatasetRolePermits(_0x433834[_0x1ff0aa(0xdd)],_0x21930b[_0x1ff0aa(0xc7)]),{'ok':!![],'data':runtimePermitWriteResult(_0x1ff0aa(0xf3)+_0x21930b[_0x1ff0aa(0xe9)],{'roleId':_0x21930b[_0x1ff0aa(0xef)]['id'],'datasetCodes':_0x21930b[_0x1ff0aa(0xee)],'actions':_0x21930b[_0x1ff0aa(0xd6)]},_0x21930b[_0x1ff0aa(0xbd)],_0x21930b['after'],{'method':_0x1ff0aa(0xf6),'path':_0x1ff0aa(0xd7)},_0x21930b['warnings'])};}};
@@ -1 +1 @@
1
- (function(_0x218097,_0xce82f0){const _0x33067c=a41_0x3b65,_0x1f0066=_0x218097();while(!![]){try{const _0x5d67df=parseInt(_0x33067c(0x142))/0x1+-parseInt(_0x33067c(0x140))/0x2+-parseInt(_0x33067c(0x144))/0x3+-parseInt(_0x33067c(0x13f))/0x4*(-parseInt(_0x33067c(0x146))/0x5)+parseInt(_0x33067c(0x143))/0x6*(-parseInt(_0x33067c(0x13e))/0x7)+-parseInt(_0x33067c(0x147))/0x8*(-parseInt(_0x33067c(0x145))/0x9)+-parseInt(_0x33067c(0x141))/0xa;if(_0x5d67df===_0xce82f0)break;else _0x1f0066['push'](_0x1f0066['shift']());}catch(_0x5c25bb){_0x1f0066['push'](_0x1f0066['shift']());}}}(a41_0x55b5,0x31392));function a41_0x3b65(_0x3ec03a,_0x14984b){_0x3ec03a=_0x3ec03a-0x13e;const _0x55b589=a41_0x55b5();let _0x3b655d=_0x55b589[_0x3ec03a];return _0x3b655d;}import{permitPageGet}from'../../commands/permit/page-get.js';import{permitPageSet}from'../../commands/permit/page-set.js';import{permitRoleMenus}from'../../commands/permit/role-menus.js';import{permitRoleMenusSet}from'../../commands/permit/role-menus-set.js';function a41_0x55b5(){const _0x67c880=['3826740VbhQjV','280516tUsGFn','48EzBbEG','502476zWHjHe','1568547CyUjrh','75ieCjoX','8sZeetT','63091NLzzBN','99672cMnQpy','9362RGOsMU'];a41_0x55b5=function(){return _0x67c880;};return a41_0x55b5();}import{permitDatasetGet}from'../../commands/permit/dataset-get.js';import{permitDatasetSet}from'../../commands/permit/dataset-set.js';export const permitDefinitions=[permitPageGet,permitPageSet,permitRoleMenus,permitRoleMenusSet,permitDatasetGet,permitDatasetSet];
1
+ (function(_0x5952ca,_0x55a6bc){const _0x330d4e=a41_0x4507,_0x407c2d=_0x5952ca();while(!![]){try{const _0x381dfe=parseInt(_0x330d4e(0xc7))/0x1*(parseInt(_0x330d4e(0xc3))/0x2)+parseInt(_0x330d4e(0xbd))/0x3*(parseInt(_0x330d4e(0xbf))/0x4)+-parseInt(_0x330d4e(0xc1))/0x5*(parseInt(_0x330d4e(0xc2))/0x6)+-parseInt(_0x330d4e(0xbc))/0x7*(-parseInt(_0x330d4e(0xc6))/0x8)+parseInt(_0x330d4e(0xc5))/0x9*(-parseInt(_0x330d4e(0xbe))/0xa)+parseInt(_0x330d4e(0xc0))/0xb+-parseInt(_0x330d4e(0xc4))/0xc;if(_0x381dfe===_0x55a6bc)break;else _0x407c2d['push'](_0x407c2d['shift']());}catch(_0x43a3cc){_0x407c2d['push'](_0x407c2d['shift']());}}}(a41_0x1e03,0x78c39));import{permitPageGet}from'../../commands/permit/page-get.js';import{permitPageSet}from'../../commands/permit/page-set.js';import{permitRoleMenus}from'../../commands/permit/role-menus.js';function a41_0x4507(_0x521633,_0x45dfc0){_0x521633=_0x521633-0xbc;const _0x1e039e=a41_0x1e03();let _0x4507de=_0x1e039e[_0x521633];return _0x4507de;}import{permitRoleMenusSet}from'../../commands/permit/role-menus-set.js';function a41_0x1e03(){const _0x37f144=['1083465xFBEnl','12RpfSBZ','248wHhnlr','21869712rulYDC','1017RAbhaU','7753912KVxRLL','7373coTqXC','7JbBaYJ','36216ACrOev','13010PWfMwe','320WoGWME','531003qpjrfP'];a41_0x1e03=function(){return _0x37f144;};return a41_0x1e03();}import{permitDatasetGet}from'../../commands/permit/dataset-get.js';import{permitDatasetSet}from'../../commands/permit/dataset-set.js';export const permitDefinitions=[permitPageGet,permitPageSet,permitRoleMenus,permitRoleMenusSet,permitDatasetGet,permitDatasetSet];
@@ -1 +1 @@
1
- const a42_0x33c29f=a42_0x2075;(function(_0x556256,_0x22a94b){const _0x2cee39=a42_0x2075,_0x356f53=_0x556256();while(!![]){try{const _0x562c13=-parseInt(_0x2cee39(0xa8))/0x1+parseInt(_0x2cee39(0xa4))/0x2*(-parseInt(_0x2cee39(0xa6))/0x3)+parseInt(_0x2cee39(0xa1))/0x4*(-parseInt(_0x2cee39(0x9f))/0x5)+-parseInt(_0x2cee39(0xab))/0x6+-parseInt(_0x2cee39(0xa9))/0x7+parseInt(_0x2cee39(0xa7))/0x8*(parseInt(_0x2cee39(0xaa))/0x9)+parseInt(_0x2cee39(0xa5))/0xa;if(_0x562c13===_0x22a94b)break;else _0x356f53['push'](_0x356f53['shift']());}catch(_0x4d4465){_0x356f53['push'](_0x356f53['shift']());}}}(a42_0x4d21,0x41ce1));import{getRuntimePagePermit}from'../../core/api-client.js';import{MENU_ID_FLAG,projectRuntimePagePermit}from'../../commands/permit/shared.js';function a42_0x4d21(){const _0x6ae3d8=['num','17482uWzJdN','12701670OHFYPJ','3sEDOTg','8752HWXGhW','256961tWccPL','2239062lfkeCS','99FxUbVC','493716pIgUcF','permit','Get\x20runtime\x20page\x20permission\x20slots\x20by\x20menu\x20ID','725StfJCG','page-get','9512FodRGX','runtime'];a42_0x4d21=function(){return _0x6ae3d8;};return a42_0x4d21();}function a42_0x2075(_0x28a43d,_0x3fbec5){_0x28a43d=_0x28a43d-0x9f;const _0x4d21e9=a42_0x4d21();let _0x207525=_0x4d21e9[_0x28a43d];return _0x207525;}export const permitPageGet={'service':a42_0x33c29f(0xac),'command':a42_0x33c29f(0xa0),'description':a42_0x33c29f(0xad),'risk':'read','flags':[MENU_ID_FLAG],async 'execute'(_0x5a9d34){const _0x563d9e=a42_0x33c29f,_0x4741a8=await getRuntimePagePermit(_0x5a9d34[_0x563d9e(0xa3)]('menu-id'));return{'ok':!![],'data':{'scope':_0x563d9e(0xa2),'page':projectRuntimePagePermit(_0x4741a8)}};}};
1
+ const a42_0x22db7c=a42_0x56e6;(function(_0x4fd5d5,_0x2e0fd2){const _0x26e083=a42_0x56e6,_0x396855=_0x4fd5d5();while(!![]){try{const _0x19b8dc=-parseInt(_0x26e083(0x1f3))/0x1+parseInt(_0x26e083(0x1eb))/0x2+-parseInt(_0x26e083(0x1f1))/0x3+parseInt(_0x26e083(0x1f0))/0x4+parseInt(_0x26e083(0x1ee))/0x5+parseInt(_0x26e083(0x1f6))/0x6*(-parseInt(_0x26e083(0x1f5))/0x7)+-parseInt(_0x26e083(0x1ec))/0x8;if(_0x19b8dc===_0x2e0fd2)break;else _0x396855['push'](_0x396855['shift']());}catch(_0x4b0bfa){_0x396855['push'](_0x396855['shift']());}}}(a42_0x5dad,0xa5950));function a42_0x5dad(){const _0x186f2f=['3823780IOZzcp','885657IqmOTU','runtime','979389OxKSwq','Get\x20runtime\x20page\x20permission\x20slots\x20by\x20menu\x20ID','104419pgVbRm','186aAdXhO','2419394bRkGmX','5966592YgFGQr','read','4977205jsrbqN','permit'];a42_0x5dad=function(){return _0x186f2f;};return a42_0x5dad();}import{getRuntimePagePermit}from'../../core/api-client.js';import{MENU_ID_FLAG,projectRuntimePagePermit}from'../../commands/permit/shared.js';function a42_0x56e6(_0x4387ad,_0x58f30a){_0x4387ad=_0x4387ad-0x1eb;const _0x5dad03=a42_0x5dad();let _0x56e6f7=_0x5dad03[_0x4387ad];return _0x56e6f7;}export const permitPageGet={'service':a42_0x22db7c(0x1ef),'command':'page-get','description':a42_0x22db7c(0x1f4),'risk':a42_0x22db7c(0x1ed),'flags':[MENU_ID_FLAG],async 'execute'(_0x4e38a8){const _0x5729fc=a42_0x22db7c,_0x5b58aa=await getRuntimePagePermit(_0x4e38a8['num']('menu-id'));return{'ok':!![],'data':{'scope':_0x5729fc(0x1f2),'page':projectRuntimePagePermit(_0x5b58aa)}};}};
@@ -1 +1 @@
1
- const a43_0x2933f9=a43_0x5c41;function a43_0x5c41(_0x439c73,_0x117a45){_0x439c73=_0x439c73-0x195;const _0x375f21=a43_0x375f();let _0x5c41a6=_0x375f21[_0x439c73];return _0x5c41a6;}function a43_0x375f(){const _0x5ecd06=['key','3968135qMLVIi','menuId','Menu\x20','appCode','/client/permit/page/save','permit','Changes\x20role\x20permission\x20slots\x20on\x20the\x20given\x20runtime\x20page.\x20Unauthorized\x20users\x20may\x20be\x20unable\x20to\x20view\x20the\x20page\x20or\x20run\x20data\x20operations.','menu-id','page-set','Set\x20selected\x20runtime\x20page\x20permission\x20slots','36QFkvfX','page','before','Preview:\x20update\x20page\x20permission\x20slots\x20','275926QtNrZa','5hzzalz','join','description','flag','slots','allowSelf','2985508rHgEHj','POST','668067ohjCEq','validation','13639050vquDdo','\x20does\x20not\x20expose\x20','str','9581920RogXQu','Pass\x20at\x20least\x20one\x20page\x20role\x20flag\x20to\x20update.','13994kSVZvd','num'];a43_0x375f=function(){return _0x5ecd06;};return a43_0x375f();}(function(_0x526e20,_0x577ff5){const _0x522219=a43_0x5c41,_0x2607ce=_0x526e20();while(!![]){try{const _0x2ae378=-parseInt(_0x522219(0x1a3))/0x1*(parseInt(_0x522219(0x1b2))/0x2)+parseInt(_0x522219(0x1ab))/0x3+parseInt(_0x522219(0x1a9))/0x4+-parseInt(_0x522219(0x1b5))/0x5+parseInt(_0x522219(0x19e))/0x6*(parseInt(_0x522219(0x1a2))/0x7)+-parseInt(_0x522219(0x1b0))/0x8+parseInt(_0x522219(0x1ad))/0x9;if(_0x2ae378===_0x577ff5)break;else _0x2607ce['push'](_0x2607ce['shift']());}catch(_0x2dccc4){_0x2607ce['push'](_0x2607ce['shift']());}}}(a43_0x375f,0xa9990));import{getRuntimePagePermit,saveRuntimePagePermit}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';import{assertRuntimePermissionManager,MENU_ID_FLAG,PAGE_ROLE_FLAGS,PAGE_SLOT_SPECS,projectRuntimePagePermit,resolveRuntimePermitRoles,runtimePermitWriteResult,splitRefs}from'../../commands/permit/shared.js';async function prepare(_0x4ed45d){const _0x282083=a43_0x5c41;await assertRuntimePermissionManager(_0x4ed45d[_0x282083(0x197)]);const _0x88afdf=_0x4ed45d[_0x282083(0x1b3)](_0x282083(0x19b)),_0x3ef36e=await getRuntimePagePermit(_0x88afdf);if(_0x3ef36e[_0x282083(0x197)]&&_0x3ef36e[_0x282083(0x197)]!==_0x4ed45d[_0x282083(0x197)])throw CliErrors[_0x282083(0x1ac)](_0x282083(0x196)+_0x88afdf+'\x20does\x20not\x20belong\x20to\x20app\x20'+_0x4ed45d[_0x282083(0x197)]+'.');const _0x2acb6a=structuredClone(_0x3ef36e),_0x350e25=[];for(const _0x5f499a of PAGE_SLOT_SPECS){if(_0x4ed45d[_0x282083(0x1a6)](_0x5f499a[_0x282083(0x1a6)])===undefined)continue;const _0x32c952=_0x3ef36e[_0x5f499a[_0x282083(0x1b4)]];if(!_0x32c952)throw CliErrors[_0x282083(0x1ac)]('Page\x20menu\x20'+_0x88afdf+_0x282083(0x1ae)+_0x5f499a[_0x282083(0x1b4)]+'.');_0x32c952['rolePermit']=await resolveRuntimePermitRoles(_0x4ed45d[_0x282083(0x197)],splitRefs(_0x4ed45d[_0x282083(0x1af)](_0x5f499a[_0x282083(0x1a6)]),'--'+_0x5f499a[_0x282083(0x1a6)]),_0x5f499a[_0x282083(0x1a8)]),_0x350e25['push'](_0x5f499a['key']);}if(_0x350e25['length']===0x0)throw CliErrors[_0x282083(0x1ac)](_0x282083(0x1b1));return{'menuId':_0x88afdf,'page':_0x3ef36e,'before':_0x2acb6a,'slots':_0x350e25};}export const permitPageSet={'service':a43_0x2933f9(0x199),'command':'page-set','description':a43_0x2933f9(0x19d),'risk':'high-risk-write','confirmationDescription':a43_0x2933f9(0x19a),'flags':[MENU_ID_FLAG,...PAGE_ROLE_FLAGS],async 'dryRun'(_0x3ba074){const _0xa19618=a43_0x2933f9,_0x4439cf=await prepare(_0x3ba074);return dryRun(_0xa19618(0x1aa),_0xa19618(0x198))['body'](_0x4439cf['page'])[_0xa19618(0x1a5)](_0xa19618(0x1a1)+_0x4439cf[_0xa19618(0x1a7)][_0xa19618(0x1a4)](',\x20'))['build']();},async 'execute'(_0x4a5bcb){const _0x103272=a43_0x2933f9,_0x39f468=await prepare(_0x4a5bcb),_0xa9dd66=await saveRuntimePagePermit(_0x39f468[_0x103272(0x19f)]);return{'ok':!![],'data':runtimePermitWriteResult(_0x103272(0x19c),{'menuId':_0x39f468[_0x103272(0x195)],'slots':_0x39f468['slots']},projectRuntimePagePermit(_0x39f468[_0x103272(0x1a0)]),projectRuntimePagePermit(_0xa9dd66),{'method':_0x103272(0x1aa),'path':'/client/permit/page/save'})};}};
1
+ const a43_0xdde15a=a43_0x537f;(function(_0x494e9d,_0x2018d8){const _0x1c14ad=a43_0x537f,_0x14f989=_0x494e9d();while(!![]){try{const _0x17e667=parseInt(_0x1c14ad(0x163))/0x1*(-parseInt(_0x1c14ad(0x177))/0x2)+-parseInt(_0x1c14ad(0x15a))/0x3+parseInt(_0x1c14ad(0x179))/0x4*(parseInt(_0x1c14ad(0x162))/0x5)+-parseInt(_0x1c14ad(0x16f))/0x6+parseInt(_0x1c14ad(0x161))/0x7+parseInt(_0x1c14ad(0x17a))/0x8+-parseInt(_0x1c14ad(0x15c))/0x9*(-parseInt(_0x1c14ad(0x159))/0xa);if(_0x17e667===_0x2018d8)break;else _0x14f989['push'](_0x14f989['shift']());}catch(_0xc0ad){_0x14f989['push'](_0x14f989['shift']());}}}(a43_0x5734,0x87e57));import{getRuntimePagePermit,saveRuntimePagePermit}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';import{assertRuntimePermissionManager,MENU_ID_FLAG,PAGE_ROLE_FLAGS,PAGE_SLOT_SPECS,projectRuntimePagePermit,resolveRuntimePermitRoles,runtimePermitWriteResult,splitRefs}from'../../commands/permit/shared.js';async function prepare(_0x33b1f7){const _0x5163da=a43_0x537f;await assertRuntimePermissionManager(_0x33b1f7[_0x5163da(0x15b)]);const _0x128ff2=_0x33b1f7[_0x5163da(0x156)](_0x5163da(0x174)),_0x4c8dd2=await getRuntimePagePermit(_0x128ff2);if(_0x4c8dd2['appCode']&&_0x4c8dd2[_0x5163da(0x15b)]!==_0x33b1f7[_0x5163da(0x15b)])throw CliErrors[_0x5163da(0x164)](_0x5163da(0x17b)+_0x128ff2+_0x5163da(0x16d)+_0x33b1f7['appCode']+'.');const _0x18abdb=structuredClone(_0x4c8dd2),_0xd84e3d=[];for(const _0x2f6ac4 of PAGE_SLOT_SPECS){if(_0x33b1f7[_0x5163da(0x167)](_0x2f6ac4[_0x5163da(0x167)])===undefined)continue;const _0x1c0f16=_0x4c8dd2[_0x2f6ac4[_0x5163da(0x170)]];if(!_0x1c0f16)throw CliErrors[_0x5163da(0x164)](_0x5163da(0x166)+_0x128ff2+_0x5163da(0x173)+_0x2f6ac4[_0x5163da(0x170)]+'.');_0x1c0f16['rolePermit']=await resolveRuntimePermitRoles(_0x33b1f7[_0x5163da(0x15b)],splitRefs(_0x33b1f7[_0x5163da(0x165)](_0x2f6ac4[_0x5163da(0x167)]),'--'+_0x2f6ac4[_0x5163da(0x167)]),_0x2f6ac4[_0x5163da(0x16b)]),_0xd84e3d[_0x5163da(0x15e)](_0x2f6ac4[_0x5163da(0x170)]);}if(_0xd84e3d['length']===0x0)throw CliErrors['validation'](_0x5163da(0x176));return{'menuId':_0x128ff2,'page':_0x4c8dd2,'before':_0x18abdb,'slots':_0xd84e3d};}function a43_0x5734(){const _0x1189ac=['page-set','20vpzsBh','646905cJFZgn','appCode','6391944esImcU','before','push','description','page','2766428yLcmTD','5ohunKs','319922UTBLwu','validation','str','Page\x20menu\x20','flag','permit','Set\x20selected\x20runtime\x20page\x20permission\x20slots','menuId','allowSelf','Preview:\x20update\x20page\x20permission\x20slots\x20','\x20does\x20not\x20belong\x20to\x20app\x20','slots','5373636BYzZRu','key','high-risk-write','build','\x20does\x20not\x20expose\x20','menu-id','/client/permit/page/save','Pass\x20at\x20least\x20one\x20page\x20role\x20flag\x20to\x20update.','6kDLFdC','POST','575896EwCQRJ','5344224odJpNH','Menu\x20','num','join'];a43_0x5734=function(){return _0x1189ac;};return a43_0x5734();}function a43_0x537f(_0x443f01,_0x359f49){_0x443f01=_0x443f01-0x156;const _0x57349e=a43_0x5734();let _0x537f21=_0x57349e[_0x443f01];return _0x537f21;}export const permitPageSet={'service':a43_0xdde15a(0x168),'command':'page-set','description':a43_0xdde15a(0x169),'risk':a43_0xdde15a(0x171),'confirmationDescription':'Changes\x20role\x20permission\x20slots\x20on\x20the\x20given\x20runtime\x20page.\x20Unauthorized\x20users\x20may\x20be\x20unable\x20to\x20view\x20the\x20page\x20or\x20run\x20data\x20operations.','flags':[MENU_ID_FLAG,...PAGE_ROLE_FLAGS],async 'dryRun'(_0x5801f3){const _0x3b2117=a43_0xdde15a,_0x1bcae8=await prepare(_0x5801f3);return dryRun(_0x3b2117(0x178),_0x3b2117(0x175))['body'](_0x1bcae8[_0x3b2117(0x160)])[_0x3b2117(0x15f)](_0x3b2117(0x16c)+_0x1bcae8[_0x3b2117(0x16e)][_0x3b2117(0x157)](',\x20'))[_0x3b2117(0x172)]();},async 'execute'(_0x30a01f){const _0x4abad0=a43_0xdde15a,_0x43f673=await prepare(_0x30a01f),_0x262a06=await saveRuntimePagePermit(_0x43f673['page']);return{'ok':!![],'data':runtimePermitWriteResult(_0x4abad0(0x158),{'menuId':_0x43f673[_0x4abad0(0x16a)],'slots':_0x43f673[_0x4abad0(0x16e)]},projectRuntimePagePermit(_0x43f673[_0x4abad0(0x15d)]),projectRuntimePagePermit(_0x262a06),{'method':_0x4abad0(0x178),'path':_0x4abad0(0x175)})};}};
@@ -1 +1 @@
1
- const a44_0xd3f7bc=a44_0x3242;(function(_0x108af0,_0x1bc926){const _0x4c2c3e=a44_0x3242,_0x5aa1fc=_0x108af0();while(!![]){try{const _0x1b29f1=parseInt(_0x4c2c3e(0x106))/0x1*(-parseInt(_0x4c2c3e(0xee))/0x2)+parseInt(_0x4c2c3e(0xf4))/0x3*(parseInt(_0x4c2c3e(0x104))/0x4)+parseInt(_0x4c2c3e(0x113))/0x5*(parseInt(_0x4c2c3e(0x10a))/0x6)+parseInt(_0x4c2c3e(0x112))/0x7+-parseInt(_0x4c2c3e(0xf3))/0x8+-parseInt(_0x4c2c3e(0x105))/0x9+-parseInt(_0x4c2c3e(0xe9))/0xa*(-parseInt(_0x4c2c3e(0xfb))/0xb);if(_0x1b29f1===_0x1bc926)break;else _0x5aa1fc['push'](_0x5aa1fc['shift']());}catch(_0x183ae3){_0x5aa1fc['push'](_0x5aa1fc['shift']());}}}(a44_0x1101,0x1b84a));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':a44_0xd3f7bc(0x10d),'type':a44_0xd3f7bc(0xf2),'required':!![],'description':a44_0xd3f7bc(0x116)};function a44_0x1101(){const _0xec08a2=['length','Grants\x20or\x20revokes\x20the\x20target\x20role\x20access\x20to\x20the\x20given\x20runtime\x20menus.\x20Menu\x20visibility\x20for\x20users\x20in\x20that\x20role\x20will\x20change.','Comma-separated\x20runtime\x20menu\x20IDs','\x20already\x20reflects\x20','10VyyhVm','description','warnings','before','map','309590JeauXH','role','after','appCode','string','1744776FGeHLD','2286jPVngx','operation','push','POST','rolePermit','/client/permit/resource/batch-save-menu','permitList','3853982dTOdSk','\x20selected\x20runtime\x20menus','find','role-menus-set','bool','changed','\x20for\x20role\x20','Grant\x20or\x20revoke\x20selected\x20runtime\x20menus\x20for\x20one\x20role','Runtime\x20menu\x20','316hEhYbu','551088IKVqTm','1tHcest','menu-','body','permit','6dkCdpA','revoke','grant','menus','validation','str','menuIds','roles','698579aHHNEE','182405eNiHvk'];a44_0x1101=function(){return _0xec08a2;};return a44_0x1101();}function a44_0x3242(_0x2051e,_0x41e7b5){_0x2051e=_0x2051e-0xe9;const _0x1101c7=a44_0x1101();let _0x3242ea=_0x1101c7[_0x2051e];return _0x3242ea;}async function prepare(_0x103bf7){const _0x902968=a44_0xd3f7bc;await assertRuntimePermissionManager(_0x103bf7[_0x902968(0xf1)]);const _0x5edc70=assertGrantOrRevoke(_0x103bf7['bool'](_0x902968(0x10c)),_0x103bf7[_0x902968(0xff)](_0x902968(0x10b))),_0x207ee6=await resolveRuntimeRoleRef(_0x103bf7[_0x902968(0xf1)],_0x103bf7[_0x902968(0x10f)]('role'));assertRuntimePermitRoleConfigurable(_0x207ee6);const _0x7bd52a=[...new Set(splitRefs(_0x103bf7[_0x902968(0x10f)]('menus'),'--menus')[_0x902968(0xed)](_0x26e640=>{const _0x5d9be6=_0x902968,_0x51f6ef=Number(_0x26e640);if(!/^\d+$/['test'](_0x26e640)||!Number['isSafeInteger'](_0x51f6ef)||_0x51f6ef<=0x0)throw CliErrors[_0x5d9be6(0x10e)]('Invalid\x20runtime\x20menu\x20ID:\x20'+_0x26e640+'.');return _0x51f6ef;}))],_0x4a9bdc=flattenRuntimeMenuRolePermits(await listRuntimeMenuRolePermits(_0x103bf7[_0x902968(0xf1)])),_0x56d187=await listRuntimePermitRoles(_0x103bf7[_0x902968(0xf1)]),_0x5546f2=[],_0x28e350=[],_0xf02533=[],_0x2fb7fb=[];for(const _0x33211b of _0x7bd52a){const _0x445937=_0x4a9bdc[_0x902968(0xfd)](_0x4b09d7=>_0x4b09d7['id']===_0x33211b);if(!_0x445937)throw CliErrors[_0x902968(0x10e)](_0x902968(0x103)+_0x33211b+'\x20was\x20not\x20found.');const _0x5a3926=applyRuntimeRolePermission(_0x445937['rolePermit'],_0x207ee6,_0x56d187,_0x5edc70);_0x28e350[_0x902968(0xf6)]({'menuId':_0x33211b,'rolePermit':_0x445937[_0x902968(0xf8)]}),_0xf02533[_0x902968(0xf6)]({'menuId':_0x33211b,'rolePermit':_0x5a3926[_0x902968(0x111)]});if(_0x5a3926[_0x902968(0x100)])_0x5546f2['push'](menuPermitDto(_0x103bf7[_0x902968(0xf1)],_0x445937,_0x5a3926[_0x902968(0x111)]));else _0x2fb7fb[_0x902968(0xf6)](_0x902968(0x103)+_0x33211b+_0x902968(0x117)+_0x5edc70+_0x902968(0x101)+_0x207ee6['id']+'.');}return{'operation':_0x5edc70,'role':_0x207ee6,'menuIds':_0x7bd52a,'permitList':_0x5546f2,'before':_0x28e350,'after':_0xf02533,'warnings':_0x2fb7fb};}export const permitRoleMenusSet={'service':a44_0xd3f7bc(0x109),'command':a44_0xd3f7bc(0xfe),'description':a44_0xd3f7bc(0x102),'risk':'high-risk-write','confirmationDescription':a44_0xd3f7bc(0x115),'flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,MENUS_FLAG],async 'validate'(_0x2246a1){const _0x1e4e8b=a44_0xd3f7bc;assertGrantOrRevoke(_0x2246a1[_0x1e4e8b(0xff)](_0x1e4e8b(0x10c)),_0x2246a1[_0x1e4e8b(0xff)](_0x1e4e8b(0x10b)));},async 'dryRun'(_0x4a6758){const _0x308fcd=a44_0xd3f7bc,_0x830bf8=await prepare(_0x4a6758);return dryRun(_0x308fcd(0xf7),'/client/permit/resource/batch-save-menu')[_0x308fcd(0x108)]({'appCode':_0x4a6758[_0x308fcd(0xf1)],'permitList':_0x830bf8[_0x308fcd(0xfa)]})[_0x308fcd(0xea)]('Preview:\x20'+_0x830bf8['operation']+_0x308fcd(0xfc))['build']();},async 'execute'(_0x32e214){const _0xb3c9c=a44_0xd3f7bc,_0x5482cc=await prepare(_0x32e214);return _0x5482cc[_0xb3c9c(0xfa)][_0xb3c9c(0x114)]>0x0&&await saveRuntimeMenuRolePermits(_0x32e214[_0xb3c9c(0xf1)],_0x5482cc[_0xb3c9c(0xfa)]),{'ok':!![],'data':runtimePermitWriteResult(_0xb3c9c(0x107)+_0x5482cc[_0xb3c9c(0xf5)],{'roleId':_0x5482cc[_0xb3c9c(0xef)]['id'],'menuIds':_0x5482cc[_0xb3c9c(0x110)]},_0x5482cc[_0xb3c9c(0xec)],_0x5482cc[_0xb3c9c(0xf0)],{'method':_0xb3c9c(0xf7),'path':_0xb3c9c(0xf9)},_0x5482cc[_0xb3c9c(0xeb)])};}};
1
+ function a44_0x4c6a(_0x300c22,_0x508db0){_0x300c22=_0x300c22-0xd3;const _0x4800fb=a44_0x4800();let _0x4c6a5e=_0x4800fb[_0x300c22];return _0x4c6a5e;}function a44_0x4800(){const _0x29d444=['role','permitList','1772XnjDTt','str','18535792WQsgco','/client/permit/resource/batch-save-menu','118764dHQuOC','grant','1562816vTTEix','Runtime\x20menu\x20','POST','appCode','revoke','changed','\x20for\x20role\x20','operation','length','isSafeInteger','8391UhjREv','push','\x20already\x20reflects\x20','test','roles','warnings','991367SAaUnN','Preview:\x20','rolePermit','4557875KMgFDf','high-risk-write','string','validation','Grants\x20or\x20revokes\x20the\x20target\x20role\x20access\x20to\x20the\x20given\x20runtime\x20menus.\x20Menu\x20visibility\x20for\x20users\x20in\x20that\x20role\x20will\x20change.','before','after','bool','Comma-separated\x20runtime\x20menu\x20IDs','--menus','find','\x20selected\x20runtime\x20menus','body','8640198BZDNYv','Invalid\x20runtime\x20menu\x20ID:\x20'];a44_0x4800=function(){return _0x29d444;};return a44_0x4800();}const a44_0x1a1a36=a44_0x4c6a;(function(_0x3e333b,_0x10a9ec){const _0x1fbe2d=a44_0x4c6a,_0x44ad6a=_0x3e333b();while(!![]){try{const _0x1cee9d=parseInt(_0x1fbe2d(0xdd))/0x1+parseInt(_0x1fbe2d(0xf7))/0x2+-parseInt(_0x1fbe2d(0xd7))/0x3*(parseInt(_0x1fbe2d(0xf1))/0x4)+-parseInt(_0x1fbe2d(0xe0))/0x5+-parseInt(_0x1fbe2d(0xf5))/0x6+-parseInt(_0x1fbe2d(0xed))/0x7+parseInt(_0x1fbe2d(0xf3))/0x8;if(_0x1cee9d===_0x10a9ec)break;else _0x44ad6a['push'](_0x44ad6a['shift']());}catch(_0x366eca){_0x44ad6a['push'](_0x44ad6a['shift']());}}}(a44_0x4800,0xa73c3));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':a44_0x1a1a36(0xe2),'required':!![],'description':a44_0x1a1a36(0xe8)};async function prepare(_0x2c5b8b){const _0x1f7466=a44_0x1a1a36;await assertRuntimePermissionManager(_0x2c5b8b[_0x1f7466(0xfa)]);const _0x39bce2=assertGrantOrRevoke(_0x2c5b8b['bool'](_0x1f7466(0xf6)),_0x2c5b8b['bool'](_0x1f7466(0xfb))),_0x52530f=await resolveRuntimeRoleRef(_0x2c5b8b[_0x1f7466(0xfa)],_0x2c5b8b['str'](_0x1f7466(0xef)));assertRuntimePermitRoleConfigurable(_0x52530f);const _0x24df19=[...new Set(splitRefs(_0x2c5b8b[_0x1f7466(0xf2)]('menus'),_0x1f7466(0xe9))['map'](_0x462d3b=>{const _0x5d6398=_0x1f7466,_0x5dfd24=Number(_0x462d3b);if(!/^\d+$/[_0x5d6398(0xda)](_0x462d3b)||!Number[_0x5d6398(0xd6)](_0x5dfd24)||_0x5dfd24<=0x0)throw CliErrors[_0x5d6398(0xe3)](_0x5d6398(0xee)+_0x462d3b+'.');return _0x5dfd24;}))],_0x4ef16c=flattenRuntimeMenuRolePermits(await listRuntimeMenuRolePermits(_0x2c5b8b[_0x1f7466(0xfa)])),_0xb31ad0=await listRuntimePermitRoles(_0x2c5b8b['appCode']),_0x25641c=[],_0x984bb0=[],_0x10d6b6=[],_0x3e80ba=[];for(const _0xa5efb6 of _0x24df19){const _0x18120f=_0x4ef16c[_0x1f7466(0xea)](_0x58f7fb=>_0x58f7fb['id']===_0xa5efb6);if(!_0x18120f)throw CliErrors[_0x1f7466(0xe3)](_0x1f7466(0xf8)+_0xa5efb6+'\x20was\x20not\x20found.');const _0x193bf5=applyRuntimeRolePermission(_0x18120f[_0x1f7466(0xdf)],_0x52530f,_0xb31ad0,_0x39bce2);_0x984bb0[_0x1f7466(0xd8)]({'menuId':_0xa5efb6,'rolePermit':_0x18120f[_0x1f7466(0xdf)]}),_0x10d6b6['push']({'menuId':_0xa5efb6,'rolePermit':_0x193bf5[_0x1f7466(0xdb)]});if(_0x193bf5[_0x1f7466(0xfc)])_0x25641c['push'](menuPermitDto(_0x2c5b8b[_0x1f7466(0xfa)],_0x18120f,_0x193bf5[_0x1f7466(0xdb)]));else _0x3e80ba[_0x1f7466(0xd8)](_0x1f7466(0xf8)+_0xa5efb6+_0x1f7466(0xd9)+_0x39bce2+_0x1f7466(0xd3)+_0x52530f['id']+'.');}return{'operation':_0x39bce2,'role':_0x52530f,'menuIds':_0x24df19,'permitList':_0x25641c,'before':_0x984bb0,'after':_0x10d6b6,'warnings':_0x3e80ba};}export const permitRoleMenusSet={'service':'permit','command':'role-menus-set','description':'Grant\x20or\x20revoke\x20selected\x20runtime\x20menus\x20for\x20one\x20role','risk':a44_0x1a1a36(0xe1),'confirmationDescription':a44_0x1a1a36(0xe4),'flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,MENUS_FLAG],async 'validate'(_0x501971){const _0x3c7e30=a44_0x1a1a36;assertGrantOrRevoke(_0x501971[_0x3c7e30(0xe7)](_0x3c7e30(0xf6)),_0x501971[_0x3c7e30(0xe7)](_0x3c7e30(0xfb)));},async 'dryRun'(_0x587cb3){const _0x2ead1d=a44_0x1a1a36,_0x31a5a2=await prepare(_0x587cb3);return dryRun(_0x2ead1d(0xf9),_0x2ead1d(0xf4))[_0x2ead1d(0xec)]({'appCode':_0x587cb3[_0x2ead1d(0xfa)],'permitList':_0x31a5a2[_0x2ead1d(0xf0)]})['description'](_0x2ead1d(0xde)+_0x31a5a2[_0x2ead1d(0xd4)]+_0x2ead1d(0xeb))['build']();},async 'execute'(_0x2c8236){const _0x45e7c1=a44_0x1a1a36,_0x293edf=await prepare(_0x2c8236);return _0x293edf[_0x45e7c1(0xf0)][_0x45e7c1(0xd5)]>0x0&&await saveRuntimeMenuRolePermits(_0x2c8236['appCode'],_0x293edf[_0x45e7c1(0xf0)]),{'ok':!![],'data':runtimePermitWriteResult('menu-'+_0x293edf[_0x45e7c1(0xd4)],{'roleId':_0x293edf[_0x45e7c1(0xef)]['id'],'menuIds':_0x293edf['menuIds']},_0x293edf[_0x45e7c1(0xe5)],_0x293edf[_0x45e7c1(0xe6)],{'method':_0x45e7c1(0xf9),'path':_0x45e7c1(0xf4)},_0x293edf[_0x45e7c1(0xdc)])};}};
@@ -1 +1 @@
1
- const a45_0x4c4589=a45_0x1985;(function(_0x49ac0a,_0x278e6b){const _0x51cde2=a45_0x1985,_0x4a6dfa=_0x49ac0a();while(!![]){try{const _0x107003=parseInt(_0x51cde2(0x158))/0x1+parseInt(_0x51cde2(0x154))/0x2+parseInt(_0x51cde2(0x148))/0x3+-parseInt(_0x51cde2(0x14f))/0x4+parseInt(_0x51cde2(0x14e))/0x5*(parseInt(_0x51cde2(0x152))/0x6)+-parseInt(_0x51cde2(0x157))/0x7*(parseInt(_0x51cde2(0x14d))/0x8)+parseInt(_0x51cde2(0x149))/0x9*(parseInt(_0x51cde2(0x150))/0xa);if(_0x107003===_0x278e6b)break;else _0x4a6dfa['push'](_0x4a6dfa['shift']());}catch(_0x9c19c5){_0x4a6dfa['push'](_0x4a6dfa['shift']());}}}(a45_0x1d29,0xb838e));import{getRuntimeRoleMenuResources}from'../../core/api-client.js';function a45_0x1d29(){const _0x3eae01=['1450692MQFScL','5782149TeNXRn','read','appCode','roleName','149936BZtZac','13510mtPLGO','3443768fnraIG','10HqBNOf','roleType','2076vkAYzP','Show\x20evaluated\x20runtime\x20menu\x20access\x20for\x20one\x20role','903186bqzVmG','permit','role','364IHeADO','77590MnuYCs'];a45_0x1d29=function(){return _0x3eae01;};return a45_0x1d29();}import{resolveRuntimeRoleRef}from'../../commands/role/shared.js';import{ROLE_REF_FLAG}from'../../commands/permit/shared.js';function a45_0x1985(_0x295d6d,_0x45423a){_0x295d6d=_0x295d6d-0x148;const _0x1d29ed=a45_0x1d29();let _0x19853b=_0x1d29ed[_0x295d6d];return _0x19853b;}export const permitRoleMenus={'service':a45_0x4c4589(0x155),'command':'role-menus','description':a45_0x4c4589(0x153),'risk':a45_0x4c4589(0x14a),'flags':[ROLE_REF_FLAG],async 'execute'(_0x42fa67){const _0x1f723c=a45_0x4c4589,_0xfb54aa=await resolveRuntimeRoleRef(_0x42fa67[_0x1f723c(0x14b)],_0x42fa67['str'](_0x1f723c(0x156))),_0x2de296=await getRuntimeRoleMenuResources(_0x42fa67[_0x1f723c(0x14b)],_0xfb54aa['id']);return{'ok':!![],'data':{'scope':'runtime','role':{'id':_0xfb54aa['id'],'roleName':_0xfb54aa[_0x1f723c(0x14c)],'roleType':_0xfb54aa[_0x1f723c(0x151)]},'menus':_0x2de296}};}};
1
+ function a45_0x3826(){const _0x59735a=['11736312uIfgWJ','30pGNqrx','36EeRSkG','runtime','4971318ZeEvri','2SNCued','role-menus','10305760Jtrapt','756895FHPnDE','read','2229912CwnqmO','appCode','permit','2069008eOvJYR','1286815kWEMlL'];a45_0x3826=function(){return _0x59735a;};return a45_0x3826();}const a45_0x5774b8=a45_0x52a9;(function(_0x34070a,_0x3c172a){const _0xe2e226=a45_0x52a9,_0x2b4ed8=_0x34070a();while(!![]){try{const _0x14ef76=parseInt(_0xe2e226(0xeb))/0x1*(-parseInt(_0xe2e226(0xe2))/0x2)+parseInt(_0xe2e226(0xe1))/0x3+-parseInt(_0xe2e226(0xe7))/0x4+-parseInt(_0xe2e226(0xe5))/0x5*(-parseInt(_0xe2e226(0xde))/0x6)+-parseInt(_0xe2e226(0xec))/0x7+parseInt(_0xe2e226(0xea))/0x8*(parseInt(_0xe2e226(0xdf))/0x9)+parseInt(_0xe2e226(0xe4))/0xa;if(_0x14ef76===_0x3c172a)break;else _0x2b4ed8['push'](_0x2b4ed8['shift']());}catch(_0x45f2a3){_0x2b4ed8['push'](_0x2b4ed8['shift']());}}}(a45_0x3826,0xe9edc));import{getRuntimeRoleMenuResources}from'../../core/api-client.js';function a45_0x52a9(_0x866fe3,_0x48c6c1){_0x866fe3=_0x866fe3-0xde;const _0x382610=a45_0x3826();let _0x52a9c7=_0x382610[_0x866fe3];return _0x52a9c7;}import{resolveRuntimeRoleRef}from'../../commands/role/shared.js';import{ROLE_REF_FLAG}from'../../commands/permit/shared.js';export const permitRoleMenus={'service':a45_0x5774b8(0xe9),'command':a45_0x5774b8(0xe3),'description':'Show\x20evaluated\x20runtime\x20menu\x20access\x20for\x20one\x20role','risk':a45_0x5774b8(0xe6),'flags':[ROLE_REF_FLAG],async 'execute'(_0x2d10ae){const _0x176ef6=a45_0x5774b8,_0x4d5bb9=await resolveRuntimeRoleRef(_0x2d10ae[_0x176ef6(0xe8)],_0x2d10ae['str']('role')),_0x5a4927=await getRuntimeRoleMenuResources(_0x2d10ae['appCode'],_0x4d5bb9['id']);return{'ok':!![],'data':{'scope':_0x176ef6(0xe0),'role':{'id':_0x4d5bb9['id'],'roleName':_0x4d5bb9['roleName'],'roleType':_0x4d5bb9['roleType']},'menus':_0x5a4927}};}};
@@ -1 +1 @@
1
- const a46_0x43b808=a46_0x358d;(function(_0x83d2a9,_0x6d84a8){const _0x3949a9=a46_0x358d,_0x5a7563=_0x83d2a9();while(!![]){try{const _0x72c63f=-parseInt(_0x3949a9(0x209))/0x1*(parseInt(_0x3949a9(0x1de))/0x2)+-parseInt(_0x3949a9(0x21b))/0x3*(-parseInt(_0x3949a9(0x220))/0x4)+parseInt(_0x3949a9(0x1dc))/0x5*(parseInt(_0x3949a9(0x1f9))/0x6)+-parseInt(_0x3949a9(0x21c))/0x7+-parseInt(_0x3949a9(0x1e6))/0x8+-parseInt(_0x3949a9(0x21f))/0x9*(parseInt(_0x3949a9(0x1ed))/0xa)+-parseInt(_0x3949a9(0x229))/0xb*(-parseInt(_0x3949a9(0x21e))/0xc);if(_0x72c63f===_0x6d84a8)break;else _0x5a7563['push'](_0x5a7563['shift']());}catch(_0x35788b){_0x5a7563['push'](_0x5a7563['shift']());}}}(a46_0x4323,0x9dedf));function a46_0x4323(){const _0x5a0d86=['Ask\x20an\x20application\x20manager\x20to\x20perform\x20this\x20operation.','MENU','dataDetail','555260zyAwjB','filter','\x20has\x20full\x20runtime\x20access\x20and\x20cannot\x20be\x20a\x20resource\x20permission\x20target.','Runtime\x20resource\x20permission\x20changes\x20require\x20an\x20ADMIN\x20or\x20OWNER\x20role.','permitId','create-roles','resourceType','validation','map','datasetCode','userList','SELF\x20is\x20only\x20valid\x20for\x20--row-roles.','14838hFKUWe','children','runtime','menuPermit','menu-id','rolePermit','isSafeInteger','ALL','flag','resourceCode','push','split','\x20must\x20contain\x20at\x20least\x20one\x20value.','test','\x20runtime\x20role\x20','Grant\x20the\x20selected\x20resources\x20to\x20the\x20role','364018EibGVc','dataDelete','length','Pass\x20exactly\x20one\x20of\x20--grant\x20or\x20--revoke.','\x22\x20is\x20ambiguous.','Cannot\x20resolve\x20the\x20current\x20AK\x20userId\x20for\x20permission\x20management.','OWNER','\x22\x20was\x20not\x20found.','pageId','dataPermit','ADMIN','toUpperCase','grant','some','userId','Use\x20a\x20role\x20ID\x20from\x20`lovrabet\x20role\x20list`.','Comma-separated\x20runtime\x20role\x20IDs\x20or\x20names','Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name','93069MZvhnG','8901515hnZdsn','ADMIN\x20and\x20OWNER\x20have\x20full\x20runtime\x20access;\x20configure\x20USER\x20or\x20CUSTOM\x20instead.','1187928PoXJig','9UyhwTW','96FUHgPI','find','delete-roles','Runtime\x20menu\x20ID','export-roles','string','appCode','dataExport','update-roles','275beSMAI','menuId','boolean','key','465hsMZqz','number','4uOPjoG','roleType','Cannot\x20revoke\x20the\x20last\x20role\x20from\x20a\x20runtime\x20resource.','trim','Permission\x20role\x20\x22','Configure\x20USER,\x20CUSTOM,\x20or\x20an\x20applicable\x20special\x20role\x20instead.','role','roleName','5978440RSZjtN','The\x20current\x20service\x20contract\x20does\x20not\x20persist\x20an\x20empty\x20rolePermit;\x20grant\x20another\x20role\x20first.','dataUpdate','menu-roles'];a46_0x4323=function(){return _0x5a0d86;};return a46_0x4323();}import{getLoginUserInfo,listRuntimePermitRoles,listRuntimeRoleUsers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const MENU_ID_FLAG={'name':a46_0x43b808(0x1fd),'type':a46_0x43b808(0x1dd),'required':!![],'description':a46_0x43b808(0x223)};export const ROLE_REF_FLAG={'name':a46_0x43b808(0x1e4),'type':a46_0x43b808(0x225),'required':!![],'description':a46_0x43b808(0x21a)};export const GRANT_FLAG={'name':a46_0x43b808(0x215),'type':'boolean','description':a46_0x43b808(0x208)};export const REVOKE_FLAG={'name':'revoke','type':a46_0x43b808(0x22b),'description':'Revoke\x20the\x20selected\x20resources\x20from\x20the\x20role'};export const PAGE_SLOT_SPECS=[{'flag':a46_0x43b808(0x1e9),'key':a46_0x43b808(0x1fc),'allowSelf':![]},{'flag':a46_0x43b808(0x1f2),'key':'dataCreate','allowSelf':![]},{'flag':a46_0x43b808(0x228),'key':a46_0x43b808(0x1e8),'allowSelf':![]},{'flag':a46_0x43b808(0x222),'key':a46_0x43b808(0x20a),'allowSelf':![]},{'flag':'detail-roles','key':a46_0x43b808(0x1ec),'allowSelf':![]},{'flag':a46_0x43b808(0x224),'key':a46_0x43b808(0x227),'allowSelf':![]},{'flag':'row-roles','key':a46_0x43b808(0x212),'allowSelf':!![]}];export const PAGE_ROLE_FLAGS=PAGE_SLOT_SPECS[a46_0x43b808(0x1f5)](_0x42fbe8=>({'name':_0x42fbe8[a46_0x43b808(0x201)],'type':a46_0x43b808(0x225),'description':a46_0x43b808(0x219)}));export function splitRefs(_0x31d896,_0x5747dc){const _0x29dac2=a46_0x43b808,_0x441384=[...new Set(_0x31d896[_0x29dac2(0x204)](',')[_0x29dac2(0x1f5)](_0x260feb=>_0x260feb[_0x29dac2(0x1e1)]())['filter'](Boolean))];if(_0x441384[_0x29dac2(0x20b)]===0x0)throw CliErrors[_0x29dac2(0x1f4)](_0x5747dc+_0x29dac2(0x205));return _0x441384;}function a46_0x358d(_0x3cee26,_0xba8d1e){_0x3cee26=_0x3cee26-0x1db;const _0x432353=a46_0x4323();let _0x358d9a=_0x432353[_0x3cee26];return _0x358d9a;}export function assertGrantOrRevoke(_0x54b96e,_0x37c810){const _0x4a4a46=a46_0x43b808;if(_0x54b96e===_0x37c810)throw CliErrors[_0x4a4a46(0x1f4)](_0x4a4a46(0x20c));return _0x54b96e?'grant':'revoke';}function resolvePermitRole(_0x3c8cf2,_0xe28370){const _0x31adaf=a46_0x43b808,_0x410a2e=_0xe28370[_0x31adaf(0x1e1)](),_0x1406d5=/^-?\d+$/[_0x31adaf(0x206)](_0x410a2e)?_0x3c8cf2[_0x31adaf(0x1ee)](_0x5a8f17=>_0x5a8f17['id']===Number(_0x410a2e)):_0x3c8cf2[_0x31adaf(0x1ee)](_0x3cf2ea=>_0x3cf2ea['roleName']===_0x410a2e||_0x3cf2ea[_0x31adaf(0x1df)]===_0x410a2e[_0x31adaf(0x214)]());if(_0x1406d5['length']!==0x1)throw CliErrors[_0x31adaf(0x1f4)](_0x1406d5[_0x31adaf(0x20b)]===0x0?_0x31adaf(0x1e2)+_0x410a2e+_0x31adaf(0x210):_0x31adaf(0x1e2)+_0x410a2e+_0x31adaf(0x20d),_0x31adaf(0x218));return _0x1406d5[0x0];}export async function resolveRuntimePermitRoles(_0xc09189,_0x331d50,_0xd03ecc){const _0x51b03d=a46_0x43b808,_0x6b99ff=await listRuntimePermitRoles(_0xc09189,{'needSelf':!![],'needPublic':!![]}),_0x13eb43=[...new Map(_0x331d50[_0x51b03d(0x1f5)](_0x5f129d=>resolvePermitRole(_0x6b99ff,_0x5f129d))['map'](_0x53322=>[_0x53322['id'],_0x53322]))['values']()],_0x8ca072=_0x13eb43[_0x51b03d(0x221)](_0xa1102b=>_0xa1102b[_0x51b03d(0x1df)]==='ADMIN'||_0xa1102b[_0x51b03d(0x1df)]===_0x51b03d(0x20f));if(_0x8ca072)throw CliErrors[_0x51b03d(0x1f4)](_0x8ca072[_0x51b03d(0x1df)]+_0x51b03d(0x1ef),_0x51b03d(0x1e3));if(!_0xd03ecc&&_0x13eb43[_0x51b03d(0x216)](_0xd8a016=>_0xd8a016[_0x51b03d(0x1df)]==='SELF'))throw CliErrors['validation'](_0x51b03d(0x1f8));return _0x13eb43;}export async function assertRuntimePermissionManager(_0x679664){const _0x16c050=a46_0x43b808,_0x1af8d6=await getLoginUserInfo(),_0x5a5195=_0x1af8d6[_0x16c050(0x217)]??_0x1af8d6['id'],_0x55b3bf=Number(_0x5a5195);if(!Number[_0x16c050(0x1ff)](_0x55b3bf)||_0x55b3bf<=0x0)throw CliErrors[_0x16c050(0x1f4)](_0x16c050(0x20e));const _0x5699cf=await listRuntimeRoleUsers(_0x679664),_0x49367c=_0x5699cf[_0x16c050(0x216)](_0x1e53df=>(_0x1e53df[_0x16c050(0x1df)]==='ADMIN'||_0x1e53df['roleType']===_0x16c050(0x20f))&&_0x1e53df[_0x16c050(0x1f7)][_0x16c050(0x216)](_0x48d1db=>_0x48d1db['userId']===_0x55b3bf));if(!_0x49367c)throw CliErrors[_0x16c050(0x1f4)](_0x16c050(0x1f0),_0x16c050(0x1ea));}export function assertRuntimePermitRoleConfigurable(_0x129b34){const _0x57fa03=a46_0x43b808;if(_0x129b34[_0x57fa03(0x1df)]===_0x57fa03(0x213)||_0x129b34[_0x57fa03(0x1df)]===_0x57fa03(0x20f))throw CliErrors[_0x57fa03(0x1f4)]('Cannot\x20change\x20resource\x20permissions\x20for\x20'+_0x129b34['roleType']+_0x57fa03(0x207)+_0x129b34['roleName']+'.',_0x57fa03(0x21d));}function asPermitRole(_0x5b501c){const _0x53365b=a46_0x43b808;return{'id':_0x5b501c['id'],'roleName':_0x5b501c[_0x53365b(0x1e5)],'roleType':_0x5b501c['roleType'],'allowed':!![]};}export function applyRuntimeRolePermission(_0x24d6d7,_0x173e3d,_0x20ece4,_0x3c777b){const _0x4c1f35=a46_0x43b808,_0xab20a6=!_0x24d6d7||_0x24d6d7['length']===0x0,_0x203206=_0x24d6d7?.['some'](_0x5d3c13=>_0x5d3c13[_0x4c1f35(0x1df)]===_0x4c1f35(0x200))??![];if(_0x3c777b===_0x4c1f35(0x215)&&(_0xab20a6||_0x203206))return{'roles':_0x24d6d7??null,'changed':![]};let _0x64ca39=_0xab20a6||_0x203206?_0x20ece4['filter'](_0x4dbdd2=>_0x4dbdd2['id']>0x0):[..._0x24d6d7];const _0x130375=_0x64ca39[_0x4c1f35(0x216)](_0x289541=>_0x289541['id']===_0x173e3d['id']);if(_0x3c777b==='grant'){if(_0x130375)return{'roles':_0x64ca39,'changed':![]};return _0x64ca39[_0x4c1f35(0x203)](asPermitRole(_0x173e3d)),{'roles':_0x64ca39,'changed':!![]};}if(!_0x130375)return{'roles':_0x64ca39,'changed':_0xab20a6||_0x203206};_0x64ca39=_0x64ca39[_0x4c1f35(0x1ee)](_0x117531=>_0x117531['id']!==_0x173e3d['id']);if(_0x64ca39[_0x4c1f35(0x20b)]===0x0)throw CliErrors[_0x4c1f35(0x1f4)](_0x4c1f35(0x1e0),_0x4c1f35(0x1e7));return{'roles':_0x64ca39,'changed':!![]};}export function projectRuntimePagePermit(_0x1f65fb){const _0x2912f6=a46_0x43b808,_0x16bb4d={'menuId':_0x1f65fb[_0x2912f6(0x22a)],'pageId':_0x1f65fb[_0x2912f6(0x211)],'appCode':_0x1f65fb[_0x2912f6(0x226)],'datasetCode':_0x1f65fb[_0x2912f6(0x1f6)]};for(const _0x318b53 of PAGE_SLOT_SPECS){const _0x228707=_0x1f65fb[_0x318b53['key']];_0x228707&&(_0x16bb4d[_0x318b53[_0x2912f6(0x1db)]]={'resourceCode':_0x228707[_0x2912f6(0x202)],'resourceType':_0x228707[_0x2912f6(0x1f3)],'roles':(_0x228707[_0x2912f6(0x1fe)]??[])[_0x2912f6(0x1f5)](_0x4238af=>({'id':_0x4238af['id'],'roleName':_0x4238af[_0x2912f6(0x1e5)],'roleType':_0x4238af[_0x2912f6(0x1df)]}))});}return _0x16bb4d;}export function flattenRuntimeMenuRolePermits(_0x1e6cfd){const _0x2f929f=[],_0xe865bc=_0x37727e=>{const _0x45c6b0=a46_0x358d;_0x2f929f[_0x45c6b0(0x203)](_0x37727e);for(const _0x58641b of _0x37727e[_0x45c6b0(0x1fa)]??[])_0xe865bc(_0x58641b);};for(const _0x291ab7 of _0x1e6cfd)_0xe865bc(_0x291ab7);return _0x2f929f;}export function runtimePermitWriteResult(_0x320d37,_0x1892c7,_0x58b266,_0x48cc86,_0x588981,_0x4a5da5=[]){const _0x3d8a60=a46_0x43b808;return{'operation':_0x320d37,'scope':_0x3d8a60(0x1fb),'selector':_0x1892c7,'before':_0x58b266,'after':_0x48cc86,'dryRun':![],'backend':_0x588981,'warnings':_0x4a5da5};}export function menuPermitDto(_0x1afade,_0x35d7cc,_0x1d6012){const _0x2680bb=a46_0x43b808;return{..._0x35d7cc[_0x2680bb(0x1f1)]!=null?{'id':_0x35d7cc[_0x2680bb(0x1f1)]}:{},'appCode':_0x1afade,'menuId':_0x35d7cc['id'],'pageId':_0x35d7cc[_0x2680bb(0x211)]??null,'resourceCode':String(_0x35d7cc['id']),'resourceType':_0x2680bb(0x1eb),'resourceName':_0x35d7cc['label'],'rolePermit':_0x1d6012};}
1
+ const a46_0x3aff2d=a46_0x283e;function a46_0x8d52(){const _0x35bfb6=['validation','787544QYZUef','detail-roles','trim','push','Ask\x20an\x20application\x20manager\x20to\x20perform\x20this\x20operation.','2360XNXyWL','161256UoscTM','ALL','Cannot\x20revoke\x20the\x20last\x20role\x20from\x20a\x20runtime\x20resource.','3647502gTfwcp','values','userId','split','datasetCode','dataCreate','label','Pass\x20exactly\x20one\x20of\x20--grant\x20or\x20--revoke.','dataPermit','\x20has\x20full\x20runtime\x20access\x20and\x20cannot\x20be\x20a\x20resource\x20permission\x20target.','6oGmcjv','Cannot\x20change\x20resource\x20permissions\x20for\x20','3526240bTQBRg','OWNER','\x20runtime\x20role\x20','boolean','length','flag','SELF','Use\x20a\x20role\x20ID\x20from\x20`lovrabet\x20role\x20list`.','343bHHYMv','7227RZQXOu','key','9290ShppTp','MENU','filter','some','Comma-separated\x20runtime\x20role\x20IDs\x20or\x20names','number','Runtime\x20menu\x20ID','string','Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name','1198765ssUrsE','appCode','\x20must\x20contain\x20at\x20least\x20one\x20value.','role','roleType','export-roles','dataExport','update-roles','permitId','toUpperCase','Cannot\x20resolve\x20the\x20current\x20AK\x20userId\x20for\x20permission\x20management.','runtime','\x22\x20is\x20ambiguous.','resourceType','map','revoke','roleName','Permission\x20role\x20\x22','children','ADMIN','userList','pageId','Revoke\x20the\x20selected\x20resources\x20from\x20the\x20role','grant','SELF\x20is\x20only\x20valid\x20for\x20--row-roles.','2427RyKAwA','dataUpdate','test','Grant\x20the\x20selected\x20resources\x20to\x20the\x20role','menu-id'];a46_0x8d52=function(){return _0x35bfb6;};return a46_0x8d52();}(function(_0x4ca5ba,_0x4f86ae){const _0x9ec4f6=a46_0x283e,_0x52156c=_0x4ca5ba();while(!![]){try{const _0x476305=-parseInt(_0x9ec4f6(0x1c7))/0x1+-parseInt(_0x9ec4f6(0x1cc))/0x2*(parseInt(_0x9ec4f6(0x1c1))/0x3)+parseInt(_0x9ec4f6(0x1dc))/0x4+-parseInt(_0x9ec4f6(0x1a8))/0x5*(-parseInt(_0x9ec4f6(0x1da))/0x6)+parseInt(_0x9ec4f6(0x1e4))/0x7*(parseInt(_0x9ec4f6(0x1cd))/0x8)+-parseInt(_0x9ec4f6(0x1d0))/0x9+parseInt(_0x9ec4f6(0x1e7))/0xa*(parseInt(_0x9ec4f6(0x1e5))/0xb);if(_0x476305===_0x4f86ae)break;else _0x52156c['push'](_0x52156c['shift']());}catch(_0xdda8a6){_0x52156c['push'](_0x52156c['shift']());}}}(a46_0x8d52,0x8ba0d));import{getLoginUserInfo,listRuntimePermitRoles,listRuntimeRoleUsers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a46_0x283e(_0x387bd8,_0x5a444a){_0x387bd8=_0x387bd8-0x1a3;const _0x8d52aa=a46_0x8d52();let _0x283e20=_0x8d52aa[_0x387bd8];return _0x283e20;}export const MENU_ID_FLAG={'name':a46_0x3aff2d(0x1c5),'type':a46_0x3aff2d(0x1a4),'required':!![],'description':a46_0x3aff2d(0x1a5)};export const ROLE_REF_FLAG={'name':a46_0x3aff2d(0x1ab),'type':'string','required':!![],'description':a46_0x3aff2d(0x1a7)};export const GRANT_FLAG={'name':a46_0x3aff2d(0x1bf),'type':a46_0x3aff2d(0x1df),'description':a46_0x3aff2d(0x1c4)};export const REVOKE_FLAG={'name':a46_0x3aff2d(0x1b7),'type':'boolean','description':a46_0x3aff2d(0x1be)};export const PAGE_SLOT_SPECS=[{'flag':'menu-roles','key':'menuPermit','allowSelf':![]},{'flag':'create-roles','key':a46_0x3aff2d(0x1d5),'allowSelf':![]},{'flag':a46_0x3aff2d(0x1af),'key':a46_0x3aff2d(0x1c2),'allowSelf':![]},{'flag':'delete-roles','key':'dataDelete','allowSelf':![]},{'flag':a46_0x3aff2d(0x1c8),'key':'dataDetail','allowSelf':![]},{'flag':a46_0x3aff2d(0x1ad),'key':a46_0x3aff2d(0x1ae),'allowSelf':![]},{'flag':'row-roles','key':a46_0x3aff2d(0x1d8),'allowSelf':!![]}];export const PAGE_ROLE_FLAGS=PAGE_SLOT_SPECS[a46_0x3aff2d(0x1b6)](_0x9cfd9c=>({'name':_0x9cfd9c[a46_0x3aff2d(0x1e1)],'type':a46_0x3aff2d(0x1a6),'description':a46_0x3aff2d(0x1a3)}));export function splitRefs(_0x409a92,_0x389293){const _0x1e5cc6=a46_0x3aff2d,_0x1ef1e2=[...new Set(_0x409a92[_0x1e5cc6(0x1d3)](',')[_0x1e5cc6(0x1b6)](_0x214c2e=>_0x214c2e[_0x1e5cc6(0x1c9)]())['filter'](Boolean))];if(_0x1ef1e2[_0x1e5cc6(0x1e0)]===0x0)throw CliErrors[_0x1e5cc6(0x1c6)](_0x389293+_0x1e5cc6(0x1aa));return _0x1ef1e2;}export function assertGrantOrRevoke(_0x1b3d04,_0x2724f1){const _0x3a52c6=a46_0x3aff2d;if(_0x1b3d04===_0x2724f1)throw CliErrors[_0x3a52c6(0x1c6)](_0x3a52c6(0x1d7));return _0x1b3d04?_0x3a52c6(0x1bf):'revoke';}function resolvePermitRole(_0x16da6b,_0x2d165b){const _0x62b2df=a46_0x3aff2d,_0x733021=_0x2d165b[_0x62b2df(0x1c9)](),_0x2210c9=/^-?\d+$/[_0x62b2df(0x1c3)](_0x733021)?_0x16da6b[_0x62b2df(0x1e9)](_0x34dc90=>_0x34dc90['id']===Number(_0x733021)):_0x16da6b[_0x62b2df(0x1e9)](_0x2424da=>_0x2424da['roleName']===_0x733021||_0x2424da[_0x62b2df(0x1ac)]===_0x733021[_0x62b2df(0x1b1)]());if(_0x2210c9['length']!==0x1)throw CliErrors[_0x62b2df(0x1c6)](_0x2210c9[_0x62b2df(0x1e0)]===0x0?_0x62b2df(0x1b9)+_0x733021+'\x22\x20was\x20not\x20found.':_0x62b2df(0x1b9)+_0x733021+_0x62b2df(0x1b4),_0x62b2df(0x1e3));return _0x2210c9[0x0];}export async function resolveRuntimePermitRoles(_0x9179db,_0x51fc45,_0xab937b){const _0x30a500=a46_0x3aff2d,_0x82caa5=await listRuntimePermitRoles(_0x9179db,{'needSelf':!![],'needPublic':!![]}),_0x50195f=[...new Map(_0x51fc45[_0x30a500(0x1b6)](_0x535eec=>resolvePermitRole(_0x82caa5,_0x535eec))[_0x30a500(0x1b6)](_0x1f83d8=>[_0x1f83d8['id'],_0x1f83d8]))[_0x30a500(0x1d1)]()],_0x27c0bb=_0x50195f['find'](_0x4358db=>_0x4358db[_0x30a500(0x1ac)]===_0x30a500(0x1bb)||_0x4358db[_0x30a500(0x1ac)]===_0x30a500(0x1dd));if(_0x27c0bb)throw CliErrors['validation'](_0x27c0bb['roleType']+_0x30a500(0x1d9),'Configure\x20USER,\x20CUSTOM,\x20or\x20an\x20applicable\x20special\x20role\x20instead.');if(!_0xab937b&&_0x50195f[_0x30a500(0x1ea)](_0x5d6690=>_0x5d6690[_0x30a500(0x1ac)]===_0x30a500(0x1e2)))throw CliErrors[_0x30a500(0x1c6)](_0x30a500(0x1c0));return _0x50195f;}export async function assertRuntimePermissionManager(_0x3ffc8f){const _0x1911ca=a46_0x3aff2d,_0x3bcd05=await getLoginUserInfo(),_0x3104d4=_0x3bcd05[_0x1911ca(0x1d2)]??_0x3bcd05['id'],_0x3402a5=Number(_0x3104d4);if(!Number['isSafeInteger'](_0x3402a5)||_0x3402a5<=0x0)throw CliErrors['validation'](_0x1911ca(0x1b2));const _0x418eca=await listRuntimeRoleUsers(_0x3ffc8f),_0x44de3b=_0x418eca[_0x1911ca(0x1ea)](_0x27f9cc=>(_0x27f9cc[_0x1911ca(0x1ac)]==='ADMIN'||_0x27f9cc[_0x1911ca(0x1ac)]===_0x1911ca(0x1dd))&&_0x27f9cc[_0x1911ca(0x1bc)]['some'](_0x2a8d95=>_0x2a8d95['userId']===_0x3402a5));if(!_0x44de3b)throw CliErrors[_0x1911ca(0x1c6)]('Runtime\x20resource\x20permission\x20changes\x20require\x20an\x20ADMIN\x20or\x20OWNER\x20role.',_0x1911ca(0x1cb));}export function assertRuntimePermitRoleConfigurable(_0x38f840){const _0x2ba50f=a46_0x3aff2d;if(_0x38f840['roleType']==='ADMIN'||_0x38f840[_0x2ba50f(0x1ac)]===_0x2ba50f(0x1dd))throw CliErrors[_0x2ba50f(0x1c6)](_0x2ba50f(0x1db)+_0x38f840[_0x2ba50f(0x1ac)]+_0x2ba50f(0x1de)+_0x38f840['roleName']+'.','ADMIN\x20and\x20OWNER\x20have\x20full\x20runtime\x20access;\x20configure\x20USER\x20or\x20CUSTOM\x20instead.');}function asPermitRole(_0x243310){const _0x45502e=a46_0x3aff2d;return{'id':_0x243310['id'],'roleName':_0x243310[_0x45502e(0x1b8)],'roleType':_0x243310[_0x45502e(0x1ac)],'allowed':!![]};}export function applyRuntimeRolePermission(_0x2662d3,_0x24e771,_0xa07cd5,_0x184785){const _0x3aa8be=a46_0x3aff2d,_0x5983fe=!_0x2662d3||_0x2662d3[_0x3aa8be(0x1e0)]===0x0,_0x5e0846=_0x2662d3?.[_0x3aa8be(0x1ea)](_0x26f344=>_0x26f344[_0x3aa8be(0x1ac)]===_0x3aa8be(0x1ce))??![];if(_0x184785===_0x3aa8be(0x1bf)&&(_0x5983fe||_0x5e0846))return{'roles':_0x2662d3??null,'changed':![]};let _0xcbb699=_0x5983fe||_0x5e0846?_0xa07cd5[_0x3aa8be(0x1e9)](_0x1c2634=>_0x1c2634['id']>0x0):[..._0x2662d3];const _0x48ef85=_0xcbb699['some'](_0x32eb9c=>_0x32eb9c['id']===_0x24e771['id']);if(_0x184785===_0x3aa8be(0x1bf)){if(_0x48ef85)return{'roles':_0xcbb699,'changed':![]};return _0xcbb699[_0x3aa8be(0x1ca)](asPermitRole(_0x24e771)),{'roles':_0xcbb699,'changed':!![]};}if(!_0x48ef85)return{'roles':_0xcbb699,'changed':_0x5983fe||_0x5e0846};_0xcbb699=_0xcbb699[_0x3aa8be(0x1e9)](_0x302e40=>_0x302e40['id']!==_0x24e771['id']);if(_0xcbb699[_0x3aa8be(0x1e0)]===0x0)throw CliErrors[_0x3aa8be(0x1c6)](_0x3aa8be(0x1cf),'The\x20current\x20service\x20contract\x20does\x20not\x20persist\x20an\x20empty\x20rolePermit;\x20grant\x20another\x20role\x20first.');return{'roles':_0xcbb699,'changed':!![]};}export function projectRuntimePagePermit(_0x26e1f0){const _0x21af1a=a46_0x3aff2d,_0x24b445={'menuId':_0x26e1f0['menuId'],'pageId':_0x26e1f0['pageId'],'appCode':_0x26e1f0[_0x21af1a(0x1a9)],'datasetCode':_0x26e1f0[_0x21af1a(0x1d4)]};for(const _0xdb991d of PAGE_SLOT_SPECS){const _0x3b3bb8=_0x26e1f0[_0xdb991d[_0x21af1a(0x1e6)]];_0x3b3bb8&&(_0x24b445[_0xdb991d[_0x21af1a(0x1e6)]]={'resourceCode':_0x3b3bb8['resourceCode'],'resourceType':_0x3b3bb8[_0x21af1a(0x1b5)],'roles':(_0x3b3bb8['rolePermit']??[])[_0x21af1a(0x1b6)](_0x3e5597=>({'id':_0x3e5597['id'],'roleName':_0x3e5597[_0x21af1a(0x1b8)],'roleType':_0x3e5597['roleType']}))});}return _0x24b445;}export function flattenRuntimeMenuRolePermits(_0x38cc7b){const _0x48394e=[],_0x5e8869=_0x432ad0=>{const _0x2369f9=a46_0x283e;_0x48394e[_0x2369f9(0x1ca)](_0x432ad0);for(const _0x2b12b3 of _0x432ad0[_0x2369f9(0x1ba)]??[])_0x5e8869(_0x2b12b3);};for(const _0x3b9117 of _0x38cc7b)_0x5e8869(_0x3b9117);return _0x48394e;}export function runtimePermitWriteResult(_0x349a78,_0x47f51c,_0x1661aa,_0x6dfecb,_0x3d940b,_0x1923db=[]){const _0x46d004=a46_0x3aff2d;return{'operation':_0x349a78,'scope':_0x46d004(0x1b3),'selector':_0x47f51c,'before':_0x1661aa,'after':_0x6dfecb,'dryRun':![],'backend':_0x3d940b,'warnings':_0x1923db};}export function menuPermitDto(_0x1ac586,_0x2a5100,_0x2928e8){const _0x1e6a8e=a46_0x3aff2d;return{..._0x2a5100['permitId']!=null?{'id':_0x2a5100[_0x1e6a8e(0x1b0)]}:{},'appCode':_0x1ac586,'menuId':_0x2a5100['id'],'pageId':_0x2a5100[_0x1e6a8e(0x1bd)]??null,'resourceCode':String(_0x2a5100['id']),'resourceType':_0x1e6a8e(0x1e8),'resourceName':_0x2a5100[_0x1e6a8e(0x1d6)],'rolePermit':_0x2928e8};}
@@ -1 +1 @@
1
- const a47_0x4597e5=a47_0x4186;(function(_0x584ffc,_0xaf9959){const _0x131680=a47_0x4186,_0x3dd6a1=_0x584ffc();while(!![]){try{const _0x3c2f6d=parseInt(_0x131680(0x16e))/0x1*(-parseInt(_0x131680(0x13f))/0x2)+parseInt(_0x131680(0x14d))/0x3+parseInt(_0x131680(0x13e))/0x4+-parseInt(_0x131680(0x147))/0x5*(-parseInt(_0x131680(0x15f))/0x6)+parseInt(_0x131680(0x13d))/0x7*(parseInt(_0x131680(0x13c))/0x8)+-parseInt(_0x131680(0x179))/0x9+-parseInt(_0x131680(0x15b))/0xa;if(_0x3c2f6d===_0xaf9959)break;else _0x3dd6a1['push'](_0x3dd6a1['shift']());}catch(_0x367403){_0x3dd6a1['push'](_0x3dd6a1['shift']());}}}(a47_0x1dca,0xbc105));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':a47_0x4597e5(0x15d),'type':a47_0x4597e5(0x14a),'description':'Path\x20to\x20a\x20local\x20UTF-8\x20JavaScript\x20or\x20TypeScript\x20file'},FUNCTION_NAME_FLAG={'name':a47_0x4597e5(0x146),'type':a47_0x4597e5(0x14a),'required':!![],'description':a47_0x4597e5(0x14e)},DESCRIPTION_FLAG={'name':'description','type':a47_0x4597e5(0x14a),'description':'Personal\x20Backend\x20Function\x20description'},SOURCE_SESSION_FLAG={'name':a47_0x4597e5(0x16c),'type':'string','description':a47_0x4597e5(0x144)};function normalizeFunctionName(_0x2777e3){const _0x5f3a52=a47_0x4597e5,_0x428ead=String(_0x2777e3||'')['trim']();if(!_0x428ead||!FUNCTION_NAME_PATTERN['test'](_0x428ead))throw CliErrors['validation'](_0x5f3a52(0x169));return _0x428ead;}function readScriptFile(_0x2deea0){const _0x29b661=a47_0x4597e5;if(!_0x2deea0)throw CliErrors['validation'](_0x29b661(0x167));if(!existsSync(_0x2deea0))throw CliErrors[_0x29b661(0x164)](_0x29b661(0x175)+_0x2deea0);if(!statSync(_0x2deea0)['isFile']())throw CliErrors[_0x29b661(0x164)](_0x29b661(0x174)+_0x2deea0);const _0x50a254=readFileSync(_0x2deea0,_0x29b661(0x177));if(!_0x50a254[_0x29b661(0x14c)]())throw CliErrors[_0x29b661(0x164)]('Personal\x20Backend\x20Function\x20script\x20file\x20is\x20blank.');return _0x50a254;}function a47_0x4186(_0x206830,_0x3c9aa2){_0x206830=_0x206830-0x137;const _0x1dca6e=a47_0x1dca();let _0x418699=_0x1dca6e[_0x206830];return _0x418699;}function optionalTrimmed(_0x223154){const _0xf085ee=a47_0x4597e5,_0x930c5f=String(_0x223154||'')[_0xf085ee(0x14c)]();return _0x930c5f||undefined;}function summarizeBff(_0x1ba3e3){const _0x5797f7=a47_0x4597e5;return{'id':_0x1ba3e3['id'],'appCode':_0x1ba3e3[_0x5797f7(0x172)],'functionName':_0x1ba3e3[_0x5797f7(0x154)],'description':_0x1ba3e3[_0x5797f7(0x156)],'scriptType':_0x1ba3e3[_0x5797f7(0x142)],'version':_0x1ba3e3[_0x5797f7(0x161)],'gmtModified':_0x1ba3e3['gmtModified'],'updateTime':_0x1ba3e3[_0x5797f7(0x158)]};}function detailBff(_0x57c0ff){const _0x35630e=a47_0x4597e5;return{'id':_0x57c0ff['id'],'appCode':_0x57c0ff[_0x35630e(0x172)],'functionName':_0x57c0ff['functionName'],'description':_0x57c0ff[_0x35630e(0x156)],'scriptType':_0x57c0ff['scriptType'],'scriptContent':_0x57c0ff[_0x35630e(0x157)]??'','config':_0x57c0ff['config'],'version':_0x57c0ff[_0x35630e(0x161)],'createUserId':_0x57c0ff[_0x35630e(0x155)],'gmtCreate':_0x57c0ff['gmtCreate'],'gmtModified':_0x57c0ff[_0x35630e(0x160)],'createTime':_0x57c0ff[_0x35630e(0x16d)],'updateTime':_0x57c0ff[_0x35630e(0x158)]};}function buildCreateInput(_0x539f45){const _0x4fde32=a47_0x4597e5;return{'functionName':normalizeFunctionName(_0x539f45['str'](_0x4fde32(0x146))),...optionalTrimmed(_0x539f45['str'](_0x4fde32(0x156)))?{'description':optionalTrimmed(_0x539f45[_0x4fde32(0x166)](_0x4fde32(0x156)))}:{},'scriptContent':readScriptFile(_0x539f45['str']('file')),...optionalTrimmed(_0x539f45[_0x4fde32(0x166)](_0x4fde32(0x16c)))?{'sourceSessionId':optionalTrimmed(_0x539f45[_0x4fde32(0x166)](_0x4fde32(0x16c)))}:{}};}function buildUpdateInput(_0x19bace){const _0x320afd=a47_0x4597e5,_0x562c70={};optionalTrimmed(_0x19bace['str'](_0x320afd(0x146)))&&(_0x562c70[_0x320afd(0x154)]=normalizeFunctionName(_0x19bace['str']('name')));_0x19bace['flag'](_0x320afd(0x156))!==undefined&&(_0x562c70[_0x320afd(0x156)]=_0x19bace[_0x320afd(0x166)](_0x320afd(0x156)));optionalTrimmed(_0x19bace['str'](_0x320afd(0x15d)))&&(_0x562c70['scriptContent']=readScriptFile(_0x19bace['str']('file')));_0x19bace[_0x320afd(0x143)](_0x320afd(0x16c))!==undefined&&(_0x562c70[_0x320afd(0x16a)]=_0x19bace[_0x320afd(0x166)](_0x320afd(0x16c)));if(Object[_0x320afd(0x178)](_0x562c70)[_0x320afd(0x173)]===0x0)throw CliErrors['validation'](_0x320afd(0x171));return _0x562c70;}function a47_0x1dca(){const _0x2214b7=['update','--name\x20must\x20be\x20a\x20valid\x20JavaScript\x20identifier,\x20for\x20example\x20loadOrders.','sourceSessionId','write','source-session-id','createTime','2rrOGDV','personal-bff','POST','personal-bff\x20update\x20requires\x20at\x20least\x20one\x20of\x20--name,\x20--description,\x20--file,\x20or\x20--source-session-id.','appCode','length','File\x20is\x20not\x20a\x20regular\x20file:\x20','File\x20not\x20found:\x20','/update','utf8','keys','8159022ruGWAC','/client/runtime-bff/personal/create','--params\x20must\x20be\x20a\x20JSON\x20object.','num','params','/client/runtime-bff/personal/','176192dmyBOs','217YEsrNe','5570248eCFpxw','481226lTxgoC','Saves\x20the\x20local\x20script\x20as\x20a\x20Personal\x20Backend\x20Function.\x20The\x20script\x20can\x20then\x20be\x20called\x20in\x20the\x20current\x20app.','read','scriptType','flag','Optional\x20source\x20RuntimeAgent\x20session\x20id','verbose','name','115rfycil','isArray','bool','string','Update\x20a\x20Personal\x20Backend\x20Function\x20by\x20ID','trim','3443070SpvlDq','Personal\x20Backend\x20Function\x20name,\x20for\x20example\x20loadOrders','Show\x20one\x20Personal\x20Backend\x20Function\x20by\x20id','build','exec','map','Preview:\x20create\x20Personal\x20Backend\x20Function\x20','functionName','createUserId','description','scriptContent','updateTime','Created\x20Personal\x20Backend\x20Function\x20','Execute\x20a\x20Personal\x20Backend\x20Function\x20by\x20ID,\x20optionally\x20with\x20JSON\x20params','18886020ldaypN','body','file','Personal\x20Backend\x20Function\x20script\x20ID','214878affgQH','gmtModified','version','list','Preview:\x20update\x20Personal\x20Backend\x20Function\x20','validation','create','str','File\x20path\x20is\x20required.'];a47_0x1dca=function(){return _0x2214b7;};return a47_0x1dca();}function parseExecParams(_0x4d4c9a){const _0x29a6e2=a47_0x4597e5,_0x27783a=parseJsonParams(_0x4d4c9a)??{};if(Array[_0x29a6e2(0x148)](_0x27783a))throw CliErrors[_0x29a6e2(0x164)](_0x29a6e2(0x138));return _0x27783a;}const personalBffList={'service':a47_0x4597e5(0x16f),'command':a47_0x4597e5(0x162),'description':'List\x20current\x20user\x27s\x20Personal\x20Backend\x20Function\x20scripts\x20for\x20the\x20current\x20app','risk':a47_0x4597e5(0x141),'flags':[VERBOSE_FLAG],async 'execute'(_0x34ca07){const _0x4d6f02=a47_0x4597e5,_0x2508e4=await listPersonalBffs(_0x34ca07['appCode']);return{'ok':!![],'data':{'total':_0x2508e4['length'],'items':_0x34ca07[_0x4d6f02(0x149)](_0x4d6f02(0x145))?_0x2508e4:_0x2508e4[_0x4d6f02(0x152)](summarizeBff)}};}},personalBffDetail={'service':a47_0x4597e5(0x16f),'command':'detail','description':a47_0x4597e5(0x14f),'risk':a47_0x4597e5(0x141),'flags':[{...ID_FLAG,'description':'Personal\x20Backend\x20Function\x20script\x20ID'}],async 'execute'(_0x5f45c9){const _0x5479af=a47_0x4597e5,_0x404418=await getPersonalBff(_0x5f45c9['num']('id'),_0x5f45c9[_0x5479af(0x172)]);return{'ok':!![],'data':detailBff(_0x404418)};}},personalBffCreate={'service':'personal-bff','command':a47_0x4597e5(0x165),'description':'Create\x20a\x20Personal\x20Backend\x20Function\x20from\x20a\x20local\x20script\x20file','risk':a47_0x4597e5(0x16b),'confirmationDescription':a47_0x4597e5(0x140),'flags':[FUNCTION_NAME_FLAG,{...FILE_FLAG,'required':!![]},DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x106ee2){const _0x56af4d=a47_0x4597e5,_0x3e650c=buildCreateInput(_0x106ee2),_0x52daec=await createPersonalBff(_0x106ee2[_0x56af4d(0x172)],_0x3e650c);return{'ok':!![],'data':detailBff(_0x52daec),'message':_0x56af4d(0x159)+_0x52daec['id']+(_0x52daec['functionName']?'\x20('+_0x52daec['functionName']+')':'')};},async 'dryRun'(_0x5aa42d){const _0x45810f=a47_0x4597e5,_0x45489a=buildCreateInput(_0x5aa42d);return dryRun(_0x45810f(0x170),_0x45810f(0x137))[_0x45810f(0x15c)]({'appCode':_0x5aa42d['appCode'],..._0x45489a})[_0x45810f(0x156)](_0x45810f(0x153)+_0x45489a[_0x45810f(0x154)])[_0x45810f(0x150)]();}},personalBffUpdate={'service':a47_0x4597e5(0x16f),'command':a47_0x4597e5(0x168),'description':a47_0x4597e5(0x14b),'risk':a47_0x4597e5(0x16b),'confirmationDescription':'Updates\x20the\x20Personal\x20Backend\x20Function\x20script\x20or\x20metadata.\x20Later\x20calls\x20use\x20the\x20new\x20version.','flags':[{...ID_FLAG,'description':a47_0x4597e5(0x15e)},{...FUNCTION_NAME_FLAG,'required':![]},FILE_FLAG,DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x4d7cce){const _0x32f337=a47_0x4597e5,_0x2e21b6=_0x4d7cce[_0x32f337(0x139)]('id'),_0x9cef1=buildUpdateInput(_0x4d7cce),_0x117cdf=await updatePersonalBff(_0x2e21b6,_0x4d7cce['appCode'],_0x9cef1);return{'ok':!![],'data':detailBff(_0x117cdf),'message':'Updated\x20Personal\x20Backend\x20Function\x20'+_0x117cdf['id']+(_0x117cdf[_0x32f337(0x154)]?'\x20('+_0x117cdf[_0x32f337(0x154)]+')':'')};},async 'dryRun'(_0x12c2dc){const _0x4f6a90=a47_0x4597e5,_0x38e4b3=_0x12c2dc[_0x4f6a90(0x139)]('id'),_0x21a0f2=buildUpdateInput(_0x12c2dc);return dryRun(_0x4f6a90(0x170),_0x4f6a90(0x13b)+_0x38e4b3+_0x4f6a90(0x176))['body']({'appCode':_0x12c2dc[_0x4f6a90(0x172)],..._0x21a0f2})[_0x4f6a90(0x156)](_0x4f6a90(0x163)+_0x38e4b3)['build']();}},personalBffExec={'service':'personal-bff','command':a47_0x4597e5(0x151),'description':a47_0x4597e5(0x15a),'risk':a47_0x4597e5(0x16b),'confirmationDescription':'Runs\x20the\x20Personal\x20Backend\x20Function\x20script.\x20The\x20script\x20may\x20read\x20or\x20change\x20business\x20data,\x20or\x20call\x20external\x20services.','flags':[{...ID_FLAG,'description':'Personal\x20Backend\x20Function\x20script\x20ID'},{...PARAMS_FLAG,'description':'JSON\x20object\x20passed\x20to\x20the\x20Personal\x20Backend\x20Function\x20execution'}],async 'validate'(_0x24ac5f){const _0x1d16ae=a47_0x4597e5;parseExecParams(_0x24ac5f[_0x1d16ae(0x166)](_0x1d16ae(0x13a)));},async 'execute'(_0x2c50a6){const _0x397c75=a47_0x4597e5,_0x5dca86=_0x2c50a6[_0x397c75(0x139)]('id'),_0x376d1d=parseExecParams(_0x2c50a6[_0x397c75(0x166)]('params')),_0x194938=await executePersonalBff(_0x5dca86,_0x2c50a6['appCode'],_0x376d1d);return{'ok':!![],'data':{'result':_0x194938},'message':'Executed\x20Personal\x20Backend\x20Function\x20'+_0x5dca86};}};export const personalBffDefinitions=[personalBffList,personalBffDetail,personalBffCreate,personalBffUpdate,personalBffExec];
1
+ const a47_0x24cddd=a47_0x3ed8;(function(_0x4f58a3,_0x108cc0){const _0x3accab=a47_0x3ed8,_0x1f8360=_0x4f58a3();while(!![]){try{const _0x31a509=parseInt(_0x3accab(0x1ee))/0x1+parseInt(_0x3accab(0x1fb))/0x2*(parseInt(_0x3accab(0x1dc))/0x3)+-parseInt(_0x3accab(0x1f4))/0x4+-parseInt(_0x3accab(0x1d3))/0x5*(-parseInt(_0x3accab(0x1c6))/0x6)+parseInt(_0x3accab(0x1d8))/0x7*(-parseInt(_0x3accab(0x204))/0x8)+-parseInt(_0x3accab(0x205))/0x9+-parseInt(_0x3accab(0x1d1))/0xa*(-parseInt(_0x3accab(0x1db))/0xb);if(_0x31a509===_0x108cc0)break;else _0x1f8360['push'](_0x1f8360['shift']());}catch(_0x3e86fc){_0x1f8360['push'](_0x1f8360['shift']());}}}(a47_0x1a9a,0xdb073));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';function a47_0x3ed8(_0x495475,_0x477cf6){_0x495475=_0x495475-0x1bd;const _0x1a9afa=a47_0x1a9a();let _0x3ed8f2=_0x1a9afa[_0x495475];return _0x3ed8f2;}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':a47_0x24cddd(0x1d6),'type':'string','description':a47_0x24cddd(0x1ca)},FUNCTION_NAME_FLAG={'name':a47_0x24cddd(0x1fd),'type':a47_0x24cddd(0x1f5),'required':!![],'description':'Personal\x20Backend\x20Function\x20name,\x20for\x20example\x20loadOrders'},DESCRIPTION_FLAG={'name':a47_0x24cddd(0x1fc),'type':a47_0x24cddd(0x1f5),'description':a47_0x24cddd(0x1c0)},SOURCE_SESSION_FLAG={'name':'source-session-id','type':a47_0x24cddd(0x1f5),'description':a47_0x24cddd(0x1eb)};function normalizeFunctionName(_0x471470){const _0x170d15=a47_0x24cddd,_0x469fcc=String(_0x471470||'')[_0x170d15(0x1cf)]();if(!_0x469fcc||!FUNCTION_NAME_PATTERN['test'](_0x469fcc))throw CliErrors[_0x170d15(0x1dd)]('--name\x20must\x20be\x20a\x20valid\x20JavaScript\x20identifier,\x20for\x20example\x20loadOrders.');return _0x469fcc;}function readScriptFile(_0x5d2e05){const _0x59bb80=a47_0x24cddd;if(!_0x5d2e05)throw CliErrors[_0x59bb80(0x1dd)](_0x59bb80(0x1e8));if(!existsSync(_0x5d2e05))throw CliErrors[_0x59bb80(0x1dd)]('File\x20not\x20found:\x20'+_0x5d2e05);if(!statSync(_0x5d2e05)[_0x59bb80(0x1f8)]())throw CliErrors[_0x59bb80(0x1dd)](_0x59bb80(0x1d9)+_0x5d2e05);const _0x47ea39=readFileSync(_0x5d2e05,_0x59bb80(0x1cd));if(!_0x47ea39[_0x59bb80(0x1cf)]())throw CliErrors[_0x59bb80(0x1dd)](_0x59bb80(0x1e0));return _0x47ea39;}function optionalTrimmed(_0x4ca3de){const _0x1b56d9=a47_0x24cddd,_0x38397f=String(_0x4ca3de||'')[_0x1b56d9(0x1cf)]();return _0x38397f||undefined;}function summarizeBff(_0x5732ec){const _0x3a09f3=a47_0x24cddd;return{'id':_0x5732ec['id'],'appCode':_0x5732ec[_0x3a09f3(0x1d5)],'functionName':_0x5732ec[_0x3a09f3(0x1e4)],'description':_0x5732ec[_0x3a09f3(0x1fc)],'scriptType':_0x5732ec[_0x3a09f3(0x1fe)],'version':_0x5732ec[_0x3a09f3(0x1c8)],'gmtModified':_0x5732ec[_0x3a09f3(0x1d4)],'updateTime':_0x5732ec['updateTime']};}function detailBff(_0x3aac1c){const _0xbd0172=a47_0x24cddd;return{'id':_0x3aac1c['id'],'appCode':_0x3aac1c['appCode'],'functionName':_0x3aac1c[_0xbd0172(0x1e4)],'description':_0x3aac1c[_0xbd0172(0x1fc)],'scriptType':_0x3aac1c[_0xbd0172(0x1fe)],'scriptContent':_0x3aac1c[_0xbd0172(0x1f6)]??'','config':_0x3aac1c[_0xbd0172(0x201)],'version':_0x3aac1c[_0xbd0172(0x1c8)],'createUserId':_0x3aac1c[_0xbd0172(0x1ed)],'gmtCreate':_0x3aac1c['gmtCreate'],'gmtModified':_0x3aac1c[_0xbd0172(0x1d4)],'createTime':_0x3aac1c[_0xbd0172(0x1e3)],'updateTime':_0x3aac1c[_0xbd0172(0x1de)]};}function buildCreateInput(_0x34f1c1){const _0x1cc301=a47_0x24cddd;return{'functionName':normalizeFunctionName(_0x34f1c1[_0x1cc301(0x1fa)]('name')),...optionalTrimmed(_0x34f1c1[_0x1cc301(0x1fa)](_0x1cc301(0x1fc)))?{'description':optionalTrimmed(_0x34f1c1['str'](_0x1cc301(0x1fc)))}:{},'scriptContent':readScriptFile(_0x34f1c1[_0x1cc301(0x1fa)](_0x1cc301(0x1d6))),...optionalTrimmed(_0x34f1c1['str'](_0x1cc301(0x203)))?{'sourceSessionId':optionalTrimmed(_0x34f1c1[_0x1cc301(0x1fa)](_0x1cc301(0x203)))}:{}};}function buildUpdateInput(_0x5a61ce){const _0x229af9=a47_0x24cddd,_0x4dbcc0={};optionalTrimmed(_0x5a61ce[_0x229af9(0x1fa)]('name'))&&(_0x4dbcc0[_0x229af9(0x1e4)]=normalizeFunctionName(_0x5a61ce[_0x229af9(0x1fa)](_0x229af9(0x1fd))));_0x5a61ce[_0x229af9(0x1bd)](_0x229af9(0x1fc))!==undefined&&(_0x4dbcc0['description']=_0x5a61ce[_0x229af9(0x1fa)](_0x229af9(0x1fc)));optionalTrimmed(_0x5a61ce[_0x229af9(0x1fa)](_0x229af9(0x1d6)))&&(_0x4dbcc0[_0x229af9(0x1f6)]=readScriptFile(_0x5a61ce[_0x229af9(0x1fa)](_0x229af9(0x1d6))));_0x5a61ce[_0x229af9(0x1bd)]('source-session-id')!==undefined&&(_0x4dbcc0[_0x229af9(0x1c4)]=_0x5a61ce[_0x229af9(0x1fa)](_0x229af9(0x203)));if(Object['keys'](_0x4dbcc0)[_0x229af9(0x202)]===0x0)throw CliErrors[_0x229af9(0x1dd)](_0x229af9(0x1c3));return _0x4dbcc0;}function parseExecParams(_0xd8704b){const _0x319295=a47_0x24cddd,_0x220409=parseJsonParams(_0xd8704b)??{};if(Array[_0x319295(0x1e6)](_0x220409))throw CliErrors[_0x319295(0x1dd)](_0x319295(0x1d2));return _0x220409;}const personalBffList={'service':a47_0x24cddd(0x1ce),'command':a47_0x24cddd(0x1bf),'description':a47_0x24cddd(0x1d7),'risk':'read','flags':[VERBOSE_FLAG],async 'execute'(_0x20de7){const _0x51f49c=a47_0x24cddd,_0x4ef5d1=await listPersonalBffs(_0x20de7['appCode']);return{'ok':!![],'data':{'total':_0x4ef5d1['length'],'items':_0x20de7['bool'](_0x51f49c(0x200))?_0x4ef5d1:_0x4ef5d1[_0x51f49c(0x1ec)](summarizeBff)}};}},personalBffDetail={'service':'personal-bff','command':a47_0x24cddd(0x1df),'description':a47_0x24cddd(0x1ff),'risk':a47_0x24cddd(0x1f3),'flags':[{...ID_FLAG,'description':a47_0x24cddd(0x1e1)}],async 'execute'(_0xd3401){const _0x56e19e=a47_0x24cddd,_0x7ebf0f=await getPersonalBff(_0xd3401[_0x56e19e(0x1cc)]('id'),_0xd3401['appCode']);return{'ok':!![],'data':detailBff(_0x7ebf0f)};}},personalBffCreate={'service':a47_0x24cddd(0x1ce),'command':a47_0x24cddd(0x1c9),'description':a47_0x24cddd(0x1cb),'risk':a47_0x24cddd(0x1c2),'confirmationDescription':a47_0x24cddd(0x1d0),'flags':[FUNCTION_NAME_FLAG,{...FILE_FLAG,'required':!![]},DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x50cb49){const _0x33759d=a47_0x24cddd,_0x4bb56a=buildCreateInput(_0x50cb49),_0x1839e1=await createPersonalBff(_0x50cb49[_0x33759d(0x1d5)],_0x4bb56a);return{'ok':!![],'data':detailBff(_0x1839e1),'message':'Created\x20Personal\x20Backend\x20Function\x20'+_0x1839e1['id']+(_0x1839e1[_0x33759d(0x1e4)]?'\x20('+_0x1839e1[_0x33759d(0x1e4)]+')':'')};},async 'dryRun'(_0x5378b3){const _0x449b44=a47_0x24cddd,_0x1b95f3=buildCreateInput(_0x5378b3);return dryRun(_0x449b44(0x1f0),_0x449b44(0x1c7))['body']({'appCode':_0x5378b3[_0x449b44(0x1d5)],..._0x1b95f3})[_0x449b44(0x1fc)]('Preview:\x20create\x20Personal\x20Backend\x20Function\x20'+_0x1b95f3['functionName'])[_0x449b44(0x1f9)]();}},personalBffUpdate={'service':a47_0x24cddd(0x1ce),'command':a47_0x24cddd(0x1c5),'description':a47_0x24cddd(0x1e9),'risk':a47_0x24cddd(0x1c2),'confirmationDescription':'Updates\x20the\x20Personal\x20Backend\x20Function\x20script\x20or\x20metadata.\x20Later\x20calls\x20use\x20the\x20new\x20version.','flags':[{...ID_FLAG,'description':'Personal\x20Backend\x20Function\x20script\x20ID'},{...FUNCTION_NAME_FLAG,'required':![]},FILE_FLAG,DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x2e2afb){const _0x75a181=a47_0x24cddd,_0x4e2367=_0x2e2afb[_0x75a181(0x1cc)]('id'),_0x10061b=buildUpdateInput(_0x2e2afb),_0x4e6a13=await updatePersonalBff(_0x4e2367,_0x2e2afb[_0x75a181(0x1d5)],_0x10061b);return{'ok':!![],'data':detailBff(_0x4e6a13),'message':_0x75a181(0x1e7)+_0x4e6a13['id']+(_0x4e6a13[_0x75a181(0x1e4)]?'\x20('+_0x4e6a13['functionName']+')':'')};},async 'dryRun'(_0x2be571){const _0xc08a15=a47_0x24cddd,_0x130c07=_0x2be571[_0xc08a15(0x1cc)]('id'),_0x5115da=buildUpdateInput(_0x2be571);return dryRun(_0xc08a15(0x1f0),_0xc08a15(0x1f1)+_0x130c07+_0xc08a15(0x1be))[_0xc08a15(0x1e5)]({'appCode':_0x2be571['appCode'],..._0x5115da})[_0xc08a15(0x1fc)](_0xc08a15(0x1f7)+_0x130c07)[_0xc08a15(0x1f9)]();}},personalBffExec={'service':a47_0x24cddd(0x1ce),'command':a47_0x24cddd(0x1c1),'description':a47_0x24cddd(0x1ef),'risk':a47_0x24cddd(0x1c2),'confirmationDescription':a47_0x24cddd(0x1f2),'flags':[{...ID_FLAG,'description':a47_0x24cddd(0x1e1)},{...PARAMS_FLAG,'description':a47_0x24cddd(0x1da)}],async 'validate'(_0x4df717){const _0x2447ce=a47_0x24cddd;parseExecParams(_0x4df717[_0x2447ce(0x1fa)](_0x2447ce(0x1ea)));},async 'execute'(_0xe3b7a7){const _0x14f10b=a47_0x24cddd,_0xa4809e=_0xe3b7a7[_0x14f10b(0x1cc)]('id'),_0x105504=parseExecParams(_0xe3b7a7[_0x14f10b(0x1fa)](_0x14f10b(0x1ea))),_0x5b4c51=await executePersonalBff(_0xa4809e,_0xe3b7a7[_0x14f10b(0x1d5)],_0x105504);return{'ok':!![],'data':{'result':_0x5b4c51},'message':_0x14f10b(0x1e2)+_0xa4809e};}};function a47_0x1a9a(){const _0x136f38=['85192FsqsYj','11629575DgniPO','flag','/update','list','Personal\x20Backend\x20Function\x20description','exec','write','personal-bff\x20update\x20requires\x20at\x20least\x20one\x20of\x20--name,\x20--description,\x20--file,\x20or\x20--source-session-id.','sourceSessionId','update','906EhAKjm','/client/runtime-bff/personal/create','version','create','Path\x20to\x20a\x20local\x20UTF-8\x20JavaScript\x20or\x20TypeScript\x20file','Create\x20a\x20Personal\x20Backend\x20Function\x20from\x20a\x20local\x20script\x20file','num','utf8','personal-bff','trim','Saves\x20the\x20local\x20script\x20as\x20a\x20Personal\x20Backend\x20Function.\x20The\x20script\x20can\x20then\x20be\x20called\x20in\x20the\x20current\x20app.','2890CCSmoP','--params\x20must\x20be\x20a\x20JSON\x20object.','12015UgXvOB','gmtModified','appCode','file','List\x20current\x20user\x27s\x20Personal\x20Backend\x20Function\x20scripts\x20for\x20the\x20current\x20app','413wHMLYQ','File\x20is\x20not\x20a\x20regular\x20file:\x20','JSON\x20object\x20passed\x20to\x20the\x20Personal\x20Backend\x20Function\x20execution','97515xXEmiO','6lUZxWb','validation','updateTime','detail','Personal\x20Backend\x20Function\x20script\x20file\x20is\x20blank.','Personal\x20Backend\x20Function\x20script\x20ID','Executed\x20Personal\x20Backend\x20Function\x20','createTime','functionName','body','isArray','Updated\x20Personal\x20Backend\x20Function\x20','File\x20path\x20is\x20required.','Update\x20a\x20Personal\x20Backend\x20Function\x20by\x20ID','params','Optional\x20source\x20RuntimeAgent\x20session\x20id','map','createUserId','900906aHxqfv','Execute\x20a\x20Personal\x20Backend\x20Function\x20by\x20ID,\x20optionally\x20with\x20JSON\x20params','POST','/client/runtime-bff/personal/','Runs\x20the\x20Personal\x20Backend\x20Function\x20script.\x20The\x20script\x20may\x20read\x20or\x20change\x20business\x20data,\x20or\x20call\x20external\x20services.','read','4190052tXPOwB','string','scriptContent','Preview:\x20update\x20Personal\x20Backend\x20Function\x20','isFile','build','str','39374UkzwpJ','description','name','scriptType','Show\x20one\x20Personal\x20Backend\x20Function\x20by\x20id','verbose','config','length','source-session-id'];a47_0x1a9a=function(){return _0x136f38;};return a47_0x1a9a();}export const personalBffDefinitions=[personalBffList,personalBffDetail,personalBffCreate,personalBffUpdate,personalBffExec];
@@ -1 +1 @@
1
- const a48_0x5e5582=a48_0x237b;(function(_0x4443f1,_0x31b8f2){const _0x12adce=a48_0x237b,_0x219e78=_0x4443f1();while(!![]){try{const _0x247afd=parseInt(_0x12adce(0x129))/0x1*(parseInt(_0x12adce(0x118))/0x2)+parseInt(_0x12adce(0x143))/0x3+-parseInt(_0x12adce(0x13e))/0x4+-parseInt(_0x12adce(0x12e))/0x5*(parseInt(_0x12adce(0x127))/0x6)+-parseInt(_0x12adce(0x148))/0x7+parseInt(_0x12adce(0x14c))/0x8*(parseInt(_0x12adce(0x120))/0x9)+-parseInt(_0x12adce(0x130))/0xa;if(_0x247afd===_0x31b8f2)break;else _0x219e78['push'](_0x219e78['shift']());}catch(_0x2fa4ea){_0x219e78['push'](_0x219e78['shift']());}}}(a48_0x5f01,0x6ac10));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';function a48_0x237b(_0x5a8aca,_0x1612bf){_0x5a8aca=_0x5a8aca-0x111;const _0x5f0160=a48_0x5f01();let _0x237b57=_0x5f0160[_0x5a8aca];return _0x237b57;}import{datasetDefinitions}from'../commands/dataset/index.js';import{dataDefinitions}from'../commands/data/index.js';import{kbDefinitions}from'../commands/kb/index.js';function a48_0x5f01(){const _0x160cb9=['description','login','read','2585646wJJhGF','`lovrabet\x20logs\x20clear`\x20has\x20been\x20removed.','list','Use\x20`lovrabet\x20workspace\x20use\x20--app\x20<name>`\x20instead.','169976MRdZNJ','config-list','Authentication','Notification\x20Configs','logs','Configuration','get','Personal\x20Backend\x20Function','Agent\x20Schedules','risk','map','Workspace','823624jmgBYD','app','isSingleCommand','Use\x20`lovrabet\x20logs\x20show`\x20to\x20view\x20command\x20history.','values','app\x20use','show','Runtime\x20Permissions','369bELlsR','command','set','Self\x20Update','from','Diagnostics','write','6nbsIZO','SQL\x20Queries','1aYpoYF','Service\x20Tree','\x20\x20[high-risk-write]','auth','`lovrabet\x20auth\x20init`\x20has\x20been\x20removed.','881555BShHKX','Skills','3594720MbTDgI','`lovrabet\x20app\x20init`\x20has\x20been\x20removed.','User\x20Accounts','push','run','Datasets','Artifacts','Backend\x20Function\x20Scripts','init','defaultCommand','has','clear','service','Logs','1907244OJvqBX','install','Instant\x20API','OCR','App\x20Management','1608891ZGPaBs','API\x20Documentation'];a48_0x5f01=function(){return _0x160cb9;};return a48_0x5f01();}import{artifactDefinitions}from'../commands/artifact/index.js';import{personalBffDefinitions}from'../commands/personal-bff/index.js';import{apiDocDefinitions}from'../commands/api-doc/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';import{fileDefinitions}from'../commands/file/index.js';import{ocrDefinitions}from'../commands/ocr/index.js';import{scheduleDefinitions}from'../commands/schedule/index.js';import{userAccountDefinitions}from'../commands/user-account/index.js';import{notificationDefinitions}from'../commands/notification/index.js';import{roleDefinitions}from'../commands/role/index.js';import{permitDefinitions}from'../commands/permit/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x29f9aa){const _0x309e70=a48_0x237b;for(const _0x25e641 of _0x29f9aa){definitions[_0x309e70(0x122)](_0x25e641[_0x309e70(0x13c)]+':'+_0x25e641[_0x309e70(0x121)],_0x25e641);let _0x2469e0=serviceGroups[_0x309e70(0x112)](_0x25e641['service']);!_0x2469e0&&(_0x2469e0=[],serviceGroups[_0x309e70(0x122)](_0x25e641[_0x309e70(0x13c)],_0x2469e0)),_0x2469e0['push'](_0x25e641);}}function registerService(_0x3ee042,_0x457b20,_0x39fb5b){const _0x770dd0=a48_0x237b;registerDefinitions(_0x457b20);const _0x5e1918=_0x4f30ed=>_0x4f30ed===_0x770dd0(0x147)?'':_0x4f30ed===_0x770dd0(0x126)?'\x20\x20[write]':_0x770dd0(0x12b),_0x1db97f={'service':_0x457b20[0x0]['service'],'label':_0x3ee042,'commands':_0x457b20[_0x770dd0(0x116)](_0x2e9fa9=>({'command':_0x2e9fa9['command'],'description':_0x2e9fa9[_0x770dd0(0x145)],'tag':_0x5e1918(_0x2e9fa9[_0x770dd0(0x115)])})),'defaultCommand':_0x39fb5b?.[_0x770dd0(0x139)]??(_0x39fb5b?.[_0x770dd0(0x11a)]?_0x457b20[0x0][_0x770dd0(0x121)]:undefined),'isSingleCommand':_0x39fb5b?.[_0x770dd0(0x11a)]};serviceRegistry[_0x770dd0(0x133)](_0x1db97f),serviceByName[_0x770dd0(0x122)](_0x1db97f[_0x770dd0(0x13c)],_0x1db97f);}registerService(a48_0x5e5582(0x14e),authDefinitions,{'defaultCommand':a48_0x5e5582(0x146)}),registerService(a48_0x5e5582(0x132),userAccountDefinitions),registerService(a48_0x5e5582(0x142),appDefinitions,{'defaultCommand':'list'}),registerService(a48_0x5e5582(0x117),workspaceDefinitions),registerService('Runtime\x20App\x20Config',appConfigDefinitions),registerService(a48_0x5e5582(0x111),configDefinitions,{'defaultCommand':a48_0x5e5582(0x14a)}),registerService('Runtime\x20Roles',roleDefinitions,{'defaultCommand':a48_0x5e5582(0x14a)}),registerService(a48_0x5e5582(0x11f),permitDefinitions),registerService(a48_0x5e5582(0x144),apiDocDefinitions),registerService(a48_0x5e5582(0x135),datasetDefinitions),registerService(a48_0x5e5582(0x140),dataDefinitions),registerService(a48_0x5e5582(0x128),sqlDefinitions),registerService(a48_0x5e5582(0x137),bffDefinitions),registerService(a48_0x5e5582(0x113),personalBffDefinitions),registerService(a48_0x5e5582(0x136),artifactDefinitions),registerService('File',fileDefinitions),registerService(a48_0x5e5582(0x141),ocrDefinitions),registerService('Knowledge\x20Base',kbDefinitions),registerService(a48_0x5e5582(0x14f),notificationDefinitions,{'defaultCommand':a48_0x5e5582(0x14d)}),registerService(a48_0x5e5582(0x114),scheduleDefinitions,{'defaultCommand':'list'}),registerService(a48_0x5e5582(0x12a),serviceDefinitions,{'defaultCommand':a48_0x5e5582(0x14a)}),registerService(a48_0x5e5582(0x12f),skillDefinitions,{'defaultCommand':a48_0x5e5582(0x13f)}),registerService('CLI\x20Built-in\x20Skill',cliSkillDefinitions,{'defaultCommand':'install'}),registerService(a48_0x5e5582(0x123),[updateDefinition],{'defaultCommand':a48_0x5e5582(0x134),'isSingleCommand':!![]}),registerService(a48_0x5e5582(0x125),[doctorDefinition],{'isSingleCommand':!![]}),registerService('Schema',[schemaDefinition],{'isSingleCommand':!![]}),registerService(a48_0x5e5582(0x13d),logsDefinitions,{'defaultCommand':a48_0x5e5582(0x11e)});export function findDefinition(_0x43b36f,_0x55e0b4){const _0x5a03ec=a48_0x5e5582;return definitions[_0x5a03ec(0x112)](_0x43b36f+':'+_0x55e0b4);}export function resolveRemovedCommand(_0x29b574,_0x70ac54){const _0x350665=a48_0x5e5582;if(_0x29b574===_0x350665(0x12c)&&_0x70ac54==='init')return{'command':'auth\x20init','message':_0x350665(0x12d),'hint':'Use\x20`lovrabet\x20config\x20init`\x20for\x20node\x20configuration,\x20then\x20`lovrabet\x20auth\x20login`\x20for\x20AccessKey\x20authentication.'};if(_0x29b574===_0x350665(0x119)&&_0x70ac54===_0x350665(0x138))return{'command':'app\x20init','message':_0x350665(0x131),'hint':'Use\x20`lovrabet\x20workspace\x20init\x20--appcode\x20<code>`\x20instead.'};if(_0x29b574==='app'&&_0x70ac54==='use')return{'command':_0x350665(0x11d),'message':'`lovrabet\x20app\x20use`\x20has\x20been\x20removed.','hint':_0x350665(0x14b)};if(_0x29b574===_0x350665(0x150)&&_0x70ac54===_0x350665(0x13b))return{'command':'logs\x20clear','message':_0x350665(0x149),'hint':_0x350665(0x11b)};return undefined;}export function isKnownService(_0x20e85b){const _0x4a20a0=a48_0x5e5582;return serviceByName[_0x4a20a0(0x13a)](_0x20e85b);}export function getServiceEntry(_0x51a1a9){const _0x4bb0c6=a48_0x5e5582;return serviceByName[_0x4bb0c6(0x112)](_0x51a1a9);}export function getAllDefinitions(){const _0x29db3f=a48_0x5e5582;return Array[_0x29db3f(0x124)](definitions[_0x29db3f(0x11c)]());}
1
+ const a48_0x2217d2=a48_0x525e;(function(_0x882d8b,_0x50ab7d){const _0x3b5d2c=a48_0x525e,_0x444ed4=_0x882d8b();while(!![]){try{const _0x2b3c63=-parseInt(_0x3b5d2c(0x13a))/0x1*(parseInt(_0x3b5d2c(0x12b))/0x2)+parseInt(_0x3b5d2c(0x153))/0x3+-parseInt(_0x3b5d2c(0x142))/0x4*(parseInt(_0x3b5d2c(0x127))/0x5)+-parseInt(_0x3b5d2c(0x13d))/0x6+parseInt(_0x3b5d2c(0x15f))/0x7*(-parseInt(_0x3b5d2c(0x163))/0x8)+-parseInt(_0x3b5d2c(0x14c))/0x9*(-parseInt(_0x3b5d2c(0x132))/0xa)+-parseInt(_0x3b5d2c(0x125))/0xb;if(_0x2b3c63===_0x50ab7d)break;else _0x444ed4['push'](_0x444ed4['shift']());}catch(_0x4e6513){_0x444ed4['push'](_0x444ed4['shift']());}}}(a48_0x3f71,0xebdb3));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';function a48_0x525e(_0x1a6d24,_0x2007cd){_0x1a6d24=_0x1a6d24-0x125;const _0x3f7177=a48_0x3f71();let _0x525e8e=_0x3f7177[_0x1a6d24];return _0x525e8e;}import{serviceDefinitions}from'../commands/service/index.js';import{updateDefinition}from'../commands/update.js';import{doctorDefinition}from'../commands/doctor.js';import{schemaDefinition}from'../commands/schema.js';import{appDefinitions}from'../commands/app/definitions.js';import{workspaceDefinitions}from'../commands/workspace/index.js';import{configDefinitions}from'../commands/config/definitions.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{dataDefinitions}from'../commands/data/index.js';import{kbDefinitions}from'../commands/kb/index.js';import{artifactDefinitions}from'../commands/artifact/index.js';import{personalBffDefinitions}from'../commands/personal-bff/index.js';import{apiDocDefinitions}from'../commands/api-doc/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';import{fileDefinitions}from'../commands/file/index.js';import{ocrDefinitions}from'../commands/ocr/index.js';import{scheduleDefinitions}from'../commands/schedule/index.js';import{userAccountDefinitions}from'../commands/user-account/index.js';import{notificationDefinitions}from'../commands/notification/index.js';import{roleDefinitions}from'../commands/role/index.js';import{permitDefinitions}from'../commands/permit/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x28c44d){const _0x3fa611=a48_0x525e;for(const _0x9db07f of _0x28c44d){definitions[_0x3fa611(0x129)](_0x9db07f['service']+':'+_0x9db07f[_0x3fa611(0x137)],_0x9db07f);let _0x5ed50b=serviceGroups[_0x3fa611(0x133)](_0x9db07f[_0x3fa611(0x14e)]);!_0x5ed50b&&(_0x5ed50b=[],serviceGroups[_0x3fa611(0x129)](_0x9db07f['service'],_0x5ed50b)),_0x5ed50b[_0x3fa611(0x126)](_0x9db07f);}}function a48_0x3f71(){const _0xe1deee=['Logs','OCR','list','Instant\x20API','Diagnostics','\x20\x20[high-risk-write]','`lovrabet\x20app\x20use`\x20has\x20been\x20removed.','3430qtBgsb','Skills','risk','Workspace','6080qkPGWQ','clear','has','map','10229208IQfOzG','push','1773755UMCVju','isSingleCommand','set','Configuration','57944tpfbJs','show','User\x20Accounts','Backend\x20Function\x20Scripts','values','init','defaultCommand','19930FFHGNl','get','Runtime\x20Roles','auth','description','command','SQL\x20Queries','install','3UAMASp','Use\x20`lovrabet\x20workspace\x20init\x20--appcode\x20<code>`\x20instead.','read','1254240xLGdEF','App\x20Management','Artifacts','write','run','4ycBIKf','logs\x20clear','Notification\x20Configs','logs','Service\x20Tree','Personal\x20Backend\x20Function','`lovrabet\x20logs\x20clear`\x20has\x20been\x20removed.','app','login','Schema','4689VNjYbB','auth\x20init','service','Runtime\x20App\x20Config','CLI\x20Built-in\x20Skill','`lovrabet\x20auth\x20init`\x20has\x20been\x20removed.','from','5642247OEFofk','Datasets','config-list','app\x20use','Self\x20Update'];a48_0x3f71=function(){return _0xe1deee;};return a48_0x3f71();}function registerService(_0x52abae,_0x54aca6,_0x358cfb){const _0x2e3c82=a48_0x525e;registerDefinitions(_0x54aca6);const _0x15dfd6=_0x26f9c1=>_0x26f9c1===_0x2e3c82(0x13c)?'':_0x26f9c1===_0x2e3c82(0x140)?'\x20\x20[write]':_0x2e3c82(0x15d),_0x17f2ea={'service':_0x54aca6[0x0][_0x2e3c82(0x14e)],'label':_0x52abae,'commands':_0x54aca6[_0x2e3c82(0x166)](_0x100335=>({'command':_0x100335[_0x2e3c82(0x137)],'description':_0x100335[_0x2e3c82(0x136)],'tag':_0x15dfd6(_0x100335[_0x2e3c82(0x161)])})),'defaultCommand':_0x358cfb?.[_0x2e3c82(0x131)]??(_0x358cfb?.[_0x2e3c82(0x128)]?_0x54aca6[0x0][_0x2e3c82(0x137)]:undefined),'isSingleCommand':_0x358cfb?.['isSingleCommand']};serviceRegistry[_0x2e3c82(0x126)](_0x17f2ea),serviceByName[_0x2e3c82(0x129)](_0x17f2ea[_0x2e3c82(0x14e)],_0x17f2ea);}registerService('Authentication',authDefinitions,{'defaultCommand':a48_0x2217d2(0x14a)}),registerService(a48_0x2217d2(0x12d),userAccountDefinitions),registerService(a48_0x2217d2(0x13e),appDefinitions,{'defaultCommand':'list'}),registerService(a48_0x2217d2(0x162),workspaceDefinitions),registerService(a48_0x2217d2(0x14f),appConfigDefinitions),registerService(a48_0x2217d2(0x12a),configDefinitions,{'defaultCommand':'list'}),registerService(a48_0x2217d2(0x134),roleDefinitions,{'defaultCommand':a48_0x2217d2(0x15a)}),registerService('Runtime\x20Permissions',permitDefinitions),registerService('API\x20Documentation',apiDocDefinitions),registerService(a48_0x2217d2(0x154),datasetDefinitions),registerService(a48_0x2217d2(0x15b),dataDefinitions),registerService(a48_0x2217d2(0x138),sqlDefinitions),registerService(a48_0x2217d2(0x12e),bffDefinitions),registerService(a48_0x2217d2(0x147),personalBffDefinitions),registerService(a48_0x2217d2(0x13f),artifactDefinitions),registerService('File',fileDefinitions),registerService(a48_0x2217d2(0x159),ocrDefinitions),registerService('Knowledge\x20Base',kbDefinitions),registerService(a48_0x2217d2(0x144),notificationDefinitions,{'defaultCommand':a48_0x2217d2(0x155)}),registerService('Agent\x20Schedules',scheduleDefinitions,{'defaultCommand':a48_0x2217d2(0x15a)}),registerService(a48_0x2217d2(0x146),serviceDefinitions,{'defaultCommand':a48_0x2217d2(0x15a)}),registerService(a48_0x2217d2(0x160),skillDefinitions,{'defaultCommand':a48_0x2217d2(0x139)}),registerService(a48_0x2217d2(0x150),cliSkillDefinitions,{'defaultCommand':a48_0x2217d2(0x139)}),registerService(a48_0x2217d2(0x157),[updateDefinition],{'defaultCommand':a48_0x2217d2(0x141),'isSingleCommand':!![]}),registerService(a48_0x2217d2(0x15c),[doctorDefinition],{'isSingleCommand':!![]}),registerService(a48_0x2217d2(0x14b),[schemaDefinition],{'isSingleCommand':!![]}),registerService(a48_0x2217d2(0x158),logsDefinitions,{'defaultCommand':a48_0x2217d2(0x12c)});export function findDefinition(_0xe5bb19,_0x450c30){const _0x194362=a48_0x2217d2;return definitions[_0x194362(0x133)](_0xe5bb19+':'+_0x450c30);}export function resolveRemovedCommand(_0x5f0914,_0x5a42dd){const _0xa8c9b2=a48_0x2217d2;if(_0x5f0914===_0xa8c9b2(0x135)&&_0x5a42dd===_0xa8c9b2(0x130))return{'command':_0xa8c9b2(0x14d),'message':_0xa8c9b2(0x151),'hint':'Use\x20`lovrabet\x20config\x20init`\x20for\x20node\x20configuration,\x20then\x20`lovrabet\x20auth\x20login`\x20for\x20AccessKey\x20authentication.'};if(_0x5f0914===_0xa8c9b2(0x149)&&_0x5a42dd===_0xa8c9b2(0x130))return{'command':'app\x20init','message':'`lovrabet\x20app\x20init`\x20has\x20been\x20removed.','hint':_0xa8c9b2(0x13b)};if(_0x5f0914===_0xa8c9b2(0x149)&&_0x5a42dd==='use')return{'command':_0xa8c9b2(0x156),'message':_0xa8c9b2(0x15e),'hint':'Use\x20`lovrabet\x20workspace\x20use\x20--app\x20<name>`\x20instead.'};if(_0x5f0914===_0xa8c9b2(0x145)&&_0x5a42dd===_0xa8c9b2(0x164))return{'command':_0xa8c9b2(0x143),'message':_0xa8c9b2(0x148),'hint':'Use\x20`lovrabet\x20logs\x20show`\x20to\x20view\x20command\x20history.'};return undefined;}export function isKnownService(_0x4b0636){const _0xe578af=a48_0x2217d2;return serviceByName[_0xe578af(0x165)](_0x4b0636);}export function getServiceEntry(_0x57c8a0){const _0xbaa2b6=a48_0x2217d2;return serviceByName[_0xbaa2b6(0x133)](_0x57c8a0);}export function getAllDefinitions(){const _0xcbb947=a48_0x2217d2;return Array[_0xcbb947(0x152)](definitions[_0xcbb947(0x12f)]());}
@@ -1 +1 @@
1
- const a49_0x31eb12=a49_0x3758;(function(_0x2ffe63,_0x27ccf5){const _0x5374d3=a49_0x3758,_0x4ac1bd=_0x2ffe63();while(!![]){try{const _0x4d59d7=parseInt(_0x5374d3(0x14b))/0x1+parseInt(_0x5374d3(0x13d))/0x2+-parseInt(_0x5374d3(0x139))/0x3*(-parseInt(_0x5374d3(0x150))/0x4)+parseInt(_0x5374d3(0x145))/0x5*(-parseInt(_0x5374d3(0x13b))/0x6)+parseInt(_0x5374d3(0x146))/0x7+parseInt(_0x5374d3(0x13c))/0x8*(parseInt(_0x5374d3(0x13e))/0x9)+-parseInt(_0x5374d3(0x144))/0xa;if(_0x4d59d7===_0x27ccf5)break;else _0x4ac1bd['push'](_0x4ac1bd['shift']());}catch(_0x549afb){_0x4ac1bd['push'](_0x4ac1bd['shift']());}}}(a49_0x5433,0x57d02));function a49_0x3758(_0x2e2a1a,_0x1ed9d7){_0x2e2a1a=_0x2e2a1a-0x138;const _0x54332e=a49_0x5433();let _0x3758c1=_0x54332e[_0x2e2a1a];return _0x3758c1;}import{createRuntimeAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';import{projectRuntimeRole,readOptionalRuntimeRoleCode,ROLE_CODE_FLAG,runtimeRoleWriteResult}from'../../commands/role/shared.js';function input(_0x2defa3){const _0x9fc44=a49_0x3758,_0xa1e930=_0x2defa3['str']('name')[_0x9fc44(0x13a)]();if(!_0xa1e930)throw CliErrors[_0x9fc44(0x14f)](_0x9fc44(0x147));const _0x26fe02=_0x2defa3[_0x9fc44(0x151)](_0x9fc44(0x148))['trim'](),_0x486007=readOptionalRuntimeRoleCode(_0x2defa3);return{'appCode':_0x2defa3['appCode'],'roleName':_0xa1e930,..._0x486007?{'roleCode':_0x486007}:{},..._0x26fe02?{'remark':_0x26fe02}:{}};}function a49_0x5433(){const _0x797f86=['623240WETmJg','9gpmhwx','name','POST','/client/permit/role/create','Preview:\x20create\x20a\x20runtime\x20CUSTOM\x20role','build','7828920kqFECQ','290IKfgJv','1730596joWigy','--name\x20must\x20not\x20be\x20blank.','remark','CUSTOM','Optional\x20role\x20remark','682935PlIOvL','create','description','body','validation','91896BIQOHR','str','string','3bxvfQt','trim','31398gStbct','1450648GMlwhW'];a49_0x5433=function(){return _0x797f86;};return a49_0x5433();}export const roleCreate={'service':'role','command':a49_0x31eb12(0x14c),'description':'Create\x20a\x20runtime\x20CUSTOM\x20role','risk':'high-risk-write','confirmationDescription':'Creates\x20a\x20custom\x20role\x20in\x20the\x20current\x20runtime\x20app.\x20After\x20creation\x20it\x20can\x20be\x20used\x20for\x20member\x20and\x20resource\x20permissions.','flags':[{'name':a49_0x31eb12(0x13f),'type':'string','required':!![],'description':'Role\x20name'},ROLE_CODE_FLAG,{'name':a49_0x31eb12(0x148),'type':a49_0x31eb12(0x138),'description':a49_0x31eb12(0x14a)}],async 'validate'(_0x709832){input(_0x709832);},async 'dryRun'(_0x530f07){const _0x44bb8c=a49_0x31eb12;return dryRun(_0x44bb8c(0x140),_0x44bb8c(0x141))[_0x44bb8c(0x14e)]({'roleType':_0x44bb8c(0x149),...input(_0x530f07)})[_0x44bb8c(0x14d)](_0x44bb8c(0x142))[_0x44bb8c(0x143)]();},async 'execute'(_0x460d7b){const _0x53ac2d=a49_0x31eb12,_0x49c821=await createRuntimeAppRole(input(_0x460d7b));return{'ok':!![],'data':runtimeRoleWriteResult(_0x53ac2d(0x14c),{'roleId':_0x49c821['id']},null,projectRuntimeRole(_0x49c821),{'method':'POST','path':'/client/permit/role/create'})};}};
1
+ const a49_0x26a7d5=a49_0x38dd;(function(_0x4e75fd,_0x54d09e){const _0x2cc2f1=a49_0x38dd,_0xd1c47f=_0x4e75fd();while(!![]){try{const _0x2441ea=parseInt(_0x2cc2f1(0x1d0))/0x1*(-parseInt(_0x2cc2f1(0x1c3))/0x2)+parseInt(_0x2cc2f1(0x1cd))/0x3*(parseInt(_0x2cc2f1(0x1cf))/0x4)+parseInt(_0x2cc2f1(0x1c9))/0x5*(-parseInt(_0x2cc2f1(0x1cc))/0x6)+parseInt(_0x2cc2f1(0x1d4))/0x7+-parseInt(_0x2cc2f1(0x1ce))/0x8+parseInt(_0x2cc2f1(0x1b9))/0x9*(-parseInt(_0x2cc2f1(0x1c4))/0xa)+parseInt(_0x2cc2f1(0x1ca))/0xb;if(_0x2441ea===_0x54d09e)break;else _0xd1c47f['push'](_0xd1c47f['shift']());}catch(_0x4d7513){_0xd1c47f['push'](_0xd1c47f['shift']());}}}(a49_0x1c41,0x82f1b));import{createRuntimeAppRole}from'../../core/api-client.js';function a49_0x38dd(_0x62f509,_0x117813){_0x62f509=_0x62f509-0x1b9;const _0x1c41c3=a49_0x1c41();let _0x38ddb0=_0x1c41c3[_0x62f509];return _0x38ddb0;}import{CliErrors}from'../../errors.js';function a49_0x1c41(){const _0x1441d4=['22584jmVYmO','274yLvfIP','Role\x20name','name','trim','4813669jugTTx','string','remark','Optional\x20role\x20remark','str','45HEQbsx','Creates\x20a\x20custom\x20role\x20in\x20the\x20current\x20runtime\x20app.\x20After\x20creation\x20it\x20can\x20be\x20used\x20for\x20member\x20and\x20resource\x20permissions.','appCode','CUSTOM','Preview:\x20create\x20a\x20runtime\x20CUSTOM\x20role','high-risk-write','/client/permit/role/create','role','create','validation','412LVMkEw','1281890CprbqL','body','Create\x20a\x20runtime\x20CUSTOM\x20role','--name\x20must\x20not\x20be\x20blank.','description','4480310bJEtsO','18555878nnAfwh','POST','6QyXmSJ','135kHvbDq','3990696aUDaBt'];a49_0x1c41=function(){return _0x1441d4;};return a49_0x1c41();}import{dryRun}from'../../framework/dryrun.js';import{projectRuntimeRole,readOptionalRuntimeRoleCode,ROLE_CODE_FLAG,runtimeRoleWriteResult}from'../../commands/role/shared.js';function input(_0x1632a1){const _0x1f4019=a49_0x38dd,_0x3f8208=_0x1632a1[_0x1f4019(0x1d8)](_0x1f4019(0x1d2))[_0x1f4019(0x1d3)]();if(!_0x3f8208)throw CliErrors[_0x1f4019(0x1c2)](_0x1f4019(0x1c7));const _0x3868ec=_0x1632a1[_0x1f4019(0x1d8)](_0x1f4019(0x1d6))['trim'](),_0x3e421f=readOptionalRuntimeRoleCode(_0x1632a1);return{'appCode':_0x1632a1[_0x1f4019(0x1bb)],'roleName':_0x3f8208,..._0x3e421f?{'roleCode':_0x3e421f}:{},..._0x3868ec?{'remark':_0x3868ec}:{}};}export const roleCreate={'service':a49_0x26a7d5(0x1c0),'command':'create','description':a49_0x26a7d5(0x1c6),'risk':a49_0x26a7d5(0x1be),'confirmationDescription':a49_0x26a7d5(0x1ba),'flags':[{'name':a49_0x26a7d5(0x1d2),'type':a49_0x26a7d5(0x1d5),'required':!![],'description':a49_0x26a7d5(0x1d1)},ROLE_CODE_FLAG,{'name':a49_0x26a7d5(0x1d6),'type':a49_0x26a7d5(0x1d5),'description':a49_0x26a7d5(0x1d7)}],async 'validate'(_0x1c8564){input(_0x1c8564);},async 'dryRun'(_0x445977){const _0x23e153=a49_0x26a7d5;return dryRun(_0x23e153(0x1cb),_0x23e153(0x1bf))[_0x23e153(0x1c5)]({'roleType':_0x23e153(0x1bc),...input(_0x445977)})[_0x23e153(0x1c8)](_0x23e153(0x1bd))['build']();},async 'execute'(_0x40e0e4){const _0x1f09b8=a49_0x26a7d5,_0x5df6e1=await createRuntimeAppRole(input(_0x40e0e4));return{'ok':!![],'data':runtimeRoleWriteResult(_0x1f09b8(0x1c1),{'roleId':_0x5df6e1['id']},null,projectRuntimeRole(_0x5df6e1),{'method':'POST','path':_0x1f09b8(0x1bf)})};}};
@@ -1 +1 @@
1
- const a50_0xf643d0=a50_0x252c;function a50_0x252c(_0x2f3aae,_0x4dc159){_0x2f3aae=_0x2f3aae-0x9c;const _0x43ff84=a50_0x43ff();let _0x252c7f=_0x43ff84[_0x2f3aae];return _0x252c7f;}function a50_0x43ff(){const _0xef9e49=['Delete\x20a\x20runtime\x20CUSTOM\x20role','num','5VKPzTV','26058980lvWjOD','3IWfaku','Deletes\x20the\x20custom\x20role\x20in\x20the\x20current\x20runtime\x20app.\x20Membership\x20and\x20permission\x20config\x20for\x20that\x20role\x20may\x20become\x20invalid.','8926974KuJfAK','delete','11fUwNim','description','43080YjLQZB','2689116MTFACY','/client/permit/role/delete','548068ESJBHm','5547966SeEBNl','POST','Preview:\x20delete\x20a\x20runtime\x20CUSTOM\x20role','role','1443694umMRTK','build','32yqBTCD','body'];a50_0x43ff=function(){return _0xef9e49;};return a50_0x43ff();}(function(_0x41dbd9,_0x3255c9){const _0x402ad4=a50_0x252c,_0x21b30a=_0x41dbd9();while(!![]){try{const _0x1e3e86=-parseInt(_0x402ad4(0xa5))/0x1+parseInt(_0x402ad4(0xa3))/0x2+-parseInt(_0x402ad4(0x9c))/0x3*(-parseInt(_0x402ad4(0xa2))/0x4)+-parseInt(_0x402ad4(0xb0))/0x5*(-parseInt(_0x402ad4(0xa6))/0x6)+parseInt(_0x402ad4(0xaa))/0x7*(parseInt(_0x402ad4(0xac))/0x8)+parseInt(_0x402ad4(0x9e))/0x9+parseInt(_0x402ad4(0xb1))/0xa*(-parseInt(_0x402ad4(0xa0))/0xb);if(_0x1e3e86===_0x3255c9)break;else _0x21b30a['push'](_0x21b30a['shift']());}catch(_0xb7642e){_0x21b30a['push'](_0x21b30a['shift']());}}}(a50_0x43ff,0xe631d));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(_0x1d2534){const _0x25e077=a50_0x252c,_0x2f5769=await getRuntimeRoleById(_0x1d2534['appCode'],_0x1d2534[_0x25e077(0xaf)]('id'));return assertCustomRuntimeRole(_0x2f5769,_0x25e077(0x9f)),_0x2f5769;}export const roleDelete={'service':a50_0xf643d0(0xa9),'command':a50_0xf643d0(0x9f),'description':a50_0xf643d0(0xae),'risk':'high-risk-write','confirmationDescription':a50_0xf643d0(0x9d),'flags':[ROLE_ID_FLAG],async 'dryRun'(_0x2f279c){const _0x1efbec=a50_0xf643d0,_0xb5ddfa=await prepare(_0x2f279c);return dryRun(_0x1efbec(0xa7),'/client/permit/role/delete')[_0x1efbec(0xad)]({'id':_0xb5ddfa['id']})[_0x1efbec(0xa1)](_0x1efbec(0xa8))[_0x1efbec(0xab)]();},async 'execute'(_0x19c51d){const _0x5c77d9=a50_0xf643d0,_0x5015bc=await prepare(_0x19c51d);return await deleteRuntimeAppRole(_0x5015bc['id']),{'ok':!![],'data':runtimeRoleWriteResult(_0x5c77d9(0x9f),{'roleId':_0x5015bc['id']},projectRuntimeRole(_0x5015bc),null,{'method':_0x5c77d9(0xa7),'path':_0x5c77d9(0xa4)})};}};
1
+ const a50_0x19b944=a50_0x4f31;(function(_0x1d160b,_0x202aae){const _0x3203f9=a50_0x4f31,_0x2fbba3=_0x1d160b();while(!![]){try{const _0x5a8920=parseInt(_0x3203f9(0x1f1))/0x1*(parseInt(_0x3203f9(0x1f3))/0x2)+-parseInt(_0x3203f9(0x1ea))/0x3+parseInt(_0x3203f9(0x1f6))/0x4*(-parseInt(_0x3203f9(0x1f4))/0x5)+parseInt(_0x3203f9(0x1e4))/0x6+parseInt(_0x3203f9(0x1f5))/0x7+parseInt(_0x3203f9(0x1f8))/0x8+-parseInt(_0x3203f9(0x1ee))/0x9*(parseInt(_0x3203f9(0x1ef))/0xa);if(_0x5a8920===_0x202aae)break;else _0x2fbba3['push'](_0x2fbba3['shift']());}catch(_0x5deee8){_0x2fbba3['push'](_0x2fbba3['shift']());}}}(a50_0x39d5,0x98deb));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(_0x33ca4f){const _0x1a0582=a50_0x4f31,_0x221cbb=await getRuntimeRoleById(_0x33ca4f[_0x1a0582(0x1e9)],_0x33ca4f[_0x1a0582(0x1e7)]('id'));return assertCustomRuntimeRole(_0x221cbb,_0x1a0582(0x1e6)),_0x221cbb;}function a50_0x4f31(_0x58d753,_0x46e924){_0x58d753=_0x58d753-0x1e3;const _0x39d555=a50_0x39d5();let _0x4f316a=_0x39d555[_0x58d753];return _0x4f316a;}function a50_0x39d5(){const _0x16dbb9=['Delete\x20a\x20runtime\x20CUSTOM\x20role','description','POST','36zTReHP','1191730exWXIP','high-risk-write','232SqIFcn','build','7658ezpDFQ','60zuVnMt','6600370blxJKk','314808LVIjhM','role','5488136MnVjcb','Preview:\x20delete\x20a\x20runtime\x20CUSTOM\x20role','/client/permit/role/delete','3838296CQMhmz','Deletes\x20the\x20custom\x20role\x20in\x20the\x20current\x20runtime\x20app.\x20Membership\x20and\x20permission\x20config\x20for\x20that\x20role\x20may\x20become\x20invalid.','delete','num','body','appCode','3329100oKDohx'];a50_0x39d5=function(){return _0x16dbb9;};return a50_0x39d5();}export const roleDelete={'service':a50_0x19b944(0x1f7),'command':a50_0x19b944(0x1e6),'description':a50_0x19b944(0x1eb),'risk':a50_0x19b944(0x1f0),'confirmationDescription':a50_0x19b944(0x1e5),'flags':[ROLE_ID_FLAG],async 'dryRun'(_0x5ecc01){const _0x42368d=a50_0x19b944,_0x2aa5cd=await prepare(_0x5ecc01);return dryRun(_0x42368d(0x1ed),_0x42368d(0x1e3))[_0x42368d(0x1e8)]({'id':_0x2aa5cd['id']})[_0x42368d(0x1ec)](_0x42368d(0x1f9))[_0x42368d(0x1f2)]();},async 'execute'(_0x51e075){const _0x48bbc1=a50_0x19b944,_0x1668c8=await prepare(_0x51e075);return await deleteRuntimeAppRole(_0x1668c8['id']),{'ok':!![],'data':runtimeRoleWriteResult(_0x48bbc1(0x1e6),{'roleId':_0x1668c8['id']},projectRuntimeRole(_0x1668c8),null,{'method':_0x48bbc1(0x1ed),'path':_0x48bbc1(0x1e3)})};}};
@@ -1 +1 @@
1
- const a51_0x93e677=a51_0x1057;function a51_0x1057(_0x250c23,_0x78fc56){_0x250c23=_0x250c23-0x1da;const _0x42b2fd=a51_0x42b2();let _0x1057ab=_0x42b2fd[_0x250c23];return _0x1057ab;}(function(_0x42fd11,_0x27929c){const _0x4bee0e=a51_0x1057,_0x2fc0d3=_0x42fd11();while(!![]){try{const _0x1043a3=-parseInt(_0x4bee0e(0x1e7))/0x1*(parseInt(_0x4bee0e(0x1da))/0x2)+-parseInt(_0x4bee0e(0x1e3))/0x3*(parseInt(_0x4bee0e(0x1df))/0x4)+-parseInt(_0x4bee0e(0x1e6))/0x5+parseInt(_0x4bee0e(0x1e2))/0x6+parseInt(_0x4bee0e(0x1dd))/0x7*(parseInt(_0x4bee0e(0x1e5))/0x8)+-parseInt(_0x4bee0e(0x1e9))/0x9+parseInt(_0x4bee0e(0x1e8))/0xa*(parseInt(_0x4bee0e(0x1dc))/0xb);if(_0x1043a3===_0x27929c)break;else _0x2fc0d3['push'](_0x2fc0d3['shift']());}catch(_0x4a4814){_0x2fc0d3['push'](_0x2fc0d3['shift']());}}}(a51_0x42b2,0xe65c1));import{getRuntimeRoleById,projectRuntimeRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';export const roleDetail={'service':'role','command':a51_0x93e677(0x1e1),'description':a51_0x93e677(0x1de),'risk':a51_0x93e677(0x1e4),'flags':[ROLE_ID_FLAG],async 'execute'(_0x3aa29a){const _0x8c7ca2=a51_0x93e677,_0x382e0c=await getRuntimeRoleById(_0x3aa29a[_0x8c7ca2(0x1e0)],_0x3aa29a[_0x8c7ca2(0x1ea)]('id'));return{'ok':!![],'data':{'scope':_0x8c7ca2(0x1db),'role':projectRuntimeRole(_0x382e0c)}};}};function a51_0x42b2(){const _0x329d40=['appCode','detail','4858734YjdeXD','9MqXnBM','read','4626200oyvzcV','808735QnCdxV','369yBcCBg','10mIVvFq','7895880FEdNhh','num','4418AWIiVJ','runtime','10487433QUJgPX','14KugxrB','Show\x20one\x20runtime\x20role\x20by\x20ID','162668qiZWdW'];a51_0x42b2=function(){return _0x329d40;};return a51_0x42b2();}
1
+ const a51_0x479e96=a51_0x5579;function a51_0x5579(_0x4359fd,_0x1e2cb3){_0x4359fd=_0x4359fd-0xd7;const _0x14acef=a51_0x14ac();let _0x55790c=_0x14acef[_0x4359fd];return _0x55790c;}(function(_0x112bd1,_0x405bbc){const _0x4223d5=a51_0x5579,_0x10fac0=_0x112bd1();while(!![]){try{const _0x5df28b=-parseInt(_0x4223d5(0xe3))/0x1*(parseInt(_0x4223d5(0xe1))/0x2)+-parseInt(_0x4223d5(0xd9))/0x3*(-parseInt(_0x4223d5(0xdd))/0x4)+parseInt(_0x4223d5(0xe7))/0x5*(-parseInt(_0x4223d5(0xdc))/0x6)+-parseInt(_0x4223d5(0xe0))/0x7+parseInt(_0x4223d5(0xe4))/0x8*(-parseInt(_0x4223d5(0xdb))/0x9)+parseInt(_0x4223d5(0xe6))/0xa+parseInt(_0x4223d5(0xd8))/0xb;if(_0x5df28b===_0x405bbc)break;else _0x10fac0['push'](_0x10fac0['shift']());}catch(_0x5ea6a0){_0x10fac0['push'](_0x10fac0['shift']());}}}(a51_0x14ac,0xbf317));import{getRuntimeRoleById,projectRuntimeRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';export const roleDetail={'service':a51_0x479e96(0xe2),'command':a51_0x479e96(0xdf),'description':a51_0x479e96(0xe5),'risk':a51_0x479e96(0xda),'flags':[ROLE_ID_FLAG],async 'execute'(_0x359f69){const _0x46720d=a51_0x479e96,_0x39a834=await getRuntimeRoleById(_0x359f69['appCode'],_0x359f69[_0x46720d(0xde)]('id'));return{'ok':!![],'data':{'scope':_0x46720d(0xd7),'role':projectRuntimeRole(_0x39a834)}};}};function a51_0x14ac(){const _0x142e49=['Show\x20one\x20runtime\x20role\x20by\x20ID','1807750qijDJL','1575975ItKLHT','runtime','39814621qhoKVf','4281mCYJKf','read','279lZsjjd','12sYnpNk','2420DbNsEG','num','detail','10227497xzPdzf','18698Bftspx','role','127jWIMOQ','155280nOpPiy'];a51_0x14ac=function(){return _0x142e49;};return a51_0x14ac();}
@@ -1 +1 @@
1
- (function(_0x5647a2,_0x9f4bd1){const _0x41a8b0=a52_0x5616,_0x4da594=_0x5647a2();while(!![]){try{const _0x5ceded=parseInt(_0x41a8b0(0xbc))/0x1+parseInt(_0x41a8b0(0xb6))/0x2+parseInt(_0x41a8b0(0xb9))/0x3+-parseInt(_0x41a8b0(0xbe))/0x4*(-parseInt(_0x41a8b0(0xba))/0x5)+-parseInt(_0x41a8b0(0xbb))/0x6+parseInt(_0x41a8b0(0xbf))/0x7*(parseInt(_0x41a8b0(0xb7))/0x8)+-parseInt(_0x41a8b0(0xb8))/0x9*(parseInt(_0x41a8b0(0xbd))/0xa);if(_0x5ceded===_0x9f4bd1)break;else _0x4da594['push'](_0x4da594['shift']());}catch(_0x10c609){_0x4da594['push'](_0x4da594['shift']());}}}(a52_0x2cd2,0xc3b3e));import{roleList}from'../../commands/role/list.js';import{roleDetail}from'../../commands/role/detail.js';import{roleCreate}from'../../commands/role/create.js';function a52_0x5616(_0x3873ea,_0x3c2078){_0x3873ea=_0x3873ea-0xb6;const _0x2cd245=a52_0x2cd2();let _0x5616e2=_0x2cd245[_0x3873ea];return _0x5616e2;}import{roleUpdate}from'../../commands/role/update.js';function a52_0x2cd2(){const _0x672236=['96ctcWTx','2889603VGvTTV','1942464HpQiYA','208370NnLgEG','8900244GKrHgA','302549dXJuDJ','60EpNJxL','92GTkhkD','588266fErwjs','2588758AtjJSh'];a52_0x2cd2=function(){return _0x672236;};return a52_0x2cd2();}import{roleDelete}from'../../commands/role/delete.js';import{roleUserAdd}from'../../commands/role/user-add.js';import{roleUserRemove}from'../../commands/role/user-remove.js';export const roleDefinitions=[roleList,roleDetail,roleCreate,roleUpdate,roleDelete,roleUserAdd,roleUserRemove];
1
+ (function(_0x686030,_0x434537){const _0x38ff6f=a52_0x4758,_0x5fccd4=_0x686030();while(!![]){try{const _0x45f637=-parseInt(_0x38ff6f(0x1ba))/0x1*(parseInt(_0x38ff6f(0x1bf))/0x2)+-parseInt(_0x38ff6f(0x1b7))/0x3+-parseInt(_0x38ff6f(0x1bd))/0x4*(-parseInt(_0x38ff6f(0x1b8))/0x5)+parseInt(_0x38ff6f(0x1bc))/0x6*(parseInt(_0x38ff6f(0x1c0))/0x7)+parseInt(_0x38ff6f(0x1b6))/0x8+parseInt(_0x38ff6f(0x1b9))/0x9*(-parseInt(_0x38ff6f(0x1be))/0xa)+parseInt(_0x38ff6f(0x1bb))/0xb*(parseInt(_0x38ff6f(0x1c1))/0xc);if(_0x45f637===_0x434537)break;else _0x5fccd4['push'](_0x5fccd4['shift']());}catch(_0x4751a4){_0x5fccd4['push'](_0x5fccd4['shift']());}}}(a52_0x24c7,0xed3c9));import{roleList}from'../../commands/role/list.js';import{roleDetail}from'../../commands/role/detail.js';function a52_0x4758(_0x33bca3,_0x1b841d){_0x33bca3=_0x33bca3-0x1b6;const _0x24c787=a52_0x24c7();let _0x4758ac=_0x24c787[_0x33bca3];return _0x4758ac;}import{roleCreate}from'../../commands/role/create.js';import{roleUpdate}from'../../commands/role/update.js';function a52_0x24c7(){const _0x214921=['228165qrDhtO','18UBnEKt','254931FUTNNX','33nmiSrO','3816kghgsi','112Bfdpcd','3991310cPDDrd','10NSVipN','4263rUBPQC','5405268tVOzVK','3490968pItraq','1224294GuYSYu'];a52_0x24c7=function(){return _0x214921;};return a52_0x24c7();}import{roleDelete}from'../../commands/role/delete.js';import{roleUserAdd}from'../../commands/role/user-add.js';import{roleUserRemove}from'../../commands/role/user-remove.js';export const roleDefinitions=[roleList,roleDetail,roleCreate,roleUpdate,roleDelete,roleUserAdd,roleUserRemove];
@@ -1 +1 @@
1
- function a53_0x4c39(){const _0x357992=['role','runtime','1866473hovSwf','17343JNuvOc','num','pagesize','name','isSafeInteger','page','4600qQPmbO','type','1732VwgRAv','list','11448fOzETN','toUpperCase','Page\x20number','length','--page\x20must\x20be\x20a\x20positive\x20integer.','trim','map','validation','paging','Fuzzy\x20role-name\x20filter','includes','number','string','Runtime\x20role\x20type','34336rCdwNM','items','appCode','3052dQxaLc','slice','List\x20runtime\x20roles\x20for\x20the\x20current\x20app','Page\x20size\x20from\x201\x20to\x20100','214440HPnwlH','416031uBGpzW','filter','130miCDec','1527FMxyAl','str','Invalid\x20runtime\x20role\x20type:\x20','--pagesize\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.'];a53_0x4c39=function(){return _0x357992;};return a53_0x4c39();}function a53_0x3dce(_0x2f4b11,_0x3bfc1b){_0x2f4b11=_0x2f4b11-0xc5;const _0x4c3985=a53_0x4c39();let _0x3dce50=_0x4c3985[_0x2f4b11];return _0x3dce50;}const a53_0x463f2d=a53_0x3dce;(function(_0x43ee9c,_0x47f934){const _0x4db737=a53_0x3dce,_0x555925=_0x43ee9c();while(!![]){try{const _0x15e8bf=-parseInt(_0x4db737(0xe5))/0x1+-parseInt(_0x4db737(0xee))/0x2*(-parseInt(_0x4db737(0xdf))/0x3)+parseInt(_0x4db737(0xdb))/0x4*(parseInt(_0x4db737(0xde))/0x5)+-parseInt(_0x4db737(0xc6))/0x6+-parseInt(_0x4db737(0xd7))/0x7*(-parseInt(_0x4db737(0xd4))/0x8)+parseInt(_0x4db737(0xe6))/0x9*(-parseInt(_0x4db737(0xec))/0xa)+parseInt(_0x4db737(0xdc))/0xb;if(_0x15e8bf===_0x47f934)break;else _0x555925['push'](_0x555925['shift']());}catch(_0x371fa8){_0x555925['push'](_0x555925['shift']());}}}(a53_0x4c39,0xf173a));import{listRuntimeAppRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{listAllRuntimeRoles,projectRuntimeRole,RUNTIME_ROLE_TYPES}from'../../commands/role/shared.js';export const roleList={'service':a53_0x463f2d(0xe3),'command':a53_0x463f2d(0xc5),'description':a53_0x463f2d(0xd9),'risk':'read','flags':[{'name':a53_0x463f2d(0xed),'type':a53_0x463f2d(0xd2),'enum':RUNTIME_ROLE_TYPES,'description':a53_0x463f2d(0xd3)},{'name':a53_0x463f2d(0xe9),'type':'string','description':a53_0x463f2d(0xcf)},{'name':'page','type':'number','default':0x1,'description':a53_0x463f2d(0xc8)},{'name':a53_0x463f2d(0xe8),'type':a53_0x463f2d(0xd1),'default':0x64,'description':a53_0x463f2d(0xda)}],async 'validate'(_0x313fc7){const _0x3f0447=a53_0x463f2d,_0x567085=_0x313fc7['str'](_0x3f0447(0xed))[_0x3f0447(0xc7)]();if(_0x567085&&!RUNTIME_ROLE_TYPES[_0x3f0447(0xd0)](_0x567085))throw CliErrors[_0x3f0447(0xcd)](_0x3f0447(0xe1)+_0x567085+'.');const _0x3c3bc9=_0x313fc7[_0x3f0447(0xe7)](_0x3f0447(0xeb),0x1),_0x287eb7=_0x313fc7[_0x3f0447(0xe7)](_0x3f0447(0xe8),0x64);if(!Number[_0x3f0447(0xea)](_0x3c3bc9)||_0x3c3bc9<0x1)throw CliErrors[_0x3f0447(0xcd)](_0x3f0447(0xca));if(!Number[_0x3f0447(0xea)](_0x287eb7)||_0x287eb7<0x1||_0x287eb7>0x64)throw CliErrors[_0x3f0447(0xcd)](_0x3f0447(0xe2));},async 'execute'(_0x4277a0){const _0x2a80a5=a53_0x463f2d,_0x2fa49c=_0x4277a0[_0x2a80a5(0xe0)](_0x2a80a5(0xed))['toUpperCase'](),_0x51ff0f=_0x4277a0[_0x2a80a5(0xe0)]('name')[_0x2a80a5(0xcb)](),_0x6ab32f=_0x4277a0['num']('page',0x1),_0x47dcdc=_0x4277a0['num']('pagesize',0x64);if(_0x2fa49c){const _0x45c297=(await listAllRuntimeRoles(_0x4277a0[_0x2a80a5(0xd6)],{..._0x51ff0f?{'roleName':_0x51ff0f}:{}}))[_0x2a80a5(0xdd)](_0x173e5a=>_0x173e5a['roleType']===_0x2fa49c),_0x144a30=(_0x6ab32f-0x1)*_0x47dcdc;return{'ok':!![],'data':{'scope':'runtime','roles':_0x45c297[_0x2a80a5(0xd8)](_0x144a30,_0x144a30+_0x47dcdc)[_0x2a80a5(0xcc)](projectRuntimeRole),'paging':{'currentPage':_0x6ab32f,'pageSize':_0x47dcdc,'totalCount':_0x45c297[_0x2a80a5(0xc9)]}}};}const _0x53e1f4=await listRuntimeAppRoles(_0x4277a0['appCode'],{..._0x51ff0f?{'roleName':_0x51ff0f}:{},'currentPage':_0x6ab32f,'pageSize':_0x47dcdc});return{'ok':!![],'data':{'scope':_0x2a80a5(0xe4),'roles':_0x53e1f4[_0x2a80a5(0xd5)][_0x2a80a5(0xcc)](projectRuntimeRole),'paging':_0x53e1f4[_0x2a80a5(0xce)]}};}};
1
+ const a53_0xa17f90=a53_0x29e0;(function(_0x12a9e5,_0x56be80){const _0x17925e=a53_0x29e0,_0x1e828d=_0x12a9e5();while(!![]){try{const _0x4e5020=-parseInt(_0x17925e(0xc9))/0x1+-parseInt(_0x17925e(0xcb))/0x2*(-parseInt(_0x17925e(0xc4))/0x3)+parseInt(_0x17925e(0xd2))/0x4+-parseInt(_0x17925e(0xbb))/0x5*(parseInt(_0x17925e(0xcf))/0x6)+parseInt(_0x17925e(0xc3))/0x7*(-parseInt(_0x17925e(0xc5))/0x8)+-parseInt(_0x17925e(0xb8))/0x9*(-parseInt(_0x17925e(0xc8))/0xa)+-parseInt(_0x17925e(0xb6))/0xb*(parseInt(_0x17925e(0xd5))/0xc);if(_0x4e5020===_0x56be80)break;else _0x1e828d['push'](_0x1e828d['shift']());}catch(_0x3cd563){_0x1e828d['push'](_0x1e828d['shift']());}}}(a53_0x5847,0xdd699));import{listRuntimeAppRoles}from'../../core/api-client.js';function a53_0x29e0(_0x50fe06,_0x3564df){_0x50fe06=_0x50fe06-0xb4;const _0x58472b=a53_0x5847();let _0x29e0c3=_0x58472b[_0x50fe06];return _0x29e0c3;}function a53_0x5847(){const _0x469bbc=['175786ewAWaZ','--page\x20must\x20be\x20a\x20positive\x20integer.','Page\x20size\x20from\x201\x20to\x20100','list','18fYBWJX','validation','pagesize','2347720xYTbEH','trim','name','1665012GuEQLP','read','Invalid\x20runtime\x20role\x20type:\x20','string','runtime','type','11joaGiS','num','9NLLmTc','items','role','1055635pUZpcl','page','number','isSafeInteger','Fuzzy\x20role-name\x20filter','Page\x20number','str','--pagesize\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.','6021533VQqObY','42FvXHaD','16NlTNiz','length','Runtime\x20role\x20type','16863890PNpepq','104346kyKOQl','appCode'];a53_0x5847=function(){return _0x469bbc;};return a53_0x5847();}import{CliErrors}from'../../errors.js';import{listAllRuntimeRoles,projectRuntimeRole,RUNTIME_ROLE_TYPES}from'../../commands/role/shared.js';export const roleList={'service':a53_0xa17f90(0xba),'command':a53_0xa17f90(0xce),'description':'List\x20runtime\x20roles\x20for\x20the\x20current\x20app','risk':a53_0xa17f90(0xd6),'flags':[{'name':a53_0xa17f90(0xb5),'type':a53_0xa17f90(0xd8),'enum':RUNTIME_ROLE_TYPES,'description':a53_0xa17f90(0xc7)},{'name':'name','type':a53_0xa17f90(0xd8),'description':a53_0xa17f90(0xbf)},{'name':'page','type':a53_0xa17f90(0xbd),'default':0x1,'description':a53_0xa17f90(0xc0)},{'name':'pagesize','type':'number','default':0x64,'description':a53_0xa17f90(0xcd)}],async 'validate'(_0x251216){const _0x46906e=a53_0xa17f90,_0x4197b9=_0x251216[_0x46906e(0xc1)](_0x46906e(0xb5))['toUpperCase']();if(_0x4197b9&&!RUNTIME_ROLE_TYPES['includes'](_0x4197b9))throw CliErrors[_0x46906e(0xd0)](_0x46906e(0xd7)+_0x4197b9+'.');const _0x35f800=_0x251216['num'](_0x46906e(0xbc),0x1),_0x2e691d=_0x251216[_0x46906e(0xb7)](_0x46906e(0xd1),0x64);if(!Number[_0x46906e(0xbe)](_0x35f800)||_0x35f800<0x1)throw CliErrors[_0x46906e(0xd0)](_0x46906e(0xcc));if(!Number[_0x46906e(0xbe)](_0x2e691d)||_0x2e691d<0x1||_0x2e691d>0x64)throw CliErrors[_0x46906e(0xd0)](_0x46906e(0xc2));},async 'execute'(_0x3bb3d5){const _0x24f87f=a53_0xa17f90,_0x457ccb=_0x3bb3d5['str'](_0x24f87f(0xb5))['toUpperCase'](),_0x3a0f4b=_0x3bb3d5[_0x24f87f(0xc1)](_0x24f87f(0xd4))[_0x24f87f(0xd3)](),_0x419885=_0x3bb3d5[_0x24f87f(0xb7)]('page',0x1),_0x47f451=_0x3bb3d5[_0x24f87f(0xb7)]('pagesize',0x64);if(_0x457ccb){const _0x2c18fe=(await listAllRuntimeRoles(_0x3bb3d5[_0x24f87f(0xca)],{..._0x3a0f4b?{'roleName':_0x3a0f4b}:{}}))['filter'](_0x58ac5f=>_0x58ac5f['roleType']===_0x457ccb),_0x51ebdb=(_0x419885-0x1)*_0x47f451;return{'ok':!![],'data':{'scope':_0x24f87f(0xb4),'roles':_0x2c18fe['slice'](_0x51ebdb,_0x51ebdb+_0x47f451)['map'](projectRuntimeRole),'paging':{'currentPage':_0x419885,'pageSize':_0x47f451,'totalCount':_0x2c18fe[_0x24f87f(0xc6)]}}};}const _0x57c734=await listRuntimeAppRoles(_0x3bb3d5[_0x24f87f(0xca)],{..._0x3a0f4b?{'roleName':_0x3a0f4b}:{},'currentPage':_0x419885,'pageSize':_0x47f451});return{'ok':!![],'data':{'scope':_0x24f87f(0xb4),'roles':_0x57c734[_0x24f87f(0xb9)]['map'](projectRuntimeRole),'paging':_0x57c734['paging']}};}};
@@ -1 +1 @@
1
- const a54_0x31a7eb=a54_0x4a0c;(function(_0x1f5f50,_0xf563ad){const _0x79b880=a54_0x4a0c,_0x27b254=_0x1f5f50();while(!![]){try{const _0x2d8fb1=parseInt(_0x79b880(0x18a))/0x1*(-parseInt(_0x79b880(0x185))/0x2)+parseInt(_0x79b880(0x15e))/0x3+parseInt(_0x79b880(0x1a3))/0x4*(parseInt(_0x79b880(0x19a))/0x5)+-parseInt(_0x79b880(0x19b))/0x6*(-parseInt(_0x79b880(0x188))/0x7)+-parseInt(_0x79b880(0x195))/0x8*(-parseInt(_0x79b880(0x178))/0x9)+parseInt(_0x79b880(0x193))/0xa+-parseInt(_0x79b880(0x18e))/0xb;if(_0x2d8fb1===_0xf563ad)break;else _0x27b254['push'](_0x27b254['shift']());}catch(_0x217316){_0x27b254['push'](_0x27b254['shift']());}}}(a54_0x516d,0x26e25));import{listRuntimeAppUsers,listRuntimeAppRoles,listRuntimeRoleUsers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const RUNTIME_ROLE_TYPES=['ADMIN',a54_0x31a7eb(0x174),a54_0x31a7eb(0x15f),a54_0x31a7eb(0x15d)];const BUILTIN_ROLE_TYPES=[a54_0x31a7eb(0x19d),a54_0x31a7eb(0x174),a54_0x31a7eb(0x15f)];export const ROLE_ID_FLAG={'name':'id','type':a54_0x31a7eb(0x191),'required':!![],'description':a54_0x31a7eb(0x162)};function a54_0x516d(){const _0x2bc3c6=['\x20is\x20missing\x20from\x20the\x20grouped\x20member\x20snapshot.','5LbyuKc','\x20built-in\x20runtime\x20role\x20','map','join','2091518yeXgxr','flag','applyUserList','number','Runtime\x20role\x20membership\x20requires\x20a\x20numeric\x20userId.','1438890mDscma','role-code','1200KdSURZ','Runtime\x20role\x20name\x20\x22','includes','find','User\x20','65ZMhRXf','6CAxHGb','appCode','ADMIN','Reload\x20the\x20role\x20list\x20and\x20retry\x20after\x20the\x20server\x20state\x20is\x20consistent.','OWNER\x20runtime\x20role\x20membership\x20cannot\x20be\x20changed\x20with\x20this\x20command.','Pass\x20--role\x20<id|name>.','user-add','Pass\x20--user\x20<userId>;\x20name\x20and\x20account\x20lookup\x20are\x20not\x20available\x20in\x20runtime\x20scope.','17196RQsfuX','Runtime\x20userId\x20must\x20be\x20a\x20positive\x20safe\x20integer.','roleCode','filter','role','CUSTOM','197094NoFXsc','OWNER','num','userName','Runtime\x20role\x20ID\x20returned\x20by\x20role\x20list','Transfer\x20or\x20manage\x20application\x20ownership\x20through\x20the\x20dedicated\x20application\x20workflow.','push','userId','Missing\x20runtime\x20role\x20reference.','\x20is\x20already\x20in\x20runtime\x20role\x20','\x22\x20is\x20ambiguous.','validation','Runtime\x20user\x20','paging','--role-code\x20cannot\x20exceed\x2064\x20characters.',',\x20found\x20','\x22\x20was\x20not\x20found\x20in\x20app\x20','isSafeInteger','Pass\x20one\x20role\x20ID:\x20','string','roleType','remark','USER','user','trim','items','1053bAbgwN','expect-user-count','Role\x20ID\x20must\x20be\x20a\x20positive\x20integer.','length','roleName','Runtime\x20role\x20member\x20count\x20changed:\x20expected\x20','Use\x20a\x20numeric\x20userId\x20returned\x20by\x20the\x20current\x20application\x27s\x20personnel\x20list.','Runtime\x20role\x20','userCount','test','userList','Globally\x20unique\x20roleCode\x20(maximum\x2064\x20characters)','Runtime\x20numeric\x20userId','44012RisGRQ','Only\x20CUSTOM\x20runtime\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','code','1234891yLRqYn'];a54_0x516d=function(){return _0x2bc3c6;};return a54_0x516d();}export const ROLE_REF_FLAG={'name':a54_0x31a7eb(0x15c),'type':a54_0x31a7eb(0x171),'required':!![],'description':'Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name'};export const ROLE_CODE_FLAG={'name':a54_0x31a7eb(0x194),'type':a54_0x31a7eb(0x171),'description':a54_0x31a7eb(0x183)};export const USER_ID_FLAG={'name':'user','type':a54_0x31a7eb(0x171),'required':!![],'description':a54_0x31a7eb(0x184)};export const EXPECT_USER_COUNT_FLAG={'name':'expect-user-count','type':a54_0x31a7eb(0x191),'description':'Reject\x20when\x20the\x20target\x20role\x20member\x20count\x20has\x20changed'};export function isBuiltinRuntimeRole(_0x122148){const _0x4246f4=a54_0x31a7eb;return BUILTIN_ROLE_TYPES[_0x4246f4(0x197)](_0x122148);}export function assertCustomRuntimeRole(_0x448e67,_0x2838ec){const _0x170f6f=a54_0x31a7eb;if(_0x448e67[_0x170f6f(0x172)]!==_0x170f6f(0x15d))throw CliErrors[_0x170f6f(0x169)]('Cannot\x20'+_0x2838ec+_0x170f6f(0x18b)+_0x448e67[_0x170f6f(0x17c)]+'\x20('+_0x448e67[_0x170f6f(0x172)]+').',_0x170f6f(0x186));}export function projectRuntimeRole(_0xbdbd7a){const _0x186d7f=a54_0x31a7eb;return{'id':_0xbdbd7a['id'],'roleCode':_0xbdbd7a[_0x186d7f(0x15a)],'roleName':_0xbdbd7a[_0x186d7f(0x17c)],'roleType':_0xbdbd7a[_0x186d7f(0x172)],'remark':_0xbdbd7a[_0x186d7f(0x173)],'userCount':_0xbdbd7a[_0x186d7f(0x180)]??0x0,'permitCount':_0xbdbd7a['permitCount']??0x0,'builtin':isBuiltinRuntimeRole(_0xbdbd7a[_0x186d7f(0x172)])};}export function readOptionalRuntimeRoleCode(_0x20784a){const _0x8f62de=a54_0x31a7eb,_0x4d99ba=_0x20784a[_0x8f62de(0x18f)](_0x8f62de(0x194));if(_0x4d99ba===undefined||_0x4d99ba===null)return undefined;const _0xb30b50=String(_0x4d99ba)['trim']();if(!_0xb30b50)throw CliErrors[_0x8f62de(0x169)]('--role-code\x20must\x20not\x20be\x20blank.');if(_0xb30b50[_0x8f62de(0x17b)]>0x40)throw CliErrors[_0x8f62de(0x169)](_0x8f62de(0x16c));return _0xb30b50;}export async function getRuntimeRoleById(_0x259472,_0x54cf02){const _0x34db06=a54_0x31a7eb;if(!Number[_0x34db06(0x16f)](_0x54cf02)||_0x54cf02<=0x0)throw CliErrors[_0x34db06(0x169)](_0x34db06(0x17a));const _0x598486=(await listAllRuntimeRoles(_0x259472))[_0x34db06(0x15b)](_0x27f4b0=>_0x27f4b0['id']===_0x54cf02&&(!_0x27f4b0['appCode']||_0x27f4b0[_0x34db06(0x19c)]===_0x259472));if(_0x598486[_0x34db06(0x17b)]!==0x1)throw CliErrors[_0x34db06(0x169)]('Runtime\x20role\x20id\x20'+_0x54cf02+'\x20was\x20not\x20found\x20in\x20app\x20'+_0x259472+'.','Run\x20`lovrabet\x20role\x20list`\x20and\x20use\x20a\x20role\x20from\x20the\x20current\x20app.');return _0x598486[0x0];}export async function listAllRuntimeRoles(_0x2ba606,_0x55244a={}){const _0x124004=a54_0x31a7eb,_0x54e51d=0x64,_0x420184=[];for(let _0xbfa710=0x1;;_0xbfa710+=0x1){const _0x326510=await listRuntimeAppRoles(_0x2ba606,{..._0x55244a[_0x124004(0x17c)]?{'roleName':_0x55244a[_0x124004(0x17c)]}:{},'currentPage':_0xbfa710,'pageSize':_0x54e51d});_0x420184[_0x124004(0x164)](..._0x326510['items']);if(_0x326510[_0x124004(0x177)][_0x124004(0x17b)]<_0x54e51d||_0x326510[_0x124004(0x16b)]&&_0x420184[_0x124004(0x17b)]>=_0x326510[_0x124004(0x16b)]['totalCount'])return _0x420184;}}export async function resolveRuntimeRoleRef(_0x5cc593,_0x258fdc){const _0x34818f=a54_0x31a7eb,_0x5d6cd5=_0x258fdc[_0x34818f(0x176)]();if(!_0x5d6cd5)throw CliErrors['validation'](_0x34818f(0x166),_0x34818f(0x1a0));if(/^\d+$/[_0x34818f(0x181)](_0x5d6cd5))return getRuntimeRoleById(_0x5cc593,Number(_0x5d6cd5));const _0x5e9726=(await listAllRuntimeRoles(_0x5cc593))[_0x34818f(0x15b)](_0x13deb5=>_0x13deb5[_0x34818f(0x17c)]===_0x5d6cd5);if(_0x5e9726[_0x34818f(0x17b)]===0x0)throw CliErrors[_0x34818f(0x169)](_0x34818f(0x196)+_0x5d6cd5+_0x34818f(0x16e)+_0x5cc593+'.','Run\x20`lovrabet\x20role\x20list`\x20or\x20pass\x20--role\x20<id>.');if(_0x5e9726[_0x34818f(0x17b)]>0x1)throw CliErrors[_0x34818f(0x169)]('Runtime\x20role\x20name\x20\x22'+_0x5d6cd5+_0x34818f(0x168),_0x34818f(0x170)+_0x5e9726[_0x34818f(0x18c)](_0x158d27=>_0x158d27['id'])[_0x34818f(0x18d)](',\x20')+'.');return _0x5e9726[0x0];}function a54_0x4a0c(_0x1f3736,_0x230af1){_0x1f3736=_0x1f3736-0x159;const _0x516d9f=a54_0x516d();let _0x4a0c81=_0x516d9f[_0x1f3736];return _0x4a0c81;}function parseRuntimeUserId(_0x5d19d2){const _0x342f3f=a54_0x31a7eb,_0x8949fb=_0x5d19d2[_0x342f3f(0x176)]();if(!/^\d+$/[_0x342f3f(0x181)](_0x8949fb))throw CliErrors[_0x342f3f(0x169)](_0x342f3f(0x192),_0x342f3f(0x1a2));const _0x10f549=Number(_0x8949fb);if(!Number[_0x342f3f(0x16f)](_0x10f549)||_0x10f549<=0x0)throw CliErrors['validation'](_0x342f3f(0x159));return _0x10f549;}export async function prepareRuntimeMemberMutation(_0x3cc810,_0x46d46e){const _0x4b5861=a54_0x31a7eb,_0x45dba1=await resolveRuntimeRoleRef(_0x3cc810[_0x4b5861(0x19c)],_0x3cc810['str']('role'));if(_0x45dba1[_0x4b5861(0x172)]===_0x4b5861(0x15f))throw CliErrors[_0x4b5861(0x169)](_0x4b5861(0x19f),_0x4b5861(0x163));const _0x14cd24=parseRuntimeUserId(_0x3cc810['str'](_0x4b5861(0x175))),_0xc2f940=(await listRuntimeRoleUsers(_0x3cc810[_0x4b5861(0x19c)]))[_0x4b5861(0x18c)](_0x5752bd=>({..._0x5752bd,'userList':[..._0x5752bd[_0x4b5861(0x182)]??[]],'applyUserList':[..._0x5752bd[_0x4b5861(0x190)]??[]]})),_0x1e6cc6=_0xc2f940[_0x4b5861(0x198)](_0x2256a0=>_0x2256a0['id']===_0x45dba1['id']);if(!_0x1e6cc6)throw CliErrors[_0x4b5861(0x169)](_0x4b5861(0x17f)+_0x45dba1['id']+_0x4b5861(0x189),_0x4b5861(0x19e));const _0x146bae=_0x1e6cc6['userList'][_0x4b5861(0x18c)](_0x585df8=>_0x585df8['userId']),_0x3d359c=_0x3cc810[_0x4b5861(0x18f)](_0x4b5861(0x179));if(_0x3d359c!==undefined&&_0x3d359c!==null&&_0x3d359c!==''){const _0x5df11f=_0x3cc810[_0x4b5861(0x160)](_0x4b5861(0x179));if(!Number['isSafeInteger'](_0x5df11f)||_0x5df11f<0x0)throw CliErrors[_0x4b5861(0x169)]('--expect-user-count\x20must\x20be\x20a\x20non-negative\x20integer.');if(_0x146bae[_0x4b5861(0x17b)]!==_0x5df11f)throw CliErrors[_0x4b5861(0x169)](_0x4b5861(0x17d)+_0x5df11f+_0x4b5861(0x16d)+_0x146bae[_0x4b5861(0x17b)]+'.','Read\x20the\x20current\x20members\x20and\x20retry\x20with\x20the\x20new\x20expected\x20count.');}const _0x275fa3=_0x146bae[_0x4b5861(0x197)](_0x14cd24),_0x31b8c2=[];let _0x423ecc=!![];if(_0x46d46e===_0x4b5861(0x1a1)){const _0x3db5e9=await listRuntimeAppUsers(_0x3cc810[_0x4b5861(0x19c)]),_0x385713=_0x3db5e9[_0x4b5861(0x15b)](_0x13d5f3=>Number(_0x13d5f3[_0x4b5861(0x187)])===_0x14cd24);if(_0x385713['length']!==0x1||!_0x385713[0x0][_0x4b5861(0x161)]?.[_0x4b5861(0x176)]())throw CliErrors[_0x4b5861(0x169)](_0x4b5861(0x16a)+_0x14cd24+'\x20was\x20not\x20found\x20in\x20app\x20'+_0x3cc810[_0x4b5861(0x19c)]+'.',_0x4b5861(0x17e));_0x275fa3?(_0x423ecc=![],_0x31b8c2[_0x4b5861(0x164)](_0x4b5861(0x199)+_0x14cd24+_0x4b5861(0x167)+_0x45dba1['id']+'.')):_0x1e6cc6['userList']['push']({'userId':_0x14cd24,'username':_0x385713[0x0][_0x4b5861(0x161)]});}else!_0x275fa3?(_0x423ecc=![],_0x31b8c2[_0x4b5861(0x164)](_0x4b5861(0x199)+_0x14cd24+'\x20is\x20not\x20in\x20runtime\x20role\x20'+_0x45dba1['id']+'.')):_0x1e6cc6[_0x4b5861(0x182)]=_0x1e6cc6[_0x4b5861(0x182)][_0x4b5861(0x15b)](_0x5e8ba6=>_0x5e8ba6[_0x4b5861(0x165)]!==_0x14cd24);return{'role':_0x45dba1,'userId':_0x14cd24,'roleList':_0xc2f940,'before':{'userIds':_0x146bae},'after':{'userIds':_0x1e6cc6[_0x4b5861(0x182)][_0x4b5861(0x18c)](_0x1b1cf9=>_0x1b1cf9['userId'])},'shouldWrite':_0x423ecc,'warnings':_0x31b8c2};}export function runtimeRoleWriteResult(_0x44096b,_0x530708,_0x44942c,_0x4274bb,_0x1ab1b7,_0x18f711=[]){return{'operation':_0x44096b,'scope':'runtime','selector':_0x530708,'before':_0x44942c,'after':_0x4274bb,'dryRun':![],'backend':_0x1ab1b7,'warnings':_0x18f711};}
1
+ const a54_0x571c9f=a54_0x2834;(function(_0x3c6f50,_0xdac783){const _0x2afbda=a54_0x2834,_0x5c5966=_0x3c6f50();while(!![]){try{const _0x5b0697=-parseInt(_0x2afbda(0x186))/0x1*(parseInt(_0x2afbda(0x198))/0x2)+parseInt(_0x2afbda(0x18e))/0x3*(parseInt(_0x2afbda(0x189))/0x4)+-parseInt(_0x2afbda(0x17a))/0x5*(-parseInt(_0x2afbda(0x1b1))/0x6)+parseInt(_0x2afbda(0x1b7))/0x7*(parseInt(_0x2afbda(0x187))/0x8)+parseInt(_0x2afbda(0x1ba))/0x9+parseInt(_0x2afbda(0x1b5))/0xa*(-parseInt(_0x2afbda(0x1ad))/0xb)+-parseInt(_0x2afbda(0x1b0))/0xc;if(_0x5b0697===_0xdac783)break;else _0x5c5966['push'](_0x5c5966['shift']());}catch(_0x1569a4){_0x5c5966['push'](_0x5c5966['shift']());}}}(a54_0x4f23,0x8ce80));function a54_0x4f23(){const _0x46ce83=['Runtime\x20role\x20name\x20\x22','Runtime\x20role\x20','Role\x20ID\x20must\x20be\x20a\x20positive\x20integer.','flag','user','\x22\x20is\x20ambiguous.','code','Pass\x20--user\x20<userId>;\x20name\x20and\x20account\x20lookup\x20are\x20not\x20available\x20in\x20runtime\x20scope.','map','Runtime\x20numeric\x20userId','test','isSafeInteger','55JpdLZw','validation','permitCount','2374116WdNTlg','282ziPywL','appCode','totalCount','roleCode','1118210QUtSqC','runtime','7SUpIPh','num','\x20was\x20not\x20found\x20in\x20app\x20','802116FXYnVC','Globally\x20unique\x20roleCode\x20(maximum\x2064\x20characters)','Runtime\x20userId\x20must\x20be\x20a\x20positive\x20safe\x20integer.','Pass\x20--role\x20<id|name>.','User\x20','userId','push','OWNER','ADMIN','CUSTOM','\x20built-in\x20runtime\x20role\x20','87950mPmkKQ','includes','join','\x20is\x20not\x20in\x20runtime\x20role\x20','Runtime\x20role\x20id\x20','\x20is\x20already\x20in\x20runtime\x20role\x20','expect-user-count','Runtime\x20role\x20ID\x20returned\x20by\x20role\x20list','role-code','Runtime\x20role\x20membership\x20requires\x20a\x20numeric\x20userId.','userName','USER','11333JLypGI','1656576FtTAZg','--role-code\x20must\x20not\x20be\x20blank.','6548jtcCAD','str','\x22\x20was\x20not\x20found\x20in\x20app\x20','--expect-user-count\x20must\x20be\x20a\x20non-negative\x20integer.','userCount','657KFqxpm','filter','role','find','length','string','paging','roleName','\x20is\x20missing\x20from\x20the\x20grouped\x20member\x20snapshot.','items','26JjEWdp','roleType','applyUserList','userList','Cannot\x20','trim','Reject\x20when\x20the\x20target\x20role\x20member\x20count\x20has\x20changed','Reload\x20the\x20role\x20list\x20and\x20retry\x20after\x20the\x20server\x20state\x20is\x20consistent.','Only\x20CUSTOM\x20runtime\x20roles\x20can\x20be\x20modified\x20or\x20deleted.'];a54_0x4f23=function(){return _0x46ce83;};return a54_0x4f23();}import{listRuntimeAppUsers,listRuntimeAppRoles,listRuntimeRoleUsers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const RUNTIME_ROLE_TYPES=['ADMIN',a54_0x571c9f(0x185),'OWNER',a54_0x571c9f(0x178)];const BUILTIN_ROLE_TYPES=[a54_0x571c9f(0x177),a54_0x571c9f(0x185),a54_0x571c9f(0x1c1)];export const ROLE_ID_FLAG={'name':'id','type':'number','required':!![],'description':a54_0x571c9f(0x181)};export const ROLE_REF_FLAG={'name':a54_0x571c9f(0x190),'type':'string','required':!![],'description':'Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name'};export const ROLE_CODE_FLAG={'name':a54_0x571c9f(0x182),'type':a54_0x571c9f(0x193),'description':a54_0x571c9f(0x1bb)};export const USER_ID_FLAG={'name':'user','type':a54_0x571c9f(0x193),'required':!![],'description':a54_0x571c9f(0x1aa)};export const EXPECT_USER_COUNT_FLAG={'name':a54_0x571c9f(0x180),'type':'number','description':a54_0x571c9f(0x19e)};export function isBuiltinRuntimeRole(_0x4b4399){const _0x1add39=a54_0x571c9f;return BUILTIN_ROLE_TYPES[_0x1add39(0x17b)](_0x4b4399);}function a54_0x2834(_0x3d0c4b,_0x2a2f45){_0x3d0c4b=_0x3d0c4b-0x177;const _0x4f23f8=a54_0x4f23();let _0x283455=_0x4f23f8[_0x3d0c4b];return _0x283455;}export function assertCustomRuntimeRole(_0x4fc23f,_0x2b19f2){const _0x4a4ab0=a54_0x571c9f;if(_0x4fc23f[_0x4a4ab0(0x199)]!==_0x4a4ab0(0x178))throw CliErrors[_0x4a4ab0(0x1ae)](_0x4a4ab0(0x19c)+_0x2b19f2+_0x4a4ab0(0x179)+_0x4fc23f[_0x4a4ab0(0x195)]+'\x20('+_0x4fc23f[_0x4a4ab0(0x199)]+').',_0x4a4ab0(0x1a0));}export function projectRuntimeRole(_0x2e07ad){const _0x2e95de=a54_0x571c9f;return{'id':_0x2e07ad['id'],'roleCode':_0x2e07ad[_0x2e95de(0x1b4)],'roleName':_0x2e07ad[_0x2e95de(0x195)],'roleType':_0x2e07ad['roleType'],'remark':_0x2e07ad['remark'],'userCount':_0x2e07ad[_0x2e95de(0x18d)]??0x0,'permitCount':_0x2e07ad[_0x2e95de(0x1af)]??0x0,'builtin':isBuiltinRuntimeRole(_0x2e07ad[_0x2e95de(0x199)])};}export function readOptionalRuntimeRoleCode(_0x1bca50){const _0x1daf04=a54_0x571c9f,_0x12a48c=_0x1bca50['flag']('role-code');if(_0x12a48c===undefined||_0x12a48c===null)return undefined;const _0x1775c7=String(_0x12a48c)['trim']();if(!_0x1775c7)throw CliErrors['validation'](_0x1daf04(0x188));if(_0x1775c7[_0x1daf04(0x192)]>0x40)throw CliErrors[_0x1daf04(0x1ae)]('--role-code\x20cannot\x20exceed\x2064\x20characters.');return _0x1775c7;}export async function getRuntimeRoleById(_0x180824,_0x4bdba3){const _0x751643=a54_0x571c9f;if(!Number['isSafeInteger'](_0x4bdba3)||_0x4bdba3<=0x0)throw CliErrors[_0x751643(0x1ae)](_0x751643(0x1a3));const _0xbfe6e7=(await listAllRuntimeRoles(_0x180824))['filter'](_0x580509=>_0x580509['id']===_0x4bdba3&&(!_0x580509['appCode']||_0x580509['appCode']===_0x180824));if(_0xbfe6e7[_0x751643(0x192)]!==0x1)throw CliErrors[_0x751643(0x1ae)](_0x751643(0x17e)+_0x4bdba3+_0x751643(0x1b9)+_0x180824+'.','Run\x20`lovrabet\x20role\x20list`\x20and\x20use\x20a\x20role\x20from\x20the\x20current\x20app.');return _0xbfe6e7[0x0];}export async function listAllRuntimeRoles(_0x50a94d,_0x125394={}){const _0x48e195=a54_0x571c9f,_0x42a42d=0x64,_0x322e38=[];for(let _0xcf5202=0x1;;_0xcf5202+=0x1){const _0x3ebe5e=await listRuntimeAppRoles(_0x50a94d,{..._0x125394[_0x48e195(0x195)]?{'roleName':_0x125394[_0x48e195(0x195)]}:{},'currentPage':_0xcf5202,'pageSize':_0x42a42d});_0x322e38[_0x48e195(0x1c0)](..._0x3ebe5e[_0x48e195(0x197)]);if(_0x3ebe5e['items'][_0x48e195(0x192)]<_0x42a42d||_0x3ebe5e[_0x48e195(0x194)]&&_0x322e38['length']>=_0x3ebe5e[_0x48e195(0x194)][_0x48e195(0x1b3)])return _0x322e38;}}export async function resolveRuntimeRoleRef(_0xb1d880,_0xe6b4a6){const _0xe44421=a54_0x571c9f,_0x104059=_0xe6b4a6['trim']();if(!_0x104059)throw CliErrors[_0xe44421(0x1ae)]('Missing\x20runtime\x20role\x20reference.',_0xe44421(0x1bd));if(/^\d+$/[_0xe44421(0x1ab)](_0x104059))return getRuntimeRoleById(_0xb1d880,Number(_0x104059));const _0x22333e=(await listAllRuntimeRoles(_0xb1d880))[_0xe44421(0x18f)](_0x4b57e1=>_0x4b57e1[_0xe44421(0x195)]===_0x104059);if(_0x22333e[_0xe44421(0x192)]===0x0)throw CliErrors[_0xe44421(0x1ae)]('Runtime\x20role\x20name\x20\x22'+_0x104059+_0xe44421(0x18b)+_0xb1d880+'.','Run\x20`lovrabet\x20role\x20list`\x20or\x20pass\x20--role\x20<id>.');if(_0x22333e[_0xe44421(0x192)]>0x1)throw CliErrors[_0xe44421(0x1ae)](_0xe44421(0x1a1)+_0x104059+_0xe44421(0x1a6),'Pass\x20one\x20role\x20ID:\x20'+_0x22333e[_0xe44421(0x1a9)](_0x4dc903=>_0x4dc903['id'])[_0xe44421(0x17c)](',\x20')+'.');return _0x22333e[0x0];}function parseRuntimeUserId(_0x38a4ea){const _0x3a6ac6=a54_0x571c9f,_0x358f1f=_0x38a4ea[_0x3a6ac6(0x19d)]();if(!/^\d+$/['test'](_0x358f1f))throw CliErrors[_0x3a6ac6(0x1ae)](_0x3a6ac6(0x183),_0x3a6ac6(0x1a8));const _0xabbeaa=Number(_0x358f1f);if(!Number[_0x3a6ac6(0x1ac)](_0xabbeaa)||_0xabbeaa<=0x0)throw CliErrors[_0x3a6ac6(0x1ae)](_0x3a6ac6(0x1bc));return _0xabbeaa;}export async function prepareRuntimeMemberMutation(_0x1eb5c5,_0x3e5d71){const _0x3b3189=a54_0x571c9f,_0x256a10=await resolveRuntimeRoleRef(_0x1eb5c5['appCode'],_0x1eb5c5[_0x3b3189(0x18a)](_0x3b3189(0x190)));if(_0x256a10[_0x3b3189(0x199)]===_0x3b3189(0x1c1))throw CliErrors['validation']('OWNER\x20runtime\x20role\x20membership\x20cannot\x20be\x20changed\x20with\x20this\x20command.','Transfer\x20or\x20manage\x20application\x20ownership\x20through\x20the\x20dedicated\x20application\x20workflow.');const _0x5eaa40=parseRuntimeUserId(_0x1eb5c5[_0x3b3189(0x18a)](_0x3b3189(0x1a5))),_0x4e580d=(await listRuntimeRoleUsers(_0x1eb5c5['appCode']))[_0x3b3189(0x1a9)](_0xfa534f=>({..._0xfa534f,'userList':[..._0xfa534f[_0x3b3189(0x19b)]??[]],'applyUserList':[..._0xfa534f[_0x3b3189(0x19a)]??[]]})),_0x3fdafb=_0x4e580d[_0x3b3189(0x191)](_0x1b69ef=>_0x1b69ef['id']===_0x256a10['id']);if(!_0x3fdafb)throw CliErrors[_0x3b3189(0x1ae)](_0x3b3189(0x1a2)+_0x256a10['id']+_0x3b3189(0x196),_0x3b3189(0x19f));const _0x493601=_0x3fdafb[_0x3b3189(0x19b)][_0x3b3189(0x1a9)](_0x4622a4=>_0x4622a4[_0x3b3189(0x1bf)]),_0x594651=_0x1eb5c5[_0x3b3189(0x1a4)]('expect-user-count');if(_0x594651!==undefined&&_0x594651!==null&&_0x594651!==''){const _0x133969=_0x1eb5c5[_0x3b3189(0x1b8)](_0x3b3189(0x180));if(!Number[_0x3b3189(0x1ac)](_0x133969)||_0x133969<0x0)throw CliErrors[_0x3b3189(0x1ae)](_0x3b3189(0x18c));if(_0x493601['length']!==_0x133969)throw CliErrors[_0x3b3189(0x1ae)]('Runtime\x20role\x20member\x20count\x20changed:\x20expected\x20'+_0x133969+',\x20found\x20'+_0x493601[_0x3b3189(0x192)]+'.','Read\x20the\x20current\x20members\x20and\x20retry\x20with\x20the\x20new\x20expected\x20count.');}const _0x3e0c64=_0x493601[_0x3b3189(0x17b)](_0x5eaa40),_0x18141f=[];let _0x3679f6=!![];if(_0x3e5d71==='user-add'){const _0x816ec5=await listRuntimeAppUsers(_0x1eb5c5[_0x3b3189(0x1b2)]),_0x29aeeb=_0x816ec5[_0x3b3189(0x18f)](_0x4873fc=>Number(_0x4873fc[_0x3b3189(0x1a7)])===_0x5eaa40);if(_0x29aeeb['length']!==0x1||!_0x29aeeb[0x0][_0x3b3189(0x184)]?.[_0x3b3189(0x19d)]())throw CliErrors[_0x3b3189(0x1ae)]('Runtime\x20user\x20'+_0x5eaa40+'\x20was\x20not\x20found\x20in\x20app\x20'+_0x1eb5c5[_0x3b3189(0x1b2)]+'.','Use\x20a\x20numeric\x20userId\x20returned\x20by\x20the\x20current\x20application\x27s\x20personnel\x20list.');_0x3e0c64?(_0x3679f6=![],_0x18141f['push']('User\x20'+_0x5eaa40+_0x3b3189(0x17f)+_0x256a10['id']+'.')):_0x3fdafb['userList'][_0x3b3189(0x1c0)]({'userId':_0x5eaa40,'username':_0x29aeeb[0x0][_0x3b3189(0x184)]});}else!_0x3e0c64?(_0x3679f6=![],_0x18141f[_0x3b3189(0x1c0)](_0x3b3189(0x1be)+_0x5eaa40+_0x3b3189(0x17d)+_0x256a10['id']+'.')):_0x3fdafb[_0x3b3189(0x19b)]=_0x3fdafb['userList'][_0x3b3189(0x18f)](_0x5a39bd=>_0x5a39bd[_0x3b3189(0x1bf)]!==_0x5eaa40);return{'role':_0x256a10,'userId':_0x5eaa40,'roleList':_0x4e580d,'before':{'userIds':_0x493601},'after':{'userIds':_0x3fdafb['userList'][_0x3b3189(0x1a9)](_0x38b9ef=>_0x38b9ef[_0x3b3189(0x1bf)])},'shouldWrite':_0x3679f6,'warnings':_0x18141f};}export function runtimeRoleWriteResult(_0x281873,_0x4f7dd3,_0x1e1052,_0x61871d,_0x59e4ae,_0x4d7000=[]){const _0xddd516=a54_0x571c9f;return{'operation':_0x281873,'scope':_0xddd516(0x1b6),'selector':_0x4f7dd3,'before':_0x1e1052,'after':_0x61871d,'dryRun':![],'backend':_0x59e4ae,'warnings':_0x4d7000};}