@lovrabet/lovrabet-cli 2.2.7 → 2.3.0-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.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.d.ts +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/init.d.ts +12 -0
- package/lib/commands/config/init.js +1 -0
- package/lib/commands/config/shared.d.ts +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/permit/dataset-get.js +1 -1
- package/lib/commands/permit/dataset-set.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/schedule/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/function-name-adapter.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/diagram.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/diagram.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/user-account/bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/domain-config.d.ts +11 -0
- package/lib/config/domain-config.js +1 -0
- package/lib/config/schema.d.ts +7 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.d.ts +4 -0
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.d.ts +10 -3
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.d.ts +52 -14
- package/lib/constant/product.js +1 -1
- package/lib/constant/region.d.ts +15 -0
- package/lib/constant/region.js +1 -0
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.d.ts +2 -0
- package/lib/constant/url.js +1 -1
- package/lib/context.d.ts +2 -6
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.d.ts +2 -0
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/raw-flags.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.d.ts +3 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/install-target.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/utils/access-key-redaction.d.ts +15 -0
- package/lib/utils/access-key-redaction.js +1 -0
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cli-version-check.d.ts +12 -0
- package/lib/utils/cli-version-check.js +1 -0
- package/lib/utils/cli-version-policy.d.ts +12 -0
- package/lib/utils/cli-version-policy.js +1 -0
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/update-notice.d.ts +2 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +3 -1
- package/skills/lovrabet/SKILL.md +11 -12
- package/skills/lovrabet/guides/troubleshooting.md +12 -8
- package/skills/lovrabet/references/lovrabet-app.md +1 -1
- package/skills/lovrabet/references/lovrabet-auth.md +7 -25
- package/skills/lovrabet/references/lovrabet-config-commands.md +42 -5
- package/skills/lovrabet/references/lovrabet-config.md +25 -5
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a43_0x2b7cc7=a43_0x221a;(function(_0x71da0d,_0x44954c){const _0x1a80b0=a43_0x221a,_0x486ded=_0x71da0d();while(!![]){try{const _0x5e6719=-parseInt(_0x1a80b0(0x144))/0x1+-parseInt(_0x1a80b0(0x157))/0x2*(-parseInt(_0x1a80b0(0x149))/0x3)+parseInt(_0x1a80b0(0x13d))/0x4+parseInt(_0x1a80b0(0x145))/0x5*(-parseInt(_0x1a80b0(0x13a))/0x6)+parseInt(_0x1a80b0(0x141))/0x7+-parseInt(_0x1a80b0(0x142))/0x8+-parseInt(_0x1a80b0(0x154))/0x9*(parseInt(_0x1a80b0(0x14a))/0xa);if(_0x5e6719===_0x44954c)break;else _0x486ded['push'](_0x486ded['shift']());}catch(_0x4f8a87){_0x486ded['push'](_0x486ded['shift']());}}}(a43_0x1d9d,0x69a6d));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(_0x422f28){const _0x3d5974=a43_0x221a;await assertRuntimePermissionManager(_0x422f28[_0x3d5974(0x13b)]);const _0x5a837a=_0x422f28[_0x3d5974(0x138)](_0x3d5974(0x13c)),_0x293cff=await getRuntimePagePermit(_0x5a837a);if(_0x293cff[_0x3d5974(0x13b)]&&_0x293cff[_0x3d5974(0x13b)]!==_0x422f28[_0x3d5974(0x13b)])throw CliErrors[_0x3d5974(0x14e)](_0x3d5974(0x153)+_0x5a837a+_0x3d5974(0x152)+_0x422f28[_0x3d5974(0x13b)]+'.');const _0x266eb6=structuredClone(_0x293cff),_0x3e753c=[];for(const _0x3ab1b8 of PAGE_SLOT_SPECS){if(_0x422f28['flag'](_0x3ab1b8['flag'])===undefined)continue;const _0x37ed9a=_0x293cff[_0x3ab1b8[_0x3d5974(0x15b)]];if(!_0x37ed9a)throw CliErrors['validation'](_0x3d5974(0x156)+_0x5a837a+_0x3d5974(0x139)+_0x3ab1b8[_0x3d5974(0x15b)]+'.');_0x37ed9a['rolePermit']=await resolveRuntimePermitRoles(_0x422f28[_0x3d5974(0x13b)],splitRefs(_0x422f28[_0x3d5974(0x14b)](_0x3ab1b8[_0x3d5974(0x151)]),'--'+_0x3ab1b8['flag']),_0x3ab1b8[_0x3d5974(0x13f)]),_0x3e753c[_0x3d5974(0x159)](_0x3ab1b8[_0x3d5974(0x15b)]);}if(_0x3e753c['length']===0x0)throw CliErrors[_0x3d5974(0x14e)](_0x3d5974(0x13e));return{'menuId':_0x5a837a,'page':_0x293cff,'before':_0x266eb6,'slots':_0x3e753c};}function a43_0x221a(_0x314f95,_0x1f6a6a){_0x314f95=_0x314f95-0x137;const _0x1d9da6=a43_0x1d9d();let _0x221a69=_0x1d9da6[_0x314f95];return _0x221a69;}function a43_0x1d9d(){const _0x56e297=['appCode','menu-id','523560SRHAia','Pass\x20at\x20least\x20one\x20page\x20role\x20flag\x20to\x20update.','allowSelf','page','2458344SqGBfA','1188152AbHILe','menuId','312106IQlkSt','65FBTKYO','Set\x20selected\x20runtime\x20page\x20permission\x20slots','high-risk-write','build','15zEEEMK','1224050HOIroM','str','page-set','Preview:\x20update\x20page\x20permission\x20slots\x20','validation','body','/client/permit/page/save','flag','\x20does\x20not\x20belong\x20to\x20app\x20','Menu\x20','9xRlECJ','Changes\x20role\x20permission\x20slots\x20on\x20the\x20given\x20runtime\x20page.\x20Unauthorized\x20users\x20may\x20be\x20unable\x20to\x20view\x20the\x20page\x20or\x20run\x20data\x20operations.','Page\x20menu\x20','275468VqOlkY','POST','push','join','key','slots','num','\x20does\x20not\x20expose\x20','71526PWgAnI'];a43_0x1d9d=function(){return _0x56e297;};return a43_0x1d9d();}export const permitPageSet={'service':'permit','command':a43_0x2b7cc7(0x14c),'description':a43_0x2b7cc7(0x146),'risk':a43_0x2b7cc7(0x147),'confirmationDescription':a43_0x2b7cc7(0x155),'flags':[MENU_ID_FLAG,...PAGE_ROLE_FLAGS],async 'dryRun'(_0x25bb5a){const _0x2484db=a43_0x2b7cc7,_0x19e242=await prepare(_0x25bb5a);return dryRun(_0x2484db(0x158),_0x2484db(0x150))[_0x2484db(0x14f)](_0x19e242[_0x2484db(0x140)])['description'](_0x2484db(0x14d)+_0x19e242[_0x2484db(0x137)][_0x2484db(0x15a)](',\x20'))[_0x2484db(0x148)]();},async 'execute'(_0x25a3fe){const _0x3c8413=a43_0x2b7cc7,_0x3a91a7=await prepare(_0x25a3fe),_0x556492=await saveRuntimePagePermit(_0x3a91a7[_0x3c8413(0x140)]);return{'ok':!![],'data':runtimePermitWriteResult(_0x3c8413(0x14c),{'menuId':_0x3a91a7[_0x3c8413(0x143)],'slots':_0x3a91a7['slots']},projectRuntimePagePermit(_0x3a91a7['before']),projectRuntimePagePermit(_0x556492),{'method':_0x3c8413(0x158),'path':_0x3c8413(0x150)})};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a44_0xbd3e(_0x5d0f9d,_0xcd463e){_0x5d0f9d=_0x5d0f9d-0x1b2;const _0x286102=a44_0x2861();let _0xbd3e8=_0x286102[_0x5d0f9d];return _0xbd3e8;}const a44_0xac5a4a=a44_0xbd3e;function a44_0x2861(){const _0x54bf50=['find','high-risk-write','menu-','revoke','length','permit','2937136VUQXPO','470694nUcWGQ','4Gqaaip','Grants\x20or\x20revokes\x20the\x20target\x20role\x20access\x20to\x20the\x20given\x20runtime\x20menus.\x20Menu\x20visibility\x20for\x20users\x20in\x20that\x20role\x20will\x20change.','\x20selected\x20runtime\x20menus','test','726anHdBz','push','validation','appCode','/client/permit/resource/batch-save-menu','roles','body','Comma-separated\x20runtime\x20menu\x20IDs','str','build','rolePermit','operation','Invalid\x20runtime\x20menu\x20ID:\x20','2900205LpQaVB','menuIds','1380620NwQcAm','7mXssIH','bool','after','1150612HkATxj','changed','warnings','12sNpOul','Preview:\x20','602166bmllnd','Grant\x20or\x20revoke\x20selected\x20runtime\x20menus\x20for\x20one\x20role','permitList','string','menus','map','Runtime\x20menu\x20','role','description','grant','197830uoTLNQ','role-menus-set','--menus'];a44_0x2861=function(){return _0x54bf50;};return a44_0x2861();}(function(_0x43b198,_0x557f52){const _0x2e2ba8=a44_0xbd3e,_0x3a1fe6=_0x43b198();while(!![]){try{const _0x4e4c4f=-parseInt(_0x2e2ba8(0x1df))/0x1+-parseInt(_0x2e2ba8(0x1e0))/0x2*(parseInt(_0x2e2ba8(0x1cb))/0x3)+-parseInt(_0x2e2ba8(0x1c6))/0x4+parseInt(_0x2e2ba8(0x1c2))/0x5*(-parseInt(_0x2e2ba8(0x1c9))/0x6)+parseInt(_0x2e2ba8(0x1c3))/0x7*(parseInt(_0x2e2ba8(0x1de))/0x8)+parseInt(_0x2e2ba8(0x1c0))/0x9+parseInt(_0x2e2ba8(0x1d5))/0xa*(parseInt(_0x2e2ba8(0x1b3))/0xb);if(_0x4e4c4f===_0x557f52)break;else _0x3a1fe6['push'](_0x3a1fe6['shift']());}catch(_0x370827){_0x3a1fe6['push'](_0x3a1fe6['shift']());}}}(a44_0x2861,0x45192));import{listRuntimeMenuRolePermits,listRuntimePermitRoles,saveRuntimeMenuRolePermits}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';import{resolveRuntimeRoleRef}from'../../commands/role/shared.js';import{applyRuntimeRolePermission,assertGrantOrRevoke,assertRuntimePermissionManager,assertRuntimePermitRoleConfigurable,flattenRuntimeMenuRolePermits,GRANT_FLAG,menuPermitDto,REVOKE_FLAG,ROLE_REF_FLAG,runtimePermitWriteResult,splitRefs}from'../../commands/permit/shared.js';const MENUS_FLAG={'name':a44_0xac5a4a(0x1cf),'type':a44_0xac5a4a(0x1ce),'required':!![],'description':a44_0xac5a4a(0x1ba)};async function prepare(_0x4a5c7e){const _0x353c23=a44_0xac5a4a;await assertRuntimePermissionManager(_0x4a5c7e['appCode']);const _0x29bb63=assertGrantOrRevoke(_0x4a5c7e['bool'](_0x353c23(0x1d4)),_0x4a5c7e[_0x353c23(0x1c4)](_0x353c23(0x1db))),_0xbb51c7=await resolveRuntimeRoleRef(_0x4a5c7e[_0x353c23(0x1b6)],_0x4a5c7e['str'](_0x353c23(0x1d2)));assertRuntimePermitRoleConfigurable(_0xbb51c7);const _0x39d0c2=[...new Set(splitRefs(_0x4a5c7e[_0x353c23(0x1bb)](_0x353c23(0x1cf)),_0x353c23(0x1d7))[_0x353c23(0x1d0)](_0x329790=>{const _0x33202a=_0x353c23,_0x4a5def=Number(_0x329790);if(!/^\d+$/[_0x33202a(0x1b2)](_0x329790)||!Number['isSafeInteger'](_0x4a5def)||_0x4a5def<=0x0)throw CliErrors[_0x33202a(0x1b5)](_0x33202a(0x1bf)+_0x329790+'.');return _0x4a5def;}))],_0x4afe0b=flattenRuntimeMenuRolePermits(await listRuntimeMenuRolePermits(_0x4a5c7e[_0x353c23(0x1b6)])),_0x11b653=await listRuntimePermitRoles(_0x4a5c7e[_0x353c23(0x1b6)]),_0x2cc352=[],_0x4b6051=[],_0x4ea0f2=[],_0x28f6e1=[];for(const _0x36bdfd of _0x39d0c2){const _0x2d10d8=_0x4afe0b[_0x353c23(0x1d8)](_0x12f1fa=>_0x12f1fa['id']===_0x36bdfd);if(!_0x2d10d8)throw CliErrors[_0x353c23(0x1b5)]('Runtime\x20menu\x20'+_0x36bdfd+'\x20was\x20not\x20found.');const _0x32471c=applyRuntimeRolePermission(_0x2d10d8[_0x353c23(0x1bd)],_0xbb51c7,_0x11b653,_0x29bb63);_0x4b6051[_0x353c23(0x1b4)]({'menuId':_0x36bdfd,'rolePermit':_0x2d10d8[_0x353c23(0x1bd)]}),_0x4ea0f2['push']({'menuId':_0x36bdfd,'rolePermit':_0x32471c['roles']});if(_0x32471c[_0x353c23(0x1c7)])_0x2cc352['push'](menuPermitDto(_0x4a5c7e[_0x353c23(0x1b6)],_0x2d10d8,_0x32471c[_0x353c23(0x1b8)]));else _0x28f6e1['push'](_0x353c23(0x1d1)+_0x36bdfd+'\x20already\x20reflects\x20'+_0x29bb63+'\x20for\x20role\x20'+_0xbb51c7['id']+'.');}return{'operation':_0x29bb63,'role':_0xbb51c7,'menuIds':_0x39d0c2,'permitList':_0x2cc352,'before':_0x4b6051,'after':_0x4ea0f2,'warnings':_0x28f6e1};}export const permitRoleMenusSet={'service':a44_0xac5a4a(0x1dd),'command':a44_0xac5a4a(0x1d6),'description':a44_0xac5a4a(0x1cc),'risk':a44_0xac5a4a(0x1d9),'confirmationDescription':a44_0xac5a4a(0x1e1),'flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,MENUS_FLAG],async 'validate'(_0x1ffaf6){const _0x1542eb=a44_0xac5a4a;assertGrantOrRevoke(_0x1ffaf6[_0x1542eb(0x1c4)]('grant'),_0x1ffaf6[_0x1542eb(0x1c4)](_0x1542eb(0x1db)));},async 'dryRun'(_0x3864bb){const _0x287d1d=a44_0xac5a4a,_0x2b60d8=await prepare(_0x3864bb);return dryRun('POST','/client/permit/resource/batch-save-menu')[_0x287d1d(0x1b9)]({'appCode':_0x3864bb[_0x287d1d(0x1b6)],'permitList':_0x2b60d8[_0x287d1d(0x1cd)]})[_0x287d1d(0x1d3)](_0x287d1d(0x1ca)+_0x2b60d8[_0x287d1d(0x1be)]+_0x287d1d(0x1e2))[_0x287d1d(0x1bc)]();},async 'execute'(_0x2a453f){const _0x4dc1cc=a44_0xac5a4a,_0x14c959=await prepare(_0x2a453f);return _0x14c959[_0x4dc1cc(0x1cd)][_0x4dc1cc(0x1dc)]>0x0&&await saveRuntimeMenuRolePermits(_0x2a453f[_0x4dc1cc(0x1b6)],_0x14c959['permitList']),{'ok':!![],'data':runtimePermitWriteResult(_0x4dc1cc(0x1da)+_0x14c959['operation'],{'roleId':_0x14c959[_0x4dc1cc(0x1d2)]['id'],'menuIds':_0x14c959[_0x4dc1cc(0x1c1)]},_0x14c959['before'],_0x14c959[_0x4dc1cc(0x1c5)],{'method':'POST','path':_0x4dc1cc(0x1b7)},_0x14c959[_0x4dc1cc(0x1c8)])};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a45_0x48ac(_0x23e947,_0x2e8259){_0x23e947=_0x23e947-0x139;const _0x1f4afa=a45_0x1f4a();let _0x48aca2=_0x1f4afa[_0x23e947];return _0x48aca2;}const a45_0x2c4d64=a45_0x48ac;(function(_0x3308f6,_0x544adb){const _0x24a7ef=a45_0x48ac,_0x4ab017=_0x3308f6();while(!![]){try{const _0xd07dbc=-parseInt(_0x24a7ef(0x149))/0x1*(parseInt(_0x24a7ef(0x141))/0x2)+parseInt(_0x24a7ef(0x144))/0x3*(parseInt(_0x24a7ef(0x13f))/0x4)+-parseInt(_0x24a7ef(0x140))/0x5+-parseInt(_0x24a7ef(0x13d))/0x6+-parseInt(_0x24a7ef(0x139))/0x7*(-parseInt(_0x24a7ef(0x13a))/0x8)+-parseInt(_0x24a7ef(0x14a))/0x9+-parseInt(_0x24a7ef(0x142))/0xa*(-parseInt(_0x24a7ef(0x147))/0xb);if(_0xd07dbc===_0x544adb)break;else _0x4ab017['push'](_0x4ab017['shift']());}catch(_0x151101){_0x4ab017['push'](_0x4ab017['shift']());}}}(a45_0x1f4a,0x2ab3c));import{getRuntimeRoleMenuResources}from'../../core/api-client.js';import{resolveRuntimeRoleRef}from'../../commands/role/shared.js';import{ROLE_REF_FLAG}from'../../commands/permit/shared.js';function a45_0x1f4a(){const _0x5dc8b3=['role-menus','479286DKoDvA','runtime','4tuWIKH','697315GrEgWF','2626FIoDzJ','9070ingbCL','role','935871MCTDmI','permit','roleName','5467GCdslI','appCode','263rTDWam','2353041fDIuUM','84fhuHCR','158856AhIisg','roleType'];a45_0x1f4a=function(){return _0x5dc8b3;};return a45_0x1f4a();}export const permitRoleMenus={'service':a45_0x2c4d64(0x145),'command':a45_0x2c4d64(0x13c),'description':'Show\x20evaluated\x20runtime\x20menu\x20access\x20for\x20one\x20role','risk':'read','flags':[ROLE_REF_FLAG],async 'execute'(_0x4e453c){const _0x37a6c5=a45_0x2c4d64,_0x263f01=await resolveRuntimeRoleRef(_0x4e453c[_0x37a6c5(0x148)],_0x4e453c['str'](_0x37a6c5(0x143))),_0x5efa46=await getRuntimeRoleMenuResources(_0x4e453c[_0x37a6c5(0x148)],_0x263f01['id']);return{'ok':!![],'data':{'scope':_0x37a6c5(0x13e),'role':{'id':_0x263f01['id'],'roleName':_0x263f01[_0x37a6c5(0x146)],'roleType':_0x263f01[_0x37a6c5(0x13b)]},'menus':_0x5efa46}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a46_0x4a1549=a46_0x15f7;(function(_0x5b41db,_0x969776){const _0x108698=a46_0x15f7,_0x167ac1=_0x5b41db();while(!![]){try{const _0x111ca4=parseInt(_0x108698(0x1a9))/0x1+-parseInt(_0x108698(0x183))/0x2*(-parseInt(_0x108698(0x187))/0x3)+-parseInt(_0x108698(0x173))/0x4*(parseInt(_0x108698(0x170))/0x5)+parseInt(_0x108698(0x1a0))/0x6+parseInt(_0x108698(0x18d))/0x7*(parseInt(_0x108698(0x197))/0x8)+-parseInt(_0x108698(0x1b1))/0x9+-parseInt(_0x108698(0x19a))/0xa;if(_0x111ca4===_0x969776)break;else _0x167ac1['push'](_0x167ac1['shift']());}catch(_0x2d09ee){_0x167ac1['push'](_0x167ac1['shift']());}}}(a46_0x1718,0x92550));import{getLoginUserInfo,listRuntimePermitRoles,listRuntimeRoleUsers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a46_0x1718(){const _0x4549f2=['Configure\x20USER,\x20CUSTOM,\x20or\x20an\x20applicable\x20special\x20role\x20instead.','ADMIN\x20and\x20OWNER\x20have\x20full\x20runtime\x20access;\x20configure\x20USER\x20or\x20CUSTOM\x20instead.','grant','Runtime\x20menu\x20ID','dataCreate','8138600tjDCZI','ALL','\x20must\x20contain\x20at\x20least\x20one\x20value.','9948100eUEYtR','runtime','\x22\x20was\x20not\x20found.','userId','Revoke\x20the\x20selected\x20resources\x20from\x20the\x20role','validation','6177492wwOToq','trim','resourceCode','delete-roles','Cannot\x20revoke\x20the\x20last\x20role\x20from\x20a\x20runtime\x20resource.','ADMIN','detail-roles','length','string','500506OzHOYn','some','boolean','\x22\x20is\x20ambiguous.','label','userList','flag','filter','8423235SJiYNj','dataExport','1544160URwJaf','push','roleName','4gSHecY','Use\x20a\x20role\x20ID\x20from\x20`lovrabet\x20role\x20list`.','create-roles','Grant\x20the\x20selected\x20resources\x20to\x20the\x20role','isSafeInteger','pageId','SELF','test','rolePermit','Cannot\x20resolve\x20the\x20current\x20AK\x20userId\x20for\x20permission\x20management.','map','row-roles','permitId','role','revoke','key','1822WrXkaN','dataPermit','dataDelete','dataDetail','960oqTPbm','Pass\x20exactly\x20one\x20of\x20--grant\x20or\x20--revoke.','OWNER','Permission\x20role\x20\x22','The\x20current\x20service\x20contract\x20does\x20not\x20persist\x20an\x20empty\x20rolePermit;\x20grant\x20another\x20role\x20first.','menuPermit','7wCSxBK','\x20has\x20full\x20runtime\x20access\x20and\x20cannot\x20be\x20a\x20resource\x20permission\x20target.','Ask\x20an\x20application\x20manager\x20to\x20perform\x20this\x20operation.','roleType','Comma-separated\x20runtime\x20role\x20IDs\x20or\x20names'];a46_0x1718=function(){return _0x4549f2;};return a46_0x1718();}export const MENU_ID_FLAG={'name':'menu-id','type':'number','required':!![],'description':a46_0x4a1549(0x195)};export const ROLE_REF_FLAG={'name':a46_0x4a1549(0x180),'type':'string','required':!![],'description':'Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name'};function a46_0x15f7(_0x582df1,_0x2c6efd){_0x582df1=_0x582df1-0x170;const _0x171832=a46_0x1718();let _0x15f7f9=_0x171832[_0x582df1];return _0x15f7f9;}export const GRANT_FLAG={'name':a46_0x4a1549(0x194),'type':a46_0x4a1549(0x1ab),'description':a46_0x4a1549(0x176)};export const REVOKE_FLAG={'name':a46_0x4a1549(0x181),'type':a46_0x4a1549(0x1ab),'description':a46_0x4a1549(0x19e)};export const PAGE_SLOT_SPECS=[{'flag':'menu-roles','key':a46_0x4a1549(0x18c),'allowSelf':![]},{'flag':a46_0x4a1549(0x175),'key':a46_0x4a1549(0x196),'allowSelf':![]},{'flag':'update-roles','key':'dataUpdate','allowSelf':![]},{'flag':a46_0x4a1549(0x1a3),'key':a46_0x4a1549(0x185),'allowSelf':![]},{'flag':a46_0x4a1549(0x1a6),'key':a46_0x4a1549(0x186),'allowSelf':![]},{'flag':'export-roles','key':a46_0x4a1549(0x1b2),'allowSelf':![]},{'flag':a46_0x4a1549(0x17e),'key':a46_0x4a1549(0x184),'allowSelf':!![]}];export const PAGE_ROLE_FLAGS=PAGE_SLOT_SPECS['map'](_0x479627=>({'name':_0x479627[a46_0x4a1549(0x1af)],'type':a46_0x4a1549(0x1a8),'description':a46_0x4a1549(0x191)}));export function splitRefs(_0x2d9d16,_0x5b3227){const _0xbc9b6a=a46_0x4a1549,_0x35c130=[...new Set(_0x2d9d16['split'](',')[_0xbc9b6a(0x17d)](_0x5cd2a4=>_0x5cd2a4[_0xbc9b6a(0x1a1)]())['filter'](Boolean))];if(_0x35c130[_0xbc9b6a(0x1a7)]===0x0)throw CliErrors[_0xbc9b6a(0x19f)](_0x5b3227+_0xbc9b6a(0x199));return _0x35c130;}export function assertGrantOrRevoke(_0x108be6,_0x347371){const _0x2a3fbe=a46_0x4a1549;if(_0x108be6===_0x347371)throw CliErrors[_0x2a3fbe(0x19f)](_0x2a3fbe(0x188));return _0x108be6?_0x2a3fbe(0x194):'revoke';}function resolvePermitRole(_0x436503,_0x507be5){const _0x4d786d=a46_0x4a1549,_0x399ba3=_0x507be5['trim'](),_0x3236c7=/^-?\d+$/[_0x4d786d(0x17a)](_0x399ba3)?_0x436503['filter'](_0x126a38=>_0x126a38['id']===Number(_0x399ba3)):_0x436503[_0x4d786d(0x1b0)](_0x4c9ffe=>_0x4c9ffe[_0x4d786d(0x172)]===_0x399ba3||_0x4c9ffe[_0x4d786d(0x190)]===_0x399ba3['toUpperCase']());if(_0x3236c7[_0x4d786d(0x1a7)]!==0x1)throw CliErrors[_0x4d786d(0x19f)](_0x3236c7[_0x4d786d(0x1a7)]===0x0?_0x4d786d(0x18a)+_0x399ba3+_0x4d786d(0x19c):_0x4d786d(0x18a)+_0x399ba3+_0x4d786d(0x1ac),_0x4d786d(0x174));return _0x3236c7[0x0];}export async function resolveRuntimePermitRoles(_0x2bbb4c,_0xf4fce7,_0x55e6c4){const _0x444569=a46_0x4a1549,_0x195779=await listRuntimePermitRoles(_0x2bbb4c,{'needSelf':!![],'needPublic':!![]}),_0x4da8d3=[...new Map(_0xf4fce7[_0x444569(0x17d)](_0x30afe3=>resolvePermitRole(_0x195779,_0x30afe3))[_0x444569(0x17d)](_0x3fcef7=>[_0x3fcef7['id'],_0x3fcef7]))['values']()],_0x1775a4=_0x4da8d3['find'](_0x107bca=>_0x107bca[_0x444569(0x190)]===_0x444569(0x1a5)||_0x107bca[_0x444569(0x190)]===_0x444569(0x189));if(_0x1775a4)throw CliErrors[_0x444569(0x19f)](_0x1775a4['roleType']+_0x444569(0x18e),_0x444569(0x192));if(!_0x55e6c4&&_0x4da8d3[_0x444569(0x1aa)](_0x2ff8e3=>_0x2ff8e3[_0x444569(0x190)]===_0x444569(0x179)))throw CliErrors[_0x444569(0x19f)]('SELF\x20is\x20only\x20valid\x20for\x20--row-roles.');return _0x4da8d3;}export async function assertRuntimePermissionManager(_0x2752fb){const _0x31fb0f=a46_0x4a1549,_0x2917ea=await getLoginUserInfo(),_0x44ff3c=_0x2917ea['userId']??_0x2917ea['id'],_0x2f8c11=Number(_0x44ff3c);if(!Number[_0x31fb0f(0x177)](_0x2f8c11)||_0x2f8c11<=0x0)throw CliErrors[_0x31fb0f(0x19f)](_0x31fb0f(0x17c));const _0x45d9cc=await listRuntimeRoleUsers(_0x2752fb),_0x4ef1b4=_0x45d9cc[_0x31fb0f(0x1aa)](_0x326ad5=>(_0x326ad5['roleType']==='ADMIN'||_0x326ad5[_0x31fb0f(0x190)]===_0x31fb0f(0x189))&&_0x326ad5[_0x31fb0f(0x1ae)][_0x31fb0f(0x1aa)](_0x2498ef=>_0x2498ef[_0x31fb0f(0x19d)]===_0x2f8c11));if(!_0x4ef1b4)throw CliErrors['validation']('Runtime\x20resource\x20permission\x20changes\x20require\x20an\x20ADMIN\x20or\x20OWNER\x20role.',_0x31fb0f(0x18f));}export function assertRuntimePermitRoleConfigurable(_0x5b17e1){const _0x1da236=a46_0x4a1549;if(_0x5b17e1[_0x1da236(0x190)]===_0x1da236(0x1a5)||_0x5b17e1['roleType']===_0x1da236(0x189))throw CliErrors['validation']('Cannot\x20change\x20resource\x20permissions\x20for\x20'+_0x5b17e1[_0x1da236(0x190)]+'\x20runtime\x20role\x20'+_0x5b17e1[_0x1da236(0x172)]+'.',_0x1da236(0x193));}function asPermitRole(_0x560dad){const _0x3c7688=a46_0x4a1549;return{'id':_0x560dad['id'],'roleName':_0x560dad[_0x3c7688(0x172)],'roleType':_0x560dad['roleType'],'allowed':!![]};}export function applyRuntimeRolePermission(_0x258b2a,_0x1343f7,_0x1ed13a,_0x10a16a){const _0x2e1557=a46_0x4a1549,_0x52cc83=!_0x258b2a||_0x258b2a['length']===0x0,_0x178338=_0x258b2a?.[_0x2e1557(0x1aa)](_0x48189a=>_0x48189a[_0x2e1557(0x190)]===_0x2e1557(0x198))??![];if(_0x10a16a===_0x2e1557(0x194)&&(_0x52cc83||_0x178338))return{'roles':_0x258b2a??null,'changed':![]};let _0x385da0=_0x52cc83||_0x178338?_0x1ed13a[_0x2e1557(0x1b0)](_0x315152=>_0x315152['id']>0x0):[..._0x258b2a];const _0x5d7eaa=_0x385da0['some'](_0xede8a1=>_0xede8a1['id']===_0x1343f7['id']);if(_0x10a16a==='grant'){if(_0x5d7eaa)return{'roles':_0x385da0,'changed':![]};return _0x385da0['push'](asPermitRole(_0x1343f7)),{'roles':_0x385da0,'changed':!![]};}if(!_0x5d7eaa)return{'roles':_0x385da0,'changed':_0x52cc83||_0x178338};_0x385da0=_0x385da0[_0x2e1557(0x1b0)](_0x2698bd=>_0x2698bd['id']!==_0x1343f7['id']);if(_0x385da0[_0x2e1557(0x1a7)]===0x0)throw CliErrors[_0x2e1557(0x19f)](_0x2e1557(0x1a4),_0x2e1557(0x18b));return{'roles':_0x385da0,'changed':!![]};}export function projectRuntimePagePermit(_0x36d5ca){const _0xa1f226=a46_0x4a1549,_0x30792c={'menuId':_0x36d5ca['menuId'],'pageId':_0x36d5ca[_0xa1f226(0x178)],'appCode':_0x36d5ca['appCode'],'datasetCode':_0x36d5ca['datasetCode']};for(const _0xc54512 of PAGE_SLOT_SPECS){const _0x3eb9a4=_0x36d5ca[_0xc54512[_0xa1f226(0x182)]];_0x3eb9a4&&(_0x30792c[_0xc54512[_0xa1f226(0x182)]]={'resourceCode':_0x3eb9a4[_0xa1f226(0x1a2)],'resourceType':_0x3eb9a4['resourceType'],'roles':(_0x3eb9a4[_0xa1f226(0x17b)]??[])['map'](_0x310007=>({'id':_0x310007['id'],'roleName':_0x310007['roleName'],'roleType':_0x310007['roleType']}))});}return _0x30792c;}export function flattenRuntimeMenuRolePermits(_0x5f4295){const _0x3bc51f=[],_0x2f4bd3=_0x235254=>{const _0x4a57eb=a46_0x15f7;_0x3bc51f[_0x4a57eb(0x171)](_0x235254);for(const _0x36deda of _0x235254['children']??[])_0x2f4bd3(_0x36deda);};for(const _0x10e9e1 of _0x5f4295)_0x2f4bd3(_0x10e9e1);return _0x3bc51f;}export function runtimePermitWriteResult(_0x56c4fb,_0xd11e01,_0x59c689,_0x2fd057,_0x297745,_0x1d415d=[]){const _0x8dc56e=a46_0x4a1549;return{'operation':_0x56c4fb,'scope':_0x8dc56e(0x19b),'selector':_0xd11e01,'before':_0x59c689,'after':_0x2fd057,'dryRun':![],'backend':_0x297745,'warnings':_0x1d415d};}export function menuPermitDto(_0x146f7d,_0x1e5282,_0x32104f){const _0x56d65f=a46_0x4a1549;return{..._0x1e5282[_0x56d65f(0x17f)]!=null?{'id':_0x1e5282[_0x56d65f(0x17f)]}:{},'appCode':_0x146f7d,'menuId':_0x1e5282['id'],'pageId':_0x1e5282[_0x56d65f(0x178)]??null,'resourceCode':String(_0x1e5282['id']),'resourceType':'MENU','resourceName':_0x1e5282[_0x56d65f(0x1ad)],'rolePermit':_0x32104f};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a46_0x9d3956=a46_0x2bd1;function a46_0x2bd1(_0x3e26ff,_0x4d7d05){_0x3e26ff=_0x3e26ff-0x9e;const _0x249073=a46_0x2490();let _0x2bd1e8=_0x249073[_0x3e26ff];return _0x2bd1e8;}(function(_0x4f90eb,_0xceefb2){const _0x590ed2=a46_0x2bd1,_0x496e95=_0x4f90eb();while(!![]){try{const _0x34c247=-parseInt(_0x590ed2(0xd9))/0x1*(-parseInt(_0x590ed2(0xb6))/0x2)+-parseInt(_0x590ed2(0xa2))/0x3+-parseInt(_0x590ed2(0xcf))/0x4*(-parseInt(_0x590ed2(0xa7))/0x5)+parseInt(_0x590ed2(0xdd))/0x6*(parseInt(_0x590ed2(0xa1))/0x7)+-parseInt(_0x590ed2(0xd2))/0x8*(parseInt(_0x590ed2(0xbe))/0x9)+-parseInt(_0x590ed2(0xb8))/0xa+parseInt(_0x590ed2(0xcb))/0xb;if(_0x34c247===_0xceefb2)break;else _0x496e95['push'](_0x496e95['shift']());}catch(_0x5a8a33){_0x496e95['push'](_0x496e95['shift']());}}}(a46_0x2490,0x727ef));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalBff,executePersonalBff,getPersonalBff,listPersonalBffs,updatePersonalBff}from'../../core/api-client.js';import{ID_FLAG,PARAMS_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';import{parseJsonParams}from'../../utils/params.js';const FUNCTION_NAME_PATTERN=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/,FILE_FLAG={'name':a46_0x9d3956(0xd7),'type':'string','description':a46_0x9d3956(0xc7)},FUNCTION_NAME_FLAG={'name':a46_0x9d3956(0xab),'type':a46_0x9d3956(0xdf),'required':!![],'description':a46_0x9d3956(0xa8)},DESCRIPTION_FLAG={'name':a46_0x9d3956(0xc2),'type':a46_0x9d3956(0xdf),'description':'Personal\x20Backend\x20Function\x20description'},SOURCE_SESSION_FLAG={'name':'source-session-id','type':a46_0x9d3956(0xdf),'description':a46_0x9d3956(0xa5)};function normalizeFunctionName(_0x595597){const _0x354e02=a46_0x9d3956,_0x550408=String(_0x595597||'')[_0x354e02(0xc5)]();if(!_0x550408||!FUNCTION_NAME_PATTERN[_0x354e02(0xdc)](_0x550408))throw CliErrors[_0x354e02(0xc3)]('--name\x20must\x20be\x20a\x20valid\x20JavaScript\x20identifier,\x20for\x20example\x20loadOrders.');return _0x550408;}function readScriptFile(_0x280fa0){const _0x4391f7=a46_0x9d3956;if(!_0x280fa0)throw CliErrors[_0x4391f7(0xc3)](_0x4391f7(0xaa));if(!existsSync(_0x280fa0))throw CliErrors['validation'](_0x4391f7(0x9e)+_0x280fa0);if(!statSync(_0x280fa0)[_0x4391f7(0xa9)]())throw CliErrors[_0x4391f7(0xc3)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x280fa0);const _0x3bf47a=readFileSync(_0x280fa0,_0x4391f7(0xad));if(!_0x3bf47a[_0x4391f7(0xc5)]())throw CliErrors[_0x4391f7(0xc3)]('Personal\x20Backend\x20Function\x20script\x20file\x20is\x20blank.');return _0x3bf47a;}function optionalTrimmed(_0x5e0fce){const _0x432471=a46_0x9d3956,_0x491198=String(_0x5e0fce||'')[_0x432471(0xc5)]();return _0x491198||undefined;}function summarizeBff(_0x576cfc){const _0x51b5ef=a46_0x9d3956;return{'id':_0x576cfc['id'],'appCode':_0x576cfc[_0x51b5ef(0xa6)],'functionName':_0x576cfc['functionName'],'description':_0x576cfc[_0x51b5ef(0xc2)],'scriptType':_0x576cfc[_0x51b5ef(0xd1)],'version':_0x576cfc[_0x51b5ef(0xb5)],'gmtModified':_0x576cfc[_0x51b5ef(0xb2)],'updateTime':_0x576cfc[_0x51b5ef(0xc0)]};}function detailBff(_0x4c3671){const _0x1951e0=a46_0x9d3956;return{'id':_0x4c3671['id'],'appCode':_0x4c3671[_0x1951e0(0xa6)],'functionName':_0x4c3671[_0x1951e0(0xd8)],'description':_0x4c3671[_0x1951e0(0xc2)],'scriptType':_0x4c3671[_0x1951e0(0xd1)],'scriptContent':_0x4c3671[_0x1951e0(0xa0)]??'','config':_0x4c3671[_0x1951e0(0xd6)],'version':_0x4c3671['version'],'createUserId':_0x4c3671[_0x1951e0(0xba)],'gmtCreate':_0x4c3671['gmtCreate'],'gmtModified':_0x4c3671['gmtModified'],'createTime':_0x4c3671[_0x1951e0(0xce)],'updateTime':_0x4c3671['updateTime']};}function buildCreateInput(_0x3c198f){const _0x2e7087=a46_0x9d3956;return{'functionName':normalizeFunctionName(_0x3c198f[_0x2e7087(0xae)](_0x2e7087(0xab))),...optionalTrimmed(_0x3c198f[_0x2e7087(0xae)]('description'))?{'description':optionalTrimmed(_0x3c198f[_0x2e7087(0xae)](_0x2e7087(0xc2)))}:{},'scriptContent':readScriptFile(_0x3c198f[_0x2e7087(0xae)](_0x2e7087(0xd7))),...optionalTrimmed(_0x3c198f[_0x2e7087(0xae)]('source-session-id'))?{'sourceSessionId':optionalTrimmed(_0x3c198f[_0x2e7087(0xae)](_0x2e7087(0xb7)))}:{}};}function buildUpdateInput(_0x5ac12a){const _0x2d852d=a46_0x9d3956,_0x38f58e={};optionalTrimmed(_0x5ac12a[_0x2d852d(0xae)](_0x2d852d(0xab)))&&(_0x38f58e[_0x2d852d(0xd8)]=normalizeFunctionName(_0x5ac12a[_0x2d852d(0xae)]('name')));_0x5ac12a[_0x2d852d(0xe2)](_0x2d852d(0xc2))!==undefined&&(_0x38f58e[_0x2d852d(0xc2)]=_0x5ac12a[_0x2d852d(0xae)](_0x2d852d(0xc2)));optionalTrimmed(_0x5ac12a[_0x2d852d(0xae)](_0x2d852d(0xd7)))&&(_0x38f58e[_0x2d852d(0xa0)]=readScriptFile(_0x5ac12a[_0x2d852d(0xae)](_0x2d852d(0xd7))));_0x5ac12a['flag'](_0x2d852d(0xb7))!==undefined&&(_0x38f58e['sourceSessionId']=_0x5ac12a['str']('source-session-id'));if(Object[_0x2d852d(0xbd)](_0x38f58e)[_0x2d852d(0xe4)]===0x0)throw CliErrors[_0x2d852d(0xc3)](_0x2d852d(0xbc));return _0x38f58e;}function parseExecParams(_0x36b626){const _0x164e8d=a46_0x9d3956,_0x219920=parseJsonParams(_0x36b626)??{};if(Array[_0x164e8d(0xc1)](_0x219920))throw CliErrors[_0x164e8d(0xc3)](_0x164e8d(0xa3));return _0x219920;}const personalBffList={'service':'personal-bff','command':a46_0x9d3956(0xd4),'description':a46_0x9d3956(0xd3),'risk':a46_0x9d3956(0xcc),'flags':[VERBOSE_FLAG],async 'execute'(_0xcf009d){const _0x494d36=a46_0x9d3956,_0x3a5b14=await listPersonalBffs(_0xcf009d[_0x494d36(0xa6)]);return{'ok':!![],'data':{'total':_0x3a5b14[_0x494d36(0xe4)],'items':_0xcf009d['bool'](_0x494d36(0xc8))?_0x3a5b14:_0x3a5b14[_0x494d36(0xb0)](summarizeBff)}};}},personalBffDetail={'service':a46_0x9d3956(0xb3),'command':'detail','description':a46_0x9d3956(0xcd),'risk':'read','flags':[{...ID_FLAG,'description':a46_0x9d3956(0xe3)}],async 'execute'(_0x32dfaa){const _0x5f583b=a46_0x9d3956,_0x17a66e=await getPersonalBff(_0x32dfaa[_0x5f583b(0xe1)]('id'),_0x32dfaa[_0x5f583b(0xa6)]);return{'ok':!![],'data':detailBff(_0x17a66e)};}},personalBffCreate={'service':a46_0x9d3956(0xb3),'command':'create','description':a46_0x9d3956(0xda),'risk':a46_0x9d3956(0xd5),'confirmationDescription':'把本地脚本保存为Personal\x20Backend\x20Function;之后可在当前应用中调用该脚本。','flags':[FUNCTION_NAME_FLAG,{...FILE_FLAG,'required':!![]},DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x19cac4){const _0x7c4521=a46_0x9d3956,_0x135ab9=buildCreateInput(_0x19cac4),_0x166521=await createPersonalBff(_0x19cac4['appCode'],_0x135ab9);return{'ok':!![],'data':detailBff(_0x166521),'message':_0x7c4521(0xa4)+_0x166521['id']+(_0x166521['functionName']?'\x20('+_0x166521[_0x7c4521(0xd8)]+')':'')};},async 'dryRun'(_0xbed3b5){const _0x593cbe=a46_0x9d3956,_0x569373=buildCreateInput(_0xbed3b5);return dryRun(_0x593cbe(0xdb),_0x593cbe(0xbb))[_0x593cbe(0xb1)]({'appCode':_0xbed3b5[_0x593cbe(0xa6)],..._0x569373})['description'](_0x593cbe(0xde)+_0x569373['functionName'])['build']();}},personalBffUpdate={'service':'personal-bff','command':a46_0x9d3956(0xb9),'description':a46_0x9d3956(0xca),'risk':'write','confirmationDescription':a46_0x9d3956(0xac),'flags':[{...ID_FLAG,'description':a46_0x9d3956(0xe3)},{...FUNCTION_NAME_FLAG,'required':![]},FILE_FLAG,DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x461b88){const _0x1e6a35=a46_0x9d3956,_0x58f85e=_0x461b88[_0x1e6a35(0xe1)]('id'),_0x14c759=buildUpdateInput(_0x461b88),_0x517683=await updatePersonalBff(_0x58f85e,_0x461b88['appCode'],_0x14c759);return{'ok':!![],'data':detailBff(_0x517683),'message':_0x1e6a35(0xe0)+_0x517683['id']+(_0x517683[_0x1e6a35(0xd8)]?'\x20('+_0x517683[_0x1e6a35(0xd8)]+')':'')};},async 'dryRun'(_0x5d9bf5){const _0x3371ee=a46_0x9d3956,_0x3ce294=_0x5d9bf5[_0x3371ee(0xe1)]('id'),_0xf144b5=buildUpdateInput(_0x5d9bf5);return dryRun('POST',_0x3371ee(0x9f)+_0x3ce294+_0x3371ee(0xaf))['body']({'appCode':_0x5d9bf5['appCode'],..._0xf144b5})[_0x3371ee(0xc2)]('Preview:\x20update\x20Personal\x20Backend\x20Function\x20'+_0x3ce294)['build']();}},personalBffExec={'service':a46_0x9d3956(0xb3),'command':a46_0x9d3956(0xc9),'description':a46_0x9d3956(0xc6),'risk':'write','confirmationDescription':a46_0x9d3956(0xc4),'flags':[{...ID_FLAG,'description':'Personal\x20Backend\x20Function\x20script\x20ID'},{...PARAMS_FLAG,'description':a46_0x9d3956(0xbf)}],async 'validate'(_0x26c639){const _0x55f9d1=a46_0x9d3956;parseExecParams(_0x26c639[_0x55f9d1(0xae)]('params'));},async 'execute'(_0x1a9c31){const _0x27b413=a46_0x9d3956,_0x574e1e=_0x1a9c31[_0x27b413(0xe1)]('id'),_0x5c94bb=parseExecParams(_0x1a9c31[_0x27b413(0xae)](_0x27b413(0xd0))),_0x19ed5e=await executePersonalBff(_0x574e1e,_0x1a9c31[_0x27b413(0xa6)],_0x5c94bb);return{'ok':!![],'data':{'result':_0x19ed5e},'message':_0x27b413(0xb4)+_0x574e1e};}};export const personalBffDefinitions=[personalBffList,personalBffDetail,personalBffCreate,personalBffUpdate,personalBffExec];function a46_0x2490(){const _0x43c4fe=['File\x20not\x20found:\x20','/client/runtime-bff/personal/','scriptContent','1498742dKYJax','2462871hqXjzG','--params\x20must\x20be\x20a\x20JSON\x20object.','Created\x20Personal\x20Backend\x20Function\x20','Optional\x20source\x20RuntimeAgent\x20session\x20id','appCode','5XNwkol','Personal\x20Backend\x20Function\x20name,\x20for\x20example\x20loadOrders','isFile','File\x20path\x20is\x20required.','name','更新Personal\x20Backend\x20Function\x20的脚本或元信息;之后的调用将使用新版本。','utf8','str','/update','map','body','gmtModified','personal-bff','Executed\x20Personal\x20Backend\x20Function\x20','version','1094IesUUN','source-session-id','3982360OPJSCh','update','createUserId','/client/runtime-bff/personal/create','personal-bff\x20update\x20requires\x20at\x20least\x20one\x20of\x20--name,\x20--description,\x20--file,\x20or\x20--source-session-id.','keys','6759288ZpMZjI','JSON\x20object\x20passed\x20to\x20the\x20Personal\x20Backend\x20Function\x20execution','updateTime','isArray','description','validation','执行Personal\x20Backend\x20Function\x20脚本;脚本可能读取或修改业务数据,也可能调用外部服务。','trim','根据\x20ID\x20执行Personal\x20Backend\x20Function,并可传入\x20JSON\x20参数','Path\x20to\x20a\x20local\x20UTF-8\x20JavaScript\x20or\x20TypeScript\x20file','verbose','exec','根据\x20ID\x20更新Personal\x20Backend\x20Function','14894704HlDjTL','read','Show\x20one\x20Personal\x20Backend\x20Function\x20by\x20id','createTime','2724884yyDTfH','params','scriptType','8VGNUsM','List\x20current\x20user\x27s\x20Personal\x20Backend\x20Function\x20scripts\x20for\x20the\x20current\x20app','list','write','config','file','functionName','347TmMYkR','根据本地脚本文件创建Personal\x20Backend\x20Function','POST','test','6GzuNED','Preview:\x20create\x20Personal\x20Backend\x20Function\x20','string','Updated\x20Personal\x20Backend\x20Function\x20','num','flag','Personal\x20Backend\x20Function\x20script\x20ID','length'];a46_0x2490=function(){return _0x43c4fe;};return a46_0x2490();}
|
|
1
|
+
const a47_0x5add52=a47_0x541a;(function(_0x285000,_0x66077f){const _0xf0f9b1=a47_0x541a,_0x321abb=_0x285000();while(!![]){try{const _0x3bcf19=parseInt(_0xf0f9b1(0x177))/0x1+-parseInt(_0xf0f9b1(0x15a))/0x2+parseInt(_0xf0f9b1(0x16b))/0x3+parseInt(_0xf0f9b1(0x18d))/0x4+parseInt(_0xf0f9b1(0x185))/0x5*(parseInt(_0xf0f9b1(0x17b))/0x6)+parseInt(_0xf0f9b1(0x172))/0x7+-parseInt(_0xf0f9b1(0x158))/0x8;if(_0x3bcf19===_0x66077f)break;else _0x321abb['push'](_0x321abb['shift']());}catch(_0x411875){_0x321abb['push'](_0x321abb['shift']());}}}(a47_0x2f6a,0xd8737));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalBff,executePersonalBff,getPersonalBff,listPersonalBffs,updatePersonalBff}from'../../core/api-client.js';import{ID_FLAG,PARAMS_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';import{parseJsonParams}from'../../utils/params.js';const FUNCTION_NAME_PATTERN=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/,FILE_FLAG={'name':a47_0x5add52(0x169),'type':a47_0x5add52(0x193),'description':a47_0x5add52(0x182)},FUNCTION_NAME_FLAG={'name':'name','type':a47_0x5add52(0x193),'required':!![],'description':'Personal\x20Backend\x20Function\x20name,\x20for\x20example\x20loadOrders'},DESCRIPTION_FLAG={'name':a47_0x5add52(0x16d),'type':a47_0x5add52(0x193),'description':'Personal\x20Backend\x20Function\x20description'},SOURCE_SESSION_FLAG={'name':'source-session-id','type':a47_0x5add52(0x193),'description':a47_0x5add52(0x166)};function normalizeFunctionName(_0x51ca7e){const _0xffe450=a47_0x5add52,_0x55ef88=String(_0x51ca7e||'')[_0xffe450(0x161)]();if(!_0x55ef88||!FUNCTION_NAME_PATTERN[_0xffe450(0x15c)](_0x55ef88))throw CliErrors['validation'](_0xffe450(0x18e));return _0x55ef88;}function readScriptFile(_0x356e87){const _0xd88e46=a47_0x5add52;if(!_0x356e87)throw CliErrors[_0xd88e46(0x180)]('File\x20path\x20is\x20required.');if(!existsSync(_0x356e87))throw CliErrors[_0xd88e46(0x180)]('File\x20not\x20found:\x20'+_0x356e87);if(!statSync(_0x356e87)[_0xd88e46(0x179)]())throw CliErrors[_0xd88e46(0x180)](_0xd88e46(0x186)+_0x356e87);const _0xf41f08=readFileSync(_0x356e87,_0xd88e46(0x191));if(!_0xf41f08[_0xd88e46(0x161)]())throw CliErrors[_0xd88e46(0x180)](_0xd88e46(0x174));return _0xf41f08;}function optionalTrimmed(_0x25955d){const _0x3350d9=a47_0x5add52,_0x28a86e=String(_0x25955d||'')[_0x3350d9(0x161)]();return _0x28a86e||undefined;}function summarizeBff(_0x177350){const _0x3dbe1b=a47_0x5add52;return{'id':_0x177350['id'],'appCode':_0x177350[_0x3dbe1b(0x15f)],'functionName':_0x177350['functionName'],'description':_0x177350['description'],'scriptType':_0x177350[_0x3dbe1b(0x187)],'version':_0x177350[_0x3dbe1b(0x171)],'gmtModified':_0x177350[_0x3dbe1b(0x159)],'updateTime':_0x177350['updateTime']};}function a47_0x2f6a(){const _0x4e5a75=['functionName','17318616ITMDtp','gmtModified','3121172XsBzio','keys','test','build','isArray','appCode','createTime','trim','Show\x20one\x20Personal\x20Backend\x20Function\x20by\x20id','exec','personal-bff','flag','Optional\x20source\x20RuntimeAgent\x20session\x20id','params','Created\x20Personal\x20Backend\x20Function\x20','file','map','1748319HLwoTu','POST','description','source-session-id','detail','gmtCreate','version','9163203SjllmD','bool','Personal\x20Backend\x20Function\x20script\x20file\x20is\x20blank.','length','List\x20current\x20user\x27s\x20Personal\x20Backend\x20Function\x20scripts\x20for\x20the\x20current\x20app','1244753gavwRF','Personal\x20Backend\x20Function\x20script\x20ID','isFile','createUserId','30vATdUx','Updated\x20Personal\x20Backend\x20Function\x20','str','scriptContent','verbose','validation','body','Path\x20to\x20a\x20local\x20UTF-8\x20JavaScript\x20or\x20TypeScript\x20file','personal-bff\x20update\x20requires\x20at\x20least\x20one\x20of\x20--name,\x20--description,\x20--file,\x20or\x20--source-session-id.','num','61060FiSoWk','File\x20is\x20not\x20a\x20regular\x20file:\x20','scriptType','Updates\x20the\x20Personal\x20Backend\x20Function\x20script\x20or\x20metadata.\x20Later\x20calls\x20use\x20the\x20new\x20version.','/update','JSON\x20object\x20passed\x20to\x20the\x20Personal\x20Backend\x20Function\x20execution','sourceSessionId','Update\x20a\x20Personal\x20Backend\x20Function\x20by\x20ID','5657524tLRqdu','--name\x20must\x20be\x20a\x20valid\x20JavaScript\x20identifier,\x20for\x20example\x20loadOrders.','/client/runtime-bff/personal/create','updateTime','utf8','name','string','Executed\x20Personal\x20Backend\x20Function\x20','list','write'];a47_0x2f6a=function(){return _0x4e5a75;};return a47_0x2f6a();}function detailBff(_0x2839c0){const _0x7e570b=a47_0x5add52;return{'id':_0x2839c0['id'],'appCode':_0x2839c0[_0x7e570b(0x15f)],'functionName':_0x2839c0[_0x7e570b(0x157)],'description':_0x2839c0[_0x7e570b(0x16d)],'scriptType':_0x2839c0[_0x7e570b(0x187)],'scriptContent':_0x2839c0['scriptContent']??'','config':_0x2839c0['config'],'version':_0x2839c0[_0x7e570b(0x171)],'createUserId':_0x2839c0[_0x7e570b(0x17a)],'gmtCreate':_0x2839c0[_0x7e570b(0x170)],'gmtModified':_0x2839c0[_0x7e570b(0x159)],'createTime':_0x2839c0[_0x7e570b(0x160)],'updateTime':_0x2839c0[_0x7e570b(0x190)]};}function buildCreateInput(_0x8578b5){const _0x13160b=a47_0x5add52;return{'functionName':normalizeFunctionName(_0x8578b5[_0x13160b(0x17d)](_0x13160b(0x192))),...optionalTrimmed(_0x8578b5['str'](_0x13160b(0x16d)))?{'description':optionalTrimmed(_0x8578b5[_0x13160b(0x17d)](_0x13160b(0x16d)))}:{},'scriptContent':readScriptFile(_0x8578b5[_0x13160b(0x17d)](_0x13160b(0x169))),...optionalTrimmed(_0x8578b5['str'](_0x13160b(0x16e)))?{'sourceSessionId':optionalTrimmed(_0x8578b5[_0x13160b(0x17d)](_0x13160b(0x16e)))}:{}};}function buildUpdateInput(_0x1dc61f){const _0x1d7589=a47_0x5add52,_0x417719={};optionalTrimmed(_0x1dc61f[_0x1d7589(0x17d)]('name'))&&(_0x417719[_0x1d7589(0x157)]=normalizeFunctionName(_0x1dc61f[_0x1d7589(0x17d)](_0x1d7589(0x192))));_0x1dc61f[_0x1d7589(0x165)](_0x1d7589(0x16d))!==undefined&&(_0x417719[_0x1d7589(0x16d)]=_0x1dc61f[_0x1d7589(0x17d)](_0x1d7589(0x16d)));optionalTrimmed(_0x1dc61f[_0x1d7589(0x17d)](_0x1d7589(0x169)))&&(_0x417719[_0x1d7589(0x17e)]=readScriptFile(_0x1dc61f[_0x1d7589(0x17d)](_0x1d7589(0x169))));_0x1dc61f['flag'](_0x1d7589(0x16e))!==undefined&&(_0x417719[_0x1d7589(0x18b)]=_0x1dc61f['str'](_0x1d7589(0x16e)));if(Object[_0x1d7589(0x15b)](_0x417719)[_0x1d7589(0x175)]===0x0)throw CliErrors['validation'](_0x1d7589(0x183));return _0x417719;}function parseExecParams(_0x583f9c){const _0x267ab4=a47_0x5add52,_0x2d54fa=parseJsonParams(_0x583f9c)??{};if(Array[_0x267ab4(0x15e)](_0x2d54fa))throw CliErrors[_0x267ab4(0x180)]('--params\x20must\x20be\x20a\x20JSON\x20object.');return _0x2d54fa;}function a47_0x541a(_0x4507dc,_0x3589ed){_0x4507dc=_0x4507dc-0x157;const _0x2f6aa4=a47_0x2f6a();let _0x541aed=_0x2f6aa4[_0x4507dc];return _0x541aed;}const personalBffList={'service':a47_0x5add52(0x164),'command':a47_0x5add52(0x195),'description':a47_0x5add52(0x176),'risk':'read','flags':[VERBOSE_FLAG],async 'execute'(_0x50c323){const _0xbd164b=a47_0x5add52,_0x426725=await listPersonalBffs(_0x50c323[_0xbd164b(0x15f)]);return{'ok':!![],'data':{'total':_0x426725[_0xbd164b(0x175)],'items':_0x50c323[_0xbd164b(0x173)](_0xbd164b(0x17f))?_0x426725:_0x426725[_0xbd164b(0x16a)](summarizeBff)}};}},personalBffDetail={'service':a47_0x5add52(0x164),'command':a47_0x5add52(0x16f),'description':a47_0x5add52(0x162),'risk':'read','flags':[{...ID_FLAG,'description':a47_0x5add52(0x178)}],async 'execute'(_0x6c5b77){const _0x5eb7f9=a47_0x5add52,_0xd4f15a=await getPersonalBff(_0x6c5b77[_0x5eb7f9(0x184)]('id'),_0x6c5b77[_0x5eb7f9(0x15f)]);return{'ok':!![],'data':detailBff(_0xd4f15a)};}},personalBffCreate={'service':a47_0x5add52(0x164),'command':'create','description':'Create\x20a\x20Personal\x20Backend\x20Function\x20from\x20a\x20local\x20script\x20file','risk':a47_0x5add52(0x196),'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'(_0x3a6127){const _0x47ffc3=a47_0x5add52,_0xdbc025=buildCreateInput(_0x3a6127),_0x42c0e7=await createPersonalBff(_0x3a6127[_0x47ffc3(0x15f)],_0xdbc025);return{'ok':!![],'data':detailBff(_0x42c0e7),'message':_0x47ffc3(0x168)+_0x42c0e7['id']+(_0x42c0e7[_0x47ffc3(0x157)]?'\x20('+_0x42c0e7[_0x47ffc3(0x157)]+')':'')};},async 'dryRun'(_0x1ac040){const _0x2d5996=a47_0x5add52,_0x29c537=buildCreateInput(_0x1ac040);return dryRun(_0x2d5996(0x16c),_0x2d5996(0x18f))[_0x2d5996(0x181)]({'appCode':_0x1ac040[_0x2d5996(0x15f)],..._0x29c537})['description']('Preview:\x20create\x20Personal\x20Backend\x20Function\x20'+_0x29c537[_0x2d5996(0x157)])['build']();}},personalBffUpdate={'service':a47_0x5add52(0x164),'command':'update','description':a47_0x5add52(0x18c),'risk':a47_0x5add52(0x196),'confirmationDescription':a47_0x5add52(0x188),'flags':[{...ID_FLAG,'description':a47_0x5add52(0x178)},{...FUNCTION_NAME_FLAG,'required':![]},FILE_FLAG,DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x6e033e){const _0x4849db=a47_0x5add52,_0x12fef0=_0x6e033e[_0x4849db(0x184)]('id'),_0x23e5fa=buildUpdateInput(_0x6e033e),_0x21da04=await updatePersonalBff(_0x12fef0,_0x6e033e['appCode'],_0x23e5fa);return{'ok':!![],'data':detailBff(_0x21da04),'message':_0x4849db(0x17c)+_0x21da04['id']+(_0x21da04[_0x4849db(0x157)]?'\x20('+_0x21da04[_0x4849db(0x157)]+')':'')};},async 'dryRun'(_0x1f9ee0){const _0x25039e=a47_0x5add52,_0x57122c=_0x1f9ee0[_0x25039e(0x184)]('id'),_0x159de7=buildUpdateInput(_0x1f9ee0);return dryRun(_0x25039e(0x16c),'/client/runtime-bff/personal/'+_0x57122c+_0x25039e(0x189))[_0x25039e(0x181)]({'appCode':_0x1f9ee0[_0x25039e(0x15f)],..._0x159de7})[_0x25039e(0x16d)]('Preview:\x20update\x20Personal\x20Backend\x20Function\x20'+_0x57122c)[_0x25039e(0x15d)]();}},personalBffExec={'service':a47_0x5add52(0x164),'command':a47_0x5add52(0x163),'description':'Execute\x20a\x20Personal\x20Backend\x20Function\x20by\x20ID,\x20optionally\x20with\x20JSON\x20params','risk':'write','confirmationDescription':'Runs\x20the\x20Personal\x20Backend\x20Function\x20script.\x20The\x20script\x20may\x20read\x20or\x20change\x20business\x20data,\x20or\x20call\x20external\x20services.','flags':[{...ID_FLAG,'description':a47_0x5add52(0x178)},{...PARAMS_FLAG,'description':a47_0x5add52(0x18a)}],async 'validate'(_0x194e07){const _0x470cc4=a47_0x5add52;parseExecParams(_0x194e07[_0x470cc4(0x17d)](_0x470cc4(0x167)));},async 'execute'(_0x4fa007){const _0x2a9c3b=a47_0x5add52,_0xd0d431=_0x4fa007['num']('id'),_0xae1e23=parseExecParams(_0x4fa007[_0x2a9c3b(0x17d)](_0x2a9c3b(0x167))),_0x4b4858=await executePersonalBff(_0xd0d431,_0x4fa007[_0x2a9c3b(0x15f)],_0xae1e23);return{'ok':!![],'data':{'result':_0x4b4858},'message':_0x2a9c3b(0x194)+_0xd0d431};}};export const personalBffDefinitions=[personalBffList,personalBffDetail,personalBffCreate,personalBffUpdate,personalBffExec];
|
package/lib/commands/registry.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a48_0x170c4b=a48_0x61a3;(function(_0x4b1903,_0x10c8cd){const _0x48b4dc=a48_0x61a3,_0x138e41=_0x4b1903();while(!![]){try{const _0x4132b1=-parseInt(_0x48b4dc(0x108))/0x1+-parseInt(_0x48b4dc(0xfa))/0x2*(-parseInt(_0x48b4dc(0xea))/0x3)+-parseInt(_0x48b4dc(0xe0))/0x4+parseInt(_0x48b4dc(0x10b))/0x5*(parseInt(_0x48b4dc(0xe2))/0x6)+-parseInt(_0x48b4dc(0xfd))/0x7+-parseInt(_0x48b4dc(0x10a))/0x8*(parseInt(_0x48b4dc(0xf8))/0x9)+parseInt(_0x48b4dc(0xf9))/0xa;if(_0x4132b1===_0x10c8cd)break;else _0x138e41['push'](_0x138e41['shift']());}catch(_0xac686b){_0x138e41['push'](_0x138e41['shift']());}}}(a48_0x566a,0x88693));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';function a48_0x61a3(_0x2f9dde,_0x522144){_0x2f9dde=_0x2f9dde-0xd5;const _0x566a35=a48_0x566a();let _0x61a3b=_0x566a35[_0x2f9dde];return _0x61a3b;}import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{dataDefinitions}from'../commands/data/index.js';import{kbDefinitions}from'../commands/kb/index.js';import{artifactDefinitions}from'../commands/artifact/index.js';import{personalBffDefinitions}from'../commands/personal-bff/index.js';import{apiDocDefinitions}from'../commands/api-doc/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';import{fileDefinitions}from'../commands/file/index.js';import{ocrDefinitions}from'../commands/ocr/index.js';import{scheduleDefinitions}from'../commands/schedule/index.js';function a48_0x566a(){const _0x339d8c=['495646aJjcCm','init','1354384RnLkxf','220UCfNdX','description','show','Configuration','App\x20Management','Self\x20Update','login','Runtime\x20App\x20Config','auth','Schema','`lovrabet\x20app\x20use`\x20has\x20been\x20removed.','run','Diagnostics','93580AngxRm','Datasets','54798GcNmie','app','defaultCommand','push','list','\x20\x20[high-risk-write]','use','File','3241689uBUrCH','Runtime\x20Permissions','`lovrabet\x20auth\x20init`\x20has\x20been\x20removed.','install','write','Personal\x20Backend\x20Function','Service\x20Tree','logs','app\x20init','Authentication','map','isSingleCommand','set','SQL\x20Queries','54UEnmZz','12529590ADMSIq','2fRaYJJ','Use\x20`lovrabet\x20workspace\x20init\x20--appcode\x20<code>`\x20instead.','OCR','4492642FQwsta','config-list','values','`lovrabet\x20logs\x20clear`\x20has\x20been\x20removed.','\x20\x20[write]','auth\x20init','get','service','command','read','User\x20Accounts'];a48_0x566a=function(){return _0x339d8c;};return a48_0x566a();}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(_0x4b4ea4){const _0x4cc713=a48_0x61a3;for(const _0x44a4be of _0x4b4ea4){definitions[_0x4cc713(0xf6)](_0x44a4be['service']+':'+_0x44a4be[_0x4cc713(0x105)],_0x44a4be);let _0x1b50b1=serviceGroups[_0x4cc713(0x103)](_0x44a4be[_0x4cc713(0x104)]);!_0x1b50b1&&(_0x1b50b1=[],serviceGroups[_0x4cc713(0xf6)](_0x44a4be['service'],_0x1b50b1)),_0x1b50b1[_0x4cc713(0xe5)](_0x44a4be);}}function registerService(_0x5205e8,_0x598e9d,_0x5ceeb3){const _0x3ecbf5=a48_0x61a3;registerDefinitions(_0x598e9d);const _0x134c01=_0x3f690f=>_0x3f690f===_0x3ecbf5(0x106)?'':_0x3f690f===_0x3ecbf5(0xee)?_0x3ecbf5(0x101):_0x3ecbf5(0xe7),_0x1039bc={'service':_0x598e9d[0x0]['service'],'label':_0x5205e8,'commands':_0x598e9d[_0x3ecbf5(0xf4)](_0x288bc7=>({'command':_0x288bc7[_0x3ecbf5(0x105)],'description':_0x288bc7[_0x3ecbf5(0x10c)],'tag':_0x134c01(_0x288bc7['risk'])})),'defaultCommand':_0x5ceeb3?.[_0x3ecbf5(0xe4)]??(_0x5ceeb3?.[_0x3ecbf5(0xf5)]?_0x598e9d[0x0][_0x3ecbf5(0x105)]:undefined),'isSingleCommand':_0x5ceeb3?.[_0x3ecbf5(0xf5)]};serviceRegistry[_0x3ecbf5(0xe5)](_0x1039bc),serviceByName[_0x3ecbf5(0xf6)](_0x1039bc[_0x3ecbf5(0x104)],_0x1039bc);}registerService(a48_0x170c4b(0xf3),authDefinitions,{'defaultCommand':a48_0x170c4b(0xd9)}),registerService(a48_0x170c4b(0x107),userAccountDefinitions),registerService(a48_0x170c4b(0xd7),appDefinitions,{'defaultCommand':a48_0x170c4b(0xe6)}),registerService('Workspace',workspaceDefinitions),registerService(a48_0x170c4b(0xda),appConfigDefinitions),registerService(a48_0x170c4b(0xd6),configDefinitions,{'defaultCommand':'list'}),registerService('Runtime\x20Roles',roleDefinitions,{'defaultCommand':a48_0x170c4b(0xe6)}),registerService(a48_0x170c4b(0xeb),permitDefinitions),registerService('API\x20Documentation',apiDocDefinitions),registerService(a48_0x170c4b(0xe1),datasetDefinitions),registerService('Instant\x20API',dataDefinitions),registerService(a48_0x170c4b(0xf7),sqlDefinitions),registerService('Backend\x20Function\x20Scripts',bffDefinitions),registerService(a48_0x170c4b(0xef),personalBffDefinitions),registerService('Artifacts',artifactDefinitions),registerService(a48_0x170c4b(0xe9),fileDefinitions),registerService(a48_0x170c4b(0xfc),ocrDefinitions),registerService('Knowledge\x20Base',kbDefinitions),registerService('Notification\x20Configs',notificationDefinitions,{'defaultCommand':a48_0x170c4b(0xfe)}),registerService('Agent\x20Schedules',scheduleDefinitions,{'defaultCommand':a48_0x170c4b(0xe6)}),registerService(a48_0x170c4b(0xf0),serviceDefinitions,{'defaultCommand':'list'}),registerService('Skills',skillDefinitions,{'defaultCommand':a48_0x170c4b(0xed)}),registerService('CLI\x20Built-in\x20Skill',cliSkillDefinitions,{'defaultCommand':a48_0x170c4b(0xed)}),registerService(a48_0x170c4b(0xd8),[updateDefinition],{'defaultCommand':a48_0x170c4b(0xde),'isSingleCommand':!![]}),registerService(a48_0x170c4b(0xdf),[doctorDefinition],{'isSingleCommand':!![]}),registerService(a48_0x170c4b(0xdc),[schemaDefinition],{'isSingleCommand':!![]}),registerService('Logs',logsDefinitions,{'defaultCommand':a48_0x170c4b(0xd5)});export function findDefinition(_0xb5285e,_0x3a0ed7){const _0x5c53db=a48_0x170c4b;return definitions[_0x5c53db(0x103)](_0xb5285e+':'+_0x3a0ed7);}export function resolveRemovedCommand(_0x268dfc,_0x3a10be){const _0x171a74=a48_0x170c4b;if(_0x268dfc===_0x171a74(0xdb)&&_0x3a10be===_0x171a74(0x109))return{'command':_0x171a74(0x102),'message':_0x171a74(0xec),'hint':'Use\x20`lovrabet\x20config\x20init`\x20for\x20node\x20configuration,\x20then\x20`lovrabet\x20auth\x20login`\x20for\x20AccessKey\x20authentication.'};if(_0x268dfc===_0x171a74(0xe3)&&_0x3a10be==='init')return{'command':_0x171a74(0xf2),'message':'`lovrabet\x20app\x20init`\x20has\x20been\x20removed.','hint':_0x171a74(0xfb)};if(_0x268dfc==='app'&&_0x3a10be===_0x171a74(0xe8))return{'command':'app\x20use','message':_0x171a74(0xdd),'hint':'Use\x20`lovrabet\x20workspace\x20use\x20--app\x20<name>`\x20instead.'};if(_0x268dfc===_0x171a74(0xf1)&&_0x3a10be==='clear')return{'command':'logs\x20clear','message':_0x171a74(0x100),'hint':'Use\x20`lovrabet\x20logs\x20show`\x20to\x20view\x20command\x20history.'};return undefined;}export function isKnownService(_0x119b24){return serviceByName['has'](_0x119b24);}export function getServiceEntry(_0x16b05a){return serviceByName['get'](_0x16b05a);}export function getAllDefinitions(){const _0x2977cf=a48_0x170c4b;return Array['from'](definitions[_0x2977cf(0xff)]());}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a49_0x1d118d=a49_0x5340;(function(_0x4d5db6,_0x546477){const _0x17000c=a49_0x5340,_0x4053e6=_0x4d5db6();while(!![]){try{const _0x2767ad=-parseInt(_0x17000c(0xd5))/0x1+-parseInt(_0x17000c(0xbb))/0x2*(-parseInt(_0x17000c(0xd2))/0x3)+-parseInt(_0x17000c(0xc4))/0x4+-parseInt(_0x17000c(0xcb))/0x5+parseInt(_0x17000c(0xd4))/0x6*(parseInt(_0x17000c(0xd1))/0x7)+-parseInt(_0x17000c(0xca))/0x8*(-parseInt(_0x17000c(0xbc))/0x9)+-parseInt(_0x17000c(0xc1))/0xa*(-parseInt(_0x17000c(0xce))/0xb);if(_0x2767ad===_0x546477)break;else _0x4053e6['push'](_0x4053e6['shift']());}catch(_0x2b9e64){_0x4053e6['push'](_0x4053e6['shift']());}}}(a49_0x3673,0x7c441));import{createRuntimeAppRole}from'../../core/api-client.js';function a49_0x5340(_0x4bf9b0,_0xdf1bbf){_0x4bf9b0=_0x4bf9b0-0xb9;const _0x3673e3=a49_0x3673();let _0x5340ae=_0x3673e3[_0x4bf9b0];return _0x5340ae;}import{CliErrors}from'../../errors.js';function a49_0x3673(){const _0x3169c8=['body','name','validation','high-risk-write','326728LVEoJt','3309985tAoAVN','/client/permit/role/create','Optional\x20role\x20remark','98846DExeEb','create','role','245KlbZrq','1029867JynREO','remark','76158NkuPvn','155012ysGUOc','Preview:\x20create\x20a\x20runtime\x20CUSTOM\x20role','Creates\x20a\x20custom\x20role\x20in\x20the\x20current\x20runtime\x20app.\x20After\x20creation\x20it\x20can\x20be\x20used\x20for\x20member\x20and\x20resource\x20permissions.','str','2qmUDlB','198bOaANv','CUSTOM','appCode','trim','POST','610JmVmcn','--name\x20must\x20not\x20be\x20blank.','Role\x20name','3632760eWUriG','string'];a49_0x3673=function(){return _0x3169c8;};return a49_0x3673();}import{dryRun}from'../../framework/dryrun.js';import{projectRuntimeRole,runtimeRoleWriteResult}from'../../commands/role/shared.js';function input(_0x57c8f1){const _0x513877=a49_0x5340,_0x32b5c6=_0x57c8f1[_0x513877(0xba)](_0x513877(0xc7))[_0x513877(0xbf)]();if(!_0x32b5c6)throw CliErrors[_0x513877(0xc8)](_0x513877(0xc2));const _0x763cc5=_0x57c8f1['str'](_0x513877(0xd3))[_0x513877(0xbf)]();return{'appCode':_0x57c8f1[_0x513877(0xbe)],'roleName':_0x32b5c6,..._0x763cc5?{'remark':_0x763cc5}:{}};}export const roleCreate={'service':a49_0x1d118d(0xd0),'command':a49_0x1d118d(0xcf),'description':'Create\x20a\x20runtime\x20CUSTOM\x20role','risk':a49_0x1d118d(0xc9),'confirmationDescription':a49_0x1d118d(0xb9),'flags':[{'name':a49_0x1d118d(0xc7),'type':a49_0x1d118d(0xc5),'required':!![],'description':a49_0x1d118d(0xc3)},{'name':a49_0x1d118d(0xd3),'type':a49_0x1d118d(0xc5),'description':a49_0x1d118d(0xcd)}],async 'validate'(_0xc58593){input(_0xc58593);},async 'dryRun'(_0x32454d){const _0x121f19=a49_0x1d118d;return dryRun('POST',_0x121f19(0xcc))[_0x121f19(0xc6)]({'roleType':_0x121f19(0xbd),...input(_0x32454d)})['description'](_0x121f19(0xd6))['build']();},async 'execute'(_0x43e9a7){const _0x1c8e02=a49_0x1d118d,_0x2e72b6=await createRuntimeAppRole(input(_0x43e9a7));return{'ok':!![],'data':runtimeRoleWriteResult(_0x1c8e02(0xcf),{'roleId':_0x2e72b6['id']},null,projectRuntimeRole(_0x2e72b6),{'method':_0x1c8e02(0xc0),'path':_0x1c8e02(0xcc)})};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a50_0x550f(_0x41f3b0,_0x5a891e){_0x41f3b0=_0x41f3b0-0x1dd;const _0x53f416=a50_0x53f4();let _0x550fe1=_0x53f416[_0x41f3b0];return _0x550fe1;}const a50_0x5f21cc=a50_0x550f;(function(_0x1e9521,_0x989905){const _0x4cb51b=a50_0x550f,_0x1fb42b=_0x1e9521();while(!![]){try{const _0x2889de=parseInt(_0x4cb51b(0x1f0))/0x1*(parseInt(_0x4cb51b(0x1f2))/0x2)+parseInt(_0x4cb51b(0x1de))/0x3*(-parseInt(_0x4cb51b(0x1e3))/0x4)+parseInt(_0x4cb51b(0x1e2))/0x5+parseInt(_0x4cb51b(0x1dd))/0x6*(parseInt(_0x4cb51b(0x1e5))/0x7)+parseInt(_0x4cb51b(0x1ef))/0x8*(-parseInt(_0x4cb51b(0x1e0))/0x9)+parseInt(_0x4cb51b(0x1e7))/0xa*(-parseInt(_0x4cb51b(0x1ec))/0xb)+-parseInt(_0x4cb51b(0x1ee))/0xc*(parseInt(_0x4cb51b(0x1e9))/0xd);if(_0x2889de===_0x989905)break;else _0x1fb42b['push'](_0x1fb42b['shift']());}catch(_0x1b1633){_0x1fb42b['push'](_0x1fb42b['shift']());}}}(a50_0x53f4,0x87aeb));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(_0x5d3664){const _0x22baaa=a50_0x550f,_0x4f92fa=await getRuntimeRoleById(_0x5d3664['appCode'],_0x5d3664[_0x22baaa(0x1e6)]('id'));return assertCustomRuntimeRole(_0x4f92fa,_0x22baaa(0x1ea)),_0x4f92fa;}function a50_0x53f4(){const _0x4db9e5=['build','1740530GINqze','44NoASRD','Delete\x20a\x20runtime\x20CUSTOM\x20role','3821062BdULdP','num','340540SKVcea','Preview:\x20delete\x20a\x20runtime\x20CUSTOM\x20role','3302wcPBUP','delete','role','242mvEJzX','description','10404RxSmXW','78312KseOba','3JPjpRj','high-risk-write','657084QzFzGv','POST','6ytEygY','83316DAekyo','body','45oiSUid'];a50_0x53f4=function(){return _0x4db9e5;};return a50_0x53f4();}export const roleDelete={'service':a50_0x5f21cc(0x1eb),'command':a50_0x5f21cc(0x1ea),'description':a50_0x5f21cc(0x1e4),'risk':a50_0x5f21cc(0x1f1),'confirmationDescription':'Deletes\x20the\x20custom\x20role\x20in\x20the\x20current\x20runtime\x20app.\x20Membership\x20and\x20permission\x20config\x20for\x20that\x20role\x20may\x20become\x20invalid.','flags':[ROLE_ID_FLAG],async 'dryRun'(_0x474070){const _0x4c1af7=a50_0x5f21cc,_0x486059=await prepare(_0x474070);return dryRun(_0x4c1af7(0x1f3),'/client/permit/role/delete')[_0x4c1af7(0x1df)]({'id':_0x486059['id']})[_0x4c1af7(0x1ed)](_0x4c1af7(0x1e8))[_0x4c1af7(0x1e1)]();},async 'execute'(_0x500e83){const _0x4a6657=a50_0x5f21cc,_0x287cfd=await prepare(_0x500e83);return await deleteRuntimeAppRole(_0x287cfd['id']),{'ok':!![],'data':runtimeRoleWriteResult(_0x4a6657(0x1ea),{'roleId':_0x287cfd['id']},projectRuntimeRole(_0x287cfd),null,{'method':_0x4a6657(0x1f3),'path':'/client/permit/role/delete'})};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a51_0xc4c204=a51_0x13b5;(function(_0x49f61b,_0x19ac6d){const _0x5a6a04=a51_0x13b5,_0x3d83c2=_0x49f61b();while(!![]){try{const _0x131ae0=parseInt(_0x5a6a04(0x16b))/0x1+parseInt(_0x5a6a04(0x16a))/0x2*(parseInt(_0x5a6a04(0x171))/0x3)+-parseInt(_0x5a6a04(0x173))/0x4*(parseInt(_0x5a6a04(0x174))/0x5)+parseInt(_0x5a6a04(0x170))/0x6+parseInt(_0x5a6a04(0x16f))/0x7+-parseInt(_0x5a6a04(0x176))/0x8+-parseInt(_0x5a6a04(0x172))/0x9;if(_0x131ae0===_0x19ac6d)break;else _0x3d83c2['push'](_0x3d83c2['shift']());}catch(_0x4c79ff){_0x3d83c2['push'](_0x3d83c2['shift']());}}}(a51_0x5f52,0xe21b4));import{getRuntimeRoleById,projectRuntimeRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';function a51_0x13b5(_0x436942,_0x11c10e){_0x436942=_0x436942-0x16a;const _0x5f52a6=a51_0x5f52();let _0x13b518=_0x5f52a6[_0x436942];return _0x13b518;}function a51_0x5f52(){const _0x5f5102=['13815248HuAJdf','appCode','132vjLgYd','1519897oIzGvv','runtime','role','Show\x20one\x20runtime\x20role\x20by\x20ID','7132433ZwcljE','10472046AGYIXl','6921wNOmQK','10032651mxmhDC','52TNdIYC','257170EHFbyA','num'];a51_0x5f52=function(){return _0x5f5102;};return a51_0x5f52();}export const roleDetail={'service':a51_0xc4c204(0x16d),'command':'detail','description':a51_0xc4c204(0x16e),'risk':'read','flags':[ROLE_ID_FLAG],async 'execute'(_0x10b417){const _0x5ede49=a51_0xc4c204,_0x36b0db=await getRuntimeRoleById(_0x10b417[_0x5ede49(0x177)],_0x10b417[_0x5ede49(0x175)]('id'));return{'ok':!![],'data':{'scope':_0x5ede49(0x16c),'role':projectRuntimeRole(_0x36b0db)}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x27ea31,_0x3b3aa1){const _0x59b1ff=a52_0x2d8c,_0x101a5b=_0x27ea31();while(!![]){try{const _0x52d59e=-parseInt(_0x59b1ff(0x85))/0x1+-parseInt(_0x59b1ff(0x87))/0x2+-parseInt(_0x59b1ff(0x88))/0x3+parseInt(_0x59b1ff(0x8c))/0x4+-parseInt(_0x59b1ff(0x86))/0x5+-parseInt(_0x59b1ff(0x89))/0x6+-parseInt(_0x59b1ff(0x8b))/0x7*(-parseInt(_0x59b1ff(0x8a))/0x8);if(_0x52d59e===_0x3b3aa1)break;else _0x101a5b['push'](_0x101a5b['shift']());}catch(_0x509a98){_0x101a5b['push'](_0x101a5b['shift']());}}}(a52_0x8e44,0x431e0));import{roleList}from'../../commands/role/list.js';import{roleDetail}from'../../commands/role/detail.js';import{roleCreate}from'../../commands/role/create.js';function a52_0x8e44(){const _0x1347bd=['2477650XjNBIP','1018146FZrzJq','320673smpTdq','1426374TpoTkb','16myxclL','5867953PayvFF','272324YIbWQL','120504oltgOw'];a52_0x8e44=function(){return _0x1347bd;};return a52_0x8e44();}import{roleUpdate}from'../../commands/role/update.js';import{roleDelete}from'../../commands/role/delete.js';import{roleUserAdd}from'../../commands/role/user-add.js';function a52_0x2d8c(_0x3afd3b,_0x412ebf){_0x3afd3b=_0x3afd3b-0x85;const _0x8e44f7=a52_0x8e44();let _0x2d8c1e=_0x8e44f7[_0x3afd3b];return _0x2d8c1e;}import{roleUserRemove}from'../../commands/role/user-remove.js';export const roleDefinitions=[roleList,roleDetail,roleCreate,roleUpdate,roleDelete,roleUserAdd,roleUserRemove];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a53_0x546744=a53_0x1eed;function a53_0x1dbc(){const _0x1bea73=['1165449ejwGZt','includes','Page\x20number','num','page','list','trim','8564dwDQGd','str','9257710GLuUcY','Fuzzy\x20role-name\x20filter','18cuxpDQ','map','360829TIviDz','153WnUBpA','slice','number','1xQsklO','filter','--page\x20must\x20be\x20a\x20positive\x20integer.','type','Runtime\x20role\x20type','string','isSafeInteger','validation','Invalid\x20runtime\x20role\x20type:\x20','pagesize','role','paging','1055ButvWL','appCode','42441003MQSnOI','361864VNYUXj','name','runtime','List\x20runtime\x20roles\x20for\x20the\x20current\x20app','roleType','1072208olblJA'];a53_0x1dbc=function(){return _0x1bea73;};return a53_0x1dbc();}(function(_0x2429be,_0x4b428){const _0x4d5671=a53_0x1eed,_0x1daf1a=_0x2429be();while(!![]){try{const _0x166d03=-parseInt(_0x4d5671(0x109))/0x1*(parseInt(_0x4d5671(0xf7))/0x2)+-parseInt(_0x4d5671(0xf8))/0x3+-parseInt(_0x4d5671(0xff))/0x4*(parseInt(_0x4d5671(0xef))/0x5)+-parseInt(_0x4d5671(0x103))/0x6*(parseInt(_0x4d5671(0x105))/0x7)+parseInt(_0x4d5671(0xf2))/0x8*(-parseInt(_0x4d5671(0x106))/0x9)+-parseInt(_0x4d5671(0x101))/0xa+parseInt(_0x4d5671(0xf1))/0xb;if(_0x166d03===_0x4b428)break;else _0x1daf1a['push'](_0x1daf1a['shift']());}catch(_0x3db4a9){_0x1daf1a['push'](_0x1daf1a['shift']());}}}(a53_0x1dbc,0x9a6f2));import{listRuntimeAppRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a53_0x1eed(_0x19806d,_0x34adf8){_0x19806d=_0x19806d-0xe9;const _0x1dbce8=a53_0x1dbc();let _0x1eed84=_0x1dbce8[_0x19806d];return _0x1eed84;}import{listAllRuntimeRoles,projectRuntimeRole,RUNTIME_ROLE_TYPES}from'../../commands/role/shared.js';export const roleList={'service':a53_0x546744(0xed),'command':a53_0x546744(0xfd),'description':a53_0x546744(0xf5),'risk':'read','flags':[{'name':a53_0x546744(0x10c),'type':a53_0x546744(0x10e),'enum':RUNTIME_ROLE_TYPES,'description':a53_0x546744(0x10d)},{'name':a53_0x546744(0xf3),'type':'string','description':a53_0x546744(0x102)},{'name':a53_0x546744(0xfc),'type':'number','default':0x1,'description':a53_0x546744(0xfa)},{'name':a53_0x546744(0xec),'type':a53_0x546744(0x108),'default':0x64,'description':'Page\x20size\x20from\x201\x20to\x20100'}],async 'validate'(_0x50aa36){const _0x48fb03=a53_0x546744,_0x26c837=_0x50aa36[_0x48fb03(0x100)]('type')['toUpperCase']();if(_0x26c837&&!RUNTIME_ROLE_TYPES[_0x48fb03(0xf9)](_0x26c837))throw CliErrors['validation'](_0x48fb03(0xeb)+_0x26c837+'.');const _0xf4aa5c=_0x50aa36['num'](_0x48fb03(0xfc),0x1),_0x375b0d=_0x50aa36[_0x48fb03(0xfb)](_0x48fb03(0xec),0x64);if(!Number['isSafeInteger'](_0xf4aa5c)||_0xf4aa5c<0x1)throw CliErrors['validation'](_0x48fb03(0x10b));if(!Number[_0x48fb03(0xe9)](_0x375b0d)||_0x375b0d<0x1||_0x375b0d>0x64)throw CliErrors[_0x48fb03(0xea)]('--pagesize\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.');},async 'execute'(_0x54c144){const _0x5bc3c9=a53_0x546744,_0x3f5474=_0x54c144[_0x5bc3c9(0x100)](_0x5bc3c9(0x10c))['toUpperCase'](),_0x3a0667=_0x54c144[_0x5bc3c9(0x100)](_0x5bc3c9(0xf3))[_0x5bc3c9(0xfe)](),_0x2ecdc7=_0x54c144[_0x5bc3c9(0xfb)]('page',0x1),_0x387db1=_0x54c144[_0x5bc3c9(0xfb)](_0x5bc3c9(0xec),0x64);if(_0x3f5474){const _0x3438e7=(await listAllRuntimeRoles(_0x54c144[_0x5bc3c9(0xf0)],{..._0x3a0667?{'roleName':_0x3a0667}:{}}))[_0x5bc3c9(0x10a)](_0x4e5c7f=>_0x4e5c7f[_0x5bc3c9(0xf6)]===_0x3f5474),_0x2e3d1b=(_0x2ecdc7-0x1)*_0x387db1;return{'ok':!![],'data':{'scope':_0x5bc3c9(0xf4),'roles':_0x3438e7[_0x5bc3c9(0x107)](_0x2e3d1b,_0x2e3d1b+_0x387db1)[_0x5bc3c9(0x104)](projectRuntimeRole),'paging':{'currentPage':_0x2ecdc7,'pageSize':_0x387db1,'totalCount':_0x3438e7['length']}}};}const _0x46eca3=await listRuntimeAppRoles(_0x54c144['appCode'],{..._0x3a0667?{'roleName':_0x3a0667}:{},'currentPage':_0x2ecdc7,'pageSize':_0x387db1});return{'ok':!![],'data':{'scope':_0x5bc3c9(0xf4),'roles':_0x46eca3['items'][_0x5bc3c9(0x104)](projectRuntimeRole),'paging':_0x46eca3[_0x5bc3c9(0xee)]}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a53_0x1790ff=a53_0x3498;(function(_0x2c2643,_0x46b5d8){const _0x538973=a53_0x3498,_0xa38d77=_0x2c2643();while(!![]){try{const _0xd34ff7=-parseInt(_0x538973(0xbe))/0x1*(-parseInt(_0x538973(0xe2))/0x2)+parseInt(_0x538973(0xce))/0x3+-parseInt(_0x538973(0xf7))/0x4*(parseInt(_0x538973(0xb9))/0x5)+parseInt(_0x538973(0xcd))/0x6*(-parseInt(_0x538973(0xd4))/0x7)+parseInt(_0x538973(0xc5))/0x8*(parseInt(_0x538973(0xb5))/0x9)+parseInt(_0x538973(0xd9))/0xa+parseInt(_0x538973(0xe6))/0xb;if(_0xd34ff7===_0x46b5d8)break;else _0xa38d77['push'](_0xa38d77['shift']());}catch(_0x36b095){_0xa38d77['push'](_0xa38d77['shift']());}}}(a53_0x350c,0x9cce4));function a53_0x3498(_0x59bc3e,_0x17654c){_0x59bc3e=_0x59bc3e-0xb5;const _0x350cfd=a53_0x350c();let _0x349812=_0x350cfd[_0x59bc3e];return _0x349812;}import{listRuntimeAppUsers,listRuntimeAppRoles,listRuntimeRoleUsers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const RUNTIME_ROLE_TYPES=[a53_0x1790ff(0xdf),a53_0x1790ff(0xcc),a53_0x1790ff(0xf1),'CUSTOM'];const BUILTIN_ROLE_TYPES=[a53_0x1790ff(0xdf),a53_0x1790ff(0xcc),a53_0x1790ff(0xf1)];export const ROLE_ID_FLAG={'name':'id','type':a53_0x1790ff(0xc9),'required':!![],'description':a53_0x1790ff(0xe7)};export const ROLE_REF_FLAG={'name':a53_0x1790ff(0xbd),'type':a53_0x1790ff(0xf3),'required':!![],'description':a53_0x1790ff(0xb7)};export const USER_ID_FLAG={'name':a53_0x1790ff(0xba),'type':a53_0x1790ff(0xf3),'required':!![],'description':a53_0x1790ff(0xdb)};export const EXPECT_USER_COUNT_FLAG={'name':a53_0x1790ff(0xf4),'type':'number','description':a53_0x1790ff(0xf6)};export function isBuiltinRuntimeRole(_0x378aa3){const _0x9b523d=a53_0x1790ff;return BUILTIN_ROLE_TYPES[_0x9b523d(0xb6)](_0x378aa3);}export function assertCustomRuntimeRole(_0x4ea0f3,_0x2b0cb7){const _0x273c5a=a53_0x1790ff;if(_0x4ea0f3[_0x273c5a(0xfd)]!==_0x273c5a(0xf2))throw CliErrors[_0x273c5a(0xc4)](_0x273c5a(0xc8)+_0x2b0cb7+'\x20built-in\x20runtime\x20role\x20'+_0x4ea0f3[_0x273c5a(0xf0)]+'\x20('+_0x4ea0f3['roleType']+').',_0x273c5a(0xff));}export function projectRuntimeRole(_0x2e5474){const _0x3389e0=a53_0x1790ff;return{'id':_0x2e5474['id'],'roleName':_0x2e5474['roleName'],'roleType':_0x2e5474[_0x3389e0(0xfd)],'remark':_0x2e5474[_0x3389e0(0xd7)],'userCount':_0x2e5474[_0x3389e0(0xfa)]??0x0,'permitCount':_0x2e5474[_0x3389e0(0xbf)]??0x0,'builtin':isBuiltinRuntimeRole(_0x2e5474[_0x3389e0(0xfd)])};}export async function getRuntimeRoleById(_0x4356a0,_0x15864b){const _0x402212=a53_0x1790ff;if(!Number[_0x402212(0xcb)](_0x15864b)||_0x15864b<=0x0)throw CliErrors[_0x402212(0xc4)](_0x402212(0xd8));const _0x865784=(await listAllRuntimeRoles(_0x4356a0))[_0x402212(0xd0)](_0x24965c=>_0x24965c['id']===_0x15864b&&(!_0x24965c['appCode']||_0x24965c['appCode']===_0x4356a0));if(_0x865784[_0x402212(0xe0)]!==0x1)throw CliErrors[_0x402212(0xc4)](_0x402212(0xde)+_0x15864b+'\x20was\x20not\x20found\x20in\x20app\x20'+_0x4356a0+'.',_0x402212(0x101));return _0x865784[0x0];}export async function listAllRuntimeRoles(_0x13c330,_0x1faa49={}){const _0x9a09d1=a53_0x1790ff,_0x592dee=0x64,_0x21925e=[];for(let _0x91dcef=0x1;;_0x91dcef+=0x1){const _0x463634=await listRuntimeAppRoles(_0x13c330,{..._0x1faa49['roleName']?{'roleName':_0x1faa49['roleName']}:{},'currentPage':_0x91dcef,'pageSize':_0x592dee});_0x21925e['push'](..._0x463634[_0x9a09d1(0xdd)]);if(_0x463634[_0x9a09d1(0xdd)][_0x9a09d1(0xe0)]<_0x592dee||_0x463634[_0x9a09d1(0xda)]&&_0x21925e['length']>=_0x463634[_0x9a09d1(0xda)][_0x9a09d1(0xe4)])return _0x21925e;}}export async function resolveRuntimeRoleRef(_0x4b799c,_0x5b1099){const _0x3aa611=a53_0x1790ff,_0x747973=_0x5b1099[_0x3aa611(0xf5)]();if(!_0x747973)throw CliErrors[_0x3aa611(0xc4)](_0x3aa611(0xd5),'Pass\x20--role\x20<id|name>.');if(/^\d+$/[_0x3aa611(0xfe)](_0x747973))return getRuntimeRoleById(_0x4b799c,Number(_0x747973));const _0x209b3e=(await listAllRuntimeRoles(_0x4b799c))[_0x3aa611(0xd0)](_0x1196b1=>_0x1196b1[_0x3aa611(0xf0)]===_0x747973);if(_0x209b3e[_0x3aa611(0xe0)]===0x0)throw CliErrors['validation']('Runtime\x20role\x20name\x20\x22'+_0x747973+_0x3aa611(0xd1)+_0x4b799c+'.',_0x3aa611(0xbc));if(_0x209b3e[_0x3aa611(0xe0)]>0x1)throw CliErrors[_0x3aa611(0xc4)](_0x3aa611(0xca)+_0x747973+_0x3aa611(0xbb),_0x3aa611(0xee)+_0x209b3e['map'](_0xfcd077=>_0xfcd077['id'])[_0x3aa611(0xc7)](',\x20')+'.');return _0x209b3e[0x0];}function a53_0x350c(){const _0x385672=['14496JxwgNn','userId','join','Cannot\x20','number','Runtime\x20role\x20name\x20\x22','isSafeInteger','USER','186LDLSVQ','3160980YITYyw','Runtime\x20user\x20','filter','\x22\x20was\x20not\x20found\x20in\x20app\x20','Read\x20the\x20current\x20members\x20and\x20retry\x20with\x20the\x20new\x20expected\x20count.','\x20was\x20not\x20found\x20in\x20app\x20','249781lksyxJ','Missing\x20runtime\x20role\x20reference.','Runtime\x20role\x20membership\x20requires\x20a\x20numeric\x20userId.','remark','Role\x20ID\x20must\x20be\x20a\x20positive\x20integer.','1867490dupZMT','paging','Runtime\x20numeric\x20userId','runtime','items','Runtime\x20role\x20id\x20','ADMIN','length','User\x20','2Bqpkju','flag','totalCount','map','1273206AMoJeK','Runtime\x20role\x20ID\x20returned\x20by\x20role\x20list','find',',\x20found\x20','Runtime\x20role\x20member\x20count\x20changed:\x20expected\x20','\x20is\x20missing\x20from\x20the\x20grouped\x20member\x20snapshot.','user-add','Reload\x20the\x20role\x20list\x20and\x20retry\x20after\x20the\x20server\x20state\x20is\x20consistent.','Pass\x20one\x20role\x20ID:\x20','userList','roleName','OWNER','CUSTOM','string','expect-user-count','trim','Reject\x20when\x20the\x20target\x20role\x20member\x20count\x20has\x20changed','875608CgFIji','Runtime\x20userId\x20must\x20be\x20a\x20positive\x20safe\x20integer.','code','userCount','\x20is\x20already\x20in\x20runtime\x20role\x20','Transfer\x20or\x20manage\x20application\x20ownership\x20through\x20the\x20dedicated\x20application\x20workflow.','roleType','test','Only\x20CUSTOM\x20runtime\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','str','Run\x20`lovrabet\x20role\x20list`\x20and\x20use\x20a\x20role\x20from\x20the\x20current\x20app.','495fvcyyc','includes','Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name','\x20is\x20not\x20in\x20runtime\x20role\x20','10XkYvoV','user','\x22\x20is\x20ambiguous.','Run\x20`lovrabet\x20role\x20list`\x20or\x20pass\x20--role\x20<id>.','role','730438FAOZHP','permitCount','--expect-user-count\x20must\x20be\x20a\x20non-negative\x20integer.','appCode','userName','push','validation'];a53_0x350c=function(){return _0x385672;};return a53_0x350c();}function parseRuntimeUserId(_0x1935ea){const _0x539e6b=a53_0x1790ff,_0x4407a3=_0x1935ea[_0x539e6b(0xf5)]();if(!/^\d+$/[_0x539e6b(0xfe)](_0x4407a3))throw CliErrors[_0x539e6b(0xc4)](_0x539e6b(0xd6),'Pass\x20--user\x20<userId>;\x20name\x20and\x20account\x20lookup\x20are\x20not\x20available\x20in\x20runtime\x20scope.');const _0x45ee8e=Number(_0x4407a3);if(!Number[_0x539e6b(0xcb)](_0x45ee8e)||_0x45ee8e<=0x0)throw CliErrors[_0x539e6b(0xc4)](_0x539e6b(0xf8));return _0x45ee8e;}export async function prepareRuntimeMemberMutation(_0x3c9b16,_0x3b7e92){const _0x214dbf=a53_0x1790ff,_0x3e7cef=await resolveRuntimeRoleRef(_0x3c9b16['appCode'],_0x3c9b16[_0x214dbf(0x100)]('role'));if(_0x3e7cef[_0x214dbf(0xfd)]==='OWNER')throw CliErrors[_0x214dbf(0xc4)]('OWNER\x20runtime\x20role\x20membership\x20cannot\x20be\x20changed\x20with\x20this\x20command.',_0x214dbf(0xfc));const _0x3b30ac=parseRuntimeUserId(_0x3c9b16[_0x214dbf(0x100)](_0x214dbf(0xba))),_0x48d5eb=(await listRuntimeRoleUsers(_0x3c9b16[_0x214dbf(0xc1)]))['map'](_0x596791=>({..._0x596791,'userList':[..._0x596791['userList']??[]],'applyUserList':[..._0x596791['applyUserList']??[]]})),_0x59cd22=_0x48d5eb[_0x214dbf(0xe8)](_0x16f09b=>_0x16f09b['id']===_0x3e7cef['id']);if(!_0x59cd22)throw CliErrors[_0x214dbf(0xc4)]('Runtime\x20role\x20'+_0x3e7cef['id']+_0x214dbf(0xeb),_0x214dbf(0xed));const _0x3529c1=_0x59cd22['userList'][_0x214dbf(0xe5)](_0x5b4d66=>_0x5b4d66[_0x214dbf(0xc6)]),_0x503e96=_0x3c9b16[_0x214dbf(0xe3)](_0x214dbf(0xf4));if(_0x503e96!==undefined&&_0x503e96!==null&&_0x503e96!==''){const _0x3c67db=_0x3c9b16['num'](_0x214dbf(0xf4));if(!Number[_0x214dbf(0xcb)](_0x3c67db)||_0x3c67db<0x0)throw CliErrors[_0x214dbf(0xc4)](_0x214dbf(0xc0));if(_0x3529c1[_0x214dbf(0xe0)]!==_0x3c67db)throw CliErrors[_0x214dbf(0xc4)](_0x214dbf(0xea)+_0x3c67db+_0x214dbf(0xe9)+_0x3529c1[_0x214dbf(0xe0)]+'.',_0x214dbf(0xd2));}const _0x5abf64=_0x3529c1['includes'](_0x3b30ac),_0x3c2f99=[];let _0x270f74=!![];if(_0x3b7e92===_0x214dbf(0xec)){const _0x53d251=await listRuntimeAppUsers(_0x3c9b16['appCode']),_0x162a8d=_0x53d251['filter'](_0x2ead08=>Number(_0x2ead08[_0x214dbf(0xf9)])===_0x3b30ac);if(_0x162a8d[_0x214dbf(0xe0)]!==0x1||!_0x162a8d[0x0][_0x214dbf(0xc2)]?.['trim']())throw CliErrors[_0x214dbf(0xc4)](_0x214dbf(0xcf)+_0x3b30ac+_0x214dbf(0xd3)+_0x3c9b16[_0x214dbf(0xc1)]+'.','Use\x20a\x20numeric\x20userId\x20returned\x20by\x20the\x20current\x20application\x27s\x20personnel\x20list.');_0x5abf64?(_0x270f74=![],_0x3c2f99[_0x214dbf(0xc3)](_0x214dbf(0xe1)+_0x3b30ac+_0x214dbf(0xfb)+_0x3e7cef['id']+'.')):_0x59cd22['userList'][_0x214dbf(0xc3)]({'userId':_0x3b30ac,'username':_0x162a8d[0x0][_0x214dbf(0xc2)]});}else!_0x5abf64?(_0x270f74=![],_0x3c2f99[_0x214dbf(0xc3)](_0x214dbf(0xe1)+_0x3b30ac+_0x214dbf(0xb8)+_0x3e7cef['id']+'.')):_0x59cd22[_0x214dbf(0xef)]=_0x59cd22[_0x214dbf(0xef)][_0x214dbf(0xd0)](_0x4a7bb=>_0x4a7bb[_0x214dbf(0xc6)]!==_0x3b30ac);return{'role':_0x3e7cef,'userId':_0x3b30ac,'roleList':_0x48d5eb,'before':{'userIds':_0x3529c1},'after':{'userIds':_0x59cd22[_0x214dbf(0xef)][_0x214dbf(0xe5)](_0x42fe18=>_0x42fe18[_0x214dbf(0xc6)])},'shouldWrite':_0x270f74,'warnings':_0x3c2f99};}export function runtimeRoleWriteResult(_0x5f1fbf,_0x3ba453,_0x19019c,_0x4bac2d,_0x1489c0,_0x4b7e0b=[]){const _0x51810b=a53_0x1790ff;return{'operation':_0x5f1fbf,'scope':_0x51810b(0xdc),'selector':_0x3ba453,'before':_0x19019c,'after':_0x4bac2d,'dryRun':![],'backend':_0x1489c0,'warnings':_0x4b7e0b};}
|
|
1
|
+
function a54_0xe293(_0x314070,_0xaa86a8){_0x314070=_0x314070-0x1ca;const _0x3f5dc4=a54_0x3f5d();let _0xe293de=_0x3f5dc4[_0x314070];return _0xe293de;}const a54_0x58fbff=a54_0xe293;(function(_0x31a570,_0x1c2fa2){const _0x4d4407=a54_0xe293,_0x39f472=_0x31a570();while(!![]){try{const _0x496241=-parseInt(_0x4d4407(0x1df))/0x1*(-parseInt(_0x4d4407(0x1ed))/0x2)+parseInt(_0x4d4407(0x1d9))/0x3*(-parseInt(_0x4d4407(0x1f7))/0x4)+parseInt(_0x4d4407(0x20f))/0x5+parseInt(_0x4d4407(0x1da))/0x6*(-parseInt(_0x4d4407(0x1cd))/0x7)+parseInt(_0x4d4407(0x1f3))/0x8*(-parseInt(_0x4d4407(0x207))/0x9)+-parseInt(_0x4d4407(0x1e5))/0xa*(parseInt(_0x4d4407(0x1cc))/0xb)+parseInt(_0x4d4407(0x1e1))/0xc;if(_0x496241===_0x1c2fa2)break;else _0x39f472['push'](_0x39f472['shift']());}catch(_0x158f8d){_0x39f472['push'](_0x39f472['shift']());}}}(a54_0x3f5d,0x58b4e));import{listRuntimeAppUsers,listRuntimeAppRoles,listRuntimeRoleUsers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const RUNTIME_ROLE_TYPES=['ADMIN',a54_0x58fbff(0x20a),a54_0x58fbff(0x1de),a54_0x58fbff(0x204)];const BUILTIN_ROLE_TYPES=[a54_0x58fbff(0x1f1),a54_0x58fbff(0x20a),'OWNER'];function a54_0x3f5d(){const _0x5af7fc=['Run\x20`lovrabet\x20role\x20list`\x20or\x20pass\x20--role\x20<id>.','\x20built-in\x20runtime\x20role\x20','Reload\x20the\x20role\x20list\x20and\x20retry\x20after\x20the\x20server\x20state\x20is\x20consistent.','1383230CYvuaA','Pass\x20one\x20role\x20ID:\x20','\x20is\x20already\x20in\x20runtime\x20role\x20','permitCount','Only\x20CUSTOM\x20runtime\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','runtime','items','Transfer\x20or\x20manage\x20application\x20ownership\x20through\x20the\x20dedicated\x20application\x20workflow.','847yzxYki','7LnJSNR','validation','Run\x20`lovrabet\x20role\x20list`\x20and\x20use\x20a\x20role\x20from\x20the\x20current\x20app.','user-add','find','Runtime\x20role\x20member\x20count\x20changed:\x20expected\x20','paging','Runtime\x20role\x20name\x20\x22','includes','User\x20','code','roleType','519PDQUQV','177888OwYrCF','Read\x20the\x20current\x20members\x20and\x20retry\x20with\x20the\x20new\x20expected\x20count.','expect-user-count','\x22\x20was\x20not\x20found\x20in\x20app\x20','OWNER','558811cKJYGg','Use\x20a\x20numeric\x20userId\x20returned\x20by\x20the\x20current\x20application\x27s\x20personnel\x20list.','10285896NyUmbd','map','test','Reject\x20when\x20the\x20target\x20role\x20member\x20count\x20has\x20changed','23870iwtFyD','filter','isSafeInteger','Pass\x20--user\x20<userId>;\x20name\x20and\x20account\x20lookup\x20are\x20not\x20available\x20in\x20runtime\x20scope.','number','Role\x20ID\x20must\x20be\x20a\x20positive\x20integer.','push','string','2mJGDPQ','Runtime\x20role\x20ID\x20returned\x20by\x20role\x20list','\x20is\x20not\x20in\x20runtime\x20role\x20','appCode','ADMIN','Runtime\x20role\x20membership\x20requires\x20a\x20numeric\x20userId.','3910992qKCqqe','num','Runtime\x20userId\x20must\x20be\x20a\x20positive\x20safe\x20integer.','length','14496HMbIIe','userName','role','--expect-user-count\x20must\x20be\x20a\x20non-negative\x20integer.','\x22\x20is\x20ambiguous.','Runtime\x20role\x20id\x20','userId','roleName','\x20was\x20not\x20found\x20in\x20app\x20','userCount','Runtime\x20numeric\x20userId','join','remark','CUSTOM','userList','trim','9dStjdl','Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name','user','USER','totalCount'];a54_0x3f5d=function(){return _0x5af7fc;};return a54_0x3f5d();}export const ROLE_ID_FLAG={'name':'id','type':a54_0x58fbff(0x1e9),'required':!![],'description':a54_0x58fbff(0x1ee)};export const ROLE_REF_FLAG={'name':a54_0x58fbff(0x1f9),'type':a54_0x58fbff(0x1ec),'required':!![],'description':a54_0x58fbff(0x208)};export const USER_ID_FLAG={'name':'user','type':a54_0x58fbff(0x1ec),'required':!![],'description':a54_0x58fbff(0x201)};export const EXPECT_USER_COUNT_FLAG={'name':a54_0x58fbff(0x1dc),'type':a54_0x58fbff(0x1e9),'description':a54_0x58fbff(0x1e4)};export function isBuiltinRuntimeRole(_0x5f3ebb){const _0x93a1b=a54_0x58fbff;return BUILTIN_ROLE_TYPES[_0x93a1b(0x1d5)](_0x5f3ebb);}export function assertCustomRuntimeRole(_0x579d90,_0x18c8d9){const _0x408bd8=a54_0x58fbff;if(_0x579d90[_0x408bd8(0x1d8)]!==_0x408bd8(0x204))throw CliErrors[_0x408bd8(0x1ce)]('Cannot\x20'+_0x18c8d9+_0x408bd8(0x20d)+_0x579d90['roleName']+'\x20('+_0x579d90[_0x408bd8(0x1d8)]+').',_0x408bd8(0x213));}export function projectRuntimeRole(_0xfe7590){const _0x58bed7=a54_0x58fbff;return{'id':_0xfe7590['id'],'roleName':_0xfe7590[_0x58bed7(0x1fe)],'roleType':_0xfe7590['roleType'],'remark':_0xfe7590[_0x58bed7(0x203)],'userCount':_0xfe7590[_0x58bed7(0x200)]??0x0,'permitCount':_0xfe7590[_0x58bed7(0x212)]??0x0,'builtin':isBuiltinRuntimeRole(_0xfe7590[_0x58bed7(0x1d8)])};}export async function getRuntimeRoleById(_0x262463,_0xcb8206){const _0x2dd436=a54_0x58fbff;if(!Number['isSafeInteger'](_0xcb8206)||_0xcb8206<=0x0)throw CliErrors[_0x2dd436(0x1ce)](_0x2dd436(0x1ea));const _0x45615d=(await listAllRuntimeRoles(_0x262463))[_0x2dd436(0x1e6)](_0x4bf364=>_0x4bf364['id']===_0xcb8206&&(!_0x4bf364['appCode']||_0x4bf364[_0x2dd436(0x1f0)]===_0x262463));if(_0x45615d[_0x2dd436(0x1f6)]!==0x1)throw CliErrors['validation'](_0x2dd436(0x1fc)+_0xcb8206+_0x2dd436(0x1ff)+_0x262463+'.',_0x2dd436(0x1cf));return _0x45615d[0x0];}export async function listAllRuntimeRoles(_0x50dc7a,_0x53372f={}){const _0x3e59f0=a54_0x58fbff,_0xd137df=0x64,_0x5252b0=[];for(let _0x5a32a5=0x1;;_0x5a32a5+=0x1){const _0xd015c1=await listRuntimeAppRoles(_0x50dc7a,{..._0x53372f[_0x3e59f0(0x1fe)]?{'roleName':_0x53372f[_0x3e59f0(0x1fe)]}:{},'currentPage':_0x5a32a5,'pageSize':_0xd137df});_0x5252b0[_0x3e59f0(0x1eb)](..._0xd015c1['items']);if(_0xd015c1[_0x3e59f0(0x1ca)][_0x3e59f0(0x1f6)]<_0xd137df||_0xd015c1['paging']&&_0x5252b0['length']>=_0xd015c1[_0x3e59f0(0x1d3)][_0x3e59f0(0x20b)])return _0x5252b0;}}export async function resolveRuntimeRoleRef(_0xab46af,_0x9358be){const _0x55159e=a54_0x58fbff,_0x559a45=_0x9358be[_0x55159e(0x206)]();if(!_0x559a45)throw CliErrors[_0x55159e(0x1ce)]('Missing\x20runtime\x20role\x20reference.','Pass\x20--role\x20<id|name>.');if(/^\d+$/[_0x55159e(0x1e3)](_0x559a45))return getRuntimeRoleById(_0xab46af,Number(_0x559a45));const _0x3ed272=(await listAllRuntimeRoles(_0xab46af))[_0x55159e(0x1e6)](_0x4afd54=>_0x4afd54[_0x55159e(0x1fe)]===_0x559a45);if(_0x3ed272[_0x55159e(0x1f6)]===0x0)throw CliErrors[_0x55159e(0x1ce)](_0x55159e(0x1d4)+_0x559a45+_0x55159e(0x1dd)+_0xab46af+'.',_0x55159e(0x20c));if(_0x3ed272[_0x55159e(0x1f6)]>0x1)throw CliErrors[_0x55159e(0x1ce)](_0x55159e(0x1d4)+_0x559a45+_0x55159e(0x1fb),_0x55159e(0x210)+_0x3ed272[_0x55159e(0x1e2)](_0x1720e7=>_0x1720e7['id'])[_0x55159e(0x202)](',\x20')+'.');return _0x3ed272[0x0];}function parseRuntimeUserId(_0x1792b3){const _0x2d3744=a54_0x58fbff,_0x3c5c1a=_0x1792b3[_0x2d3744(0x206)]();if(!/^\d+$/[_0x2d3744(0x1e3)](_0x3c5c1a))throw CliErrors['validation'](_0x2d3744(0x1f2),_0x2d3744(0x1e8));const _0x575b52=Number(_0x3c5c1a);if(!Number['isSafeInteger'](_0x575b52)||_0x575b52<=0x0)throw CliErrors['validation'](_0x2d3744(0x1f5));return _0x575b52;}export async function prepareRuntimeMemberMutation(_0x2c7b1f,_0xaca09a){const _0x3a39c8=a54_0x58fbff,_0x4e4dff=await resolveRuntimeRoleRef(_0x2c7b1f[_0x3a39c8(0x1f0)],_0x2c7b1f['str'](_0x3a39c8(0x1f9)));if(_0x4e4dff[_0x3a39c8(0x1d8)]==='OWNER')throw CliErrors[_0x3a39c8(0x1ce)]('OWNER\x20runtime\x20role\x20membership\x20cannot\x20be\x20changed\x20with\x20this\x20command.',_0x3a39c8(0x1cb));const _0xa65375=parseRuntimeUserId(_0x2c7b1f['str'](_0x3a39c8(0x209))),_0x3db50c=(await listRuntimeRoleUsers(_0x2c7b1f[_0x3a39c8(0x1f0)]))[_0x3a39c8(0x1e2)](_0x471a3e=>({..._0x471a3e,'userList':[..._0x471a3e[_0x3a39c8(0x205)]??[]],'applyUserList':[..._0x471a3e['applyUserList']??[]]})),_0x29f155=_0x3db50c[_0x3a39c8(0x1d1)](_0x497271=>_0x497271['id']===_0x4e4dff['id']);if(!_0x29f155)throw CliErrors[_0x3a39c8(0x1ce)]('Runtime\x20role\x20'+_0x4e4dff['id']+'\x20is\x20missing\x20from\x20the\x20grouped\x20member\x20snapshot.',_0x3a39c8(0x20e));const _0x5c84de=_0x29f155[_0x3a39c8(0x205)]['map'](_0xe0d4d4=>_0xe0d4d4[_0x3a39c8(0x1fd)]),_0x365ec1=_0x2c7b1f['flag']('expect-user-count');if(_0x365ec1!==undefined&&_0x365ec1!==null&&_0x365ec1!==''){const _0x80707c=_0x2c7b1f[_0x3a39c8(0x1f4)]('expect-user-count');if(!Number[_0x3a39c8(0x1e7)](_0x80707c)||_0x80707c<0x0)throw CliErrors[_0x3a39c8(0x1ce)](_0x3a39c8(0x1fa));if(_0x5c84de[_0x3a39c8(0x1f6)]!==_0x80707c)throw CliErrors['validation'](_0x3a39c8(0x1d2)+_0x80707c+',\x20found\x20'+_0x5c84de[_0x3a39c8(0x1f6)]+'.',_0x3a39c8(0x1db));}const _0x114738=_0x5c84de['includes'](_0xa65375),_0x34813b=[];let _0x214975=!![];if(_0xaca09a===_0x3a39c8(0x1d0)){const _0x4d0b93=await listRuntimeAppUsers(_0x2c7b1f['appCode']),_0x3904de=_0x4d0b93[_0x3a39c8(0x1e6)](_0x3abe59=>Number(_0x3abe59[_0x3a39c8(0x1d7)])===_0xa65375);if(_0x3904de[_0x3a39c8(0x1f6)]!==0x1||!_0x3904de[0x0][_0x3a39c8(0x1f8)]?.['trim']())throw CliErrors['validation']('Runtime\x20user\x20'+_0xa65375+'\x20was\x20not\x20found\x20in\x20app\x20'+_0x2c7b1f[_0x3a39c8(0x1f0)]+'.',_0x3a39c8(0x1e0));_0x114738?(_0x214975=![],_0x34813b[_0x3a39c8(0x1eb)](_0x3a39c8(0x1d6)+_0xa65375+_0x3a39c8(0x211)+_0x4e4dff['id']+'.')):_0x29f155[_0x3a39c8(0x205)][_0x3a39c8(0x1eb)]({'userId':_0xa65375,'username':_0x3904de[0x0][_0x3a39c8(0x1f8)]});}else!_0x114738?(_0x214975=![],_0x34813b[_0x3a39c8(0x1eb)]('User\x20'+_0xa65375+_0x3a39c8(0x1ef)+_0x4e4dff['id']+'.')):_0x29f155[_0x3a39c8(0x205)]=_0x29f155[_0x3a39c8(0x205)][_0x3a39c8(0x1e6)](_0x2f8384=>_0x2f8384[_0x3a39c8(0x1fd)]!==_0xa65375);return{'role':_0x4e4dff,'userId':_0xa65375,'roleList':_0x3db50c,'before':{'userIds':_0x5c84de},'after':{'userIds':_0x29f155[_0x3a39c8(0x205)][_0x3a39c8(0x1e2)](_0x249207=>_0x249207['userId'])},'shouldWrite':_0x214975,'warnings':_0x34813b};}export function runtimeRoleWriteResult(_0x5b6c27,_0x240f3b,_0x5c0357,_0x54e742,_0x59cc36,_0x1c787b=[]){const _0x4231a5=a54_0x58fbff;return{'operation':_0x5b6c27,'scope':_0x4231a5(0x214),'selector':_0x240f3b,'before':_0x5c0357,'after':_0x54e742,'dryRun':![],'backend':_0x59cc36,'warnings':_0x1c787b};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a55_0x34c0(_0xa4abcd,_0x523b2b){_0xa4abcd=_0xa4abcd-0xe1;const _0x86fa7d=a55_0x86fa();let _0x34c0f1=_0x86fa7d[_0xa4abcd];return _0x34c0f1;}const a55_0x5ab9ca=a55_0x34c0;(function(_0x49e46b,_0x52b3c1){const _0x5bef03=a55_0x34c0,_0x5529f8=_0x49e46b();while(!![]){try{const _0x129400=parseInt(_0x5bef03(0xed))/0x1*(parseInt(_0x5bef03(0xf4))/0x2)+-parseInt(_0x5bef03(0xf0))/0x3+-parseInt(_0x5bef03(0xe4))/0x4+-parseInt(_0x5bef03(0xe9))/0x5+-parseInt(_0x5bef03(0xec))/0x6*(-parseInt(_0x5bef03(0xe1))/0x7)+-parseInt(_0x5bef03(0xee))/0x8+parseInt(_0x5bef03(0xe7))/0x9;if(_0x129400===_0x52b3c1)break;else _0x5529f8['push'](_0x5529f8['shift']());}catch(_0x4a31cf){_0x5529f8['push'](_0x5529f8['shift']());}}}(a55_0x86fa,0xba724));import{updateRuntimeAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a55_0x86fa(){const _0x14e038=['1968762eiNcFJ','317rCLCsC','5657040SwgPLk','The\x20current\x20runtime\x20role\x20API\x20does\x20not\x20support\x20clearing\x20an\x20existing\x20remark.','1560369qdRpXR','body','trim','flag','1630fTQheB','str','remark','build','New\x20non-empty\x20role\x20remark','appCode','high-risk-write','New\x20role\x20name','validation','update','--remark\x20must\x20not\x20be\x20blank.','Update\x20a\x20runtime\x20CUSTOM\x20role','POST','14LmuWRN','name','--name\x20must\x20not\x20be\x20blank.','2790620ESUaOx','role','Pass\x20--name\x20or\x20--remark\x20to\x20update\x20the\x20runtime\x20role.','19100988bPczwl','Preview:\x20update\x20a\x20runtime\x20CUSTOM\x20role','1741745cyUZtz','/client/permit/role/update','Changes\x20the\x20custom\x20role\x20name\x20or\x20note\x20in\x20the\x20current\x20runtime\x20app.\x20The\x20role\x20display\x20updates\x20immediately.'];a55_0x86fa=function(){return _0x14e038;};return a55_0x86fa();}import{dryRun}from'../../framework/dryrun.js';import{assertCustomRuntimeRole,getRuntimeRoleById,projectRuntimeRole,ROLE_ID_FLAG,runtimeRoleWriteResult}from'../../commands/role/shared.js';function updateFields(_0x32fc4c){const _0x307ffb=a55_0x34c0,_0xacb122=_0x32fc4c[_0x307ffb(0xf3)](_0x307ffb(0xe2))!==undefined,_0x5d54b4=_0x32fc4c[_0x307ffb(0xf3)](_0x307ffb(0xf6))!==undefined;if(!_0xacb122&&!_0x5d54b4)throw CliErrors['validation'](_0x307ffb(0xe6));const _0x4b0f91=_0x32fc4c[_0x307ffb(0xf5)](_0x307ffb(0xe2))[_0x307ffb(0xf2)](),_0x56158b=_0x32fc4c[_0x307ffb(0xf5)]('remark')['trim']();if(_0xacb122&&!_0x4b0f91)throw CliErrors[_0x307ffb(0xfc)](_0x307ffb(0xe3));if(_0x5d54b4&&!_0x56158b)throw CliErrors[_0x307ffb(0xfc)](_0x307ffb(0xfe),_0x307ffb(0xef));return{..._0xacb122?{'roleName':_0x4b0f91}:{},..._0x5d54b4?{'remark':_0x56158b}:{}};}async function prepare(_0x2fa8dc){const _0x56d73c=a55_0x34c0,_0x28e6cd=await getRuntimeRoleById(_0x2fa8dc[_0x56d73c(0xf9)],_0x2fa8dc['num']('id'));return assertCustomRuntimeRole(_0x28e6cd,_0x56d73c(0xfd)),{'role':_0x28e6cd,'body':{'id':_0x28e6cd['id'],'appCode':_0x2fa8dc['appCode'],...updateFields(_0x2fa8dc)}};}export const roleUpdate={'service':a55_0x5ab9ca(0xe5),'command':a55_0x5ab9ca(0xfd),'description':a55_0x5ab9ca(0xff),'risk':a55_0x5ab9ca(0xfa),'confirmationDescription':a55_0x5ab9ca(0xeb),'flags':[ROLE_ID_FLAG,{'name':a55_0x5ab9ca(0xe2),'type':'string','description':a55_0x5ab9ca(0xfb)},{'name':'remark','type':'string','description':a55_0x5ab9ca(0xf8)}],async 'validate'(_0x426e94){updateFields(_0x426e94);},async 'dryRun'(_0x53d4f0){const _0x3550bb=a55_0x5ab9ca,{body:_0x23a5cb}=await prepare(_0x53d4f0);return dryRun(_0x3550bb(0x100),_0x3550bb(0xea))[_0x3550bb(0xf1)](_0x23a5cb)['description'](_0x3550bb(0xe8))[_0x3550bb(0xf7)]();},async 'execute'(_0x57b99f){const _0x1ede31=a55_0x5ab9ca,{role:_0xa79037,body:_0x1ff8b3}=await prepare(_0x57b99f),_0x19c62b=await updateRuntimeAppRole(_0x1ff8b3);return{'ok':!![],'data':runtimeRoleWriteResult(_0x1ede31(0xfd),{'roleId':_0xa79037['id']},projectRuntimeRole(_0xa79037),projectRuntimeRole(_0x19c62b),{'method':_0x1ede31(0x100),'path':_0x1ede31(0xea)})};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a56_0x333090=a56_0x4efe;(function(_0x11cdfd,_0x339d83){const _0x529c4c=a56_0x4efe,_0x2fd077=_0x11cdfd();while(!![]){try{const _0x2ae170=parseInt(_0x529c4c(0x148))/0x1*(parseInt(_0x529c4c(0x15a))/0x2)+-parseInt(_0x529c4c(0x14a))/0x3*(parseInt(_0x529c4c(0x158))/0x4)+parseInt(_0x529c4c(0x159))/0x5+parseInt(_0x529c4c(0x150))/0x6*(-parseInt(_0x529c4c(0x14d))/0x7)+-parseInt(_0x529c4c(0x153))/0x8+-parseInt(_0x529c4c(0x156))/0x9*(parseInt(_0x529c4c(0x157))/0xa)+parseInt(_0x529c4c(0x14c))/0xb*(parseInt(_0x529c4c(0x151))/0xc);if(_0x2ae170===_0x339d83)break;else _0x2fd077['push'](_0x2fd077['shift']());}catch(_0x11f9aa){_0x2fd077['push'](_0x2fd077['shift']());}}}(a56_0x1a11,0xe312e));function a56_0x4efe(_0xa4bb0d,_0x521304){_0xa4bb0d=_0xa4bb0d-0x142;const _0x1a11b4=a56_0x1a11();let _0x4efeb9=_0x1a11b4[_0xa4bb0d];return _0x4efeb9;}function a56_0x1a11(){const _0x4a3e0a=['roleList','POST','2063CGCwFQ','Adds\x20the\x20given\x20runtime\x20user\x20to\x20the\x20target\x20role.\x20The\x20user\x20receives\x20the\x20permissions\x20of\x20that\x20role.','312369NewkNf','user-add','11CkaERx','4985841YKKzfl','before','/client/permit/user-role/update-user-list','6cmbmQu','24444204qxXRMr','high-risk-write','13174992rEzEvl','role','shouldWrite','4586427jReHJF','30lxxXjQ','12dIxvOD','8968510UKPLNj','1260GYgykU','warnings','build','after','appCode','body'];a56_0x1a11=function(){return _0x4a3e0a;};return a56_0x1a11();}import{updateRuntimeRoleUsers}from'../../core/api-client.js';import{dryRun}from'../../framework/dryrun.js';import{EXPECT_USER_COUNT_FLAG,prepareRuntimeMemberMutation,ROLE_REF_FLAG,runtimeRoleWriteResult,USER_ID_FLAG}from'../../commands/role/shared.js';export const roleUserAdd={'service':'role','command':'user-add','description':'Add\x20a\x20numeric\x20userId\x20to\x20one\x20runtime\x20role','risk':a56_0x333090(0x152),'confirmationDescription':a56_0x333090(0x149),'flags':[ROLE_REF_FLAG,USER_ID_FLAG,EXPECT_USER_COUNT_FLAG],async 'dryRun'(_0x2e9511){const _0x5a14e1=a56_0x333090,_0x25c128=await prepareRuntimeMemberMutation(_0x2e9511,_0x5a14e1(0x14b));return dryRun(_0x5a14e1(0x147),'/client/permit/user-role/update-user-list')[_0x5a14e1(0x145)]({'appCode':_0x2e9511[_0x5a14e1(0x144)],'roleList':_0x25c128['roleList']})['description'](_0x25c128[_0x5a14e1(0x155)]?'Preview:\x20add\x20runtime\x20role\x20member':_0x25c128['warnings'][0x0])[_0x5a14e1(0x142)]();},async 'execute'(_0x5816f1){const _0x3f9eb6=a56_0x333090,_0x3f9c8b=await prepareRuntimeMemberMutation(_0x5816f1,_0x3f9eb6(0x14b));return _0x3f9c8b[_0x3f9eb6(0x155)]&&await updateRuntimeRoleUsers(_0x5816f1[_0x3f9eb6(0x144)],_0x3f9c8b[_0x3f9eb6(0x146)]),{'ok':!![],'data':runtimeRoleWriteResult('user-add',{'roleId':_0x3f9c8b[_0x3f9eb6(0x154)]['id'],'userId':_0x3f9c8b['userId']},_0x3f9c8b[_0x3f9eb6(0x14e)],_0x3f9c8b[_0x3f9eb6(0x143)],{'method':_0x3f9eb6(0x147),'path':_0x3f9eb6(0x14f)},_0x3f9c8b[_0x3f9eb6(0x15b)])};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a57_0x345033=a57_0x2a79;(function(_0x331461,_0x5a1593){const _0x468c67=a57_0x2a79,_0x4470fa=_0x331461();while(!![]){try{const _0x4bcd51=parseInt(_0x468c67(0x15d))/0x1*(parseInt(_0x468c67(0x168))/0x2)+parseInt(_0x468c67(0x15b))/0x3+parseInt(_0x468c67(0x154))/0x4*(-parseInt(_0x468c67(0x15e))/0x5)+parseInt(_0x468c67(0x156))/0x6+parseInt(_0x468c67(0x15f))/0x7*(-parseInt(_0x468c67(0x163))/0x8)+parseInt(_0x468c67(0x169))/0x9*(parseInt(_0x468c67(0x165))/0xa)+-parseInt(_0x468c67(0x162))/0xb*(parseInt(_0x468c67(0x157))/0xc);if(_0x4bcd51===_0x5a1593)break;else _0x4470fa['push'](_0x4470fa['shift']());}catch(_0x39fb19){_0x4470fa['push'](_0x4470fa['shift']());}}}(a57_0x11e8,0x5be4f));import{updateRuntimeRoleUsers}from'../../core/api-client.js';import{dryRun}from'../../framework/dryrun.js';function a57_0x2a79(_0x55259a,_0x2bc568){_0x55259a=_0x55259a-0x154;const _0x11e830=a57_0x11e8();let _0x2a79b8=_0x11e830[_0x55259a];return _0x2a79b8;}import{EXPECT_USER_COUNT_FLAG,prepareRuntimeMemberMutation,ROLE_REF_FLAG,runtimeRoleWriteResult,USER_ID_FLAG}from'../../commands/role/shared.js';function a57_0x11e8(){const _0x13950a=['shouldWrite','Preview:\x20remove\x20runtime\x20role\x20member','11pMChEr','8WQmaZC','Remove\x20a\x20numeric\x20userId\x20from\x20one\x20runtime\x20role','1094070UlKNMI','body','appCode','5946pgObLl','45cZBKrZ','roleList','/client/permit/user-role/update-user-list','warnings','after','POST','749188UJmrZj','user-remove','3609936TtfjeX','4414908rgWcUF','build','role','Removes\x20the\x20given\x20runtime\x20user\x20from\x20the\x20target\x20role.\x20The\x20user\x20loses\x20permissions\x20granted\x20only\x20by\x20that\x20role.','1206474COcEBD','high-risk-write','47ZhCheV','10xsLSkh','4001746xgyuGp'];a57_0x11e8=function(){return _0x13950a;};return a57_0x11e8();}export const roleUserRemove={'service':a57_0x345033(0x159),'command':'user-remove','description':a57_0x345033(0x164),'risk':a57_0x345033(0x15c),'confirmationDescription':a57_0x345033(0x15a),'flags':[ROLE_REF_FLAG,USER_ID_FLAG,EXPECT_USER_COUNT_FLAG],async 'dryRun'(_0x1e9c4e){const _0x80e2b1=a57_0x345033,_0x2dcbc3=await prepareRuntimeMemberMutation(_0x1e9c4e,_0x80e2b1(0x155));return dryRun(_0x80e2b1(0x16e),_0x80e2b1(0x16b))[_0x80e2b1(0x166)]({'appCode':_0x1e9c4e[_0x80e2b1(0x167)],'roleList':_0x2dcbc3[_0x80e2b1(0x16a)]})['description'](_0x2dcbc3[_0x80e2b1(0x160)]?_0x80e2b1(0x161):_0x2dcbc3[_0x80e2b1(0x16c)][0x0])[_0x80e2b1(0x158)]();},async 'execute'(_0x224c1a){const _0x26ddf1=a57_0x345033,_0x11eec6=await prepareRuntimeMemberMutation(_0x224c1a,_0x26ddf1(0x155));return _0x11eec6[_0x26ddf1(0x160)]&&await updateRuntimeRoleUsers(_0x224c1a[_0x26ddf1(0x167)],_0x11eec6[_0x26ddf1(0x16a)]),{'ok':!![],'data':runtimeRoleWriteResult(_0x26ddf1(0x155),{'roleId':_0x11eec6[_0x26ddf1(0x159)]['id'],'userId':_0x11eec6['userId']},_0x11eec6['before'],_0x11eec6[_0x26ddf1(0x16d)],{'method':'POST','path':_0x26ddf1(0x16b)},_0x11eec6[_0x26ddf1(0x16c)])};}};
|