@lovrabet/lovrabet-cli 2.3.10 → 2.3.11-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/approval/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.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.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/import-excel.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/issue/context.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/report.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.js +1 -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.js +1 -1
- 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.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- 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/kb-management-client.js +1 -1
- package/lib/core/kb-sdk-errors.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/access-error.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.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/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.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/services/dataset-import/auto-id-runner.js +1 -1
- package/lib/services/dataset-import/excel-reader.js +1 -1
- package/lib/services/dataset-import/image-bytes.js +1 -1
- package/lib/services/dataset-import/image-ooxml.js +1 -1
- package/lib/services/dataset-import/image-runner.js +1 -1
- package/lib/services/dataset-import/metadata.js +1 -1
- package/lib/services/dataset-import/preview.js +1 -1
- package/lib/services/dataset-import/runner.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.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- 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/positive-safe-integer.js +1 -1
- package/lib/utils/redaction.js +1 -1
- package/lib/utils/runtime-user-id.js +1 -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 +1 -1
- package/skills/lovrabet/SKILL.md +3 -3
- package/skills/lovrabet/references/lovrabet-schedule-workflow.md +50 -1
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a54_0x42e782=a54_0x41cd;(function(_0x72bed2,_0x1aa7f1){const _0x5c42d8=a54_0x41cd,_0x4435f0=_0x72bed2();while(!![]){try{const _0x519432=-parseInt(_0x5c42d8(0xb6))/0x1*(-parseInt(_0x5c42d8(0xaf))/0x2)+-parseInt(_0x5c42d8(0xbd))/0x3*(parseInt(_0x5c42d8(0xb7))/0x4)+parseInt(_0x5c42d8(0xa8))/0x5+parseInt(_0x5c42d8(0xa7))/0x6*(-parseInt(_0x5c42d8(0xa6))/0x7)+-parseInt(_0x5c42d8(0xb8))/0x8+parseInt(_0x5c42d8(0xa9))/0x9*(-parseInt(_0x5c42d8(0xab))/0xa)+-parseInt(_0x5c42d8(0xad))/0xb*(parseInt(_0x5c42d8(0xb5))/0xc);if(_0x519432===_0x1aa7f1)break;else _0x4435f0['push'](_0x4435f0['shift']());}catch(_0x3d0c40){_0x4435f0['push'](_0x4435f0['shift']());}}}(a54_0x294a,0xc3b16));import{createRuntimeAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a54_0x294a(){const _0x2b3e46=['828AgkGbS','7867570ikkTdh','9LZBDLb','Role\x20name','2004010uiHNmc','string','15634762vtigkm','role','3090154jOKNqt','str','CUSTOM','high-risk-write','Preview:\x20create\x20a\x20runtime\x20CUSTOM\x20role','trim','12xinMAf','1THfoDv','12tuIaUX','361808ACgBMs','--name\x20must\x20not\x20be\x20blank.','POST','/client/permit/role/create','name','629226yXtNET','appCode','description','create','Optional\x20role\x20remark','remark','1057xRxpgU'];a54_0x294a=function(){return _0x2b3e46;};return a54_0x294a();}import{dryRun}from'../../framework/dryrun.js';import{projectRuntimeRole,readOptionalRuntimeRoleCode,ROLE_CODE_FLAG,runtimeRoleWriteResult}from'../../commands/role/shared.js';function input(_0x43c2dd){const _0x5d1fa0=a54_0x41cd,_0x36a3bd=_0x43c2dd[_0x5d1fa0(0xb0)](_0x5d1fa0(0xbc))[_0x5d1fa0(0xb4)]();if(!_0x36a3bd)throw CliErrors['validation'](_0x5d1fa0(0xb9));const _0x2ae53a=_0x43c2dd[_0x5d1fa0(0xb0)](_0x5d1fa0(0xa5))[_0x5d1fa0(0xb4)](),_0x359699=readOptionalRuntimeRoleCode(_0x43c2dd);return{'appCode':_0x43c2dd[_0x5d1fa0(0xbe)],'roleName':_0x36a3bd,..._0x359699?{'roleCode':_0x359699}:{},..._0x2ae53a?{'remark':_0x2ae53a}:{}};}function a54_0x41cd(_0x2c65c7,_0x118b81){_0x2c65c7=_0x2c65c7-0xa2;const _0x294a26=a54_0x294a();let _0x41cdb5=_0x294a26[_0x2c65c7];return _0x41cdb5;}export const roleCreate={'service':a54_0x42e782(0xae),'command':a54_0x42e782(0xa3),'description':'Create\x20a\x20runtime\x20CUSTOM\x20role','risk':a54_0x42e782(0xb2),'confirmationDescription':'Creates\x20a\x20custom\x20role\x20in\x20the\x20current\x20runtime\x20app.\x20After\x20creation\x20it\x20can\x20be\x20used\x20for\x20member\x20and\x20resource\x20permissions.','flags':[{'name':a54_0x42e782(0xbc),'type':a54_0x42e782(0xac),'required':!![],'description':a54_0x42e782(0xaa)},ROLE_CODE_FLAG,{'name':a54_0x42e782(0xa5),'type':a54_0x42e782(0xac),'description':a54_0x42e782(0xa4)}],async 'validate'(_0x4981d5){input(_0x4981d5);},async 'dryRun'(_0x1569f8){const _0x5124d1=a54_0x42e782;return dryRun('POST',_0x5124d1(0xbb))['body']({'roleType':_0x5124d1(0xb1),...input(_0x1569f8)})[_0x5124d1(0xa2)](_0x5124d1(0xb3))['build']();},async 'execute'(_0x451d3b){const _0x4be4b6=a54_0x42e782,_0x11977f=await createRuntimeAppRole(input(_0x451d3b));return{'ok':!![],'data':runtimeRoleWriteResult(_0x4be4b6(0xa3),{'roleId':_0x11977f['id']},null,projectRuntimeRole(_0x11977f),{'method':_0x4be4b6(0xba),'path':'/client/permit/role/create'})};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a55_0x1fb9fa=a55_0x287c;(function(_0xa8b0f3,_0x5c3097){const _0x2b4cd=a55_0x287c,_0x568bfd=_0xa8b0f3();while(!![]){try{const _0x1abb7a=-parseInt(_0x2b4cd(0x128))/0x1+parseInt(_0x2b4cd(0x139))/0x2*(parseInt(_0x2b4cd(0x12d))/0x3)+-parseInt(_0x2b4cd(0x13a))/0x4+-parseInt(_0x2b4cd(0x127))/0x5*(parseInt(_0x2b4cd(0x135))/0x6)+parseInt(_0x2b4cd(0x12e))/0x7+-parseInt(_0x2b4cd(0x130))/0x8+parseInt(_0x2b4cd(0x131))/0x9;if(_0x1abb7a===_0x5c3097)break;else _0x568bfd['push'](_0x568bfd['shift']());}catch(_0x5d54a5){_0x568bfd['push'](_0x568bfd['shift']());}}}(a55_0x34dc,0xe98fd));import{deleteRuntimeAppRole}from'../../core/api-client.js';import{dryRun}from'../../framework/dryrun.js';function a55_0x287c(_0x3e475f,_0x15b303){_0x3e475f=_0x3e475f-0x127;const _0x34dc2b=a55_0x34dc();let _0x287ccc=_0x34dc2b[_0x3e475f];return _0x287ccc;}import{assertCustomRuntimeRole,getRuntimeRoleById,projectRuntimeRole,ROLE_ID_FLAG,runtimeRoleWriteResult}from'../../commands/role/shared.js';async function prepare(_0xbf28dc){const _0x1eb37f=a55_0x287c,_0x531ffa=await getRuntimeRoleById(_0xbf28dc[_0x1eb37f(0x12b)],_0xbf28dc[_0x1eb37f(0x133)]('id'));return assertCustomRuntimeRole(_0x531ffa,_0x1eb37f(0x132)),_0x531ffa;}export const roleDelete={'service':a55_0x1fb9fa(0x138),'command':a55_0x1fb9fa(0x132),'description':a55_0x1fb9fa(0x12c),'risk':a55_0x1fb9fa(0x129),'confirmationDescription':a55_0x1fb9fa(0x12f),'flags':[ROLE_ID_FLAG],async 'dryRun'(_0x3d9f72){const _0x4ff163=a55_0x1fb9fa,_0x47c316=await prepare(_0x3d9f72);return dryRun(_0x4ff163(0x134),_0x4ff163(0x12a))[_0x4ff163(0x136)]({'id':_0x47c316['id']})[_0x4ff163(0x137)]('Preview:\x20delete\x20a\x20runtime\x20CUSTOM\x20role')['build']();},async 'execute'(_0x436bd3){const _0x373f9a=a55_0x1fb9fa,_0x4cc6d8=await prepare(_0x436bd3);return await deleteRuntimeAppRole(_0x4cc6d8['id']),{'ok':!![],'data':runtimeRoleWriteResult(_0x373f9a(0x132),{'roleId':_0x4cc6d8['id']},projectRuntimeRole(_0x4cc6d8),null,{'method':_0x373f9a(0x134),'path':_0x373f9a(0x12a)})};}};function a55_0x34dc(){const _0x4b5c40=['597mKyJFB','2811235JloxuU','Deletes\x20the\x20custom\x20role\x20in\x20the\x20current\x20runtime\x20app.\x20Membership\x20and\x20permission\x20config\x20for\x20that\x20role\x20may\x20become\x20invalid.','14258648kcIrsw','54467001ydlTaJ','delete','num','POST','6blHelm','body','description','role','7336fbmzhI','6535032Ofvsvt','6306415LdVXJj','1549385pKRVqh','high-risk-write','/client/permit/role/delete','appCode','Delete\x20a\x20runtime\x20CUSTOM\x20role'];a55_0x34dc=function(){return _0x4b5c40;};return a55_0x34dc();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a56_0x409992=a56_0x2031;function a56_0x2031(_0x222337,_0x4e4696){_0x222337=_0x222337-0x1aa;const _0x13512f=a56_0x1351();let _0x2031e8=_0x13512f[_0x222337];return _0x2031e8;}(function(_0x2dc29a,_0x46305c){const _0x4b79b1=a56_0x2031,_0x2c7e46=_0x2dc29a();while(!![]){try{const _0x40431a=parseInt(_0x4b79b1(0x1b9))/0x1+-parseInt(_0x4b79b1(0x1b4))/0x2+-parseInt(_0x4b79b1(0x1aa))/0x3+-parseInt(_0x4b79b1(0x1b5))/0x4+-parseInt(_0x4b79b1(0x1b8))/0x5*(-parseInt(_0x4b79b1(0x1ab))/0x6)+parseInt(_0x4b79b1(0x1ac))/0x7*(parseInt(_0x4b79b1(0x1b2))/0x8)+parseInt(_0x4b79b1(0x1b0))/0x9*(parseInt(_0x4b79b1(0x1b7))/0xa);if(_0x40431a===_0x46305c)break;else _0x2c7e46['push'](_0x2c7e46['shift']());}catch(_0x1ecffb){_0x2c7e46['push'](_0x2c7e46['shift']());}}}(a56_0x1351,0x6bdfa));function a56_0x1351(){const _0x42673f=['1228856DriBtl','detail','506960ynJrGf','15EUwRwP','473262xxUfmq','num','887388KGqEJr','213024KAJFsg','1876DpPvYo','role','runtime','Show\x20one\x20runtime\x20role\x20by\x20ID','90GBybEE','read','10600JGhOdT','appCode','793948OEQSrz'];a56_0x1351=function(){return _0x42673f;};return a56_0x1351();}import{getRuntimeRoleById,projectRuntimeRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';export const roleDetail={'service':a56_0x409992(0x1ad),'command':a56_0x409992(0x1b6),'description':a56_0x409992(0x1af),'risk':a56_0x409992(0x1b1),'flags':[ROLE_ID_FLAG],async 'execute'(_0x47af47){const _0x32af7f=a56_0x409992,_0x3484bf=await getRuntimeRoleById(_0x47af47[_0x32af7f(0x1b3)],_0x47af47[_0x32af7f(0x1ba)]('id'));return{'ok':!![],'data':{'scope':_0x32af7f(0x1ae),'role':projectRuntimeRole(_0x3484bf)}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a57_0x5be9(_0x4491ea,_0x78b4fd){_0x4491ea=_0x4491ea-0x1b9;const _0x56be2e=a57_0x56be();let _0x5be9b7=_0x56be2e[_0x4491ea];return _0x5be9b7;}(function(_0x3c7f26,_0x9e8cc5){const _0x5b4d4a=a57_0x5be9,_0x31195c=_0x3c7f26();while(!![]){try{const _0x219c01=parseInt(_0x5b4d4a(0x1c0))/0x1+parseInt(_0x5b4d4a(0x1bc))/0x2+parseInt(_0x5b4d4a(0x1c1))/0x3+parseInt(_0x5b4d4a(0x1ba))/0x4*(parseInt(_0x5b4d4a(0x1bb))/0x5)+parseInt(_0x5b4d4a(0x1b9))/0x6+parseInt(_0x5b4d4a(0x1c2))/0x7*(parseInt(_0x5b4d4a(0x1bd))/0x8)+-parseInt(_0x5b4d4a(0x1bf))/0x9*(parseInt(_0x5b4d4a(0x1be))/0xa);if(_0x219c01===_0x9e8cc5)break;else _0x31195c['push'](_0x31195c['shift']());}catch(_0x26c543){_0x31195c['push'](_0x31195c['shift']());}}}(a57_0x56be,0x93f82));import{roleList}from'../../commands/role/list.js';import{roleDetail}from'../../commands/role/detail.js';import{roleCreate}from'../../commands/role/create.js';function a57_0x56be(){const _0x1fe34f=['7tztYej','3925386wDMJle','16nWoIdo','942495LTZCsa','1940992byiUWB','1021648ArkOhD','4310SDaLFT','50373MVYUOr','155577SlpyhV','1069149SncqaD'];a57_0x56be=function(){return _0x1fe34f;};return a57_0x56be();}import{roleUpdate}from'../../commands/role/update.js';import{roleDelete}from'../../commands/role/delete.js';import{roleUserAdd}from'../../commands/role/user-add.js';import{roleUserRemove}from'../../commands/role/user-remove.js';export const roleDefinitions=[roleList,roleDetail,roleCreate,roleUpdate,roleDelete,roleUserAdd,roleUserRemove];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a58_0x70bb2e=a58_0x5dd0;function a58_0x5dd0(_0x4fefdd,_0x1b76e2){_0x4fefdd=_0x4fefdd-0x100;const _0x272bf0=a58_0x272b();let _0x5dd0bd=_0x272bf0[_0x4fefdd];return _0x5dd0bd;}(function(_0x13472d,_0x419cd5){const _0x1b6634=a58_0x5dd0,_0x4d47df=_0x13472d();while(!![]){try{const _0x2c506f=parseInt(_0x1b6634(0x119))/0x1*(-parseInt(_0x1b6634(0x105))/0x2)+parseInt(_0x1b6634(0x106))/0x3*(parseInt(_0x1b6634(0x12a))/0x4)+parseInt(_0x1b6634(0x123))/0x5*(parseInt(_0x1b6634(0x126))/0x6)+parseInt(_0x1b6634(0x120))/0x7+-parseInt(_0x1b6634(0x10b))/0x8*(-parseInt(_0x1b6634(0x101))/0x9)+parseInt(_0x1b6634(0x114))/0xa+-parseInt(_0x1b6634(0x107))/0xb;if(_0x2c506f===_0x419cd5)break;else _0x4d47df['push'](_0x4d47df['shift']());}catch(_0x149424){_0x4d47df['push'](_0x4d47df['shift']());}}}(a58_0x272b,0xebc38));function a58_0x272b(){const _0x2dc97d=['length','map','Invalid\x20runtime\x20role\x20type:\x20','List\x20runtime\x20roles\x20for\x20the\x20current\x20app','roleType','string','6177465QbhCUb','isSafeInteger','Fuzzy\x20role-name\x20filter','895qGTiHk','role','page','38838yNwMoT','number','validation','Runtime\x20role\x20type','1306448xaAZNl','toUpperCase','3397761oeEUpu','filter','type','includes','2pOvezE','6MONGDs','11368544NnmBwc','runtime','Page\x20number','--pagesize\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.','8lWbeCy','trim','appCode','items','str','slice','read','list','Page\x20size\x20from\x201\x20to\x20100','7533030GNDiMK','num','pagesize','name','--page\x20must\x20be\x20a\x20positive\x20integer.','1826026NWceRd'];a58_0x272b=function(){return _0x2dc97d;};return a58_0x272b();}import{listRuntimeAppRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{listAllRuntimeRoles,projectRuntimeRole,RUNTIME_ROLE_TYPES}from'../../commands/role/shared.js';export const roleList={'service':a58_0x70bb2e(0x124),'command':a58_0x70bb2e(0x112),'description':a58_0x70bb2e(0x11d),'risk':a58_0x70bb2e(0x111),'flags':[{'name':'type','type':a58_0x70bb2e(0x11f),'enum':RUNTIME_ROLE_TYPES,'description':a58_0x70bb2e(0x129)},{'name':a58_0x70bb2e(0x117),'type':a58_0x70bb2e(0x11f),'description':a58_0x70bb2e(0x122)},{'name':'page','type':a58_0x70bb2e(0x127),'default':0x1,'description':a58_0x70bb2e(0x109)},{'name':a58_0x70bb2e(0x116),'type':a58_0x70bb2e(0x127),'default':0x64,'description':a58_0x70bb2e(0x113)}],async 'validate'(_0xe6137f){const _0x451d1e=a58_0x70bb2e,_0x177ed7=_0xe6137f[_0x451d1e(0x10f)](_0x451d1e(0x103))[_0x451d1e(0x100)]();if(_0x177ed7&&!RUNTIME_ROLE_TYPES[_0x451d1e(0x104)](_0x177ed7))throw CliErrors[_0x451d1e(0x128)](_0x451d1e(0x11c)+_0x177ed7+'.');const _0x4d6606=_0xe6137f[_0x451d1e(0x115)]('page',0x1),_0x5255d3=_0xe6137f[_0x451d1e(0x115)](_0x451d1e(0x116),0x64);if(!Number['isSafeInteger'](_0x4d6606)||_0x4d6606<0x1)throw CliErrors[_0x451d1e(0x128)](_0x451d1e(0x118));if(!Number[_0x451d1e(0x121)](_0x5255d3)||_0x5255d3<0x1||_0x5255d3>0x64)throw CliErrors[_0x451d1e(0x128)](_0x451d1e(0x10a));},async 'execute'(_0x8a6e76){const _0x42667f=a58_0x70bb2e,_0x5ecc40=_0x8a6e76[_0x42667f(0x10f)](_0x42667f(0x103))[_0x42667f(0x100)](),_0x2e02ce=_0x8a6e76[_0x42667f(0x10f)](_0x42667f(0x117))[_0x42667f(0x10c)](),_0x4454ec=_0x8a6e76[_0x42667f(0x115)](_0x42667f(0x125),0x1),_0x59b1c8=_0x8a6e76[_0x42667f(0x115)](_0x42667f(0x116),0x64);if(_0x5ecc40){const _0x38daa4=(await listAllRuntimeRoles(_0x8a6e76[_0x42667f(0x10d)],{..._0x2e02ce?{'roleName':_0x2e02ce}:{}}))[_0x42667f(0x102)](_0x14c68b=>_0x14c68b[_0x42667f(0x11e)]===_0x5ecc40),_0x1d78ab=(_0x4454ec-0x1)*_0x59b1c8;return{'ok':!![],'data':{'scope':_0x42667f(0x108),'roles':_0x38daa4[_0x42667f(0x110)](_0x1d78ab,_0x1d78ab+_0x59b1c8)[_0x42667f(0x11b)](projectRuntimeRole),'paging':{'currentPage':_0x4454ec,'pageSize':_0x59b1c8,'totalCount':_0x38daa4[_0x42667f(0x11a)]}}};}const _0x35d33b=await listRuntimeAppRoles(_0x8a6e76['appCode'],{..._0x2e02ce?{'roleName':_0x2e02ce}:{},'currentPage':_0x4454ec,'pageSize':_0x59b1c8});return{'ok':!![],'data':{'scope':'runtime','roles':_0x35d33b[_0x42667f(0x10e)][_0x42667f(0x11b)](projectRuntimeRole),'paging':_0x35d33b['paging']}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a59_0x4510ec=a59_0x11fd;(function(_0x298d85,_0x2d7f20){const _0x483ec1=a59_0x11fd,_0xbc474c=_0x298d85();while(!![]){try{const _0x2b263c=-parseInt(_0x483ec1(0x182))/0x1*(-parseInt(_0x483ec1(0x191))/0x2)+parseInt(_0x483ec1(0x18b))/0x3*(-parseInt(_0x483ec1(0x171))/0x4)+-parseInt(_0x483ec1(0x163))/0x5*(parseInt(_0x483ec1(0x1a2))/0x6)+parseInt(_0x483ec1(0x18a))/0x7+-parseInt(_0x483ec1(0x17b))/0x8+-parseInt(_0x483ec1(0x173))/0x9*(parseInt(_0x483ec1(0x164))/0xa)+parseInt(_0x483ec1(0x159))/0xb;if(_0x2b263c===_0x2d7f20)break;else _0xbc474c['push'](_0xbc474c['shift']());}catch(_0x4b8fd7){_0xbc474c['push'](_0xbc474c['shift']());}}}(a59_0x3b96,0xd1a09));import{listRuntimeAppUsers,listRuntimeAppRoles,listRuntimeRoleUsers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{normalizeRuntimeUserId}from'../../utils/runtime-user-id.js';function a59_0x11fd(_0x50b31a,_0x1fc8f4){_0x50b31a=_0x50b31a-0x155;const _0x3b96f3=a59_0x3b96();let _0x11fda0=_0x3b96f3[_0x50b31a];return _0x11fda0;}export const RUNTIME_ROLE_TYPES=[a59_0x4510ec(0x157),a59_0x4510ec(0x186),'OWNER',a59_0x4510ec(0x194)];const BUILTIN_ROLE_TYPES=[a59_0x4510ec(0x157),a59_0x4510ec(0x186),a59_0x4510ec(0x192)];export const ROLE_ID_FLAG={'name':'id','type':a59_0x4510ec(0x196),'required':!![],'description':a59_0x4510ec(0x174)};export const ROLE_REF_FLAG={'name':a59_0x4510ec(0x18e),'type':'string','required':!![],'description':a59_0x4510ec(0x172)};export const ROLE_CODE_FLAG={'name':a59_0x4510ec(0x162),'type':a59_0x4510ec(0x185),'description':a59_0x4510ec(0x18d)};export const USER_ID_FLAG={'name':'user','type':a59_0x4510ec(0x185),'required':!![],'description':a59_0x4510ec(0x1a1)};export const EXPECT_USER_COUNT_FLAG={'name':a59_0x4510ec(0x17a),'type':a59_0x4510ec(0x196),'description':a59_0x4510ec(0x184)};export function isBuiltinRuntimeRole(_0x57888b){const _0x28c5d0=a59_0x4510ec;return BUILTIN_ROLE_TYPES[_0x28c5d0(0x16c)](_0x57888b);}export function assertCustomRuntimeRole(_0x4a14f8,_0x456423){const _0xd2af27=a59_0x4510ec;if(_0x4a14f8[_0xd2af27(0x18c)]!==_0xd2af27(0x194))throw CliErrors[_0xd2af27(0x179)](_0xd2af27(0x16a)+_0x456423+_0xd2af27(0x181)+_0x4a14f8['roleName']+'\x20('+_0x4a14f8[_0xd2af27(0x18c)]+').',_0xd2af27(0x18f));}export function projectRuntimeRole(_0x550a1e){const _0x57981a=a59_0x4510ec;return{'id':_0x550a1e['id'],'roleCode':_0x550a1e['roleCode'],'roleName':_0x550a1e[_0x57981a(0x16d)],'roleType':_0x550a1e['roleType'],'remark':_0x550a1e[_0x57981a(0x180)],'userCount':_0x550a1e[_0x57981a(0x195)]??0x0,'permitCount':_0x550a1e[_0x57981a(0x19a)]??0x0,'builtin':isBuiltinRuntimeRole(_0x550a1e['roleType'])};}export function readOptionalRuntimeRoleCode(_0x5aefba){const _0x5f3753=a59_0x4510ec,_0x58cc3a=_0x5aefba[_0x5f3753(0x16e)]('role-code');if(_0x58cc3a===undefined||_0x58cc3a===null)return undefined;const _0x58ce25=String(_0x58cc3a)[_0x5f3753(0x178)]();if(!_0x58ce25)throw CliErrors[_0x5f3753(0x179)](_0x5f3753(0x17d));if(_0x58ce25[_0x5f3753(0x1a0)]>0x40)throw CliErrors[_0x5f3753(0x179)]('--role-code\x20cannot\x20exceed\x2064\x20characters.');return _0x58ce25;}export async function getRuntimeRoleById(_0x537f58,_0x2d6794){const _0x12a48a=a59_0x4510ec;if(!Number[_0x12a48a(0x177)](_0x2d6794)||_0x2d6794<=0x0)throw CliErrors[_0x12a48a(0x179)](_0x12a48a(0x175));const _0x2373ec=(await listAllRuntimeRoles(_0x537f58))['filter'](_0x12b93b=>_0x12b93b['id']===_0x2d6794&&(!_0x12b93b[_0x12a48a(0x19c)]||_0x12b93b[_0x12a48a(0x19c)]===_0x537f58));if(_0x2373ec[_0x12a48a(0x1a0)]!==0x1)throw CliErrors[_0x12a48a(0x179)]('Runtime\x20role\x20id\x20'+_0x2d6794+_0x12a48a(0x156)+_0x537f58+'.',_0x12a48a(0x15b));const _0x276d49=_0x2373ec[0x0],_0x45299c=_0x276d49['id'];if(typeof _0x45299c!==_0x12a48a(0x196)||!Number[_0x12a48a(0x177)](_0x45299c)||_0x45299c<=0x0)throw CliErrors[_0x12a48a(0x179)]('Runtime\x20role\x20has\x20an\x20invalid\x20ID;\x20reload\x20roles\x20before\x20writing.');return{..._0x276d49,'id':_0x45299c};}function a59_0x3b96(){const _0x554d0e=['Reject\x20when\x20the\x20target\x20role\x20member\x20count\x20has\x20changed','string','USER','Runtime\x20role\x20name\x20\x22','runtime','join','31297FwyMTZ','84XvdPmg','roleType','Globally\x20unique\x20roleCode\x20(maximum\x2064\x20characters)','role','Only\x20CUSTOM\x20runtime\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','\x20is\x20already\x20in\x20runtime\x20role\x20','6bQOekN','OWNER','\x20is\x20missing\x20from\x20the\x20grouped\x20member\x20snapshot.','CUSTOM','userCount','number','userList','\x22\x20is\x20ambiguous.','Runtime\x20role\x20member\x20count\x20changed:\x20expected\x20','permitCount','Runtime\x20user\x20','appCode','filter','Pass\x20--user\x20<userId>;\x20name\x20and\x20account\x20lookup\x20are\x20not\x20available\x20in\x20runtime\x20scope.','Invalid\x20runtime\x20userId.','length','Runtime\x20userId\x20(string)','31032TdyZsP','push','Runtime\x20role\x20member\x20snapshot\x20has\x20an\x20invalid\x20role\x20ID;\x20reload\x20before\x20writing.','num','--expect-user-count\x20must\x20be\x20a\x20non-negative\x20integer.','\x20was\x20not\x20found\x20in\x20app\x20','ADMIN','paging','44705749WLUSdQ','OWNER\x20runtime\x20role\x20membership\x20cannot\x20be\x20changed\x20with\x20this\x20command.','Run\x20`lovrabet\x20role\x20list`\x20and\x20use\x20a\x20role\x20from\x20the\x20current\x20app.','userId','str','Use\x20a\x20userId\x20returned\x20by\x20the\x20current\x20application\x27s\x20personnel\x20list.','Transfer\x20or\x20manage\x20application\x20ownership\x20through\x20the\x20dedicated\x20application\x20workflow.','Pass\x20one\x20role\x20ID:\x20','Missing\x20runtime\x20role\x20reference.','role-code','475nUspTN','7238390sFWHaG','user-add','code','User\x20','Pass\x20--role\x20<id|name>.',',\x20found\x20','Cannot\x20','items','includes','roleName','flag','user','test','221992pTbGCs','Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name','9oioCaq','Runtime\x20role\x20ID\x20returned\x20by\x20role\x20list','Role\x20ID\x20must\x20be\x20a\x20positive\x20integer.','totalCount','isSafeInteger','trim','validation','expect-user-count','10848264RsdIOM','userName','--role-code\x20must\x20not\x20be\x20blank.','applyUserList','map','remark','\x20built-in\x20runtime\x20role\x20','305053TJZkfS','Run\x20`lovrabet\x20role\x20list`\x20or\x20pass\x20--role\x20<id>.'];a59_0x3b96=function(){return _0x554d0e;};return a59_0x3b96();}export async function listAllRuntimeRoles(_0x1d666b,_0x343fac={}){const _0x4b8f1f=a59_0x4510ec,_0x46d0a6=0x64,_0x4cd080=[];for(let _0x3d7850=0x1;;_0x3d7850+=0x1){const _0x45f438=await listRuntimeAppRoles(_0x1d666b,{..._0x343fac['roleName']?{'roleName':_0x343fac['roleName']}:{},'currentPage':_0x3d7850,'pageSize':_0x46d0a6});_0x4cd080[_0x4b8f1f(0x1a3)](..._0x45f438[_0x4b8f1f(0x16b)]);if(_0x45f438[_0x4b8f1f(0x16b)][_0x4b8f1f(0x1a0)]<_0x46d0a6||_0x45f438[_0x4b8f1f(0x158)]&&_0x4cd080['length']>=_0x45f438[_0x4b8f1f(0x158)][_0x4b8f1f(0x176)])return _0x4cd080;}}export async function resolveRuntimeRoleRef(_0x32007e,_0x52db07){const _0x294b22=a59_0x4510ec,_0x363dbc=_0x52db07[_0x294b22(0x178)]();if(!_0x363dbc)throw CliErrors['validation'](_0x294b22(0x161),_0x294b22(0x168));if(/^\d+$/[_0x294b22(0x170)](_0x363dbc))return getRuntimeRoleById(_0x32007e,Number(_0x363dbc));const _0x42f7c2=(await listAllRuntimeRoles(_0x32007e))[_0x294b22(0x19d)](_0xb60e6c=>_0xb60e6c['roleName']===_0x363dbc);if(_0x42f7c2[_0x294b22(0x1a0)]===0x0)throw CliErrors[_0x294b22(0x179)](_0x294b22(0x187)+_0x363dbc+'\x22\x20was\x20not\x20found\x20in\x20app\x20'+_0x32007e+'.',_0x294b22(0x183));if(_0x42f7c2[_0x294b22(0x1a0)]>0x1)throw CliErrors[_0x294b22(0x179)](_0x294b22(0x187)+_0x363dbc+_0x294b22(0x198),_0x294b22(0x160)+_0x42f7c2['map'](_0x1a86d8=>_0x1a86d8['id'])[_0x294b22(0x189)](',\x20')+'.');const _0x5117b1=_0x42f7c2[0x0],_0x38ea40=_0x5117b1['id'];if(typeof _0x38ea40!==_0x294b22(0x196)||!Number['isSafeInteger'](_0x38ea40)||_0x38ea40<=0x0)throw CliErrors[_0x294b22(0x179)]('Runtime\x20role\x20has\x20an\x20invalid\x20ID;\x20reload\x20roles\x20before\x20writing.');return{..._0x5117b1,'id':_0x38ea40};}function parseRuntimeUserId(_0x14106f){const _0x156de5=a59_0x4510ec,_0x3b246c=_0x14106f['trim'](),_0x8e45fc=normalizeRuntimeUserId(_0x3b246c);if(_0x8e45fc===undefined)throw CliErrors[_0x156de5(0x179)](_0x156de5(0x19f),_0x156de5(0x19e));return _0x8e45fc;}export async function prepareRuntimeMemberMutation(_0xa934b7,_0x241017){const _0x5ade9c=a59_0x4510ec,_0x172fc7=await resolveRuntimeRoleRef(_0xa934b7['appCode'],_0xa934b7[_0x5ade9c(0x15d)](_0x5ade9c(0x18e)));if(_0x172fc7['roleType']===_0x5ade9c(0x192))throw CliErrors[_0x5ade9c(0x179)](_0x5ade9c(0x15a),_0x5ade9c(0x15f));const _0x23bc1b=parseRuntimeUserId(_0xa934b7['str'](_0x5ade9c(0x16f))),_0x3d5edd=(await listRuntimeRoleUsers(_0xa934b7[_0x5ade9c(0x19c)]))['map'](_0x433f87=>{const _0x18e080=_0x5ade9c;if(typeof _0x433f87['id']!==_0x18e080(0x196)||!Number[_0x18e080(0x177)](_0x433f87['id'])||_0x433f87['id']<=0x0)throw CliErrors[_0x18e080(0x179)](_0x18e080(0x1a4));return{..._0x433f87,'userList':[..._0x433f87[_0x18e080(0x197)]??[]],'applyUserList':[..._0x433f87[_0x18e080(0x17e)]??[]]};}),_0x4b675c=_0x3d5edd['find'](_0x2d5fc0=>_0x2d5fc0['id']===_0x172fc7['id']);if(!_0x4b675c)throw CliErrors[_0x5ade9c(0x179)]('Runtime\x20role\x20'+_0x172fc7['id']+_0x5ade9c(0x193),'Reload\x20the\x20role\x20list\x20and\x20retry\x20after\x20the\x20server\x20state\x20is\x20consistent.');const _0x11cb06=_0x11d7c0=>{const _0x4ddf36=_0x5ade9c,_0x2ecbf7=normalizeRuntimeUserId(_0x11d7c0);if(_0x2ecbf7===undefined)throw CliErrors[_0x4ddf36(0x179)]('Runtime\x20role\x20member\x20has\x20an\x20invalid\x20userId.');return _0x2ecbf7;},_0x5a27f0=_0x4b675c[_0x5ade9c(0x197)][_0x5ade9c(0x17f)](_0x5b9459=>_0x11cb06(_0x5b9459[_0x5ade9c(0x15c)])),_0x1631d2=_0xa934b7[_0x5ade9c(0x16e)]('expect-user-count');if(_0x1631d2!==undefined&&_0x1631d2!==null&&_0x1631d2!==''){const _0x5bd81a=_0xa934b7[_0x5ade9c(0x1a5)](_0x5ade9c(0x17a));if(!Number['isSafeInteger'](_0x5bd81a)||_0x5bd81a<0x0)throw CliErrors['validation'](_0x5ade9c(0x155));if(_0x5a27f0['length']!==_0x5bd81a)throw CliErrors[_0x5ade9c(0x179)](_0x5ade9c(0x199)+_0x5bd81a+_0x5ade9c(0x169)+_0x5a27f0[_0x5ade9c(0x1a0)]+'.','Read\x20the\x20current\x20members\x20and\x20retry\x20with\x20the\x20new\x20expected\x20count.');}const _0x1f2a31=_0x5a27f0[_0x5ade9c(0x16c)](_0x23bc1b),_0x2c8953=[];let _0x598826=!![];if(_0x241017===_0x5ade9c(0x165)){const _0x214289=await listRuntimeAppUsers(_0xa934b7[_0x5ade9c(0x19c)]),_0x2027d0=_0x214289[_0x5ade9c(0x19d)](_0x3567eb=>normalizeRuntimeUserId(_0x3567eb[_0x5ade9c(0x166)])===_0x23bc1b);if(_0x2027d0[_0x5ade9c(0x1a0)]!==0x1||!_0x2027d0[0x0][_0x5ade9c(0x17c)]?.['trim']())throw CliErrors[_0x5ade9c(0x179)](_0x5ade9c(0x19b)+_0x23bc1b+_0x5ade9c(0x156)+_0xa934b7[_0x5ade9c(0x19c)]+'.',_0x5ade9c(0x15e));_0x1f2a31?(_0x598826=![],_0x2c8953['push'](_0x5ade9c(0x167)+_0x23bc1b+_0x5ade9c(0x190)+_0x172fc7['id']+'.')):_0x4b675c[_0x5ade9c(0x197)]['push']({'userId':_0x23bc1b,'username':_0x2027d0[0x0]['userName']});}else!_0x1f2a31?(_0x598826=![],_0x2c8953[_0x5ade9c(0x1a3)](_0x5ade9c(0x167)+_0x23bc1b+'\x20is\x20not\x20in\x20runtime\x20role\x20'+_0x172fc7['id']+'.')):_0x4b675c['userList']=_0x4b675c[_0x5ade9c(0x197)][_0x5ade9c(0x19d)](_0x43b75d=>_0x11cb06(_0x43b75d[_0x5ade9c(0x15c)])!==_0x23bc1b);return{'role':_0x172fc7,'userId':_0x23bc1b,'roleList':_0x3d5edd,'before':{'userIds':_0x5a27f0},'after':{'userIds':_0x4b675c[_0x5ade9c(0x197)][_0x5ade9c(0x17f)](_0x4cf78d=>_0x11cb06(_0x4cf78d['userId']))},'shouldWrite':_0x598826,'warnings':_0x2c8953};}export function runtimeRoleWriteResult(_0x153364,_0x30098a,_0x2153f3,_0x299afc,_0x3d2abb,_0x4cf30b=[]){const _0x3d80a6=a59_0x4510ec;return{'operation':_0x153364,'scope':_0x3d80a6(0x188),'selector':_0x30098a,'before':_0x2153f3,'after':_0x299afc,'dryRun':![],'backend':_0x3d2abb,'warnings':_0x4cf30b};}
|
|
1
|
+
const a59_0x2a4e98=a59_0x5228;(function(_0x26c5bf,_0x3e3632){const _0x332ba8=a59_0x5228,_0x1a44f4=_0x26c5bf();while(!![]){try{const _0x32dbda=parseInt(_0x332ba8(0x107))/0x1+-parseInt(_0x332ba8(0x11c))/0x2*(parseInt(_0x332ba8(0x128))/0x3)+parseInt(_0x332ba8(0x137))/0x4*(-parseInt(_0x332ba8(0x126))/0x5)+parseInt(_0x332ba8(0x11b))/0x6+-parseInt(_0x332ba8(0x110))/0x7*(-parseInt(_0x332ba8(0x134))/0x8)+-parseInt(_0x332ba8(0x124))/0x9+-parseInt(_0x332ba8(0xff))/0xa;if(_0x32dbda===_0x3e3632)break;else _0x1a44f4['push'](_0x1a44f4['shift']());}catch(_0x1e69da){_0x1a44f4['push'](_0x1a44f4['shift']());}}}(a59_0x1ce6,0x531bd));import{listRuntimeAppUsers,listRuntimeAppRoles,listRuntimeRoleUsers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{normalizeRuntimeUserId}from'../../utils/runtime-user-id.js';export const RUNTIME_ROLE_TYPES=[a59_0x2a4e98(0x139),'USER',a59_0x2a4e98(0x106),a59_0x2a4e98(0x117)];const BUILTIN_ROLE_TYPES=[a59_0x2a4e98(0x139),a59_0x2a4e98(0x10b),'OWNER'];function a59_0x1ce6(){const _0x241753=['permitCount','join','runtime','727072JFWmlE','Runtime\x20role\x20','test','4wBvRGd','remark','ADMIN','length','items','role-code','str','filter','totalCount','Missing\x20runtime\x20role\x20reference.','user','validation','flag','Globally\x20unique\x20roleCode\x20(maximum\x2064\x20characters)','User\x20','Invalid\x20runtime\x20userId.','Use\x20a\x20userId\x20returned\x20by\x20the\x20current\x20application\x27s\x20personnel\x20list.','userList','map','\x22\x20is\x20ambiguous.','Runtime\x20role\x20ID\x20returned\x20by\x20role\x20list','Runtime\x20role\x20member\x20count\x20changed:\x20expected\x20','6820370vNNpzQ','push','paging','\x20is\x20already\x20in\x20runtime\x20role\x20','userCount','Runtime\x20role\x20name\x20\x22','role','OWNER','440245dqMcqF','includes','Pass\x20one\x20role\x20ID:\x20','applyUserList','USER','--role-code\x20cannot\x20exceed\x2064\x20characters.','--expect-user-count\x20must\x20be\x20a\x20non-negative\x20integer.','Runtime\x20userId\x20(string)','Reject\x20when\x20the\x20target\x20role\x20member\x20count\x20has\x20changed','49WpCJph','\x20was\x20not\x20found\x20in\x20app\x20','Run\x20`lovrabet\x20role\x20list`\x20and\x20use\x20a\x20role\x20from\x20the\x20current\x20app.','roleName','Runtime\x20user\x20','\x20is\x20missing\x20from\x20the\x20grouped\x20member\x20snapshot.','\x20built-in\x20runtime\x20role\x20','CUSTOM','find','number','Pass\x20--user\x20<userId>;\x20name\x20and\x20account\x20lookup\x20are\x20not\x20available\x20in\x20runtime\x20scope.','3683802ZwXVJr','226076RdokCg','roleCode','Run\x20`lovrabet\x20role\x20list`\x20or\x20pass\x20--role\x20<id>.','userName','Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name','Runtime\x20role\x20id\x20','userId','isSafeInteger','605187CKOdJF','Runtime\x20role\x20has\x20an\x20invalid\x20ID;\x20reload\x20roles\x20before\x20writing.','1307965RxUxqd','appCode','9uotJEv','Cannot\x20','Role\x20ID\x20must\x20be\x20a\x20positive\x20integer.','string','OWNER\x20runtime\x20role\x20membership\x20cannot\x20be\x20changed\x20with\x20this\x20command.','--role-code\x20must\x20not\x20be\x20blank.','trim','roleType','expect-user-count'];a59_0x1ce6=function(){return _0x241753;};return a59_0x1ce6();}export const ROLE_ID_FLAG={'name':'id','type':a59_0x2a4e98(0x119),'required':!![],'description':a59_0x2a4e98(0xfd)};export const ROLE_REF_FLAG={'name':a59_0x2a4e98(0x105),'type':a59_0x2a4e98(0x12b),'required':!![],'description':a59_0x2a4e98(0x120)};export const ROLE_CODE_FLAG={'name':a59_0x2a4e98(0x13c),'type':'string','description':a59_0x2a4e98(0x144)};export const USER_ID_FLAG={'name':'user','type':'string','required':!![],'description':a59_0x2a4e98(0x10e)};export const EXPECT_USER_COUNT_FLAG={'name':'expect-user-count','type':a59_0x2a4e98(0x119),'description':a59_0x2a4e98(0x10f)};export function isBuiltinRuntimeRole(_0x1a8362){const _0x2411fb=a59_0x2a4e98;return BUILTIN_ROLE_TYPES[_0x2411fb(0x108)](_0x1a8362);}export function assertCustomRuntimeRole(_0x136a1f,_0x445468){const _0x9a729d=a59_0x2a4e98;if(_0x136a1f[_0x9a729d(0x12f)]!==_0x9a729d(0x117))throw CliErrors[_0x9a729d(0x142)](_0x9a729d(0x129)+_0x445468+_0x9a729d(0x116)+_0x136a1f[_0x9a729d(0x113)]+'\x20('+_0x136a1f[_0x9a729d(0x12f)]+').','Only\x20CUSTOM\x20runtime\x20roles\x20can\x20be\x20modified\x20or\x20deleted.');}export function projectRuntimeRole(_0x146d1c){const _0x5017ae=a59_0x2a4e98;return{'id':_0x146d1c['id'],'roleCode':_0x146d1c[_0x5017ae(0x11d)],'roleName':_0x146d1c[_0x5017ae(0x113)],'roleType':_0x146d1c[_0x5017ae(0x12f)],'remark':_0x146d1c[_0x5017ae(0x138)],'userCount':_0x146d1c[_0x5017ae(0x103)]??0x0,'permitCount':_0x146d1c[_0x5017ae(0x131)]??0x0,'builtin':isBuiltinRuntimeRole(_0x146d1c[_0x5017ae(0x12f)])};}export function readOptionalRuntimeRoleCode(_0x4bf624){const _0x147fe9=a59_0x2a4e98,_0x380387=_0x4bf624[_0x147fe9(0x143)]('role-code');if(_0x380387===undefined||_0x380387===null)return undefined;const _0x4e2c2d=String(_0x380387)[_0x147fe9(0x12e)]();if(!_0x4e2c2d)throw CliErrors['validation'](_0x147fe9(0x12d));if(_0x4e2c2d[_0x147fe9(0x13a)]>0x40)throw CliErrors[_0x147fe9(0x142)](_0x147fe9(0x10c));return _0x4e2c2d;}export async function getRuntimeRoleById(_0x7259ce,_0x57c57a){const _0x494f00=a59_0x2a4e98;if(!Number[_0x494f00(0x123)](_0x57c57a)||_0x57c57a<=0x0)throw CliErrors[_0x494f00(0x142)](_0x494f00(0x12a));const _0x5678ee=(await listAllRuntimeRoles(_0x7259ce))[_0x494f00(0x13e)](_0x1b560c=>_0x1b560c['id']===_0x57c57a&&(!_0x1b560c[_0x494f00(0x127)]||_0x1b560c[_0x494f00(0x127)]===_0x7259ce));if(_0x5678ee['length']!==0x1)throw CliErrors[_0x494f00(0x142)](_0x494f00(0x121)+_0x57c57a+_0x494f00(0x111)+_0x7259ce+'.',_0x494f00(0x112));const _0x58094b=_0x5678ee[0x0],_0x1ea4a2=_0x58094b['id'];if(typeof _0x1ea4a2!==_0x494f00(0x119)||!Number[_0x494f00(0x123)](_0x1ea4a2)||_0x1ea4a2<=0x0)throw CliErrors[_0x494f00(0x142)]('Runtime\x20role\x20has\x20an\x20invalid\x20ID;\x20reload\x20roles\x20before\x20writing.');return{..._0x58094b,'id':_0x1ea4a2};}function a59_0x5228(_0x277c27,_0x3f2f20){_0x277c27=_0x277c27-0xfb;const _0x1ce6b6=a59_0x1ce6();let _0x522876=_0x1ce6b6[_0x277c27];return _0x522876;}export async function listAllRuntimeRoles(_0x1413d2,_0xe1a9e5={}){const _0x4b808d=a59_0x2a4e98,_0x330de6=0x64,_0x6b3e9e=[];for(let _0x4ac344=0x1;;_0x4ac344+=0x1){const _0x29eb0a=await listRuntimeAppRoles(_0x1413d2,{..._0xe1a9e5[_0x4b808d(0x113)]?{'roleName':_0xe1a9e5[_0x4b808d(0x113)]}:{},'currentPage':_0x4ac344,'pageSize':_0x330de6});_0x6b3e9e[_0x4b808d(0x100)](..._0x29eb0a[_0x4b808d(0x13b)]);if(_0x29eb0a[_0x4b808d(0x13b)][_0x4b808d(0x13a)]<_0x330de6||_0x29eb0a[_0x4b808d(0x101)]&&_0x6b3e9e['length']>=_0x29eb0a[_0x4b808d(0x101)][_0x4b808d(0x13f)])return _0x6b3e9e;}}export async function resolveRuntimeRoleRef(_0x349544,_0x44cae5){const _0x5b3780=a59_0x2a4e98,_0x4e3a9f=_0x44cae5[_0x5b3780(0x12e)]();if(!_0x4e3a9f)throw CliErrors[_0x5b3780(0x142)](_0x5b3780(0x140),'Pass\x20--role\x20<id|name>.');if(/^\d+$/[_0x5b3780(0x136)](_0x4e3a9f))return getRuntimeRoleById(_0x349544,Number(_0x4e3a9f));const _0x18de8f=(await listAllRuntimeRoles(_0x349544))['filter'](_0xa22d60=>_0xa22d60[_0x5b3780(0x113)]===_0x4e3a9f);if(_0x18de8f[_0x5b3780(0x13a)]===0x0)throw CliErrors[_0x5b3780(0x142)](_0x5b3780(0x104)+_0x4e3a9f+'\x22\x20was\x20not\x20found\x20in\x20app\x20'+_0x349544+'.',_0x5b3780(0x11e));if(_0x18de8f['length']>0x1)throw CliErrors['validation'](_0x5b3780(0x104)+_0x4e3a9f+_0x5b3780(0xfc),_0x5b3780(0x109)+_0x18de8f[_0x5b3780(0xfb)](_0x5a3b4b=>_0x5a3b4b['id'])[_0x5b3780(0x132)](',\x20')+'.');const _0x3c27d6=_0x18de8f[0x0],_0x38e68a=_0x3c27d6['id'];if(typeof _0x38e68a!==_0x5b3780(0x119)||!Number['isSafeInteger'](_0x38e68a)||_0x38e68a<=0x0)throw CliErrors[_0x5b3780(0x142)](_0x5b3780(0x125));return{..._0x3c27d6,'id':_0x38e68a};}function parseRuntimeUserId(_0x4711e5){const _0x26ea64=a59_0x2a4e98,_0x397ef2=_0x4711e5[_0x26ea64(0x12e)](),_0x561ccf=normalizeRuntimeUserId(_0x397ef2);if(_0x561ccf===undefined)throw CliErrors['validation'](_0x26ea64(0x146),_0x26ea64(0x11a));return _0x561ccf;}export async function prepareRuntimeMemberMutation(_0x594d39,_0x5de6da){const _0x349394=a59_0x2a4e98,_0x52a4e4=await resolveRuntimeRoleRef(_0x594d39['appCode'],_0x594d39[_0x349394(0x13d)]('role'));if(_0x52a4e4[_0x349394(0x12f)]===_0x349394(0x106))throw CliErrors[_0x349394(0x142)](_0x349394(0x12c),'Transfer\x20or\x20manage\x20application\x20ownership\x20through\x20the\x20dedicated\x20application\x20workflow.');const _0x96cd0f=parseRuntimeUserId(_0x594d39['str'](_0x349394(0x141))),_0x574dba=(await listRuntimeRoleUsers(_0x594d39[_0x349394(0x127)]))[_0x349394(0xfb)](_0x38b355=>{const _0x48354f=_0x349394;if(typeof _0x38b355['id']!==_0x48354f(0x119)||!Number['isSafeInteger'](_0x38b355['id'])||_0x38b355['id']<=0x0)throw CliErrors['validation']('Runtime\x20role\x20member\x20snapshot\x20has\x20an\x20invalid\x20role\x20ID;\x20reload\x20before\x20writing.');return{..._0x38b355,'userList':[..._0x38b355['userList']??[]],'applyUserList':[..._0x38b355[_0x48354f(0x10a)]??[]]};}),_0x16ad5d=_0x574dba[_0x349394(0x118)](_0xaee714=>_0xaee714['id']===_0x52a4e4['id']);if(!_0x16ad5d)throw CliErrors[_0x349394(0x142)](_0x349394(0x135)+_0x52a4e4['id']+_0x349394(0x115),'Reload\x20the\x20role\x20list\x20and\x20retry\x20after\x20the\x20server\x20state\x20is\x20consistent.');const _0x1e9c5d=_0xed5c9a=>{const _0x48056e=_0x349394,_0x379479=normalizeRuntimeUserId(_0xed5c9a);if(_0x379479===undefined)throw CliErrors[_0x48056e(0x142)]('Runtime\x20role\x20member\x20has\x20an\x20invalid\x20userId.');return _0x379479;},_0x3fe000=_0x16ad5d[_0x349394(0x148)][_0x349394(0xfb)](_0x19d20e=>_0x1e9c5d(_0x19d20e[_0x349394(0x122)])),_0x3096d3=_0x594d39[_0x349394(0x143)](_0x349394(0x130));if(_0x3096d3!==undefined&&_0x3096d3!==null&&_0x3096d3!==''){const _0x3886cd=_0x594d39['num']('expect-user-count');if(!Number[_0x349394(0x123)](_0x3886cd)||_0x3886cd<0x0)throw CliErrors['validation'](_0x349394(0x10d));if(_0x3fe000[_0x349394(0x13a)]!==_0x3886cd)throw CliErrors[_0x349394(0x142)](_0x349394(0xfe)+_0x3886cd+',\x20found\x20'+_0x3fe000['length']+'.','Read\x20the\x20current\x20members\x20and\x20retry\x20with\x20the\x20new\x20expected\x20count.');}const _0x128fcd=_0x3fe000[_0x349394(0x108)](_0x96cd0f),_0x153dff=[];let _0x1de1c2=!![];if(_0x5de6da==='user-add'){const _0x1ba7cf=await listRuntimeAppUsers(_0x594d39[_0x349394(0x127)]),_0x78b415=_0x1ba7cf[_0x349394(0x13e)](_0x51a7d3=>normalizeRuntimeUserId(_0x51a7d3['code'])===_0x96cd0f);if(_0x78b415[_0x349394(0x13a)]!==0x1||!_0x78b415[0x0][_0x349394(0x11f)]?.[_0x349394(0x12e)]())throw CliErrors[_0x349394(0x142)](_0x349394(0x114)+_0x96cd0f+'\x20was\x20not\x20found\x20in\x20app\x20'+_0x594d39[_0x349394(0x127)]+'.',_0x349394(0x147));_0x128fcd?(_0x1de1c2=![],_0x153dff['push'](_0x349394(0x145)+_0x96cd0f+_0x349394(0x102)+_0x52a4e4['id']+'.')):_0x16ad5d[_0x349394(0x148)]['push']({'userId':_0x96cd0f,'username':_0x78b415[0x0][_0x349394(0x11f)]});}else!_0x128fcd?(_0x1de1c2=![],_0x153dff[_0x349394(0x100)]('User\x20'+_0x96cd0f+'\x20is\x20not\x20in\x20runtime\x20role\x20'+_0x52a4e4['id']+'.')):_0x16ad5d[_0x349394(0x148)]=_0x16ad5d[_0x349394(0x148)]['filter'](_0x59c21a=>_0x1e9c5d(_0x59c21a[_0x349394(0x122)])!==_0x96cd0f);return{'role':_0x52a4e4,'userId':_0x96cd0f,'roleList':_0x574dba,'before':{'userIds':_0x3fe000},'after':{'userIds':_0x16ad5d[_0x349394(0x148)][_0x349394(0xfb)](_0x1963da=>_0x1e9c5d(_0x1963da[_0x349394(0x122)]))},'shouldWrite':_0x1de1c2,'warnings':_0x153dff};}export function runtimeRoleWriteResult(_0x480c67,_0x149308,_0x30a1e4,_0x58f41a,_0x577f7d,_0x9616cf=[]){const _0x52a4f6=a59_0x2a4e98;return{'operation':_0x480c67,'scope':_0x52a4f6(0x133),'selector':_0x149308,'before':_0x30a1e4,'after':_0x58f41a,'dryRun':![],'backend':_0x577f7d,'warnings':_0x9616cf};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a60_0x8fb4(){const _0x22fb18=['New\x20non-empty\x20role\x20remark','Changes\x20the\x20custom\x20role\x20code,\x20name,\x20or\x20note\x20in\x20the\x20current\x20runtime\x20app.\x20The\x20role\x20updates\x20immediately.','48NUHFqs','string','Update\x20a\x20runtime\x20CUSTOM\x20role\x27s\x20code,\x20name,\x20or\x20remark','353005XppwUZ','8403060TgjDUU','14mUnAyY','num','2912994bukGxc','1047927Dyryne','Preview:\x20update\x20a\x20runtime\x20CUSTOM\x20role','flag','New\x20role\x20name','build','trim','POST','name','update','2352774oGCaQY','remark','Pass\x20--role-code,\x20--name,\x20or\x20--remark\x20to\x20update\x20the\x20runtime\x20role.','--name\x20must\x20not\x20be\x20blank.','str','280976QvJfys','description','17246070exVTaw','validation','--remark\x20must\x20not\x20be\x20blank.','body'];a60_0x8fb4=function(){return _0x22fb18;};return a60_0x8fb4();}const a60_0x5b541b=a60_0x341f;(function(_0x4d5e02,_0x8b883c){const _0x6b03f6=a60_0x341f,_0x4aa766=_0x4d5e02();while(!![]){try{const _0x3cb5d4=-parseInt(_0x6b03f6(0x1c4))/0x1+-parseInt(_0x6b03f6(0x1c3))/0x2+-parseInt(_0x6b03f6(0x1af))/0x3+parseInt(_0x6b03f6(0x1bc))/0x4*(parseInt(_0x6b03f6(0x1bf))/0x5)+parseInt(_0x6b03f6(0x1c0))/0x6+-parseInt(_0x6b03f6(0x1c1))/0x7*(parseInt(_0x6b03f6(0x1b4))/0x8)+parseInt(_0x6b03f6(0x1b6))/0x9;if(_0x3cb5d4===_0x8b883c)break;else _0x4aa766['push'](_0x4aa766['shift']());}catch(_0x8d0c79){_0x4aa766['push'](_0x4aa766['shift']());}}}(a60_0x8fb4,0xc48a2));import{updateRuntimeAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';function a60_0x341f(_0x287ef7,_0xbe7c1d){_0x287ef7=_0x287ef7-0x1ad;const _0x8fb414=a60_0x8fb4();let _0x341f79=_0x8fb414[_0x287ef7];return _0x341f79;}import{assertCustomRuntimeRole,getRuntimeRoleById,projectRuntimeRole,readOptionalRuntimeRoleCode,ROLE_CODE_FLAG,ROLE_ID_FLAG,runtimeRoleWriteResult}from'../../commands/role/shared.js';function updateFields(_0x3ed0f5){const _0x1da621=a60_0x341f,_0x36dc11=_0x3ed0f5['flag']('role-code')!==undefined,_0x14e280=_0x3ed0f5['flag']('name')!==undefined,_0x5bb47a=_0x3ed0f5[_0x1da621(0x1c6)](_0x1da621(0x1b0))!==undefined;if(!_0x36dc11&&!_0x14e280&&!_0x5bb47a)throw CliErrors[_0x1da621(0x1b7)](_0x1da621(0x1b1));const _0x1d945b=readOptionalRuntimeRoleCode(_0x3ed0f5),_0x48fb0b=_0x3ed0f5[_0x1da621(0x1b3)](_0x1da621(0x1ad))[_0x1da621(0x1c9)](),_0x46e782=_0x3ed0f5['str'](_0x1da621(0x1b0))[_0x1da621(0x1c9)]();if(_0x14e280&&!_0x48fb0b)throw CliErrors['validation'](_0x1da621(0x1b2));if(_0x5bb47a&&!_0x46e782)throw CliErrors[_0x1da621(0x1b7)](_0x1da621(0x1b8),'The\x20current\x20runtime\x20role\x20API\x20does\x20not\x20support\x20clearing\x20an\x20existing\x20remark.');return{..._0x1d945b?{'roleCode':_0x1d945b}:{},..._0x14e280?{'roleName':_0x48fb0b}:{},..._0x5bb47a?{'remark':_0x46e782}:{}};}async function prepare(_0x19bb91){const _0x802780=a60_0x341f,_0x42593e=await getRuntimeRoleById(_0x19bb91['appCode'],_0x19bb91[_0x802780(0x1c2)]('id'));return assertCustomRuntimeRole(_0x42593e,_0x802780(0x1ae)),{'role':_0x42593e,'body':{'id':_0x42593e['id'],'appCode':_0x19bb91['appCode'],...updateFields(_0x19bb91)}};}export const roleUpdate={'service':'role','command':a60_0x5b541b(0x1ae),'description':a60_0x5b541b(0x1be),'risk':'high-risk-write','confirmationDescription':a60_0x5b541b(0x1bb),'flags':[ROLE_ID_FLAG,ROLE_CODE_FLAG,{'name':'name','type':a60_0x5b541b(0x1bd),'description':a60_0x5b541b(0x1c7)},{'name':a60_0x5b541b(0x1b0),'type':a60_0x5b541b(0x1bd),'description':a60_0x5b541b(0x1ba)}],async 'validate'(_0x572681){updateFields(_0x572681);},async 'dryRun'(_0x4de75c){const _0x7a6a03=a60_0x5b541b,{body:_0x503891}=await prepare(_0x4de75c);return dryRun(_0x7a6a03(0x1ca),'/client/permit/role/update')[_0x7a6a03(0x1b9)](_0x503891)[_0x7a6a03(0x1b5)](_0x7a6a03(0x1c5))[_0x7a6a03(0x1c8)]();},async 'execute'(_0x210800){const _0x179bba=a60_0x5b541b,{role:_0x472848,body:_0x1d105a}=await prepare(_0x210800),_0x192c03=await updateRuntimeAppRole(_0x1d105a);return{'ok':!![],'data':runtimeRoleWriteResult(_0x179bba(0x1ae),{'roleId':_0x472848['id']},projectRuntimeRole(_0x472848),projectRuntimeRole(_0x192c03),{'method':_0x179bba(0x1ca),'path':'/client/permit/role/update'})};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a61_0xd7ffbc=a61_0x3840;(function(_0x2886d8,_0x3b75f1){const _0x2c4d63=a61_0x3840,_0x33d8b4=_0x2886d8();while(!![]){try{const _0x2b0c3a=parseInt(_0x2c4d63(0xb4))/0x1*(-parseInt(_0x2c4d63(0xc4))/0x2)+parseInt(_0x2c4d63(0xae))/0x3*(parseInt(_0x2c4d63(0xaf))/0x4)+-parseInt(_0x2c4d63(0xad))/0x5*(parseInt(_0x2c4d63(0xbe))/0x6)+-parseInt(_0x2c4d63(0xa9))/0x7*(-parseInt(_0x2c4d63(0xb2))/0x8)+-parseInt(_0x2c4d63(0xb7))/0x9*(parseInt(_0x2c4d63(0xb5))/0xa)+parseInt(_0x2c4d63(0xc0))/0xb+-parseInt(_0x2c4d63(0xb9))/0xc*(-parseInt(_0x2c4d63(0xb1))/0xd);if(_0x2b0c3a===_0x3b75f1)break;else _0x33d8b4['push'](_0x33d8b4['shift']());}catch(_0x3ed9b6){_0x33d8b4['push'](_0x33d8b4['shift']());}}}(a61_0x3f40,0xb3834));function a61_0x3f40(){const _0xcba509=['14YzbNew','description','7LPvJGP','after','userId','role','5YTwNFx','2319gQtMzP','644sCkaKf','warnings','6266aTfkZy','5023304oczsZB','roleList','69196tijwDJ','10770cMKQjF','user-add','8946xFhivn','Add\x20a\x20userId\x20to\x20one\x20runtime\x20role','42348BMOBNM','build','before','Adds\x20the\x20given\x20runtime\x20user\x20to\x20the\x20target\x20role.\x20The\x20user\x20receives\x20the\x20permissions\x20of\x20that\x20role.','/client/permit/user-role/update-user-list','5402556IPJxVf','Preview:\x20add\x20runtime\x20role\x20member','8110036rWjzUK','shouldWrite','appCode','POST'];a61_0x3f40=function(){return _0xcba509;};return a61_0x3f40();}import{updateRuntimeRoleUsers}from'../../core/api-client.js';function a61_0x3840(_0x51b3e7,_0x15b6ef){_0x51b3e7=_0x51b3e7-0xa9;const _0x3f40b7=a61_0x3f40();let _0x3840f0=_0x3f40b7[_0x51b3e7];return _0x3840f0;}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':a61_0xd7ffbc(0xac),'command':a61_0xd7ffbc(0xb6),'description':a61_0xd7ffbc(0xb8),'risk':'high-risk-write','confirmationDescription':a61_0xd7ffbc(0xbc),'flags':[ROLE_REF_FLAG,USER_ID_FLAG,EXPECT_USER_COUNT_FLAG],async 'dryRun'(_0x56f922){const _0x3fc40d=a61_0xd7ffbc,_0x24f157=await prepareRuntimeMemberMutation(_0x56f922,_0x3fc40d(0xb6));return dryRun(_0x3fc40d(0xc3),_0x3fc40d(0xbd))['body']({'appCode':_0x56f922[_0x3fc40d(0xc2)],'roleList':_0x24f157[_0x3fc40d(0xb3)]})[_0x3fc40d(0xc5)](_0x24f157[_0x3fc40d(0xc1)]?_0x3fc40d(0xbf):_0x24f157[_0x3fc40d(0xb0)][0x0])[_0x3fc40d(0xba)]();},async 'execute'(_0x320697){const _0xf38c84=a61_0xd7ffbc,_0x1e6e8b=await prepareRuntimeMemberMutation(_0x320697,_0xf38c84(0xb6));return _0x1e6e8b[_0xf38c84(0xc1)]&&await updateRuntimeRoleUsers(_0x320697[_0xf38c84(0xc2)],_0x1e6e8b[_0xf38c84(0xb3)]),{'ok':!![],'data':runtimeRoleWriteResult(_0xf38c84(0xb6),{'roleId':_0x1e6e8b['role']['id'],'userId':_0x1e6e8b[_0xf38c84(0xab)]},_0x1e6e8b[_0xf38c84(0xbb)],_0x1e6e8b[_0xf38c84(0xaa)],{'method':_0xf38c84(0xc3),'path':_0xf38c84(0xbd)},_0x1e6e8b[_0xf38c84(0xb0)])};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a62_0x273974=a62_0x3a1c;(function(_0x5dec2c,_0x4c495d){const _0x341ce6=a62_0x3a1c,_0xc5a1ff=_0x5dec2c();while(!![]){try{const _0x4a4588=parseInt(_0x341ce6(0x18f))/0x1+-parseInt(_0x341ce6(0x183))/0x2+parseInt(_0x341ce6(0x190))/0x3*(-parseInt(_0x341ce6(0x186))/0x4)+-parseInt(_0x341ce6(0x185))/0x5+parseInt(_0x341ce6(0x196))/0x6+parseInt(_0x341ce6(0x180))/0x7*(-parseInt(_0x341ce6(0x191))/0x8)+parseInt(_0x341ce6(0x182))/0x9*(parseInt(_0x341ce6(0x18d))/0xa);if(_0x4a4588===_0x4c495d)break;else _0xc5a1ff['push'](_0xc5a1ff['shift']());}catch(_0x4c39ae){_0xc5a1ff['push'](_0xc5a1ff['shift']());}}}(a62_0x40d4,0x6eb12));import{updateRuntimeRoleUsers}from'../../core/api-client.js';function a62_0x3a1c(_0x2d1f5f,_0x195911){_0x2d1f5f=_0x2d1f5f-0x180;const _0x40d410=a62_0x40d4();let _0x3a1c31=_0x40d410[_0x2d1f5f];return _0x3a1c31;}import{dryRun}from'../../framework/dryrun.js';import{EXPECT_USER_COUNT_FLAG,prepareRuntimeMemberMutation,ROLE_REF_FLAG,runtimeRoleWriteResult,USER_ID_FLAG}from'../../commands/role/shared.js';export const roleUserRemove={'service':a62_0x273974(0x188),'command':a62_0x273974(0x18a),'description':a62_0x273974(0x192),'risk':'high-risk-write','confirmationDescription':a62_0x273974(0x18b),'flags':[ROLE_REF_FLAG,USER_ID_FLAG,EXPECT_USER_COUNT_FLAG],async 'dryRun'(_0x19e849){const _0x2e8859=a62_0x273974,_0x48cce5=await prepareRuntimeMemberMutation(_0x19e849,_0x2e8859(0x18a));return dryRun('POST','/client/permit/user-role/update-user-list')[_0x2e8859(0x187)]({'appCode':_0x19e849[_0x2e8859(0x189)],'roleList':_0x48cce5[_0x2e8859(0x193)]})[_0x2e8859(0x18e)](_0x48cce5['shouldWrite']?'Preview:\x20remove\x20runtime\x20role\x20member':_0x48cce5['warnings'][0x0])[_0x2e8859(0x194)]();},async 'execute'(_0x10855d){const _0x66bc1a=a62_0x273974,_0x4f29ff=await prepareRuntimeMemberMutation(_0x10855d,'user-remove');return _0x4f29ff[_0x66bc1a(0x18c)]&&await updateRuntimeRoleUsers(_0x10855d[_0x66bc1a(0x189)],_0x4f29ff[_0x66bc1a(0x193)]),{'ok':!![],'data':runtimeRoleWriteResult('user-remove',{'roleId':_0x4f29ff[_0x66bc1a(0x188)]['id'],'userId':_0x4f29ff[_0x66bc1a(0x181)]},_0x4f29ff[_0x66bc1a(0x184)],_0x4f29ff['after'],{'method':_0x66bc1a(0x195),'path':'/client/permit/user-role/update-user-list'},_0x4f29ff['warnings'])};}};function a62_0x40d4(){const _0x322ace=['9BNgmnr','1019192UMSrsl','before','1911780SZbRNd','4xQjPkO','body','role','appCode','user-remove','Removes\x20the\x20given\x20runtime\x20user\x20from\x20the\x20target\x20role.\x20The\x20user\x20loses\x20permissions\x20granted\x20only\x20by\x20that\x20role.','shouldWrite','13069300HuHtdB','description','46307BNaieJ','1041231WvkCWO','12504hERFTU','Remove\x20a\x20userId\x20from\x20one\x20runtime\x20role','roleList','build','POST','4182678vDWGiA','1603srKPxE','userId'];a62_0x40d4=function(){return _0x322ace;};return a62_0x40d4();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a63_0x1d14(_0x1325f8,_0xb93a55){_0x1325f8=_0x1325f8-0x77;const _0x43f29c=a63_0x43f2();let _0x1d141a=_0x43f29c[_0x1325f8];return _0x1d141a;}const a63_0x3e6040=a63_0x1d14;(function(_0x5212ea,_0x783da4){const _0x42e452=a63_0x1d14,_0x359ac6=_0x5212ea();while(!![]){try{const _0x3b5643=-parseInt(_0x42e452(0xb2))/0x1+parseInt(_0x42e452(0xb6))/0x2*(parseInt(_0x42e452(0xb3))/0x3)+parseInt(_0x42e452(0x7d))/0x4+parseInt(_0x42e452(0xa5))/0x5*(parseInt(_0x42e452(0x8e))/0x6)+parseInt(_0x42e452(0x97))/0x7+parseInt(_0x42e452(0x95))/0x8*(-parseInt(_0x42e452(0xa7))/0x9)+-parseInt(_0x42e452(0x9a))/0xa*(parseInt(_0x42e452(0xb5))/0xb);if(_0x3b5643===_0x783da4)break;else _0x359ac6['push'](_0x359ac6['shift']());}catch(_0xd12c4c){_0x359ac6['push'](_0x359ac6['shift']());}}}(a63_0x43f2,0xd57d1));import{createRuntimeSchedule,deleteRuntimeSchedule,getRuntimeSchedule,listRuntimeSchedules,runRuntimeSchedule,validateRuntimeSchedule}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const SCHEDULE_ID_PATTERN=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,KIND_FLAG={'name':a63_0x3e6040(0x79),'type':a63_0x3e6040(0xab),'required':!![],'enum':[a63_0x3e6040(0x82),a63_0x3e6040(0x81)],'description':a63_0x3e6040(0xa2)},CRON_FLAG={'name':'cron','type':a63_0x3e6040(0xab),'description':'Five-field\x20UTC\x20cron\x20expression\x20for\x20CRON\x20schedules'},SCHEDULED_AT_FLAG={'name':a63_0x3e6040(0x87),'type':a63_0x3e6040(0xab),'description':'Canonical\x20UTC\x20ISO\x20datetime\x20for\x20ONCE\x20schedules'},TITLE_FLAG={'name':a63_0x3e6040(0x9d),'type':a63_0x3e6040(0xab),'required':!![],'description':'Schedule\x20title'},PROMPT_FLAG={'name':a63_0x3e6040(0x80),'type':a63_0x3e6040(0xab),'required':!![],'description':'Prompt\x20sent\x20to\x20the\x20Agent\x20when\x20the\x20schedule\x20runs'},MODEL_FLAG={'name':a63_0x3e6040(0xbf),'type':a63_0x3e6040(0xab),'enum':[a63_0x3e6040(0xbc),a63_0x3e6040(0x88),a63_0x3e6040(0x9e)],'default':a63_0x3e6040(0x88),'description':a63_0x3e6040(0xa1)},SCHEDULE_ID_FLAG={'name':'schedule-id','type':'string','required':!![],'description':'Schedule\x20UUID','pattern':{'regex':SCHEDULE_ID_PATTERN,'description':'a\x20UUID\x20returned\x20by\x20schedule\x20create/list'}},LIMIT_FLAG={'name':a63_0x3e6040(0xb9),'type':a63_0x3e6040(0x92),'default':0x14,'description':a63_0x3e6040(0x86)},CURSOR_FLAG={'name':a63_0x3e6040(0x9b),'type':a63_0x3e6040(0xab),'description':'Opaque\x20nextCursor\x20returned\x20by\x20the\x20previous\x20list\x20call'},INPUT_FLAGS=[KIND_FLAG,CRON_FLAG,SCHEDULED_AT_FLAG,TITLE_FLAG,PROMPT_FLAG,MODEL_FLAG];function a63_0x43f2(){const _0xe009c=['5cfpEvH','length','9jockOd','/api/harness/apps/','\x20immediately','taskId','string','schedule','run','create','Permanently\x20deletes\x20the\x20schedule\x20and\x20stops\x20future\x20auto-triggers.\x20Historical\x20Tasks\x20already\x20created\x20are\x20not\x20affected.','validate','body','1344945QmktcZ','213vXLLuU','detail','759wkGwtn','34064muGqDl','read','Ignores\x20the\x20original\x20trigger\x20time,\x20runs\x20the\x20schedule\x20once\x20now,\x20and\x20creates\x20a\x20new\x20Agent\x20Task.','limit','--kind\x20must\x20be\x20CRON\x20or\x20ONCE.','Created\x20','kimi/k3','List\x20current\x20user\x27s\x20schedules\x20for\x20the\x20current\x20app','POST','model','Validate\x20a\x20UTC\x20schedule\x20without\x20creating\x20it','cron','--cursor\x20must\x20be\x20the\x20unchanged\x20nextCursor\x20from\x20schedule\x20list.','kind','Create\x20a\x20recurring\x20or\x20one-shot\x20Agent\x20schedule','Creates\x20a\x20schedule\x20in\x20the\x20current\x20app\x20that\x20can\x20auto-trigger\x20an\x20Agent.\x20At\x20the\x20scheduled\x20time\x20a\x20Task\x20is\x20created\x20and\x20run.','delete','3901824RgaVZG','num','appCode','prompt','ONCE','CRON','Show\x20one\x20schedule\x20by\x20schedule\x20ID','Run\x20the\x20schedule\x20once\x20immediately\x20and\x20create\x20a\x20Task','validation','Page\x20size\x20from\x201\x20to\x20100','scheduled-at','deepseek-v4-flash-0731','isSafeInteger','description','UTC','\x20schedule\x20','scheduleId','5146104MbAxIO','Deleted\x20schedule\x20','build','list','number','ONCE\x20schedules\x20require\x20--scheduled-at\x20and\x20do\x20not\x20accept\x20--cron.','DELETE','3654680Mowesk','trim','3816183fEfDyR','high-risk-write','Preview:\x20delete\x20schedule\x20','132080FwchZz','cursor','str','title','deepseek-v4-pro-0813','Schedule\x20input\x20is\x20valid','schedule-id','Task\x20model\x20used\x20when\x20the\x20schedule\x20runs','Schedule\x20kind:\x20CRON\x20or\x20ONCE','CRON\x20schedules\x20require\x20--cron\x20and\x20do\x20not\x20accept\x20--scheduled-at.','/run'];a63_0x43f2=function(){return _0xe009c;};return a63_0x43f2();}function readScheduleInput(_0x3c5da9){const _0x319900=a63_0x3e6040,_0x81934a=_0x3c5da9[_0x319900(0x9c)]('kind'),_0x2da082=_0x3c5da9[_0x319900(0x9c)](_0x319900(0x9d))[_0x319900(0x96)](),_0x4857ee=_0x3c5da9[_0x319900(0x9c)](_0x319900(0x80))[_0x319900(0x96)](),_0x31a5ac=_0x3c5da9[_0x319900(0x9c)](_0x319900(0xbf)),_0x5279e9=_0x3c5da9[_0x319900(0x9c)](_0x319900(0x77)),_0x1ac520=_0x3c5da9[_0x319900(0x9c)](_0x319900(0x87));if(!_0x2da082)throw CliErrors[_0x319900(0x85)]('--title\x20must\x20not\x20be\x20blank.');if(!_0x4857ee)throw CliErrors['validation']('--prompt\x20must\x20not\x20be\x20blank.');if(_0x81934a==='CRON'){if(!_0x5279e9||_0x1ac520)throw CliErrors['validation'](_0x319900(0xa3));return{'kind':_0x81934a,'timezone':_0x319900(0x8b),'cron':_0x5279e9,'title':_0x2da082,'prompt':_0x4857ee,'model':_0x31a5ac};}if(_0x81934a==='ONCE'){if(!_0x1ac520||_0x5279e9)throw CliErrors[_0x319900(0x85)](_0x319900(0x93));return{'kind':_0x81934a,'timezone':_0x319900(0x8b),'scheduledAt':_0x1ac520,'title':_0x2da082,'prompt':_0x4857ee,'model':_0x31a5ac};}throw CliErrors[_0x319900(0x85)](_0x319900(0xba));}function scheduleCollectionPath(_0x33c871){const _0x1fcb72=a63_0x3e6040;return _0x1fcb72(0xa8)+encodeURIComponent(_0x33c871)+'/schedules';}function scheduleItemPath(_0x4b1f29,_0x8e6cfc){return scheduleCollectionPath(_0x4b1f29)+'/'+encodeURIComponent(_0x8e6cfc);}const scheduleValidate={'service':a63_0x3e6040(0xac),'command':a63_0x3e6040(0xb0),'description':a63_0x3e6040(0xc0),'risk':a63_0x3e6040(0xb7),'flags':INPUT_FLAGS,async 'validate'(_0x47289e){readScheduleInput(_0x47289e);},async 'execute'(_0x51e64b){const _0x12fc6f=a63_0x3e6040,_0x4f30b0=readScheduleInput(_0x51e64b),_0xae69dd=await validateRuntimeSchedule(_0x51e64b[_0x12fc6f(0x7f)],_0x4f30b0);return{'ok':!![],'data':_0xae69dd,'message':_0x12fc6f(0x9f)};}},scheduleCreate={'service':'schedule','command':a63_0x3e6040(0xae),'description':a63_0x3e6040(0x7a),'risk':a63_0x3e6040(0x98),'confirmationDescription':a63_0x3e6040(0x7b),'flags':INPUT_FLAGS,async 'validate'(_0x4151d3){readScheduleInput(_0x4151d3);},async 'execute'(_0x1e88ce){const _0x46149b=a63_0x3e6040,_0x4f4077=readScheduleInput(_0x1e88ce),_0x3b90c9=await validateRuntimeSchedule(_0x1e88ce[_0x46149b(0x7f)],_0x4f4077),_0x57f67d=await createRuntimeSchedule(_0x1e88ce[_0x46149b(0x7f)],_0x3b90c9);return{'ok':!![],'data':_0x57f67d,'message':_0x46149b(0xbb)+_0x57f67d[_0x46149b(0x79)]+_0x46149b(0x8c)+_0x57f67d[_0x46149b(0x8d)]};},async 'dryRun'(_0x3ae4b6){const _0x459c67=a63_0x3e6040,_0x2984fd=readScheduleInput(_0x3ae4b6);return dryRun('POST',scheduleCollectionPath(_0x3ae4b6[_0x459c67(0x7f)]))[_0x459c67(0xb1)](_0x2984fd)[_0x459c67(0x8a)]('Preview:\x20create\x20an\x20Agent\x20schedule')['build']();}},scheduleList={'service':a63_0x3e6040(0xac),'command':a63_0x3e6040(0x91),'description':a63_0x3e6040(0xbd),'risk':'read','flags':[KIND_FLAG,LIMIT_FLAG,CURSOR_FLAG],async 'validate'(_0x52d789){const _0x5cec93=a63_0x3e6040,_0x4d5912=_0x52d789[_0x5cec93(0x7e)](_0x5cec93(0xb9));if(!Number[_0x5cec93(0x89)](_0x4d5912)||_0x4d5912<0x1||_0x4d5912>0x64)throw CliErrors[_0x5cec93(0x85)]('--limit\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.');const _0x4a44ff=_0x52d789[_0x5cec93(0x9c)](_0x5cec93(0x9b));if(_0x4a44ff&&(_0x4a44ff[_0x5cec93(0xa6)]>0x400||_0x4a44ff[_0x5cec93(0x96)]()!==_0x4a44ff))throw CliErrors[_0x5cec93(0x85)](_0x5cec93(0x78));},async 'execute'(_0x25c7d5){const _0x34b04a=a63_0x3e6040,_0x54e939=_0x25c7d5['str'](_0x34b04a(0x9b)),_0x2c1466=await listRuntimeSchedules(_0x25c7d5[_0x34b04a(0x7f)],{'kind':_0x25c7d5[_0x34b04a(0x9c)](_0x34b04a(0x79)),'limit':_0x25c7d5['num'](_0x34b04a(0xb9)),..._0x54e939?{'cursor':_0x54e939}:{}});return{'ok':!![],'data':_0x2c1466};}},scheduleDetail={'service':a63_0x3e6040(0xac),'command':a63_0x3e6040(0xb4),'description':a63_0x3e6040(0x83),'risk':a63_0x3e6040(0xb7),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0xc33edb){const _0x12754e=a63_0x3e6040,_0x208bf3=await getRuntimeSchedule(_0xc33edb[_0x12754e(0x7f)],_0xc33edb['str']('schedule-id'));return{'ok':!![],'data':_0x208bf3};}},scheduleRun={'service':a63_0x3e6040(0xac),'command':a63_0x3e6040(0xad),'description':a63_0x3e6040(0x84),'risk':a63_0x3e6040(0x98),'confirmationDescription':a63_0x3e6040(0xb8),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x25068c){const _0x4e4314=a63_0x3e6040,_0x88c22f=_0x25068c[_0x4e4314(0x9c)]('schedule-id'),_0x4c8b0e=await runRuntimeSchedule(_0x25068c['appCode'],_0x88c22f);return{'ok':!![],'data':_0x4c8b0e,'message':'Queued\x20Task\x20'+_0x4c8b0e[_0x4e4314(0xaa)]+'\x20from\x20schedule\x20'+_0x88c22f};},async 'dryRun'(_0x72b1c4){const _0x2140b5=a63_0x3e6040,_0x43a384=_0x72b1c4[_0x2140b5(0x9c)](_0x2140b5(0xa0));return dryRun(_0x2140b5(0xbe),scheduleItemPath(_0x72b1c4[_0x2140b5(0x7f)],_0x43a384)+_0x2140b5(0xa4))[_0x2140b5(0x8a)]('Preview:\x20run\x20schedule\x20'+_0x43a384+_0x2140b5(0xa9))[_0x2140b5(0x90)]();}},scheduleDelete={'service':a63_0x3e6040(0xac),'command':a63_0x3e6040(0x7c),'description':'Delete\x20the\x20schedule\x20and\x20stop\x20future\x20triggers','risk':'high-risk-write','confirmationDescription':a63_0x3e6040(0xaf),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x345bb1){const _0x183c68=a63_0x3e6040,_0x4edd2e=_0x345bb1[_0x183c68(0x9c)]('schedule-id'),_0x3de79d=await deleteRuntimeSchedule(_0x345bb1['appCode'],_0x4edd2e);return{'ok':!![],'data':_0x3de79d,'message':_0x183c68(0x8f)+_0x4edd2e};},async 'dryRun'(_0x15a6a6){const _0x45e351=a63_0x3e6040,_0x30914a=_0x15a6a6[_0x45e351(0x9c)](_0x45e351(0xa0));return dryRun(_0x45e351(0x94),scheduleItemPath(_0x15a6a6[_0x45e351(0x7f)],_0x30914a))[_0x45e351(0x8a)](_0x45e351(0x99)+_0x30914a)[_0x45e351(0x90)]();}};export const scheduleDefinitions=[scheduleValidate,scheduleCreate,scheduleList,scheduleDetail,scheduleRun,scheduleDelete];
|
|
1
|
+
const a63_0x58cd8e=a63_0x4f3b;(function(_0x5b837e,_0xeb0b6c){const _0x57e441=a63_0x4f3b,_0xe59639=_0x5b837e();while(!![]){try{const _0x5bb7d3=parseInt(_0x57e441(0xed))/0x1+parseInt(_0x57e441(0xcf))/0x2+-parseInt(_0x57e441(0xda))/0x3*(parseInt(_0x57e441(0xc3))/0x4)+parseInt(_0x57e441(0xe9))/0x5+-parseInt(_0x57e441(0xe4))/0x6*(-parseInt(_0x57e441(0xe0))/0x7)+parseInt(_0x57e441(0xf9))/0x8+-parseInt(_0x57e441(0xe2))/0x9;if(_0x5bb7d3===_0xeb0b6c)break;else _0xe59639['push'](_0xe59639['shift']());}catch(_0x4185e7){_0xe59639['push'](_0xe59639['shift']());}}}(a63_0x4f28,0x3f672));function a63_0x4f28(){const _0x56e21c=['Permanently\x20deletes\x20the\x20schedule\x20and\x20stops\x20future\x20auto-triggers.\x20Historical\x20Tasks\x20already\x20created\x20are\x20not\x20affected.','Five-field\x20UTC\x20cron\x20expression\x20for\x20CRON\x20schedules','body','132lVQnYB','schedule','trim','/api/harness/apps/','a\x20UUID\x20returned\x20by\x20schedule\x20create/list','Ignores\x20the\x20original\x20trigger\x20time,\x20runs\x20the\x20schedule\x20once\x20now,\x20and\x20creates\x20a\x20new\x20Agent\x20Task.','--limit\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.','delete','limit','CRON','--cursor\x20must\x20be\x20the\x20unchanged\x20nextCursor\x20from\x20schedule\x20list.','str','31184nUDYAx','cursor','/schedules','string','isSafeInteger','deepseek-v4-flash-0731','schedule-id','validation','ONCE\x20schedules\x20require\x20--scheduled-at\x20and\x20do\x20not\x20accept\x20--cron.','ONCE','run','5298lwYERL','Preview:\x20create\x20an\x20Agent\x20schedule','title','description','Page\x20size\x20from\x201\x20to\x20100','scheduled-at','573293GajzFN','high-risk-write','7830720jfRUhT','Schedule\x20input\x20is\x20valid','6RliOlE','--prompt\x20must\x20not\x20be\x20blank.','--title\x20must\x20not\x20be\x20blank.','POST','kind','995720XUfevH','prompt','List\x20current\x20user\x27s\x20schedules\x20for\x20the\x20current\x20app','CRON\x20schedules\x20require\x20--cron\x20and\x20do\x20not\x20accept\x20--scheduled-at.','415210IhlSjk','Show\x20one\x20schedule\x20by\x20schedule\x20ID','Deleted\x20schedule\x20','read','Task\x20model\x20used\x20when\x20the\x20schedule\x20runs','Created\x20','list','Canonical\x20UTC\x20ISO\x20datetime\x20for\x20ONCE\x20schedules','appCode','num','model','build','3809688yhPgQE','\x20immediately','\x20schedule\x20','length','number','Opaque\x20nextCursor\x20returned\x20by\x20the\x20previous\x20list\x20call','/run','cron','kimi/k3','Delete\x20the\x20schedule\x20and\x20stop\x20future\x20triggers'];a63_0x4f28=function(){return _0x56e21c;};return a63_0x4f28();}import{createRuntimeSchedule,deleteRuntimeSchedule,getRuntimeSchedule,listRuntimeSchedules,runRuntimeSchedule,validateRuntimeSchedule}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const SCHEDULE_ID_PATTERN=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,KIND_FLAG={'name':a63_0x58cd8e(0xe8),'type':a63_0x58cd8e(0xd2),'required':!![],'enum':[a63_0x58cd8e(0xcc),a63_0x58cd8e(0xd8)],'description':'Schedule\x20kind:\x20CRON\x20or\x20ONCE'},CRON_FLAG={'name':a63_0x58cd8e(0xbd),'type':a63_0x58cd8e(0xd2),'description':a63_0x58cd8e(0xc1)},SCHEDULED_AT_FLAG={'name':a63_0x58cd8e(0xdf),'type':a63_0x58cd8e(0xd2),'description':a63_0x58cd8e(0xf4)},TITLE_FLAG={'name':a63_0x58cd8e(0xdc),'type':a63_0x58cd8e(0xd2),'required':!![],'description':'Schedule\x20title'},PROMPT_FLAG={'name':a63_0x58cd8e(0xea),'type':'string','required':!![],'description':'Prompt\x20sent\x20to\x20the\x20Agent\x20when\x20the\x20schedule\x20runs'},MODEL_FLAG={'name':a63_0x58cd8e(0xf7),'type':'string','enum':[a63_0x58cd8e(0xbe),a63_0x58cd8e(0xd4),'deepseek-v4-pro-0813'],'default':a63_0x58cd8e(0xd4),'description':a63_0x58cd8e(0xf1)},SCHEDULE_ID_FLAG={'name':a63_0x58cd8e(0xd5),'type':a63_0x58cd8e(0xd2),'required':!![],'description':'Schedule\x20UUID','pattern':{'regex':SCHEDULE_ID_PATTERN,'description':a63_0x58cd8e(0xc7)}},LIMIT_FLAG={'name':'limit','type':a63_0x58cd8e(0xfd),'default':0x14,'description':a63_0x58cd8e(0xde)},CURSOR_FLAG={'name':a63_0x58cd8e(0xd0),'type':'string','description':a63_0x58cd8e(0xfe)},INPUT_FLAGS=[KIND_FLAG,CRON_FLAG,SCHEDULED_AT_FLAG,TITLE_FLAG,PROMPT_FLAG,MODEL_FLAG];function a63_0x4f3b(_0x5d4d5a,_0x273a99){_0x5d4d5a=_0x5d4d5a-0xbd;const _0x4f2813=a63_0x4f28();let _0x4f3b7a=_0x4f2813[_0x5d4d5a];return _0x4f3b7a;}function readScheduleInput(_0x56387e){const _0x4cfb3d=a63_0x58cd8e,_0x584519=_0x56387e[_0x4cfb3d(0xce)](_0x4cfb3d(0xe8)),_0x5036fa=_0x56387e[_0x4cfb3d(0xce)](_0x4cfb3d(0xdc))['trim'](),_0x81e33a=_0x56387e['str'](_0x4cfb3d(0xea))['trim'](),_0x38e347=_0x56387e['str'](_0x4cfb3d(0xf7)),_0x16457c=_0x56387e[_0x4cfb3d(0xce)](_0x4cfb3d(0xbd)),_0x28168b=_0x56387e['str'](_0x4cfb3d(0xdf));if(!_0x5036fa)throw CliErrors[_0x4cfb3d(0xd6)](_0x4cfb3d(0xe6));if(!_0x81e33a)throw CliErrors[_0x4cfb3d(0xd6)](_0x4cfb3d(0xe5));if(_0x584519==='CRON'){if(!_0x16457c||_0x28168b)throw CliErrors[_0x4cfb3d(0xd6)](_0x4cfb3d(0xec));return{'kind':_0x584519,'timezone':'UTC','cron':_0x16457c,'title':_0x5036fa,'prompt':_0x81e33a,'model':_0x38e347};}if(_0x584519===_0x4cfb3d(0xd8)){if(!_0x28168b||_0x16457c)throw CliErrors[_0x4cfb3d(0xd6)](_0x4cfb3d(0xd7));return{'kind':_0x584519,'timezone':'UTC','scheduledAt':_0x28168b,'title':_0x5036fa,'prompt':_0x81e33a,'model':_0x38e347};}throw CliErrors[_0x4cfb3d(0xd6)]('--kind\x20must\x20be\x20CRON\x20or\x20ONCE.');}function scheduleCollectionPath(_0x56e109){const _0x226c82=a63_0x58cd8e;return _0x226c82(0xc6)+encodeURIComponent(_0x56e109)+_0x226c82(0xd1);}function scheduleItemPath(_0x203673,_0x2f6625){return scheduleCollectionPath(_0x203673)+'/'+encodeURIComponent(_0x2f6625);}const scheduleValidate={'service':a63_0x58cd8e(0xc4),'command':'validate','description':'Validate\x20a\x20UTC\x20schedule\x20without\x20creating\x20it','risk':a63_0x58cd8e(0xf0),'flags':INPUT_FLAGS,async 'validate'(_0x3b80af){readScheduleInput(_0x3b80af);},async 'execute'(_0x4a41e0){const _0x3ef01e=a63_0x58cd8e,_0x50770a=readScheduleInput(_0x4a41e0),_0x1e8d15=await validateRuntimeSchedule(_0x4a41e0[_0x3ef01e(0xf5)],_0x50770a);return{'ok':!![],'data':_0x1e8d15,'message':_0x3ef01e(0xe3)};}},scheduleCreate={'service':a63_0x58cd8e(0xc4),'command':'create','description':'Create\x20a\x20recurring\x20or\x20one-shot\x20Agent\x20schedule','risk':'high-risk-write','confirmationDescription':'Creates\x20a\x20schedule\x20in\x20the\x20current\x20app\x20that\x20can\x20auto-trigger\x20an\x20Agent.\x20At\x20the\x20scheduled\x20time\x20a\x20Task\x20is\x20created\x20and\x20run.','flags':INPUT_FLAGS,async 'validate'(_0x223c62){readScheduleInput(_0x223c62);},async 'execute'(_0x415e05){const _0xe2f60f=a63_0x58cd8e,_0x51f515=readScheduleInput(_0x415e05),_0x572853=await validateRuntimeSchedule(_0x415e05['appCode'],_0x51f515),_0x21cea3=await createRuntimeSchedule(_0x415e05[_0xe2f60f(0xf5)],_0x572853);return{'ok':!![],'data':_0x21cea3,'message':_0xe2f60f(0xf2)+_0x21cea3['kind']+_0xe2f60f(0xfb)+_0x21cea3['scheduleId']};},async 'dryRun'(_0x163894){const _0x52eb9e=a63_0x58cd8e,_0xb8770=readScheduleInput(_0x163894);return dryRun(_0x52eb9e(0xe7),scheduleCollectionPath(_0x163894[_0x52eb9e(0xf5)]))[_0x52eb9e(0xc2)](_0xb8770)[_0x52eb9e(0xdd)](_0x52eb9e(0xdb))[_0x52eb9e(0xf8)]();}},scheduleList={'service':a63_0x58cd8e(0xc4),'command':a63_0x58cd8e(0xf3),'description':a63_0x58cd8e(0xeb),'risk':a63_0x58cd8e(0xf0),'flags':[KIND_FLAG,LIMIT_FLAG,CURSOR_FLAG],async 'validate'(_0x17bf83){const _0x1eaaf=a63_0x58cd8e,_0xae539=_0x17bf83[_0x1eaaf(0xf6)](_0x1eaaf(0xcb));if(!Number[_0x1eaaf(0xd3)](_0xae539)||_0xae539<0x1||_0xae539>0x64)throw CliErrors[_0x1eaaf(0xd6)](_0x1eaaf(0xc9));const _0xee21a5=_0x17bf83[_0x1eaaf(0xce)](_0x1eaaf(0xd0));if(_0xee21a5&&(_0xee21a5[_0x1eaaf(0xfc)]>0x400||_0xee21a5[_0x1eaaf(0xc5)]()!==_0xee21a5))throw CliErrors[_0x1eaaf(0xd6)](_0x1eaaf(0xcd));},async 'execute'(_0x164f9d){const _0x329594=a63_0x58cd8e,_0x4d2d6a=_0x164f9d[_0x329594(0xce)](_0x329594(0xd0)),_0x363838=await listRuntimeSchedules(_0x164f9d[_0x329594(0xf5)],{'kind':_0x164f9d['str'](_0x329594(0xe8)),'limit':_0x164f9d[_0x329594(0xf6)](_0x329594(0xcb)),..._0x4d2d6a?{'cursor':_0x4d2d6a}:{}});return{'ok':!![],'data':_0x363838};}},scheduleDetail={'service':a63_0x58cd8e(0xc4),'command':'detail','description':a63_0x58cd8e(0xee),'risk':a63_0x58cd8e(0xf0),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x58ac35){const _0x121e81=a63_0x58cd8e,_0x20cdb1=await getRuntimeSchedule(_0x58ac35[_0x121e81(0xf5)],_0x58ac35[_0x121e81(0xce)]('schedule-id'));return{'ok':!![],'data':_0x20cdb1};}},scheduleRun={'service':a63_0x58cd8e(0xc4),'command':a63_0x58cd8e(0xd9),'description':'Run\x20the\x20schedule\x20once\x20immediately\x20and\x20create\x20a\x20Task','risk':a63_0x58cd8e(0xe1),'confirmationDescription':a63_0x58cd8e(0xc8),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x2e62e7){const _0x3f5977=a63_0x58cd8e,_0x3b0b35=_0x2e62e7['str'](_0x3f5977(0xd5)),_0x5b3355=await runRuntimeSchedule(_0x2e62e7[_0x3f5977(0xf5)],_0x3b0b35);return{'ok':!![],'data':_0x5b3355,'message':'Queued\x20Task\x20'+_0x5b3355['taskId']+'\x20from\x20schedule\x20'+_0x3b0b35};},async 'dryRun'(_0x4af3c8){const _0x38246c=a63_0x58cd8e,_0x4ba887=_0x4af3c8['str'](_0x38246c(0xd5));return dryRun('POST',scheduleItemPath(_0x4af3c8[_0x38246c(0xf5)],_0x4ba887)+_0x38246c(0xff))[_0x38246c(0xdd)]('Preview:\x20run\x20schedule\x20'+_0x4ba887+_0x38246c(0xfa))[_0x38246c(0xf8)]();}},scheduleDelete={'service':a63_0x58cd8e(0xc4),'command':a63_0x58cd8e(0xca),'description':a63_0x58cd8e(0xbf),'risk':a63_0x58cd8e(0xe1),'confirmationDescription':a63_0x58cd8e(0xc0),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x378844){const _0x3dce57=a63_0x58cd8e,_0x5ea60c=_0x378844[_0x3dce57(0xce)]('schedule-id'),_0x8e93e5=await deleteRuntimeSchedule(_0x378844[_0x3dce57(0xf5)],_0x5ea60c);return{'ok':!![],'data':_0x8e93e5,'message':_0x3dce57(0xef)+_0x5ea60c};},async 'dryRun'(_0xdebbab){const _0x10cac0=a63_0x58cd8e,_0x1ddd56=_0xdebbab['str'](_0x10cac0(0xd5));return dryRun('DELETE',scheduleItemPath(_0xdebbab[_0x10cac0(0xf5)],_0x1ddd56))['description']('Preview:\x20delete\x20schedule\x20'+_0x1ddd56)['build']();}};export const scheduleDefinitions=[scheduleValidate,scheduleCreate,scheduleList,scheduleDetail,scheduleRun,scheduleDelete];
|
package/lib/commands/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a64_0x3b00(){const _0x430d9c=['23060zxkalx','export','4878979pIzwKd','857011ImaIjv','5537979HesPPj','87uZdUsL','41922LjeYXg','Export\x20machine-readable\x20command\x20schema\x20(JSON)','read','460WSFMbs','16CohIkn','schema','12437380KqiCjo','784052pZtmfi'];a64_0x3b00=function(){return _0x430d9c;};return a64_0x3b00();}const a64_0x36d876=a64_0x157d;function a64_0x157d(_0x30e77e,_0x111c2e){_0x30e77e=_0x30e77e-0xe6;const _0x3b0049=a64_0x3b00();let _0x157daa=_0x3b0049[_0x30e77e];return _0x157daa;}(function(_0x25c43a,_0x2c8e7c){const _0x29fcf0=a64_0x157d,_0x2da61e=_0x25c43a();while(!![]){try{const _0x57c0fa=-parseInt(_0x29fcf0(0xe6))/0x1+-parseInt(_0x29fcf0(0xf1))/0x2*(-parseInt(_0x29fcf0(0xe8))/0x3)+parseInt(_0x29fcf0(0xf0))/0x4+-parseInt(_0x29fcf0(0xec))/0x5*(parseInt(_0x29fcf0(0xe9))/0x6)+-parseInt(_0x29fcf0(0xf3))/0x7+-parseInt(_0x29fcf0(0xed))/0x8*(-parseInt(_0x29fcf0(0xe7))/0x9)+parseInt(_0x29fcf0(0xef))/0xa;if(_0x57c0fa===_0x2c8e7c)break;else _0x2da61e['push'](_0x2da61e['shift']());}catch(_0x9dc57){_0x2da61e['push'](_0x2da61e['shift']());}}}(a64_0x3b00,0xc5423));import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x1f3a8c){const _0x11d1d1=await buildSchemaPayload();return{'ok':!![],'data':_0x11d1d1};}export const schemaDefinition={'service':a64_0x36d876(0xee),'command':a64_0x36d876(0xf2),'description':a64_0x36d876(0xea),'risk':a64_0x36d876(0xeb),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x4ad540,_0x2c7a15){const _0x29b4de=a65_0x307e,_0x1836aa=_0x4ad540();while(!![]){try{const _0x26a7da=-parseInt(_0x29b4de(0x160))/0x1*(parseInt(_0x29b4de(0x157))/0x2)+-parseInt(_0x29b4de(0x165))/0x3+parseInt(_0x29b4de(0x156))/0x4*(-parseInt(_0x29b4de(0x12c))/0x5)+parseInt(_0x29b4de(0x179))/0x6*(parseInt(_0x29b4de(0x142))/0x7)+-parseInt(_0x29b4de(0x155))/0x8+parseInt(_0x29b4de(0x10f))/0x9+-parseInt(_0x29b4de(0x126))/0xa*(-parseInt(_0x29b4de(0x168))/0xb);if(_0x26a7da===_0x2c7a15)break;else _0x1836aa['push'](_0x1836aa['shift']());}catch(_0x2fd3c3){_0x1836aa['push'](_0x1836aa['shift']());}}}(a65_0xdfd4,0x90b93));import{compileServiceTreeCommand,matchServiceTreeCommand}from'@lovrabet/cli-framework';import{getLoginUserInfo,listDatasets}from'../../core/api-client.js';import{executeData,executeSdkBff,executeSdkSql}from'../../core/sdk-client.js';import{CliErrors}from'../../errors.js';import{listLocalServices,listLocalServiceTrees}from'../../commands/service/registry.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{isDev,normalizeEnv}from'../../constant/env.js';export function resolveDynamicServiceCommand(_0x161c49,_0x52275c){const _0xc81d6f=a65_0x307e,_0x4ed78f=listLocalServiceTrees();let _0x65e818;for(const _0x5c6af6 of _0x4ed78f){const _0x1da5ae=matchServiceTreeCommand(_0x5c6af6,_0x161c49);if(!_0x1da5ae)continue;(!_0x65e818||_0x1da5ae[_0xc81d6f(0x113)][_0xc81d6f(0x132)][_0xc81d6f(0x14f)]>_0x65e818['command'][_0xc81d6f(0x132)][_0xc81d6f(0x14f)])&&(_0x65e818={'tree':_0x5c6af6,'command':_0x1da5ae['command'],'remainingArgs':_0x1da5ae[_0xc81d6f(0x12b)]});}if(!_0x65e818)return undefined;const _0x93321c={..._0x52275c};return applyAppBinding(_0x65e818['tree'],_0x65e818['command'],_0x93321c),{'definition':buildDynamicCommandDefinition(_0x65e818[_0xc81d6f(0x129)],_0x65e818[_0xc81d6f(0x113)]),'args':_0x65e818[_0xc81d6f(0x12b)],'flags':_0x93321c,'tree':_0x65e818[_0xc81d6f(0x129)],'command':_0x65e818[_0xc81d6f(0x113)]};}export function generateDynamicServiceHelp(_0x278e4a){const _0x1eb82c=a65_0x307e,_0x3d2bc6=listLocalServiceTrees()[_0x1eb82c(0x11c)](_0x37d808=>_0x37d808[_0x1eb82c(0x117)][_0x1eb82c(0x12e)]===_0x278e4a);if(!_0x3d2bc6)return undefined;const _0x4ade99=[CLI_BIN_NAME+'\x20'+_0x278e4a+_0x1eb82c(0x11f),'',_0x3d2bc6['service'][_0x1eb82c(0x16b)]||_0x278e4a,_0x3d2bc6['service']['description']?'\x20\x20'+_0x3d2bc6[_0x1eb82c(0x117)]['description']:'','','Commands:',..._0x3d2bc6[_0x1eb82c(0x172)][_0x1eb82c(0x127)](_0x275178=>{const _0x4b9bb2=_0x1eb82c,_0x3b1d1f=_0x275178[_0x4b9bb2(0x132)][_0x4b9bb2(0x177)](0x1)[_0x4b9bb2(0x153)]('\x20'),_0xb21db2=_0x275178['risk']===_0x4b9bb2(0x15f)?'':'\x20['+_0x275178[_0x4b9bb2(0x131)]+']';return'\x20\x20'+_0x3b1d1f[_0x4b9bb2(0x159)](0x18)+'\x20'+(_0x275178[_0x4b9bb2(0x17b)]||'')+_0xb21db2;}),'',_0x1eb82c(0x14c)+CLI_BIN_NAME+_0x1eb82c(0x11d)+_0x278e4a+'`\x20to\x20inspect\x20the\x20manifest.'][_0x1eb82c(0x116)](Boolean);return _0x4ade99[_0x1eb82c(0x153)]('\x0a');}export function listDynamicServiceEntries(){const _0x46a190=a65_0x307e;return listLocalServices()[_0x46a190(0x127)](_0x413eec=>{const _0x2a8f75=_0x46a190,_0x27bf21=_0x413eec[_0x2a8f75(0x111)];return{'service':_0x27bf21[_0x2a8f75(0x117)]['code'],'label':_0x27bf21[_0x2a8f75(0x117)][_0x2a8f75(0x16b)]||_0x27bf21[_0x2a8f75(0x117)][_0x2a8f75(0x12e)],'commands':_0x27bf21[_0x2a8f75(0x172)]['map'](_0x287f6c=>({'command':dynamicCommandName(_0x287f6c),'description':_0x287f6c['description']||'Run\x20service\x20command\x20'+_0x287f6c[_0x2a8f75(0x14a)],'tag':riskTag(_0x287f6c[_0x2a8f75(0x131)])}))};});}export function getDynamicServiceEntry(_0x203e19){const _0x45fd1d=a65_0x307e;return listDynamicServiceEntries()['find'](_0x973e22=>_0x973e22[_0x45fd1d(0x117)]===_0x203e19);}export function listDynamicServiceDefinitions(_0x454c61){const _0x449ada=a65_0x307e;return listLocalServiceTrees()[_0x449ada(0x116)](_0x54039e=>!_0x454c61||_0x54039e[_0x449ada(0x117)][_0x449ada(0x12e)]===_0x454c61)[_0x449ada(0x16c)](_0x2d4371=>_0x2d4371[_0x449ada(0x172)][_0x449ada(0x127)](_0x29a701=>buildDynamicCommandDefinition(_0x2d4371,_0x29a701)));}export function getDynamicServiceDefinitions(_0x330d5c){const _0x563ec3=listDynamicServiceDefinitions(_0x330d5c);return _0x563ec3['length']>0x0?_0x563ec3:undefined;}export function findDynamicServiceDefinition(_0x572832,_0x12b2e7){const _0x24b892=a65_0x307e;return listDynamicServiceDefinitions(_0x572832)['find'](_0x3967b8=>_0x3967b8[_0x24b892(0x113)]===_0x12b2e7);}function a65_0xdfd4(){const _0x415695=['normalizedManifest','entries','command','params','\x20\x20MAP\x20TO','filter','service','This\x20will\x20run\x20Service\x20Tree\x20command\x20\x22','validation','\x20\x20\x20\x20functionName:\x20','default','find','\x20service\x20detail\x20--service\x20','\x20requires\x20target.datasetCode\x20or\x20target.datatable.','\x20<command>\x20[flags]','ctx.','sqlCode','push','envName','userName','appCode','1270QZjvaQ','map','enum','tree','some','remainingArgs','30815HPolkz','username','code','Preview\x20dynamic\x20service\x20command:\x20','string','risk','fullPath','\x20completed\x20in\x20','context.','\x20->\x20','source','number','\x20\x20\x20\x20datatable:\x20','\x20\x20\x20\x20','bffCode','scriptName','mapTo','target','tableName','Run\x20service\x20command\x20','json','\x20\x20[','7QIoAKa','bffId','employeeId','Cannot\x20resolve\x20datatable\x20\x22','development','Unsupported\x20service\x20target\x20kind:\x20','Service\x20command\x20','userId','cliPath','appBindings','Use\x20`','\x20\x20\x20\x20kind:\x20\x20\x20\x20','now','length','high-risk-write','nickName','The\x20manifest\x20marks\x20this\x20command\x20as\x20a\x20high-risk\x20write.\x20It\x20may\x20make\x20business\x20changes\x20that\x20are\x20hard\x20to\x20reverse.','join','kind','5973840NqMifJ','12GBzkEA','574xgQfVC','sql','padEnd','type','\x20requires\x20target.functionName.','env','loginName','args','read','4006UGFBzD','SERVICE_TREE','Check\x20the\x20service\x20binding\x20and\x20current\x20connection.\x20Do\x20not\x20switch\x20environments\x20or\x20credentials\x20automatically.','\x22\x20in\x20service\x20command\x20','data','93945dELQPe','datasetCode','\x20requires\x20target.sqlCode.','92081Waigks','\x20\x20\x20\x20sqlCode:\x20','The\x20manifest\x20marks\x20this\x20command\x20as\x20a\x20write.\x20It\x20may\x20change\x20business\x20data\x20or\x20service\x20state.','name','flatMap','Unknown\x20appRef\x20\x22','boolean','appcode','const','cliName','commands','flags','required','\x20requires\x20environment\x20\x22','\x22,\x20but\x20the\x20current\x20environment\x20is\x20\x22','slice','datatable','4065702gwXmrq','app','description','\x20\x20\x20\x20command:\x20','operator','7184781emjcVP','tenantCode'];a65_0xdfd4=function(){return _0x415695;};return a65_0xdfd4();}export function buildDynamicCommandDefinition(_0x1beaef,_0x584aee){const _0x48d126=a65_0x307e;return{'service':_0x1beaef[_0x48d126(0x117)][_0x48d126(0x12e)],'command':dynamicCommandName(_0x584aee),'description':_0x584aee[_0x48d126(0x17b)]||_0x48d126(0x13f)+_0x584aee[_0x48d126(0x14a)],'risk':_0x584aee[_0x48d126(0x131)],..._0x584aee[_0x48d126(0x131)]===_0x48d126(0x15f)?{}:{'confirmationDescription':buildDynamicConfirmationDescription(_0x584aee)},'requiresAuth':!![],'requiresAppCode':!![],'args':_0x584aee[_0x48d126(0x15e)][_0x48d126(0x127)](_0x2d3e35=>({'name':_0x2d3e35[_0x48d126(0x16b)],'description':_0x2d3e35['description']||_0x2d3e35[_0x48d126(0x16b)],'required':_0x2d3e35[_0x48d126(0x174)]})),'flags':_0x584aee[_0x48d126(0x173)][_0x48d126(0x127)](flagToCommandFlag),'helpExtra':()=>renderDynamicCommandHelp(_0x584aee),async 'dryRun'(_0x6735a){const _0x5966cb=_0x48d126,_0x428627=await compilePlan(_0x1beaef,_0x584aee,_0x6735a);return{'method':_0x5966cb(0x161),'url':_0x584aee['cliPath'],'body':{'target':targetPreview(_0x428627),'params':_0x428627['params']},'description':_0x5966cb(0x12f)+_0x584aee['cliPath']};},async 'execute'(_0x520ee6){const _0x596f58=_0x48d126,_0x335852=await compilePlan(_0x1beaef,_0x584aee,_0x520ee6),_0x4ac50e=Date[_0x596f58(0x14e)](),_0x501c1f=await executePlan(_0x335852,_0x584aee,_0x520ee6),_0x77a34=Date['now']()-_0x4ac50e;return{'ok':!![],'data':{'service':_0x1beaef[_0x596f58(0x117)],'command':_0x584aee[_0x596f58(0x14a)],'target':targetPreview(_0x335852),'result':_0x501c1f,'elapsed':_0x77a34},'message':_0x596f58(0x148)+_0x584aee[_0x596f58(0x14a)]+_0x596f58(0x133)+_0x77a34+'ms'};}};}function buildDynamicConfirmationDescription(_0x2c0708){const _0x370c5a=a65_0x307e,_0x5156d0=_0x2c0708['description']||_0x2c0708[_0x370c5a(0x14a)],_0x139112=_0x2c0708[_0x370c5a(0x131)]===_0x370c5a(0x150)?_0x370c5a(0x152):_0x370c5a(0x16a);return _0x370c5a(0x118)+_0x5156d0+'\x22.\x20'+_0x139112;}function dynamicCommandName(_0x433753){const _0x91079c=a65_0x307e;return _0x433753[_0x91079c(0x132)]['slice'](0x1)[_0x91079c(0x153)]('\x20');}function riskTag(_0x19b96d){const _0x304d0e=a65_0x307e;return _0x19b96d===_0x304d0e(0x15f)?'':_0x304d0e(0x141)+_0x19b96d+']';}function flagToCommandFlag(_0x528eb3){const _0x4a5264=a65_0x307e;return{'name':_0x528eb3[_0x4a5264(0x171)],'type':_0x528eb3[_0x4a5264(0x15a)]===_0x4a5264(0x140)?_0x4a5264(0x130):_0x528eb3[_0x4a5264(0x15a)],'description':_0x528eb3['description']||_0x528eb3[_0x4a5264(0x16b)],'required':_0x528eb3[_0x4a5264(0x174)],'default':isPrimitiveFlagDefault(_0x528eb3[_0x4a5264(0x11b)])?_0x528eb3[_0x4a5264(0x11b)]:undefined,'enum':_0x528eb3[_0x4a5264(0x128)]};}async function compilePlan(_0x4c3c56,_0x4edb38,_0x324bdb){const _0x10537e=a65_0x307e,_0x2deaf3=_0x4edb38[_0x10537e(0x13d)]['appRef']?_0x4c3c56['appBindings'][_0x4edb38[_0x10537e(0x13d)]['appRef']]:undefined;if(_0x2deaf3?.['env']){const _0x2ebbd2=isDev(_0x2deaf3[_0x10537e(0x15c)])?_0x10537e(0x146):normalizeEnv(_0x2deaf3[_0x10537e(0x15c)]);if(_0x2ebbd2!==_0x324bdb[_0x10537e(0x123)])throw CliErrors[_0x10537e(0x119)](_0x10537e(0x148)+_0x4edb38[_0x10537e(0x14a)]+_0x10537e(0x175)+_0x2ebbd2+_0x10537e(0x176)+_0x324bdb['envName']+'\x22.',_0x10537e(0x162));}return compileServiceTreeCommand(_0x4edb38,{'flags':_0x324bdb['rawFlags'],'args':_0x324bdb[_0x10537e(0x15e)],'context':await buildServiceContext(_0x4edb38,_0x324bdb)});}async function buildServiceContext(_0x5d5df2,_0x51b65d){const _0x5b3516=a65_0x307e,_0x4fa4b9={'appCode':_0x51b65d[_0x5b3516(0x125)],'env':_0x51b65d[_0x5b3516(0x123)],'envName':_0x51b65d['envName']};if(!usesRuntimeContext(_0x5d5df2))return _0x4fa4b9;const _0x383239=await getLoginUserInfo(),_0x54933b=pickFirst(_0x383239[_0x5b3516(0x149)],_0x383239['id']);return{..._0x4fa4b9,'user':_0x383239,'userId':_0x54933b,'id':_0x383239['id'],'username':pickFirst(_0x383239[_0x5b3516(0x12d)],_0x383239[_0x5b3516(0x124)],_0x383239[_0x5b3516(0x15d)]),'userName':_0x383239['userName'],'nickname':pickFirst(_0x383239['nickname'],_0x383239[_0x5b3516(0x151)]),'nickName':_0x383239['nickName'],'tenantCode':_0x383239[_0x5b3516(0x110)],'employeeId':_0x383239[_0x5b3516(0x144)]};}function usesRuntimeContext(_0x182675){const _0x1532b6=a65_0x307e;return _0x182675[_0x1532b6(0x13c)][_0x1532b6(0x12a)](_0x970bfd=>typeof _0x970bfd[_0x1532b6(0x136)]===_0x1532b6(0x130)&&(_0x970bfd[_0x1532b6(0x136)]['startsWith'](_0x1532b6(0x134))||_0x970bfd[_0x1532b6(0x136)]['startsWith'](_0x1532b6(0x120))));}function pickFirst(..._0x11cc99){const _0xb31374=a65_0x307e;return _0x11cc99[_0xb31374(0x11c)](_0x8b4e63=>_0x8b4e63!==undefined&&_0x8b4e63!==null);}async function executePlan(_0x3a9f3f,_0x5cd7d2,_0x4f7613){const _0x391c67=a65_0x307e;if(_0x3a9f3f['kind']===_0x391c67(0x164)){const _0xbc6b5e=await resolveDatasetCode(_0x3a9f3f,_0x5cd7d2,_0x4f7613);return executeData(_0xbc6b5e,_0x3a9f3f[_0x391c67(0x113)],_0x3a9f3f['params']);}if(_0x3a9f3f[_0x391c67(0x154)]===_0x391c67(0x158)){if(!_0x3a9f3f[_0x391c67(0x121)])throw CliErrors[_0x391c67(0x119)](_0x391c67(0x148)+_0x5cd7d2['cliPath']+_0x391c67(0x167));return executeSdkSql(_0x3a9f3f['sqlCode'],normalizeScalarParams(_0x3a9f3f[_0x391c67(0x114)]));}if(_0x3a9f3f[_0x391c67(0x154)]==='bff'){const _0x341a79=_0x3a9f3f[_0x391c67(0x13b)]||_0x3a9f3f[_0x391c67(0x13a)]||(_0x3a9f3f[_0x391c67(0x143)]==null?'':String(_0x3a9f3f[_0x391c67(0x143)]));if(!_0x341a79)throw CliErrors[_0x391c67(0x119)](_0x391c67(0x148)+_0x5cd7d2[_0x391c67(0x14a)]+_0x391c67(0x15b));return executeSdkBff(_0x341a79,_0x3a9f3f[_0x391c67(0x114)]);}throw CliErrors[_0x391c67(0x119)](_0x391c67(0x147)+_0x3a9f3f[_0x391c67(0x154)]);}async function resolveDatasetCode(_0x329101,_0x2e4a83,_0x2943ae){const _0x56b2f4=a65_0x307e;if(_0x329101['datasetCode'])return _0x329101[_0x56b2f4(0x166)];if(!_0x329101['datatable'])throw CliErrors[_0x56b2f4(0x119)](_0x56b2f4(0x148)+_0x2e4a83[_0x56b2f4(0x14a)]+_0x56b2f4(0x11e));const _0x5d920b=await listDatasets(_0x2943ae[_0x56b2f4(0x125)]),_0x41f2e8=_0x5d920b[_0x56b2f4(0x11c)](_0x322fb4=>_0x322fb4['dbtableConfig']?.[_0x56b2f4(0x13e)]===_0x329101[_0x56b2f4(0x178)]);if(!_0x41f2e8?.[_0x56b2f4(0x12e)])throw CliErrors[_0x56b2f4(0x119)](_0x56b2f4(0x145)+_0x329101['datatable']+'\x22\x20to\x20a\x20datasetCode\x20in\x20app\x20'+_0x2943ae[_0x56b2f4(0x125)]+'.','Use\x20lovrabet\x20dataset\x20list\x20to\x20confirm\x20the\x20physical\x20table\x20name\x20or\x20add\x20target.datasetCode\x20to\x20the\x20manifest.');return _0x41f2e8[_0x56b2f4(0x12e)];}function applyAppBinding(_0x2686b3,_0x19fbd4,_0x3a0e01){const _0x3426d3=a65_0x307e,_0x59ae90=_0x19fbd4['target']['appRef'];if(!_0x59ae90)return;const _0x1d1a46=_0x2686b3[_0x3426d3(0x14b)][_0x59ae90];if(!_0x1d1a46)throw CliErrors['validation'](_0x3426d3(0x16d)+_0x59ae90+_0x3426d3(0x163)+_0x19fbd4[_0x3426d3(0x14a)]+'.','Define\x20the\x20appRef\x20under\x20appBindings\x20or\x20remove\x20target.appRef.');const _0x8b19f1=_0x1d1a46['appcode']||_0x1d1a46[_0x3426d3(0x125)];_0x8b19f1&&!hasText(_0x3a0e01[_0x3426d3(0x16f)])&&!hasText(_0x3a0e01['app'])&&(_0x3a0e01['appcode']=_0x8b19f1),_0x1d1a46[_0x3426d3(0x17a)]&&!hasText(_0x3a0e01[_0x3426d3(0x17a)])&&!hasText(_0x3a0e01[_0x3426d3(0x16f)])&&(_0x3a0e01[_0x3426d3(0x17a)]=_0x1d1a46['app']);}function renderDynamicCommandHelp(_0x29bbbd){const _0x47c564=a65_0x307e,_0x1604ee=['\x20\x20SERVICE\x20TREE\x20TARGET',_0x47c564(0x14d)+_0x29bbbd[_0x47c564(0x13d)][_0x47c564(0x154)],_0x47c564(0x10d)+_0x29bbbd[_0x47c564(0x13d)][_0x47c564(0x113)]];if(_0x29bbbd[_0x47c564(0x13d)]['datasetCode'])_0x1604ee[_0x47c564(0x122)]('\x20\x20\x20\x20datasetCode:\x20'+_0x29bbbd[_0x47c564(0x13d)][_0x47c564(0x166)]);if(_0x29bbbd[_0x47c564(0x13d)][_0x47c564(0x178)])_0x1604ee[_0x47c564(0x122)](_0x47c564(0x138)+_0x29bbbd[_0x47c564(0x13d)][_0x47c564(0x178)]);if(_0x29bbbd[_0x47c564(0x13d)]['sqlCode'])_0x1604ee['push'](_0x47c564(0x169)+_0x29bbbd[_0x47c564(0x13d)]['sqlCode']);if(_0x29bbbd[_0x47c564(0x13d)][_0x47c564(0x13b)])_0x1604ee[_0x47c564(0x122)](_0x47c564(0x11a)+_0x29bbbd[_0x47c564(0x13d)][_0x47c564(0x13b)]);if(_0x29bbbd[_0x47c564(0x13c)]['length']>0x0){_0x1604ee['push']('',_0x47c564(0x115));for(const _0x57770f of _0x29bbbd['mapTo']){_0x1604ee['push'](_0x47c564(0x139)+(_0x57770f[_0x47c564(0x136)]||_0x47c564(0x170))+_0x47c564(0x135)+_0x57770f[_0x47c564(0x13d)]+(_0x57770f['operator']?'.'+_0x57770f[_0x47c564(0x10e)]:''));}}return _0x1604ee[_0x47c564(0x153)]('\x0a');}function targetPreview(_0x4cf108){const _0x3395bb=a65_0x307e;return{'kind':_0x4cf108['kind'],'command':_0x4cf108[_0x3395bb(0x113)],'appRef':_0x4cf108['appRef'],'datasetCode':_0x4cf108[_0x3395bb(0x166)],'datatable':_0x4cf108[_0x3395bb(0x178)],'sqlCode':_0x4cf108['sqlCode'],'bffCode':_0x4cf108[_0x3395bb(0x13a)],'bffId':_0x4cf108[_0x3395bb(0x143)],'functionName':_0x4cf108[_0x3395bb(0x13b)]};}function normalizeScalarParams(_0x771946){const _0xf5a2b1=a65_0x307e;return Object['fromEntries'](Object[_0xf5a2b1(0x112)](_0x771946)[_0xf5a2b1(0x116)](([,_0x537ccf])=>typeof _0x537ccf==='string'||typeof _0x537ccf===_0xf5a2b1(0x137)));}function a65_0x307e(_0x1127d6,_0x16da41){_0x1127d6=_0x1127d6-0x10d;const _0xdfd4b1=a65_0xdfd4();let _0x307e80=_0xdfd4b1[_0x1127d6];return _0x307e80;}function hasText(_0x2f8cad){const _0x2e7150=a65_0x307e;return typeof _0x2f8cad===_0x2e7150(0x130)&&_0x2f8cad['trim']()[_0x2e7150(0x14f)]>0x0;}function isPrimitiveFlagDefault(_0x63a88){const _0x134ca7=a65_0x307e;return _0x63a88===undefined||typeof _0x63a88==='string'||typeof _0x63a88===_0x134ca7(0x137)||typeof _0x63a88===_0x134ca7(0x16e);}
|
|
1
|
+
(function(_0x1f8e35,_0x9fd0f3){const _0x4e1678=a65_0x2466,_0x3cf5f5=_0x1f8e35();while(!![]){try{const _0x4a0297=parseInt(_0x4e1678(0x216))/0x1+-parseInt(_0x4e1678(0x21f))/0x2*(parseInt(_0x4e1678(0x20e))/0x3)+parseInt(_0x4e1678(0x232))/0x4+parseInt(_0x4e1678(0x1ec))/0x5*(-parseInt(_0x4e1678(0x1fc))/0x6)+-parseInt(_0x4e1678(0x1ff))/0x7*(parseInt(_0x4e1678(0x221))/0x8)+-parseInt(_0x4e1678(0x218))/0x9+parseInt(_0x4e1678(0x21b))/0xa;if(_0x4a0297===_0x9fd0f3)break;else _0x3cf5f5['push'](_0x3cf5f5['shift']());}catch(_0x10c474){_0x3cf5f5['push'](_0x3cf5f5['shift']());}}}(a65_0xafd7,0x26fa8));import{compileServiceTreeCommand,matchServiceTreeCommand}from'@lovrabet/cli-framework';import{getLoginUserInfo,listDatasets}from'../../core/api-client.js';import{executeData,executeSdkBff,executeSdkSql}from'../../core/sdk-client.js';import{CliErrors}from'../../errors.js';import{listLocalServices,listLocalServiceTrees}from'../../commands/service/registry.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{isDev,normalizeEnv}from'../../constant/env.js';export function resolveDynamicServiceCommand(_0x146af5,_0x2cc7da){const _0x4eaca8=a65_0x2466,_0x3b633b=listLocalServiceTrees();let _0x3eaaca;for(const _0x3522bd of _0x3b633b){const _0x267618=matchServiceTreeCommand(_0x3522bd,_0x146af5);if(!_0x267618)continue;(!_0x3eaaca||_0x267618[_0x4eaca8(0x217)][_0x4eaca8(0x1ee)][_0x4eaca8(0x20b)]>_0x3eaaca[_0x4eaca8(0x217)][_0x4eaca8(0x1ee)][_0x4eaca8(0x20b)])&&(_0x3eaaca={'tree':_0x3522bd,'command':_0x267618[_0x4eaca8(0x217)],'remainingArgs':_0x267618[_0x4eaca8(0x1d9)]});}if(!_0x3eaaca)return undefined;const _0x43a87a={..._0x2cc7da};return applyAppBinding(_0x3eaaca[_0x4eaca8(0x1e0)],_0x3eaaca['command'],_0x43a87a),{'definition':buildDynamicCommandDefinition(_0x3eaaca[_0x4eaca8(0x1e0)],_0x3eaaca[_0x4eaca8(0x217)]),'args':_0x3eaaca['remainingArgs'],'flags':_0x43a87a,'tree':_0x3eaaca['tree'],'command':_0x3eaaca[_0x4eaca8(0x217)]};}export function generateDynamicServiceHelp(_0x2be554){const _0x4523ea=a65_0x2466,_0x539dc3=listLocalServiceTrees()['find'](_0xaa9ba6=>_0xaa9ba6[_0x4523ea(0x1d8)][_0x4523ea(0x224)]===_0x2be554);if(!_0x539dc3)return undefined;const _0x4e2360=[CLI_BIN_NAME+'\x20'+_0x2be554+_0x4523ea(0x22a),'',_0x539dc3[_0x4523ea(0x1d8)][_0x4523ea(0x223)]||_0x2be554,_0x539dc3[_0x4523ea(0x1d8)]['description']?'\x20\x20'+_0x539dc3['service']['description']:'','','Commands:',..._0x539dc3[_0x4523ea(0x236)][_0x4523ea(0x1f4)](_0x145f12=>{const _0xbf761a=_0x4523ea,_0x4709a0=_0x145f12[_0xbf761a(0x1ee)][_0xbf761a(0x1de)](0x1)[_0xbf761a(0x1df)]('\x20'),_0xb5a687=_0x145f12[_0xbf761a(0x1e7)]==='read'?'':'\x20['+_0x145f12[_0xbf761a(0x1e7)]+']';return'\x20\x20'+_0x4709a0[_0xbf761a(0x212)](0x18)+'\x20'+(_0x145f12[_0xbf761a(0x21c)]||'')+_0xb5a687;}),'',_0x4523ea(0x22c)+CLI_BIN_NAME+'\x20service\x20detail\x20--service\x20'+_0x2be554+'`\x20to\x20inspect\x20the\x20manifest.'][_0x4523ea(0x1fe)](Boolean);return _0x4e2360['join']('\x0a');}export function listDynamicServiceEntries(){const _0x289600=a65_0x2466;return listLocalServices()[_0x289600(0x1f4)](_0x1aa197=>{const _0x1a3b0c=_0x289600,_0x35e409=_0x1aa197[_0x1a3b0c(0x207)];return{'service':_0x35e409['service'][_0x1a3b0c(0x224)],'label':_0x35e409[_0x1a3b0c(0x1d8)][_0x1a3b0c(0x223)]||_0x35e409[_0x1a3b0c(0x1d8)][_0x1a3b0c(0x224)],'commands':_0x35e409['commands'][_0x1a3b0c(0x1f4)](_0x3a451a=>({'command':dynamicCommandName(_0x3a451a),'description':_0x3a451a[_0x1a3b0c(0x21c)]||'Run\x20service\x20command\x20'+_0x3a451a['cliPath'],'tag':riskTag(_0x3a451a[_0x1a3b0c(0x1e7)])}))};});}export function getDynamicServiceEntry(_0x30111b){const _0x8853fd=a65_0x2466;return listDynamicServiceEntries()[_0x8853fd(0x235)](_0x2ba1c3=>_0x2ba1c3['service']===_0x30111b);}export function listDynamicServiceDefinitions(_0xaadaec){const _0x36faa1=a65_0x2466;return listLocalServiceTrees()[_0x36faa1(0x1fe)](_0x112335=>!_0xaadaec||_0x112335[_0x36faa1(0x1d8)]['code']===_0xaadaec)[_0x36faa1(0x213)](_0x32b8ac=>_0x32b8ac['commands'][_0x36faa1(0x1f4)](_0x28ba1d=>buildDynamicCommandDefinition(_0x32b8ac,_0x28ba1d)));}export function getDynamicServiceDefinitions(_0x38ebba){const _0x4573fd=listDynamicServiceDefinitions(_0x38ebba);return _0x4573fd['length']>0x0?_0x4573fd:undefined;}export function findDynamicServiceDefinition(_0x50e07d,_0x17b506){const _0x477517=a65_0x2466;return listDynamicServiceDefinitions(_0x50e07d)[_0x477517(0x235)](_0x5bdea2=>_0x5bdea2[_0x477517(0x217)]===_0x17b506);}export function buildDynamicCommandDefinition(_0x123645,_0x4a6b59){const _0x229ea4=a65_0x2466;return{'service':_0x123645[_0x229ea4(0x1d8)][_0x229ea4(0x224)],'command':dynamicCommandName(_0x4a6b59),'description':_0x4a6b59[_0x229ea4(0x21c)]||'Run\x20service\x20command\x20'+_0x4a6b59[_0x229ea4(0x1f5)],'risk':_0x4a6b59[_0x229ea4(0x1e7)],..._0x4a6b59['risk']===_0x229ea4(0x233)?{}:{'confirmationDescription':buildDynamicConfirmationDescription(_0x4a6b59)},'requiresAuth':!![],'requiresAppCode':!![],'args':_0x4a6b59[_0x229ea4(0x22d)][_0x229ea4(0x1f4)](_0x1c65e6=>({'name':_0x1c65e6[_0x229ea4(0x223)],'description':_0x1c65e6['description']||_0x1c65e6['name'],'required':_0x1c65e6['required']})),'flags':_0x4a6b59['flags']['map'](flagToCommandFlag),'helpExtra':()=>renderDynamicCommandHelp(_0x4a6b59),async 'dryRun'(_0x427cd3){const _0x1a3d55=_0x229ea4,_0x32ab9a=await compilePlan(_0x123645,_0x4a6b59,_0x427cd3);return{'method':_0x1a3d55(0x234),'url':_0x4a6b59[_0x1a3d55(0x1f5)],'body':{'target':targetPreview(_0x32ab9a),'params':_0x32ab9a[_0x1a3d55(0x1ef)]},'description':'Preview\x20dynamic\x20service\x20command:\x20'+_0x4a6b59['cliPath']};},async 'execute'(_0x3c1022){const _0x3235f9=_0x229ea4,_0x45c2ff=await compilePlan(_0x123645,_0x4a6b59,_0x3c1022),_0x45ad53=Date['now'](),_0x117dce=await executePlan(_0x45c2ff,_0x4a6b59,_0x3c1022),_0x45b4df=Date[_0x3235f9(0x208)]()-_0x45ad53;return{'ok':!![],'data':{'service':_0x123645[_0x3235f9(0x1d8)],'command':_0x4a6b59[_0x3235f9(0x1f5)],'target':targetPreview(_0x45c2ff),'result':_0x117dce,'elapsed':_0x45b4df},'message':_0x3235f9(0x225)+_0x4a6b59[_0x3235f9(0x1f5)]+'\x20completed\x20in\x20'+_0x45b4df+'ms'};}};}function buildDynamicConfirmationDescription(_0x526a7e){const _0x14444d=a65_0x2466,_0x4d25ba=_0x526a7e[_0x14444d(0x21c)]||_0x526a7e[_0x14444d(0x1f5)],_0x2bfbb5=_0x526a7e[_0x14444d(0x1e7)]==='high-risk-write'?_0x14444d(0x1e1):_0x14444d(0x210);return _0x14444d(0x231)+_0x4d25ba+'\x22.\x20'+_0x2bfbb5;}function dynamicCommandName(_0x20ec69){const _0x29a26c=a65_0x2466;return _0x20ec69['fullPath'][_0x29a26c(0x1de)](0x1)[_0x29a26c(0x1df)]('\x20');}function riskTag(_0x1bdf05){const _0x333330=a65_0x2466;return _0x1bdf05===_0x333330(0x233)?'':_0x333330(0x204)+_0x1bdf05+']';}function flagToCommandFlag(_0x18b4bd){const _0x59f0a3=a65_0x2466;return{'name':_0x18b4bd[_0x59f0a3(0x1e3)],'type':_0x18b4bd[_0x59f0a3(0x215)]===_0x59f0a3(0x219)?_0x59f0a3(0x227):_0x18b4bd[_0x59f0a3(0x215)],'description':_0x18b4bd['description']||_0x18b4bd['name'],'required':_0x18b4bd['required'],'default':isPrimitiveFlagDefault(_0x18b4bd['default'])?_0x18b4bd[_0x59f0a3(0x1e2)]:undefined,'enum':_0x18b4bd['enum']};}async function compilePlan(_0x130f12,_0x1903f6,_0x5b0a42){const _0x30df6d=a65_0x2466,_0x2a58b4=_0x1903f6[_0x30df6d(0x1ed)]['appRef']?_0x130f12[_0x30df6d(0x21d)][_0x1903f6[_0x30df6d(0x1ed)][_0x30df6d(0x238)]]:undefined;if(_0x2a58b4?.['env']){const _0x17e9b6=isDev(_0x2a58b4[_0x30df6d(0x1f9)])?'development':normalizeEnv(_0x2a58b4['env']);if(_0x17e9b6!==_0x5b0a42[_0x30df6d(0x1fb)])throw CliErrors[_0x30df6d(0x23c)]('Service\x20command\x20'+_0x1903f6['cliPath']+'\x20requires\x20environment\x20\x22'+_0x17e9b6+_0x30df6d(0x1eb)+_0x5b0a42['envName']+'\x22.',_0x30df6d(0x20d));}return compileServiceTreeCommand(_0x1903f6,{'flags':_0x5b0a42[_0x30df6d(0x220)],'args':_0x5b0a42[_0x30df6d(0x22d)],'context':await buildServiceContext(_0x1903f6,_0x5b0a42)});}function a65_0x2466(_0x3e7317,_0x5a4443){_0x3e7317=_0x3e7317-0x1d8;const _0xafd7ea=a65_0xafd7();let _0x246643=_0xafd7ea[_0x3e7317];return _0x246643;}async function buildServiceContext(_0x3a363b,_0x424556){const _0x142b0b=a65_0x2466,_0x3efc10={'appCode':_0x424556[_0x142b0b(0x1f8)],'env':_0x424556[_0x142b0b(0x1fb)],'envName':_0x424556[_0x142b0b(0x1fb)]};if(!usesRuntimeContext(_0x3a363b))return _0x3efc10;const _0x2a1cf3=await getLoginUserInfo(),_0x4caa3d=pickFirst(_0x2a1cf3['userId'],_0x2a1cf3['id']);return{..._0x3efc10,'user':_0x2a1cf3,'userId':_0x4caa3d,'id':_0x2a1cf3['id'],'username':pickFirst(_0x2a1cf3['username'],_0x2a1cf3['userName'],_0x2a1cf3['loginName']),'userName':_0x2a1cf3['userName'],'nickname':pickFirst(_0x2a1cf3[_0x142b0b(0x222)],_0x2a1cf3[_0x142b0b(0x1f0)]),'nickName':_0x2a1cf3[_0x142b0b(0x1f0)],'tenantCode':_0x2a1cf3[_0x142b0b(0x1f6)],'employeeId':_0x2a1cf3[_0x142b0b(0x1e4)]};}function usesRuntimeContext(_0x3e06d5){const _0x4db953=a65_0x2466;return _0x3e06d5[_0x4db953(0x206)][_0x4db953(0x200)](_0x374d32=>typeof _0x374d32[_0x4db953(0x1e8)]===_0x4db953(0x227)&&(_0x374d32[_0x4db953(0x1e8)]['startsWith']('context.')||_0x374d32['source'][_0x4db953(0x1f3)]('ctx.')));}function pickFirst(..._0x42f786){const _0x430207=a65_0x2466;return _0x42f786[_0x430207(0x235)](_0x28f3cf=>_0x28f3cf!==undefined&&_0x28f3cf!==null);}async function executePlan(_0x11bf02,_0x5e52f2,_0x3af158){const _0x32a4eb=a65_0x2466;if(_0x11bf02[_0x32a4eb(0x20c)]===_0x32a4eb(0x211)){const _0x1d2bbe=await resolveDatasetCode(_0x11bf02,_0x5e52f2,_0x3af158);return executeData(_0x1d2bbe,_0x11bf02['command'],_0x11bf02[_0x32a4eb(0x1ef)]);}if(_0x11bf02['kind']===_0x32a4eb(0x214)){if(!_0x11bf02[_0x32a4eb(0x1f2)])throw CliErrors[_0x32a4eb(0x23c)](_0x32a4eb(0x225)+_0x5e52f2['cliPath']+_0x32a4eb(0x1f1));return executeSdkSql(_0x11bf02[_0x32a4eb(0x1f2)],normalizeScalarParams(_0x11bf02['params']));}if(_0x11bf02[_0x32a4eb(0x20c)]===_0x32a4eb(0x20f)){const _0x395f3f=_0x11bf02[_0x32a4eb(0x226)]||_0x11bf02['bffCode']||(_0x11bf02['bffId']==null?'':String(_0x11bf02[_0x32a4eb(0x22f)]));if(!_0x395f3f)throw CliErrors[_0x32a4eb(0x23c)]('Service\x20command\x20'+_0x5e52f2[_0x32a4eb(0x1f5)]+'\x20requires\x20target.functionName.');return executeSdkBff(_0x395f3f,_0x11bf02[_0x32a4eb(0x1ef)]);}throw CliErrors[_0x32a4eb(0x23c)](_0x32a4eb(0x1db)+_0x11bf02['kind']);}async function resolveDatasetCode(_0x48065f,_0x371d54,_0x4fcab0){const _0x24401a=a65_0x2466;if(_0x48065f[_0x24401a(0x21e)])return _0x48065f[_0x24401a(0x21e)];if(!_0x48065f[_0x24401a(0x230)])throw CliErrors['validation'](_0x24401a(0x225)+_0x371d54['cliPath']+_0x24401a(0x21a));const _0x4f9fe6=await listDatasets(_0x4fcab0['appCode']),_0x1ab9bb=_0x4f9fe6[_0x24401a(0x235)](_0x1da442=>_0x1da442['dbtableConfig']?.['tableName']===_0x48065f[_0x24401a(0x230)]);if(!_0x1ab9bb?.[_0x24401a(0x224)])throw CliErrors['validation'](_0x24401a(0x1fa)+_0x48065f[_0x24401a(0x230)]+_0x24401a(0x239)+_0x4fcab0[_0x24401a(0x1f8)]+'.',_0x24401a(0x1fd));return _0x1ab9bb[_0x24401a(0x224)];}function applyAppBinding(_0x6b2695,_0x425382,_0x4f0fc3){const _0x4b14f4=a65_0x2466,_0xca4df9=_0x425382['target']['appRef'];if(!_0xca4df9)return;const _0x407c4f=_0x6b2695[_0x4b14f4(0x21d)][_0xca4df9];if(!_0x407c4f)throw CliErrors[_0x4b14f4(0x23c)](_0x4b14f4(0x203)+_0xca4df9+'\x22\x20in\x20service\x20command\x20'+_0x425382['cliPath']+'.',_0x4b14f4(0x1e5));const _0x84313=_0x407c4f[_0x4b14f4(0x20a)]||_0x407c4f[_0x4b14f4(0x1f8)];_0x84313&&!hasText(_0x4f0fc3[_0x4b14f4(0x20a)])&&!hasText(_0x4f0fc3[_0x4b14f4(0x22e)])&&(_0x4f0fc3['appcode']=_0x84313),_0x407c4f['app']&&!hasText(_0x4f0fc3[_0x4b14f4(0x22e)])&&!hasText(_0x4f0fc3[_0x4b14f4(0x20a)])&&(_0x4f0fc3['app']=_0x407c4f[_0x4b14f4(0x22e)]);}function renderDynamicCommandHelp(_0x3598fd){const _0x30e201=a65_0x2466,_0x3c4447=[_0x30e201(0x209),_0x30e201(0x205)+_0x3598fd[_0x30e201(0x1ed)][_0x30e201(0x20c)],'\x20\x20\x20\x20command:\x20'+_0x3598fd[_0x30e201(0x1ed)][_0x30e201(0x217)]];if(_0x3598fd[_0x30e201(0x1ed)][_0x30e201(0x21e)])_0x3c4447['push'](_0x30e201(0x1dd)+_0x3598fd['target']['datasetCode']);if(_0x3598fd[_0x30e201(0x1ed)][_0x30e201(0x230)])_0x3c4447[_0x30e201(0x237)](_0x30e201(0x201)+_0x3598fd[_0x30e201(0x1ed)]['datatable']);if(_0x3598fd[_0x30e201(0x1ed)][_0x30e201(0x1f2)])_0x3c4447[_0x30e201(0x237)](_0x30e201(0x22b)+_0x3598fd[_0x30e201(0x1ed)][_0x30e201(0x1f2)]);if(_0x3598fd[_0x30e201(0x1ed)][_0x30e201(0x226)])_0x3c4447[_0x30e201(0x237)](_0x30e201(0x23b)+_0x3598fd['target'][_0x30e201(0x226)]);if(_0x3598fd['mapTo'][_0x30e201(0x20b)]>0x0){_0x3c4447[_0x30e201(0x237)]('',_0x30e201(0x228));for(const _0x3ae0d8 of _0x3598fd[_0x30e201(0x206)]){_0x3c4447[_0x30e201(0x237)](_0x30e201(0x23a)+(_0x3ae0d8[_0x30e201(0x1e8)]||_0x30e201(0x202))+_0x30e201(0x1f7)+_0x3ae0d8[_0x30e201(0x1ed)]+(_0x3ae0d8[_0x30e201(0x229)]?'.'+_0x3ae0d8[_0x30e201(0x229)]:''));}}return _0x3c4447[_0x30e201(0x1df)]('\x0a');}function targetPreview(_0x37e543){const _0x211c6e=a65_0x2466;return{'kind':_0x37e543[_0x211c6e(0x20c)],'command':_0x37e543[_0x211c6e(0x217)],'appRef':_0x37e543[_0x211c6e(0x238)],'datasetCode':_0x37e543['datasetCode'],'datatable':_0x37e543[_0x211c6e(0x230)],'sqlCode':_0x37e543[_0x211c6e(0x1f2)],'bffCode':_0x37e543[_0x211c6e(0x1ea)],'bffId':_0x37e543[_0x211c6e(0x22f)],'functionName':_0x37e543['scriptName']};}function normalizeScalarParams(_0x3437f9){const _0x446668=a65_0x2466;return Object[_0x446668(0x1da)](Object[_0x446668(0x1dc)](_0x3437f9)[_0x446668(0x1fe)](([,_0x45a943])=>typeof _0x45a943===_0x446668(0x227)||typeof _0x45a943===_0x446668(0x1e6)));}function hasText(_0x4d7503){const _0x263eb3=a65_0x2466;return typeof _0x4d7503===_0x263eb3(0x227)&&_0x4d7503[_0x263eb3(0x1e9)]()[_0x263eb3(0x20b)]>0x0;}function isPrimitiveFlagDefault(_0x159904){const _0x3cc359=a65_0x2466;return _0x159904===undefined||typeof _0x159904===_0x3cc359(0x227)||typeof _0x159904===_0x3cc359(0x1e6)||typeof _0x159904==='boolean';}function a65_0xafd7(){const _0x5967d6=['8QOMcFN','nickname','name','code','Service\x20command\x20','scriptName','string','\x20\x20MAP\x20TO','operator','\x20<command>\x20[flags]','\x20\x20\x20\x20sqlCode:\x20','Use\x20`','args','app','bffId','datatable','This\x20will\x20run\x20Service\x20Tree\x20command\x20\x22','852188dHRSXU','read','SERVICE_TREE','find','commands','push','appRef','\x22\x20to\x20a\x20datasetCode\x20in\x20app\x20','\x20\x20\x20\x20','\x20\x20\x20\x20functionName:\x20','validation','service','remainingArgs','fromEntries','Unsupported\x20service\x20target\x20kind:\x20','entries','\x20\x20\x20\x20datasetCode:\x20','slice','join','tree','The\x20manifest\x20marks\x20this\x20command\x20as\x20a\x20high-risk\x20write.\x20It\x20may\x20make\x20business\x20changes\x20that\x20are\x20hard\x20to\x20reverse.','default','cliName','employeeId','Define\x20the\x20appRef\x20under\x20appBindings\x20or\x20remove\x20target.appRef.','number','risk','source','trim','bffCode','\x22,\x20but\x20the\x20current\x20environment\x20is\x20\x22','247415cWQUXD','target','fullPath','params','nickName','\x20requires\x20target.sqlCode.','sqlCode','startsWith','map','cliPath','tenantCode','\x20->\x20','appCode','env','Cannot\x20resolve\x20datatable\x20\x22','envName','6vbBRJt','Use\x20lovrabet\x20dataset\x20list\x20to\x20confirm\x20the\x20physical\x20table\x20name\x20or\x20add\x20target.datasetCode\x20to\x20the\x20manifest.','filter','2042726BGWcgZ','some','\x20\x20\x20\x20datatable:\x20','const','Unknown\x20appRef\x20\x22','\x20\x20[','\x20\x20\x20\x20kind:\x20\x20\x20\x20','mapTo','normalizedManifest','now','\x20\x20SERVICE\x20TREE\x20TARGET','appcode','length','kind','Check\x20the\x20service\x20binding\x20and\x20current\x20connection.\x20Do\x20not\x20switch\x20environments\x20or\x20credentials\x20automatically.','317181uIYCFL','bff','The\x20manifest\x20marks\x20this\x20command\x20as\x20a\x20write.\x20It\x20may\x20change\x20business\x20data\x20or\x20service\x20state.','data','padEnd','flatMap','sql','type','218555rvhGkq','command','1342224YiiCSq','json','\x20requires\x20target.datasetCode\x20or\x20target.datatable.','5356720glNaLD','description','appBindings','datasetCode','6cMlhGM','rawFlags'];a65_0xafd7=function(){return _0x5967d6;};return a65_0xafd7();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x26c9e2,_0x3cc1ab){const _0x1d020e=a66_0x3bc4,_0x5e2778=_0x26c9e2();while(!![]){try{const _0x1e1627=parseInt(_0x1d020e(0x1ae))/0x1+-parseInt(_0x1d020e(0x196))/0x2+-parseInt(_0x1d020e(0x1b9))/0x3*(-parseInt(_0x1d020e(0x197))/0x4)+parseInt(_0x1d020e(0x194))/0x5*(-parseInt(_0x1d020e(0x1bb))/0x6)+parseInt(_0x1d020e(0x19e))/0x7*(-parseInt(_0x1d020e(0x1af))/0x8)+-parseInt(_0x1d020e(0x1a1))/0x9*(parseInt(_0x1d020e(0x1b7))/0xa)+parseInt(_0x1d020e(0x1a3))/0xb*(parseInt(_0x1d020e(0x1b0))/0xc);if(_0x1e1627===_0x3cc1ab)break;else _0x5e2778['push'](_0x5e2778['shift']());}catch(_0xeb41e7){_0x5e2778['push'](_0x5e2778['shift']());}}}(a66_0x3cb2,0x7bfba));function a66_0x3bc4(_0x39c338,_0x298570){_0x39c338=_0x39c338-0x194;const _0x3cb200=a66_0x3cb2();let _0x3bc405=_0x3cb200[_0x39c338];return _0x3bc405;}export function adaptServiceTreeManifestForLegacyFramework(_0x2bcc40){const _0x27d534=a66_0x3bc4,_0x3dc83f=cloneJsonValue(_0x2bcc40),_0x29f00b=[];if(!isObjectRecord(_0x3dc83f))return{'manifest':_0x3dc83f,'errors':_0x29f00b};return Array[_0x27d534(0x1a5)](_0x3dc83f['commands'])&&_0x3dc83f[_0x27d534(0x1ba)][_0x27d534(0x195)]((_0x285a8c,_0x382f6d)=>{const _0x538b7e=_0x27d534;if(!isObjectRecord(_0x285a8c))return;adaptBffTarget(_0x285a8c[_0x538b7e(0x1bc)],_0x538b7e(0x1b3)+_0x382f6d+_0x538b7e(0x19c),_0x29f00b);}),adaptResources(_0x3dc83f['resources'],_0x27d534(0x1ac),_0x29f00b),{'manifest':_0x3dc83f,'errors':_0x29f00b};}export function toPublicServiceTreeTarget(_0x42ca61){const _0x82341b=a66_0x3bc4,{scriptName:_0x1957f3,..._0x44438e}=_0x42ca61;return typeof _0x1957f3===_0x82341b(0x1b5)&&_0x1957f3['trim']()&&(_0x44438e[_0x82341b(0x1ad)]=_0x1957f3),_0x44438e;}export function toPublicNormalizedServiceTree(_0x583cc1){const _0x5096ad=a66_0x3bc4;return{..._0x583cc1,'commands':_0x583cc1[_0x5096ad(0x1ba)][_0x5096ad(0x19b)](_0x4890c0=>({..._0x4890c0,'target':toPublicServiceTreeTarget(_0x4890c0[_0x5096ad(0x1bc)])}))};}function adaptResources(_0x5f0913,_0x19bde6,_0x578c1d){const _0x573742=a66_0x3bc4;if(!isObjectRecord(_0x5f0913))return;for(const [_0x4b6432,_0x3e15f4]of Object[_0x573742(0x1b1)](_0x5f0913)){if(!isObjectRecord(_0x3e15f4))continue;const _0x4b0fad=_0x19bde6+'.'+_0x4b6432;if(isObjectRecord(_0x3e15f4['actions']))for(const [_0x11827a,_0x32a76e]of Object[_0x573742(0x1b1)](_0x3e15f4[_0x573742(0x1a0)])){if(!isObjectRecord(_0x32a76e))continue;const _0x463c18=_0x4b0fad+_0x573742(0x1a9)+_0x11827a,_0x3f49c5=isObjectRecord(_0x32a76e['target'])&&_0x32a76e[_0x573742(0x1bc)][_0x573742(0x1a4)]==='bff';adaptBffTarget(_0x32a76e[_0x573742(0x1bc)],_0x463c18+_0x573742(0x1aa),_0x578c1d),(_0x3f49c5||isBffAction(_0x32a76e))&&adaptFunctionNameField(_0x32a76e,_0x463c18,_0x578c1d);}adaptResources(_0x3e15f4[_0x573742(0x198)],_0x4b0fad+_0x573742(0x1a8),_0x578c1d);}}function adaptBffTarget(_0x3d1a84,_0x51878d,_0x7142d){const _0x452fa2=a66_0x3bc4;if(!isObjectRecord(_0x3d1a84)||_0x3d1a84[_0x452fa2(0x1a4)]!==_0x452fa2(0x1a2))return;adaptFunctionNameField(_0x3d1a84,_0x51878d,_0x7142d);}function a66_0x3cb2(){const _0x39158e=['hasOwnProperty','$.commands[','action','string','error','3220qweIkG','.functionName','112554JZXqwn','commands','18ndnjoJ','target','199275mRFxFv','forEach','1598850HrSqor','28VkrVEe','resources','scriptName','fromEntries','map','].target','prototype','3745EHTGoa','functionName\x20must\x20be\x20a\x20non-empty\x20string.','actions','15831GkpmZg','bff','13483613LAYHvN','kind','isArray','bff.exec','trim','.resources','.actions.','.target','call','$.resources','functionName','610208erkKxJ','1576EsjVIH','12AMvkNa','entries'];a66_0x3cb2=function(){return _0x39158e;};return a66_0x3cb2();}function adaptFunctionNameField(_0x9fef17,_0x5163bb,_0x47254e){const _0x3e778a=a66_0x3bc4;Object['prototype'][_0x3e778a(0x1b2)][_0x3e778a(0x1ab)](_0x9fef17,_0x3e778a(0x199))&&_0x47254e['push']({'level':_0x3e778a(0x1b6),'path':_0x5163bb+'.scriptName','message':'Use\x20functionName;\x20scriptName\x20is\x20not\x20part\x20of\x20the\x20runtime\x20Service\x20Tree\x20contract.'});if(Object[_0x3e778a(0x19d)][_0x3e778a(0x1b2)][_0x3e778a(0x1ab)](_0x9fef17,_0x3e778a(0x1ad))){if(typeof _0x9fef17['functionName']!==_0x3e778a(0x1b5)||!_0x9fef17[_0x3e778a(0x1ad)][_0x3e778a(0x1a7)]()){_0x47254e['push']({'level':_0x3e778a(0x1b6),'path':_0x5163bb+_0x3e778a(0x1b8),'message':_0x3e778a(0x19f)}),delete _0x9fef17[_0x3e778a(0x1ad)];return;}_0x9fef17[_0x3e778a(0x199)]=_0x9fef17[_0x3e778a(0x1ad)],delete _0x9fef17[_0x3e778a(0x1ad)];}}function isBffAction(_0x20414e){const _0x1f1a13=a66_0x3bc4;return _0x20414e['kind']===_0x1f1a13(0x1a2)||_0x20414e[_0x1f1a13(0x1b4)]===_0x1f1a13(0x1a6)||_0x20414e[_0x1f1a13(0x1bc)]===_0x1f1a13(0x1a6);}function cloneJsonValue(_0x310701){const _0x46747d=a66_0x3bc4;if(Array[_0x46747d(0x1a5)](_0x310701))return _0x310701[_0x46747d(0x19b)](_0x55341b=>cloneJsonValue(_0x55341b));if(isObjectRecord(_0x310701))return Object[_0x46747d(0x19a)](Object[_0x46747d(0x1b1)](_0x310701)[_0x46747d(0x19b)](([_0x3cf5bd,_0x3403c4])=>[_0x3cf5bd,cloneJsonValue(_0x3403c4)]));return _0x310701;}function isObjectRecord(_0x546865){const _0x23979c=a66_0x3bc4;return Boolean(_0x546865)&&typeof _0x546865==='object'&&!Array[_0x23979c(0x1a5)](_0x546865);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a67_0x5b9f9b=a67_0x3734;function a67_0x3734(_0x4c50ff,_0x14cdd5){_0x4c50ff=_0x4c50ff-0x19a;const _0x2f899e=a67_0x2f89();let _0x3734cd=_0x2f899e[_0x4c50ff];return _0x3734cd;}(function(_0x343847,_0x2d5ec6){const _0x8974f2=a67_0x3734,_0x80b25c=_0x343847();while(!![]){try{const _0x3b23d4=-parseInt(_0x8974f2(0x1d6))/0x1*(parseInt(_0x8974f2(0x19e))/0x2)+parseInt(_0x8974f2(0x1a5))/0x3+-parseInt(_0x8974f2(0x1bc))/0x4*(-parseInt(_0x8974f2(0x1c9))/0x5)+-parseInt(_0x8974f2(0x1bb))/0x6*(parseInt(_0x8974f2(0x1a1))/0x7)+-parseInt(_0x8974f2(0x1d1))/0x8*(-parseInt(_0x8974f2(0x1b0))/0x9)+-parseInt(_0x8974f2(0x1db))/0xa+-parseInt(_0x8974f2(0x1ac))/0xb*(-parseInt(_0x8974f2(0x1b6))/0xc);if(_0x3b23d4===_0x2d5ec6)break;else _0x80b25c['push'](_0x80b25c['shift']());}catch(_0x391641){_0x80b25c['push'](_0x80b25c['shift']());}}}(a67_0x2f89,0x4bd40));import{exportServiceManifest,formatValidationFailure,getLocalServiceEntry,getServiceRegistryPath,importServiceManifest,listLocalServices,loadServiceManifestFromFile,removeServiceManifest}from'../../commands/service/registry.js';function a67_0x2f89(){const _0x5d8d2a=['list','Service\x20registry\x20validation\x20passed.','serviceCount','report','imported','820GdFOHB','Local\x20service\x20code,\x20for\x20example\x20crm','validate','read','length','lower\x20kebab-case\x20service\x20code','description','Removed\x20service\x20','1725392OrOShD','Updated','Preview\x20Service\x20Tree\x20removal\x20from\x20~/.lovrabet/service.json','manifest','str','599912uzuaVo','Imported','reduce','errors','Reads\x20the\x20given\x20manifest\x20into\x20the\x20local\x20Service\x20Tree\x20registry.\x20An\x20existing\x20manifest\x20with\x20the\x20same\x20service\x20code\x20is\x20updated.\x20The\x20confirmation\x20UI\x20does\x20not\x20show\x20local\x20file\x20paths.','5046150VqRpFG','target','filePath','Validate\x20a\x20Service\x20Tree\x20JSON\x20manifest','service','Local\x20service\x20not\x20found:\x20','Writes\x20the\x20local\x20Service\x20Tree\x20manifest\x20for\x20the\x20given\x20service\x20to\x20a\x20JSON\x20file.\x20An\x20existing\x20file\x20at\x20the\x20target\x20may\x20be\x20overwritten.\x20The\x20confirmation\x20UI\x20does\x20not\x20show\x20local\x20file\x20paths.','entries','registryPath','registryIndex','serviceCode','commands','registryServiceCode','Import\x20a\x20Service\x20Tree\x20manifest\x20into\x20the\x20local\x20runtime\x20registry','Exported\x20service\x20','2nmoBkf','source','hash','6979GqjNol','normalizedManifest','Service\x20Tree\x20manifest\x20file\x20path','detail','1360869VyGTAt','WRITE','Preview\x20Service\x20Tree\x20import\x20into\x20~/.lovrabet/service.json','Export\x20the\x20local\x20Service\x20Tree\x20manifest\x20to\x20a\x20JSON\x20file','Remove\x20a\x20Service\x20Tree\x20manifest\x20from\x20the\x20local\x20runtime\x20registry','manifests','string','11TOLMbU','List\x20locally\x20imported\x20Service\x20Tree\x20manifests','name','risk','9GjqYgK','write','updated','Service\x20manifest\x20validation\x20passed.','Removes\x20the\x20given\x20service\x20manifest\x20from\x20the\x20local\x20Service\x20Tree\x20registry.\x20Dynamic\x20commands\x20from\x20that\x20manifest\x20will\x20no\x20longer\x20be\x20available.','entry','7267668JprMQy','registry','kind','flags','replaced','1758xbyXpH','10544vOPmIw','cliPath','Preview\x20Service\x20Tree\x20export\x20from\x20~/.lovrabet/service.json','file','type','warnings','map','version'];a67_0x2f89=function(){return _0x5d8d2a;};return a67_0x2f89();}import{toPublicNormalizedServiceTree,toPublicServiceTreeTarget}from'../../commands/service/function-name-adapter.js';const FILE_FLAG={'name':'file','type':a67_0x5b9f9b(0x1ab),'required':!![],'description':a67_0x5b9f9b(0x1a3)},SERVICE_FLAG={'name':a67_0x5b9f9b(0x1df),'type':'string','required':!![],'description':a67_0x5b9f9b(0x1ca),'pattern':{'regex':/^[a-z][a-z0-9-]*$/,'description':a67_0x5b9f9b(0x1ce)}};function summarizeService(_0x10ee66){const _0x413f89=a67_0x5b9f9b;return{'serviceCode':_0x10ee66['serviceCode'],'name':_0x10ee66[_0x413f89(0x1a2)][_0x413f89(0x1df)]['name'],'version':_0x10ee66[_0x413f89(0x1c3)],'importedAt':_0x10ee66['importedAt'],'source':_0x10ee66[_0x413f89(0x19f)],'commandCount':_0x10ee66[_0x413f89(0x1a2)][_0x413f89(0x19a)][_0x413f89(0x1cd)],'commands':_0x10ee66[_0x413f89(0x1a2)][_0x413f89(0x19a)][_0x413f89(0x1c2)](_0x1f7a35=>({'path':_0x1f7a35[_0x413f89(0x1bd)],'description':_0x1f7a35[_0x413f89(0x1cf)],'risk':_0x1f7a35['risk'],'target':toPublicServiceTreeTarget(_0x1f7a35['target']),'flags':_0x1f7a35[_0x413f89(0x1b9)]['map'](_0x33e652=>({'name':_0x33e652[_0x413f89(0x1ae)],'cliName':_0x33e652['cliName'],'type':_0x33e652[_0x413f89(0x1c0)],'required':_0x33e652['required']===!![]}))}))};}function summarizeLoadedManifest(_0xc1bfe2){const _0x43db0a=a67_0x5b9f9b;return{'service':_0xc1bfe2[_0x43db0a(0x1a2)]?.[_0x43db0a(0x1df)],'version':_0xc1bfe2[_0x43db0a(0x1a2)]?.['version'],'commandCount':_0xc1bfe2[_0x43db0a(0x1a2)]?.[_0x43db0a(0x19a)][_0x43db0a(0x1cd)]??0x0,'commands':_0xc1bfe2[_0x43db0a(0x1a2)]?.['commands']['map'](_0x1e1dff=>({'path':_0x1e1dff[_0x43db0a(0x1bd)],'risk':_0x1e1dff[_0x43db0a(0x1af)],'target':toPublicServiceTreeTarget(_0x1e1dff[_0x43db0a(0x1dc)])}))??[],'registryIndex':_0xc1bfe2[_0x43db0a(0x1e4)],'registryServiceCode':_0xc1bfe2[_0x43db0a(0x19b)],'errors':_0xc1bfe2['report'][_0x43db0a(0x1d9)],'warnings':_0xc1bfe2[_0x43db0a(0x1c7)][_0x43db0a(0x1c1)]};}export const serviceDefinitions=[{'service':a67_0x5b9f9b(0x1df),'command':a67_0x5b9f9b(0x1cb),'description':a67_0x5b9f9b(0x1de),'risk':a67_0x5b9f9b(0x1cc),'requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'execute'(_0x408d74){const _0x10d2af=a67_0x5b9f9b,_0x4ce8e5=loadServiceManifestFromFile(_0x408d74[_0x10d2af(0x1d5)]('file'));if(!_0x4ce8e5[_0x10d2af(0x1c7)]['ok'])return{'ok':![],'data':{'file':_0x4ce8e5[_0x10d2af(0x1dd)],'hash':_0x4ce8e5['hash'],'kind':_0x4ce8e5[_0x10d2af(0x1b8)],'serviceCount':_0x4ce8e5[_0x10d2af(0x1aa)][_0x10d2af(0x1cd)],'services':_0x4ce8e5[_0x10d2af(0x1aa)][_0x10d2af(0x1c2)](summarizeLoadedManifest),'errors':_0x4ce8e5[_0x10d2af(0x1c7)][_0x10d2af(0x1d9)],'warnings':_0x4ce8e5[_0x10d2af(0x1c7)]['warnings']},'message':formatValidationFailure(_0x4ce8e5['report'])};if(_0x4ce8e5['kind']===_0x10d2af(0x1b7)||_0x4ce8e5[_0x10d2af(0x1aa)][_0x10d2af(0x1cd)]!==0x1)return{'ok':!![],'data':{'file':_0x4ce8e5[_0x10d2af(0x1dd)],'hash':_0x4ce8e5['hash'],'kind':_0x4ce8e5[_0x10d2af(0x1b8)],'serviceCount':_0x4ce8e5[_0x10d2af(0x1aa)][_0x10d2af(0x1cd)],'commandCount':_0x4ce8e5['manifests'][_0x10d2af(0x1d8)]((_0x3905b2,_0x193dc4)=>_0x3905b2+(_0x193dc4[_0x10d2af(0x1a2)]?.['commands'][_0x10d2af(0x1cd)]??0x0),0x0),'services':_0x4ce8e5[_0x10d2af(0x1aa)][_0x10d2af(0x1c2)](summarizeLoadedManifest),'warnings':_0x4ce8e5[_0x10d2af(0x1c7)][_0x10d2af(0x1c1)]},'message':_0x10d2af(0x1c5)};return{'ok':!![],'data':{'file':_0x4ce8e5['filePath'],'hash':_0x4ce8e5[_0x10d2af(0x1a0)],'kind':_0x4ce8e5['kind'],'service':_0x4ce8e5[_0x10d2af(0x1a2)]?.[_0x10d2af(0x1df)],'version':_0x4ce8e5[_0x10d2af(0x1a2)]?.[_0x10d2af(0x1c3)],'commandCount':_0x4ce8e5[_0x10d2af(0x1a2)]?.[_0x10d2af(0x19a)]['length']??0x0,'commands':_0x4ce8e5[_0x10d2af(0x1a2)]?.[_0x10d2af(0x19a)]['map'](_0x26234a=>({'path':_0x26234a[_0x10d2af(0x1bd)],'risk':_0x26234a[_0x10d2af(0x1af)],'target':toPublicServiceTreeTarget(_0x26234a['target'])})),'warnings':_0x4ce8e5[_0x10d2af(0x1c7)]['warnings']},'message':_0x10d2af(0x1b3)};}},{'service':a67_0x5b9f9b(0x1df),'command':'import','description':a67_0x5b9f9b(0x19c),'risk':a67_0x5b9f9b(0x1b1),'confirmationDescription':a67_0x5b9f9b(0x1da),'requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'dryRun'(_0x3663c5){const _0x5c61e9=a67_0x5b9f9b,_0x2591a8=loadServiceManifestFromFile(_0x3663c5[_0x5c61e9(0x1d5)]('file'));return{'method':_0x5c61e9(0x1a6),'url':getServiceRegistryPath(),'body':{'file':_0x2591a8['filePath'],'hash':_0x2591a8[_0x5c61e9(0x1a0)],'kind':_0x2591a8['kind'],'ok':_0x2591a8[_0x5c61e9(0x1c7)]['ok'],'service':_0x2591a8[_0x5c61e9(0x1a2)]?.['service'],'version':_0x2591a8[_0x5c61e9(0x1a2)]?.[_0x5c61e9(0x1c3)],'serviceCount':_0x2591a8[_0x5c61e9(0x1aa)]['length'],'services':_0x2591a8[_0x5c61e9(0x1aa)][_0x5c61e9(0x1c2)](_0x32dc2a=>({'service':_0x32dc2a[_0x5c61e9(0x1a2)]?.['service'],'version':_0x32dc2a['normalizedManifest']?.[_0x5c61e9(0x1c3)],'commandCount':_0x32dc2a['normalizedManifest']?.['commands'][_0x5c61e9(0x1cd)]??0x0,'errors':_0x32dc2a[_0x5c61e9(0x1c7)][_0x5c61e9(0x1d9)]})),'errors':_0x2591a8['report'][_0x5c61e9(0x1d9)],'commandCount':_0x2591a8['normalizedManifest']?.[_0x5c61e9(0x19a)][_0x5c61e9(0x1cd)]??0x0},'description':_0x5c61e9(0x1a7)};},async 'execute'(_0x23faea){const _0x1ae31a=a67_0x5b9f9b,_0x4a966a=importServiceManifest(_0x23faea[_0x1ae31a(0x1d5)](_0x1ae31a(0x1bf)));if(_0x4a966a[_0x1ae31a(0x1e2)][_0x1ae31a(0x1cd)]!==0x1)return{'ok':!![],'data':{'registryPath':_0x4a966a['registryPath'],'imported':_0x4a966a[_0x1ae31a(0x1c8)],'updated':_0x4a966a[_0x1ae31a(0x1b2)],'serviceCount':_0x4a966a[_0x1ae31a(0x1c6)],'services':_0x4a966a['entries'][_0x1ae31a(0x1c2)](summarizeService)},'message':'Imported\x20'+_0x4a966a['imported']+'\x20service(s),\x20updated\x20'+_0x4a966a[_0x1ae31a(0x1b2)]+'\x20service(s).'};return{'ok':!![],'data':{'registryPath':_0x4a966a[_0x1ae31a(0x1e3)],'replaced':_0x4a966a[_0x1ae31a(0x1ba)],'imported':_0x4a966a['imported'],'updated':_0x4a966a[_0x1ae31a(0x1b2)],'serviceCount':_0x4a966a[_0x1ae31a(0x1c6)],'service':summarizeService(_0x4a966a[_0x1ae31a(0x1b5)])},'message':(_0x4a966a['replaced']?_0x1ae31a(0x1d2):_0x1ae31a(0x1d7))+'\x20service\x20'+_0x4a966a[_0x1ae31a(0x1b5)][_0x1ae31a(0x1e5)]+'.'};}},{'service':a67_0x5b9f9b(0x1df),'command':'export','description':a67_0x5b9f9b(0x1a8),'risk':a67_0x5b9f9b(0x1b1),'confirmationDescription':a67_0x5b9f9b(0x1e1),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG,FILE_FLAG],async 'dryRun'(_0x305284){const _0x3646fc=a67_0x5b9f9b,_0x446a64=getLocalServiceEntry(_0x305284['str'](_0x3646fc(0x1df)));return{'method':_0x3646fc(0x1a6),'url':_0x305284['str']('file'),'body':{'service':_0x305284['str'](_0x3646fc(0x1df)),'found':Boolean(_0x446a64),'version':_0x446a64?.[_0x3646fc(0x1c3)],'source':_0x446a64?.[_0x3646fc(0x19f)]},'description':_0x3646fc(0x1be)};},async 'execute'(_0x12a5f0){const _0x1e2592=a67_0x5b9f9b,_0x4499dd=exportServiceManifest(_0x12a5f0['str'](_0x1e2592(0x1df)),_0x12a5f0[_0x1e2592(0x1d5)]('file'));return{'ok':!![],'data':{'registryPath':_0x4499dd[_0x1e2592(0x1e3)],'file':_0x4499dd[_0x1e2592(0x1dd)],'service':summarizeService(_0x4499dd[_0x1e2592(0x1b5)])},'message':_0x1e2592(0x19d)+_0x4499dd[_0x1e2592(0x1b5)][_0x1e2592(0x1e5)]+'.'};}},{'service':a67_0x5b9f9b(0x1df),'command':a67_0x5b9f9b(0x1c4),'description':a67_0x5b9f9b(0x1ad),'risk':a67_0x5b9f9b(0x1cc),'requiresAuth':![],'requiresAppCode':![],'flags':[],async 'execute'(){const _0x5c4dba=listLocalServices();return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'total':_0x5c4dba['length'],'services':_0x5c4dba['map'](summarizeService)}};}},{'service':a67_0x5b9f9b(0x1df),'command':'remove','description':a67_0x5b9f9b(0x1a9),'risk':'write','confirmationDescription':a67_0x5b9f9b(0x1b4),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'dryRun'(_0x4ecb3d){const _0x16f069=a67_0x5b9f9b,_0x10ce77=getLocalServiceEntry(_0x4ecb3d[_0x16f069(0x1d5)](_0x16f069(0x1df)));return{'method':_0x16f069(0x1a6),'url':getServiceRegistryPath(),'body':{'service':_0x4ecb3d['str'](_0x16f069(0x1df)),'found':Boolean(_0x10ce77),'version':_0x10ce77?.['version'],'source':_0x10ce77?.[_0x16f069(0x19f)]},'description':_0x16f069(0x1d3)};},async 'execute'(_0x2494a1){const _0x5c45e8=a67_0x5b9f9b,_0x3d69dc=removeServiceManifest(_0x2494a1[_0x5c45e8(0x1d5)]('service'));return{'ok':!![],'data':{'registryPath':_0x3d69dc['registryPath'],'serviceCount':_0x3d69dc[_0x5c45e8(0x1c6)],'service':summarizeService(_0x3d69dc[_0x5c45e8(0x1b5)])},'message':_0x5c45e8(0x1d0)+_0x3d69dc[_0x5c45e8(0x1b5)]['serviceCode']+'.'};}},{'service':a67_0x5b9f9b(0x1df),'command':a67_0x5b9f9b(0x1a4),'description':'Show\x20a\x20locally\x20imported\x20Service\x20Tree\x20manifest','risk':a67_0x5b9f9b(0x1cc),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'execute'(_0x3d2716){const _0x157d00=a67_0x5b9f9b,_0x255355=getLocalServiceEntry(_0x3d2716[_0x157d00(0x1d5)](_0x157d00(0x1df)));if(!_0x255355)return{'ok':![],'data':{'registryPath':getServiceRegistryPath(),'service':_0x3d2716[_0x157d00(0x1d5)](_0x157d00(0x1df))},'message':_0x157d00(0x1e0)+_0x3d2716[_0x157d00(0x1d5)](_0x157d00(0x1df))};return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'service':summarizeService(_0x255355),'manifest':_0x255355[_0x157d00(0x1d4)],'normalizedManifest':toPublicNormalizedServiceTree(_0x255355[_0x157d00(0x1a2)])}};}}];
|
|
1
|
+
const a67_0x3148e4=a67_0x5abd;(function(_0x175d87,_0x123cd6){const _0x50b279=a67_0x5abd,_0x3d7c05=_0x175d87();while(!![]){try{const _0x46fa1d=parseInt(_0x50b279(0xb7))/0x1+parseInt(_0x50b279(0x7f))/0x2+parseInt(_0x50b279(0x93))/0x3*(parseInt(_0x50b279(0xb3))/0x4)+parseInt(_0x50b279(0x8e))/0x5*(-parseInt(_0x50b279(0xaa))/0x6)+parseInt(_0x50b279(0x82))/0x7+parseInt(_0x50b279(0x8a))/0x8+-parseInt(_0x50b279(0xb0))/0x9;if(_0x46fa1d===_0x123cd6)break;else _0x3d7c05['push'](_0x3d7c05['shift']());}catch(_0x36132d){_0x3d7c05['push'](_0x3d7c05['shift']());}}}(a67_0x2f5a,0x7f1d9));function a67_0x5abd(_0x439b4d,_0x1bda59){_0x439b4d=_0x439b4d-0x72;const _0x2f5aec=a67_0x2f5a();let _0x5abd13=_0x2f5aec[_0x439b4d];return _0x5abd13;}import{exportServiceManifest,formatValidationFailure,getLocalServiceEntry,getServiceRegistryPath,importServiceManifest,listLocalServices,loadServiceManifestFromFile,removeServiceManifest}from'../../commands/service/registry.js';import{toPublicNormalizedServiceTree,toPublicServiceTreeTarget}from'../../commands/service/function-name-adapter.js';const FILE_FLAG={'name':'file','type':a67_0x3148e4(0xaf),'required':!![],'description':a67_0x3148e4(0xac)},SERVICE_FLAG={'name':a67_0x3148e4(0xb5),'type':a67_0x3148e4(0xaf),'required':!![],'description':'Local\x20service\x20code,\x20for\x20example\x20crm','pattern':{'regex':/^[a-z][a-z0-9-]*$/,'description':a67_0x3148e4(0x83)}};function summarizeService(_0x17f1f1){const _0x36be0a=a67_0x3148e4;return{'serviceCode':_0x17f1f1['serviceCode'],'name':_0x17f1f1[_0x36be0a(0x9e)][_0x36be0a(0xb5)][_0x36be0a(0xa0)],'version':_0x17f1f1[_0x36be0a(0x7c)],'importedAt':_0x17f1f1[_0x36be0a(0xa5)],'source':_0x17f1f1[_0x36be0a(0xb6)],'commandCount':_0x17f1f1[_0x36be0a(0x9e)][_0x36be0a(0x9c)]['length'],'commands':_0x17f1f1[_0x36be0a(0x9e)]['commands'][_0x36be0a(0x77)](_0x2a9900=>({'path':_0x2a9900[_0x36be0a(0xb2)],'description':_0x2a9900[_0x36be0a(0x99)],'risk':_0x2a9900['risk'],'target':toPublicServiceTreeTarget(_0x2a9900['target']),'flags':_0x2a9900[_0x36be0a(0x7b)][_0x36be0a(0x77)](_0x173403=>({'name':_0x173403[_0x36be0a(0xa0)],'cliName':_0x173403['cliName'],'type':_0x173403[_0x36be0a(0xb1)],'required':_0x173403[_0x36be0a(0x87)]===!![]}))}))};}function a67_0x2f5a(){const _0x4920bf=['detail','commands','updated','normalizedManifest','import','name','Updated','read','report','write','importedAt','\x20service\x20','errors','str','serviceCount','6QGDLfK','filePath','Service\x20Tree\x20manifest\x20file\x20path','Imported\x20','replaced','string','319446UWvHkd','type','cliPath','19540ZtbbUy','file','service','source','58401TOaUkr','manifests','Exported\x20service\x20','imported','length','kind','list','Preview\x20Service\x20Tree\x20import\x20into\x20~/.lovrabet/service.json','map','Preview\x20Service\x20Tree\x20export\x20from\x20~/.lovrabet/service.json','Imported','Preview\x20Service\x20Tree\x20removal\x20from\x20~/.lovrabet/service.json','flags','version','registryIndex','Reads\x20the\x20given\x20manifest\x20into\x20the\x20local\x20Service\x20Tree\x20registry.\x20An\x20existing\x20manifest\x20with\x20the\x20same\x20service\x20code\x20is\x20updated.\x20The\x20confirmation\x20UI\x20does\x20not\x20show\x20local\x20file\x20paths.','273678AunfUF','Validate\x20a\x20Service\x20Tree\x20JSON\x20manifest','Export\x20the\x20local\x20Service\x20Tree\x20manifest\x20to\x20a\x20JSON\x20file','843493LrYiGm','lower\x20kebab-case\x20service\x20code','Show\x20a\x20locally\x20imported\x20Service\x20Tree\x20manifest','registryServiceCode','serviceCode','required','WRITE','validate','5562584Eeovqy','registryPath','\x20service(s),\x20updated\x20','manifest','4692590uqgdnL','entry','warnings','target','List\x20locally\x20imported\x20Service\x20Tree\x20manifests','297QbILQd','Removes\x20the\x20given\x20service\x20manifest\x20from\x20the\x20local\x20Service\x20Tree\x20registry.\x20Dynamic\x20commands\x20from\x20that\x20manifest\x20will\x20no\x20longer\x20be\x20available.','Removed\x20service\x20','registry','Local\x20service\x20not\x20found:\x20','export','description','hash'];a67_0x2f5a=function(){return _0x4920bf;};return a67_0x2f5a();}function summarizeLoadedManifest(_0x10fbe7){const _0x44e443=a67_0x3148e4;return{'service':_0x10fbe7[_0x44e443(0x9e)]?.['service'],'version':_0x10fbe7['normalizedManifest']?.[_0x44e443(0x7c)],'commandCount':_0x10fbe7[_0x44e443(0x9e)]?.[_0x44e443(0x9c)][_0x44e443(0x73)]??0x0,'commands':_0x10fbe7[_0x44e443(0x9e)]?.[_0x44e443(0x9c)]['map'](_0x3f99b6=>({'path':_0x3f99b6[_0x44e443(0xb2)],'risk':_0x3f99b6['risk'],'target':toPublicServiceTreeTarget(_0x3f99b6[_0x44e443(0x91)])}))??[],'registryIndex':_0x10fbe7[_0x44e443(0x7d)],'registryServiceCode':_0x10fbe7[_0x44e443(0x85)],'errors':_0x10fbe7['report'][_0x44e443(0xa7)],'warnings':_0x10fbe7['report'][_0x44e443(0x90)]};}export const serviceDefinitions=[{'service':a67_0x3148e4(0xb5),'command':a67_0x3148e4(0x89),'description':a67_0x3148e4(0x80),'risk':a67_0x3148e4(0xa2),'requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'execute'(_0x113708){const _0x54a8d6=a67_0x3148e4,_0x21e707=loadServiceManifestFromFile(_0x113708[_0x54a8d6(0xa8)](_0x54a8d6(0xb4)));if(!_0x21e707[_0x54a8d6(0xa3)]['ok'])return{'ok':![],'data':{'file':_0x21e707[_0x54a8d6(0xab)],'hash':_0x21e707[_0x54a8d6(0x9a)],'kind':_0x21e707[_0x54a8d6(0x74)],'serviceCount':_0x21e707['manifests']['length'],'services':_0x21e707[_0x54a8d6(0xb8)]['map'](summarizeLoadedManifest),'errors':_0x21e707['report'][_0x54a8d6(0xa7)],'warnings':_0x21e707[_0x54a8d6(0xa3)]['warnings']},'message':formatValidationFailure(_0x21e707[_0x54a8d6(0xa3)])};if(_0x21e707[_0x54a8d6(0x74)]===_0x54a8d6(0x96)||_0x21e707['manifests'][_0x54a8d6(0x73)]!==0x1)return{'ok':!![],'data':{'file':_0x21e707[_0x54a8d6(0xab)],'hash':_0x21e707[_0x54a8d6(0x9a)],'kind':_0x21e707[_0x54a8d6(0x74)],'serviceCount':_0x21e707['manifests'][_0x54a8d6(0x73)],'commandCount':_0x21e707[_0x54a8d6(0xb8)]['reduce']((_0x2a7f0f,_0x1625b8)=>_0x2a7f0f+(_0x1625b8['normalizedManifest']?.[_0x54a8d6(0x9c)][_0x54a8d6(0x73)]??0x0),0x0),'services':_0x21e707[_0x54a8d6(0xb8)][_0x54a8d6(0x77)](summarizeLoadedManifest),'warnings':_0x21e707[_0x54a8d6(0xa3)]['warnings']},'message':'Service\x20registry\x20validation\x20passed.'};return{'ok':!![],'data':{'file':_0x21e707[_0x54a8d6(0xab)],'hash':_0x21e707[_0x54a8d6(0x9a)],'kind':_0x21e707[_0x54a8d6(0x74)],'service':_0x21e707[_0x54a8d6(0x9e)]?.[_0x54a8d6(0xb5)],'version':_0x21e707[_0x54a8d6(0x9e)]?.[_0x54a8d6(0x7c)],'commandCount':_0x21e707[_0x54a8d6(0x9e)]?.[_0x54a8d6(0x9c)][_0x54a8d6(0x73)]??0x0,'commands':_0x21e707[_0x54a8d6(0x9e)]?.[_0x54a8d6(0x9c)][_0x54a8d6(0x77)](_0x2b5d27=>({'path':_0x2b5d27[_0x54a8d6(0xb2)],'risk':_0x2b5d27['risk'],'target':toPublicServiceTreeTarget(_0x2b5d27['target'])})),'warnings':_0x21e707['report'][_0x54a8d6(0x90)]},'message':'Service\x20manifest\x20validation\x20passed.'};}},{'service':a67_0x3148e4(0xb5),'command':a67_0x3148e4(0x9f),'description':'Import\x20a\x20Service\x20Tree\x20manifest\x20into\x20the\x20local\x20runtime\x20registry','risk':a67_0x3148e4(0xa4),'confirmationDescription':a67_0x3148e4(0x7e),'requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'dryRun'(_0x30402d){const _0x112274=a67_0x3148e4,_0x4ff910=loadServiceManifestFromFile(_0x30402d[_0x112274(0xa8)](_0x112274(0xb4)));return{'method':'WRITE','url':getServiceRegistryPath(),'body':{'file':_0x4ff910['filePath'],'hash':_0x4ff910[_0x112274(0x9a)],'kind':_0x4ff910[_0x112274(0x74)],'ok':_0x4ff910[_0x112274(0xa3)]['ok'],'service':_0x4ff910[_0x112274(0x9e)]?.[_0x112274(0xb5)],'version':_0x4ff910['normalizedManifest']?.[_0x112274(0x7c)],'serviceCount':_0x4ff910['manifests']['length'],'services':_0x4ff910['manifests']['map'](_0x84eda0=>({'service':_0x84eda0[_0x112274(0x9e)]?.[_0x112274(0xb5)],'version':_0x84eda0[_0x112274(0x9e)]?.['version'],'commandCount':_0x84eda0[_0x112274(0x9e)]?.[_0x112274(0x9c)][_0x112274(0x73)]??0x0,'errors':_0x84eda0[_0x112274(0xa3)]['errors']})),'errors':_0x4ff910[_0x112274(0xa3)][_0x112274(0xa7)],'commandCount':_0x4ff910['normalizedManifest']?.[_0x112274(0x9c)][_0x112274(0x73)]??0x0},'description':_0x112274(0x76)};},async 'execute'(_0x3380cf){const _0x568e48=a67_0x3148e4,_0x4e84bc=importServiceManifest(_0x3380cf[_0x568e48(0xa8)](_0x568e48(0xb4)));if(_0x4e84bc['entries']['length']!==0x1)return{'ok':!![],'data':{'registryPath':_0x4e84bc[_0x568e48(0x8b)],'imported':_0x4e84bc[_0x568e48(0x72)],'updated':_0x4e84bc['updated'],'serviceCount':_0x4e84bc[_0x568e48(0xa9)],'services':_0x4e84bc['entries'][_0x568e48(0x77)](summarizeService)},'message':_0x568e48(0xad)+_0x4e84bc[_0x568e48(0x72)]+_0x568e48(0x8c)+_0x4e84bc[_0x568e48(0x9d)]+'\x20service(s).'};return{'ok':!![],'data':{'registryPath':_0x4e84bc[_0x568e48(0x8b)],'replaced':_0x4e84bc[_0x568e48(0xae)],'imported':_0x4e84bc[_0x568e48(0x72)],'updated':_0x4e84bc['updated'],'serviceCount':_0x4e84bc[_0x568e48(0xa9)],'service':summarizeService(_0x4e84bc[_0x568e48(0x8f)])},'message':(_0x4e84bc[_0x568e48(0xae)]?_0x568e48(0xa1):_0x568e48(0x79))+_0x568e48(0xa6)+_0x4e84bc[_0x568e48(0x8f)][_0x568e48(0x86)]+'.'};}},{'service':a67_0x3148e4(0xb5),'command':a67_0x3148e4(0x98),'description':a67_0x3148e4(0x81),'risk':a67_0x3148e4(0xa4),'confirmationDescription':'Writes\x20the\x20local\x20Service\x20Tree\x20manifest\x20for\x20the\x20given\x20service\x20to\x20a\x20JSON\x20file.\x20An\x20existing\x20file\x20at\x20the\x20target\x20may\x20be\x20overwritten.\x20The\x20confirmation\x20UI\x20does\x20not\x20show\x20local\x20file\x20paths.','requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG,FILE_FLAG],async 'dryRun'(_0x15c1f1){const _0x6dd704=a67_0x3148e4,_0x256c7e=getLocalServiceEntry(_0x15c1f1['str'](_0x6dd704(0xb5)));return{'method':_0x6dd704(0x88),'url':_0x15c1f1[_0x6dd704(0xa8)](_0x6dd704(0xb4)),'body':{'service':_0x15c1f1[_0x6dd704(0xa8)]('service'),'found':Boolean(_0x256c7e),'version':_0x256c7e?.[_0x6dd704(0x7c)],'source':_0x256c7e?.[_0x6dd704(0xb6)]},'description':_0x6dd704(0x78)};},async 'execute'(_0x4e71e1){const _0x15e8b2=a67_0x3148e4,_0x17c52d=exportServiceManifest(_0x4e71e1[_0x15e8b2(0xa8)](_0x15e8b2(0xb5)),_0x4e71e1['str']('file'));return{'ok':!![],'data':{'registryPath':_0x17c52d[_0x15e8b2(0x8b)],'file':_0x17c52d['filePath'],'service':summarizeService(_0x17c52d[_0x15e8b2(0x8f)])},'message':_0x15e8b2(0xb9)+_0x17c52d[_0x15e8b2(0x8f)][_0x15e8b2(0x86)]+'.'};}},{'service':'service','command':a67_0x3148e4(0x75),'description':a67_0x3148e4(0x92),'risk':a67_0x3148e4(0xa2),'requiresAuth':![],'requiresAppCode':![],'flags':[],async 'execute'(){const _0x30e53f=a67_0x3148e4,_0x5e6dd5=listLocalServices();return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'total':_0x5e6dd5['length'],'services':_0x5e6dd5[_0x30e53f(0x77)](summarizeService)}};}},{'service':a67_0x3148e4(0xb5),'command':'remove','description':'Remove\x20a\x20Service\x20Tree\x20manifest\x20from\x20the\x20local\x20runtime\x20registry','risk':a67_0x3148e4(0xa4),'confirmationDescription':a67_0x3148e4(0x94),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'dryRun'(_0x15e3cb){const _0x4578f9=a67_0x3148e4,_0x43851b=getLocalServiceEntry(_0x15e3cb[_0x4578f9(0xa8)](_0x4578f9(0xb5)));return{'method':'WRITE','url':getServiceRegistryPath(),'body':{'service':_0x15e3cb[_0x4578f9(0xa8)](_0x4578f9(0xb5)),'found':Boolean(_0x43851b),'version':_0x43851b?.['version'],'source':_0x43851b?.[_0x4578f9(0xb6)]},'description':_0x4578f9(0x7a)};},async 'execute'(_0x370a39){const _0x141f5a=a67_0x3148e4,_0x316bad=removeServiceManifest(_0x370a39[_0x141f5a(0xa8)]('service'));return{'ok':!![],'data':{'registryPath':_0x316bad[_0x141f5a(0x8b)],'serviceCount':_0x316bad[_0x141f5a(0xa9)],'service':summarizeService(_0x316bad[_0x141f5a(0x8f)])},'message':_0x141f5a(0x95)+_0x316bad[_0x141f5a(0x8f)][_0x141f5a(0x86)]+'.'};}},{'service':'service','command':a67_0x3148e4(0x9b),'description':a67_0x3148e4(0x84),'risk':a67_0x3148e4(0xa2),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'execute'(_0x236a16){const _0x243c9f=a67_0x3148e4,_0x1d0642=getLocalServiceEntry(_0x236a16[_0x243c9f(0xa8)](_0x243c9f(0xb5)));if(!_0x1d0642)return{'ok':![],'data':{'registryPath':getServiceRegistryPath(),'service':_0x236a16[_0x243c9f(0xa8)](_0x243c9f(0xb5))},'message':_0x243c9f(0x97)+_0x236a16[_0x243c9f(0xa8)](_0x243c9f(0xb5))};return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'service':summarizeService(_0x1d0642),'manifest':_0x1d0642[_0x243c9f(0x8d)],'normalizedManifest':toPublicNormalizedServiceTree(_0x1d0642[_0x243c9f(0x9e)])}};}}];
|