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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (177) 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.js +1 -1
  12. package/lib/commands/artifact/index.js +1 -1
  13. package/lib/commands/auth/device.js +1 -1
  14. package/lib/commands/auth/index.js +1 -1
  15. package/lib/commands/auth/prompt.js +1 -1
  16. package/lib/commands/bff/detail.js +1 -1
  17. package/lib/commands/bff/exec.js +1 -1
  18. package/lib/commands/bff/index.js +1 -1
  19. package/lib/commands/cli-skill/index.js +1 -1
  20. package/lib/commands/common/config-policy.js +1 -1
  21. package/lib/commands/common/constraints.js +1 -1
  22. package/lib/commands/common/flags.js +1 -1
  23. package/lib/commands/common/local-file.js +1 -1
  24. package/lib/commands/config/definitions.js +1 -1
  25. package/lib/commands/config/init.js +1 -1
  26. package/lib/commands/config/shared.js +1 -1
  27. package/lib/commands/data/import-excel.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 +2 -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/access-error.js +1 -1
  113. package/lib/framework/build-all-flags.js +1 -1
  114. package/lib/framework/dryrun.js +1 -1
  115. package/lib/framework/flags.js +1 -1
  116. package/lib/framework/help.js +1 -1
  117. package/lib/framework/index.js +1 -1
  118. package/lib/framework/output.js +1 -1
  119. package/lib/framework/preparse.js +1 -1
  120. package/lib/framework/rate-limit.js +1 -1
  121. package/lib/framework/raw-flags.js +1 -1
  122. package/lib/framework/response.js +1 -1
  123. package/lib/framework/runner-confirmation.js +1 -1
  124. package/lib/framework/runner-error.js +1 -1
  125. package/lib/framework/runner.js +1 -1
  126. package/lib/framework/schema-export.js +1 -1
  127. package/lib/framework/service-order.js +1 -1
  128. package/lib/framework/types.js +1 -1
  129. package/lib/generated/build-info.d.ts +4 -4
  130. package/lib/generated/build-info.js +1 -1
  131. package/lib/generated/official-routing.js +1 -1
  132. package/lib/generated/routing-contract.js +1 -1
  133. package/lib/help.js +1 -1
  134. package/lib/postinstall.js +1 -1
  135. package/lib/runtime/confirmation.js +1 -1
  136. package/lib/runtime/event.js +1 -1
  137. package/lib/runtime/index.js +1 -1
  138. package/lib/runtime/queue.js +1 -1
  139. package/lib/runtime/resolve.js +1 -1
  140. package/lib/services/dataset-import/auto-id-runner.js +1 -1
  141. package/lib/services/dataset-import/excel-reader.js +1 -1
  142. package/lib/services/dataset-import/metadata.js +1 -1
  143. package/lib/services/dataset-import/preview.js +1 -1
  144. package/lib/services/dataset-import/runner.js +1 -1
  145. package/lib/skills/builtin-skill.js +1 -1
  146. package/lib/skills/npx-skills-add.js +1 -1
  147. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  148. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  149. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  150. package/lib/skills/runtime-skill-sync/install-target.js +1 -1
  151. package/lib/skills/runtime-skill-sync/links.js +1 -1
  152. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  153. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  154. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  155. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  156. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  157. package/lib/skills/runtime-skill-sync/push.js +1 -1
  158. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  159. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  160. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  161. package/lib/skills/runtime-skill-sync.js +1 -1
  162. package/lib/skills/skill-presence.js +1 -1
  163. package/lib/utils/access-key-redaction.js +1 -1
  164. package/lib/utils/apply-jq-filter.js +1 -1
  165. package/lib/utils/cli-version-check.js +1 -1
  166. package/lib/utils/cli-version-policy.js +1 -1
  167. package/lib/utils/logger.js +1 -1
  168. package/lib/utils/lossless-json.js +1 -1
  169. package/lib/utils/params.js +1 -1
  170. package/lib/utils/positive-safe-integer.js +1 -1
  171. package/lib/utils/redaction.js +1 -1
  172. package/lib/utils/update-notice.js +1 -1
  173. package/lib/utils/version.js +1 -1
  174. package/lib/utils/write-cli-side-channel.js +1 -1
  175. package/package.json +1 -1
  176. package/skills/lovrabet/SKILL.md +1 -1
  177. package/skills/lovrabet.manifest.json +3 -3
@@ -1 +1 @@
1
- function a42_0x1a8c(_0x5c39e6,_0x440da5){_0x5c39e6=_0x5c39e6-0x13b;const _0x171a48=a42_0x171a();let _0x1a8c05=_0x171a48[_0x5c39e6];return _0x1a8c05;}const a42_0x425dd3=a42_0x1a8c;(function(_0x5a08b1,_0x4b31b0){const _0x4e3535=a42_0x1a8c,_0x2bfc64=_0x5a08b1();while(!![]){try{const _0x31e48f=-parseInt(_0x4e3535(0x150))/0x1*(parseInt(_0x4e3535(0x153))/0x2)+-parseInt(_0x4e3535(0x167))/0x3+parseInt(_0x4e3535(0x164))/0x4*(parseInt(_0x4e3535(0x146))/0x5)+-parseInt(_0x4e3535(0x13f))/0x6*(parseInt(_0x4e3535(0x169))/0x7)+parseInt(_0x4e3535(0x14a))/0x8+parseInt(_0x4e3535(0x176))/0x9*(-parseInt(_0x4e3535(0x179))/0xa)+-parseInt(_0x4e3535(0x155))/0xb*(-parseInt(_0x4e3535(0x165))/0xc);if(_0x31e48f===_0x4b31b0)break;else _0x2bfc64['push'](_0x2bfc64['shift']());}catch(_0x1c1d84){_0x2bfc64['push'](_0x2bfc64['shift']());}}}(a42_0x171a,0xc10b7));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';function a42_0x171a(){const _0x1c2d0f=['2101116ddjkPj','48540ueJDfp','Grants\x20or\x20revokes\x20the\x20target\x20role\x20permission\x20for\x20the\x20given\x20dataset\x20actions.\x20Data\x20operations\x20for\x20users\x20in\x20that\x20role\x20will\x20change.','3941535wZXWhH','build','111377KbArcp','POST','description','Preview:\x20','changed','toUpperCase','push','revoke','/client/permit/resource/batch-save-dataset','map','warnings','DATA_UPDATE','\x20for\x20role\x20','1248399frKURX','datasets','--datasets','70YlSDYx','find','DATA_CREATE','Grant\x20or\x20revoke\x20selected\x20runtime\x20dataset\x20actions\x20for\x20one\x20role','string','permit','resourceName','Runtime\x20dataset\x20','grant','length','42mEmKiv','Comma-separated\x20runtime\x20dataset\x20codes','\x20does\x20not\x20expose\x20','dataPermitList','permitList','body','Comma-separated\x20actions:\x20','5kFyuKQ','validation','str','resourceType','2458376uNFgtw','after','DATA_DETAIL','bool','filter','datasetCode','1496nBHuLN','--actions','DATA_DELETE','692gYClEL','high-risk-write','7810tZzssq','roles','permitId','dataset-','datasetCodes','Invalid\x20dataset\x20actions:\x20','DATA_ROW','includes','\x20selected\x20runtime\x20dataset\x20actions','\x20was\x20not\x20found.','join','appCode','Dataset\x20','role','actions'];a42_0x171a=function(){return _0x1c2d0f;};return a42_0x171a();}const DATA_ACTIONS=[a42_0x425dd3(0x17b),a42_0x425dd3(0x174),a42_0x425dd3(0x152),a42_0x425dd3(0x14c),'DATA_EXPORT',a42_0x425dd3(0x15b)],DATASETS_FLAG={'name':'datasets','type':a42_0x425dd3(0x17d),'required':!![],'description':a42_0x425dd3(0x140)},ACTIONS_FLAG={'name':a42_0x425dd3(0x163),'type':a42_0x425dd3(0x17d),'required':!![],'description':a42_0x425dd3(0x145)+DATA_ACTIONS[a42_0x425dd3(0x15f)](',\x20')};async function prepare(_0x1707e2){const _0x29f24a=a42_0x425dd3;await assertRuntimePermissionManager(_0x1707e2[_0x29f24a(0x160)]);const _0x422773=assertGrantOrRevoke(_0x1707e2[_0x29f24a(0x14d)](_0x29f24a(0x13d)),_0x1707e2[_0x29f24a(0x14d)](_0x29f24a(0x170))),_0x4d1f19=await resolveRuntimeRoleRef(_0x1707e2[_0x29f24a(0x160)],_0x1707e2['str'](_0x29f24a(0x162)));assertRuntimePermitRoleConfigurable(_0x4d1f19);const _0x3f142f=splitRefs(_0x1707e2[_0x29f24a(0x148)](_0x29f24a(0x177)),_0x29f24a(0x178)),_0x1cb6e3=[...new Set(splitRefs(_0x1707e2[_0x29f24a(0x148)](_0x29f24a(0x163)),_0x29f24a(0x151))[_0x29f24a(0x172)](_0xff2be1=>_0xff2be1[_0x29f24a(0x16e)]()))],_0x581e15=_0x1cb6e3[_0x29f24a(0x14e)](_0x4e05f9=>!DATA_ACTIONS[_0x29f24a(0x15c)](_0x4e05f9));if(_0x581e15[_0x29f24a(0x13e)]>0x0)throw CliErrors[_0x29f24a(0x147)](_0x29f24a(0x15a)+_0x581e15[_0x29f24a(0x15f)](',\x20')+'.');const _0x3460bc=await listRuntimeDatasetRolePermits(_0x1707e2[_0x29f24a(0x160)]),_0x1452b2=await listRuntimePermitRoles(_0x1707e2[_0x29f24a(0x160)]),_0x13a8d2=[],_0x5ba9d0=[],_0x3b7100=[],_0x54ea2a=[];for(const _0x8854a3 of _0x3f142f){const _0x5d5f5a=_0x3460bc[_0x29f24a(0x17a)](_0x36b959=>_0x36b959[_0x29f24a(0x14f)]===_0x8854a3);if(!_0x5d5f5a)throw CliErrors[_0x29f24a(0x147)](_0x29f24a(0x13c)+_0x8854a3+_0x29f24a(0x15e));for(const _0x33c2f8 of _0x1cb6e3){const _0x1ffc60=_0x5d5f5a[_0x29f24a(0x142)][_0x29f24a(0x17a)](_0xbc5998=>_0xbc5998[_0x29f24a(0x149)]===_0x33c2f8);if(!_0x1ffc60)throw CliErrors[_0x29f24a(0x147)](_0x29f24a(0x161)+_0x8854a3+_0x29f24a(0x141)+_0x33c2f8+'.');const _0x4e295d=applyRuntimeRolePermission(_0x1ffc60['rolePermit'],_0x4d1f19,_0x1452b2,_0x422773);_0x5ba9d0[_0x29f24a(0x16f)]({'datasetCode':_0x8854a3,'resourceType':_0x33c2f8,'rolePermit':_0x1ffc60['rolePermit']}),_0x3b7100[_0x29f24a(0x16f)]({'datasetCode':_0x8854a3,'resourceType':_0x33c2f8,'rolePermit':_0x4e295d[_0x29f24a(0x156)]}),_0x4e295d[_0x29f24a(0x16d)]?_0x13a8d2[_0x29f24a(0x16f)]({..._0x1ffc60[_0x29f24a(0x157)]!=null?{'id':_0x1ffc60[_0x29f24a(0x157)]}:{},'appCode':_0x1707e2[_0x29f24a(0x160)],'resourceCode':_0x8854a3,'resourceType':_0x33c2f8,'resourceName':_0x1ffc60[_0x29f24a(0x13b)],'rolePermit':_0x4e295d['roles']}):_0x54ea2a[_0x29f24a(0x16f)](_0x8854a3+'/'+_0x33c2f8+'\x20already\x20reflects\x20'+_0x422773+_0x29f24a(0x175)+_0x4d1f19['id']+'.');}}return{'operation':_0x422773,'role':_0x4d1f19,'datasetCodes':_0x3f142f,'actions':_0x1cb6e3,'permitList':_0x13a8d2,'before':_0x5ba9d0,'after':_0x3b7100,'warnings':_0x54ea2a};}export const permitDatasetSet={'service':a42_0x425dd3(0x17e),'command':'dataset-set','description':a42_0x425dd3(0x17c),'risk':a42_0x425dd3(0x154),'confirmationDescription':a42_0x425dd3(0x166),'flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,DATASETS_FLAG,ACTIONS_FLAG],async 'validate'(_0x10d402){const _0x2b6d5d=a42_0x425dd3;assertGrantOrRevoke(_0x10d402['bool'](_0x2b6d5d(0x13d)),_0x10d402[_0x2b6d5d(0x14d)](_0x2b6d5d(0x170)));},async 'dryRun'(_0x2fc7af){const _0x525efe=a42_0x425dd3,_0x3d8adf=await prepare(_0x2fc7af);return dryRun(_0x525efe(0x16a),'/client/permit/resource/batch-save-dataset')[_0x525efe(0x144)]({'appCode':_0x2fc7af[_0x525efe(0x160)],'permitList':_0x3d8adf[_0x525efe(0x143)]})[_0x525efe(0x16b)](_0x525efe(0x16c)+_0x3d8adf['operation']+_0x525efe(0x15d))[_0x525efe(0x168)]();},async 'execute'(_0xb16ba){const _0x5926df=a42_0x425dd3,_0x1deba1=await prepare(_0xb16ba);return _0x1deba1[_0x5926df(0x143)][_0x5926df(0x13e)]>0x0&&await saveRuntimeDatasetRolePermits(_0xb16ba['appCode'],_0x1deba1[_0x5926df(0x143)]),{'ok':!![],'data':runtimePermitWriteResult(_0x5926df(0x158)+_0x1deba1['operation'],{'roleId':_0x1deba1['role']['id'],'datasetCodes':_0x1deba1[_0x5926df(0x159)],'actions':_0x1deba1[_0x5926df(0x163)]},_0x1deba1['before'],_0x1deba1[_0x5926df(0x14b)],{'method':_0x5926df(0x16a),'path':_0x5926df(0x171)},_0x1deba1[_0x5926df(0x173)])};}};
1
+ function a42_0x572c(_0x28c08a,_0x3c1ea1){_0x28c08a=_0x28c08a-0x12f;const _0x200bdf=a42_0x200b();let _0x572ca7=_0x200bdf[_0x28c08a];return _0x572ca7;}const a42_0x3e0154=a42_0x572c;function a42_0x200b(){const _0x335c6e=['resourceName','rolePermit','warnings','Comma-separated\x20actions:\x20','description','DATA_ROW','revoke','datasetCode','role','permitId','validation','Comma-separated\x20runtime\x20dataset\x20codes','datasets','\x20was\x20not\x20found.','8309MIiPeu','Invalid\x20dataset\x20actions:\x20','actions','POST','DATA_EXPORT','DATA_DELETE','1452880PeifaQ','Dataset\x20','1624230WVOehW','filter','\x20selected\x20runtime\x20dataset\x20actions','operation','--actions','Grants\x20or\x20revokes\x20the\x20target\x20role\x20permission\x20for\x20the\x20given\x20dataset\x20actions.\x20Data\x20operations\x20for\x20users\x20in\x20that\x20role\x20will\x20change.','join','find','--datasets','toUpperCase','4rGfCdg','1410yUmtrm','dataPermitList','24137865wSNEdG','DATA_DETAIL','length','/client/permit/resource/batch-save-dataset','str','962817BiisuL','\x20does\x20not\x20expose\x20','3678537EeEYwJ','9773760CNgPYB','build','dataset-','grant','DATA_CREATE','string','includes','push','appCode','permitList','\x20for\x20role\x20','roles','high-risk-write','bool','DATA_UPDATE','Grant\x20or\x20revoke\x20selected\x20runtime\x20dataset\x20actions\x20for\x20one\x20role'];a42_0x200b=function(){return _0x335c6e;};return a42_0x200b();}(function(_0x92aa6a,_0xa607ae){const _0x5350a1=a42_0x572c,_0x14f444=_0x92aa6a();while(!![]){try{const _0x5a0b80=-parseInt(_0x5350a1(0x140))/0x1+parseInt(_0x5350a1(0x169))/0x2+parseInt(_0x5350a1(0x142))/0x3*(-parseInt(_0x5350a1(0x138))/0x4)+parseInt(_0x5350a1(0x167))/0x5+parseInt(_0x5350a1(0x139))/0x6*(parseInt(_0x5350a1(0x161))/0x7)+-parseInt(_0x5350a1(0x143))/0x8+parseInt(_0x5350a1(0x13b))/0x9;if(_0x5a0b80===_0xa607ae)break;else _0x14f444['push'](_0x14f444['shift']());}catch(_0x31f25f){_0x14f444['push'](_0x14f444['shift']());}}}(a42_0x200b,0x9f669));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=[a42_0x3e0154(0x147),a42_0x3e0154(0x151),a42_0x3e0154(0x166),a42_0x3e0154(0x13c),a42_0x3e0154(0x165),a42_0x3e0154(0x158)],DATASETS_FLAG={'name':a42_0x3e0154(0x15f),'type':a42_0x3e0154(0x148),'required':!![],'description':a42_0x3e0154(0x15e)},ACTIONS_FLAG={'name':a42_0x3e0154(0x163),'type':'string','required':!![],'description':a42_0x3e0154(0x156)+DATA_ACTIONS['join'](',\x20')};async function prepare(_0x2550e3){const _0xfe89da=a42_0x3e0154;await assertRuntimePermissionManager(_0x2550e3['appCode']);const _0x39fbc6=assertGrantOrRevoke(_0x2550e3[_0xfe89da(0x150)](_0xfe89da(0x146)),_0x2550e3[_0xfe89da(0x150)]('revoke')),_0x407c3c=await resolveRuntimeRoleRef(_0x2550e3[_0xfe89da(0x14b)],_0x2550e3[_0xfe89da(0x13f)](_0xfe89da(0x15b)));assertRuntimePermitRoleConfigurable(_0x407c3c);const _0x470e34=splitRefs(_0x2550e3[_0xfe89da(0x13f)](_0xfe89da(0x15f)),_0xfe89da(0x136)),_0x30927f=[...new Set(splitRefs(_0x2550e3['str'](_0xfe89da(0x163)),_0xfe89da(0x132))['map'](_0x52a75e=>_0x52a75e[_0xfe89da(0x137)]()))],_0x4e361c=_0x30927f[_0xfe89da(0x12f)](_0x380917=>!DATA_ACTIONS[_0xfe89da(0x149)](_0x380917));if(_0x4e361c[_0xfe89da(0x13d)]>0x0)throw CliErrors['validation'](_0xfe89da(0x162)+_0x4e361c[_0xfe89da(0x134)](',\x20')+'.');const _0x597662=await listRuntimeDatasetRolePermits(_0x2550e3[_0xfe89da(0x14b)]),_0x14e56f=await listRuntimePermitRoles(_0x2550e3[_0xfe89da(0x14b)]),_0x49168c=[],_0x5a5a39=[],_0x1f20ee=[],_0x436bf3=[];for(const _0x380697 of _0x470e34){const _0x40ff94=_0x597662[_0xfe89da(0x135)](_0xdc448d=>_0xdc448d[_0xfe89da(0x15a)]===_0x380697);if(!_0x40ff94)throw CliErrors[_0xfe89da(0x15d)]('Runtime\x20dataset\x20'+_0x380697+_0xfe89da(0x160));for(const _0x1f7db8 of _0x30927f){const _0x14362f=_0x40ff94[_0xfe89da(0x13a)][_0xfe89da(0x135)](_0x295ea4=>_0x295ea4['resourceType']===_0x1f7db8);if(!_0x14362f)throw CliErrors['validation'](_0xfe89da(0x168)+_0x380697+_0xfe89da(0x141)+_0x1f7db8+'.');const _0x42b152=applyRuntimeRolePermission(_0x14362f[_0xfe89da(0x154)],_0x407c3c,_0x14e56f,_0x39fbc6);_0x5a5a39[_0xfe89da(0x14a)]({'datasetCode':_0x380697,'resourceType':_0x1f7db8,'rolePermit':_0x14362f['rolePermit']}),_0x1f20ee[_0xfe89da(0x14a)]({'datasetCode':_0x380697,'resourceType':_0x1f7db8,'rolePermit':_0x42b152[_0xfe89da(0x14e)]}),_0x42b152['changed']?_0x49168c[_0xfe89da(0x14a)]({..._0x14362f[_0xfe89da(0x15c)]!=null?{'id':_0x14362f[_0xfe89da(0x15c)]}:{},'appCode':_0x2550e3[_0xfe89da(0x14b)],'resourceCode':_0x380697,'resourceType':_0x1f7db8,'resourceName':_0x14362f[_0xfe89da(0x153)],'rolePermit':_0x42b152['roles']}):_0x436bf3[_0xfe89da(0x14a)](_0x380697+'/'+_0x1f7db8+'\x20already\x20reflects\x20'+_0x39fbc6+_0xfe89da(0x14d)+_0x407c3c['id']+'.');}}return{'operation':_0x39fbc6,'role':_0x407c3c,'datasetCodes':_0x470e34,'actions':_0x30927f,'permitList':_0x49168c,'before':_0x5a5a39,'after':_0x1f20ee,'warnings':_0x436bf3};}export const permitDatasetSet={'service':'permit','command':'dataset-set','description':a42_0x3e0154(0x152),'risk':a42_0x3e0154(0x14f),'confirmationDescription':a42_0x3e0154(0x133),'flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,DATASETS_FLAG,ACTIONS_FLAG],async 'validate'(_0xf0e8e2){const _0x4abb8b=a42_0x3e0154;assertGrantOrRevoke(_0xf0e8e2[_0x4abb8b(0x150)]('grant'),_0xf0e8e2[_0x4abb8b(0x150)](_0x4abb8b(0x159)));},async 'dryRun'(_0x4c079d){const _0x5ed037=a42_0x3e0154,_0x5a5f98=await prepare(_0x4c079d);return dryRun(_0x5ed037(0x164),_0x5ed037(0x13e))['body']({'appCode':_0x4c079d[_0x5ed037(0x14b)],'permitList':_0x5a5f98[_0x5ed037(0x14c)]})[_0x5ed037(0x157)]('Preview:\x20'+_0x5a5f98[_0x5ed037(0x131)]+_0x5ed037(0x130))[_0x5ed037(0x144)]();},async 'execute'(_0x1b7af9){const _0x43eb72=a42_0x3e0154,_0x10cde4=await prepare(_0x1b7af9);return _0x10cde4[_0x43eb72(0x14c)]['length']>0x0&&await saveRuntimeDatasetRolePermits(_0x1b7af9['appCode'],_0x10cde4['permitList']),{'ok':!![],'data':runtimePermitWriteResult(_0x43eb72(0x145)+_0x10cde4[_0x43eb72(0x131)],{'roleId':_0x10cde4[_0x43eb72(0x15b)]['id'],'datasetCodes':_0x10cde4['datasetCodes'],'actions':_0x10cde4[_0x43eb72(0x163)]},_0x10cde4['before'],_0x10cde4['after'],{'method':_0x43eb72(0x164),'path':_0x43eb72(0x13e)},_0x10cde4[_0x43eb72(0x155)])};}};
@@ -1 +1 @@
1
- (function(_0x4bbe60,_0x4af52d){const _0x5c01a0=a43_0x4543,_0x1032c4=_0x4bbe60();while(!![]){try{const _0x3d523e=-parseInt(_0x5c01a0(0x114))/0x1*(-parseInt(_0x5c01a0(0x10f))/0x2)+-parseInt(_0x5c01a0(0x10d))/0x3+-parseInt(_0x5c01a0(0x112))/0x4+parseInt(_0x5c01a0(0x110))/0x5+parseInt(_0x5c01a0(0x10e))/0x6*(-parseInt(_0x5c01a0(0x116))/0x7)+parseInt(_0x5c01a0(0x111))/0x8+-parseInt(_0x5c01a0(0x113))/0x9*(parseInt(_0x5c01a0(0x115))/0xa);if(_0x3d523e===_0x4af52d)break;else _0x1032c4['push'](_0x1032c4['shift']());}catch(_0x105f4b){_0x1032c4['push'](_0x1032c4['shift']());}}}(a43_0x20df,0x8c7cd));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 a43_0x4543(_0x300422,_0xd7e456){_0x300422=_0x300422-0x10d;const _0x20df0a=a43_0x20df();let _0x45434c=_0x20df0a[_0x300422];return _0x45434c;}import{permitDatasetGet}from'../../commands/permit/dataset-get.js';function a43_0x20df(){const _0x2edd93=['9mvtFOg','11YbWdCl','1739470CXCqtA','3619553fhJNlx','2746371HRNQmC','6NECTtA','39740VQqexF','4404230TJEuLO','8903888StYpzM','121928sEqAQL'];a43_0x20df=function(){return _0x2edd93;};return a43_0x20df();}import{permitDatasetSet}from'../../commands/permit/dataset-set.js';export const permitDefinitions=[permitPageGet,permitPageSet,permitRoleMenus,permitRoleMenusSet,permitDatasetGet,permitDatasetSet];
1
+ (function(_0x220368,_0x20873f){const _0x107378=a43_0x4944,_0x4fcf31=_0x220368();while(!![]){try{const _0x31df98=-parseInt(_0x107378(0x1c7))/0x1*(-parseInt(_0x107378(0x1c1))/0x2)+parseInt(_0x107378(0x1cb))/0x3*(-parseInt(_0x107378(0x1c9))/0x4)+-parseInt(_0x107378(0x1cc))/0x5+-parseInt(_0x107378(0x1c3))/0x6*(-parseInt(_0x107378(0x1ca))/0x7)+-parseInt(_0x107378(0x1c8))/0x8+-parseInt(_0x107378(0x1c5))/0x9*(-parseInt(_0x107378(0x1c4))/0xa)+-parseInt(_0x107378(0x1c6))/0xb*(parseInt(_0x107378(0x1c2))/0xc);if(_0x31df98===_0x20873f)break;else _0x4fcf31['push'](_0x4fcf31['shift']());}catch(_0x158302){_0x4fcf31['push'](_0x4fcf31['shift']());}}}(a43_0x33d9,0x1bf37));import{permitPageGet}from'../../commands/permit/page-get.js';function a43_0x33d9(){const _0x1309b0=['8838CowhtA','88484aBYdwC','131bIusyZ','1630280DsNQsn','20jvcRHE','291403payETd','27399OUkIcm','491995gVLlmn','3412OfWapB','84psjBuI','24eHQshD','1310LXKAxp'];a43_0x33d9=function(){return _0x1309b0;};return a43_0x33d9();}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';import{permitDatasetGet}from'../../commands/permit/dataset-get.js';function a43_0x4944(_0x9ed74a,_0x138ea9){_0x9ed74a=_0x9ed74a-0x1c1;const _0x33d9f4=a43_0x33d9();let _0x494462=_0x33d9f4[_0x9ed74a];return _0x494462;}import{permitDatasetSet}from'../../commands/permit/dataset-set.js';export const permitDefinitions=[permitPageGet,permitPageSet,permitRoleMenus,permitRoleMenusSet,permitDatasetGet,permitDatasetSet];
@@ -1 +1 @@
1
- const a44_0x1fb4d8=a44_0xc3ea;function a44_0xc3ea(_0x403bf6,_0x16b9a7){_0x403bf6=_0x403bf6-0x129;const _0x5a267b=a44_0x5a26();let _0xc3ead8=_0x5a267b[_0x403bf6];return _0xc3ead8;}(function(_0x4abf02,_0x8223f8){const _0x5f33bb=a44_0xc3ea,_0x5b184e=_0x4abf02();while(!![]){try{const _0x1b77d9=-parseInt(_0x5f33bb(0x131))/0x1*(-parseInt(_0x5f33bb(0x12d))/0x2)+parseInt(_0x5f33bb(0x12e))/0x3+parseInt(_0x5f33bb(0x137))/0x4+-parseInt(_0x5f33bb(0x135))/0x5+-parseInt(_0x5f33bb(0x12a))/0x6+-parseInt(_0x5f33bb(0x134))/0x7+parseInt(_0x5f33bb(0x133))/0x8*(parseInt(_0x5f33bb(0x12c))/0x9);if(_0x1b77d9===_0x8223f8)break;else _0x5b184e['push'](_0x5b184e['shift']());}catch(_0xaf2224){_0x5b184e['push'](_0x5b184e['shift']());}}}(a44_0x5a26,0x7fe2d));function a44_0x5a26(){const _0x12476f=['Get\x20runtime\x20page\x20permission\x20slots\x20by\x20menu\x20ID','627096FYrRue','menu-id','142956FpfYjw','permit','9OdjfEn','21652ElbKNq','172005IydkPr','runtime','read','2TRvsmA','num','7021288VZOVzj','1004570VVaaQn','2111325iHpCCd'];a44_0x5a26=function(){return _0x12476f;};return a44_0x5a26();}import{getRuntimePagePermit}from'../../core/api-client.js';import{MENU_ID_FLAG,projectRuntimePagePermit}from'../../commands/permit/shared.js';export const permitPageGet={'service':a44_0x1fb4d8(0x12b),'command':'page-get','description':a44_0x1fb4d8(0x136),'risk':a44_0x1fb4d8(0x130),'flags':[MENU_ID_FLAG],async 'execute'(_0x4e56a6){const _0x285da0=a44_0x1fb4d8,_0x31a220=await getRuntimePagePermit(_0x4e56a6[_0x285da0(0x132)](_0x285da0(0x129)));return{'ok':!![],'data':{'scope':_0x285da0(0x12f),'page':projectRuntimePagePermit(_0x31a220)}};}};
1
+ const a44_0x33a776=a44_0x37af;(function(_0x29c5d5,_0x346ccc){const _0x580919=a44_0x37af,_0x7da03b=_0x29c5d5();while(!![]){try{const _0xb921bb=-parseInt(_0x580919(0x164))/0x1*(-parseInt(_0x580919(0x15a))/0x2)+-parseInt(_0x580919(0x166))/0x3+parseInt(_0x580919(0x158))/0x4*(-parseInt(_0x580919(0x15d))/0x5)+parseInt(_0x580919(0x160))/0x6+parseInt(_0x580919(0x15b))/0x7+-parseInt(_0x580919(0x159))/0x8*(-parseInt(_0x580919(0x165))/0x9)+parseInt(_0x580919(0x15e))/0xa*(-parseInt(_0x580919(0x163))/0xb);if(_0xb921bb===_0x346ccc)break;else _0x7da03b['push'](_0x7da03b['shift']());}catch(_0xe69dbe){_0x7da03b['push'](_0x7da03b['shift']());}}}(a44_0x202e,0xcebca));import{getRuntimePagePermit}from'../../core/api-client.js';function a44_0x37af(_0x1054a2,_0x44d0d1){_0x1054a2=_0x1054a2-0x158;const _0x202e04=a44_0x202e();let _0x37af9c=_0x202e04[_0x1054a2];return _0x37af9c;}function a44_0x202e(){const _0x3bfe4f=['10573262VPotxn','read','26700WCCpZk','10zwmrBk','Get\x20runtime\x20page\x20permission\x20slots\x20by\x20menu\x20ID','7729086cQyCRe','runtime','num','19843692ImrLlw','56MODnqR','1008gENUxS','4396359SByiHZ','page-get','1052YfFLyd','119640ljRTGM','37394sQzzHp'];a44_0x202e=function(){return _0x3bfe4f;};return a44_0x202e();}import{MENU_ID_FLAG,projectRuntimePagePermit}from'../../commands/permit/shared.js';export const permitPageGet={'service':'permit','command':a44_0x33a776(0x167),'description':a44_0x33a776(0x15f),'risk':a44_0x33a776(0x15c),'flags':[MENU_ID_FLAG],async 'execute'(_0x8953e3){const _0xe1fd86=a44_0x33a776,_0x4b5dd6=await getRuntimePagePermit(_0x8953e3[_0xe1fd86(0x162)]('menu-id'));return{'ok':!![],'data':{'scope':_0xe1fd86(0x161),'page':projectRuntimePagePermit(_0x4b5dd6)}};}};
@@ -1 +1 @@
1
- const a45_0x1c8118=a45_0x5b28;(function(_0x17cbc9,_0x39c6a4){const _0x520bb9=a45_0x5b28,_0xd4d672=_0x17cbc9();while(!![]){try{const _0x470534=-parseInt(_0x520bb9(0x1d2))/0x1+-parseInt(_0x520bb9(0x1db))/0x2*(-parseInt(_0x520bb9(0x1d8))/0x3)+-parseInt(_0x520bb9(0x1cf))/0x4*(parseInt(_0x520bb9(0x1e5))/0x5)+-parseInt(_0x520bb9(0x1e9))/0x6+-parseInt(_0x520bb9(0x1e6))/0x7*(parseInt(_0x520bb9(0x1d3))/0x8)+-parseInt(_0x520bb9(0x1e1))/0x9*(-parseInt(_0x520bb9(0x1dc))/0xa)+-parseInt(_0x520bb9(0x1da))/0xb*(-parseInt(_0x520bb9(0x1cb))/0xc);if(_0x470534===_0x39c6a4)break;else _0xd4d672['push'](_0xd4d672['shift']());}catch(_0x4fa4cf){_0xd4d672['push'](_0xd4d672['shift']());}}}(a45_0x1f72,0x298a2));import{getRuntimePagePermit,saveRuntimePagePermit}from'../../core/api-client.js';function a45_0x1f72(){const _0x1aa642=['key','11508KFEPyj','/client/permit/page/save','str','length','3932HhHZkO','before','slots','317059VSSStr','303600PABahJ','body','page-set','menu-id','allowSelf','627yPgAwT','build','5885ayVilk','2182weTwcj','2119660ilzHUf','POST','Preview:\x20update\x20page\x20permission\x20slots\x20','flag','\x20does\x20not\x20expose\x20','9QGZDNq','page','appCode','menuId','1055xmEUQm','35jJBZOg','validation','join','412092CMJyma','\x20does\x20not\x20belong\x20to\x20app\x20','Page\x20menu\x20'];a45_0x1f72=function(){return _0x1aa642;};return a45_0x1f72();}import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';function a45_0x5b28(_0xb1e1d0,_0x1528d8){_0xb1e1d0=_0xb1e1d0-0x1cb;const _0x1f723c=a45_0x1f72();let _0x5b283a=_0x1f723c[_0xb1e1d0];return _0x5b283a;}import{assertRuntimePermissionManager,MENU_ID_FLAG,PAGE_ROLE_FLAGS,PAGE_SLOT_SPECS,projectRuntimePagePermit,resolveRuntimePermitRoles,runtimePermitWriteResult,splitRefs}from'../../commands/permit/shared.js';async function prepare(_0x5338f3){const _0x5f0da=a45_0x5b28;await assertRuntimePermissionManager(_0x5338f3[_0x5f0da(0x1e3)]);const _0x16f25f=_0x5338f3['num'](_0x5f0da(0x1d6)),_0x421f1e=await getRuntimePagePermit(_0x16f25f);if(_0x421f1e['appCode']&&_0x421f1e[_0x5f0da(0x1e3)]!==_0x5338f3['appCode'])throw CliErrors[_0x5f0da(0x1e7)]('Menu\x20'+_0x16f25f+_0x5f0da(0x1ea)+_0x5338f3[_0x5f0da(0x1e3)]+'.');const _0x3d3a33=structuredClone(_0x421f1e),_0x52ea10=[];for(const _0x97f7eb of PAGE_SLOT_SPECS){if(_0x5338f3[_0x5f0da(0x1df)](_0x97f7eb[_0x5f0da(0x1df)])===undefined)continue;const _0xdc094a=_0x421f1e[_0x97f7eb['key']];if(!_0xdc094a)throw CliErrors[_0x5f0da(0x1e7)](_0x5f0da(0x1eb)+_0x16f25f+_0x5f0da(0x1e0)+_0x97f7eb[_0x5f0da(0x1ec)]+'.');_0xdc094a['rolePermit']=await resolveRuntimePermitRoles(_0x5338f3['appCode'],splitRefs(_0x5338f3[_0x5f0da(0x1cd)](_0x97f7eb[_0x5f0da(0x1df)]),'--'+_0x97f7eb['flag']),_0x97f7eb[_0x5f0da(0x1d7)]),_0x52ea10['push'](_0x97f7eb['key']);}if(_0x52ea10[_0x5f0da(0x1ce)]===0x0)throw CliErrors[_0x5f0da(0x1e7)]('Pass\x20at\x20least\x20one\x20page\x20role\x20flag\x20to\x20update.');return{'menuId':_0x16f25f,'page':_0x421f1e,'before':_0x3d3a33,'slots':_0x52ea10};}export const permitPageSet={'service':'permit','command':a45_0x1c8118(0x1d5),'description':'Set\x20selected\x20runtime\x20page\x20permission\x20slots','risk':'high-risk-write','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'(_0x295f1e){const _0x389299=a45_0x1c8118,_0x5c7a44=await prepare(_0x295f1e);return dryRun(_0x389299(0x1dd),_0x389299(0x1cc))[_0x389299(0x1d4)](_0x5c7a44['page'])['description'](_0x389299(0x1de)+_0x5c7a44[_0x389299(0x1d1)][_0x389299(0x1e8)](',\x20'))[_0x389299(0x1d9)]();},async 'execute'(_0x48f081){const _0x1a23c4=a45_0x1c8118,_0x1730a8=await prepare(_0x48f081),_0x278db0=await saveRuntimePagePermit(_0x1730a8[_0x1a23c4(0x1e2)]);return{'ok':!![],'data':runtimePermitWriteResult(_0x1a23c4(0x1d5),{'menuId':_0x1730a8[_0x1a23c4(0x1e4)],'slots':_0x1730a8[_0x1a23c4(0x1d1)]},projectRuntimePagePermit(_0x1730a8[_0x1a23c4(0x1d0)]),projectRuntimePagePermit(_0x278db0),{'method':_0x1a23c4(0x1dd),'path':_0x1a23c4(0x1cc)})};}};
1
+ function a45_0x349c(){const _0x251dbb=['appCode','\x20does\x20not\x20belong\x20to\x20app\x20','2omkqgi','Changes\x20role\x20permission\x20slots\x20on\x20the\x20given\x20runtime\x20page.\x20Unauthorized\x20users\x20may\x20be\x20unable\x20to\x20view\x20the\x20page\x20or\x20run\x20data\x20operations.','slots','44471cVwjsZ','185390aKpwXK','2723584KfUjYJ','body','validation','Page\x20menu\x20','description','num','rolePermit','page','menuId','128870ecTbny','push','flag','permit','high-risk-write','Set\x20selected\x20runtime\x20page\x20permission\x20slots','3617451LTzjKC','before','\x20does\x20not\x20expose\x20','menu-id','1093236wGqecp','8456CXImYo','Preview:\x20update\x20page\x20permission\x20slots\x20','join','627AQOefB','str','1434lxjopX','/client/permit/page/save','page-set','36ZliblG','Menu\x20','key'];a45_0x349c=function(){return _0x251dbb;};return a45_0x349c();}const a45_0x4f8ebc=a45_0x22cb;(function(_0x59a878,_0x5e5d1e){const _0xc4f007=a45_0x22cb,_0x26b713=_0x59a878();while(!![]){try{const _0x236483=parseInt(_0xc4f007(0x1b8))/0x1*(-parseInt(_0xc4f007(0x1b5))/0x2)+-parseInt(_0xc4f007(0x1a7))/0x3+parseInt(_0xc4f007(0x1b0))/0x4*(-parseInt(_0xc4f007(0x1b9))/0x5)+parseInt(_0xc4f007(0x1ad))/0x6*(parseInt(_0xc4f007(0x1a8))/0x7)+parseInt(_0xc4f007(0x1ba))/0x8+-parseInt(_0xc4f007(0x1a3))/0x9+-parseInt(_0xc4f007(0x19d))/0xa*(-parseInt(_0xc4f007(0x1ab))/0xb);if(_0x236483===_0x5e5d1e)break;else _0x26b713['push'](_0x26b713['shift']());}catch(_0x3e5b2e){_0x26b713['push'](_0x26b713['shift']());}}}(a45_0x349c,0x3583b));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(_0x4efb34){const _0x423076=a45_0x22cb;await assertRuntimePermissionManager(_0x4efb34[_0x423076(0x1b3)]);const _0xa72af7=_0x4efb34[_0x423076(0x1bf)](_0x423076(0x1a6)),_0x32dda6=await getRuntimePagePermit(_0xa72af7);if(_0x32dda6['appCode']&&_0x32dda6[_0x423076(0x1b3)]!==_0x4efb34[_0x423076(0x1b3)])throw CliErrors[_0x423076(0x1bc)](_0x423076(0x1b1)+_0xa72af7+_0x423076(0x1b4)+_0x4efb34[_0x423076(0x1b3)]+'.');const _0x4b7247=structuredClone(_0x32dda6),_0x34780b=[];for(const _0x150157 of PAGE_SLOT_SPECS){if(_0x4efb34[_0x423076(0x19f)](_0x150157[_0x423076(0x19f)])===undefined)continue;const _0x426959=_0x32dda6[_0x150157[_0x423076(0x1b2)]];if(!_0x426959)throw CliErrors[_0x423076(0x1bc)](_0x423076(0x1bd)+_0xa72af7+_0x423076(0x1a5)+_0x150157[_0x423076(0x1b2)]+'.');_0x426959[_0x423076(0x1c0)]=await resolveRuntimePermitRoles(_0x4efb34['appCode'],splitRefs(_0x4efb34[_0x423076(0x1ac)](_0x150157[_0x423076(0x19f)]),'--'+_0x150157[_0x423076(0x19f)]),_0x150157['allowSelf']),_0x34780b[_0x423076(0x19e)](_0x150157[_0x423076(0x1b2)]);}if(_0x34780b['length']===0x0)throw CliErrors[_0x423076(0x1bc)]('Pass\x20at\x20least\x20one\x20page\x20role\x20flag\x20to\x20update.');return{'menuId':_0xa72af7,'page':_0x32dda6,'before':_0x4b7247,'slots':_0x34780b};}function a45_0x22cb(_0x24ca84,_0x23b7e0){_0x24ca84=_0x24ca84-0x19d;const _0x349c05=a45_0x349c();let _0x22cb42=_0x349c05[_0x24ca84];return _0x22cb42;}export const permitPageSet={'service':a45_0x4f8ebc(0x1a0),'command':a45_0x4f8ebc(0x1af),'description':a45_0x4f8ebc(0x1a2),'risk':a45_0x4f8ebc(0x1a1),'confirmationDescription':a45_0x4f8ebc(0x1b6),'flags':[MENU_ID_FLAG,...PAGE_ROLE_FLAGS],async 'dryRun'(_0x5de460){const _0x44c640=a45_0x4f8ebc,_0x5b5c2a=await prepare(_0x5de460);return dryRun('POST',_0x44c640(0x1ae))[_0x44c640(0x1bb)](_0x5b5c2a['page'])[_0x44c640(0x1be)](_0x44c640(0x1a9)+_0x5b5c2a[_0x44c640(0x1b7)][_0x44c640(0x1aa)](',\x20'))['build']();},async 'execute'(_0x136db8){const _0x12e417=a45_0x4f8ebc,_0x3d691d=await prepare(_0x136db8),_0x47e5a9=await saveRuntimePagePermit(_0x3d691d[_0x12e417(0x1c1)]);return{'ok':!![],'data':runtimePermitWriteResult(_0x12e417(0x1af),{'menuId':_0x3d691d[_0x12e417(0x1c2)],'slots':_0x3d691d[_0x12e417(0x1b7)]},projectRuntimePagePermit(_0x3d691d[_0x12e417(0x1a4)]),projectRuntimePagePermit(_0x47e5a9),{'method':'POST','path':_0x12e417(0x1ae)})};}};
@@ -1 +1 @@
1
- const a46_0x4136f1=a46_0x228b;(function(_0xf589ea,_0x1508a3){const _0x300c29=a46_0x228b,_0x409d58=_0xf589ea();while(!![]){try{const _0x5cc98a=parseInt(_0x300c29(0x17a))/0x1+-parseInt(_0x300c29(0x182))/0x2*(parseInt(_0x300c29(0x184))/0x3)+parseInt(_0x300c29(0x173))/0x4*(parseInt(_0x300c29(0x17c))/0x5)+parseInt(_0x300c29(0x185))/0x6+parseInt(_0x300c29(0x188))/0x7+parseInt(_0x300c29(0x183))/0x8*(parseInt(_0x300c29(0x17b))/0x9)+-parseInt(_0x300c29(0x171))/0xa*(parseInt(_0x300c29(0x16c))/0xb);if(_0x5cc98a===_0x1508a3)break;else _0x409d58['push'](_0x409d58['shift']());}catch(_0x5c1081){_0x409d58['push'](_0x409d58['shift']());}}}(a46_0x129c,0x6b2e1));import{listRuntimeMenuRolePermits,listRuntimePermitRoles,saveRuntimeMenuRolePermits}from'../../core/api-client.js';function a46_0x228b(_0x584088,_0x213c2e){_0x584088=_0x584088-0x160;const _0x129c12=a46_0x129c();let _0x228b38=_0x129c12[_0x584088];return _0x228b38;}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':a46_0x4136f1(0x18b),'type':'string','required':!![],'description':a46_0x4136f1(0x162)};async function prepare(_0x1dfaa1){const _0x1b6310=a46_0x4136f1;await assertRuntimePermissionManager(_0x1dfaa1[_0x1b6310(0x16f)]);const _0x36bb21=assertGrantOrRevoke(_0x1dfaa1[_0x1b6310(0x181)]('grant'),_0x1dfaa1['bool']('revoke')),_0x45b517=await resolveRuntimeRoleRef(_0x1dfaa1['appCode'],_0x1dfaa1[_0x1b6310(0x17e)](_0x1b6310(0x189)));assertRuntimePermitRoleConfigurable(_0x45b517);const _0x1d4528=[...new Set(splitRefs(_0x1dfaa1['str']('menus'),_0x1b6310(0x172))[_0x1b6310(0x169)](_0x1b2dc8=>{const _0x45f7d1=_0x1b6310,_0x596281=Number(_0x1b2dc8);if(!/^\d+$/[_0x45f7d1(0x166)](_0x1b2dc8)||!Number['isSafeInteger'](_0x596281)||_0x596281<=0x0)throw CliErrors[_0x45f7d1(0x161)](_0x45f7d1(0x17d)+_0x1b2dc8+'.');return _0x596281;}))],_0x45402d=flattenRuntimeMenuRolePermits(await listRuntimeMenuRolePermits(_0x1dfaa1[_0x1b6310(0x16f)])),_0x1643ad=await listRuntimePermitRoles(_0x1dfaa1[_0x1b6310(0x16f)]),_0x291b0b=[],_0x145c33=[],_0x509a01=[],_0x85995d=[];for(const _0x538af8 of _0x1d4528){const _0x2355b1=_0x45402d[_0x1b6310(0x17f)](_0xdbf20a=>_0xdbf20a['id']===_0x538af8);if(!_0x2355b1)throw CliErrors[_0x1b6310(0x161)]('Runtime\x20menu\x20'+_0x538af8+_0x1b6310(0x16e));const _0x5883f4=applyRuntimeRolePermission(_0x2355b1[_0x1b6310(0x174)],_0x45b517,_0x1643ad,_0x36bb21);_0x145c33['push']({'menuId':_0x538af8,'rolePermit':_0x2355b1[_0x1b6310(0x174)]}),_0x509a01[_0x1b6310(0x18c)]({'menuId':_0x538af8,'rolePermit':_0x5883f4[_0x1b6310(0x164)]});if(_0x5883f4['changed'])_0x291b0b['push'](menuPermitDto(_0x1dfaa1['appCode'],_0x2355b1,_0x5883f4[_0x1b6310(0x164)]));else _0x85995d[_0x1b6310(0x18c)]('Runtime\x20menu\x20'+_0x538af8+_0x1b6310(0x178)+_0x36bb21+_0x1b6310(0x186)+_0x45b517['id']+'.');}return{'operation':_0x36bb21,'role':_0x45b517,'menuIds':_0x1d4528,'permitList':_0x291b0b,'before':_0x145c33,'after':_0x509a01,'warnings':_0x85995d};}export const permitRoleMenusSet={'service':'permit','command':a46_0x4136f1(0x16a),'description':'Grant\x20or\x20revoke\x20selected\x20runtime\x20menus\x20for\x20one\x20role','risk':a46_0x4136f1(0x16b),'confirmationDescription':a46_0x4136f1(0x165),'flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,MENUS_FLAG],async 'validate'(_0x36a96b){const _0x5da487=a46_0x4136f1;assertGrantOrRevoke(_0x36a96b[_0x5da487(0x181)](_0x5da487(0x163)),_0x36a96b['bool'](_0x5da487(0x180)));},async 'dryRun'(_0x5b808a){const _0x30b333=a46_0x4136f1,_0x51cc52=await prepare(_0x5b808a);return dryRun(_0x30b333(0x175),_0x30b333(0x18a))[_0x30b333(0x18e)]({'appCode':_0x5b808a[_0x30b333(0x16f)],'permitList':_0x51cc52[_0x30b333(0x170)]})[_0x30b333(0x160)]('Preview:\x20'+_0x51cc52['operation']+_0x30b333(0x168))[_0x30b333(0x18d)]();},async 'execute'(_0x39f348){const _0x8f95b=a46_0x4136f1,_0x21728f=await prepare(_0x39f348);return _0x21728f[_0x8f95b(0x170)][_0x8f95b(0x179)]>0x0&&await saveRuntimeMenuRolePermits(_0x39f348[_0x8f95b(0x16f)],_0x21728f['permitList']),{'ok':!![],'data':runtimePermitWriteResult(_0x8f95b(0x16d)+_0x21728f[_0x8f95b(0x167)],{'roleId':_0x21728f['role']['id'],'menuIds':_0x21728f[_0x8f95b(0x176)]},_0x21728f[_0x8f95b(0x177)],_0x21728f[_0x8f95b(0x187)],{'method':_0x8f95b(0x175),'path':_0x8f95b(0x18a)},_0x21728f['warnings'])};}};function a46_0x129c(){const _0x11c7f1=['test','operation','\x20selected\x20runtime\x20menus','map','role-menus-set','high-risk-write','22xYniia','menu-','\x20was\x20not\x20found.','appCode','permitList','8460590MYFkrJ','--menus','2383256vUiDko','rolePermit','POST','menuIds','before','\x20already\x20reflects\x20','length','459607QKIroV','9JovkZr','5wYFCXO','Invalid\x20runtime\x20menu\x20ID:\x20','str','find','revoke','bool','3374kimOFK','4635544zJlDtA','1536tOBpVf','4338636xJiqdz','\x20for\x20role\x20','after','4458307FiEkSM','role','/client/permit/resource/batch-save-menu','menus','push','build','body','description','validation','Comma-separated\x20runtime\x20menu\x20IDs','grant','roles','Grants\x20or\x20revokes\x20the\x20target\x20role\x20access\x20to\x20the\x20given\x20runtime\x20menus.\x20Menu\x20visibility\x20for\x20users\x20in\x20that\x20role\x20will\x20change.'];a46_0x129c=function(){return _0x11c7f1;};return a46_0x129c();}
1
+ const a46_0x372fd=a46_0x37ef;(function(_0x564ce5,_0x567098){const _0x30061f=a46_0x37ef,_0x1ee755=_0x564ce5();while(!![]){try{const _0xb477f7=parseInt(_0x30061f(0x15b))/0x1+parseInt(_0x30061f(0x173))/0x2+parseInt(_0x30061f(0x159))/0x3*(parseInt(_0x30061f(0x184))/0x4)+parseInt(_0x30061f(0x160))/0x5+parseInt(_0x30061f(0x17a))/0x6+parseInt(_0x30061f(0x177))/0x7*(parseInt(_0x30061f(0x164))/0x8)+parseInt(_0x30061f(0x15a))/0x9*(-parseInt(_0x30061f(0x17d))/0xa);if(_0xb477f7===_0x567098)break;else _0x1ee755['push'](_0x1ee755['shift']());}catch(_0x300299){_0x1ee755['push'](_0x1ee755['shift']());}}}(a46_0x81ff,0xc4f51));import{listRuntimeMenuRolePermits,listRuntimePermitRoles,saveRuntimeMenuRolePermits}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';function a46_0x37ef(_0x173bf2,_0x26f873){_0x173bf2=_0x173bf2-0x156;const _0x81ff8e=a46_0x81ff();let _0x37ef69=_0x81ff8e[_0x173bf2];return _0x37ef69;}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':a46_0x372fd(0x171),'type':a46_0x372fd(0x182),'required':!![],'description':a46_0x372fd(0x17c)};async function prepare(_0x24090b){const _0x452f55=a46_0x372fd;await assertRuntimePermissionManager(_0x24090b['appCode']);const _0x189197=assertGrantOrRevoke(_0x24090b[_0x452f55(0x175)](_0x452f55(0x16c)),_0x24090b[_0x452f55(0x175)](_0x452f55(0x17e))),_0x442648=await resolveRuntimeRoleRef(_0x24090b[_0x452f55(0x15c)],_0x24090b[_0x452f55(0x168)](_0x452f55(0x172)));assertRuntimePermitRoleConfigurable(_0x442648);const _0x4fe3a8=[...new Set(splitRefs(_0x24090b[_0x452f55(0x168)]('menus'),_0x452f55(0x169))[_0x452f55(0x16a)](_0x5e2022=>{const _0x20413c=_0x452f55,_0x16cc41=Number(_0x5e2022);if(!/^\d+$/['test'](_0x5e2022)||!Number[_0x20413c(0x174)](_0x16cc41)||_0x16cc41<=0x0)throw CliErrors[_0x20413c(0x180)]('Invalid\x20runtime\x20menu\x20ID:\x20'+_0x5e2022+'.');return _0x16cc41;}))],_0x3edd1a=flattenRuntimeMenuRolePermits(await listRuntimeMenuRolePermits(_0x24090b[_0x452f55(0x15c)])),_0x6ee265=await listRuntimePermitRoles(_0x24090b[_0x452f55(0x15c)]),_0x329ad4=[],_0x5696d3=[],_0x6be7fd=[],_0x15be7d=[];for(const _0x442e98 of _0x4fe3a8){const _0x268e28=_0x3edd1a[_0x452f55(0x17b)](_0x4dbb4f=>_0x4dbb4f['id']===_0x442e98);if(!_0x268e28)throw CliErrors[_0x452f55(0x180)](_0x452f55(0x157)+_0x442e98+_0x452f55(0x178));const _0x390ac3=applyRuntimeRolePermission(_0x268e28[_0x452f55(0x179)],_0x442648,_0x6ee265,_0x189197);_0x5696d3[_0x452f55(0x16e)]({'menuId':_0x442e98,'rolePermit':_0x268e28[_0x452f55(0x179)]}),_0x6be7fd[_0x452f55(0x16e)]({'menuId':_0x442e98,'rolePermit':_0x390ac3[_0x452f55(0x158)]});if(_0x390ac3[_0x452f55(0x166)])_0x329ad4['push'](menuPermitDto(_0x24090b[_0x452f55(0x15c)],_0x268e28,_0x390ac3['roles']));else _0x15be7d['push'](_0x452f55(0x157)+_0x442e98+_0x452f55(0x167)+_0x189197+_0x452f55(0x161)+_0x442648['id']+'.');}return{'operation':_0x189197,'role':_0x442648,'menuIds':_0x4fe3a8,'permitList':_0x329ad4,'before':_0x5696d3,'after':_0x6be7fd,'warnings':_0x15be7d};}function a46_0x81ff(){const _0x557dfb=['permitList','grant','length','push','/client/permit/resource/batch-save-menu','operation','menus','role','302292CvbLyG','isSafeInteger','bool','Grant\x20or\x20revoke\x20selected\x20runtime\x20menus\x20for\x20one\x20role','91GGXtbC','\x20was\x20not\x20found.','rolePermit','610296fZxdrw','find','Comma-separated\x20runtime\x20menu\x20IDs','70WaNaDz','revoke','permit','validation','Preview:\x20','string','build','4iEsAFi','high-risk-write','Grants\x20or\x20revokes\x20the\x20target\x20role\x20access\x20to\x20the\x20given\x20runtime\x20menus.\x20Menu\x20visibility\x20for\x20users\x20in\x20that\x20role\x20will\x20change.','Runtime\x20menu\x20','roles','2420151RVNyVg','3757761qmYVgP','1294020wvqfhC','appCode','\x20selected\x20runtime\x20menus','warnings','menuIds','4441510DAVkCo','\x20for\x20role\x20','after','body','300024wdqwAA','before','changed','\x20already\x20reflects\x20','str','--menus','map'];a46_0x81ff=function(){return _0x557dfb;};return a46_0x81ff();}export const permitRoleMenusSet={'service':a46_0x372fd(0x17f),'command':'role-menus-set','description':a46_0x372fd(0x176),'risk':a46_0x372fd(0x185),'confirmationDescription':a46_0x372fd(0x156),'flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,MENUS_FLAG],async 'validate'(_0x155605){const _0x87e3fc=a46_0x372fd;assertGrantOrRevoke(_0x155605[_0x87e3fc(0x175)](_0x87e3fc(0x16c)),_0x155605['bool'](_0x87e3fc(0x17e)));},async 'dryRun'(_0x5963f6){const _0x375349=a46_0x372fd,_0x5d05da=await prepare(_0x5963f6);return dryRun('POST',_0x375349(0x16f))[_0x375349(0x163)]({'appCode':_0x5963f6[_0x375349(0x15c)],'permitList':_0x5d05da[_0x375349(0x16b)]})['description'](_0x375349(0x181)+_0x5d05da[_0x375349(0x170)]+_0x375349(0x15d))[_0x375349(0x183)]();},async 'execute'(_0x1dc5f2){const _0x507030=a46_0x372fd,_0x3298d8=await prepare(_0x1dc5f2);return _0x3298d8[_0x507030(0x16b)][_0x507030(0x16d)]>0x0&&await saveRuntimeMenuRolePermits(_0x1dc5f2['appCode'],_0x3298d8[_0x507030(0x16b)]),{'ok':!![],'data':runtimePermitWriteResult('menu-'+_0x3298d8[_0x507030(0x170)],{'roleId':_0x3298d8[_0x507030(0x172)]['id'],'menuIds':_0x3298d8[_0x507030(0x15f)]},_0x3298d8[_0x507030(0x165)],_0x3298d8[_0x507030(0x162)],{'method':'POST','path':'/client/permit/resource/batch-save-menu'},_0x3298d8[_0x507030(0x15e)])};}};
@@ -1 +1 @@
1
- const a47_0x12442d=a47_0x10f3;(function(_0x46395f,_0x40bddd){const _0x51e823=a47_0x10f3,_0x176717=_0x46395f();while(!![]){try{const _0x3a55e6=parseInt(_0x51e823(0x7f))/0x1*(parseInt(_0x51e823(0x81))/0x2)+-parseInt(_0x51e823(0x7a))/0x3*(-parseInt(_0x51e823(0x76))/0x4)+-parseInt(_0x51e823(0x80))/0x5*(-parseInt(_0x51e823(0x79))/0x6)+parseInt(_0x51e823(0x7c))/0x7+-parseInt(_0x51e823(0x87))/0x8*(parseInt(_0x51e823(0x7e))/0x9)+parseInt(_0x51e823(0x83))/0xa*(-parseInt(_0x51e823(0x77))/0xb)+parseInt(_0x51e823(0x7b))/0xc*(parseInt(_0x51e823(0x7d))/0xd);if(_0x3a55e6===_0x40bddd)break;else _0x176717['push'](_0x176717['shift']());}catch(_0x583ff1){_0x176717['push'](_0x176717['shift']());}}}(a47_0xcfcc,0xd0409));function a47_0x10f3(_0x1dfde8,_0x18df41){_0x1dfde8=_0x1dfde8-0x74;const _0xcfcc16=a47_0xcfcc();let _0x10f37f=_0xcfcc16[_0x1dfde8];return _0x10f37f;}function a47_0xcfcc(){const _0x32f195=['130WyyLVm','str','15658670EVzNOZ','runtime','appCode','role-menus','1379888jmUnmw','roleName','Show\x20evaluated\x20runtime\x20menu\x20access\x20for\x20one\x20role','4MHAJRF','11ufjTtU','permit','30pIejYv','2948403QqWqGv','288384URaHba','2218426Qkbyxt','611mqAayc','45nEcuuP','3343cmkrSW','634780bYNPBg'];a47_0xcfcc=function(){return _0x32f195;};return a47_0xcfcc();}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':a47_0x12442d(0x78),'command':a47_0x12442d(0x86),'description':a47_0x12442d(0x75),'risk':'read','flags':[ROLE_REF_FLAG],async 'execute'(_0x2990da){const _0x46328b=a47_0x12442d,_0x519eca=await resolveRuntimeRoleRef(_0x2990da[_0x46328b(0x85)],_0x2990da[_0x46328b(0x82)]('role')),_0xa1fe00=await getRuntimeRoleMenuResources(_0x2990da[_0x46328b(0x85)],_0x519eca['id']);return{'ok':!![],'data':{'scope':_0x46328b(0x84),'role':{'id':_0x519eca['id'],'roleName':_0x519eca[_0x46328b(0x74)],'roleType':_0x519eca['roleType']},'menus':_0xa1fe00}};}};
1
+ const a47_0x5f554=a47_0x272d;function a47_0x11df(){const _0x33ce87=['50ycLgac','110013PqxuiW','151281aooXRz','8672280Dmogpx','5101772bquath','3339MmnmTZ','str','runtime','1793090WIksBP','role','roleName','appCode','role-menus','1700LHlEsL','1406970owVWpT','2072bxAbUy'];a47_0x11df=function(){return _0x33ce87;};return a47_0x11df();}(function(_0x3f3a12,_0x4949bd){const _0x465eff=a47_0x272d,_0x45c2f0=_0x3f3a12();while(!![]){try{const _0x33f9ac=-parseInt(_0x465eff(0x17b))/0x1+-parseInt(_0x465eff(0x17d))/0x2*(parseInt(_0x465eff(0x17e))/0x3)+-parseInt(_0x465eff(0x181))/0x4+parseInt(_0x465eff(0x175))/0x5+parseInt(_0x465eff(0x180))/0x6+parseInt(_0x465eff(0x182))/0x7*(-parseInt(_0x465eff(0x17c))/0x8)+-parseInt(_0x465eff(0x17f))/0x9*(-parseInt(_0x465eff(0x17a))/0xa);if(_0x33f9ac===_0x4949bd)break;else _0x45c2f0['push'](_0x45c2f0['shift']());}catch(_0xb74daa){_0x45c2f0['push'](_0x45c2f0['shift']());}}}(a47_0x11df,0xe532d));import{getRuntimeRoleMenuResources}from'../../core/api-client.js';import{resolveRuntimeRoleRef}from'../../commands/role/shared.js';import{ROLE_REF_FLAG}from'../../commands/permit/shared.js';function a47_0x272d(_0x12264c,_0x3d09c3){_0x12264c=_0x12264c-0x175;const _0x11dfec=a47_0x11df();let _0x272db2=_0x11dfec[_0x12264c];return _0x272db2;}export const permitRoleMenus={'service':'permit','command':a47_0x5f554(0x179),'description':'Show\x20evaluated\x20runtime\x20menu\x20access\x20for\x20one\x20role','risk':'read','flags':[ROLE_REF_FLAG],async 'execute'(_0x116c6f){const _0x12c145=a47_0x5f554,_0x560a3c=await resolveRuntimeRoleRef(_0x116c6f[_0x12c145(0x178)],_0x116c6f[_0x12c145(0x183)](_0x12c145(0x176))),_0x350bd1=await getRuntimeRoleMenuResources(_0x116c6f['appCode'],_0x560a3c['id']);return{'ok':!![],'data':{'scope':_0x12c145(0x184),'role':{'id':_0x560a3c['id'],'roleName':_0x560a3c[_0x12c145(0x177)],'roleType':_0x560a3c['roleType']},'menus':_0x350bd1}};}};
@@ -1 +1 @@
1
- function a48_0x5a2a(){const _0x42d98c=['9TzDnKo','roleType','Grant\x20the\x20selected\x20resources\x20to\x20the\x20role','Permission\x20role\x20\x22','Use\x20a\x20role\x20ID\x20from\x20`lovrabet\x20role\x20list`.','rolePermit','OWNER','values','\x22\x20is\x20ambiguous.','grant','dataPermit','dataExport','role','dataCreate','test','length','push','Configure\x20USER,\x20CUSTOM,\x20or\x20an\x20applicable\x20special\x20role\x20instead.','MENU','menuPermit','ALL','298318yhhTSb','Ask\x20an\x20application\x20manager\x20to\x20perform\x20this\x20operation.','update-roles','delete-roles','detail-roles','datasetCode','3289356IvlOgf','dataDelete','runtime','90inkEDE','Runtime\x20resource\x20permission\x20changes\x20require\x20an\x20ADMIN\x20or\x20OWNER\x20role.','permitId','Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name','Revoke\x20the\x20selected\x20resources\x20from\x20the\x20role','validation','Comma-separated\x20runtime\x20role\x20IDs\x20or\x20names','Cannot\x20revoke\x20the\x20last\x20role\x20from\x20a\x20runtime\x20resource.','48McDTdM','roleName','1408GyYIfM','41349iLlizR','7710wKxhwU','The\x20current\x20service\x20contract\x20does\x20not\x20persist\x20an\x20empty\x20rolePermit;\x20grant\x20another\x20role\x20first.','\x22\x20was\x20not\x20found.','revoke','toUpperCase','userId','ADMIN','map','appCode','children','filter','number','split','boolean','export-roles','dataDetail','664605uDuaqP','string','userList','25136TCGZFk','SELF\x20is\x20only\x20valid\x20for\x20--row-roles.','Cannot\x20change\x20resource\x20permissions\x20for\x20','menu-id','row-roles','flag','SELF','some','resourceCode','key','2NnoUVf','resourceType','1510904EmmHdf','\x20runtime\x20role\x20','trim'];a48_0x5a2a=function(){return _0x42d98c;};return a48_0x5a2a();}const a48_0x1578ed=a48_0x3be5;(function(_0x2a5b83,_0x48e494){const _0x596a00=a48_0x3be5,_0xab185a=_0x2a5b83();while(!![]){try{const _0x530c1c=parseInt(_0x596a00(0xd5))/0x1*(parseInt(_0x596a00(0x107))/0x2)+parseInt(_0x596a00(0xde))/0x3*(-parseInt(_0x596a00(0xfd))/0x4)+parseInt(_0x596a00(0xfa))/0x5+-parseInt(_0x596a00(0xe6))/0x6*(parseInt(_0x596a00(0xe9))/0x7)+-parseInt(_0x596a00(0x109))/0x8*(parseInt(_0x596a00(0x10c))/0x9)+-parseInt(_0x596a00(0xea))/0xa*(parseInt(_0x596a00(0xe8))/0xb)+parseInt(_0x596a00(0xdb))/0xc;if(_0x530c1c===_0x48e494)break;else _0xab185a['push'](_0xab185a['shift']());}catch(_0x485f9d){_0xab185a['push'](_0xab185a['shift']());}}}(a48_0x5a2a,0x2c709));import{getLoginUserInfo,listRuntimePermitRoles,listRuntimeRoleUsers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{normalizePositiveSafeInteger}from'../../utils/positive-safe-integer.js';export const MENU_ID_FLAG={'name':a48_0x1578ed(0x100),'type':a48_0x1578ed(0xf5),'required':!![],'description':'Runtime\x20menu\x20ID'};export const ROLE_REF_FLAG={'name':a48_0x1578ed(0x118),'type':'string','required':!![],'description':a48_0x1578ed(0xe1)};export const GRANT_FLAG={'name':a48_0x1578ed(0x115),'type':a48_0x1578ed(0xf7),'description':a48_0x1578ed(0x10e)};export const REVOKE_FLAG={'name':a48_0x1578ed(0xed),'type':a48_0x1578ed(0xf7),'description':a48_0x1578ed(0xe2)};export const PAGE_SLOT_SPECS=[{'flag':'menu-roles','key':a48_0x1578ed(0xd3),'allowSelf':![]},{'flag':'create-roles','key':a48_0x1578ed(0x119),'allowSelf':![]},{'flag':a48_0x1578ed(0xd7),'key':'dataUpdate','allowSelf':![]},{'flag':a48_0x1578ed(0xd8),'key':a48_0x1578ed(0xdc),'allowSelf':![]},{'flag':a48_0x1578ed(0xd9),'key':a48_0x1578ed(0xf9),'allowSelf':![]},{'flag':a48_0x1578ed(0xf8),'key':a48_0x1578ed(0x117),'allowSelf':![]},{'flag':a48_0x1578ed(0x101),'key':a48_0x1578ed(0x116),'allowSelf':!![]}];export const PAGE_ROLE_FLAGS=PAGE_SLOT_SPECS[a48_0x1578ed(0xf1)](_0x4f8254=>({'name':_0x4f8254[a48_0x1578ed(0x102)],'type':a48_0x1578ed(0xfb),'description':a48_0x1578ed(0xe4)}));export function splitRefs(_0x54195d,_0x5439a4){const _0x1f3424=a48_0x1578ed,_0xab24b0=[...new Set(_0x54195d[_0x1f3424(0xf6)](',')[_0x1f3424(0xf1)](_0x38ce0e=>_0x38ce0e[_0x1f3424(0x10b)]())[_0x1f3424(0xf4)](Boolean))];if(_0xab24b0[_0x1f3424(0x11b)]===0x0)throw CliErrors[_0x1f3424(0xe3)](_0x5439a4+'\x20must\x20contain\x20at\x20least\x20one\x20value.');return _0xab24b0;}export function assertGrantOrRevoke(_0x1c9ad4,_0x982d31){const _0x232344=a48_0x1578ed;if(_0x1c9ad4===_0x982d31)throw CliErrors[_0x232344(0xe3)]('Pass\x20exactly\x20one\x20of\x20--grant\x20or\x20--revoke.');return _0x1c9ad4?_0x232344(0x115):_0x232344(0xed);}function resolvePermitRole(_0xc4ca07,_0x318bb8){const _0x21b9a6=a48_0x1578ed,_0x326de2=_0x318bb8[_0x21b9a6(0x10b)](),_0x28230b=/^-?\d+$/[_0x21b9a6(0x11a)](_0x326de2)?_0xc4ca07[_0x21b9a6(0xf4)](_0x2f3fbc=>_0x2f3fbc['id']===Number(_0x326de2)):_0xc4ca07[_0x21b9a6(0xf4)](_0x1b3135=>_0x1b3135[_0x21b9a6(0xe7)]===_0x326de2||_0x1b3135[_0x21b9a6(0x10d)]===_0x326de2[_0x21b9a6(0xee)]());if(_0x28230b[_0x21b9a6(0x11b)]!==0x1)throw CliErrors[_0x21b9a6(0xe3)](_0x28230b['length']===0x0?_0x21b9a6(0x10f)+_0x326de2+_0x21b9a6(0xec):_0x21b9a6(0x10f)+_0x326de2+_0x21b9a6(0x114),_0x21b9a6(0x110));return _0x28230b[0x0];}export async function resolveRuntimePermitRoles(_0x30c69a,_0x4c1bab,_0x145dcd){const _0x37189d=a48_0x1578ed,_0x5a01e2=await listRuntimePermitRoles(_0x30c69a,{'needSelf':!![],'needPublic':!![]}),_0x52031f=[...new Map(_0x4c1bab[_0x37189d(0xf1)](_0x3ba3cf=>resolvePermitRole(_0x5a01e2,_0x3ba3cf))[_0x37189d(0xf1)](_0x4332b4=>[_0x4332b4['id'],_0x4332b4]))[_0x37189d(0x113)]()],_0x5c3f52=_0x52031f['find'](_0x583336=>_0x583336['roleType']===_0x37189d(0xf0)||_0x583336[_0x37189d(0x10d)]==='OWNER');if(_0x5c3f52)throw CliErrors[_0x37189d(0xe3)](_0x5c3f52['roleType']+'\x20has\x20full\x20runtime\x20access\x20and\x20cannot\x20be\x20a\x20resource\x20permission\x20target.',_0x37189d(0x11d));if(!_0x145dcd&&_0x52031f['some'](_0x4bda78=>_0x4bda78[_0x37189d(0x10d)]===_0x37189d(0x103)))throw CliErrors[_0x37189d(0xe3)](_0x37189d(0xfe));return _0x52031f;}export async function assertRuntimePermissionManager(_0x67e3e7){const _0x5d3928=a48_0x1578ed,_0x504e54=await getLoginUserInfo(),_0xad136e=_0x504e54[_0x5d3928(0xef)]??_0x504e54['id'],_0x5ab8c7=normalizePositiveSafeInteger(_0xad136e);if(_0x5ab8c7===undefined)throw CliErrors[_0x5d3928(0xe3)]('Cannot\x20resolve\x20the\x20current\x20AK\x20userId\x20for\x20permission\x20management.');const _0x243ef1=await listRuntimeRoleUsers(_0x67e3e7),_0x16eb28=_0x243ef1[_0x5d3928(0x104)](_0x1df4a4=>(_0x1df4a4[_0x5d3928(0x10d)]===_0x5d3928(0xf0)||_0x1df4a4[_0x5d3928(0x10d)]===_0x5d3928(0x112))&&_0x1df4a4[_0x5d3928(0xfc)][_0x5d3928(0x104)](_0x4eeb67=>_0x4eeb67[_0x5d3928(0xef)]===_0x5ab8c7));if(!_0x16eb28)throw CliErrors[_0x5d3928(0xe3)](_0x5d3928(0xdf),_0x5d3928(0xd6));}function a48_0x3be5(_0x48922e,_0x5b1a75){_0x48922e=_0x48922e-0xd3;const _0x5a2a17=a48_0x5a2a();let _0x3be5ce=_0x5a2a17[_0x48922e];return _0x3be5ce;}export function assertRuntimePermitRoleConfigurable(_0x4d8eaa){const _0x433c17=a48_0x1578ed;if(_0x4d8eaa[_0x433c17(0x10d)]===_0x433c17(0xf0)||_0x4d8eaa[_0x433c17(0x10d)]==='OWNER')throw CliErrors[_0x433c17(0xe3)](_0x433c17(0xff)+_0x4d8eaa[_0x433c17(0x10d)]+_0x433c17(0x10a)+_0x4d8eaa['roleName']+'.','ADMIN\x20and\x20OWNER\x20have\x20full\x20runtime\x20access;\x20configure\x20USER\x20or\x20CUSTOM\x20instead.');}function asPermitRole(_0x4c0793){const _0x17612e=a48_0x1578ed;return{'id':_0x4c0793['id'],'roleName':_0x4c0793[_0x17612e(0xe7)],'roleType':_0x4c0793['roleType'],'allowed':!![]};}export function applyRuntimeRolePermission(_0x2bc3d1,_0x4aba03,_0x2f7c9a,_0x80a7a6){const _0x454482=a48_0x1578ed,_0xe782b0=!_0x2bc3d1||_0x2bc3d1['length']===0x0,_0x16e82d=_0x2bc3d1?.[_0x454482(0x104)](_0xb7aee8=>_0xb7aee8[_0x454482(0x10d)]===_0x454482(0xd4))??![];if(_0x80a7a6==='grant'&&(_0xe782b0||_0x16e82d))return{'roles':_0x2bc3d1??null,'changed':![]};let _0x2932cc=_0xe782b0||_0x16e82d?_0x2f7c9a[_0x454482(0xf4)](_0x36780c=>_0x36780c['id']>0x0):[..._0x2bc3d1];const _0xd4d59b=_0x2932cc[_0x454482(0x104)](_0x1c910b=>_0x1c910b['id']===_0x4aba03['id']);if(_0x80a7a6==='grant'){if(_0xd4d59b)return{'roles':_0x2932cc,'changed':![]};return _0x2932cc[_0x454482(0x11c)](asPermitRole(_0x4aba03)),{'roles':_0x2932cc,'changed':!![]};}if(!_0xd4d59b)return{'roles':_0x2932cc,'changed':_0xe782b0||_0x16e82d};_0x2932cc=_0x2932cc[_0x454482(0xf4)](_0x1aa97d=>_0x1aa97d['id']!==_0x4aba03['id']);if(_0x2932cc[_0x454482(0x11b)]===0x0)throw CliErrors[_0x454482(0xe3)](_0x454482(0xe5),_0x454482(0xeb));return{'roles':_0x2932cc,'changed':!![]};}export function projectRuntimePagePermit(_0x208aee){const _0x2dfb88=a48_0x1578ed,_0x427690={'menuId':_0x208aee['menuId'],'pageId':_0x208aee['pageId'],'appCode':_0x208aee[_0x2dfb88(0xf2)],'datasetCode':_0x208aee[_0x2dfb88(0xda)]};for(const _0x483436 of PAGE_SLOT_SPECS){const _0x2e5d5e=_0x208aee[_0x483436[_0x2dfb88(0x106)]];_0x2e5d5e&&(_0x427690[_0x483436['key']]={'resourceCode':_0x2e5d5e[_0x2dfb88(0x105)],'resourceType':_0x2e5d5e[_0x2dfb88(0x108)],'roles':(_0x2e5d5e[_0x2dfb88(0x111)]??[])['map'](_0x519e97=>({'id':_0x519e97['id'],'roleName':_0x519e97[_0x2dfb88(0xe7)],'roleType':_0x519e97[_0x2dfb88(0x10d)]}))});}return _0x427690;}export function flattenRuntimeMenuRolePermits(_0x41fda4){const _0x1ae7fa=[],_0x3cc967=_0xf78552=>{const _0x5a3749=a48_0x3be5;_0x1ae7fa[_0x5a3749(0x11c)](_0xf78552);for(const _0x1c3bc7 of _0xf78552[_0x5a3749(0xf3)]??[])_0x3cc967(_0x1c3bc7);};for(const _0x578863 of _0x41fda4)_0x3cc967(_0x578863);return _0x1ae7fa;}export function runtimePermitWriteResult(_0x5218e2,_0x12bf5c,_0x3cc925,_0x5325d1,_0x25fb60,_0x1b8d91=[]){const _0x4697d5=a48_0x1578ed;return{'operation':_0x5218e2,'scope':_0x4697d5(0xdd),'selector':_0x12bf5c,'before':_0x3cc925,'after':_0x5325d1,'dryRun':![],'backend':_0x25fb60,'warnings':_0x1b8d91};}export function menuPermitDto(_0x50468f,_0x3b513f,_0x5541d5){const _0x291ba0=a48_0x1578ed;return{..._0x3b513f[_0x291ba0(0xe0)]!=null?{'id':_0x3b513f[_0x291ba0(0xe0)]}:{},'appCode':_0x50468f,'menuId':_0x3b513f['id'],'pageId':_0x3b513f['pageId']??null,'resourceCode':String(_0x3b513f['id']),'resourceType':_0x291ba0(0x11e),'resourceName':_0x3b513f['label'],'rolePermit':_0x5541d5};}
1
+ const a48_0x2c4bb2=a48_0x20b4;(function(_0x59ee41,_0xf86422){const _0x13497f=a48_0x20b4,_0x504826=_0x59ee41();while(!![]){try{const _0x12691a=parseInt(_0x13497f(0x18e))/0x1*(-parseInt(_0x13497f(0x1ba))/0x2)+-parseInt(_0x13497f(0x182))/0x3*(parseInt(_0x13497f(0x1b5))/0x4)+-parseInt(_0x13497f(0x19c))/0x5*(-parseInt(_0x13497f(0x1a3))/0x6)+-parseInt(_0x13497f(0x185))/0x7*(-parseInt(_0x13497f(0x1b0))/0x8)+parseInt(_0x13497f(0x192))/0x9*(parseInt(_0x13497f(0x1b9))/0xa)+parseInt(_0x13497f(0x17c))/0xb+-parseInt(_0x13497f(0x1ab))/0xc;if(_0x12691a===_0xf86422)break;else _0x504826['push'](_0x504826['shift']());}catch(_0x1efe21){_0x504826['push'](_0x504826['shift']());}}}(a48_0x1714,0x53ae6));function a48_0x1714(){const _0x582c9b=['roleType','The\x20current\x20service\x20contract\x20does\x20not\x20persist\x20an\x20empty\x20rolePermit;\x20grant\x20another\x20role\x20first.','Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name','test','dataPermit','Cannot\x20change\x20resource\x20permissions\x20for\x20','some','52253QUSmfp','dataUpdate','push','trim','36VrTZPs','string','label','detail-roles','flag','Grant\x20the\x20selected\x20resources\x20to\x20the\x20role','grant','key','Runtime\x20menu\x20ID','Ask\x20an\x20application\x20manager\x20to\x20perform\x20this\x20operation.','308195mPKqkC','Use\x20a\x20role\x20ID\x20from\x20`lovrabet\x20role\x20list`.','OWNER','delete-roles','Cannot\x20revoke\x20the\x20last\x20role\x20from\x20a\x20runtime\x20resource.','export-roles','runtime','30DGCJUy','validation','dataExport','dataCreate','values','userId','length','find','1709856ebEyCJ','Runtime\x20resource\x20permission\x20changes\x20require\x20an\x20ADMIN\x20or\x20OWNER\x20role.','map','ALL','permitId','1039928fubOrz','appCode','\x20has\x20full\x20runtime\x20access\x20and\x20cannot\x20be\x20a\x20resource\x20permission\x20target.','filter','datasetCode','681572zQgqsT','pageId','SELF','MENU','1140210hJIjdC','22Gvbvrw','\x22\x20was\x20not\x20found.','Comma-separated\x20runtime\x20role\x20IDs\x20or\x20names','Permission\x20role\x20\x22','userList','create-roles','menu-id','menuId','menuPermit','resourceType','boolean','dataDelete','\x22\x20is\x20ambiguous.','\x20must\x20contain\x20at\x20least\x20one\x20value.','dataDetail','1726714fzjoiq','Cannot\x20resolve\x20the\x20current\x20AK\x20userId\x20for\x20permission\x20management.','Pass\x20exactly\x20one\x20of\x20--grant\x20or\x20--revoke.','rolePermit','ADMIN','update-roles','9TpfgvM','ADMIN\x20and\x20OWNER\x20have\x20full\x20runtime\x20access;\x20configure\x20USER\x20or\x20CUSTOM\x20instead.','roleName','35ZSBILW','revoke'];a48_0x1714=function(){return _0x582c9b;};return a48_0x1714();}import{getLoginUserInfo,listRuntimePermitRoles,listRuntimeRoleUsers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{normalizePositiveSafeInteger}from'../../utils/positive-safe-integer.js';export const MENU_ID_FLAG={'name':a48_0x2c4bb2(0x1c0),'type':'number','required':!![],'description':a48_0x2c4bb2(0x19a)};export const ROLE_REF_FLAG={'name':'role','type':a48_0x2c4bb2(0x193),'required':!![],'description':a48_0x2c4bb2(0x189)};export const GRANT_FLAG={'name':a48_0x2c4bb2(0x198),'type':a48_0x2c4bb2(0x177),'description':a48_0x2c4bb2(0x197)};export const REVOKE_FLAG={'name':'revoke','type':a48_0x2c4bb2(0x177),'description':'Revoke\x20the\x20selected\x20resources\x20from\x20the\x20role'};export const PAGE_SLOT_SPECS=[{'flag':'menu-roles','key':a48_0x2c4bb2(0x1c2),'allowSelf':![]},{'flag':a48_0x2c4bb2(0x1bf),'key':a48_0x2c4bb2(0x1a6),'allowSelf':![]},{'flag':a48_0x2c4bb2(0x181),'key':a48_0x2c4bb2(0x18f),'allowSelf':![]},{'flag':a48_0x2c4bb2(0x19f),'key':a48_0x2c4bb2(0x178),'allowSelf':![]},{'flag':a48_0x2c4bb2(0x195),'key':a48_0x2c4bb2(0x17b),'allowSelf':![]},{'flag':a48_0x2c4bb2(0x1a1),'key':a48_0x2c4bb2(0x1a5),'allowSelf':![]},{'flag':'row-roles','key':a48_0x2c4bb2(0x18b),'allowSelf':!![]}];export const PAGE_ROLE_FLAGS=PAGE_SLOT_SPECS[a48_0x2c4bb2(0x1ad)](_0x99af4=>({'name':_0x99af4[a48_0x2c4bb2(0x196)],'type':a48_0x2c4bb2(0x193),'description':a48_0x2c4bb2(0x1bc)}));export function splitRefs(_0x542f8a,_0x30726b){const _0x42b6e4=a48_0x2c4bb2,_0x38d5d1=[...new Set(_0x542f8a['split'](',')[_0x42b6e4(0x1ad)](_0x1243e4=>_0x1243e4['trim']())['filter'](Boolean))];if(_0x38d5d1['length']===0x0)throw CliErrors[_0x42b6e4(0x1a4)](_0x30726b+_0x42b6e4(0x17a));return _0x38d5d1;}export function assertGrantOrRevoke(_0x5ca459,_0x34a026){const _0x48d27d=a48_0x2c4bb2;if(_0x5ca459===_0x34a026)throw CliErrors[_0x48d27d(0x1a4)](_0x48d27d(0x17e));return _0x5ca459?_0x48d27d(0x198):_0x48d27d(0x186);}function resolvePermitRole(_0x35604b,_0x4964eb){const _0x33598b=a48_0x2c4bb2,_0x299be4=_0x4964eb[_0x33598b(0x191)](),_0x32dff1=/^-?\d+$/[_0x33598b(0x18a)](_0x299be4)?_0x35604b[_0x33598b(0x1b3)](_0x2523f0=>_0x2523f0['id']===Number(_0x299be4)):_0x35604b[_0x33598b(0x1b3)](_0x1d8177=>_0x1d8177[_0x33598b(0x184)]===_0x299be4||_0x1d8177[_0x33598b(0x187)]===_0x299be4['toUpperCase']());if(_0x32dff1[_0x33598b(0x1a9)]!==0x1)throw CliErrors[_0x33598b(0x1a4)](_0x32dff1['length']===0x0?_0x33598b(0x1bd)+_0x299be4+_0x33598b(0x1bb):'Permission\x20role\x20\x22'+_0x299be4+_0x33598b(0x179),_0x33598b(0x19d));return _0x32dff1[0x0];}export async function resolveRuntimePermitRoles(_0xf5fa47,_0x4a1e5a,_0x220d27){const _0x76ae93=a48_0x2c4bb2,_0x2269bd=await listRuntimePermitRoles(_0xf5fa47,{'needSelf':!![],'needPublic':!![]}),_0x51bd7a=[...new Map(_0x4a1e5a[_0x76ae93(0x1ad)](_0x3196b4=>resolvePermitRole(_0x2269bd,_0x3196b4))[_0x76ae93(0x1ad)](_0x419c3a=>[_0x419c3a['id'],_0x419c3a]))[_0x76ae93(0x1a7)]()],_0x433a7b=_0x51bd7a[_0x76ae93(0x1aa)](_0x1976af=>_0x1976af[_0x76ae93(0x187)]===_0x76ae93(0x180)||_0x1976af[_0x76ae93(0x187)]==='OWNER');if(_0x433a7b)throw CliErrors[_0x76ae93(0x1a4)](_0x433a7b['roleType']+_0x76ae93(0x1b2),'Configure\x20USER,\x20CUSTOM,\x20or\x20an\x20applicable\x20special\x20role\x20instead.');if(!_0x220d27&&_0x51bd7a[_0x76ae93(0x18d)](_0x526a3c=>_0x526a3c[_0x76ae93(0x187)]===_0x76ae93(0x1b7)))throw CliErrors['validation']('SELF\x20is\x20only\x20valid\x20for\x20--row-roles.');return _0x51bd7a;}export async function assertRuntimePermissionManager(_0x4800ce){const _0x20a6b8=a48_0x2c4bb2,_0x479e0e=await getLoginUserInfo(),_0x16cca0=_0x479e0e[_0x20a6b8(0x1a8)]??_0x479e0e['id'],_0x1d883c=normalizePositiveSafeInteger(_0x16cca0);if(_0x1d883c===undefined)throw CliErrors[_0x20a6b8(0x1a4)](_0x20a6b8(0x17d));const _0x21c3ae=await listRuntimeRoleUsers(_0x4800ce),_0x164578=_0x21c3ae['some'](_0x57a833=>(_0x57a833[_0x20a6b8(0x187)]===_0x20a6b8(0x180)||_0x57a833[_0x20a6b8(0x187)]===_0x20a6b8(0x19e))&&_0x57a833[_0x20a6b8(0x1be)]['some'](_0x588cf4=>_0x588cf4['userId']===_0x1d883c));if(!_0x164578)throw CliErrors['validation'](_0x20a6b8(0x1ac),_0x20a6b8(0x19b));}export function assertRuntimePermitRoleConfigurable(_0x5bb432){const _0x3036fa=a48_0x2c4bb2;if(_0x5bb432[_0x3036fa(0x187)]===_0x3036fa(0x180)||_0x5bb432[_0x3036fa(0x187)]===_0x3036fa(0x19e))throw CliErrors[_0x3036fa(0x1a4)](_0x3036fa(0x18c)+_0x5bb432[_0x3036fa(0x187)]+'\x20runtime\x20role\x20'+_0x5bb432['roleName']+'.',_0x3036fa(0x183));}function asPermitRole(_0x4ccc4d){const _0x5ab78a=a48_0x2c4bb2;return{'id':_0x4ccc4d['id'],'roleName':_0x4ccc4d[_0x5ab78a(0x184)],'roleType':_0x4ccc4d[_0x5ab78a(0x187)],'allowed':!![]};}export function applyRuntimeRolePermission(_0x5b0ba9,_0x366e55,_0x57eaf4,_0x5b366b){const _0x1557ee=a48_0x2c4bb2,_0x2126e4=!_0x5b0ba9||_0x5b0ba9[_0x1557ee(0x1a9)]===0x0,_0x243627=_0x5b0ba9?.[_0x1557ee(0x18d)](_0x44ff26=>_0x44ff26['roleType']===_0x1557ee(0x1ae))??![];if(_0x5b366b===_0x1557ee(0x198)&&(_0x2126e4||_0x243627))return{'roles':_0x5b0ba9??null,'changed':![]};let _0x210729=_0x2126e4||_0x243627?_0x57eaf4['filter'](_0x1ba0e5=>_0x1ba0e5['id']>0x0):[..._0x5b0ba9];const _0x2b1fb2=_0x210729[_0x1557ee(0x18d)](_0x3d7536=>_0x3d7536['id']===_0x366e55['id']);if(_0x5b366b==='grant'){if(_0x2b1fb2)return{'roles':_0x210729,'changed':![]};return _0x210729[_0x1557ee(0x190)](asPermitRole(_0x366e55)),{'roles':_0x210729,'changed':!![]};}if(!_0x2b1fb2)return{'roles':_0x210729,'changed':_0x2126e4||_0x243627};_0x210729=_0x210729['filter'](_0x10f402=>_0x10f402['id']!==_0x366e55['id']);if(_0x210729['length']===0x0)throw CliErrors['validation'](_0x1557ee(0x1a0),_0x1557ee(0x188));return{'roles':_0x210729,'changed':!![]};}export function projectRuntimePagePermit(_0x531851){const _0x120e2f=a48_0x2c4bb2,_0x1811bf={'menuId':_0x531851[_0x120e2f(0x1c1)],'pageId':_0x531851[_0x120e2f(0x1b6)],'appCode':_0x531851[_0x120e2f(0x1b1)],'datasetCode':_0x531851[_0x120e2f(0x1b4)]};for(const _0x59b837 of PAGE_SLOT_SPECS){const _0x5dd451=_0x531851[_0x59b837[_0x120e2f(0x199)]];_0x5dd451&&(_0x1811bf[_0x59b837[_0x120e2f(0x199)]]={'resourceCode':_0x5dd451['resourceCode'],'resourceType':_0x5dd451[_0x120e2f(0x1c3)],'roles':(_0x5dd451[_0x120e2f(0x17f)]??[])['map'](_0x5778ae=>({'id':_0x5778ae['id'],'roleName':_0x5778ae['roleName'],'roleType':_0x5778ae[_0x120e2f(0x187)]}))});}return _0x1811bf;}export function flattenRuntimeMenuRolePermits(_0x557778){const _0x5c0fa5=[],_0x86a44f=_0x5ba715=>{_0x5c0fa5['push'](_0x5ba715);for(const _0x22dfea of _0x5ba715['children']??[])_0x86a44f(_0x22dfea);};for(const _0x51d1d9 of _0x557778)_0x86a44f(_0x51d1d9);return _0x5c0fa5;}function a48_0x20b4(_0x3e8d0a,_0x370a1e){_0x3e8d0a=_0x3e8d0a-0x177;const _0x1714a0=a48_0x1714();let _0x20b47a=_0x1714a0[_0x3e8d0a];return _0x20b47a;}export function runtimePermitWriteResult(_0x35a6ed,_0x44fcef,_0x2b9bb0,_0xb44d98,_0x382915,_0x4cea6a=[]){const _0x3bb5e6=a48_0x2c4bb2;return{'operation':_0x35a6ed,'scope':_0x3bb5e6(0x1a2),'selector':_0x44fcef,'before':_0x2b9bb0,'after':_0xb44d98,'dryRun':![],'backend':_0x382915,'warnings':_0x4cea6a};}export function menuPermitDto(_0x594bea,_0xb8671e,_0x4914d8){const _0x1b4b78=a48_0x2c4bb2;return{..._0xb8671e['permitId']!=null?{'id':_0xb8671e[_0x1b4b78(0x1af)]}:{},'appCode':_0x594bea,'menuId':_0xb8671e['id'],'pageId':_0xb8671e[_0x1b4b78(0x1b6)]??null,'resourceCode':String(_0xb8671e['id']),'resourceType':_0x1b4b78(0x1b8),'resourceName':_0xb8671e[_0x1b4b78(0x194)],'rolePermit':_0x4914d8};}
@@ -1 +1 @@
1
- const a49_0x5a2c3c=a49_0x29b9;(function(_0x4572ea,_0xb74d5f){const _0x26b875=a49_0x29b9,_0x276c47=_0x4572ea();while(!![]){try{const _0x5872c6=parseInt(_0x26b875(0x16b))/0x1*(-parseInt(_0x26b875(0x157))/0x2)+-parseInt(_0x26b875(0x180))/0x3*(parseInt(_0x26b875(0x15c))/0x4)+parseInt(_0x26b875(0x154))/0x5*(-parseInt(_0x26b875(0x181))/0x6)+parseInt(_0x26b875(0x173))/0x7*(parseInt(_0x26b875(0x169))/0x8)+parseInt(_0x26b875(0x187))/0x9+parseInt(_0x26b875(0x162))/0xa*(-parseInt(_0x26b875(0x150))/0xb)+-parseInt(_0x26b875(0x14a))/0xc*(-parseInt(_0x26b875(0x184))/0xd);if(_0x5872c6===_0xb74d5f)break;else _0x276c47['push'](_0x276c47['shift']());}catch(_0x357b01){_0x276c47['push'](_0x276c47['shift']());}}}(a49_0x2bc9,0x489fd));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':'file','type':'string','description':a49_0x5a2c3c(0x167)},FUNCTION_NAME_FLAG={'name':a49_0x5a2c3c(0x17c),'type':'string','required':!![],'description':'Personal\x20Backend\x20Function\x20name,\x20for\x20example\x20loadOrders'},DESCRIPTION_FLAG={'name':a49_0x5a2c3c(0x15b),'type':a49_0x5a2c3c(0x14b),'description':a49_0x5a2c3c(0x14d)},SOURCE_SESSION_FLAG={'name':'source-session-id','type':a49_0x5a2c3c(0x14b),'description':a49_0x5a2c3c(0x156)};function normalizeFunctionName(_0x1e0de3){const _0x206eb3=a49_0x5a2c3c,_0x2e8e4d=String(_0x1e0de3||'')['trim']();if(!_0x2e8e4d||!FUNCTION_NAME_PATTERN['test'](_0x2e8e4d))throw CliErrors[_0x206eb3(0x183)](_0x206eb3(0x168));return _0x2e8e4d;}function readScriptFile(_0x28b283){const _0x3bacfd=a49_0x5a2c3c;if(!_0x28b283)throw CliErrors[_0x3bacfd(0x183)](_0x3bacfd(0x159));if(!existsSync(_0x28b283))throw CliErrors[_0x3bacfd(0x183)](_0x3bacfd(0x178)+_0x28b283);if(!statSync(_0x28b283)[_0x3bacfd(0x170)]())throw CliErrors[_0x3bacfd(0x183)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x28b283);const _0x38c185=readFileSync(_0x28b283,'utf8');if(!_0x38c185[_0x3bacfd(0x148)]())throw CliErrors[_0x3bacfd(0x183)]('Personal\x20Backend\x20Function\x20script\x20file\x20is\x20blank.');return _0x38c185;}function a49_0x29b9(_0xdd7ea8,_0x57f049){_0xdd7ea8=_0xdd7ea8-0x146;const _0x2bc98d=a49_0x2bc9();let _0x29b99e=_0x2bc98d[_0xdd7ea8];return _0x29b99e;}function optionalTrimmed(_0x316422){const _0x5c5036=a49_0x5a2c3c,_0x27f626=String(_0x316422||'')[_0x5c5036(0x148)]();return _0x27f626||undefined;}function summarizeBff(_0x3f4538){const _0x452117=a49_0x5a2c3c;return{'id':_0x3f4538['id'],'appCode':_0x3f4538[_0x452117(0x15d)],'functionName':_0x3f4538[_0x452117(0x166)],'description':_0x3f4538[_0x452117(0x15b)],'scriptType':_0x3f4538[_0x452117(0x151)],'version':_0x3f4538['version'],'gmtModified':_0x3f4538[_0x452117(0x175)],'updateTime':_0x3f4538['updateTime']};}function detailBff(_0x1a424e){const _0x447c05=a49_0x5a2c3c;return{'id':_0x1a424e['id'],'appCode':_0x1a424e[_0x447c05(0x15d)],'functionName':_0x1a424e[_0x447c05(0x166)],'description':_0x1a424e[_0x447c05(0x15b)],'scriptType':_0x1a424e[_0x447c05(0x151)],'scriptContent':_0x1a424e['scriptContent']??'','config':_0x1a424e[_0x447c05(0x189)],'version':_0x1a424e[_0x447c05(0x16e)],'createUserId':_0x1a424e[_0x447c05(0x186)],'gmtCreate':_0x1a424e[_0x447c05(0x182)],'gmtModified':_0x1a424e[_0x447c05(0x175)],'createTime':_0x1a424e[_0x447c05(0x17d)],'updateTime':_0x1a424e['updateTime']};}function buildCreateInput(_0x2e1815){const _0x499c4e=a49_0x5a2c3c;return{'functionName':normalizeFunctionName(_0x2e1815[_0x499c4e(0x176)](_0x499c4e(0x17c))),...optionalTrimmed(_0x2e1815['str'](_0x499c4e(0x15b)))?{'description':optionalTrimmed(_0x2e1815['str'](_0x499c4e(0x15b)))}:{},'scriptContent':readScriptFile(_0x2e1815[_0x499c4e(0x176)]('file')),...optionalTrimmed(_0x2e1815[_0x499c4e(0x176)](_0x499c4e(0x16f)))?{'sourceSessionId':optionalTrimmed(_0x2e1815[_0x499c4e(0x176)]('source-session-id'))}:{}};}function buildUpdateInput(_0x4af66b){const _0x569852=a49_0x5a2c3c,_0x405711={};optionalTrimmed(_0x4af66b['str']('name'))&&(_0x405711[_0x569852(0x166)]=normalizeFunctionName(_0x4af66b[_0x569852(0x176)](_0x569852(0x17c))));_0x4af66b['flag'](_0x569852(0x15b))!==undefined&&(_0x405711[_0x569852(0x15b)]=_0x4af66b['str'](_0x569852(0x15b)));optionalTrimmed(_0x4af66b[_0x569852(0x176)](_0x569852(0x16a)))&&(_0x405711[_0x569852(0x155)]=readScriptFile(_0x4af66b[_0x569852(0x176)](_0x569852(0x16a))));_0x4af66b[_0x569852(0x160)](_0x569852(0x16f))!==undefined&&(_0x405711['sourceSessionId']=_0x4af66b[_0x569852(0x176)]('source-session-id'));if(Object[_0x569852(0x161)](_0x405711)[_0x569852(0x164)]===0x0)throw CliErrors[_0x569852(0x183)](_0x569852(0x165));return _0x405711;}function parseExecParams(_0x549f8d){const _0x3636de=a49_0x5a2c3c,_0x3a229a=parseJsonParams(_0x549f8d)??{};if(Array[_0x3636de(0x16c)](_0x3a229a))throw CliErrors[_0x3636de(0x183)](_0x3636de(0x158));return _0x3a229a;}const personalBffList={'service':'personal-bff','command':a49_0x5a2c3c(0x153),'description':'List\x20current\x20user\x27s\x20Personal\x20Backend\x20Function\x20scripts\x20for\x20the\x20current\x20app','risk':a49_0x5a2c3c(0x15e),'flags':[VERBOSE_FLAG],async 'execute'(_0x15df7e){const _0x2a13c4=a49_0x5a2c3c,_0x45ce9c=await listPersonalBffs(_0x15df7e[_0x2a13c4(0x15d)]);return{'ok':!![],'data':{'total':_0x45ce9c[_0x2a13c4(0x164)],'items':_0x15df7e[_0x2a13c4(0x171)]('verbose')?_0x45ce9c:_0x45ce9c[_0x2a13c4(0x14e)](summarizeBff)}};}},personalBffDetail={'service':a49_0x5a2c3c(0x146),'command':'detail','description':a49_0x5a2c3c(0x17a),'risk':a49_0x5a2c3c(0x15e),'flags':[{...ID_FLAG,'description':a49_0x5a2c3c(0x149)}],async 'execute'(_0x3b6421){const _0x1baf3b=a49_0x5a2c3c,_0x26bae6=await getPersonalBff(_0x3b6421[_0x1baf3b(0x177)]('id'),_0x3b6421[_0x1baf3b(0x15d)]);return{'ok':!![],'data':detailBff(_0x26bae6)};}},personalBffCreate={'service':a49_0x5a2c3c(0x146),'command':a49_0x5a2c3c(0x18a),'description':'Create\x20a\x20Personal\x20Backend\x20Function\x20from\x20a\x20local\x20script\x20file','risk':a49_0x5a2c3c(0x163),'confirmationDescription':'Saves\x20the\x20local\x20script\x20as\x20a\x20Personal\x20Backend\x20Function.\x20The\x20script\x20can\x20then\x20be\x20called\x20in\x20the\x20current\x20app.','flags':[FUNCTION_NAME_FLAG,{...FILE_FLAG,'required':!![]},DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x2691a6){const _0x4535f9=a49_0x5a2c3c,_0x5b3472=buildCreateInput(_0x2691a6),_0x3a42a8=await createPersonalBff(_0x2691a6['appCode'],_0x5b3472);return{'ok':!![],'data':detailBff(_0x3a42a8),'message':_0x4535f9(0x152)+_0x3a42a8['id']+(_0x3a42a8['functionName']?'\x20('+_0x3a42a8['functionName']+')':'')};},async 'dryRun'(_0x266bb7){const _0x3e168b=a49_0x5a2c3c,_0x17f33c=buildCreateInput(_0x266bb7);return dryRun(_0x3e168b(0x16d),_0x3e168b(0x147))[_0x3e168b(0x185)]({'appCode':_0x266bb7[_0x3e168b(0x15d)],..._0x17f33c})['description'](_0x3e168b(0x14f)+_0x17f33c[_0x3e168b(0x166)])[_0x3e168b(0x17e)]();}},personalBffUpdate={'service':a49_0x5a2c3c(0x146),'command':a49_0x5a2c3c(0x17f),'description':a49_0x5a2c3c(0x179),'risk':a49_0x5a2c3c(0x163),'confirmationDescription':a49_0x5a2c3c(0x14c),'flags':[{...ID_FLAG,'description':'Personal\x20Backend\x20Function\x20script\x20ID'},{...FUNCTION_NAME_FLAG,'required':![]},FILE_FLAG,DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x2380ce){const _0x543ecb=a49_0x5a2c3c,_0x51b881=_0x2380ce['num']('id'),_0x14b523=buildUpdateInput(_0x2380ce),_0x48b049=await updatePersonalBff(_0x51b881,_0x2380ce[_0x543ecb(0x15d)],_0x14b523);return{'ok':!![],'data':detailBff(_0x48b049),'message':_0x543ecb(0x172)+_0x48b049['id']+(_0x48b049[_0x543ecb(0x166)]?'\x20('+_0x48b049[_0x543ecb(0x166)]+')':'')};},async 'dryRun'(_0x583770){const _0x207f14=a49_0x5a2c3c,_0x81c2e5=_0x583770[_0x207f14(0x177)]('id'),_0x415d1e=buildUpdateInput(_0x583770);return dryRun('POST','/client/runtime-bff/personal/'+_0x81c2e5+'/update')['body']({'appCode':_0x583770[_0x207f14(0x15d)],..._0x415d1e})[_0x207f14(0x15b)]('Preview:\x20update\x20Personal\x20Backend\x20Function\x20'+_0x81c2e5)[_0x207f14(0x17e)]();}},personalBffExec={'service':a49_0x5a2c3c(0x146),'command':a49_0x5a2c3c(0x15f),'description':a49_0x5a2c3c(0x15a),'risk':a49_0x5a2c3c(0x163),'confirmationDescription':a49_0x5a2c3c(0x188),'flags':[{...ID_FLAG,'description':a49_0x5a2c3c(0x149)},{...PARAMS_FLAG,'description':'JSON\x20object\x20passed\x20to\x20the\x20Personal\x20Backend\x20Function\x20execution'}],async 'validate'(_0x34b7bd){const _0x410841=a49_0x5a2c3c;parseExecParams(_0x34b7bd[_0x410841(0x176)](_0x410841(0x17b)));},async 'execute'(_0x31117a){const _0x9bf929=a49_0x5a2c3c,_0x42d0fc=_0x31117a[_0x9bf929(0x177)]('id'),_0x47af88=parseExecParams(_0x31117a[_0x9bf929(0x176)](_0x9bf929(0x17b))),_0x229fc2=await executePersonalBff(_0x42d0fc,_0x31117a[_0x9bf929(0x15d)],_0x47af88);return{'ok':!![],'data':{'result':_0x229fc2},'message':_0x9bf929(0x174)+_0x42d0fc};}};function a49_0x2bc9(){const _0x5999fa=['4177503tFZvdu','Runs\x20the\x20Personal\x20Backend\x20Function\x20script.\x20The\x20script\x20may\x20read\x20or\x20change\x20business\x20data,\x20or\x20call\x20external\x20services.','config','create','personal-bff','/client/runtime-bff/personal/create','trim','Personal\x20Backend\x20Function\x20script\x20ID','313692htSKdk','string','Updates\x20the\x20Personal\x20Backend\x20Function\x20script\x20or\x20metadata.\x20Later\x20calls\x20use\x20the\x20new\x20version.','Personal\x20Backend\x20Function\x20description','map','Preview:\x20create\x20Personal\x20Backend\x20Function\x20','3506899fwcxFJ','scriptType','Created\x20Personal\x20Backend\x20Function\x20','list','553730YvYvvY','scriptContent','Optional\x20source\x20RuntimeAgent\x20session\x20id','18826ilSzEM','--params\x20must\x20be\x20a\x20JSON\x20object.','File\x20path\x20is\x20required.','Execute\x20a\x20Personal\x20Backend\x20Function\x20by\x20ID,\x20optionally\x20with\x20JSON\x20params','description','85496hzSJkO','appCode','read','exec','flag','keys','10tnvBvJ','write','length','personal-bff\x20update\x20requires\x20at\x20least\x20one\x20of\x20--name,\x20--description,\x20--file,\x20or\x20--source-session-id.','functionName','Path\x20to\x20a\x20local\x20UTF-8\x20JavaScript\x20or\x20TypeScript\x20file','--name\x20must\x20be\x20a\x20valid\x20JavaScript\x20identifier,\x20for\x20example\x20loadOrders.','8eCiBnl','file','13PxCrrN','isArray','POST','version','source-session-id','isFile','bool','Updated\x20Personal\x20Backend\x20Function\x20','2715307lVowYG','Executed\x20Personal\x20Backend\x20Function\x20','gmtModified','str','num','File\x20not\x20found:\x20','Update\x20a\x20Personal\x20Backend\x20Function\x20by\x20ID','Show\x20one\x20Personal\x20Backend\x20Function\x20by\x20id','params','name','createTime','build','update','39ZGlJfm','18oJrtZj','gmtCreate','validation','247kWlhRP','body','createUserId'];a49_0x2bc9=function(){return _0x5999fa;};return a49_0x2bc9();}export const personalBffDefinitions=[personalBffList,personalBffDetail,personalBffCreate,personalBffUpdate,personalBffExec];
1
+ function a49_0xb181(){const _0x243447=['16991UMnkXB','createUserId','createTime','description','trim','570829OJsUTC','string','appCode','File\x20is\x20not\x20a\x20regular\x20file:\x20','Personal\x20Backend\x20Function\x20description','str','Optional\x20source\x20RuntimeAgent\x20session\x20id','personal-bff\x20update\x20requires\x20at\x20least\x20one\x20of\x20--name,\x20--description,\x20--file,\x20or\x20--source-session-id.','File\x20path\x20is\x20required.','Runs\x20the\x20Personal\x20Backend\x20Function\x20script.\x20The\x20script\x20may\x20read\x20or\x20change\x20business\x20data,\x20or\x20call\x20external\x20services.','gmtCreate','personal-bff','source-session-id','31764EgpAJD','3104930mvegSB','build','map','/client/runtime-bff/personal/create','List\x20current\x20user\x27s\x20Personal\x20Backend\x20Function\x20scripts\x20for\x20the\x20current\x20app','config','2oZgeXn','/update','num','Preview:\x20update\x20Personal\x20Backend\x20Function\x20','flag','exec','413aFykoW','POST','1085451TqMfWf','Updated\x20Personal\x20Backend\x20Function\x20','3325689PXAKuD','version','gmtModified','1764hfIyUN','list','Update\x20a\x20Personal\x20Backend\x20Function\x20by\x20ID','Personal\x20Backend\x20Function\x20script\x20ID','--name\x20must\x20be\x20a\x20valid\x20JavaScript\x20identifier,\x20for\x20example\x20loadOrders.','name','bool','JSON\x20object\x20passed\x20to\x20the\x20Personal\x20Backend\x20Function\x20execution','Path\x20to\x20a\x20local\x20UTF-8\x20JavaScript\x20or\x20TypeScript\x20file','read','Show\x20one\x20Personal\x20Backend\x20Function\x20by\x20id','scriptType','create','utf8','updateTime','Personal\x20Backend\x20Function\x20name,\x20for\x20example\x20loadOrders','functionName','Execute\x20a\x20Personal\x20Backend\x20Function\x20by\x20ID,\x20optionally\x20with\x20JSON\x20params','keys','params','Updates\x20the\x20Personal\x20Backend\x20Function\x20script\x20or\x20metadata.\x20Later\x20calls\x20use\x20the\x20new\x20version.','verbose','216992VlaHHF','validation','file','33LhnJBj','Saves\x20the\x20local\x20script\x20as\x20a\x20Personal\x20Backend\x20Function.\x20The\x20script\x20can\x20then\x20be\x20called\x20in\x20the\x20current\x20app.','body','11210evaMtW','write','Create\x20a\x20Personal\x20Backend\x20Function\x20from\x20a\x20local\x20script\x20file','Created\x20Personal\x20Backend\x20Function\x20','update','12arPXyR','scriptContent','isArray'];a49_0xb181=function(){return _0x243447;};return a49_0xb181();}const a49_0x17947c=a49_0x3bf5;(function(_0x3ed2a9,_0x58489a){const _0x6109e3=a49_0x3bf5,_0x556863=_0x3ed2a9();while(!![]){try{const _0x54c131=-parseInt(_0x6109e3(0xc1))/0x1*(parseInt(_0x6109e3(0xd5))/0x2)+parseInt(_0x6109e3(0xdd))/0x3*(-parseInt(_0x6109e3(0x103))/0x4)+-parseInt(_0x6109e3(0xfe))/0x5*(parseInt(_0x6109e3(0xe2))/0x6)+-parseInt(_0x6109e3(0xdb))/0x7*(parseInt(_0x6109e3(0xf8))/0x8)+parseInt(_0x6109e3(0xdf))/0x9+parseInt(_0x6109e3(0xcf))/0xa*(parseInt(_0x6109e3(0xfb))/0xb)+-parseInt(_0x6109e3(0xce))/0xc*(-parseInt(_0x6109e3(0xbc))/0xd);if(_0x54c131===_0x58489a)break;else _0x556863['push'](_0x556863['shift']());}catch(_0x4c93ba){_0x556863['push'](_0x556863['shift']());}}}(a49_0xb181,0xce455));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';function a49_0x3bf5(_0x869c2e,_0x2167b9){_0x869c2e=_0x869c2e-0xba;const _0xb181ae=a49_0xb181();let _0x3bf56a=_0xb181ae[_0x869c2e];return _0x3bf56a;}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':a49_0x17947c(0xfa),'type':'string','description':a49_0x17947c(0xea)},FUNCTION_NAME_FLAG={'name':a49_0x17947c(0xe7),'type':a49_0x17947c(0xc2),'required':!![],'description':a49_0x17947c(0xf1)},DESCRIPTION_FLAG={'name':a49_0x17947c(0xbf),'type':a49_0x17947c(0xc2),'description':a49_0x17947c(0xc5)},SOURCE_SESSION_FLAG={'name':a49_0x17947c(0xcd),'type':a49_0x17947c(0xc2),'description':a49_0x17947c(0xc7)};function normalizeFunctionName(_0xe7196d){const _0x3fec46=a49_0x17947c,_0x44aa9e=String(_0xe7196d||'')[_0x3fec46(0xc0)]();if(!_0x44aa9e||!FUNCTION_NAME_PATTERN['test'](_0x44aa9e))throw CliErrors[_0x3fec46(0xf9)](_0x3fec46(0xe6));return _0x44aa9e;}function readScriptFile(_0x5051de){const _0xd78cf8=a49_0x17947c;if(!_0x5051de)throw CliErrors['validation'](_0xd78cf8(0xc9));if(!existsSync(_0x5051de))throw CliErrors['validation']('File\x20not\x20found:\x20'+_0x5051de);if(!statSync(_0x5051de)['isFile']())throw CliErrors[_0xd78cf8(0xf9)](_0xd78cf8(0xc4)+_0x5051de);const _0x3452e2=readFileSync(_0x5051de,_0xd78cf8(0xef));if(!_0x3452e2[_0xd78cf8(0xc0)]())throw CliErrors[_0xd78cf8(0xf9)]('Personal\x20Backend\x20Function\x20script\x20file\x20is\x20blank.');return _0x3452e2;}function optionalTrimmed(_0x2cef13){const _0x4e9bf1=a49_0x17947c,_0x538ddf=String(_0x2cef13||'')[_0x4e9bf1(0xc0)]();return _0x538ddf||undefined;}function summarizeBff(_0xec8218){const _0x366864=a49_0x17947c;return{'id':_0xec8218['id'],'appCode':_0xec8218['appCode'],'functionName':_0xec8218[_0x366864(0xf2)],'description':_0xec8218[_0x366864(0xbf)],'scriptType':_0xec8218[_0x366864(0xed)],'version':_0xec8218[_0x366864(0xe0)],'gmtModified':_0xec8218[_0x366864(0xe1)],'updateTime':_0xec8218[_0x366864(0xf0)]};}function detailBff(_0x2f6a3b){const _0x3a8778=a49_0x17947c;return{'id':_0x2f6a3b['id'],'appCode':_0x2f6a3b[_0x3a8778(0xc3)],'functionName':_0x2f6a3b['functionName'],'description':_0x2f6a3b[_0x3a8778(0xbf)],'scriptType':_0x2f6a3b[_0x3a8778(0xed)],'scriptContent':_0x2f6a3b[_0x3a8778(0xba)]??'','config':_0x2f6a3b[_0x3a8778(0xd4)],'version':_0x2f6a3b[_0x3a8778(0xe0)],'createUserId':_0x2f6a3b[_0x3a8778(0xbd)],'gmtCreate':_0x2f6a3b[_0x3a8778(0xcb)],'gmtModified':_0x2f6a3b['gmtModified'],'createTime':_0x2f6a3b[_0x3a8778(0xbe)],'updateTime':_0x2f6a3b[_0x3a8778(0xf0)]};}function buildCreateInput(_0x3217e0){const _0x693df3=a49_0x17947c;return{'functionName':normalizeFunctionName(_0x3217e0[_0x693df3(0xc6)](_0x693df3(0xe7))),...optionalTrimmed(_0x3217e0[_0x693df3(0xc6)](_0x693df3(0xbf)))?{'description':optionalTrimmed(_0x3217e0[_0x693df3(0xc6)](_0x693df3(0xbf)))}:{},'scriptContent':readScriptFile(_0x3217e0[_0x693df3(0xc6)]('file')),...optionalTrimmed(_0x3217e0[_0x693df3(0xc6)](_0x693df3(0xcd)))?{'sourceSessionId':optionalTrimmed(_0x3217e0[_0x693df3(0xc6)](_0x693df3(0xcd)))}:{}};}function buildUpdateInput(_0x532e19){const _0x538fe3=a49_0x17947c,_0x5398ed={};optionalTrimmed(_0x532e19[_0x538fe3(0xc6)]('name'))&&(_0x5398ed[_0x538fe3(0xf2)]=normalizeFunctionName(_0x532e19[_0x538fe3(0xc6)](_0x538fe3(0xe7))));_0x532e19[_0x538fe3(0xd9)]('description')!==undefined&&(_0x5398ed[_0x538fe3(0xbf)]=_0x532e19[_0x538fe3(0xc6)](_0x538fe3(0xbf)));optionalTrimmed(_0x532e19['str'](_0x538fe3(0xfa)))&&(_0x5398ed[_0x538fe3(0xba)]=readScriptFile(_0x532e19[_0x538fe3(0xc6)](_0x538fe3(0xfa))));_0x532e19['flag']('source-session-id')!==undefined&&(_0x5398ed['sourceSessionId']=_0x532e19[_0x538fe3(0xc6)]('source-session-id'));if(Object[_0x538fe3(0xf4)](_0x5398ed)['length']===0x0)throw CliErrors['validation'](_0x538fe3(0xc8));return _0x5398ed;}function parseExecParams(_0x38c6ae){const _0x1d9c01=a49_0x17947c,_0x273a68=parseJsonParams(_0x38c6ae)??{};if(Array[_0x1d9c01(0xbb)](_0x273a68))throw CliErrors[_0x1d9c01(0xf9)]('--params\x20must\x20be\x20a\x20JSON\x20object.');return _0x273a68;}const personalBffList={'service':a49_0x17947c(0xcc),'command':a49_0x17947c(0xe3),'description':a49_0x17947c(0xd3),'risk':a49_0x17947c(0xeb),'flags':[VERBOSE_FLAG],async 'execute'(_0x322d75){const _0xe7b487=a49_0x17947c,_0x3a14be=await listPersonalBffs(_0x322d75[_0xe7b487(0xc3)]);return{'ok':!![],'data':{'total':_0x3a14be['length'],'items':_0x322d75[_0xe7b487(0xe8)](_0xe7b487(0xf7))?_0x3a14be:_0x3a14be[_0xe7b487(0xd1)](summarizeBff)}};}},personalBffDetail={'service':'personal-bff','command':'detail','description':a49_0x17947c(0xec),'risk':a49_0x17947c(0xeb),'flags':[{...ID_FLAG,'description':'Personal\x20Backend\x20Function\x20script\x20ID'}],async 'execute'(_0x98d61f){const _0x424f7e=await getPersonalBff(_0x98d61f['num']('id'),_0x98d61f['appCode']);return{'ok':!![],'data':detailBff(_0x424f7e)};}},personalBffCreate={'service':a49_0x17947c(0xcc),'command':a49_0x17947c(0xee),'description':a49_0x17947c(0x100),'risk':'write','confirmationDescription':a49_0x17947c(0xfc),'flags':[FUNCTION_NAME_FLAG,{...FILE_FLAG,'required':!![]},DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x3ec2c7){const _0x1066ab=a49_0x17947c,_0x53454d=buildCreateInput(_0x3ec2c7),_0x38c7a9=await createPersonalBff(_0x3ec2c7['appCode'],_0x53454d);return{'ok':!![],'data':detailBff(_0x38c7a9),'message':_0x1066ab(0x101)+_0x38c7a9['id']+(_0x38c7a9['functionName']?'\x20('+_0x38c7a9['functionName']+')':'')};},async 'dryRun'(_0x4eda88){const _0x447b9e=a49_0x17947c,_0xe2103e=buildCreateInput(_0x4eda88);return dryRun('POST',_0x447b9e(0xd2))[_0x447b9e(0xfd)]({'appCode':_0x4eda88[_0x447b9e(0xc3)],..._0xe2103e})[_0x447b9e(0xbf)]('Preview:\x20create\x20Personal\x20Backend\x20Function\x20'+_0xe2103e[_0x447b9e(0xf2)])[_0x447b9e(0xd0)]();}},personalBffUpdate={'service':a49_0x17947c(0xcc),'command':a49_0x17947c(0x102),'description':a49_0x17947c(0xe4),'risk':a49_0x17947c(0xff),'confirmationDescription':a49_0x17947c(0xf6),'flags':[{...ID_FLAG,'description':a49_0x17947c(0xe5)},{...FUNCTION_NAME_FLAG,'required':![]},FILE_FLAG,DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x529627){const _0x3fcab0=a49_0x17947c,_0x18e277=_0x529627[_0x3fcab0(0xd7)]('id'),_0x4d18ca=buildUpdateInput(_0x529627),_0x412f69=await updatePersonalBff(_0x18e277,_0x529627[_0x3fcab0(0xc3)],_0x4d18ca);return{'ok':!![],'data':detailBff(_0x412f69),'message':_0x3fcab0(0xde)+_0x412f69['id']+(_0x412f69[_0x3fcab0(0xf2)]?'\x20('+_0x412f69['functionName']+')':'')};},async 'dryRun'(_0x4430d4){const _0x2b5ec7=a49_0x17947c,_0x426476=_0x4430d4['num']('id'),_0x223494=buildUpdateInput(_0x4430d4);return dryRun(_0x2b5ec7(0xdc),'/client/runtime-bff/personal/'+_0x426476+_0x2b5ec7(0xd6))[_0x2b5ec7(0xfd)]({'appCode':_0x4430d4[_0x2b5ec7(0xc3)],..._0x223494})[_0x2b5ec7(0xbf)](_0x2b5ec7(0xd8)+_0x426476)['build']();}},personalBffExec={'service':a49_0x17947c(0xcc),'command':a49_0x17947c(0xda),'description':a49_0x17947c(0xf3),'risk':a49_0x17947c(0xff),'confirmationDescription':a49_0x17947c(0xca),'flags':[{...ID_FLAG,'description':a49_0x17947c(0xe5)},{...PARAMS_FLAG,'description':a49_0x17947c(0xe9)}],async 'validate'(_0x4d4eff){const _0x5b27de=a49_0x17947c;parseExecParams(_0x4d4eff[_0x5b27de(0xc6)](_0x5b27de(0xf5)));},async 'execute'(_0x1d6dc7){const _0xa150e6=a49_0x17947c,_0x4cc531=_0x1d6dc7[_0xa150e6(0xd7)]('id'),_0x2cb726=parseExecParams(_0x1d6dc7[_0xa150e6(0xc6)](_0xa150e6(0xf5))),_0x3420eb=await executePersonalBff(_0x4cc531,_0x1d6dc7['appCode'],_0x2cb726);return{'ok':!![],'data':{'result':_0x3420eb},'message':'Executed\x20Personal\x20Backend\x20Function\x20'+_0x4cc531};}};export const personalBffDefinitions=[personalBffList,personalBffDetail,personalBffCreate,personalBffUpdate,personalBffExec];
@@ -1 +1 @@
1
- const a50_0x55ea0b=a50_0x1915;(function(_0x3923c8,_0x2abc88){const _0x59bedf=a50_0x1915,_0x5deb42=_0x3923c8();while(!![]){try{const _0x439a57=parseInt(_0x59bedf(0x1a7))/0x1*(parseInt(_0x59bedf(0x1a2))/0x2)+-parseInt(_0x59bedf(0x194))/0x3+-parseInt(_0x59bedf(0x17b))/0x4*(parseInt(_0x59bedf(0x1a5))/0x5)+-parseInt(_0x59bedf(0x176))/0x6+-parseInt(_0x59bedf(0x190))/0x7*(parseInt(_0x59bedf(0x1aa))/0x8)+parseInt(_0x59bedf(0x1a1))/0x9+parseInt(_0x59bedf(0x1ad))/0xa;if(_0x439a57===_0x2abc88)break;else _0x5deb42['push'](_0x5deb42['shift']());}catch(_0x224e5f){_0x5deb42['push'](_0x5deb42['shift']());}}}(a50_0x57d3,0xceaaf));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 a50_0x1915(_0x350c47,_0x37cfc3){_0x350c47=_0x350c47-0x170;const _0x57d3f5=a50_0x57d3();let _0x19151e=_0x57d3f5[_0x350c47];return _0x19151e;}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';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(_0x136d96){const _0xa7cace=a50_0x1915;for(const _0x3d868c of _0x136d96){definitions[_0xa7cace(0x188)](_0x3d868c['service']+':'+_0x3d868c[_0xa7cace(0x1b0)],_0x3d868c);let _0x5bee1d=serviceGroups[_0xa7cace(0x17d)](_0x3d868c[_0xa7cace(0x19b)]);!_0x5bee1d&&(_0x5bee1d=[],serviceGroups[_0xa7cace(0x188)](_0x3d868c['service'],_0x5bee1d)),_0x5bee1d[_0xa7cace(0x186)](_0x3d868c);}}function registerService(_0xc86bad,_0x29316b,_0x421be7){const _0x400743=a50_0x1915;registerDefinitions(_0x29316b);const _0x23fd26=_0x2da3e2=>_0x2da3e2==='read'?'':_0x2da3e2==='write'?_0x400743(0x1af):_0x400743(0x189),_0x3ff9de={'service':_0x29316b[0x0][_0x400743(0x19b)],'label':_0xc86bad,'commands':_0x29316b[_0x400743(0x1ac)](_0x3e7698=>({'command':_0x3e7698[_0x400743(0x1b0)],'description':_0x3e7698['description'],'tag':_0x23fd26(_0x3e7698[_0x400743(0x18a)])})),'defaultCommand':_0x421be7?.['defaultCommand']??(_0x421be7?.[_0x400743(0x1ae)]?_0x29316b[0x0][_0x400743(0x1b0)]:undefined),'isSingleCommand':_0x421be7?.['isSingleCommand']};serviceRegistry['push'](_0x3ff9de),serviceByName[_0x400743(0x188)](_0x3ff9de[_0x400743(0x19b)],_0x3ff9de);}registerService(a50_0x55ea0b(0x187),authDefinitions,{'defaultCommand':'login'}),registerService(a50_0x55ea0b(0x17a),userAccountDefinitions),registerService(a50_0x55ea0b(0x19f),appDefinitions,{'defaultCommand':a50_0x55ea0b(0x19d)}),registerService(a50_0x55ea0b(0x177),workspaceDefinitions),registerService(a50_0x55ea0b(0x1a0),appConfigDefinitions),registerService(a50_0x55ea0b(0x172),configDefinitions,{'defaultCommand':'list'}),registerService(a50_0x55ea0b(0x19c),roleDefinitions,{'defaultCommand':a50_0x55ea0b(0x19d)}),registerService('Runtime\x20Permissions',permitDefinitions),registerService(a50_0x55ea0b(0x170),apiDocDefinitions),registerService('Datasets',datasetDefinitions),registerService(a50_0x55ea0b(0x199),dataDefinitions),registerService(a50_0x55ea0b(0x193),sqlDefinitions),registerService(a50_0x55ea0b(0x178),bffDefinitions),registerService(a50_0x55ea0b(0x197),personalBffDefinitions),registerService(a50_0x55ea0b(0x18e),artifactDefinitions),registerService(a50_0x55ea0b(0x185),fileDefinitions),registerService(a50_0x55ea0b(0x19e),ocrDefinitions),registerService(a50_0x55ea0b(0x19a),kbDefinitions),registerService(a50_0x55ea0b(0x180),notificationDefinitions,{'defaultCommand':a50_0x55ea0b(0x1b1)}),registerService(a50_0x55ea0b(0x179),scheduleDefinitions,{'defaultCommand':a50_0x55ea0b(0x19d)}),registerService('Approvals',approvalDefinitions),registerService(a50_0x55ea0b(0x18f),serviceDefinitions,{'defaultCommand':'list'}),registerService(a50_0x55ea0b(0x17e),skillDefinitions,{'defaultCommand':'install'}),registerService(a50_0x55ea0b(0x17f),cliSkillDefinitions,{'defaultCommand':a50_0x55ea0b(0x171)}),registerService(a50_0x55ea0b(0x1a3),[updateDefinition],{'defaultCommand':'run','isSingleCommand':!![]}),registerService(a50_0x55ea0b(0x1ab),[doctorDefinition],{'isSingleCommand':!![]}),registerService(a50_0x55ea0b(0x195),[schemaDefinition],{'isSingleCommand':!![]}),registerService(a50_0x55ea0b(0x1b2),logsDefinitions,{'defaultCommand':a50_0x55ea0b(0x192)});export function findDefinition(_0x37e31e,_0x44a775){const _0x38815b=a50_0x55ea0b;return definitions[_0x38815b(0x17d)](_0x37e31e+':'+_0x44a775);}export function resolveRemovedCommand(_0x39855a,_0x3eb633){const _0xd5d65b=a50_0x55ea0b;if(_0x39855a===_0xd5d65b(0x1a8)&&_0x3eb633===_0xd5d65b(0x196))return{'command':_0xd5d65b(0x198),'message':_0xd5d65b(0x1a4),'hint':'Use\x20`lovrabet\x20config\x20init`\x20for\x20node\x20configuration,\x20then\x20`lovrabet\x20auth\x20login`\x20for\x20AccessKey\x20authentication.'};if(_0x39855a===_0xd5d65b(0x191)&&_0x3eb633===_0xd5d65b(0x196))return{'command':_0xd5d65b(0x175),'message':_0xd5d65b(0x18d),'hint':_0xd5d65b(0x1a9)};if(_0x39855a===_0xd5d65b(0x191)&&_0x3eb633===_0xd5d65b(0x182))return{'command':_0xd5d65b(0x174),'message':_0xd5d65b(0x173),'hint':_0xd5d65b(0x17c)};if(_0x39855a==='logs'&&_0x3eb633===_0xd5d65b(0x1a6))return{'command':_0xd5d65b(0x181),'message':_0xd5d65b(0x184),'hint':_0xd5d65b(0x183)};return undefined;}function a50_0x57d3(){const _0x641f86=['SQL\x20Queries','1507050cGXjYb','Schema','init','Personal\x20Backend\x20Function','auth\x20init','Instant\x20API','Knowledge\x20Base','service','Runtime\x20Roles','list','OCR','App\x20Management','Runtime\x20App\x20Config','13605624PdGgNZ','14wXxlKq','Self\x20Update','`lovrabet\x20auth\x20init`\x20has\x20been\x20removed.','5infgUL','clear','105739okxbDq','auth','Use\x20`lovrabet\x20workspace\x20init\x20--appcode\x20<code>`\x20instead.','1605784mpmXqr','Diagnostics','map','12970040PZIhrM','isSingleCommand','\x20\x20[write]','command','config-list','Logs','API\x20Documentation','install','Configuration','`lovrabet\x20app\x20use`\x20has\x20been\x20removed.','app\x20use','app\x20init','3735720ZGPDrN','Workspace','Backend\x20Function\x20Scripts','Agent\x20Schedules','User\x20Accounts','3901052fwdsOe','Use\x20`lovrabet\x20workspace\x20use\x20--app\x20<name>`\x20instead.','get','Skills','CLI\x20Built-in\x20Skill','Notification\x20Configs','logs\x20clear','use','Use\x20`lovrabet\x20logs\x20show`\x20to\x20view\x20command\x20history.','`lovrabet\x20logs\x20clear`\x20has\x20been\x20removed.','File','push','Authentication','set','\x20\x20[high-risk-write]','risk','from','values','`lovrabet\x20app\x20init`\x20has\x20been\x20removed.','Artifacts','Service\x20Tree','21cFTLDb','app','show'];a50_0x57d3=function(){return _0x641f86;};return a50_0x57d3();}export function isKnownService(_0x18377c){return serviceByName['has'](_0x18377c);}export function getServiceEntry(_0x50e412){return serviceByName['get'](_0x50e412);}export function getAllDefinitions(){const _0x1fce62=a50_0x55ea0b;return Array[_0x1fce62(0x18b)](definitions[_0x1fce62(0x18c)]());}
1
+ const a50_0x695283=a50_0x1b73;(function(_0x247d0e,_0xd901eb){const _0x6db76b=a50_0x1b73,_0x4b845e=_0x247d0e();while(!![]){try{const _0x25f544=-parseInt(_0x6db76b(0xfe))/0x1+parseInt(_0x6db76b(0xf2))/0x2*(parseInt(_0x6db76b(0x11d))/0x3)+parseInt(_0x6db76b(0xf5))/0x4*(-parseInt(_0x6db76b(0xf6))/0x5)+-parseInt(_0x6db76b(0xf1))/0x6+-parseInt(_0x6db76b(0xeb))/0x7*(-parseInt(_0x6db76b(0x102))/0x8)+parseInt(_0x6db76b(0x121))/0x9+parseInt(_0x6db76b(0x10f))/0xa;if(_0x25f544===_0xd901eb)break;else _0x4b845e['push'](_0x4b845e['shift']());}catch(_0x3d6b66){_0x4b845e['push'](_0x4b845e['shift']());}}}(a50_0x2b4b,0x6db03));import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{skillDefinitions}from'../commands/skill/index.js';import{cliSkillDefinitions}from'../commands/cli-skill/index.js';import{serviceDefinitions}from'../commands/service/index.js';import{updateDefinition}from'../commands/update.js';import{doctorDefinition}from'../commands/doctor.js';import{schemaDefinition}from'../commands/schema.js';import{appDefinitions}from'../commands/app/definitions.js';import{workspaceDefinitions}from'../commands/workspace/index.js';import{configDefinitions}from'../commands/config/definitions.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{dataDefinitions}from'../commands/data/index.js';import{kbDefinitions}from'../commands/kb/index.js';import{artifactDefinitions}from'../commands/artifact/index.js';import{personalBffDefinitions}from'../commands/personal-bff/index.js';import{apiDocDefinitions}from'../commands/api-doc/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';import{fileDefinitions}from'../commands/file/index.js';import{ocrDefinitions}from'../commands/ocr/index.js';import{scheduleDefinitions}from'../commands/schedule/index.js';import{approvalDefinitions}from'../commands/approval/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=[];function a50_0x1b73(_0x35e627,_0x3f07e5){_0x35e627=_0x35e627-0xe9;const _0x2b4bc6=a50_0x2b4b();let _0x1b73da=_0x2b4bc6[_0x35e627];return _0x1b73da;}const serviceByName=new Map();function a50_0x2b4b(){const _0x32d562=['Knowledge\x20Base','`lovrabet\x20logs\x20clear`\x20has\x20been\x20removed.','5223BdrxYb','description','Agent\x20Schedules','Runtime\x20App\x20Config','6625494qWulZC','\x20\x20[write]','Use\x20`lovrabet\x20logs\x20show`\x20to\x20view\x20command\x20history.','Authentication','install','Workspace','show','get','CLI\x20Built-in\x20Skill','File','Instant\x20API','Use\x20`lovrabet\x20config\x20init`\x20for\x20node\x20configuration,\x20then\x20`lovrabet\x20auth\x20login`\x20for\x20AccessKey\x20authentication.','Runtime\x20Permissions','set','20741TEDGLK','auth','Backend\x20Function\x20Scripts','Logs','logs\x20clear','Runtime\x20Roles','122370WEZoub','160lSHjfb','service','App\x20Management','4CZkWeb','2282185GwiuMF','app\x20use','auth\x20init','push','init','values','Notification\x20Configs','run','134214OgtRGB','config-list','logs','Diagnostics','232hBlMYT','`lovrabet\x20auth\x20init`\x20has\x20been\x20removed.','risk','app','Skills','Configuration','has','list','OCR','clear','Self\x20Update','API\x20Documentation','isSingleCommand','989560ClnzHs','command','Schema','`lovrabet\x20app\x20init`\x20has\x20been\x20removed.','Use\x20`lovrabet\x20workspace\x20use\x20--app\x20<name>`\x20instead.','Artifacts','from','Service\x20Tree','Datasets','defaultCommand','write','read'];a50_0x2b4b=function(){return _0x32d562;};return a50_0x2b4b();}export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x4a4e8c){const _0x2669b0=a50_0x1b73;for(const _0x4694c8 of _0x4a4e8c){definitions['set'](_0x4694c8[_0x2669b0(0xf3)]+':'+_0x4694c8[_0x2669b0(0x110)],_0x4694c8);let _0x42af6e=serviceGroups[_0x2669b0(0x128)](_0x4694c8['service']);!_0x42af6e&&(_0x42af6e=[],serviceGroups[_0x2669b0(0xea)](_0x4694c8['service'],_0x42af6e)),_0x42af6e['push'](_0x4694c8);}}function registerService(_0x3a88c2,_0x16ff65,_0x2f33cf){const _0x1e063c=a50_0x1b73;registerDefinitions(_0x16ff65);const _0x3b0570=_0x5457fc=>_0x5457fc===_0x1e063c(0x11a)?'':_0x5457fc===_0x1e063c(0x119)?_0x1e063c(0x122):'\x20\x20[high-risk-write]',_0x56bd0d={'service':_0x16ff65[0x0][_0x1e063c(0xf3)],'label':_0x3a88c2,'commands':_0x16ff65['map'](_0x4075ea=>({'command':_0x4075ea[_0x1e063c(0x110)],'description':_0x4075ea[_0x1e063c(0x11e)],'tag':_0x3b0570(_0x4075ea[_0x1e063c(0x104)])})),'defaultCommand':_0x2f33cf?.[_0x1e063c(0x118)]??(_0x2f33cf?.[_0x1e063c(0x10e)]?_0x16ff65[0x0]['command']:undefined),'isSingleCommand':_0x2f33cf?.[_0x1e063c(0x10e)]};serviceRegistry[_0x1e063c(0xf9)](_0x56bd0d),serviceByName[_0x1e063c(0xea)](_0x56bd0d[_0x1e063c(0xf3)],_0x56bd0d);}registerService(a50_0x695283(0x124),authDefinitions,{'defaultCommand':'login'}),registerService('User\x20Accounts',userAccountDefinitions),registerService(a50_0x695283(0xf4),appDefinitions,{'defaultCommand':a50_0x695283(0x109)}),registerService(a50_0x695283(0x126),workspaceDefinitions),registerService(a50_0x695283(0x120),appConfigDefinitions),registerService(a50_0x695283(0x107),configDefinitions,{'defaultCommand':a50_0x695283(0x109)}),registerService(a50_0x695283(0xf0),roleDefinitions,{'defaultCommand':a50_0x695283(0x109)}),registerService(a50_0x695283(0xe9),permitDefinitions),registerService(a50_0x695283(0x10d),apiDocDefinitions),registerService(a50_0x695283(0x117),datasetDefinitions),registerService(a50_0x695283(0x12b),dataDefinitions),registerService('SQL\x20Queries',sqlDefinitions),registerService(a50_0x695283(0xed),bffDefinitions),registerService('Personal\x20Backend\x20Function',personalBffDefinitions),registerService(a50_0x695283(0x114),artifactDefinitions),registerService(a50_0x695283(0x12a),fileDefinitions),registerService(a50_0x695283(0x10a),ocrDefinitions),registerService(a50_0x695283(0x11b),kbDefinitions),registerService(a50_0x695283(0xfc),notificationDefinitions,{'defaultCommand':a50_0x695283(0xff)}),registerService(a50_0x695283(0x11f),scheduleDefinitions,{'defaultCommand':a50_0x695283(0x109)}),registerService('Approvals',approvalDefinitions),registerService(a50_0x695283(0x116),serviceDefinitions,{'defaultCommand':a50_0x695283(0x109)}),registerService(a50_0x695283(0x106),skillDefinitions,{'defaultCommand':a50_0x695283(0x125)}),registerService(a50_0x695283(0x129),cliSkillDefinitions,{'defaultCommand':a50_0x695283(0x125)}),registerService(a50_0x695283(0x10c),[updateDefinition],{'defaultCommand':a50_0x695283(0xfd),'isSingleCommand':!![]}),registerService(a50_0x695283(0x101),[doctorDefinition],{'isSingleCommand':!![]}),registerService(a50_0x695283(0x111),[schemaDefinition],{'isSingleCommand':!![]}),registerService(a50_0x695283(0xee),logsDefinitions,{'defaultCommand':a50_0x695283(0x127)});export function findDefinition(_0x54b537,_0x2db66b){const _0x547df5=a50_0x695283;return definitions[_0x547df5(0x128)](_0x54b537+':'+_0x2db66b);}export function resolveRemovedCommand(_0x1a1c5e,_0x33ba06){const _0x2bf2d0=a50_0x695283;if(_0x1a1c5e===_0x2bf2d0(0xec)&&_0x33ba06===_0x2bf2d0(0xfa))return{'command':_0x2bf2d0(0xf8),'message':_0x2bf2d0(0x103),'hint':_0x2bf2d0(0x12c)};if(_0x1a1c5e===_0x2bf2d0(0x105)&&_0x33ba06===_0x2bf2d0(0xfa))return{'command':'app\x20init','message':_0x2bf2d0(0x112),'hint':'Use\x20`lovrabet\x20workspace\x20init\x20--appcode\x20<code>`\x20instead.'};if(_0x1a1c5e===_0x2bf2d0(0x105)&&_0x33ba06==='use')return{'command':_0x2bf2d0(0xf7),'message':'`lovrabet\x20app\x20use`\x20has\x20been\x20removed.','hint':_0x2bf2d0(0x113)};if(_0x1a1c5e===_0x2bf2d0(0x100)&&_0x33ba06===_0x2bf2d0(0x10b))return{'command':_0x2bf2d0(0xef),'message':_0x2bf2d0(0x11c),'hint':_0x2bf2d0(0x123)};return undefined;}export function isKnownService(_0x20c052){const _0x204d18=a50_0x695283;return serviceByName[_0x204d18(0x108)](_0x20c052);}export function getServiceEntry(_0x5ef74c){const _0x2f27f5=a50_0x695283;return serviceByName[_0x2f27f5(0x128)](_0x5ef74c);}export function getAllDefinitions(){const _0x29135f=a50_0x695283;return Array[_0x29135f(0x115)](definitions[_0x29135f(0xfb)]());}
@@ -1 +1 @@
1
- const a51_0x3d4ccd=a51_0x50c5;(function(_0x245dc8,_0x113010){const _0x5721bb=a51_0x50c5,_0x1c52b6=_0x245dc8();while(!![]){try{const _0x5a3a89=parseInt(_0x5721bb(0x1f7))/0x1*(-parseInt(_0x5721bb(0x1f1))/0x2)+-parseInt(_0x5721bb(0x1eb))/0x3*(parseInt(_0x5721bb(0x1fb))/0x4)+parseInt(_0x5721bb(0x1f0))/0x5+parseInt(_0x5721bb(0x200))/0x6+-parseInt(_0x5721bb(0x1f2))/0x7*(parseInt(_0x5721bb(0x1fd))/0x8)+-parseInt(_0x5721bb(0x1f6))/0x9*(-parseInt(_0x5721bb(0x202))/0xa)+parseInt(_0x5721bb(0x1f9))/0xb;if(_0x5a3a89===_0x113010)break;else _0x1c52b6['push'](_0x1c52b6['shift']());}catch(_0x22dd29){_0x1c52b6['push'](_0x1c52b6['shift']());}}}(a51_0x108d,0x457ef));import{createRuntimeAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';function a51_0x50c5(_0x189cf4,_0x3000b3){_0x189cf4=_0x189cf4-0x1eb;const _0x108dcd=a51_0x108d();let _0x50c578=_0x108dcd[_0x189cf4];return _0x50c578;}import{projectRuntimeRole,readOptionalRuntimeRoleCode,ROLE_CODE_FLAG,runtimeRoleWriteResult}from'../../commands/role/shared.js';function input(_0x4fa3df){const _0x1b9458=a51_0x50c5,_0x52c6b5=_0x4fa3df[_0x1b9458(0x1ff)]('name')[_0x1b9458(0x1ed)]();if(!_0x52c6b5)throw CliErrors[_0x1b9458(0x1f3)](_0x1b9458(0x1f5));const _0x342675=_0x4fa3df[_0x1b9458(0x1ff)]('remark')[_0x1b9458(0x1ed)](),_0x4be7da=readOptionalRuntimeRoleCode(_0x4fa3df);return{'appCode':_0x4fa3df[_0x1b9458(0x1ec)],'roleName':_0x52c6b5,..._0x4be7da?{'roleCode':_0x4be7da}:{},..._0x342675?{'remark':_0x342675}:{}};}function a51_0x108d(){const _0x423531=['1927046OsxWSh','POST','234776wXNoxI','string','8DJmNBJ','remark','str','1637970mcFkAl','high-risk-write','602240HfivKa','Create\x20a\x20runtime\x20CUSTOM\x20role','15jqAYcI','appCode','trim','Optional\x20role\x20remark','Preview:\x20create\x20a\x20runtime\x20CUSTOM\x20role','2425365zMVIqi','32428Spigat','799659FPYOso','validation','/client/permit/role/create','--name\x20must\x20not\x20be\x20blank.','27LKhPDT','26IOnZYq','create'];a51_0x108d=function(){return _0x423531;};return a51_0x108d();}export const roleCreate={'service':'role','command':'create','description':a51_0x3d4ccd(0x203),'risk':a51_0x3d4ccd(0x201),'confirmationDescription':'Creates\x20a\x20custom\x20role\x20in\x20the\x20current\x20runtime\x20app.\x20After\x20creation\x20it\x20can\x20be\x20used\x20for\x20member\x20and\x20resource\x20permissions.','flags':[{'name':'name','type':a51_0x3d4ccd(0x1fc),'required':!![],'description':'Role\x20name'},ROLE_CODE_FLAG,{'name':a51_0x3d4ccd(0x1fe),'type':a51_0x3d4ccd(0x1fc),'description':a51_0x3d4ccd(0x1ee)}],async 'validate'(_0x4e08c2){input(_0x4e08c2);},async 'dryRun'(_0x461326){const _0x269fcc=a51_0x3d4ccd;return dryRun(_0x269fcc(0x1fa),_0x269fcc(0x1f4))['body']({'roleType':'CUSTOM',...input(_0x461326)})['description'](_0x269fcc(0x1ef))['build']();},async 'execute'(_0x592a8e){const _0x3a2520=a51_0x3d4ccd,_0x402d55=await createRuntimeAppRole(input(_0x592a8e));return{'ok':!![],'data':runtimeRoleWriteResult(_0x3a2520(0x1f8),{'roleId':_0x402d55['id']},null,projectRuntimeRole(_0x402d55),{'method':_0x3a2520(0x1fa),'path':'/client/permit/role/create'})};}};
1
+ const a51_0x356c33=a51_0x19b9;(function(_0x476da7,_0x23152b){const _0x532c29=a51_0x19b9,_0x557c4d=_0x476da7();while(!![]){try{const _0x2c2ae3=-parseInt(_0x532c29(0xfc))/0x1+-parseInt(_0x532c29(0x103))/0x2*(-parseInt(_0x532c29(0x100))/0x3)+parseInt(_0x532c29(0xff))/0x4+-parseInt(_0x532c29(0xf6))/0x5*(-parseInt(_0x532c29(0x107))/0x6)+-parseInt(_0x532c29(0x102))/0x7*(-parseInt(_0x532c29(0x109))/0x8)+parseInt(_0x532c29(0xfd))/0x9+-parseInt(_0x532c29(0x105))/0xa;if(_0x2c2ae3===_0x23152b)break;else _0x557c4d['push'](_0x557c4d['shift']());}catch(_0x66269f){_0x557c4d['push'](_0x557c4d['shift']());}}}(a51_0x3c91,0xcdc04));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 a51_0x3c91(){const _0x26831=['7bSraeF','118iOYCiB','--name\x20must\x20not\x20be\x20blank.','36925360ncEBGa','build','5988NlsIeP','role','7094744tVIJYR','validation','Creates\x20a\x20custom\x20role\x20in\x20the\x20current\x20runtime\x20app.\x20After\x20creation\x20it\x20can\x20be\x20used\x20for\x20member\x20and\x20resource\x20permissions.','high-risk-write','create','string','Optional\x20role\x20remark','description','trim','Preview:\x20create\x20a\x20runtime\x20CUSTOM\x20role','380wFyoTd','POST','remark','str','Create\x20a\x20runtime\x20CUSTOM\x20role','/client/permit/role/create','61923RRqnYL','15085620TIotnp','Role\x20name','5921304WGlCil','24306ScBsOb','name'];a51_0x3c91=function(){return _0x26831;};return a51_0x3c91();}function input(_0x5a6625){const _0x500134=a51_0x19b9,_0x47b490=_0x5a6625[_0x500134(0xf9)](_0x500134(0x101))[_0x500134(0xf4)]();if(!_0x47b490)throw CliErrors[_0x500134(0x10a)](_0x500134(0x104));const _0x1b31fa=_0x5a6625[_0x500134(0xf9)](_0x500134(0xf8))[_0x500134(0xf4)](),_0x30045c=readOptionalRuntimeRoleCode(_0x5a6625);return{'appCode':_0x5a6625['appCode'],'roleName':_0x47b490,..._0x30045c?{'roleCode':_0x30045c}:{},..._0x1b31fa?{'remark':_0x1b31fa}:{}};}function a51_0x19b9(_0x41bf45,_0x2bb776){_0x41bf45=_0x41bf45-0xf2;const _0x3c91c5=a51_0x3c91();let _0x19b91f=_0x3c91c5[_0x41bf45];return _0x19b91f;}export const roleCreate={'service':a51_0x356c33(0x108),'command':a51_0x356c33(0x10d),'description':a51_0x356c33(0xfa),'risk':a51_0x356c33(0x10c),'confirmationDescription':a51_0x356c33(0x10b),'flags':[{'name':a51_0x356c33(0x101),'type':a51_0x356c33(0x10e),'required':!![],'description':a51_0x356c33(0xfe)},ROLE_CODE_FLAG,{'name':a51_0x356c33(0xf8),'type':a51_0x356c33(0x10e),'description':a51_0x356c33(0xf2)}],async 'validate'(_0x1ffb44){input(_0x1ffb44);},async 'dryRun'(_0x275a16){const _0x3ea293=a51_0x356c33;return dryRun('POST',_0x3ea293(0xfb))['body']({'roleType':'CUSTOM',...input(_0x275a16)})[_0x3ea293(0xf3)](_0x3ea293(0xf5))[_0x3ea293(0x106)]();},async 'execute'(_0x3e3711){const _0x248ec5=a51_0x356c33,_0x5eb25c=await createRuntimeAppRole(input(_0x3e3711));return{'ok':!![],'data':runtimeRoleWriteResult(_0x248ec5(0x10d),{'roleId':_0x5eb25c['id']},null,projectRuntimeRole(_0x5eb25c),{'method':_0x248ec5(0xf7),'path':_0x248ec5(0xfb)})};}};
@@ -1 +1 @@
1
- const a52_0x30f21a=a52_0x4d7d;(function(_0x18ee9e,_0x27fe42){const _0x55d9b6=a52_0x4d7d,_0x265c8=_0x18ee9e();while(!![]){try{const _0x57a74b=parseInt(_0x55d9b6(0xae))/0x1+parseInt(_0x55d9b6(0xb7))/0x2+parseInt(_0x55d9b6(0xb3))/0x3*(-parseInt(_0x55d9b6(0xb8))/0x4)+-parseInt(_0x55d9b6(0xa8))/0x5+-parseInt(_0x55d9b6(0xb6))/0x6*(parseInt(_0x55d9b6(0xac))/0x7)+-parseInt(_0x55d9b6(0xa4))/0x8*(parseInt(_0x55d9b6(0xb2))/0x9)+parseInt(_0x55d9b6(0xa5))/0xa;if(_0x57a74b===_0x27fe42)break;else _0x265c8['push'](_0x265c8['shift']());}catch(_0x48cf14){_0x265c8['push'](_0x265c8['shift']());}}}(a52_0x10c8,0x9c174));function a52_0x4d7d(_0x16cc35,_0x1c643a){_0x16cc35=_0x16cc35-0xa4;const _0x10c88a=a52_0x10c8();let _0x4d7d9a=_0x10c88a[_0x16cc35];return _0x4d7d9a;}function a52_0x10c8(){const _0x255f2f=['num','delete','1314295nCpwPs','/client/permit/role/delete','Delete\x20a\x20runtime\x20CUSTOM\x20role','role','4389dTLxFl','description','623578bestvM','POST','build','body','3782421xOavtk','129321WcVCBU','Deletes\x20the\x20custom\x20role\x20in\x20the\x20current\x20runtime\x20app.\x20Membership\x20and\x20permission\x20config\x20for\x20that\x20role\x20may\x20become\x20invalid.','high-risk-write','11184DSkqJk','1613058VtCXmT','4nJNLui','24fGRwcM','19447420cSWLvk'];a52_0x10c8=function(){return _0x255f2f;};return a52_0x10c8();}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(_0x5e15fe){const _0x509897=a52_0x4d7d,_0x58e6a0=await getRuntimeRoleById(_0x5e15fe['appCode'],_0x5e15fe[_0x509897(0xa6)]('id'));return assertCustomRuntimeRole(_0x58e6a0,'delete'),_0x58e6a0;}export const roleDelete={'service':a52_0x30f21a(0xab),'command':a52_0x30f21a(0xa7),'description':a52_0x30f21a(0xaa),'risk':a52_0x30f21a(0xb5),'confirmationDescription':a52_0x30f21a(0xb4),'flags':[ROLE_ID_FLAG],async 'dryRun'(_0x4b9ba5){const _0x369756=a52_0x30f21a,_0xfbe470=await prepare(_0x4b9ba5);return dryRun(_0x369756(0xaf),_0x369756(0xa9))[_0x369756(0xb1)]({'id':_0xfbe470['id']})[_0x369756(0xad)]('Preview:\x20delete\x20a\x20runtime\x20CUSTOM\x20role')[_0x369756(0xb0)]();},async 'execute'(_0xcb5e3d){const _0x3cddeb=a52_0x30f21a,_0x16203f=await prepare(_0xcb5e3d);return await deleteRuntimeAppRole(_0x16203f['id']),{'ok':!![],'data':runtimeRoleWriteResult(_0x3cddeb(0xa7),{'roleId':_0x16203f['id']},projectRuntimeRole(_0x16203f),null,{'method':_0x3cddeb(0xaf),'path':_0x3cddeb(0xa9)})};}};
1
+ function a52_0x1729(){const _0x4ef8e5=['6628bIkhlL','num','build','delete','body','Deletes\x20the\x20custom\x20role\x20in\x20the\x20current\x20runtime\x20app.\x20Membership\x20and\x20permission\x20config\x20for\x20that\x20role\x20may\x20become\x20invalid.','description','/client/permit/role/delete','3952234GtgLxd','POST','3895488tMRXwH','50YCzpmD','high-risk-write','1745jHAcwX','425457nNdgUl','476eJsWFI','1oQBpTB','appCode','111446iSbiOx','3390dHtFbf','1843524dMVHnn'];a52_0x1729=function(){return _0x4ef8e5;};return a52_0x1729();}const a52_0x31e075=a52_0x32e8;(function(_0x528ca9,_0x466b5a){const _0xa8ce4=a52_0x32e8,_0x22e89e=_0x528ca9();while(!![]){try{const _0x343dad=parseInt(_0xa8ce4(0x122))/0x1*(parseInt(_0xa8ce4(0x124))/0x2)+-parseInt(_0xa8ce4(0x120))/0x3+-parseInt(_0xa8ce4(0x127))/0x4*(parseInt(_0xa8ce4(0x11f))/0x5)+-parseInt(_0xa8ce4(0x125))/0x6*(parseInt(_0xa8ce4(0x121))/0x7)+-parseInt(_0xa8ce4(0x11c))/0x8+-parseInt(_0xa8ce4(0x126))/0x9+-parseInt(_0xa8ce4(0x11d))/0xa*(-parseInt(_0xa8ce4(0x11a))/0xb);if(_0x343dad===_0x466b5a)break;else _0x22e89e['push'](_0x22e89e['shift']());}catch(_0x3f9b27){_0x22e89e['push'](_0x22e89e['shift']());}}}(a52_0x1729,0x621e1));function a52_0x32e8(_0x1b36aa,_0x4a7708){_0x1b36aa=_0x1b36aa-0x119;const _0x172951=a52_0x1729();let _0x32e8c4=_0x172951[_0x1b36aa];return _0x32e8c4;}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(_0x30649c){const _0x500bef=a52_0x32e8,_0x18507e=await getRuntimeRoleById(_0x30649c[_0x500bef(0x123)],_0x30649c[_0x500bef(0x128)]('id'));return assertCustomRuntimeRole(_0x18507e,_0x500bef(0x12a)),_0x18507e;}export const roleDelete={'service':'role','command':a52_0x31e075(0x12a),'description':'Delete\x20a\x20runtime\x20CUSTOM\x20role','risk':a52_0x31e075(0x11e),'confirmationDescription':a52_0x31e075(0x12c),'flags':[ROLE_ID_FLAG],async 'dryRun'(_0x50ed2e){const _0x41e226=a52_0x31e075,_0x32b3cb=await prepare(_0x50ed2e);return dryRun('POST','/client/permit/role/delete')[_0x41e226(0x12b)]({'id':_0x32b3cb['id']})[_0x41e226(0x12d)]('Preview:\x20delete\x20a\x20runtime\x20CUSTOM\x20role')[_0x41e226(0x129)]();},async 'execute'(_0x4f25fb){const _0xac0f27=a52_0x31e075,_0x22ecd5=await prepare(_0x4f25fb);return await deleteRuntimeAppRole(_0x22ecd5['id']),{'ok':!![],'data':runtimeRoleWriteResult(_0xac0f27(0x12a),{'roleId':_0x22ecd5['id']},projectRuntimeRole(_0x22ecd5),null,{'method':_0xac0f27(0x11b),'path':_0xac0f27(0x119)})};}};
@@ -1 +1 @@
1
- const a53_0x3512c7=a53_0x1511;(function(_0x1469a2,_0x537c5f){const _0x457b7d=a53_0x1511,_0x10a3c7=_0x1469a2();while(!![]){try{const _0x402f43=parseInt(_0x457b7d(0x1d5))/0x1+parseInt(_0x457b7d(0x1de))/0x2*(parseInt(_0x457b7d(0x1cf))/0x3)+-parseInt(_0x457b7d(0x1d1))/0x4+parseInt(_0x457b7d(0x1dd))/0x5*(-parseInt(_0x457b7d(0x1df))/0x6)+-parseInt(_0x457b7d(0x1d9))/0x7*(parseInt(_0x457b7d(0x1d2))/0x8)+-parseInt(_0x457b7d(0x1e0))/0x9+parseInt(_0x457b7d(0x1d4))/0xa*(parseInt(_0x457b7d(0x1d0))/0xb);if(_0x402f43===_0x537c5f)break;else _0x10a3c7['push'](_0x10a3c7['shift']());}catch(_0x2eb8fd){_0x10a3c7['push'](_0x10a3c7['shift']());}}}(a53_0x2702,0xd8f91));function a53_0x2702(){const _0x550cc6=['24834EEghaP','14891697GEVNHu','3284052zcWNUv','582043WIJNUw','4266680HqTLsD','7519696PBbKqR','read','820uLUShS','254661Xvsmwx','appCode','Show\x20one\x20runtime\x20role\x20by\x20ID','num','7NxyEJC','detail','runtime','role','1375qiXzae','2rakdwY'];a53_0x2702=function(){return _0x550cc6;};return a53_0x2702();}import{getRuntimeRoleById,projectRuntimeRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';function a53_0x1511(_0x2ecf9e,_0x3897ea){_0x2ecf9e=_0x2ecf9e-0x1cf;const _0x2702c6=a53_0x2702();let _0x1511d4=_0x2702c6[_0x2ecf9e];return _0x1511d4;}export const roleDetail={'service':a53_0x3512c7(0x1dc),'command':a53_0x3512c7(0x1da),'description':a53_0x3512c7(0x1d7),'risk':a53_0x3512c7(0x1d3),'flags':[ROLE_ID_FLAG],async 'execute'(_0x203e7c){const _0x510569=a53_0x3512c7,_0x448a19=await getRuntimeRoleById(_0x203e7c[_0x510569(0x1d6)],_0x203e7c[_0x510569(0x1d8)]('id'));return{'ok':!![],'data':{'scope':_0x510569(0x1db),'role':projectRuntimeRole(_0x448a19)}};}};
1
+ const a53_0x3e4e0c=a53_0x5ce6;(function(_0x29c4d2,_0x597593){const _0x2958fe=a53_0x5ce6,_0xc20090=_0x29c4d2();while(!![]){try{const _0x59708e=-parseInt(_0x2958fe(0x142))/0x1*(parseInt(_0x2958fe(0x14f))/0x2)+-parseInt(_0x2958fe(0x143))/0x3*(parseInt(_0x2958fe(0x14a))/0x4)+parseInt(_0x2958fe(0x150))/0x5*(-parseInt(_0x2958fe(0x145))/0x6)+-parseInt(_0x2958fe(0x147))/0x7+parseInt(_0x2958fe(0x148))/0x8+parseInt(_0x2958fe(0x149))/0x9+-parseInt(_0x2958fe(0x14d))/0xa*(-parseInt(_0x2958fe(0x146))/0xb);if(_0x59708e===_0x597593)break;else _0xc20090['push'](_0xc20090['shift']());}catch(_0x3318ee){_0xc20090['push'](_0xc20090['shift']());}}}(a53_0x5097,0x76eca));function a53_0x5097(){const _0x49be8b=['4830905jNqkTv','3877fwPcmH','183efwcKK','detail','6pfsjcn','945901xuwtdb','5116174FRipSH','7326120hByjKP','5938398aWbzxU','39772DijEGc','role','Show\x20one\x20runtime\x20role\x20by\x20ID','190cQXfhz','appCode','216UOnojX'];a53_0x5097=function(){return _0x49be8b;};return a53_0x5097();}function a53_0x5ce6(_0x4a37e3,_0x279a48){_0x4a37e3=_0x4a37e3-0x142;const _0x509707=a53_0x5097();let _0x5ce626=_0x509707[_0x4a37e3];return _0x5ce626;}import{getRuntimeRoleById,projectRuntimeRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';export const roleDetail={'service':a53_0x3e4e0c(0x14b),'command':a53_0x3e4e0c(0x144),'description':a53_0x3e4e0c(0x14c),'risk':'read','flags':[ROLE_ID_FLAG],async 'execute'(_0x52f5e1){const _0x16cb32=a53_0x3e4e0c,_0x4d32f9=await getRuntimeRoleById(_0x52f5e1[_0x16cb32(0x14e)],_0x52f5e1['num']('id'));return{'ok':!![],'data':{'scope':'runtime','role':projectRuntimeRole(_0x4d32f9)}};}};
@@ -1 +1 @@
1
- (function(_0xd9e1e4,_0xa501e2){const _0xa4098c=a54_0x26f7,_0x49d9f6=_0xd9e1e4();while(!![]){try{const _0xba2935=parseInt(_0xa4098c(0x109))/0x1*(parseInt(_0xa4098c(0x104))/0x2)+parseInt(_0xa4098c(0x105))/0x3+parseInt(_0xa4098c(0x108))/0x4+-parseInt(_0xa4098c(0x10a))/0x5*(parseInt(_0xa4098c(0x106))/0x6)+parseInt(_0xa4098c(0x102))/0x7+-parseInt(_0xa4098c(0x10c))/0x8*(-parseInt(_0xa4098c(0x103))/0x9)+parseInt(_0xa4098c(0x10b))/0xa*(-parseInt(_0xa4098c(0x107))/0xb);if(_0xba2935===_0xa501e2)break;else _0x49d9f6['push'](_0x49d9f6['shift']());}catch(_0x545583){_0x49d9f6['push'](_0x49d9f6['shift']());}}}(a54_0x58e3,0xf28a6));import{roleList}from'../../commands/role/list.js';function a54_0x58e3(){const _0x18de58=['4627416ToiWxx','3WKBuWJ','15085RECpNv','10lnLKLH','3164472IkprvV','8175762VKcrLj','27SuXgNL','360682XIbbGU','5931705aMnVkM','3318HgLGoJ','37046988SqxwHS'];a54_0x58e3=function(){return _0x18de58;};return a54_0x58e3();}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 a54_0x26f7(_0x4591ba,_0x57d01b){_0x4591ba=_0x4591ba-0x102;const _0x58e32e=a54_0x58e3();let _0x26f7da=_0x58e32e[_0x4591ba];return _0x26f7da;}import{roleUserRemove}from'../../commands/role/user-remove.js';export const roleDefinitions=[roleList,roleDetail,roleCreate,roleUpdate,roleDelete,roleUserAdd,roleUserRemove];
1
+ (function(_0x207c9c,_0x267a1c){const _0x1386c7=a54_0x4f1e,_0x459e25=_0x207c9c();while(!![]){try{const _0x5aeb9b=parseInt(_0x1386c7(0x1f3))/0x1*(parseInt(_0x1386c7(0x1ef))/0x2)+parseInt(_0x1386c7(0x1f1))/0x3*(-parseInt(_0x1386c7(0x1f8))/0x4)+parseInt(_0x1386c7(0x1f6))/0x5+-parseInt(_0x1386c7(0x1f2))/0x6*(parseInt(_0x1386c7(0x1f0))/0x7)+parseInt(_0x1386c7(0x1fa))/0x8*(parseInt(_0x1386c7(0x1f5))/0x9)+parseInt(_0x1386c7(0x1f9))/0xa*(parseInt(_0x1386c7(0x1f7))/0xb)+-parseInt(_0x1386c7(0x1fb))/0xc*(parseInt(_0x1386c7(0x1f4))/0xd);if(_0x5aeb9b===_0x267a1c)break;else _0x459e25['push'](_0x459e25['shift']());}catch(_0x559ee1){_0x459e25['push'](_0x459e25['shift']());}}}(a54_0x3b27,0xcfdde));import{roleList}from'../../commands/role/list.js';function a54_0x3b27(){const _0x4b6d84=['24bXmdDA','2220006djwTqp','8289946OPWYWB','3csehUa','6raHHfW','1xJAjcX','153907rIoVRE','9uKrkkv','2001530SPWUtb','222013mnOPzf','4001148rnjlad','430zXzQCf','5451896LskXRx'];a54_0x3b27=function(){return _0x4b6d84;};return a54_0x3b27();}import{roleDetail}from'../../commands/role/detail.js';import{roleCreate}from'../../commands/role/create.js';import{roleUpdate}from'../../commands/role/update.js';function a54_0x4f1e(_0x1a2708,_0xed5c7a){_0x1a2708=_0x1a2708-0x1ef;const _0x3b27b3=a54_0x3b27();let _0x4f1eca=_0x3b27b3[_0x1a2708];return _0x4f1eca;}import{roleDelete}from'../../commands/role/delete.js';import{roleUserAdd}from'../../commands/role/user-add.js';import{roleUserRemove}from'../../commands/role/user-remove.js';export const roleDefinitions=[roleList,roleDetail,roleCreate,roleUpdate,roleDelete,roleUserAdd,roleUserRemove];
@@ -1 +1 @@
1
- const a55_0x33df60=a55_0x5ab1;(function(_0x584e86,_0x4d685f){const _0x2376f8=a55_0x5ab1,_0x34f495=_0x584e86();while(!![]){try{const _0x1bca15=parseInt(_0x2376f8(0x85))/0x1+-parseInt(_0x2376f8(0x71))/0x2+parseInt(_0x2376f8(0x72))/0x3+parseInt(_0x2376f8(0x7e))/0x4*(parseInt(_0x2376f8(0x88))/0x5)+parseInt(_0x2376f8(0x7f))/0x6+parseInt(_0x2376f8(0x7b))/0x7+-parseInt(_0x2376f8(0x8b))/0x8;if(_0x1bca15===_0x4d685f)break;else _0x34f495['push'](_0x34f495['shift']());}catch(_0x539f96){_0x34f495['push'](_0x34f495['shift']());}}}(a55_0x491c,0x76288));function a55_0x5ab1(_0x5f1052,_0x2c8e5b){_0x5f1052=_0x5f1052-0x71;const _0x491ce5=a55_0x491c();let _0x5ab14c=_0x491ce5[_0x5f1052];return _0x5ab14c;}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':'role','command':'list','description':'List\x20runtime\x20roles\x20for\x20the\x20current\x20app','risk':'read','flags':[{'name':'type','type':'string','enum':RUNTIME_ROLE_TYPES,'description':a55_0x33df60(0x87)},{'name':a55_0x33df60(0x75),'type':'string','description':a55_0x33df60(0x7c)},{'name':a55_0x33df60(0x8a),'type':a55_0x33df60(0x76),'default':0x1,'description':a55_0x33df60(0x82)},{'name':a55_0x33df60(0x83),'type':a55_0x33df60(0x76),'default':0x64,'description':a55_0x33df60(0x81)}],async 'validate'(_0x18ca8f){const _0x5891db=a55_0x33df60,_0x11c03f=_0x18ca8f[_0x5891db(0x7a)](_0x5891db(0x7d))[_0x5891db(0x74)]();if(_0x11c03f&&!RUNTIME_ROLE_TYPES[_0x5891db(0x91)](_0x11c03f))throw CliErrors[_0x5891db(0x79)](_0x5891db(0x8f)+_0x11c03f+'.');const _0x58d057=_0x18ca8f['num'](_0x5891db(0x8a),0x1),_0x4ac8bb=_0x18ca8f['num']('pagesize',0x64);if(!Number[_0x5891db(0x73)](_0x58d057)||_0x58d057<0x1)throw CliErrors[_0x5891db(0x79)](_0x5891db(0x90));if(!Number[_0x5891db(0x73)](_0x4ac8bb)||_0x4ac8bb<0x1||_0x4ac8bb>0x64)throw CliErrors[_0x5891db(0x79)](_0x5891db(0x8e));},async 'execute'(_0x242adf){const _0x252563=a55_0x33df60,_0x47ed27=_0x242adf['str'](_0x252563(0x7d))[_0x252563(0x74)](),_0x297303=_0x242adf[_0x252563(0x7a)](_0x252563(0x75))['trim'](),_0xf8a294=_0x242adf[_0x252563(0x78)](_0x252563(0x8a),0x1),_0x4d24b5=_0x242adf['num']('pagesize',0x64);if(_0x47ed27){const _0xc10c63=(await listAllRuntimeRoles(_0x242adf[_0x252563(0x77)],{..._0x297303?{'roleName':_0x297303}:{}}))[_0x252563(0x86)](_0x23f219=>_0x23f219[_0x252563(0x8c)]===_0x47ed27),_0x3a1483=(_0xf8a294-0x1)*_0x4d24b5;return{'ok':!![],'data':{'scope':_0x252563(0x89),'roles':_0xc10c63[_0x252563(0x8d)](_0x3a1483,_0x3a1483+_0x4d24b5)[_0x252563(0x84)](projectRuntimeRole),'paging':{'currentPage':_0xf8a294,'pageSize':_0x4d24b5,'totalCount':_0xc10c63['length']}}};}const _0x458dcf=await listRuntimeAppRoles(_0x242adf[_0x252563(0x77)],{..._0x297303?{'roleName':_0x297303}:{},'currentPage':_0xf8a294,'pageSize':_0x4d24b5});return{'ok':!![],'data':{'scope':_0x252563(0x89),'roles':_0x458dcf[_0x252563(0x80)][_0x252563(0x84)](projectRuntimeRole),'paging':_0x458dcf['paging']}};}};function a55_0x491c(){const _0xdb944f=['items','Page\x20size\x20from\x201\x20to\x20100','Page\x20number','pagesize','map','806474QLQdko','filter','Runtime\x20role\x20type','5IAwOgr','runtime','page','15598872bfoVxW','roleType','slice','--pagesize\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.','Invalid\x20runtime\x20role\x20type:\x20','--page\x20must\x20be\x20a\x20positive\x20integer.','includes','559422GfGonl','1726236rFJIBe','isSafeInteger','toUpperCase','name','number','appCode','num','validation','str','2237508UpeQBT','Fuzzy\x20role-name\x20filter','type','3169780JEaVMf','1317426tQoqqq'];a55_0x491c=function(){return _0xdb944f;};return a55_0x491c();}
1
+ function a55_0x2f87(){const _0x3cbcbc=['validation','page','Page\x20size\x20from\x201\x20to\x20100','1071076FrZEWv','role','number','trim','Page\x20number','string','Runtime\x20role\x20type','15530kGiBPC','appCode','runtime','toUpperCase','Fuzzy\x20role-name\x20filter','1610632oPvccP','map','3978216HzhSmt','length','isSafeInteger','Invalid\x20runtime\x20role\x20type:\x20','14uQxUHS','num','read','name','str','552fxnsaN','10403530IJalNM','items','400945vlkHMT','27204fErycj','type','56BEycOK','pagesize'];a55_0x2f87=function(){return _0x3cbcbc;};return a55_0x2f87();}const a55_0x1e427d=a55_0x4001;(function(_0x5b2740,_0x1e542e){const _0x230512=a55_0x4001,_0x10344f=_0x5b2740();while(!![]){try{const _0x5d47d7=parseInt(_0x230512(0x1a7))/0x1+parseInt(_0x230512(0x1af))/0x2+parseInt(_0x230512(0x1a8))/0x3*(parseInt(_0x230512(0x1aa))/0x4)+parseInt(_0x230512(0x194))/0x5*(parseInt(_0x230512(0x1a4))/0x6)+parseInt(_0x230512(0x19f))/0x7*(parseInt(_0x230512(0x199))/0x8)+-parseInt(_0x230512(0x19b))/0x9+-parseInt(_0x230512(0x1a5))/0xa;if(_0x5d47d7===_0x1e542e)break;else _0x10344f['push'](_0x10344f['shift']());}catch(_0x16b741){_0x10344f['push'](_0x10344f['shift']());}}}(a55_0x2f87,0x41c9c));function a55_0x4001(_0x23260c,_0x413ba3){_0x23260c=_0x23260c-0x194;const _0x2f87e4=a55_0x2f87();let _0x4001cc=_0x2f87e4[_0x23260c];return _0x4001cc;}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':a55_0x1e427d(0x1b0),'command':'list','description':'List\x20runtime\x20roles\x20for\x20the\x20current\x20app','risk':a55_0x1e427d(0x1a1),'flags':[{'name':a55_0x1e427d(0x1a9),'type':'string','enum':RUNTIME_ROLE_TYPES,'description':a55_0x1e427d(0x1b5)},{'name':a55_0x1e427d(0x1a2),'type':a55_0x1e427d(0x1b4),'description':a55_0x1e427d(0x198)},{'name':a55_0x1e427d(0x1ad),'type':a55_0x1e427d(0x1b1),'default':0x1,'description':a55_0x1e427d(0x1b3)},{'name':'pagesize','type':a55_0x1e427d(0x1b1),'default':0x64,'description':a55_0x1e427d(0x1ae)}],async 'validate'(_0x32f6ac){const _0x31e551=a55_0x1e427d,_0x5c699a=_0x32f6ac['str'](_0x31e551(0x1a9))[_0x31e551(0x197)]();if(_0x5c699a&&!RUNTIME_ROLE_TYPES['includes'](_0x5c699a))throw CliErrors[_0x31e551(0x1ac)](_0x31e551(0x19e)+_0x5c699a+'.');const _0xf1cc2e=_0x32f6ac[_0x31e551(0x1a0)](_0x31e551(0x1ad),0x1),_0x2a66fa=_0x32f6ac[_0x31e551(0x1a0)]('pagesize',0x64);if(!Number[_0x31e551(0x19d)](_0xf1cc2e)||_0xf1cc2e<0x1)throw CliErrors['validation']('--page\x20must\x20be\x20a\x20positive\x20integer.');if(!Number[_0x31e551(0x19d)](_0x2a66fa)||_0x2a66fa<0x1||_0x2a66fa>0x64)throw CliErrors['validation']('--pagesize\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.');},async 'execute'(_0x2ece22){const _0x550e6a=a55_0x1e427d,_0xecd4d9=_0x2ece22[_0x550e6a(0x1a3)](_0x550e6a(0x1a9))[_0x550e6a(0x197)](),_0x32579e=_0x2ece22[_0x550e6a(0x1a3)](_0x550e6a(0x1a2))[_0x550e6a(0x1b2)](),_0x9b5c5a=_0x2ece22[_0x550e6a(0x1a0)]('page',0x1),_0x238082=_0x2ece22[_0x550e6a(0x1a0)](_0x550e6a(0x1ab),0x64);if(_0xecd4d9){const _0x2e8eed=(await listAllRuntimeRoles(_0x2ece22[_0x550e6a(0x195)],{..._0x32579e?{'roleName':_0x32579e}:{}}))['filter'](_0x2bb2c8=>_0x2bb2c8['roleType']===_0xecd4d9),_0x226324=(_0x9b5c5a-0x1)*_0x238082;return{'ok':!![],'data':{'scope':_0x550e6a(0x196),'roles':_0x2e8eed['slice'](_0x226324,_0x226324+_0x238082)[_0x550e6a(0x19a)](projectRuntimeRole),'paging':{'currentPage':_0x9b5c5a,'pageSize':_0x238082,'totalCount':_0x2e8eed[_0x550e6a(0x19c)]}}};}const _0xa4d884=await listRuntimeAppRoles(_0x2ece22[_0x550e6a(0x195)],{..._0x32579e?{'roleName':_0x32579e}:{},'currentPage':_0x9b5c5a,'pageSize':_0x238082});return{'ok':!![],'data':{'scope':_0x550e6a(0x196),'roles':_0xa4d884[_0x550e6a(0x1a6)][_0x550e6a(0x19a)](projectRuntimeRole),'paging':_0xa4d884['paging']}};}};
@@ -1 +1 @@
1
- const a56_0x3dc0a6=a56_0x583e;(function(_0x5a6a40,_0x15ad69){const _0x5bbafa=a56_0x583e,_0x52573e=_0x5a6a40();while(!![]){try{const _0x1b1879=parseInt(_0x5bbafa(0x1f0))/0x1*(-parseInt(_0x5bbafa(0x1f5))/0x2)+-parseInt(_0x5bbafa(0x221))/0x3*(parseInt(_0x5bbafa(0x1e8))/0x4)+-parseInt(_0x5bbafa(0x209))/0x5*(-parseInt(_0x5bbafa(0x1e9))/0x6)+-parseInt(_0x5bbafa(0x20d))/0x7+parseInt(_0x5bbafa(0x22d))/0x8+-parseInt(_0x5bbafa(0x212))/0x9+parseInt(_0x5bbafa(0x1ea))/0xa*(parseInt(_0x5bbafa(0x20b))/0xb);if(_0x1b1879===_0x15ad69)break;else _0x52573e['push'](_0x52573e['shift']());}catch(_0x227206){_0x52573e['push'](_0x52573e['shift']());}}}(a56_0x3e19,0x9d75b));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=[a56_0x3dc0a6(0x210),a56_0x3dc0a6(0x206),a56_0x3dc0a6(0x226),a56_0x3dc0a6(0x213)];function a56_0x3e19(){const _0x26a2f2=['number','trim','6748872GCgIiJ','Runtime\x20role\x20membership\x20requires\x20a\x20numeric\x20userId.','Globally\x20unique\x20roleCode\x20(maximum\x2064\x20characters)','user','Role\x20ID\x20must\x20be\x20a\x20positive\x20integer.','1220vLzTgG','34458avQXms','17020wNCxPc','expect-user-count','\x22\x20was\x20not\x20found\x20in\x20app\x20','Runtime\x20user\x20','string','length','84145jgdkkg','push','test','\x20is\x20not\x20in\x20runtime\x20role\x20','paging','10ghJiUB','remark','Only\x20CUSTOM\x20runtime\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','Reload\x20the\x20role\x20list\x20and\x20retry\x20after\x20the\x20server\x20state\x20is\x20consistent.','\x20is\x20already\x20in\x20runtime\x20role\x20','runtime','filter','permitCount','roleName','Read\x20the\x20current\x20members\x20and\x20retry\x20with\x20the\x20new\x20expected\x20count.','userCount','totalCount','Runtime\x20role\x20','roleType',',\x20found\x20','Transfer\x20or\x20manage\x20application\x20ownership\x20through\x20the\x20dedicated\x20application\x20workflow.','Runtime\x20role\x20name\x20\x22','USER','map','--role-code\x20cannot\x20exceed\x2064\x20characters.','210lXssIk','Runtime\x20role\x20id\x20','10208bXCHPd','Run\x20`lovrabet\x20role\x20list`\x20and\x20use\x20a\x20role\x20from\x20the\x20current\x20app.','8165227JGSGAa','appCode','find','ADMIN','OWNER\x20runtime\x20role\x20membership\x20cannot\x20be\x20changed\x20with\x20this\x20command.','1366515VslNGa','CUSTOM','Runtime\x20role\x20ID\x20returned\x20by\x20role\x20list','isSafeInteger','validation','Runtime\x20role\x20member\x20count\x20changed:\x20expected\x20','Runtime\x20numeric\x20userId','Run\x20`lovrabet\x20role\x20list`\x20or\x20pass\x20--role\x20<id>.','user-add','\x20was\x20not\x20found\x20in\x20app\x20','Pass\x20--role\x20<id|name>.','Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name','--expect-user-count\x20must\x20be\x20a\x20non-negative\x20integer.','flag','\x20built-in\x20runtime\x20role\x20','2757UpFviJ','role-code','userList','userId','User\x20','OWNER','roleCode','Pass\x20--user\x20<userId>;\x20name\x20and\x20account\x20lookup\x20are\x20not\x20available\x20in\x20runtime\x20scope.','\x20is\x20missing\x20from\x20the\x20grouped\x20member\x20snapshot.','userName'];a56_0x3e19=function(){return _0x26a2f2;};return a56_0x3e19();}const BUILTIN_ROLE_TYPES=[a56_0x3dc0a6(0x210),a56_0x3dc0a6(0x206),'OWNER'];export const ROLE_ID_FLAG={'name':'id','type':a56_0x3dc0a6(0x22b),'required':!![],'description':a56_0x3dc0a6(0x214)};export const ROLE_REF_FLAG={'name':'role','type':'string','required':!![],'description':a56_0x3dc0a6(0x21d)};export const ROLE_CODE_FLAG={'name':a56_0x3dc0a6(0x222),'type':a56_0x3dc0a6(0x1ee),'description':a56_0x3dc0a6(0x1e5)};export const USER_ID_FLAG={'name':a56_0x3dc0a6(0x1e6),'type':a56_0x3dc0a6(0x1ee),'required':!![],'description':a56_0x3dc0a6(0x218)};export const EXPECT_USER_COUNT_FLAG={'name':'expect-user-count','type':a56_0x3dc0a6(0x22b),'description':'Reject\x20when\x20the\x20target\x20role\x20member\x20count\x20has\x20changed'};export function isBuiltinRuntimeRole(_0x3160db){return BUILTIN_ROLE_TYPES['includes'](_0x3160db);}export function assertCustomRuntimeRole(_0x3afebc,_0x3036e5){const _0x3e1bf7=a56_0x3dc0a6;if(_0x3afebc[_0x3e1bf7(0x202)]!==_0x3e1bf7(0x213))throw CliErrors[_0x3e1bf7(0x216)]('Cannot\x20'+_0x3036e5+_0x3e1bf7(0x220)+_0x3afebc[_0x3e1bf7(0x1fd)]+'\x20('+_0x3afebc[_0x3e1bf7(0x202)]+').',_0x3e1bf7(0x1f7));}export function projectRuntimeRole(_0x244ddb){const _0x1a2fb1=a56_0x3dc0a6;return{'id':_0x244ddb['id'],'roleCode':_0x244ddb[_0x1a2fb1(0x227)],'roleName':_0x244ddb[_0x1a2fb1(0x1fd)],'roleType':_0x244ddb[_0x1a2fb1(0x202)],'remark':_0x244ddb[_0x1a2fb1(0x1f6)],'userCount':_0x244ddb[_0x1a2fb1(0x1ff)]??0x0,'permitCount':_0x244ddb[_0x1a2fb1(0x1fc)]??0x0,'builtin':isBuiltinRuntimeRole(_0x244ddb[_0x1a2fb1(0x202)])};}export function readOptionalRuntimeRoleCode(_0x534157){const _0x583ed5=a56_0x3dc0a6,_0x1d777a=_0x534157[_0x583ed5(0x21f)](_0x583ed5(0x222));if(_0x1d777a===undefined||_0x1d777a===null)return undefined;const _0x1ee4f6=String(_0x1d777a)[_0x583ed5(0x22c)]();if(!_0x1ee4f6)throw CliErrors[_0x583ed5(0x216)]('--role-code\x20must\x20not\x20be\x20blank.');if(_0x1ee4f6[_0x583ed5(0x1ef)]>0x40)throw CliErrors['validation'](_0x583ed5(0x208));return _0x1ee4f6;}function a56_0x583e(_0x24e558,_0x4e15c0){_0x24e558=_0x24e558-0x1e4;const _0x3e19b0=a56_0x3e19();let _0x583ecc=_0x3e19b0[_0x24e558];return _0x583ecc;}export async function getRuntimeRoleById(_0x372dc2,_0x2f1871){const _0x2b28b8=a56_0x3dc0a6;if(!Number[_0x2b28b8(0x215)](_0x2f1871)||_0x2f1871<=0x0)throw CliErrors['validation'](_0x2b28b8(0x1e7));const _0x3b9990=(await listAllRuntimeRoles(_0x372dc2))[_0x2b28b8(0x1fb)](_0xb6be45=>_0xb6be45['id']===_0x2f1871&&(!_0xb6be45[_0x2b28b8(0x20e)]||_0xb6be45[_0x2b28b8(0x20e)]===_0x372dc2));if(_0x3b9990['length']!==0x1)throw CliErrors[_0x2b28b8(0x216)](_0x2b28b8(0x20a)+_0x2f1871+'\x20was\x20not\x20found\x20in\x20app\x20'+_0x372dc2+'.',_0x2b28b8(0x20c));return _0x3b9990[0x0];}export async function listAllRuntimeRoles(_0x40173b,_0x5d6833={}){const _0x3733fc=a56_0x3dc0a6,_0x97f329=0x64,_0x432dfc=[];for(let _0x22f6dc=0x1;;_0x22f6dc+=0x1){const _0x2bbe26=await listRuntimeAppRoles(_0x40173b,{..._0x5d6833[_0x3733fc(0x1fd)]?{'roleName':_0x5d6833[_0x3733fc(0x1fd)]}:{},'currentPage':_0x22f6dc,'pageSize':_0x97f329});_0x432dfc[_0x3733fc(0x1f1)](..._0x2bbe26['items']);if(_0x2bbe26['items']['length']<_0x97f329||_0x2bbe26[_0x3733fc(0x1f4)]&&_0x432dfc['length']>=_0x2bbe26['paging'][_0x3733fc(0x200)])return _0x432dfc;}}export async function resolveRuntimeRoleRef(_0x2d33c3,_0x53b7b9){const _0x201e13=a56_0x3dc0a6,_0x58c018=_0x53b7b9[_0x201e13(0x22c)]();if(!_0x58c018)throw CliErrors[_0x201e13(0x216)]('Missing\x20runtime\x20role\x20reference.',_0x201e13(0x21c));if(/^\d+$/[_0x201e13(0x1f2)](_0x58c018))return getRuntimeRoleById(_0x2d33c3,Number(_0x58c018));const _0x1950f9=(await listAllRuntimeRoles(_0x2d33c3))[_0x201e13(0x1fb)](_0x5012d9=>_0x5012d9[_0x201e13(0x1fd)]===_0x58c018);if(_0x1950f9[_0x201e13(0x1ef)]===0x0)throw CliErrors[_0x201e13(0x216)](_0x201e13(0x205)+_0x58c018+_0x201e13(0x1ec)+_0x2d33c3+'.',_0x201e13(0x219));if(_0x1950f9[_0x201e13(0x1ef)]>0x1)throw CliErrors[_0x201e13(0x216)]('Runtime\x20role\x20name\x20\x22'+_0x58c018+'\x22\x20is\x20ambiguous.','Pass\x20one\x20role\x20ID:\x20'+_0x1950f9[_0x201e13(0x207)](_0x4b063b=>_0x4b063b['id'])['join'](',\x20')+'.');return _0x1950f9[0x0];}function parseRuntimeUserId(_0x9ace22){const _0x5e86c7=a56_0x3dc0a6,_0x4b78bd=_0x9ace22[_0x5e86c7(0x22c)](),_0x51ea5f=normalizePositiveSafeInteger(_0x4b78bd);if(_0x51ea5f===undefined)throw CliErrors['validation'](_0x5e86c7(0x1e4),_0x5e86c7(0x228));return _0x51ea5f;}export async function prepareRuntimeMemberMutation(_0x4e0c77,_0x417dcb){const _0x3b4263=a56_0x3dc0a6,_0x37753c=await resolveRuntimeRoleRef(_0x4e0c77[_0x3b4263(0x20e)],_0x4e0c77['str']('role'));if(_0x37753c[_0x3b4263(0x202)]===_0x3b4263(0x226))throw CliErrors[_0x3b4263(0x216)](_0x3b4263(0x211),_0x3b4263(0x204));const _0x4b740a=parseRuntimeUserId(_0x4e0c77['str']('user')),_0xb9907=(await listRuntimeRoleUsers(_0x4e0c77[_0x3b4263(0x20e)]))[_0x3b4263(0x207)](_0x2fe2ca=>({..._0x2fe2ca,'userList':[..._0x2fe2ca[_0x3b4263(0x223)]??[]],'applyUserList':[..._0x2fe2ca['applyUserList']??[]]})),_0x5bde4d=_0xb9907[_0x3b4263(0x20f)](_0x41bb67=>_0x41bb67['id']===_0x37753c['id']);if(!_0x5bde4d)throw CliErrors[_0x3b4263(0x216)](_0x3b4263(0x201)+_0x37753c['id']+_0x3b4263(0x229),_0x3b4263(0x1f8));const _0x43a9bd=_0x5bde4d[_0x3b4263(0x223)][_0x3b4263(0x207)](_0x1527a9=>_0x1527a9['userId']),_0x4582b7=_0x4e0c77[_0x3b4263(0x21f)](_0x3b4263(0x1eb));if(_0x4582b7!==undefined&&_0x4582b7!==null&&_0x4582b7!==''){const _0x163de1=_0x4e0c77['num'](_0x3b4263(0x1eb));if(!Number[_0x3b4263(0x215)](_0x163de1)||_0x163de1<0x0)throw CliErrors[_0x3b4263(0x216)](_0x3b4263(0x21e));if(_0x43a9bd[_0x3b4263(0x1ef)]!==_0x163de1)throw CliErrors['validation'](_0x3b4263(0x217)+_0x163de1+_0x3b4263(0x203)+_0x43a9bd[_0x3b4263(0x1ef)]+'.',_0x3b4263(0x1fe));}const _0x941394=_0x43a9bd['includes'](_0x4b740a),_0x1e6bb9=[];let _0x356e83=!![];if(_0x417dcb===_0x3b4263(0x21a)){const _0x932e2a=await listRuntimeAppUsers(_0x4e0c77['appCode']),_0x589386=_0x932e2a['filter'](_0xe8e88=>Number(_0xe8e88['code'])===_0x4b740a);if(_0x589386[_0x3b4263(0x1ef)]!==0x1||!_0x589386[0x0][_0x3b4263(0x22a)]?.['trim']())throw CliErrors[_0x3b4263(0x216)](_0x3b4263(0x1ed)+_0x4b740a+_0x3b4263(0x21b)+_0x4e0c77['appCode']+'.','Use\x20a\x20numeric\x20userId\x20returned\x20by\x20the\x20current\x20application\x27s\x20personnel\x20list.');_0x941394?(_0x356e83=![],_0x1e6bb9[_0x3b4263(0x1f1)](_0x3b4263(0x225)+_0x4b740a+_0x3b4263(0x1f9)+_0x37753c['id']+'.')):_0x5bde4d['userList']['push']({'userId':_0x4b740a,'username':_0x589386[0x0][_0x3b4263(0x22a)]});}else!_0x941394?(_0x356e83=![],_0x1e6bb9[_0x3b4263(0x1f1)](_0x3b4263(0x225)+_0x4b740a+_0x3b4263(0x1f3)+_0x37753c['id']+'.')):_0x5bde4d[_0x3b4263(0x223)]=_0x5bde4d['userList'][_0x3b4263(0x1fb)](_0x520a77=>_0x520a77[_0x3b4263(0x224)]!==_0x4b740a);return{'role':_0x37753c,'userId':_0x4b740a,'roleList':_0xb9907,'before':{'userIds':_0x43a9bd},'after':{'userIds':_0x5bde4d[_0x3b4263(0x223)][_0x3b4263(0x207)](_0x156565=>_0x156565['userId'])},'shouldWrite':_0x356e83,'warnings':_0x1e6bb9};}export function runtimeRoleWriteResult(_0x140cc0,_0x29de40,_0x35e26f,_0x288a3c,_0x4d09e1,_0x5b6db8=[]){const _0x4f2e9c=a56_0x3dc0a6;return{'operation':_0x140cc0,'scope':_0x4f2e9c(0x1fa),'selector':_0x29de40,'before':_0x35e26f,'after':_0x288a3c,'dryRun':![],'backend':_0x4d09e1,'warnings':_0x5b6db8};}
1
+ const a56_0x6121d6=a56_0x596c;(function(_0x28ea53,_0x180ed3){const _0x3ff406=a56_0x596c,_0x290ced=_0x28ea53();while(!![]){try{const _0x22bc62=parseInt(_0x3ff406(0x1d7))/0x1+parseInt(_0x3ff406(0x200))/0x2+parseInt(_0x3ff406(0x20b))/0x3+parseInt(_0x3ff406(0x1de))/0x4*(-parseInt(_0x3ff406(0x1d3))/0x5)+-parseInt(_0x3ff406(0x1ea))/0x6*(parseInt(_0x3ff406(0x1f1))/0x7)+-parseInt(_0x3ff406(0x1f3))/0x8*(parseInt(_0x3ff406(0x20e))/0x9)+parseInt(_0x3ff406(0x1ca))/0xa;if(_0x22bc62===_0x180ed3)break;else _0x290ced['push'](_0x290ced['shift']());}catch(_0x15a02d){_0x290ced['push'](_0x290ced['shift']());}}}(a56_0x21e3,0xb5f99));import{listRuntimeAppUsers,listRuntimeAppRoles,listRuntimeRoleUsers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a56_0x21e3(){const _0x73b744=['Use\x20a\x20numeric\x20userId\x20returned\x20by\x20the\x20current\x20application\x27s\x20personnel\x20list.','OWNER','Runtime\x20numeric\x20userId',',\x20found\x20','length','num','3161753QGmKJd','permitCount','8mYzAaE','--role-code\x20must\x20not\x20be\x20blank.','Only\x20CUSTOM\x20runtime\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','Runtime\x20role\x20membership\x20requires\x20a\x20numeric\x20userId.','Role\x20ID\x20must\x20be\x20a\x20positive\x20integer.','\x20was\x20not\x20found\x20in\x20app\x20','Runtime\x20role\x20','paging','\x22\x20is\x20ambiguous.','code','appCode','Read\x20the\x20current\x20members\x20and\x20retry\x20with\x20the\x20new\x20expected\x20count.','validation','927450cJKIbo','string','role','map','Reject\x20when\x20the\x20target\x20role\x20member\x20count\x20has\x20changed','isSafeInteger','trim','\x20built-in\x20runtime\x20role\x20','remark','Missing\x20runtime\x20role\x20reference.','\x20is\x20missing\x20from\x20the\x20grouped\x20member\x20snapshot.','138048vmkIKw','Globally\x20unique\x20roleCode\x20(maximum\x2064\x20characters)','push','12456621LYzCgV','includes','roleType','--role-code\x20cannot\x20exceed\x2064\x20characters.','\x20is\x20already\x20in\x20runtime\x20role\x20','Run\x20`lovrabet\x20role\x20list`\x20or\x20pass\x20--role\x20<id>.','totalCount','Cannot\x20','userList','test','User\x20','26110420RqvNrY','userName','userId','expect-user-count','Runtime\x20user\x20','flag','user','CUSTOM','str','1287110cjskrj','join','find','number','1135958QKKqDK','filter','Runtime\x20role\x20name\x20\x22','ADMIN','applyUserList','user-add','Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name','12TCBYzp','OWNER\x20runtime\x20role\x20membership\x20cannot\x20be\x20changed\x20with\x20this\x20command.','Reload\x20the\x20role\x20list\x20and\x20retry\x20after\x20the\x20server\x20state\x20is\x20consistent.','userCount','Pass\x20one\x20role\x20ID:\x20','items','--expect-user-count\x20must\x20be\x20a\x20non-negative\x20integer.','role-code','Runtime\x20role\x20member\x20count\x20changed:\x20expected\x20','roleName','USER','Run\x20`lovrabet\x20role\x20list`\x20and\x20use\x20a\x20role\x20from\x20the\x20current\x20app.','18EFYdiz'];a56_0x21e3=function(){return _0x73b744;};return a56_0x21e3();}import{normalizePositiveSafeInteger}from'../../utils/positive-safe-integer.js';export const RUNTIME_ROLE_TYPES=[a56_0x6121d6(0x1da),a56_0x6121d6(0x1e8),a56_0x6121d6(0x1ec),'CUSTOM'];const BUILTIN_ROLE_TYPES=[a56_0x6121d6(0x1da),a56_0x6121d6(0x1e8),a56_0x6121d6(0x1ec)];export const ROLE_ID_FLAG={'name':'id','type':a56_0x6121d6(0x1d6),'required':!![],'description':'Runtime\x20role\x20ID\x20returned\x20by\x20role\x20list'};export const ROLE_REF_FLAG={'name':a56_0x6121d6(0x202),'type':a56_0x6121d6(0x201),'required':!![],'description':a56_0x6121d6(0x1dd)};export const ROLE_CODE_FLAG={'name':a56_0x6121d6(0x1e5),'type':a56_0x6121d6(0x201),'description':a56_0x6121d6(0x20c)};export const USER_ID_FLAG={'name':a56_0x6121d6(0x1d0),'type':a56_0x6121d6(0x201),'required':!![],'description':a56_0x6121d6(0x1ed)};export const EXPECT_USER_COUNT_FLAG={'name':a56_0x6121d6(0x1cd),'type':a56_0x6121d6(0x1d6),'description':a56_0x6121d6(0x204)};function a56_0x596c(_0x479d24,_0xe653f1){_0x479d24=_0x479d24-0x1c5;const _0x21e3ce=a56_0x21e3();let _0x596cbf=_0x21e3ce[_0x479d24];return _0x596cbf;}export function isBuiltinRuntimeRole(_0xac7f5){const _0x36e61c=a56_0x6121d6;return BUILTIN_ROLE_TYPES[_0x36e61c(0x20f)](_0xac7f5);}export function assertCustomRuntimeRole(_0x4f5a02,_0x2784c6){const _0x16808b=a56_0x6121d6;if(_0x4f5a02[_0x16808b(0x210)]!==_0x16808b(0x1d1))throw CliErrors[_0x16808b(0x1ff)](_0x16808b(0x1c6)+_0x2784c6+_0x16808b(0x207)+_0x4f5a02[_0x16808b(0x1e7)]+'\x20('+_0x4f5a02[_0x16808b(0x210)]+').',_0x16808b(0x1f5));}export function projectRuntimeRole(_0x5e25c9){const _0xa45ca9=a56_0x6121d6;return{'id':_0x5e25c9['id'],'roleCode':_0x5e25c9['roleCode'],'roleName':_0x5e25c9['roleName'],'roleType':_0x5e25c9[_0xa45ca9(0x210)],'remark':_0x5e25c9[_0xa45ca9(0x208)],'userCount':_0x5e25c9[_0xa45ca9(0x1e1)]??0x0,'permitCount':_0x5e25c9[_0xa45ca9(0x1f2)]??0x0,'builtin':isBuiltinRuntimeRole(_0x5e25c9[_0xa45ca9(0x210)])};}export function readOptionalRuntimeRoleCode(_0x2f1364){const _0x10a87d=a56_0x6121d6,_0x1bcc16=_0x2f1364[_0x10a87d(0x1cf)]('role-code');if(_0x1bcc16===undefined||_0x1bcc16===null)return undefined;const _0x3ed5f3=String(_0x1bcc16)[_0x10a87d(0x206)]();if(!_0x3ed5f3)throw CliErrors[_0x10a87d(0x1ff)](_0x10a87d(0x1f4));if(_0x3ed5f3[_0x10a87d(0x1ef)]>0x40)throw CliErrors[_0x10a87d(0x1ff)](_0x10a87d(0x211));return _0x3ed5f3;}export async function getRuntimeRoleById(_0x17c164,_0x2b7b30){const _0x384a37=a56_0x6121d6;if(!Number[_0x384a37(0x205)](_0x2b7b30)||_0x2b7b30<=0x0)throw CliErrors[_0x384a37(0x1ff)](_0x384a37(0x1f7));const _0x4fd8f3=(await listAllRuntimeRoles(_0x17c164))[_0x384a37(0x1d8)](_0x17c67b=>_0x17c67b['id']===_0x2b7b30&&(!_0x17c67b[_0x384a37(0x1fd)]||_0x17c67b[_0x384a37(0x1fd)]===_0x17c164));if(_0x4fd8f3[_0x384a37(0x1ef)]!==0x1)throw CliErrors[_0x384a37(0x1ff)]('Runtime\x20role\x20id\x20'+_0x2b7b30+'\x20was\x20not\x20found\x20in\x20app\x20'+_0x17c164+'.',_0x384a37(0x1e9));return _0x4fd8f3[0x0];}export async function listAllRuntimeRoles(_0x13fbc0,_0x39772b={}){const _0x5d0bb3=a56_0x6121d6,_0x57945d=0x64,_0x58c728=[];for(let _0x48d4bf=0x1;;_0x48d4bf+=0x1){const _0x295815=await listRuntimeAppRoles(_0x13fbc0,{..._0x39772b[_0x5d0bb3(0x1e7)]?{'roleName':_0x39772b[_0x5d0bb3(0x1e7)]}:{},'currentPage':_0x48d4bf,'pageSize':_0x57945d});_0x58c728['push'](..._0x295815[_0x5d0bb3(0x1e3)]);if(_0x295815[_0x5d0bb3(0x1e3)][_0x5d0bb3(0x1ef)]<_0x57945d||_0x295815[_0x5d0bb3(0x1fa)]&&_0x58c728[_0x5d0bb3(0x1ef)]>=_0x295815[_0x5d0bb3(0x1fa)][_0x5d0bb3(0x1c5)])return _0x58c728;}}export async function resolveRuntimeRoleRef(_0x3b4c90,_0x5d301f){const _0x3539ee=a56_0x6121d6,_0x3c935a=_0x5d301f[_0x3539ee(0x206)]();if(!_0x3c935a)throw CliErrors[_0x3539ee(0x1ff)](_0x3539ee(0x209),'Pass\x20--role\x20<id|name>.');if(/^\d+$/[_0x3539ee(0x1c8)](_0x3c935a))return getRuntimeRoleById(_0x3b4c90,Number(_0x3c935a));const _0x1e95c5=(await listAllRuntimeRoles(_0x3b4c90))[_0x3539ee(0x1d8)](_0x2eee78=>_0x2eee78[_0x3539ee(0x1e7)]===_0x3c935a);if(_0x1e95c5[_0x3539ee(0x1ef)]===0x0)throw CliErrors[_0x3539ee(0x1ff)](_0x3539ee(0x1d9)+_0x3c935a+'\x22\x20was\x20not\x20found\x20in\x20app\x20'+_0x3b4c90+'.',_0x3539ee(0x213));if(_0x1e95c5[_0x3539ee(0x1ef)]>0x1)throw CliErrors[_0x3539ee(0x1ff)](_0x3539ee(0x1d9)+_0x3c935a+_0x3539ee(0x1fb),_0x3539ee(0x1e2)+_0x1e95c5[_0x3539ee(0x203)](_0x279822=>_0x279822['id'])[_0x3539ee(0x1d4)](',\x20')+'.');return _0x1e95c5[0x0];}function parseRuntimeUserId(_0x315176){const _0x370cdc=a56_0x6121d6,_0x5d6473=_0x315176[_0x370cdc(0x206)](),_0x5a03f8=normalizePositiveSafeInteger(_0x5d6473);if(_0x5a03f8===undefined)throw CliErrors['validation'](_0x370cdc(0x1f6),'Pass\x20--user\x20<userId>;\x20name\x20and\x20account\x20lookup\x20are\x20not\x20available\x20in\x20runtime\x20scope.');return _0x5a03f8;}export async function prepareRuntimeMemberMutation(_0x2af86a,_0x2927ad){const _0x12ccf8=a56_0x6121d6,_0xfc393d=await resolveRuntimeRoleRef(_0x2af86a[_0x12ccf8(0x1fd)],_0x2af86a[_0x12ccf8(0x1d2)](_0x12ccf8(0x202)));if(_0xfc393d[_0x12ccf8(0x210)]===_0x12ccf8(0x1ec))throw CliErrors[_0x12ccf8(0x1ff)](_0x12ccf8(0x1df),'Transfer\x20or\x20manage\x20application\x20ownership\x20through\x20the\x20dedicated\x20application\x20workflow.');const _0x15f370=parseRuntimeUserId(_0x2af86a[_0x12ccf8(0x1d2)](_0x12ccf8(0x1d0))),_0x547412=(await listRuntimeRoleUsers(_0x2af86a[_0x12ccf8(0x1fd)]))[_0x12ccf8(0x203)](_0x53b71a=>({..._0x53b71a,'userList':[..._0x53b71a['userList']??[]],'applyUserList':[..._0x53b71a[_0x12ccf8(0x1db)]??[]]})),_0x4300ff=_0x547412[_0x12ccf8(0x1d5)](_0x1a4afc=>_0x1a4afc['id']===_0xfc393d['id']);if(!_0x4300ff)throw CliErrors['validation'](_0x12ccf8(0x1f9)+_0xfc393d['id']+_0x12ccf8(0x20a),_0x12ccf8(0x1e0));const _0x4a79ec=_0x4300ff['userList']['map'](_0xcc490=>_0xcc490[_0x12ccf8(0x1cc)]),_0x2c42a8=_0x2af86a['flag'](_0x12ccf8(0x1cd));if(_0x2c42a8!==undefined&&_0x2c42a8!==null&&_0x2c42a8!==''){const _0x3c1008=_0x2af86a[_0x12ccf8(0x1f0)](_0x12ccf8(0x1cd));if(!Number['isSafeInteger'](_0x3c1008)||_0x3c1008<0x0)throw CliErrors['validation'](_0x12ccf8(0x1e4));if(_0x4a79ec[_0x12ccf8(0x1ef)]!==_0x3c1008)throw CliErrors['validation'](_0x12ccf8(0x1e6)+_0x3c1008+_0x12ccf8(0x1ee)+_0x4a79ec[_0x12ccf8(0x1ef)]+'.',_0x12ccf8(0x1fe));}const _0x5b3acc=_0x4a79ec['includes'](_0x15f370),_0x64669=[];let _0x2ab965=!![];if(_0x2927ad===_0x12ccf8(0x1dc)){const _0x3cd0ee=await listRuntimeAppUsers(_0x2af86a[_0x12ccf8(0x1fd)]),_0x59a8a7=_0x3cd0ee[_0x12ccf8(0x1d8)](_0x5c6cd8=>Number(_0x5c6cd8[_0x12ccf8(0x1fc)])===_0x15f370);if(_0x59a8a7[_0x12ccf8(0x1ef)]!==0x1||!_0x59a8a7[0x0][_0x12ccf8(0x1cb)]?.['trim']())throw CliErrors[_0x12ccf8(0x1ff)](_0x12ccf8(0x1ce)+_0x15f370+_0x12ccf8(0x1f8)+_0x2af86a['appCode']+'.',_0x12ccf8(0x1eb));_0x5b3acc?(_0x2ab965=![],_0x64669[_0x12ccf8(0x20d)](_0x12ccf8(0x1c9)+_0x15f370+_0x12ccf8(0x212)+_0xfc393d['id']+'.')):_0x4300ff[_0x12ccf8(0x1c7)][_0x12ccf8(0x20d)]({'userId':_0x15f370,'username':_0x59a8a7[0x0][_0x12ccf8(0x1cb)]});}else!_0x5b3acc?(_0x2ab965=![],_0x64669[_0x12ccf8(0x20d)](_0x12ccf8(0x1c9)+_0x15f370+'\x20is\x20not\x20in\x20runtime\x20role\x20'+_0xfc393d['id']+'.')):_0x4300ff['userList']=_0x4300ff['userList']['filter'](_0x4fc9ac=>_0x4fc9ac[_0x12ccf8(0x1cc)]!==_0x15f370);return{'role':_0xfc393d,'userId':_0x15f370,'roleList':_0x547412,'before':{'userIds':_0x4a79ec},'after':{'userIds':_0x4300ff[_0x12ccf8(0x1c7)][_0x12ccf8(0x203)](_0x21a516=>_0x21a516[_0x12ccf8(0x1cc)])},'shouldWrite':_0x2ab965,'warnings':_0x64669};}export function runtimeRoleWriteResult(_0x33cd94,_0x577a81,_0x3c302c,_0x4e3e8d,_0x145159,_0xd51f37=[]){return{'operation':_0x33cd94,'scope':'runtime','selector':_0x577a81,'before':_0x3c302c,'after':_0x4e3e8d,'dryRun':![],'backend':_0x145159,'warnings':_0xd51f37};}