@lovrabet/lovrabet-cli 2.3.2-beta.3 → 2.3.3-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (174) 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/approval/index.d.ts +15 -0
  12. package/lib/commands/approval/index.js +1 -0
  13. package/lib/commands/artifact/index.js +1 -1
  14. package/lib/commands/auth/device.js +1 -1
  15. package/lib/commands/auth/index.js +1 -1
  16. package/lib/commands/auth/prompt.js +1 -1
  17. package/lib/commands/bff/detail.js +1 -1
  18. package/lib/commands/bff/exec.js +1 -1
  19. package/lib/commands/bff/index.js +1 -1
  20. package/lib/commands/cli-skill/index.js +1 -1
  21. package/lib/commands/common/config-policy.js +1 -1
  22. package/lib/commands/common/constraints.js +1 -1
  23. package/lib/commands/common/flags.js +1 -1
  24. package/lib/commands/common/local-file.js +1 -1
  25. package/lib/commands/config/definitions.js +1 -1
  26. package/lib/commands/config/init.js +1 -1
  27. package/lib/commands/config/shared.js +1 -1
  28. package/lib/commands/data/index.js +1 -1
  29. package/lib/commands/dataset/detail.js +1 -1
  30. package/lib/commands/dataset/index.js +1 -1
  31. package/lib/commands/dataset/list.js +1 -1
  32. package/lib/commands/dataset/sdk-doc.js +1 -1
  33. package/lib/commands/doctor.js +1 -1
  34. package/lib/commands/file/index.js +1 -1
  35. package/lib/commands/init.js +1 -1
  36. package/lib/commands/kb/index.js +1 -1
  37. package/lib/commands/logs/index.js +1 -1
  38. package/lib/commands/notification/config-list.js +1 -1
  39. package/lib/commands/notification/index.js +1 -1
  40. package/lib/commands/notification/shared.js +1 -1
  41. package/lib/commands/ocr/index.js +1 -1
  42. package/lib/commands/permit/dataset-get.js +1 -1
  43. package/lib/commands/permit/dataset-set.js +1 -1
  44. package/lib/commands/permit/index.js +1 -1
  45. package/lib/commands/permit/page-get.js +1 -1
  46. package/lib/commands/permit/page-set.js +1 -1
  47. package/lib/commands/permit/role-menus-set.js +1 -1
  48. package/lib/commands/permit/role-menus.js +1 -1
  49. package/lib/commands/permit/shared.js +1 -1
  50. package/lib/commands/personal-bff/index.js +1 -1
  51. package/lib/commands/registry.js +1 -1
  52. package/lib/commands/role/create.js +1 -1
  53. package/lib/commands/role/delete.js +1 -1
  54. package/lib/commands/role/detail.js +1 -1
  55. package/lib/commands/role/index.js +1 -1
  56. package/lib/commands/role/list.js +1 -1
  57. package/lib/commands/role/shared.js +1 -1
  58. package/lib/commands/role/update.js +1 -1
  59. package/lib/commands/role/user-add.js +1 -1
  60. package/lib/commands/role/user-remove.js +1 -1
  61. package/lib/commands/schedule/index.js +1 -1
  62. package/lib/commands/schema.js +1 -1
  63. package/lib/commands/service/dynamic.js +1 -1
  64. package/lib/commands/service/function-name-adapter.js +1 -1
  65. package/lib/commands/service/index.js +1 -1
  66. package/lib/commands/service/registry.js +1 -1
  67. package/lib/commands/skill/commands/create.js +1 -1
  68. package/lib/commands/skill/commands/diagram.js +1 -1
  69. package/lib/commands/skill/commands/install.js +1 -1
  70. package/lib/commands/skill/commands/list.js +1 -1
  71. package/lib/commands/skill/commands/push.js +1 -1
  72. package/lib/commands/skill/commands/validate.js +1 -1
  73. package/lib/commands/skill/diagram.js +1 -1
  74. package/lib/commands/skill/flags.js +1 -1
  75. package/lib/commands/skill/index.js +1 -1
  76. package/lib/commands/skill/manifest-helpers.js +1 -1
  77. package/lib/commands/skill/push-execute.js +1 -1
  78. package/lib/commands/skill/push-flow-helpers.js +1 -1
  79. package/lib/commands/skill/push-retarget.js +1 -1
  80. package/lib/commands/skill/scopes.js +1 -1
  81. package/lib/commands/skill/summary.js +1 -1
  82. package/lib/commands/skill/templates.js +1 -1
  83. package/lib/commands/skill/validate.js +1 -1
  84. package/lib/commands/sql/detail.js +1 -1
  85. package/lib/commands/sql/exec.js +1 -1
  86. package/lib/commands/sql/index.js +1 -1
  87. package/lib/commands/update.js +1 -1
  88. package/lib/commands/user-account/bind.js +1 -1
  89. package/lib/commands/user-account/index.js +1 -1
  90. package/lib/commands/workspace/index.js +1 -1
  91. package/lib/config/domain-config.js +1 -1
  92. package/lib/config/schema.js +1 -1
  93. package/lib/constant/app.js +1 -1
  94. package/lib/constant/auth-mode.js +1 -1
  95. package/lib/constant/cli.js +1 -1
  96. package/lib/constant/defaults.js +1 -1
  97. package/lib/constant/distribution.js +1 -1
  98. package/lib/constant/domain.js +1 -1
  99. package/lib/constant/env.js +1 -1
  100. package/lib/constant/output.js +1 -1
  101. package/lib/constant/product.js +1 -1
  102. package/lib/constant/region.js +1 -1
  103. package/lib/constant/risk.js +1 -1
  104. package/lib/constant/url.js +1 -1
  105. package/lib/context.js +1 -1
  106. package/lib/core/api-client.d.ts +83 -0
  107. package/lib/core/api-client.js +1 -1
  108. package/lib/core/db-resolver.js +1 -1
  109. package/lib/core/kb-search-client.js +1 -1
  110. package/lib/core/sdk-client.js +1 -1
  111. package/lib/errors.js +1 -1
  112. package/lib/framework/build-all-flags.js +1 -1
  113. package/lib/framework/dryrun.js +1 -1
  114. package/lib/framework/flags.js +1 -1
  115. package/lib/framework/help.js +1 -1
  116. package/lib/framework/index.js +1 -1
  117. package/lib/framework/output.js +1 -1
  118. package/lib/framework/preparse.js +1 -1
  119. package/lib/framework/rate-limit.js +1 -1
  120. package/lib/framework/raw-flags.js +1 -1
  121. package/lib/framework/response.js +1 -1
  122. package/lib/framework/runner-confirmation.js +1 -1
  123. package/lib/framework/runner-error.js +1 -1
  124. package/lib/framework/runner.js +1 -1
  125. package/lib/framework/schema-export.js +1 -1
  126. package/lib/framework/service-order.js +1 -1
  127. package/lib/framework/types.js +1 -1
  128. package/lib/generated/build-info.d.ts +4 -4
  129. package/lib/generated/build-info.js +1 -1
  130. package/lib/generated/official-routing.js +1 -1
  131. package/lib/generated/routing-contract.js +1 -1
  132. package/lib/help.js +1 -1
  133. package/lib/postinstall.js +1 -1
  134. package/lib/runtime/confirmation.js +1 -1
  135. package/lib/runtime/event.js +1 -1
  136. package/lib/runtime/index.js +1 -1
  137. package/lib/runtime/queue.js +1 -1
  138. package/lib/runtime/resolve.js +1 -1
  139. package/lib/skills/builtin-skill.js +1 -1
  140. package/lib/skills/npx-skills-add.js +1 -1
  141. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  142. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  143. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  144. package/lib/skills/runtime-skill-sync/install-target.js +1 -1
  145. package/lib/skills/runtime-skill-sync/links.js +1 -1
  146. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  147. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  148. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  149. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  150. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  151. package/lib/skills/runtime-skill-sync/push.js +1 -1
  152. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  153. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  154. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  155. package/lib/skills/runtime-skill-sync.js +1 -1
  156. package/lib/skills/skill-presence.js +1 -1
  157. package/lib/utils/access-key-redaction.js +1 -1
  158. package/lib/utils/apply-jq-filter.js +1 -1
  159. package/lib/utils/cli-version-check.js +1 -1
  160. package/lib/utils/cli-version-policy.js +1 -1
  161. package/lib/utils/logger.js +1 -1
  162. package/lib/utils/lossless-json.js +1 -1
  163. package/lib/utils/params.js +1 -1
  164. package/lib/utils/positive-safe-integer.d.ts +5 -0
  165. package/lib/utils/positive-safe-integer.js +1 -0
  166. package/lib/utils/redaction.d.ts +17 -0
  167. package/lib/utils/redaction.js +1 -0
  168. package/lib/utils/update-notice.js +1 -1
  169. package/lib/utils/version.js +1 -1
  170. package/lib/utils/write-cli-side-channel.js +1 -1
  171. package/package.json +1 -1
  172. package/skills/lovrabet/SKILL.md +3 -2
  173. package/skills/lovrabet/references/lovrabet-approval-workflow.md +73 -0
  174. package/skills/lovrabet.manifest.json +4 -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
+ const a41_0x4accc0=a41_0x2edf;(function(_0x261fac,_0x5e1294){const _0x390623=a41_0x2edf,_0x2711ec=_0x261fac();while(!![]){try{const _0x3a01b1=parseInt(_0x390623(0x7e))/0x1*(parseInt(_0x390623(0x96))/0x2)+parseInt(_0x390623(0x7c))/0x3+parseInt(_0x390623(0xb4))/0x4+parseInt(_0x390623(0x8c))/0x5+parseInt(_0x390623(0xb3))/0x6+parseInt(_0x390623(0x7b))/0x7+-parseInt(_0x390623(0x86))/0x8;if(_0x3a01b1===_0x5e1294)break;else _0x2711ec['push'](_0x2711ec['shift']());}catch(_0xdc9964){_0x2711ec['push'](_0x2711ec['shift']());}}}(a41_0x4a61,0x2523f));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=[a41_0x4accc0(0xaa),a41_0x4accc0(0x84),a41_0x4accc0(0x93),a41_0x4accc0(0x9b),'DATA_EXPORT',a41_0x4accc0(0xae)],DATASETS_FLAG={'name':a41_0x4accc0(0x8d),'type':a41_0x4accc0(0x8e),'required':!![],'description':a41_0x4accc0(0x99)},ACTIONS_FLAG={'name':'actions','type':a41_0x4accc0(0x8e),'required':!![],'description':'Comma-separated\x20actions:\x20'+DATA_ACTIONS['join'](',\x20')};function a41_0x2edf(_0x32c9f1,_0xd819ff){_0x32c9f1=_0x32c9f1-0x78;const _0x4a617b=a41_0x4a61();let _0x2edf2c=_0x4a617b[_0x32c9f1];return _0x2edf2c;}async function prepare(_0x3e9a9c){const _0x530407=a41_0x4accc0;await assertRuntimePermissionManager(_0x3e9a9c[_0x530407(0x80)]);const _0x1c593d=assertGrantOrRevoke(_0x3e9a9c[_0x530407(0x98)](_0x530407(0xa6)),_0x3e9a9c['bool'](_0x530407(0xad))),_0x543f00=await resolveRuntimeRoleRef(_0x3e9a9c['appCode'],_0x3e9a9c[_0x530407(0x97)]('role'));assertRuntimePermitRoleConfigurable(_0x543f00);const _0x3eec27=splitRefs(_0x3e9a9c[_0x530407(0x97)](_0x530407(0x8d)),_0x530407(0x87)),_0x4f7eb9=[...new Set(splitRefs(_0x3e9a9c[_0x530407(0x97)](_0x530407(0x7a)),_0x530407(0x78))[_0x530407(0x79)](_0x3e93fc=>_0x3e93fc[_0x530407(0xa9)]()))],_0x4e9f13=_0x4f7eb9[_0x530407(0xab)](_0x876a1d=>!DATA_ACTIONS[_0x530407(0x8f)](_0x876a1d));if(_0x4e9f13[_0x530407(0x7f)]>0x0)throw CliErrors[_0x530407(0x85)](_0x530407(0x94)+_0x4e9f13[_0x530407(0x95)](',\x20')+'.');const _0x365950=await listRuntimeDatasetRolePermits(_0x3e9a9c['appCode']),_0x9d1ed0=await listRuntimePermitRoles(_0x3e9a9c[_0x530407(0x80)]),_0x418b15=[],_0x2cb40b=[],_0x132c0f=[],_0x3b5165=[];for(const _0x184225 of _0x3eec27){const _0x930751=_0x365950['find'](_0x3a8ae5=>_0x3a8ae5[_0x530407(0xb1)]===_0x184225);if(!_0x930751)throw CliErrors[_0x530407(0x85)](_0x530407(0xa0)+_0x184225+_0x530407(0xa5));for(const _0x255b5a of _0x4f7eb9){const _0x6702b3=_0x930751[_0x530407(0xa2)][_0x530407(0xac)](_0x1eb9cd=>_0x1eb9cd[_0x530407(0x9a)]===_0x255b5a);if(!_0x6702b3)throw CliErrors['validation'](_0x530407(0x83)+_0x184225+_0x530407(0x7d)+_0x255b5a+'.');const _0x46bde9=applyRuntimeRolePermission(_0x6702b3[_0x530407(0xa4)],_0x543f00,_0x9d1ed0,_0x1c593d);_0x2cb40b[_0x530407(0xb0)]({'datasetCode':_0x184225,'resourceType':_0x255b5a,'rolePermit':_0x6702b3[_0x530407(0xa4)]}),_0x132c0f[_0x530407(0xb0)]({'datasetCode':_0x184225,'resourceType':_0x255b5a,'rolePermit':_0x46bde9[_0x530407(0xa1)]}),_0x46bde9[_0x530407(0xb2)]?_0x418b15[_0x530407(0xb0)]({..._0x6702b3[_0x530407(0x82)]!=null?{'id':_0x6702b3[_0x530407(0x82)]}:{},'appCode':_0x3e9a9c[_0x530407(0x80)],'resourceCode':_0x184225,'resourceType':_0x255b5a,'resourceName':_0x6702b3['resourceName'],'rolePermit':_0x46bde9['roles']}):_0x3b5165[_0x530407(0xb0)](_0x184225+'/'+_0x255b5a+_0x530407(0x8b)+_0x1c593d+_0x530407(0x81)+_0x543f00['id']+'.');}}return{'operation':_0x1c593d,'role':_0x543f00,'datasetCodes':_0x3eec27,'actions':_0x4f7eb9,'permitList':_0x418b15,'before':_0x2cb40b,'after':_0x132c0f,'warnings':_0x3b5165};}export const permitDatasetSet={'service':a41_0x4accc0(0x91),'command':a41_0x4accc0(0x9c),'description':a41_0x4accc0(0xaf),'risk':'high-risk-write','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'(_0x39e438){const _0x43ba2b=a41_0x4accc0;assertGrantOrRevoke(_0x39e438['bool'](_0x43ba2b(0xa6)),_0x39e438[_0x43ba2b(0x98)](_0x43ba2b(0xad)));},async 'dryRun'(_0x2028bf){const _0x283b3c=a41_0x4accc0,_0x38dea1=await prepare(_0x2028bf);return dryRun(_0x283b3c(0x88),'/client/permit/resource/batch-save-dataset')[_0x283b3c(0x92)]({'appCode':_0x2028bf[_0x283b3c(0x80)],'permitList':_0x38dea1[_0x283b3c(0x89)]})[_0x283b3c(0x8a)](_0x283b3c(0x90)+_0x38dea1[_0x283b3c(0xa8)]+'\x20selected\x20runtime\x20dataset\x20actions')[_0x283b3c(0x9d)]();},async 'execute'(_0x284f1){const _0x6e2a0=a41_0x4accc0,_0x4c9947=await prepare(_0x284f1);return _0x4c9947[_0x6e2a0(0x89)][_0x6e2a0(0x7f)]>0x0&&await saveRuntimeDatasetRolePermits(_0x284f1[_0x6e2a0(0x80)],_0x4c9947[_0x6e2a0(0x89)]),{'ok':!![],'data':runtimePermitWriteResult('dataset-'+_0x4c9947['operation'],{'roleId':_0x4c9947['role']['id'],'datasetCodes':_0x4c9947['datasetCodes'],'actions':_0x4c9947['actions']},_0x4c9947[_0x6e2a0(0x9e)],_0x4c9947[_0x6e2a0(0x9f)],{'method':_0x6e2a0(0x88),'path':_0x6e2a0(0xa7)},_0x4c9947[_0x6e2a0(0xa3)])};}};function a41_0x4a61(){const _0x36cb7d=['DATA_DETAIL','dataset-set','build','before','after','Runtime\x20dataset\x20','roles','dataPermitList','warnings','rolePermit','\x20was\x20not\x20found.','grant','/client/permit/resource/batch-save-dataset','operation','toUpperCase','DATA_CREATE','filter','find','revoke','DATA_ROW','Grant\x20or\x20revoke\x20selected\x20runtime\x20dataset\x20actions\x20for\x20one\x20role','push','datasetCode','changed','933306bJCXgt','814964QmqXSX','--actions','map','actions','1457204laGUNI','827847bkpARv','\x20does\x20not\x20expose\x20','26624vyCxYB','length','appCode','\x20for\x20role\x20','permitId','Dataset\x20','DATA_UPDATE','validation','9907232CnzJBo','--datasets','POST','permitList','description','\x20already\x20reflects\x20','1271270IdjcYb','datasets','string','includes','Preview:\x20','permit','body','DATA_DELETE','Invalid\x20dataset\x20actions:\x20','join','22QYJYrE','str','bool','Comma-separated\x20runtime\x20dataset\x20codes','resourceType'];a41_0x4a61=function(){return _0x36cb7d;};return a41_0x4a61();}
@@ -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(_0x5b722,_0x45adbb){const _0x20085c=a42_0x1c07,_0x551d65=_0x5b722();while(!![]){try{const _0x59af2c=parseInt(_0x20085c(0xcf))/0x1*(parseInt(_0x20085c(0xce))/0x2)+parseInt(_0x20085c(0xcc))/0x3*(-parseInt(_0x20085c(0xc8))/0x4)+parseInt(_0x20085c(0xca))/0x5*(-parseInt(_0x20085c(0xc7))/0x6)+parseInt(_0x20085c(0xcb))/0x7+-parseInt(_0x20085c(0xd1))/0x8+parseInt(_0x20085c(0xcd))/0x9*(parseInt(_0x20085c(0xc9))/0xa)+parseInt(_0x20085c(0xd0))/0xb;if(_0x59af2c===_0x45adbb)break;else _0x551d65['push'](_0x551d65['shift']());}catch(_0x509d91){_0x551d65['push'](_0x551d65['shift']());}}}(a42_0x4e81,0xa89c1));import{permitPageGet}from'../../commands/permit/page-get.js';import{permitPageSet}from'../../commands/permit/page-set.js';function a42_0x1c07(_0x265da8,_0x56035a){_0x265da8=_0x265da8-0xc7;const _0x4e8124=a42_0x4e81();let _0x1c0748=_0x4e8124[_0x265da8];return _0x1c0748;}import{permitRoleMenus}from'../../commands/permit/role-menus.js';import{permitRoleMenusSet}from'../../commands/permit/role-menus-set.js';function a42_0x4e81(){const _0x19ea58=['5rebJBN','5989487NhQIVC','288zTjHIc','108QjJrxg','166WJvvEl','3306tQddtF','19482287NDgxDw','6593168PQOKjx','7905246HkkLja','49004WpgicC','922710HPcSAQ'];a42_0x4e81=function(){return _0x19ea58;};return a42_0x4e81();}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 a43_0x23f5e4=a43_0x42de;(function(_0x2a99cd,_0x51dafb){const _0x168acd=a43_0x42de,_0x11d981=_0x2a99cd();while(!![]){try{const _0x3255b4=parseInt(_0x168acd(0xac))/0x1*(parseInt(_0x168acd(0xaf))/0x2)+parseInt(_0x168acd(0xab))/0x3*(-parseInt(_0x168acd(0xaa))/0x4)+parseInt(_0x168acd(0xad))/0x5+parseInt(_0x168acd(0xa9))/0x6*(-parseInt(_0x168acd(0xae))/0x7)+-parseInt(_0x168acd(0xa3))/0x8*(-parseInt(_0x168acd(0xa4))/0x9)+-parseInt(_0x168acd(0xa0))/0xa*(parseInt(_0x168acd(0xa7))/0xb)+parseInt(_0x168acd(0xa2))/0xc;if(_0x3255b4===_0x51dafb)break;else _0x11d981['push'](_0x11d981['shift']());}catch(_0x33620d){_0x11d981['push'](_0x11d981['shift']());}}}(a43_0x501c,0x6b8a5));import{getRuntimePagePermit}from'../../core/api-client.js';function a43_0x501c(){const _0x691795=['10tUiNLZ','121030acLZmm','menu-id','6144600qzokfy','6664376jhpwwv','9vQmYBV','permit','page-get','209ilBMLr','read','251346alyAsQ','2660556Srhuig','3qTvNmf','109660GHBLgW','352745XbBBUo','105atTOot'];a43_0x501c=function(){return _0x691795;};return a43_0x501c();}function a43_0x42de(_0x1f714a,_0x65c38b){_0x1f714a=_0x1f714a-0xa0;const _0x501c46=a43_0x501c();let _0x42de86=_0x501c46[_0x1f714a];return _0x42de86;}import{MENU_ID_FLAG,projectRuntimePagePermit}from'../../commands/permit/shared.js';export const permitPageGet={'service':a43_0x23f5e4(0xa5),'command':a43_0x23f5e4(0xa6),'description':'Get\x20runtime\x20page\x20permission\x20slots\x20by\x20menu\x20ID','risk':a43_0x23f5e4(0xa8),'flags':[MENU_ID_FLAG],async 'execute'(_0x28cba5){const _0x134d75=a43_0x23f5e4,_0x419477=await getRuntimePagePermit(_0x28cba5['num'](_0x134d75(0xa1)));return{'ok':!![],'data':{'scope':'runtime','page':projectRuntimePagePermit(_0x419477)}};}};
@@ -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 a44_0x5dac08=a44_0x12ce;(function(_0xc2e21e,_0x318336){const _0x44b257=a44_0x12ce,_0x3c7af5=_0xc2e21e();while(!![]){try{const _0x38516d=-parseInt(_0x44b257(0x1d5))/0x1*(parseInt(_0x44b257(0x1d3))/0x2)+parseInt(_0x44b257(0x1df))/0x3*(-parseInt(_0x44b257(0x1ef))/0x4)+-parseInt(_0x44b257(0x1f1))/0x5*(-parseInt(_0x44b257(0x1ea))/0x6)+parseInt(_0x44b257(0x1ee))/0x7*(-parseInt(_0x44b257(0x1e0))/0x8)+-parseInt(_0x44b257(0x1d2))/0x9+-parseInt(_0x44b257(0x1e5))/0xa*(-parseInt(_0x44b257(0x1cf))/0xb)+-parseInt(_0x44b257(0x1db))/0xc*(-parseInt(_0x44b257(0x1d0))/0xd);if(_0x38516d===_0x318336)break;else _0x3c7af5['push'](_0x3c7af5['shift']());}catch(_0x4f57ee){_0x3c7af5['push'](_0x3c7af5['shift']());}}}(a44_0x5174,0x43644));function a44_0x12ce(_0x20a92d,_0x2e7565){_0x20a92d=_0x20a92d-0x1ce;const _0x51743e=a44_0x5174();let _0x12ced7=_0x51743e[_0x20a92d];return _0x12ced7;}function a44_0x5174(){const _0x1a2562=['page','65NZxJhL','flag','build','menuId','44ypvYrO','234QhHwwW','slots','306720KURYPs','22UNTLLR','/client/permit/page/save','37193cebIBu','page-set','body','allowSelf','menu-id','Pass\x20at\x20least\x20one\x20page\x20role\x20flag\x20to\x20update.','332472bjUGYF','validation','num','high-risk-write','118299jPKQsz','1962584LikUDH','join','appCode','push','\x20does\x20not\x20expose\x20','763190wMOAZu','Set\x20selected\x20runtime\x20page\x20permission\x20slots','key','Page\x20menu\x20','description','183312xUOOBV','str','Menu\x20','POST','7IMHBya','24xRKvqt'];a44_0x5174=function(){return _0x1a2562;};return a44_0x5174();}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(_0x33ee0e){const _0x4578b4=a44_0x12ce;await assertRuntimePermissionManager(_0x33ee0e['appCode']);const _0x231e7d=_0x33ee0e[_0x4578b4(0x1dd)](_0x4578b4(0x1d9)),_0x2a7078=await getRuntimePagePermit(_0x231e7d);if(_0x2a7078[_0x4578b4(0x1e2)]&&_0x2a7078[_0x4578b4(0x1e2)]!==_0x33ee0e['appCode'])throw CliErrors['validation'](_0x4578b4(0x1ec)+_0x231e7d+'\x20does\x20not\x20belong\x20to\x20app\x20'+_0x33ee0e[_0x4578b4(0x1e2)]+'.');const _0xd46ce6=structuredClone(_0x2a7078),_0x19c291=[];for(const _0x4fb117 of PAGE_SLOT_SPECS){if(_0x33ee0e[_0x4578b4(0x1f2)](_0x4fb117[_0x4578b4(0x1f2)])===undefined)continue;const _0x576a84=_0x2a7078[_0x4fb117['key']];if(!_0x576a84)throw CliErrors[_0x4578b4(0x1dc)](_0x4578b4(0x1e8)+_0x231e7d+_0x4578b4(0x1e4)+_0x4fb117['key']+'.');_0x576a84['rolePermit']=await resolveRuntimePermitRoles(_0x33ee0e[_0x4578b4(0x1e2)],splitRefs(_0x33ee0e[_0x4578b4(0x1eb)](_0x4fb117[_0x4578b4(0x1f2)]),'--'+_0x4fb117[_0x4578b4(0x1f2)]),_0x4fb117[_0x4578b4(0x1d8)]),_0x19c291[_0x4578b4(0x1e3)](_0x4fb117[_0x4578b4(0x1e7)]);}if(_0x19c291['length']===0x0)throw CliErrors['validation'](_0x4578b4(0x1da));return{'menuId':_0x231e7d,'page':_0x2a7078,'before':_0xd46ce6,'slots':_0x19c291};}export const permitPageSet={'service':'permit','command':'page-set','description':a44_0x5dac08(0x1e6),'risk':a44_0x5dac08(0x1de),'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'(_0x4276de){const _0x18f981=a44_0x5dac08,_0x568f3f=await prepare(_0x4276de);return dryRun(_0x18f981(0x1ed),'/client/permit/page/save')[_0x18f981(0x1d7)](_0x568f3f[_0x18f981(0x1f0)])[_0x18f981(0x1e9)]('Preview:\x20update\x20page\x20permission\x20slots\x20'+_0x568f3f['slots'][_0x18f981(0x1e1)](',\x20'))[_0x18f981(0x1f3)]();},async 'execute'(_0x3b7632){const _0x2bb748=a44_0x5dac08,_0x30e1ee=await prepare(_0x3b7632),_0x1a9170=await saveRuntimePagePermit(_0x30e1ee[_0x2bb748(0x1f0)]);return{'ok':!![],'data':runtimePermitWriteResult(_0x2bb748(0x1d6),{'menuId':_0x30e1ee[_0x2bb748(0x1ce)],'slots':_0x30e1ee[_0x2bb748(0x1d1)]},projectRuntimePagePermit(_0x30e1ee['before']),projectRuntimePagePermit(_0x1a9170),{'method':_0x2bb748(0x1ed),'path':_0x2bb748(0x1d4)})};}};
@@ -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 a45_0x4879(_0xd9c0fb,_0x5c05c8){_0xd9c0fb=_0xd9c0fb-0x16b;const _0x4c8be0=a45_0x4c8b();let _0x4879e4=_0x4c8be0[_0xd9c0fb];return _0x4879e4;}const a45_0x20313a=a45_0x4879;(function(_0xf6cd81,_0x4b34ee){const _0x5d73cf=a45_0x4879,_0x36afa8=_0xf6cd81();while(!![]){try{const _0x2b19d8=parseInt(_0x5d73cf(0x17b))/0x1+-parseInt(_0x5d73cf(0x191))/0x2*(-parseInt(_0x5d73cf(0x170))/0x3)+parseInt(_0x5d73cf(0x199))/0x4*(-parseInt(_0x5d73cf(0x186))/0x5)+parseInt(_0x5d73cf(0x17c))/0x6*(-parseInt(_0x5d73cf(0x171))/0x7)+-parseInt(_0x5d73cf(0x16c))/0x8*(parseInt(_0x5d73cf(0x189))/0x9)+-parseInt(_0x5d73cf(0x197))/0xa*(-parseInt(_0x5d73cf(0x190))/0xb)+parseInt(_0x5d73cf(0x177))/0xc;if(_0x2b19d8===_0x4b34ee)break;else _0x36afa8['push'](_0x36afa8['shift']());}catch(_0x5a0dea){_0x36afa8['push'](_0x36afa8['shift']());}}}(a45_0x4c8b,0x37ac7));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':a45_0x20313a(0x176),'type':a45_0x20313a(0x179),'required':!![],'description':a45_0x20313a(0x183)};async function prepare(_0x22c369){const _0x4c2d79=a45_0x20313a;await assertRuntimePermissionManager(_0x22c369[_0x4c2d79(0x18a)]);const _0x2e47b2=assertGrantOrRevoke(_0x22c369['bool'](_0x4c2d79(0x178)),_0x22c369[_0x4c2d79(0x174)](_0x4c2d79(0x18d))),_0x3c0b2e=await resolveRuntimeRoleRef(_0x22c369[_0x4c2d79(0x18a)],_0x22c369[_0x4c2d79(0x187)](_0x4c2d79(0x192)));assertRuntimePermitRoleConfigurable(_0x3c0b2e);const _0x482776=[...new Set(splitRefs(_0x22c369[_0x4c2d79(0x187)](_0x4c2d79(0x176)),_0x4c2d79(0x17a))[_0x4c2d79(0x19d)](_0x4aa921=>{const _0x15ef1b=_0x4c2d79,_0x593edd=Number(_0x4aa921);if(!/^\d+$/[_0x15ef1b(0x16f)](_0x4aa921)||!Number[_0x15ef1b(0x18c)](_0x593edd)||_0x593edd<=0x0)throw CliErrors[_0x15ef1b(0x175)](_0x15ef1b(0x193)+_0x4aa921+'.');return _0x593edd;}))],_0x279f19=flattenRuntimeMenuRolePermits(await listRuntimeMenuRolePermits(_0x22c369[_0x4c2d79(0x18a)])),_0x3ddef9=await listRuntimePermitRoles(_0x22c369[_0x4c2d79(0x18a)]),_0x5934fa=[],_0x3fcec5=[],_0x147958=[],_0xd6fb5e=[];for(const _0x26a5c0 of _0x482776){const _0x20d4f7=_0x279f19[_0x4c2d79(0x188)](_0x412713=>_0x412713['id']===_0x26a5c0);if(!_0x20d4f7)throw CliErrors[_0x4c2d79(0x175)]('Runtime\x20menu\x20'+_0x26a5c0+_0x4c2d79(0x172));const _0xbd8e9=applyRuntimeRolePermission(_0x20d4f7[_0x4c2d79(0x180)],_0x3c0b2e,_0x3ddef9,_0x2e47b2);_0x3fcec5[_0x4c2d79(0x18f)]({'menuId':_0x26a5c0,'rolePermit':_0x20d4f7['rolePermit']}),_0x147958['push']({'menuId':_0x26a5c0,'rolePermit':_0xbd8e9[_0x4c2d79(0x17d)]});if(_0xbd8e9['changed'])_0x5934fa[_0x4c2d79(0x18f)](menuPermitDto(_0x22c369['appCode'],_0x20d4f7,_0xbd8e9[_0x4c2d79(0x17d)]));else _0xd6fb5e[_0x4c2d79(0x18f)](_0x4c2d79(0x17e)+_0x26a5c0+_0x4c2d79(0x19a)+_0x2e47b2+_0x4c2d79(0x182)+_0x3c0b2e['id']+'.');}return{'operation':_0x2e47b2,'role':_0x3c0b2e,'menuIds':_0x482776,'permitList':_0x5934fa,'before':_0x3fcec5,'after':_0x147958,'warnings':_0xd6fb5e};}function a45_0x4c8b(){const _0x3f5daf=['104qOgQrE','role-menus-set','warnings','test','3bfuZdy','202853ddIkKq','\x20was\x20not\x20found.','\x20selected\x20runtime\x20menus','bool','validation','menus','6074892bpqoUU','grant','string','--menus','399036lRRURR','60aytgFN','roles','Runtime\x20menu\x20','length','rolePermit','before','\x20for\x20role\x20','Comma-separated\x20runtime\x20menu\x20IDs','menuIds','body','890OIkqjj','str','find','152658SbJwYN','appCode','high-risk-write','isSafeInteger','revoke','Preview:\x20','push','11eYTpNg','147514UcIxOM','role','Invalid\x20runtime\x20menu\x20ID:\x20','after','POST','/client/permit/resource/batch-save-menu','1204630tlFftV','permitList','8116hbLCSY','\x20already\x20reflects\x20','Grant\x20or\x20revoke\x20selected\x20runtime\x20menus\x20for\x20one\x20role','operation','map','build'];a45_0x4c8b=function(){return _0x3f5daf;};return a45_0x4c8b();}export const permitRoleMenusSet={'service':'permit','command':a45_0x20313a(0x16d),'description':a45_0x20313a(0x19b),'risk':a45_0x20313a(0x18b),'confirmationDescription':'Grants\x20or\x20revokes\x20the\x20target\x20role\x20access\x20to\x20the\x20given\x20runtime\x20menus.\x20Menu\x20visibility\x20for\x20users\x20in\x20that\x20role\x20will\x20change.','flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,MENUS_FLAG],async 'validate'(_0x30a15f){const _0x31c75b=a45_0x20313a;assertGrantOrRevoke(_0x30a15f[_0x31c75b(0x174)]('grant'),_0x30a15f[_0x31c75b(0x174)](_0x31c75b(0x18d)));},async 'dryRun'(_0x1a5dd8){const _0x458ce8=a45_0x20313a,_0x55f384=await prepare(_0x1a5dd8);return dryRun(_0x458ce8(0x195),_0x458ce8(0x196))[_0x458ce8(0x185)]({'appCode':_0x1a5dd8[_0x458ce8(0x18a)],'permitList':_0x55f384[_0x458ce8(0x198)]})['description'](_0x458ce8(0x18e)+_0x55f384[_0x458ce8(0x19c)]+_0x458ce8(0x173))[_0x458ce8(0x16b)]();},async 'execute'(_0x5aaf4a){const _0x7c9b80=a45_0x20313a,_0x1c009d=await prepare(_0x5aaf4a);return _0x1c009d[_0x7c9b80(0x198)][_0x7c9b80(0x17f)]>0x0&&await saveRuntimeMenuRolePermits(_0x5aaf4a[_0x7c9b80(0x18a)],_0x1c009d[_0x7c9b80(0x198)]),{'ok':!![],'data':runtimePermitWriteResult('menu-'+_0x1c009d[_0x7c9b80(0x19c)],{'roleId':_0x1c009d['role']['id'],'menuIds':_0x1c009d[_0x7c9b80(0x184)]},_0x1c009d[_0x7c9b80(0x181)],_0x1c009d[_0x7c9b80(0x194)],{'method':_0x7c9b80(0x195),'path':_0x7c9b80(0x196)},_0x1c009d[_0x7c9b80(0x16e)])};}};
@@ -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
+ const a46_0x256f02=a46_0xe065;(function(_0x14f70a,_0x54f997){const _0x3fbf17=a46_0xe065,_0x303e69=_0x14f70a();while(!![]){try{const _0x39639c=parseInt(_0x3fbf17(0x129))/0x1*(-parseInt(_0x3fbf17(0x12a))/0x2)+parseInt(_0x3fbf17(0x12c))/0x3*(parseInt(_0x3fbf17(0x136))/0x4)+parseInt(_0x3fbf17(0x126))/0x5*(parseInt(_0x3fbf17(0x128))/0x6)+parseInt(_0x3fbf17(0x12f))/0x7*(parseInt(_0x3fbf17(0x137))/0x8)+-parseInt(_0x3fbf17(0x130))/0x9+parseInt(_0x3fbf17(0x133))/0xa+-parseInt(_0x3fbf17(0x132))/0xb;if(_0x39639c===_0x54f997)break;else _0x303e69['push'](_0x303e69['shift']());}catch(_0x1ae3cb){_0x303e69['push'](_0x303e69['shift']());}}}(a46_0x5cd5,0x45ef3));function a46_0x5cd5(){const _0x4d11f6=['role-menus','6352hNMcrb','3112yBbNFK','roleName','340vGvDBN','str','5730PSnbeb','706KLQkQX','1484ueGKzT','role','747nUtUJU','Show\x20evaluated\x20runtime\x20menu\x20access\x20for\x20one\x20role','appCode','9793rQtuZv','1559862WVZNri','roleType','5894284aSSkrV','5149020OFIMzu','read'];a46_0x5cd5=function(){return _0x4d11f6;};return a46_0x5cd5();}function a46_0xe065(_0x2e47f2,_0x158012){_0x2e47f2=_0x2e47f2-0x125;const _0x5cd540=a46_0x5cd5();let _0xe06587=_0x5cd540[_0x2e47f2];return _0xe06587;}import{getRuntimeRoleMenuResources}from'../../core/api-client.js';import{resolveRuntimeRoleRef}from'../../commands/role/shared.js';import{ROLE_REF_FLAG}from'../../commands/permit/shared.js';export const permitRoleMenus={'service':'permit','command':a46_0x256f02(0x135),'description':a46_0x256f02(0x12d),'risk':a46_0x256f02(0x134),'flags':[ROLE_REF_FLAG],async 'execute'(_0x4305ac){const _0x2053ef=a46_0x256f02,_0x1b15e9=await resolveRuntimeRoleRef(_0x4305ac[_0x2053ef(0x12e)],_0x4305ac[_0x2053ef(0x127)](_0x2053ef(0x12b))),_0x4c971a=await getRuntimeRoleMenuResources(_0x4305ac[_0x2053ef(0x12e)],_0x1b15e9['id']);return{'ok':!![],'data':{'scope':'runtime','role':{'id':_0x1b15e9['id'],'roleName':_0x1b15e9[_0x2053ef(0x125)],'roleType':_0x1b15e9[_0x2053ef(0x131)]},'menus':_0x4c971a}};}};
@@ -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 a47_0x2129e=a47_0x5661;(function(_0xa3d436,_0x1311c6){const _0x264dbe=a47_0x5661,_0x4ac7f4=_0xa3d436();while(!![]){try{const _0x419fe6=-parseInt(_0x264dbe(0x1da))/0x1*(parseInt(_0x264dbe(0x201))/0x2)+parseInt(_0x264dbe(0x1e8))/0x3*(parseInt(_0x264dbe(0x1d5))/0x4)+parseInt(_0x264dbe(0x1ff))/0x5*(parseInt(_0x264dbe(0x1f9))/0x6)+-parseInt(_0x264dbe(0x21a))/0x7*(parseInt(_0x264dbe(0x1ea))/0x8)+-parseInt(_0x264dbe(0x1e7))/0x9*(-parseInt(_0x264dbe(0x1e4))/0xa)+parseInt(_0x264dbe(0x212))/0xb*(parseInt(_0x264dbe(0x1f4))/0xc)+-parseInt(_0x264dbe(0x205))/0xd*(-parseInt(_0x264dbe(0x208))/0xe);if(_0x419fe6===_0x1311c6)break;else _0x4ac7f4['push'](_0x4ac7f4['shift']());}catch(_0x5e4e23){_0x4ac7f4['push'](_0x4ac7f4['shift']());}}}(a47_0x3568,0x6aca1));import{getLoginUserInfo,listRuntimePermitRoles,listRuntimeRoleUsers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{normalizePositiveSafeInteger}from'../../utils/positive-safe-integer.js';function a47_0x3568(){const _0x1e64dd=['Grant\x20the\x20selected\x20resources\x20to\x20the\x20role','180368XNDeww','Cannot\x20resolve\x20the\x20current\x20AK\x20userId\x20for\x20permission\x20management.','MENU','Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name','806ZNTkkn','Permission\x20role\x20\x22','export-roles','29456Iwinla','map','Ask\x20an\x20application\x20manager\x20to\x20perform\x20this\x20operation.','role','dataPermit','key','Configure\x20USER,\x20CUSTOM,\x20or\x20an\x20applicable\x20special\x20role\x20instead.','string','number','filter','5929099lerapj','ADMIN','some','SELF','dataExport','children','revoke','dataCreate','7bfNNiN','resourceCode','roleType','ALL','menuPermit','flag','4HVaNfD','trim','boolean','\x20runtime\x20role\x20','Cannot\x20revoke\x20the\x20last\x20role\x20from\x20a\x20runtime\x20resource.','2bRIfQn','Runtime\x20resource\x20permission\x20changes\x20require\x20an\x20ADMIN\x20or\x20OWNER\x20role.','row-roles','dataUpdate','OWNER','permitId','ADMIN\x20and\x20OWNER\x20have\x20full\x20runtime\x20access;\x20configure\x20USER\x20or\x20CUSTOM\x20instead.','validation','Use\x20a\x20role\x20ID\x20from\x20`lovrabet\x20role\x20list`.','Pass\x20exactly\x20one\x20of\x20--grant\x20or\x20--revoke.','10VyoUFv','length','menuId','478395XjBovo','125778kkRUIJ','pageId','2023312kyJctx','push','find','Revoke\x20the\x20selected\x20resources\x20from\x20the\x20role','\x22\x20is\x20ambiguous.','Cannot\x20change\x20resource\x20permissions\x20for\x20','delete-roles','rolePermit','split','userList','12rYlYha','Comma-separated\x20runtime\x20role\x20IDs\x20or\x20names','menu-roles','menu-id','\x20must\x20contain\x20at\x20least\x20one\x20value.','33522AohLBX','grant','runtime','dataDetail','values','roleName','95eHNXqN'];a47_0x3568=function(){return _0x1e64dd;};return a47_0x3568();}export const MENU_ID_FLAG={'name':a47_0x2129e(0x1f7),'type':a47_0x2129e(0x210),'required':!![],'description':'Runtime\x20menu\x20ID'};export const ROLE_REF_FLAG={'name':a47_0x2129e(0x20b),'type':a47_0x2129e(0x20f),'required':!![],'description':a47_0x2129e(0x204)};export const GRANT_FLAG={'name':'grant','type':a47_0x2129e(0x1d7),'description':a47_0x2129e(0x200)};export const REVOKE_FLAG={'name':a47_0x2129e(0x218),'type':a47_0x2129e(0x1d7),'description':a47_0x2129e(0x1ed)};export const PAGE_SLOT_SPECS=[{'flag':a47_0x2129e(0x1f6),'key':a47_0x2129e(0x1d3),'allowSelf':![]},{'flag':'create-roles','key':a47_0x2129e(0x219),'allowSelf':![]},{'flag':'update-roles','key':a47_0x2129e(0x1dd),'allowSelf':![]},{'flag':a47_0x2129e(0x1f0),'key':'dataDelete','allowSelf':![]},{'flag':'detail-roles','key':a47_0x2129e(0x1fc),'allowSelf':![]},{'flag':a47_0x2129e(0x207),'key':a47_0x2129e(0x216),'allowSelf':![]},{'flag':a47_0x2129e(0x1dc),'key':a47_0x2129e(0x20c),'allowSelf':!![]}];export const PAGE_ROLE_FLAGS=PAGE_SLOT_SPECS[a47_0x2129e(0x209)](_0x4a17bd=>({'name':_0x4a17bd[a47_0x2129e(0x1d4)],'type':a47_0x2129e(0x20f),'description':a47_0x2129e(0x1f5)}));export function splitRefs(_0xd0cffb,_0x21504a){const _0xfbf9=a47_0x2129e,_0xab8a73=[...new Set(_0xd0cffb[_0xfbf9(0x1f2)](',')[_0xfbf9(0x209)](_0x40dc73=>_0x40dc73[_0xfbf9(0x1d6)]())[_0xfbf9(0x211)](Boolean))];if(_0xab8a73[_0xfbf9(0x1e5)]===0x0)throw CliErrors[_0xfbf9(0x1e1)](_0x21504a+_0xfbf9(0x1f8));return _0xab8a73;}export function assertGrantOrRevoke(_0x1e848c,_0x5ad043){const _0x152dad=a47_0x2129e;if(_0x1e848c===_0x5ad043)throw CliErrors[_0x152dad(0x1e1)](_0x152dad(0x1e3));return _0x1e848c?'grant':_0x152dad(0x218);}function resolvePermitRole(_0x3b022c,_0xe3db02){const _0x232030=a47_0x2129e,_0x31bf0f=_0xe3db02['trim'](),_0x21d159=/^-?\d+$/['test'](_0x31bf0f)?_0x3b022c['filter'](_0x40b623=>_0x40b623['id']===Number(_0x31bf0f)):_0x3b022c['filter'](_0x25ea50=>_0x25ea50[_0x232030(0x1fe)]===_0x31bf0f||_0x25ea50['roleType']===_0x31bf0f['toUpperCase']());if(_0x21d159['length']!==0x1)throw CliErrors[_0x232030(0x1e1)](_0x21d159['length']===0x0?_0x232030(0x206)+_0x31bf0f+'\x22\x20was\x20not\x20found.':'Permission\x20role\x20\x22'+_0x31bf0f+_0x232030(0x1ee),_0x232030(0x1e2));return _0x21d159[0x0];}export async function resolveRuntimePermitRoles(_0x17df94,_0x439287,_0x1f25d6){const _0x91cc62=a47_0x2129e,_0x9762e1=await listRuntimePermitRoles(_0x17df94,{'needSelf':!![],'needPublic':!![]}),_0x1d978b=[...new Map(_0x439287[_0x91cc62(0x209)](_0x207f5e=>resolvePermitRole(_0x9762e1,_0x207f5e))[_0x91cc62(0x209)](_0x403431=>[_0x403431['id'],_0x403431]))[_0x91cc62(0x1fd)]()],_0x34957e=_0x1d978b[_0x91cc62(0x1ec)](_0x1b8ab5=>_0x1b8ab5[_0x91cc62(0x21c)]==='ADMIN'||_0x1b8ab5[_0x91cc62(0x21c)]==='OWNER');if(_0x34957e)throw CliErrors[_0x91cc62(0x1e1)](_0x34957e[_0x91cc62(0x21c)]+'\x20has\x20full\x20runtime\x20access\x20and\x20cannot\x20be\x20a\x20resource\x20permission\x20target.',_0x91cc62(0x20e));if(!_0x1f25d6&&_0x1d978b[_0x91cc62(0x214)](_0x4ceda7=>_0x4ceda7[_0x91cc62(0x21c)]===_0x91cc62(0x215)))throw CliErrors[_0x91cc62(0x1e1)]('SELF\x20is\x20only\x20valid\x20for\x20--row-roles.');return _0x1d978b;}export async function assertRuntimePermissionManager(_0x64f2a4){const _0x42e374=a47_0x2129e,_0x59090b=await getLoginUserInfo(),_0x6b845=_0x59090b['userId']??_0x59090b['id'],_0x1519ec=normalizePositiveSafeInteger(_0x6b845);if(_0x1519ec===undefined)throw CliErrors[_0x42e374(0x1e1)](_0x42e374(0x202));const _0x3f0eff=await listRuntimeRoleUsers(_0x64f2a4),_0x55fbcf=_0x3f0eff[_0x42e374(0x214)](_0x5367e1=>(_0x5367e1['roleType']===_0x42e374(0x213)||_0x5367e1[_0x42e374(0x21c)]===_0x42e374(0x1de))&&_0x5367e1[_0x42e374(0x1f3)][_0x42e374(0x214)](_0x9afcdb=>_0x9afcdb['userId']===_0x1519ec));if(!_0x55fbcf)throw CliErrors[_0x42e374(0x1e1)](_0x42e374(0x1db),_0x42e374(0x20a));}export function assertRuntimePermitRoleConfigurable(_0x5d83f1){const _0x400697=a47_0x2129e;if(_0x5d83f1[_0x400697(0x21c)]===_0x400697(0x213)||_0x5d83f1[_0x400697(0x21c)]===_0x400697(0x1de))throw CliErrors[_0x400697(0x1e1)](_0x400697(0x1ef)+_0x5d83f1[_0x400697(0x21c)]+_0x400697(0x1d8)+_0x5d83f1['roleName']+'.',_0x400697(0x1e0));}function asPermitRole(_0x2d5612){return{'id':_0x2d5612['id'],'roleName':_0x2d5612['roleName'],'roleType':_0x2d5612['roleType'],'allowed':!![]};}function a47_0x5661(_0x57eb55,_0x2a70c1){_0x57eb55=_0x57eb55-0x1d2;const _0x3568ce=a47_0x3568();let _0x566197=_0x3568ce[_0x57eb55];return _0x566197;}export function applyRuntimeRolePermission(_0x45b987,_0x429d21,_0x2df4ef,_0x5d350c){const _0x3c6500=a47_0x2129e,_0x74cf9d=!_0x45b987||_0x45b987[_0x3c6500(0x1e5)]===0x0,_0x55ec82=_0x45b987?.[_0x3c6500(0x214)](_0x2c7041=>_0x2c7041[_0x3c6500(0x21c)]===_0x3c6500(0x1d2))??![];if(_0x5d350c===_0x3c6500(0x1fa)&&(_0x74cf9d||_0x55ec82))return{'roles':_0x45b987??null,'changed':![]};let _0x44365b=_0x74cf9d||_0x55ec82?_0x2df4ef['filter'](_0x107866=>_0x107866['id']>0x0):[..._0x45b987];const _0x2977aa=_0x44365b[_0x3c6500(0x214)](_0x1146d0=>_0x1146d0['id']===_0x429d21['id']);if(_0x5d350c===_0x3c6500(0x1fa)){if(_0x2977aa)return{'roles':_0x44365b,'changed':![]};return _0x44365b[_0x3c6500(0x1eb)](asPermitRole(_0x429d21)),{'roles':_0x44365b,'changed':!![]};}if(!_0x2977aa)return{'roles':_0x44365b,'changed':_0x74cf9d||_0x55ec82};_0x44365b=_0x44365b['filter'](_0x542f06=>_0x542f06['id']!==_0x429d21['id']);if(_0x44365b['length']===0x0)throw CliErrors['validation'](_0x3c6500(0x1d9),'The\x20current\x20service\x20contract\x20does\x20not\x20persist\x20an\x20empty\x20rolePermit;\x20grant\x20another\x20role\x20first.');return{'roles':_0x44365b,'changed':!![]};}export function projectRuntimePagePermit(_0xa5aff7){const _0x193428=a47_0x2129e,_0xb7c811={'menuId':_0xa5aff7[_0x193428(0x1e6)],'pageId':_0xa5aff7[_0x193428(0x1e9)],'appCode':_0xa5aff7['appCode'],'datasetCode':_0xa5aff7['datasetCode']};for(const _0x31c1ef of PAGE_SLOT_SPECS){const _0x54ac40=_0xa5aff7[_0x31c1ef[_0x193428(0x20d)]];_0x54ac40&&(_0xb7c811[_0x31c1ef[_0x193428(0x20d)]]={'resourceCode':_0x54ac40[_0x193428(0x21b)],'resourceType':_0x54ac40['resourceType'],'roles':(_0x54ac40[_0x193428(0x1f1)]??[])[_0x193428(0x209)](_0x36ec34=>({'id':_0x36ec34['id'],'roleName':_0x36ec34['roleName'],'roleType':_0x36ec34[_0x193428(0x21c)]}))});}return _0xb7c811;}export function flattenRuntimeMenuRolePermits(_0x2215c1){const _0x41ae76=[],_0x1d5d10=_0x154db8=>{const _0x4be83a=a47_0x5661;_0x41ae76[_0x4be83a(0x1eb)](_0x154db8);for(const _0x28d4de of _0x154db8[_0x4be83a(0x217)]??[])_0x1d5d10(_0x28d4de);};for(const _0x141540 of _0x2215c1)_0x1d5d10(_0x141540);return _0x41ae76;}export function runtimePermitWriteResult(_0xca986c,_0x4c4e2f,_0x485d1a,_0x501c21,_0x1e775f,_0x43a4d5=[]){const _0xb683ee=a47_0x2129e;return{'operation':_0xca986c,'scope':_0xb683ee(0x1fb),'selector':_0x4c4e2f,'before':_0x485d1a,'after':_0x501c21,'dryRun':![],'backend':_0x1e775f,'warnings':_0x43a4d5};}export function menuPermitDto(_0x32f1be,_0x1a3ee0,_0x920690){const _0x4da5c0=a47_0x2129e;return{..._0x1a3ee0[_0x4da5c0(0x1df)]!=null?{'id':_0x1a3ee0[_0x4da5c0(0x1df)]}:{},'appCode':_0x32f1be,'menuId':_0x1a3ee0['id'],'pageId':_0x1a3ee0[_0x4da5c0(0x1e9)]??null,'resourceCode':String(_0x1a3ee0['id']),'resourceType':_0x4da5c0(0x203),'resourceName':_0x1a3ee0['label'],'rolePermit':_0x920690};}
@@ -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 a48_0x154376=a48_0x4c4a;(function(_0x10ae29,_0xb9dbd7){const _0x5a63cf=a48_0x4c4a,_0x20c922=_0x10ae29();while(!![]){try{const _0x4f75e8=parseInt(_0x5a63cf(0x8e))/0x1*(parseInt(_0x5a63cf(0x72))/0x2)+parseInt(_0x5a63cf(0x93))/0x3*(-parseInt(_0x5a63cf(0x77))/0x4)+-parseInt(_0x5a63cf(0xa4))/0x5*(parseInt(_0x5a63cf(0x75))/0x6)+-parseInt(_0x5a63cf(0x7a))/0x7+parseInt(_0x5a63cf(0xac))/0x8+-parseInt(_0x5a63cf(0x7d))/0x9*(-parseInt(_0x5a63cf(0x6d))/0xa)+-parseInt(_0x5a63cf(0x91))/0xb;if(_0x4f75e8===_0xb9dbd7)break;else _0x20c922['push'](_0x20c922['shift']());}catch(_0x151271){_0x20c922['push'](_0x20c922['shift']());}}}(a48_0x5d9e,0x34f41));function a48_0x4c4a(_0x462f91,_0x4274ba){_0x462f91=_0x462f91-0x6c;const _0x5d9ed3=a48_0x5d9e();let _0x4c4a8c=_0x5d9ed3[_0x462f91];return _0x4c4a8c;}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':a48_0x154376(0x81),'type':'string','description':a48_0x154376(0xa0)},FUNCTION_NAME_FLAG={'name':a48_0x154376(0x80),'type':a48_0x154376(0x8c),'required':!![],'description':a48_0x154376(0x7e)},DESCRIPTION_FLAG={'name':'description','type':a48_0x154376(0x8c),'description':a48_0x154376(0x73)},SOURCE_SESSION_FLAG={'name':'source-session-id','type':a48_0x154376(0x8c),'description':a48_0x154376(0x99)};function normalizeFunctionName(_0x2541d5){const _0x34c4d9=a48_0x154376,_0x1000b3=String(_0x2541d5||'')[_0x34c4d9(0xaf)]();if(!_0x1000b3||!FUNCTION_NAME_PATTERN[_0x34c4d9(0x9c)](_0x1000b3))throw CliErrors['validation'](_0x34c4d9(0x71));return _0x1000b3;}function readScriptFile(_0x2374e8){const _0x2a1102=a48_0x154376;if(!_0x2374e8)throw CliErrors['validation'](_0x2a1102(0x9e));if(!existsSync(_0x2374e8))throw CliErrors['validation']('File\x20not\x20found:\x20'+_0x2374e8);if(!statSync(_0x2374e8)['isFile']())throw CliErrors[_0x2a1102(0x88)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x2374e8);const _0x44bd27=readFileSync(_0x2374e8,'utf8');if(!_0x44bd27[_0x2a1102(0xaf)]())throw CliErrors[_0x2a1102(0x88)](_0x2a1102(0xad));return _0x44bd27;}function optionalTrimmed(_0x1a3893){const _0x10e0ab=a48_0x154376,_0x4b1492=String(_0x1a3893||'')[_0x10e0ab(0xaf)]();return _0x4b1492||undefined;}function summarizeBff(_0x26a4e7){const _0x19c71=a48_0x154376;return{'id':_0x26a4e7['id'],'appCode':_0x26a4e7[_0x19c71(0x82)],'functionName':_0x26a4e7[_0x19c71(0x9f)],'description':_0x26a4e7[_0x19c71(0x9b)],'scriptType':_0x26a4e7[_0x19c71(0x74)],'version':_0x26a4e7[_0x19c71(0x7c)],'gmtModified':_0x26a4e7[_0x19c71(0x98)],'updateTime':_0x26a4e7[_0x19c71(0x6f)]};}function a48_0x5d9e(){const _0x522c6b=['bool','personal-bff\x20update\x20requires\x20at\x20least\x20one\x20of\x20--name,\x20--description,\x20--file,\x20or\x20--source-session-id.','1042993ZPaeHt','Personal\x20Backend\x20Function\x20script\x20ID','version','9Zkorix','Personal\x20Backend\x20Function\x20name,\x20for\x20example\x20loadOrders','Updated\x20Personal\x20Backend\x20Function\x20','name','file','appCode','createUserId','body','/client/runtime-bff/personal/create','Update\x20a\x20Personal\x20Backend\x20Function\x20by\x20ID','/client/runtime-bff/personal/','validation','str','verbose','Created\x20Personal\x20Backend\x20Function\x20','string','num','57934lvviJN','create','POST','1365342GArLGN','isArray','146523wNgqVd','write','Saves\x20the\x20local\x20script\x20as\x20a\x20Personal\x20Backend\x20Function.\x20The\x20script\x20can\x20then\x20be\x20called\x20in\x20the\x20current\x20app.','sourceSessionId','build','gmtModified','Optional\x20source\x20RuntimeAgent\x20session\x20id','source-session-id','description','test','flag','File\x20path\x20is\x20required.','functionName','Path\x20to\x20a\x20local\x20UTF-8\x20JavaScript\x20or\x20TypeScript\x20file','--params\x20must\x20be\x20a\x20JSON\x20object.','personal-bff','params','100TJGNOt','Execute\x20a\x20Personal\x20Backend\x20Function\x20by\x20ID,\x20optionally\x20with\x20JSON\x20params','map','/update','Show\x20one\x20Personal\x20Backend\x20Function\x20by\x20id','read','list','Updates\x20the\x20Personal\x20Backend\x20Function\x20script\x20or\x20metadata.\x20Later\x20calls\x20use\x20the\x20new\x20version.','2385192WAUTEi','Personal\x20Backend\x20Function\x20script\x20file\x20is\x20blank.','detail','trim','JSON\x20object\x20passed\x20to\x20the\x20Personal\x20Backend\x20Function\x20execution','2479330qPkIwr','Create\x20a\x20Personal\x20Backend\x20Function\x20from\x20a\x20local\x20script\x20file','updateTime','gmtCreate','--name\x20must\x20be\x20a\x20valid\x20JavaScript\x20identifier,\x20for\x20example\x20loadOrders.','12nHNeqP','Personal\x20Backend\x20Function\x20description','scriptType','3882jucQAe','length','32eHBsWv'];a48_0x5d9e=function(){return _0x522c6b;};return a48_0x5d9e();}function detailBff(_0x448729){const _0xfe1344=a48_0x154376;return{'id':_0x448729['id'],'appCode':_0x448729['appCode'],'functionName':_0x448729['functionName'],'description':_0x448729[_0xfe1344(0x9b)],'scriptType':_0x448729[_0xfe1344(0x74)],'scriptContent':_0x448729['scriptContent']??'','config':_0x448729['config'],'version':_0x448729['version'],'createUserId':_0x448729[_0xfe1344(0x83)],'gmtCreate':_0x448729[_0xfe1344(0x70)],'gmtModified':_0x448729[_0xfe1344(0x98)],'createTime':_0x448729['createTime'],'updateTime':_0x448729[_0xfe1344(0x6f)]};}function buildCreateInput(_0x44d269){const _0x42bb9d=a48_0x154376;return{'functionName':normalizeFunctionName(_0x44d269[_0x42bb9d(0x89)](_0x42bb9d(0x80))),...optionalTrimmed(_0x44d269['str']('description'))?{'description':optionalTrimmed(_0x44d269[_0x42bb9d(0x89)](_0x42bb9d(0x9b)))}:{},'scriptContent':readScriptFile(_0x44d269['str'](_0x42bb9d(0x81))),...optionalTrimmed(_0x44d269[_0x42bb9d(0x89)](_0x42bb9d(0x9a)))?{'sourceSessionId':optionalTrimmed(_0x44d269[_0x42bb9d(0x89)](_0x42bb9d(0x9a)))}:{}};}function buildUpdateInput(_0x945a33){const _0x51911f=a48_0x154376,_0x23063e={};optionalTrimmed(_0x945a33[_0x51911f(0x89)](_0x51911f(0x80)))&&(_0x23063e[_0x51911f(0x9f)]=normalizeFunctionName(_0x945a33['str']('name')));_0x945a33[_0x51911f(0x9d)](_0x51911f(0x9b))!==undefined&&(_0x23063e['description']=_0x945a33[_0x51911f(0x89)](_0x51911f(0x9b)));optionalTrimmed(_0x945a33[_0x51911f(0x89)](_0x51911f(0x81)))&&(_0x23063e['scriptContent']=readScriptFile(_0x945a33[_0x51911f(0x89)](_0x51911f(0x81))));_0x945a33[_0x51911f(0x9d)](_0x51911f(0x9a))!==undefined&&(_0x23063e[_0x51911f(0x96)]=_0x945a33[_0x51911f(0x89)]('source-session-id'));if(Object['keys'](_0x23063e)[_0x51911f(0x76)]===0x0)throw CliErrors['validation'](_0x51911f(0x79));return _0x23063e;}function parseExecParams(_0x503711){const _0x3307c0=a48_0x154376,_0x163a0a=parseJsonParams(_0x503711)??{};if(Array[_0x3307c0(0x92)](_0x163a0a))throw CliErrors[_0x3307c0(0x88)](_0x3307c0(0xa1));return _0x163a0a;}const personalBffList={'service':'personal-bff','command':a48_0x154376(0xaa),'description':'List\x20current\x20user\x27s\x20Personal\x20Backend\x20Function\x20scripts\x20for\x20the\x20current\x20app','risk':a48_0x154376(0xa9),'flags':[VERBOSE_FLAG],async 'execute'(_0x198774){const _0x12c0c6=a48_0x154376,_0x3881c0=await listPersonalBffs(_0x198774[_0x12c0c6(0x82)]);return{'ok':!![],'data':{'total':_0x3881c0['length'],'items':_0x198774[_0x12c0c6(0x78)](_0x12c0c6(0x8a))?_0x3881c0:_0x3881c0[_0x12c0c6(0xa6)](summarizeBff)}};}},personalBffDetail={'service':'personal-bff','command':a48_0x154376(0xae),'description':a48_0x154376(0xa8),'risk':a48_0x154376(0xa9),'flags':[{...ID_FLAG,'description':a48_0x154376(0x7b)}],async 'execute'(_0x3ee57c){const _0x5ae8db=a48_0x154376,_0x43a0eb=await getPersonalBff(_0x3ee57c[_0x5ae8db(0x8d)]('id'),_0x3ee57c['appCode']);return{'ok':!![],'data':detailBff(_0x43a0eb)};}},personalBffCreate={'service':a48_0x154376(0xa2),'command':a48_0x154376(0x8f),'description':a48_0x154376(0x6e),'risk':'write','confirmationDescription':a48_0x154376(0x95),'flags':[FUNCTION_NAME_FLAG,{...FILE_FLAG,'required':!![]},DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x466654){const _0x2045b3=a48_0x154376,_0x1f1155=buildCreateInput(_0x466654),_0x516f15=await createPersonalBff(_0x466654[_0x2045b3(0x82)],_0x1f1155);return{'ok':!![],'data':detailBff(_0x516f15),'message':_0x2045b3(0x8b)+_0x516f15['id']+(_0x516f15[_0x2045b3(0x9f)]?'\x20('+_0x516f15[_0x2045b3(0x9f)]+')':'')};},async 'dryRun'(_0x3efdbd){const _0x4dc4fc=a48_0x154376,_0x639e8d=buildCreateInput(_0x3efdbd);return dryRun(_0x4dc4fc(0x90),_0x4dc4fc(0x85))[_0x4dc4fc(0x84)]({'appCode':_0x3efdbd[_0x4dc4fc(0x82)],..._0x639e8d})[_0x4dc4fc(0x9b)]('Preview:\x20create\x20Personal\x20Backend\x20Function\x20'+_0x639e8d[_0x4dc4fc(0x9f)])[_0x4dc4fc(0x97)]();}},personalBffUpdate={'service':a48_0x154376(0xa2),'command':'update','description':a48_0x154376(0x86),'risk':a48_0x154376(0x94),'confirmationDescription':a48_0x154376(0xab),'flags':[{...ID_FLAG,'description':a48_0x154376(0x7b)},{...FUNCTION_NAME_FLAG,'required':![]},FILE_FLAG,DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x480f91){const _0x47435b=a48_0x154376,_0x194db4=_0x480f91[_0x47435b(0x8d)]('id'),_0x43ce66=buildUpdateInput(_0x480f91),_0x518461=await updatePersonalBff(_0x194db4,_0x480f91['appCode'],_0x43ce66);return{'ok':!![],'data':detailBff(_0x518461),'message':_0x47435b(0x7f)+_0x518461['id']+(_0x518461[_0x47435b(0x9f)]?'\x20('+_0x518461[_0x47435b(0x9f)]+')':'')};},async 'dryRun'(_0x7271e0){const _0x43fcb2=a48_0x154376,_0xf1bec2=_0x7271e0[_0x43fcb2(0x8d)]('id'),_0x1a67d5=buildUpdateInput(_0x7271e0);return dryRun(_0x43fcb2(0x90),_0x43fcb2(0x87)+_0xf1bec2+_0x43fcb2(0xa7))[_0x43fcb2(0x84)]({'appCode':_0x7271e0[_0x43fcb2(0x82)],..._0x1a67d5})[_0x43fcb2(0x9b)]('Preview:\x20update\x20Personal\x20Backend\x20Function\x20'+_0xf1bec2)[_0x43fcb2(0x97)]();}},personalBffExec={'service':a48_0x154376(0xa2),'command':'exec','description':a48_0x154376(0xa5),'risk':a48_0x154376(0x94),'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':a48_0x154376(0x6c)}],async 'validate'(_0x18a78b){const _0x28d416=a48_0x154376;parseExecParams(_0x18a78b[_0x28d416(0x89)]('params'));},async 'execute'(_0x24b481){const _0x5720c9=a48_0x154376,_0x1596fe=_0x24b481['num']('id'),_0x291002=parseExecParams(_0x24b481[_0x5720c9(0x89)](_0x5720c9(0xa3))),_0x3fc132=await executePersonalBff(_0x1596fe,_0x24b481[_0x5720c9(0x82)],_0x291002);return{'ok':!![],'data':{'result':_0x3fc132},'message':'Executed\x20Personal\x20Backend\x20Function\x20'+_0x1596fe};}};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 a49_0x485a6e=a49_0x4287;(function(_0x6fe855,_0x5c0177){const _0x3f6bf1=a49_0x4287,_0x1afc2d=_0x6fe855();while(!![]){try{const _0x108a62=parseInt(_0x3f6bf1(0x104))/0x1*(parseInt(_0x3f6bf1(0xe3))/0x2)+parseInt(_0x3f6bf1(0x103))/0x3+-parseInt(_0x3f6bf1(0xd1))/0x4+parseInt(_0x3f6bf1(0xd8))/0x5*(-parseInt(_0x3f6bf1(0xf4))/0x6)+-parseInt(_0x3f6bf1(0xd7))/0x7+-parseInt(_0x3f6bf1(0xdc))/0x8*(parseInt(_0x3f6bf1(0xd9))/0x9)+parseInt(_0x3f6bf1(0xed))/0xa;if(_0x108a62===_0x5c0177)break;else _0x1afc2d['push'](_0x1afc2d['shift']());}catch(_0x3dde42){_0x1afc2d['push'](_0x1afc2d['shift']());}}}(a49_0x5475,0x3811f));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';function a49_0x4287(_0x406eda,_0x135caa){_0x406eda=_0x406eda-0xcc;const _0x54756a=a49_0x5475();let _0x428780=_0x54756a[_0x406eda];return _0x428780;}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{approvalDefinitions}from'../commands/approval/index.js';function a49_0x5475(){const _0x4ef39b=['logs\x20clear','Knowledge\x20Base','clear','Runtime\x20Roles','init','Instant\x20API','Schema','Authentication','service','Agent\x20Schedules','Logs','1131882AYembq','3jUdDtc','CLI\x20Built-in\x20Skill','Self\x20Update','\x20\x20[write]','Artifacts','Datasets','Configuration','Personal\x20Backend\x20Function','Runtime\x20Permissions','Use\x20`lovrabet\x20workspace\x20use\x20--app\x20<name>`\x20instead.','login','OCR','`lovrabet\x20auth\x20init`\x20has\x20been\x20removed.','API\x20Documentation','set','read','1819412rYweeI','app\x20use','SQL\x20Queries','`lovrabet\x20logs\x20clear`\x20has\x20been\x20removed.','Backend\x20Function\x20Scripts','App\x20Management','127750clJhOY','85270AXUTtY','4025655datOVM','install','User\x20Accounts','8WIwtMo','get','description','run','defaultCommand','config-list','\x20\x20[high-risk-write]','98502AGsGAP','auth\x20init','Workspace','write','app','use','risk','list','from','map','6420680rgwrCZ','isSingleCommand','Skills','Runtime\x20App\x20Config','has','Use\x20`lovrabet\x20config\x20init`\x20for\x20node\x20configuration,\x20then\x20`lovrabet\x20auth\x20login`\x20for\x20AccessKey\x20authentication.','command','6djdeEj','Use\x20`lovrabet\x20logs\x20show`\x20to\x20view\x20command\x20history.','Approvals','push'];a49_0x5475=function(){return _0x4ef39b;};return a49_0x5475();}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(_0x5448de){const _0x9da10a=a49_0x4287;for(const _0x1dc5f5 of _0x5448de){definitions[_0x9da10a(0xcf)](_0x1dc5f5[_0x9da10a(0x100)]+':'+_0x1dc5f5['command'],_0x1dc5f5);let _0x53b6be=serviceGroups[_0x9da10a(0xdd)](_0x1dc5f5[_0x9da10a(0x100)]);!_0x53b6be&&(_0x53b6be=[],serviceGroups[_0x9da10a(0xcf)](_0x1dc5f5[_0x9da10a(0x100)],_0x53b6be)),_0x53b6be[_0x9da10a(0xf7)](_0x1dc5f5);}}function registerService(_0x56e182,_0x335115,_0x190b5e){const _0x431c71=a49_0x4287;registerDefinitions(_0x335115);const _0x8b7895=_0x49256a=>_0x49256a===_0x431c71(0xd0)?'':_0x49256a===_0x431c71(0xe6)?_0x431c71(0x107):_0x431c71(0xe2),_0x5f5d96={'service':_0x335115[0x0][_0x431c71(0x100)],'label':_0x56e182,'commands':_0x335115[_0x431c71(0xec)](_0x4d348d=>({'command':_0x4d348d[_0x431c71(0xf3)],'description':_0x4d348d[_0x431c71(0xde)],'tag':_0x8b7895(_0x4d348d[_0x431c71(0xe9)])})),'defaultCommand':_0x190b5e?.[_0x431c71(0xe0)]??(_0x190b5e?.[_0x431c71(0xee)]?_0x335115[0x0]['command']:undefined),'isSingleCommand':_0x190b5e?.[_0x431c71(0xee)]};serviceRegistry[_0x431c71(0xf7)](_0x5f5d96),serviceByName[_0x431c71(0xcf)](_0x5f5d96[_0x431c71(0x100)],_0x5f5d96);}registerService(a49_0x485a6e(0xff),authDefinitions,{'defaultCommand':a49_0x485a6e(0x10e)}),registerService(a49_0x485a6e(0xdb),userAccountDefinitions),registerService(a49_0x485a6e(0xd6),appDefinitions,{'defaultCommand':'list'}),registerService(a49_0x485a6e(0xe5),workspaceDefinitions),registerService(a49_0x485a6e(0xf0),appConfigDefinitions),registerService(a49_0x485a6e(0x10a),configDefinitions,{'defaultCommand':a49_0x485a6e(0xea)}),registerService(a49_0x485a6e(0xfb),roleDefinitions,{'defaultCommand':a49_0x485a6e(0xea)}),registerService(a49_0x485a6e(0x10c),permitDefinitions),registerService(a49_0x485a6e(0xce),apiDocDefinitions),registerService(a49_0x485a6e(0x109),datasetDefinitions),registerService(a49_0x485a6e(0xfd),dataDefinitions),registerService(a49_0x485a6e(0xd3),sqlDefinitions),registerService(a49_0x485a6e(0xd5),bffDefinitions),registerService(a49_0x485a6e(0x10b),personalBffDefinitions),registerService(a49_0x485a6e(0x108),artifactDefinitions),registerService('File',fileDefinitions),registerService(a49_0x485a6e(0xcc),ocrDefinitions),registerService(a49_0x485a6e(0xf9),kbDefinitions),registerService('Notification\x20Configs',notificationDefinitions,{'defaultCommand':a49_0x485a6e(0xe1)}),registerService(a49_0x485a6e(0x101),scheduleDefinitions,{'defaultCommand':a49_0x485a6e(0xea)}),registerService(a49_0x485a6e(0xf6),approvalDefinitions),registerService('Service\x20Tree',serviceDefinitions,{'defaultCommand':a49_0x485a6e(0xea)}),registerService(a49_0x485a6e(0xef),skillDefinitions,{'defaultCommand':a49_0x485a6e(0xda)}),registerService(a49_0x485a6e(0x105),cliSkillDefinitions,{'defaultCommand':'install'}),registerService(a49_0x485a6e(0x106),[updateDefinition],{'defaultCommand':a49_0x485a6e(0xdf),'isSingleCommand':!![]}),registerService('Diagnostics',[doctorDefinition],{'isSingleCommand':!![]}),registerService(a49_0x485a6e(0xfe),[schemaDefinition],{'isSingleCommand':!![]}),registerService(a49_0x485a6e(0x102),logsDefinitions,{'defaultCommand':'show'});export function findDefinition(_0x8b9b19,_0x25500e){const _0x128315=a49_0x485a6e;return definitions[_0x128315(0xdd)](_0x8b9b19+':'+_0x25500e);}export function resolveRemovedCommand(_0x2401b8,_0x5be76e){const _0x5193bb=a49_0x485a6e;if(_0x2401b8==='auth'&&_0x5be76e===_0x5193bb(0xfc))return{'command':_0x5193bb(0xe4),'message':_0x5193bb(0xcd),'hint':_0x5193bb(0xf2)};if(_0x2401b8===_0x5193bb(0xe7)&&_0x5be76e==='init')return{'command':'app\x20init','message':'`lovrabet\x20app\x20init`\x20has\x20been\x20removed.','hint':'Use\x20`lovrabet\x20workspace\x20init\x20--appcode\x20<code>`\x20instead.'};if(_0x2401b8==='app'&&_0x5be76e===_0x5193bb(0xe8))return{'command':_0x5193bb(0xd2),'message':'`lovrabet\x20app\x20use`\x20has\x20been\x20removed.','hint':_0x5193bb(0x10d)};if(_0x2401b8==='logs'&&_0x5be76e===_0x5193bb(0xfa))return{'command':_0x5193bb(0xf8),'message':_0x5193bb(0xd4),'hint':_0x5193bb(0xf5)};return undefined;}export function isKnownService(_0x4ac332){const _0x12cef5=a49_0x485a6e;return serviceByName[_0x12cef5(0xf1)](_0x4ac332);}export function getServiceEntry(_0x12965e){return serviceByName['get'](_0x12965e);}export function getAllDefinitions(){const _0x21dee3=a49_0x485a6e;return Array[_0x21dee3(0xeb)](definitions['values']());}
@@ -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 a50_0x34a352=a50_0x9f03;(function(_0x58565d,_0x26bbb2){const _0x12278c=a50_0x9f03,_0x461a4e=_0x58565d();while(!![]){try{const _0x8e8dc3=-parseInt(_0x12278c(0x19e))/0x1+parseInt(_0x12278c(0x19d))/0x2*(parseInt(_0x12278c(0x1a1))/0x3)+parseInt(_0x12278c(0x192))/0x4*(-parseInt(_0x12278c(0x19a))/0x5)+parseInt(_0x12278c(0x193))/0x6+-parseInt(_0x12278c(0x18d))/0x7+-parseInt(_0x12278c(0x1a6))/0x8+-parseInt(_0x12278c(0x19b))/0x9*(-parseInt(_0x12278c(0x1a2))/0xa);if(_0x8e8dc3===_0x26bbb2)break;else _0x461a4e['push'](_0x461a4e['shift']());}catch(_0x1282b8){_0x461a4e['push'](_0x461a4e['shift']());}}}(a50_0x2f10,0x1b0f4));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(_0x39affe){const _0x3797aa=a50_0x9f03,_0xea2044=_0x39affe[_0x3797aa(0x19f)](_0x3797aa(0x196))[_0x3797aa(0x191)]();if(!_0xea2044)throw CliErrors[_0x3797aa(0x1a5)](_0x3797aa(0x19c));const _0x4cf685=_0x39affe[_0x3797aa(0x19f)](_0x3797aa(0x195))[_0x3797aa(0x191)](),_0x4e14f7=readOptionalRuntimeRoleCode(_0x39affe);return{'appCode':_0x39affe[_0x3797aa(0x198)],'roleName':_0xea2044,..._0x4e14f7?{'roleCode':_0x4e14f7}:{},..._0x4cf685?{'remark':_0x4cf685}:{}};}function a50_0x9f03(_0x15b3de,_0x41e547){_0x15b3de=_0x15b3de-0x18c;const _0x2f10c8=a50_0x2f10();let _0x9f0318=_0x2f10c8[_0x15b3de];return _0x9f0318;}export const roleCreate={'service':'role','command':a50_0x34a352(0x18f),'description':'Create\x20a\x20runtime\x20CUSTOM\x20role','risk':a50_0x34a352(0x199),'confirmationDescription':a50_0x34a352(0x197),'flags':[{'name':a50_0x34a352(0x196),'type':a50_0x34a352(0x1a3),'required':!![],'description':a50_0x34a352(0x1a0)},ROLE_CODE_FLAG,{'name':a50_0x34a352(0x195),'type':a50_0x34a352(0x1a3),'description':a50_0x34a352(0x190)}],async 'validate'(_0x9ba5af){input(_0x9ba5af);},async 'dryRun'(_0x2683ef){const _0x505a7c=a50_0x34a352;return dryRun('POST',_0x505a7c(0x1a4))['body']({'roleType':_0x505a7c(0x18e),...input(_0x2683ef)})[_0x505a7c(0x1a7)](_0x505a7c(0x194))[_0x505a7c(0x18c)]();},async 'execute'(_0x53330a){const _0x37577f=a50_0x34a352,_0x1412e4=await createRuntimeAppRole(input(_0x53330a));return{'ok':!![],'data':runtimeRoleWriteResult('create',{'roleId':_0x1412e4['id']},null,projectRuntimeRole(_0x1412e4),{'method':'POST','path':_0x37577f(0x1a4)})};}};function a50_0x2f10(){const _0x64edca=['Preview:\x20create\x20a\x20runtime\x20CUSTOM\x20role','remark','name','Creates\x20a\x20custom\x20role\x20in\x20the\x20current\x20runtime\x20app.\x20After\x20creation\x20it\x20can\x20be\x20used\x20for\x20member\x20and\x20resource\x20permissions.','appCode','high-risk-write','325jCkJKh','4394916nyTsFZ','--name\x20must\x20not\x20be\x20blank.','62ItkuLt','75137NThWVX','str','Role\x20name','177wxecpG','10HbEWDN','string','/client/permit/role/create','validation','1560952UTtdVq','description','build','1375353JIPOye','CUSTOM','create','Optional\x20role\x20remark','trim','5016qOcMkW','1013568JkIxiY'];a50_0x2f10=function(){return _0x64edca;};return a50_0x2f10();}
@@ -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 a51_0x45a246=a51_0x41a4;function a51_0x41c2(){const _0x19e561=['473416lRhliV','POST','24VuzPIW','1nfMQcu','4271091wryKsQ','appCode','high-risk-write','build','35GAbWdT','Delete\x20a\x20runtime\x20CUSTOM\x20role','17656FSPADZ','5624307bKGcLY','1738410hhCSLM','12UBKSyf','body','9Cxzeqr','delete','9132BstMHz','/client/permit/role/delete','468296OYdyPT','1265KPNBum','description','num'];a51_0x41c2=function(){return _0x19e561;};return a51_0x41c2();}(function(_0x55d78c,_0x2bdd78){const _0x25e83f=a51_0x41a4,_0x159f4d=_0x55d78c();while(!![]){try{const _0x365a89=-parseInt(_0x25e83f(0xd1))/0x1*(-parseInt(_0x25e83f(0xd8))/0x2)+-parseInt(_0x25e83f(0xdb))/0x3*(-parseInt(_0x25e83f(0xca))/0x4)+-parseInt(_0x25e83f(0xcb))/0x5*(-parseInt(_0x25e83f(0xc8))/0x6)+parseInt(_0x25e83f(0xd6))/0x7*(-parseInt(_0x25e83f(0xce))/0x8)+parseInt(_0x25e83f(0xc6))/0x9*(parseInt(_0x25e83f(0xda))/0xa)+parseInt(_0x25e83f(0xd2))/0xb+parseInt(_0x25e83f(0xd0))/0xc*(-parseInt(_0x25e83f(0xd9))/0xd);if(_0x365a89===_0x2bdd78)break;else _0x159f4d['push'](_0x159f4d['shift']());}catch(_0x1890a2){_0x159f4d['push'](_0x159f4d['shift']());}}}(a51_0x41c2,0x403ed));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(_0x261d92){const _0x344418=a51_0x41a4,_0xced797=await getRuntimeRoleById(_0x261d92[_0x344418(0xd3)],_0x261d92[_0x344418(0xcd)]('id'));return assertCustomRuntimeRole(_0xced797,_0x344418(0xc7)),_0xced797;}function a51_0x41a4(_0x2eb44e,_0xec3f3c){_0x2eb44e=_0x2eb44e-0xc6;const _0x41c2ef=a51_0x41c2();let _0x41a403=_0x41c2ef[_0x2eb44e];return _0x41a403;}export const roleDelete={'service':'role','command':a51_0x45a246(0xc7),'description':a51_0x45a246(0xd7),'risk':a51_0x45a246(0xd4),'confirmationDescription':'Deletes\x20the\x20custom\x20role\x20in\x20the\x20current\x20runtime\x20app.\x20Membership\x20and\x20permission\x20config\x20for\x20that\x20role\x20may\x20become\x20invalid.','flags':[ROLE_ID_FLAG],async 'dryRun'(_0x572d33){const _0x254283=a51_0x45a246,_0x1b42d0=await prepare(_0x572d33);return dryRun(_0x254283(0xcf),_0x254283(0xc9))[_0x254283(0xdc)]({'id':_0x1b42d0['id']})[_0x254283(0xcc)]('Preview:\x20delete\x20a\x20runtime\x20CUSTOM\x20role')[_0x254283(0xd5)]();},async 'execute'(_0x4f2912){const _0x3c2cc8=a51_0x45a246,_0x326035=await prepare(_0x4f2912);return await deleteRuntimeAppRole(_0x326035['id']),{'ok':!![],'data':runtimeRoleWriteResult(_0x3c2cc8(0xc7),{'roleId':_0x326035['id']},projectRuntimeRole(_0x326035),null,{'method':_0x3c2cc8(0xcf),'path':_0x3c2cc8(0xc9)})};}};
@@ -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 a52_0x28ad43=a52_0x44a0;(function(_0x481ff3,_0x33eacf){const _0x21ca8a=a52_0x44a0,_0x8dd852=_0x481ff3();while(!![]){try{const _0x117a17=parseInt(_0x21ca8a(0x1ec))/0x1+parseInt(_0x21ca8a(0x1f6))/0x2+-parseInt(_0x21ca8a(0x1ea))/0x3*(-parseInt(_0x21ca8a(0x1f0))/0x4)+-parseInt(_0x21ca8a(0x1ed))/0x5+-parseInt(_0x21ca8a(0x1f2))/0x6*(parseInt(_0x21ca8a(0x1f3))/0x7)+parseInt(_0x21ca8a(0x1f1))/0x8*(parseInt(_0x21ca8a(0x1f5))/0x9)+-parseInt(_0x21ca8a(0x1f4))/0xa;if(_0x117a17===_0x33eacf)break;else _0x8dd852['push'](_0x8dd852['shift']());}catch(_0x5647ec){_0x8dd852['push'](_0x8dd852['shift']());}}}(a52_0x3bde,0xb9932));function a52_0x44a0(_0x377ae5,_0x37c8b8){_0x377ae5=_0x377ae5-0x1e7;const _0x3bdec4=a52_0x3bde();let _0x44a05e=_0x3bdec4[_0x377ae5];return _0x44a05e;}import{getRuntimeRoleById,projectRuntimeRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';export const roleDetail={'service':a52_0x28ad43(0x1ef),'command':a52_0x28ad43(0x1e9),'description':a52_0x28ad43(0x1e7),'risk':a52_0x28ad43(0x1eb),'flags':[ROLE_ID_FLAG],async 'execute'(_0x1da243){const _0x1f03ce=a52_0x28ad43,_0x3649c0=await getRuntimeRoleById(_0x1da243['appCode'],_0x1da243[_0x1f03ce(0x1ee)]('id'));return{'ok':!![],'data':{'scope':_0x1f03ce(0x1e8),'role':projectRuntimeRole(_0x3649c0)}};}};function a52_0x3bde(){const _0x2f1ac1=['num','role','28VRESPc','195016trZXlR','7630164NgLbEi','7mligQi','7658510KNzHLQ','531HNacma','1811982SrktFn','Show\x20one\x20runtime\x20role\x20by\x20ID','runtime','detail','178077mhQdtD','read','1271018iIZzLw','6165530PECqzE'];a52_0x3bde=function(){return _0x2f1ac1;};return a52_0x3bde();}
@@ -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(_0x139da3,_0x2c7685){const _0x35be7c=a53_0x3a29,_0x2ba5f9=_0x139da3();while(!![]){try{const _0x1800b4=parseInt(_0x35be7c(0x10f))/0x1*(parseInt(_0x35be7c(0x10b))/0x2)+-parseInt(_0x35be7c(0x111))/0x3*(parseInt(_0x35be7c(0x10e))/0x4)+parseInt(_0x35be7c(0x113))/0x5+-parseInt(_0x35be7c(0x109))/0x6*(parseInt(_0x35be7c(0x112))/0x7)+parseInt(_0x35be7c(0x10a))/0x8*(parseInt(_0x35be7c(0x114))/0x9)+-parseInt(_0x35be7c(0x10c))/0xa*(parseInt(_0x35be7c(0x10d))/0xb)+-parseInt(_0x35be7c(0x110))/0xc;if(_0x1800b4===_0x2c7685)break;else _0x2ba5f9['push'](_0x2ba5f9['shift']());}catch(_0x6f204b){_0x2ba5f9['push'](_0x2ba5f9['shift']());}}}(a53_0x1fb1,0x56cc1));import{roleList}from'../../commands/role/list.js';import{roleDetail}from'../../commands/role/detail.js';import{roleCreate}from'../../commands/role/create.js';import{roleUpdate}from'../../commands/role/update.js';import{roleDelete}from'../../commands/role/delete.js';import{roleUserAdd}from'../../commands/role/user-add.js';function a53_0x3a29(_0x2e11dc,_0x4f7747){_0x2e11dc=_0x2e11dc-0x109;const _0x1fb1f9=a53_0x1fb1();let _0x3a29a9=_0x1fb1f9[_0x2e11dc];return _0x3a29a9;}import{roleUserRemove}from'../../commands/role/user-remove.js';function a53_0x1fb1(){const _0x408d2c=['46417uZspjQ','2441540ZtVMjY','171ryMKFs','444DCJZIi','85016jbAjgr','2UUzAOx','10vJHrPp','863610xcRIsS','306376IpLGjg','649279iGujez','2219916cLLoHK','9PKadHu'];a53_0x1fb1=function(){return _0x408d2c;};return a53_0x1fb1();}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 a54_0x466e5b=a54_0x5942;(function(_0x4c420c,_0x311b15){const _0x24cd77=a54_0x5942,_0x5abfc8=_0x4c420c();while(!![]){try{const _0x1e9a5f=-parseInt(_0x24cd77(0x1f1))/0x1+parseInt(_0x24cd77(0x1d5))/0x2+-parseInt(_0x24cd77(0x1d9))/0x3+parseInt(_0x24cd77(0x1ec))/0x4+-parseInt(_0x24cd77(0x1e5))/0x5*(-parseInt(_0x24cd77(0x1e7))/0x6)+-parseInt(_0x24cd77(0x1e3))/0x7*(parseInt(_0x24cd77(0x1dc))/0x8)+parseInt(_0x24cd77(0x1de))/0x9;if(_0x1e9a5f===_0x311b15)break;else _0x5abfc8['push'](_0x5abfc8['shift']());}catch(_0x586231){_0x5abfc8['push'](_0x5abfc8['shift']());}}}(a54_0x3f4b,0xacedd));import{listRuntimeAppRoles}from'../../core/api-client.js';function a54_0x5942(_0xcc340e,_0x3a0498){_0xcc340e=_0xcc340e-0x1d4;const _0x3f4bff=a54_0x3f4b();let _0x594283=_0x3f4bff[_0xcc340e];return _0x594283;}function a54_0x3f4b(){const _0x31c475=['Page\x20size\x20from\x201\x20to\x20100','roleType','paging','1966578CWcBEu','map','number','items','4101957YBtoyp','Page\x20number','isSafeInteger','7768VZOAtY','name','4633740GLwGJm','role','--page\x20must\x20be\x20a\x20positive\x20integer.','validation','string','7707Yhugbd','appCode','88535WzfKWa','runtime','354kZVHVh','Invalid\x20runtime\x20role\x20type:\x20','pagesize','toUpperCase','List\x20runtime\x20roles\x20for\x20the\x20current\x20app','4884652HxbVCC','includes','type','Runtime\x20role\x20type','slice','619318kjcktp','page','filter','--pagesize\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.','list','str'];a54_0x3f4b=function(){return _0x31c475;};return a54_0x3f4b();}import{CliErrors}from'../../errors.js';import{listAllRuntimeRoles,projectRuntimeRole,RUNTIME_ROLE_TYPES}from'../../commands/role/shared.js';export const roleList={'service':a54_0x466e5b(0x1df),'command':a54_0x466e5b(0x1f5),'description':a54_0x466e5b(0x1eb),'risk':'read','flags':[{'name':a54_0x466e5b(0x1ee),'type':a54_0x466e5b(0x1e2),'enum':RUNTIME_ROLE_TYPES,'description':a54_0x466e5b(0x1ef)},{'name':a54_0x466e5b(0x1dd),'type':'string','description':'Fuzzy\x20role-name\x20filter'},{'name':a54_0x466e5b(0x1f2),'type':a54_0x466e5b(0x1d7),'default':0x1,'description':a54_0x466e5b(0x1da)},{'name':a54_0x466e5b(0x1e9),'type':a54_0x466e5b(0x1d7),'default':0x64,'description':a54_0x466e5b(0x1f7)}],async 'validate'(_0xe97c54){const _0x462ac1=a54_0x466e5b,_0x386159=_0xe97c54[_0x462ac1(0x1f6)]('type')['toUpperCase']();if(_0x386159&&!RUNTIME_ROLE_TYPES[_0x462ac1(0x1ed)](_0x386159))throw CliErrors[_0x462ac1(0x1e1)](_0x462ac1(0x1e8)+_0x386159+'.');const _0x2a0151=_0xe97c54['num'](_0x462ac1(0x1f2),0x1),_0x1aab64=_0xe97c54['num'](_0x462ac1(0x1e9),0x64);if(!Number[_0x462ac1(0x1db)](_0x2a0151)||_0x2a0151<0x1)throw CliErrors[_0x462ac1(0x1e1)](_0x462ac1(0x1e0));if(!Number[_0x462ac1(0x1db)](_0x1aab64)||_0x1aab64<0x1||_0x1aab64>0x64)throw CliErrors['validation'](_0x462ac1(0x1f4));},async 'execute'(_0x14d5bd){const _0x2386d8=a54_0x466e5b,_0x57e7d6=_0x14d5bd['str'](_0x2386d8(0x1ee))[_0x2386d8(0x1ea)](),_0x503523=_0x14d5bd[_0x2386d8(0x1f6)](_0x2386d8(0x1dd))['trim'](),_0x4ddcd2=_0x14d5bd['num'](_0x2386d8(0x1f2),0x1),_0x4e03e7=_0x14d5bd['num']('pagesize',0x64);if(_0x57e7d6){const _0x1d8ec5=(await listAllRuntimeRoles(_0x14d5bd[_0x2386d8(0x1e4)],{..._0x503523?{'roleName':_0x503523}:{}}))[_0x2386d8(0x1f3)](_0x4458b6=>_0x4458b6[_0x2386d8(0x1f8)]===_0x57e7d6),_0xb6ecf4=(_0x4ddcd2-0x1)*_0x4e03e7;return{'ok':!![],'data':{'scope':'runtime','roles':_0x1d8ec5[_0x2386d8(0x1f0)](_0xb6ecf4,_0xb6ecf4+_0x4e03e7)['map'](projectRuntimeRole),'paging':{'currentPage':_0x4ddcd2,'pageSize':_0x4e03e7,'totalCount':_0x1d8ec5['length']}}};}const _0x381047=await listRuntimeAppRoles(_0x14d5bd[_0x2386d8(0x1e4)],{..._0x503523?{'roleName':_0x503523}:{},'currentPage':_0x4ddcd2,'pageSize':_0x4e03e7});return{'ok':!![],'data':{'scope':_0x2386d8(0x1e6),'roles':_0x381047[_0x2386d8(0x1d8)][_0x2386d8(0x1d6)](projectRuntimeRole),'paging':_0x381047[_0x2386d8(0x1d4)]}};}};
@@ -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 a55_0x236ad7=a55_0x2f7d;function a55_0x2f7d(_0xd92053,_0x35ce43){_0xd92053=_0xd92053-0x1ec;const _0x2a6911=a55_0x2a69();let _0x2f7d45=_0x2a6911[_0xd92053];return _0x2f7d45;}(function(_0x223b2f,_0x430608){const _0x1a41ab=a55_0x2f7d,_0x25eace=_0x223b2f();while(!![]){try{const _0x5ef7d6=parseInt(_0x1a41ab(0x214))/0x1*(parseInt(_0x1a41ab(0x1f5))/0x2)+parseInt(_0x1a41ab(0x202))/0x3*(-parseInt(_0x1a41ab(0x21e))/0x4)+parseInt(_0x1a41ab(0x20c))/0x5+-parseInt(_0x1a41ab(0x1ff))/0x6+-parseInt(_0x1a41ab(0x1fb))/0x7+parseInt(_0x1a41ab(0x22d))/0x8+parseInt(_0x1a41ab(0x1fd))/0x9;if(_0x5ef7d6===_0x430608)break;else _0x25eace['push'](_0x25eace['shift']());}catch(_0x17d424){_0x25eace['push'](_0x25eace['shift']());}}}(a55_0x2a69,0x546bd));import{listRuntimeAppUsers,listRuntimeAppRoles,listRuntimeRoleUsers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{normalizePositiveSafeInteger}from'../../utils/positive-safe-integer.js';export const RUNTIME_ROLE_TYPES=[a55_0x236ad7(0x235),a55_0x236ad7(0x220),a55_0x236ad7(0x203),'CUSTOM'];const BUILTIN_ROLE_TYPES=[a55_0x236ad7(0x235),a55_0x236ad7(0x220),'OWNER'];export const ROLE_ID_FLAG={'name':'id','type':a55_0x236ad7(0x1f6),'required':!![],'description':a55_0x236ad7(0x1f9)};export const ROLE_REF_FLAG={'name':a55_0x236ad7(0x218),'type':a55_0x236ad7(0x1f3),'required':!![],'description':a55_0x236ad7(0x216)};export const ROLE_CODE_FLAG={'name':a55_0x236ad7(0x1ec),'type':a55_0x236ad7(0x1f3),'description':a55_0x236ad7(0x1f1)};export const USER_ID_FLAG={'name':a55_0x236ad7(0x20a),'type':a55_0x236ad7(0x1f3),'required':!![],'description':a55_0x236ad7(0x21a)};export const EXPECT_USER_COUNT_FLAG={'name':a55_0x236ad7(0x1f0),'type':a55_0x236ad7(0x1f6),'description':a55_0x236ad7(0x200)};export function isBuiltinRuntimeRole(_0x3044fd){return BUILTIN_ROLE_TYPES['includes'](_0x3044fd);}export function assertCustomRuntimeRole(_0x178455,_0x381379){const _0x3e422c=a55_0x236ad7;if(_0x178455[_0x3e422c(0x213)]!==_0x3e422c(0x1f4))throw CliErrors[_0x3e422c(0x1ed)](_0x3e422c(0x209)+_0x381379+'\x20built-in\x20runtime\x20role\x20'+_0x178455[_0x3e422c(0x1fc)]+'\x20('+_0x178455[_0x3e422c(0x213)]+').',_0x3e422c(0x21f));}export function projectRuntimeRole(_0x2dfcfb){const _0x4d7eb5=a55_0x236ad7;return{'id':_0x2dfcfb['id'],'roleCode':_0x2dfcfb[_0x4d7eb5(0x231)],'roleName':_0x2dfcfb[_0x4d7eb5(0x1fc)],'roleType':_0x2dfcfb[_0x4d7eb5(0x213)],'remark':_0x2dfcfb[_0x4d7eb5(0x1fa)],'userCount':_0x2dfcfb[_0x4d7eb5(0x222)]??0x0,'permitCount':_0x2dfcfb[_0x4d7eb5(0x228)]??0x0,'builtin':isBuiltinRuntimeRole(_0x2dfcfb['roleType'])};}export function readOptionalRuntimeRoleCode(_0x45f041){const _0x95101e=a55_0x236ad7,_0x2eecde=_0x45f041[_0x95101e(0x22c)](_0x95101e(0x1ec));if(_0x2eecde===undefined||_0x2eecde===null)return undefined;const _0x1aecb8=String(_0x2eecde)[_0x95101e(0x221)]();if(!_0x1aecb8)throw CliErrors['validation'](_0x95101e(0x211));if(_0x1aecb8['length']>0x40)throw CliErrors[_0x95101e(0x1ed)]('--role-code\x20cannot\x20exceed\x2064\x20characters.');return _0x1aecb8;}function a55_0x2a69(){const _0xc60513=['OWNER\x20runtime\x20role\x20membership\x20cannot\x20be\x20changed\x20with\x20this\x20command.','userName','applyUserList','user-add','Cannot\x20','user','Runtime\x20user\x20','1614840iMtkIt','--expect-user-count\x20must\x20be\x20a\x20non-negative\x20integer.','includes','push','Read\x20the\x20current\x20members\x20and\x20retry\x20with\x20the\x20new\x20expected\x20count.','--role-code\x20must\x20not\x20be\x20blank.','Pass\x20one\x20role\x20ID:\x20','roleType','32739LReMIc','num','Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name','\x20is\x20missing\x20from\x20the\x20grouped\x20member\x20snapshot.','role','Pass\x20--role\x20<id|name>.','Runtime\x20numeric\x20userId','User\x20','Role\x20ID\x20must\x20be\x20a\x20positive\x20integer.','map','4BGBvlQ','Only\x20CUSTOM\x20runtime\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','USER','trim','userCount','userId','test','Runtime\x20role\x20name\x20\x22','Run\x20`lovrabet\x20role\x20list`\x20or\x20pass\x20--role\x20<id>.','isSafeInteger','permitCount','find','length','Runtime\x20role\x20','flag','4056328TpXupl','Runtime\x20role\x20id\x20','Run\x20`lovrabet\x20role\x20list`\x20and\x20use\x20a\x20role\x20from\x20the\x20current\x20app.','\x20was\x20not\x20found\x20in\x20app\x20','roleCode','filter','userList','Transfer\x20or\x20manage\x20application\x20ownership\x20through\x20the\x20dedicated\x20application\x20workflow.','ADMIN',',\x20found\x20','role-code','validation','appCode','items','expect-user-count','Globally\x20unique\x20roleCode\x20(maximum\x2064\x20characters)','code','string','CUSTOM','38FoKAvQ','number','Use\x20a\x20numeric\x20userId\x20returned\x20by\x20the\x20current\x20application\x27s\x20personnel\x20list.','paging','Runtime\x20role\x20ID\x20returned\x20by\x20role\x20list','remark','3534286NDNzAj','roleName','4883643DBpsmX','totalCount','3466614HznWOE','Reject\x20when\x20the\x20target\x20role\x20member\x20count\x20has\x20changed','\x22\x20was\x20not\x20found\x20in\x20app\x20','1698663WegIMD','OWNER','str'];a55_0x2a69=function(){return _0xc60513;};return a55_0x2a69();}export async function getRuntimeRoleById(_0x46ac64,_0x5cfe67){const _0x40bf6e=a55_0x236ad7;if(!Number[_0x40bf6e(0x227)](_0x5cfe67)||_0x5cfe67<=0x0)throw CliErrors[_0x40bf6e(0x1ed)](_0x40bf6e(0x21c));const _0x39243b=(await listAllRuntimeRoles(_0x46ac64))[_0x40bf6e(0x232)](_0xe3fb78=>_0xe3fb78['id']===_0x5cfe67&&(!_0xe3fb78[_0x40bf6e(0x1ee)]||_0xe3fb78[_0x40bf6e(0x1ee)]===_0x46ac64));if(_0x39243b[_0x40bf6e(0x22a)]!==0x1)throw CliErrors[_0x40bf6e(0x1ed)](_0x40bf6e(0x22e)+_0x5cfe67+'\x20was\x20not\x20found\x20in\x20app\x20'+_0x46ac64+'.',_0x40bf6e(0x22f));return _0x39243b[0x0];}export async function listAllRuntimeRoles(_0x574f46,_0x51faa6={}){const _0x1cf48a=a55_0x236ad7,_0x155a49=0x64,_0x37df61=[];for(let _0x47df72=0x1;;_0x47df72+=0x1){const _0x4a9231=await listRuntimeAppRoles(_0x574f46,{..._0x51faa6['roleName']?{'roleName':_0x51faa6[_0x1cf48a(0x1fc)]}:{},'currentPage':_0x47df72,'pageSize':_0x155a49});_0x37df61[_0x1cf48a(0x20f)](..._0x4a9231[_0x1cf48a(0x1ef)]);if(_0x4a9231[_0x1cf48a(0x1ef)][_0x1cf48a(0x22a)]<_0x155a49||_0x4a9231[_0x1cf48a(0x1f8)]&&_0x37df61[_0x1cf48a(0x22a)]>=_0x4a9231[_0x1cf48a(0x1f8)][_0x1cf48a(0x1fe)])return _0x37df61;}}export async function resolveRuntimeRoleRef(_0x8e081e,_0x25dfe5){const _0x1a266a=a55_0x236ad7,_0x2e4e99=_0x25dfe5['trim']();if(!_0x2e4e99)throw CliErrors['validation']('Missing\x20runtime\x20role\x20reference.',_0x1a266a(0x219));if(/^\d+$/[_0x1a266a(0x224)](_0x2e4e99))return getRuntimeRoleById(_0x8e081e,Number(_0x2e4e99));const _0x466eb7=(await listAllRuntimeRoles(_0x8e081e))['filter'](_0x15cd0d=>_0x15cd0d[_0x1a266a(0x1fc)]===_0x2e4e99);if(_0x466eb7[_0x1a266a(0x22a)]===0x0)throw CliErrors[_0x1a266a(0x1ed)]('Runtime\x20role\x20name\x20\x22'+_0x2e4e99+_0x1a266a(0x201)+_0x8e081e+'.',_0x1a266a(0x226));if(_0x466eb7[_0x1a266a(0x22a)]>0x1)throw CliErrors['validation'](_0x1a266a(0x225)+_0x2e4e99+'\x22\x20is\x20ambiguous.',_0x1a266a(0x212)+_0x466eb7[_0x1a266a(0x21d)](_0x450681=>_0x450681['id'])['join'](',\x20')+'.');return _0x466eb7[0x0];}function parseRuntimeUserId(_0x5c7a88){const _0x52d92c=a55_0x236ad7,_0x3b9d60=_0x5c7a88[_0x52d92c(0x221)](),_0x3b6ed4=normalizePositiveSafeInteger(_0x3b9d60);if(_0x3b6ed4===undefined)throw CliErrors[_0x52d92c(0x1ed)]('Runtime\x20role\x20membership\x20requires\x20a\x20numeric\x20userId.','Pass\x20--user\x20<userId>;\x20name\x20and\x20account\x20lookup\x20are\x20not\x20available\x20in\x20runtime\x20scope.');return _0x3b6ed4;}export async function prepareRuntimeMemberMutation(_0x448f68,_0x149ea9){const _0x3817b4=a55_0x236ad7,_0x3f6393=await resolveRuntimeRoleRef(_0x448f68[_0x3817b4(0x1ee)],_0x448f68['str'](_0x3817b4(0x218)));if(_0x3f6393[_0x3817b4(0x213)]===_0x3817b4(0x203))throw CliErrors['validation'](_0x3817b4(0x205),_0x3817b4(0x234));const _0x437dcd=parseRuntimeUserId(_0x448f68[_0x3817b4(0x204)](_0x3817b4(0x20a))),_0x1914bc=(await listRuntimeRoleUsers(_0x448f68['appCode']))[_0x3817b4(0x21d)](_0x1facfa=>({..._0x1facfa,'userList':[..._0x1facfa[_0x3817b4(0x233)]??[]],'applyUserList':[..._0x1facfa[_0x3817b4(0x207)]??[]]})),_0x39e381=_0x1914bc[_0x3817b4(0x229)](_0x26def2=>_0x26def2['id']===_0x3f6393['id']);if(!_0x39e381)throw CliErrors['validation'](_0x3817b4(0x22b)+_0x3f6393['id']+_0x3817b4(0x217),'Reload\x20the\x20role\x20list\x20and\x20retry\x20after\x20the\x20server\x20state\x20is\x20consistent.');const _0x4dfe1b=_0x39e381[_0x3817b4(0x233)][_0x3817b4(0x21d)](_0x4c0974=>_0x4c0974[_0x3817b4(0x223)]),_0x152689=_0x448f68[_0x3817b4(0x22c)]('expect-user-count');if(_0x152689!==undefined&&_0x152689!==null&&_0x152689!==''){const _0x12e0ee=_0x448f68[_0x3817b4(0x215)]('expect-user-count');if(!Number[_0x3817b4(0x227)](_0x12e0ee)||_0x12e0ee<0x0)throw CliErrors['validation'](_0x3817b4(0x20d));if(_0x4dfe1b[_0x3817b4(0x22a)]!==_0x12e0ee)throw CliErrors[_0x3817b4(0x1ed)]('Runtime\x20role\x20member\x20count\x20changed:\x20expected\x20'+_0x12e0ee+_0x3817b4(0x236)+_0x4dfe1b['length']+'.',_0x3817b4(0x210));}const _0x1e08b3=_0x4dfe1b[_0x3817b4(0x20e)](_0x437dcd),_0x38783d=[];let _0x4bc1c7=!![];if(_0x149ea9===_0x3817b4(0x208)){const _0x5640a6=await listRuntimeAppUsers(_0x448f68['appCode']),_0x2a8c36=_0x5640a6[_0x3817b4(0x232)](_0x4aaee9=>Number(_0x4aaee9[_0x3817b4(0x1f2)])===_0x437dcd);if(_0x2a8c36[_0x3817b4(0x22a)]!==0x1||!_0x2a8c36[0x0][_0x3817b4(0x206)]?.['trim']())throw CliErrors['validation'](_0x3817b4(0x20b)+_0x437dcd+_0x3817b4(0x230)+_0x448f68[_0x3817b4(0x1ee)]+'.',_0x3817b4(0x1f7));_0x1e08b3?(_0x4bc1c7=![],_0x38783d[_0x3817b4(0x20f)](_0x3817b4(0x21b)+_0x437dcd+'\x20is\x20already\x20in\x20runtime\x20role\x20'+_0x3f6393['id']+'.')):_0x39e381[_0x3817b4(0x233)][_0x3817b4(0x20f)]({'userId':_0x437dcd,'username':_0x2a8c36[0x0][_0x3817b4(0x206)]});}else!_0x1e08b3?(_0x4bc1c7=![],_0x38783d[_0x3817b4(0x20f)](_0x3817b4(0x21b)+_0x437dcd+'\x20is\x20not\x20in\x20runtime\x20role\x20'+_0x3f6393['id']+'.')):_0x39e381[_0x3817b4(0x233)]=_0x39e381[_0x3817b4(0x233)]['filter'](_0x165753=>_0x165753['userId']!==_0x437dcd);return{'role':_0x3f6393,'userId':_0x437dcd,'roleList':_0x1914bc,'before':{'userIds':_0x4dfe1b},'after':{'userIds':_0x39e381[_0x3817b4(0x233)][_0x3817b4(0x21d)](_0x4a8a8b=>_0x4a8a8b[_0x3817b4(0x223)])},'shouldWrite':_0x4bc1c7,'warnings':_0x38783d};}export function runtimeRoleWriteResult(_0x270cfc,_0x5a7365,_0x1eff57,_0xadb8fe,_0x46a9bb,_0x259604=[]){return{'operation':_0x270cfc,'scope':'runtime','selector':_0x5a7365,'before':_0x1eff57,'after':_0xadb8fe,'dryRun':![],'backend':_0x46a9bb,'warnings':_0x259604};}