@lovrabet/lovrabet-cli 2.3.10-beta.2 → 2.3.10
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.d.ts +1 -3
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.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.d.ts +4 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.d.ts +2 -2
- 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 +1 -1
- package/skills/lovrabet/references/lovrabet-config-commands.md +17 -33
- package/skills/lovrabet/references/lovrabet-config.md +11 -3
- package/skills/lovrabet/references/lovrabet-doctor.md +1 -1
- package/skills/lovrabet/references/lovrabet-kb-workflow.md +4 -4
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a54_0xb90701=a54_0xc040;(function(_0x152d4f,_0x2a5b53){const _0x53847c=a54_0xc040,_0x3809a7=_0x152d4f();while(!![]){try{const _0x121a35=-parseInt(_0x53847c(0x1a5))/0x1*(-parseInt(_0x53847c(0x194))/0x2)+parseInt(_0x53847c(0x1ac))/0x3*(parseInt(_0x53847c(0x1a2))/0x4)+-parseInt(_0x53847c(0x199))/0x5*(-parseInt(_0x53847c(0x1b0))/0x6)+-parseInt(_0x53847c(0x19b))/0x7+parseInt(_0x53847c(0x19d))/0x8+parseInt(_0x53847c(0x1a3))/0x9*(-parseInt(_0x53847c(0x1b1))/0xa)+-parseInt(_0x53847c(0x19e))/0xb*(parseInt(_0x53847c(0x1a1))/0xc);if(_0x121a35===_0x2a5b53)break;else _0x3809a7['push'](_0x3809a7['shift']());}catch(_0x355b3a){_0x3809a7['push'](_0x3809a7['shift']());}}}(a54_0x1d3b,0x3d2a3));import{createRuntimeAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';function a54_0xc040(_0x90289a,_0x1737ce){_0x90289a=_0x90289a-0x194;const _0x1d3b40=a54_0x1d3b();let _0xc04057=_0x1d3b40[_0x90289a];return _0xc04057;}function a54_0x1d3b(){const _0x34386a=['build','2361254BThYOF','Creates\x20a\x20custom\x20role\x20in\x20the\x20current\x20runtime\x20app.\x20After\x20creation\x20it\x20can\x20be\x20used\x20for\x20member\x20and\x20resource\x20permissions.','2158896ZhCise','451vsuTEz','remark','/client/permit/role/create','179964VxzXCx','4XDepGn','9vFsApZ','validation','15paBOVF','str','--name\x20must\x20not\x20be\x20blank.','high-risk-write','role','string','POST','1320663QtgFgn','create','Optional\x20role\x20remark','description','318kyozZo','2215810ZMnhcu','trim','30846zcvEli','body','Preview:\x20create\x20a\x20runtime\x20CUSTOM\x20role','name','Create\x20a\x20runtime\x20CUSTOM\x20role','45555WImaQv'];a54_0x1d3b=function(){return _0x34386a;};return a54_0x1d3b();}import{projectRuntimeRole,readOptionalRuntimeRoleCode,ROLE_CODE_FLAG,runtimeRoleWriteResult}from'../../commands/role/shared.js';function input(_0xe30757){const _0x5554bb=a54_0xc040,_0x32b82d=_0xe30757[_0x5554bb(0x1a6)]('name')[_0x5554bb(0x1b2)]();if(!_0x32b82d)throw CliErrors[_0x5554bb(0x1a4)](_0x5554bb(0x1a7));const _0x355bac=_0xe30757['str'](_0x5554bb(0x19f))[_0x5554bb(0x1b2)](),_0x4cc4f2=readOptionalRuntimeRoleCode(_0xe30757);return{'appCode':_0xe30757['appCode'],'roleName':_0x32b82d,..._0x4cc4f2?{'roleCode':_0x4cc4f2}:{},..._0x355bac?{'remark':_0x355bac}:{}};}export const roleCreate={'service':a54_0xb90701(0x1a9),'command':a54_0xb90701(0x1ad),'description':a54_0xb90701(0x198),'risk':a54_0xb90701(0x1a8),'confirmationDescription':a54_0xb90701(0x19c),'flags':[{'name':a54_0xb90701(0x197),'type':a54_0xb90701(0x1aa),'required':!![],'description':'Role\x20name'},ROLE_CODE_FLAG,{'name':a54_0xb90701(0x19f),'type':a54_0xb90701(0x1aa),'description':a54_0xb90701(0x1ae)}],async 'validate'(_0x5a9f94){input(_0x5a9f94);},async 'dryRun'(_0x481a0b){const _0x575509=a54_0xb90701;return dryRun(_0x575509(0x1ab),_0x575509(0x1a0))[_0x575509(0x195)]({'roleType':'CUSTOM',...input(_0x481a0b)})[_0x575509(0x1af)](_0x575509(0x196))[_0x575509(0x19a)]();},async 'execute'(_0xbde6fd){const _0x5cfb98=a54_0xb90701,_0x5c63f0=await createRuntimeAppRole(input(_0xbde6fd));return{'ok':!![],'data':runtimeRoleWriteResult(_0x5cfb98(0x1ad),{'roleId':_0x5c63f0['id']},null,projectRuntimeRole(_0x5c63f0),{'method':_0x5cfb98(0x1ab),'path':'/client/permit/role/create'})};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a55_0x50a1eb=a55_0x5abd;(function(_0xf93cfb,_0x8bdd49){const _0x5a8371=a55_0x5abd,_0x5af040=_0xf93cfb();while(!![]){try{const _0x273b09=-parseInt(_0x5a8371(0x1d3))/0x1*(-parseInt(_0x5a8371(0x1c2))/0x2)+-parseInt(_0x5a8371(0x1ca))/0x3*(-parseInt(_0x5a8371(0x1c1))/0x4)+parseInt(_0x5a8371(0x1ce))/0x5+parseInt(_0x5a8371(0x1cf))/0x6*(-parseInt(_0x5a8371(0x1c4))/0x7)+-parseInt(_0x5a8371(0x1bf))/0x8+-parseInt(_0x5a8371(0x1c3))/0x9*(-parseInt(_0x5a8371(0x1cb))/0xa)+-parseInt(_0x5a8371(0x1c6))/0xb;if(_0x273b09===_0x8bdd49)break;else _0x5af040['push'](_0x5af040['shift']());}catch(_0x61ea9d){_0x5af040['push'](_0x5af040['shift']());}}}(a55_0x8543,0xcb411));function a55_0x5abd(_0x179d12,_0x3081af){_0x179d12=_0x179d12-0x1bf;const _0x8543b4=a55_0x8543();let _0x5abd9d=_0x8543b4[_0x179d12];return _0x5abd9d;}import{deleteRuntimeAppRole}from'../../core/api-client.js';import{dryRun}from'../../framework/dryrun.js';function a55_0x8543(){const _0x40e91a=['/client/permit/role/delete','delete','POST','3TXagyg','1855570BSZetz','body','num','5028970tsjEyt','6lkFFZc','appCode','Preview:\x20delete\x20a\x20runtime\x20CUSTOM\x20role','build','1aQgkdP','8919240TegGkU','high-risk-write','4396372LhjPQr','3021704fbRTDy','18sDHbyh','10328696bhSuJH','description','6202801xSmekZ'];a55_0x8543=function(){return _0x40e91a;};return a55_0x8543();}import{assertCustomRuntimeRole,getRuntimeRoleById,projectRuntimeRole,ROLE_ID_FLAG,runtimeRoleWriteResult}from'../../commands/role/shared.js';async function prepare(_0x4854e0){const _0x32ac99=a55_0x5abd,_0x2c7303=await getRuntimeRoleById(_0x4854e0[_0x32ac99(0x1d0)],_0x4854e0[_0x32ac99(0x1cd)]('id'));return assertCustomRuntimeRole(_0x2c7303,_0x32ac99(0x1c8)),_0x2c7303;}export const roleDelete={'service':'role','command':'delete','description':'Delete\x20a\x20runtime\x20CUSTOM\x20role','risk':a55_0x50a1eb(0x1c0),'confirmationDescription':'Deletes\x20the\x20custom\x20role\x20in\x20the\x20current\x20runtime\x20app.\x20Membership\x20and\x20permission\x20config\x20for\x20that\x20role\x20may\x20become\x20invalid.','flags':[ROLE_ID_FLAG],async 'dryRun'(_0x16e963){const _0x2e85fc=a55_0x50a1eb,_0x296ec9=await prepare(_0x16e963);return dryRun('POST','/client/permit/role/delete')[_0x2e85fc(0x1cc)]({'id':_0x296ec9['id']})[_0x2e85fc(0x1c5)](_0x2e85fc(0x1d1))[_0x2e85fc(0x1d2)]();},async 'execute'(_0x4135f3){const _0x5ef95a=a55_0x50a1eb,_0xedf8c8=await prepare(_0x4135f3);return await deleteRuntimeAppRole(_0xedf8c8['id']),{'ok':!![],'data':runtimeRoleWriteResult(_0x5ef95a(0x1c8),{'roleId':_0xedf8c8['id']},projectRuntimeRole(_0xedf8c8),null,{'method':_0x5ef95a(0x1c9),'path':_0x5ef95a(0x1c7)})};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a56_0x32fb(){const _0x3f6a02=['37890qoKXGr','33636tzZUQn','656117CEPjBe','69303fHbbeJ','detail','892683CZOZEQ','8tbXkgM','runtime','16Xnbqjf','role','Show\x20one\x20runtime\x20role\x20by\x20ID','24CTOhjW','587510KhwvJR','15ScwArH','read','3405864Tpfrng'];a56_0x32fb=function(){return _0x3f6a02;};return a56_0x32fb();}const a56_0x3f7879=a56_0x481c;(function(_0x169734,_0x442026){const _0x397407=a56_0x481c,_0x2ea407=_0x169734();while(!![]){try{const _0xd0032f=-parseInt(_0x397407(0xdf))/0x1*(-parseInt(_0x397407(0xe2))/0x2)+-parseInt(_0x397407(0xd7))/0x3*(parseInt(_0x397407(0xdd))/0x4)+-parseInt(_0x397407(0xd9))/0x5*(parseInt(_0x397407(0xdc))/0x6)+-parseInt(_0x397407(0xde))/0x7+-parseInt(_0x397407(0xd4))/0x8*(parseInt(_0x397407(0xe1))/0x9)+-parseInt(_0x397407(0xd8))/0xa+parseInt(_0x397407(0xdb))/0xb;if(_0xd0032f===_0x442026)break;else _0x2ea407['push'](_0x2ea407['shift']());}catch(_0x59dc02){_0x2ea407['push'](_0x2ea407['shift']());}}}(a56_0x32fb,0x24903));function a56_0x481c(_0x24a02c,_0xacf375){_0x24a02c=_0x24a02c-0xd3;const _0x32fbdf=a56_0x32fb();let _0x481c53=_0x32fbdf[_0x24a02c];return _0x481c53;}import{getRuntimeRoleById,projectRuntimeRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';export const roleDetail={'service':a56_0x3f7879(0xd5),'command':a56_0x3f7879(0xe0),'description':a56_0x3f7879(0xd6),'risk':a56_0x3f7879(0xda),'flags':[ROLE_ID_FLAG],async 'execute'(_0x1054cd){const _0x5eeac7=a56_0x3f7879,_0x52a8fb=await getRuntimeRoleById(_0x1054cd['appCode'],_0x1054cd['num']('id'));return{'ok':!![],'data':{'scope':_0x5eeac7(0xd3),'role':projectRuntimeRole(_0x52a8fb)}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4a2795,_0x43ab3c){const _0x5d2fd7=a57_0x481e,_0x2d6ceb=_0x4a2795();while(!![]){try{const _0x502a30=parseInt(_0x5d2fd7(0x9c))/0x1*(parseInt(_0x5d2fd7(0x99))/0x2)+-parseInt(_0x5d2fd7(0x9d))/0x3+parseInt(_0x5d2fd7(0x9b))/0x4*(-parseInt(_0x5d2fd7(0x98))/0x5)+-parseInt(_0x5d2fd7(0x9a))/0x6*(parseInt(_0x5d2fd7(0x9f))/0x7)+parseInt(_0x5d2fd7(0xa1))/0x8*(-parseInt(_0x5d2fd7(0xa0))/0x9)+parseInt(_0x5d2fd7(0x9e))/0xa+-parseInt(_0x5d2fd7(0x97))/0xb*(-parseInt(_0x5d2fd7(0xa2))/0xc);if(_0x502a30===_0x43ab3c)break;else _0x2d6ceb['push'](_0x2d6ceb['shift']());}catch(_0x56df0e){_0x2d6ceb['push'](_0x2d6ceb['shift']());}}}(a57_0x591f,0x4e4e9));import{roleList}from'../../commands/role/list.js';function a57_0x481e(_0x2c1f8a,_0x59caae){_0x2c1f8a=_0x2c1f8a-0x97;const _0x591fca=a57_0x591f();let _0x481e44=_0x591fca[_0x2c1f8a];return _0x481e44;}import{roleDetail}from'../../commands/role/detail.js';import{roleCreate}from'../../commands/role/create.js';function a57_0x591f(){const _0x2ca59a=['198364POWPtQ','6CUecKp','8Lfaxnc','3scKHYD','189951KBJhfv','3372330xDlUjO','3771761ljWWeN','5532039ONSHNj','8EWbPpi','132OZqCgx','1282699AKWrZL','949805AaGqMH'];a57_0x591f=function(){return _0x2ca59a;};return a57_0x591f();}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
|
-
const
|
|
1
|
+
function a58_0x26e4(_0x5de7fb,_0x3c84c1){_0x5de7fb=_0x5de7fb-0x6b;const _0x3e12c9=a58_0x3e12();let _0x26e4c9=_0x3e12c9[_0x5de7fb];return _0x26e4c9;}const a58_0x528795=a58_0x26e4;(function(_0x54aef8,_0x2bddd8){const _0x4cd7af=a58_0x26e4,_0x3d1bbe=_0x54aef8();while(!![]){try{const _0x546781=parseInt(_0x4cd7af(0x85))/0x1*(parseInt(_0x4cd7af(0x6d))/0x2)+parseInt(_0x4cd7af(0x7c))/0x3+-parseInt(_0x4cd7af(0x84))/0x4*(parseInt(_0x4cd7af(0x8c))/0x5)+parseInt(_0x4cd7af(0x6b))/0x6+parseInt(_0x4cd7af(0x7a))/0x7*(-parseInt(_0x4cd7af(0x8b))/0x8)+-parseInt(_0x4cd7af(0x88))/0x9*(-parseInt(_0x4cd7af(0x72))/0xa)+-parseInt(_0x4cd7af(0x70))/0xb*(parseInt(_0x4cd7af(0x71))/0xc);if(_0x546781===_0x2bddd8)break;else _0x3d1bbe['push'](_0x3d1bbe['shift']());}catch(_0xc5d578){_0x3d1bbe['push'](_0x3d1bbe['shift']());}}}(a58_0x3e12,0xa2fe4));function a58_0x3e12(){const _0xb87317=['num','2033709fgPFVO','slice','page','list','runtime','str','appCode','includes','40040clhcKQ','778006HxujaT','items','pagesize','9ZQhYSP','Invalid\x20runtime\x20role\x20type:\x20','type','638008WtwiAp','375vSTPsf','isSafeInteger','1455198gKyfPF','string','2DYtKNB','read','map','5445DufSAw','30468ORwIIB','12159860aOMKpq','paging','number','trim','roleType','name','validation','toUpperCase','21PAknXl'];a58_0x3e12=function(){return _0xb87317;};return a58_0x3e12();}import{listRuntimeAppRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{listAllRuntimeRoles,projectRuntimeRole,RUNTIME_ROLE_TYPES}from'../../commands/role/shared.js';export const roleList={'service':'role','command':a58_0x528795(0x7f),'description':'List\x20runtime\x20roles\x20for\x20the\x20current\x20app','risk':a58_0x528795(0x6e),'flags':[{'name':a58_0x528795(0x8a),'type':a58_0x528795(0x6c),'enum':RUNTIME_ROLE_TYPES,'description':'Runtime\x20role\x20type'},{'name':a58_0x528795(0x77),'type':'string','description':'Fuzzy\x20role-name\x20filter'},{'name':a58_0x528795(0x7e),'type':a58_0x528795(0x74),'default':0x1,'description':'Page\x20number'},{'name':a58_0x528795(0x87),'type':'number','default':0x64,'description':'Page\x20size\x20from\x201\x20to\x20100'}],async 'validate'(_0xa98446){const _0x3d651f=a58_0x528795,_0x48fcae=_0xa98446[_0x3d651f(0x81)](_0x3d651f(0x8a))[_0x3d651f(0x79)]();if(_0x48fcae&&!RUNTIME_ROLE_TYPES[_0x3d651f(0x83)](_0x48fcae))throw CliErrors['validation'](_0x3d651f(0x89)+_0x48fcae+'.');const _0x40fc8e=_0xa98446[_0x3d651f(0x7b)](_0x3d651f(0x7e),0x1),_0x4c034d=_0xa98446[_0x3d651f(0x7b)](_0x3d651f(0x87),0x64);if(!Number[_0x3d651f(0x8d)](_0x40fc8e)||_0x40fc8e<0x1)throw CliErrors[_0x3d651f(0x78)]('--page\x20must\x20be\x20a\x20positive\x20integer.');if(!Number['isSafeInteger'](_0x4c034d)||_0x4c034d<0x1||_0x4c034d>0x64)throw CliErrors[_0x3d651f(0x78)]('--pagesize\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.');},async 'execute'(_0x4b229c){const _0x91d395=a58_0x528795,_0x4d47b4=_0x4b229c[_0x91d395(0x81)]('type')['toUpperCase'](),_0x2dc243=_0x4b229c['str'](_0x91d395(0x77))[_0x91d395(0x75)](),_0x27d6a7=_0x4b229c[_0x91d395(0x7b)](_0x91d395(0x7e),0x1),_0x3593fb=_0x4b229c[_0x91d395(0x7b)](_0x91d395(0x87),0x64);if(_0x4d47b4){const _0x2027bd=(await listAllRuntimeRoles(_0x4b229c[_0x91d395(0x82)],{..._0x2dc243?{'roleName':_0x2dc243}:{}}))['filter'](_0x23bcb4=>_0x23bcb4[_0x91d395(0x76)]===_0x4d47b4),_0xce322d=(_0x27d6a7-0x1)*_0x3593fb;return{'ok':!![],'data':{'scope':'runtime','roles':_0x2027bd[_0x91d395(0x7d)](_0xce322d,_0xce322d+_0x3593fb)[_0x91d395(0x6f)](projectRuntimeRole),'paging':{'currentPage':_0x27d6a7,'pageSize':_0x3593fb,'totalCount':_0x2027bd['length']}}};}const _0x21c5b4=await listRuntimeAppRoles(_0x4b229c['appCode'],{..._0x2dc243?{'roleName':_0x2dc243}:{},'currentPage':_0x27d6a7,'pageSize':_0x3593fb});return{'ok':!![],'data':{'scope':_0x91d395(0x80),'roles':_0x21c5b4[_0x91d395(0x86)]['map'](projectRuntimeRole),'paging':_0x21c5b4[_0x91d395(0x73)]}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a59_0x9b7241=a59_0x2ed0;function a59_0x2ed0(_0x402c45,_0xc04387){_0x402c45=_0x402c45-0x1b7;const _0x480b43=a59_0x480b();let _0x2ed0f4=_0x480b43[_0x402c45];return _0x2ed0f4;}(function(_0x3c0e19,_0x1b2b04){const _0x208a2f=a59_0x2ed0,_0x1f99e5=_0x3c0e19();while(!![]){try{const _0x13be0f=-parseInt(_0x208a2f(0x1db))/0x1+parseInt(_0x208a2f(0x1e4))/0x2*(-parseInt(_0x208a2f(0x1f7))/0x3)+parseInt(_0x208a2f(0x1f6))/0x4+-parseInt(_0x208a2f(0x1f4))/0x5*(parseInt(_0x208a2f(0x1c3))/0x6)+parseInt(_0x208a2f(0x1e6))/0x7*(-parseInt(_0x208a2f(0x1c2))/0x8)+-parseInt(_0x208a2f(0x1ea))/0x9+parseInt(_0x208a2f(0x1eb))/0xa;if(_0x13be0f===_0x1b2b04)break;else _0x1f99e5['push'](_0x1f99e5['shift']());}catch(_0x50561f){_0x1f99e5['push'](_0x1f99e5['shift']());}}}(a59_0x480b,0x3f916));function a59_0x480b(){const _0x4f3e89=['number','filter','userCount','string','code','\x22\x20was\x20not\x20found\x20in\x20app\x20','length','Reload\x20the\x20role\x20list\x20and\x20retry\x20after\x20the\x20server\x20state\x20is\x20consistent.','runtime','validation','Pass\x20one\x20role\x20ID:\x20','ADMIN','CUSTOM','Runtime\x20role\x20ID\x20returned\x20by\x20role\x20list','flag','str','319304bEIiPf','Only\x20CUSTOM\x20runtime\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','permitCount','roleType','Runtime\x20role\x20has\x20an\x20invalid\x20ID;\x20reload\x20roles\x20before\x20writing.','Invalid\x20runtime\x20userId.','Runtime\x20role\x20member\x20count\x20changed:\x20expected\x20','num','Use\x20a\x20userId\x20returned\x20by\x20the\x20current\x20application\x27s\x20personnel\x20list.','2118sRIuwd','user','1598079uiCRCR','Runtime\x20role\x20member\x20snapshot\x20has\x20an\x20invalid\x20role\x20ID;\x20reload\x20before\x20writing.','Runtime\x20user\x20','remark','142452xkoHEv','13172950crKWib','items','Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name','Role\x20ID\x20must\x20be\x20a\x20positive\x20integer.','userId','\x22\x20is\x20ambiguous.','paging','Missing\x20runtime\x20role\x20reference.','Runtime\x20role\x20member\x20has\x20an\x20invalid\x20userId.','101045TXFXyI','appCode','90008iFvKYY','603sPIqja','role-code','push','--role-code\x20cannot\x20exceed\x2064\x20characters.','isSafeInteger','expect-user-count','userName','Cannot\x20','\x20was\x20not\x20found\x20in\x20app\x20','Runtime\x20role\x20name\x20\x22','trim','applyUserList','OWNER\x20runtime\x20role\x20membership\x20cannot\x20be\x20changed\x20with\x20this\x20command.','totalCount','roleCode','USER','role','map','\x20built-in\x20runtime\x20role\x20','Globally\x20unique\x20roleCode\x20(maximum\x2064\x20characters)','--role-code\x20must\x20not\x20be\x20blank.','join','userList','Runtime\x20role\x20id\x20','\x20is\x20missing\x20from\x20the\x20grouped\x20member\x20snapshot.','8mXXDOU','90CcVyiF','\x20is\x20already\x20in\x20runtime\x20role\x20','roleName',',\x20found\x20','Run\x20`lovrabet\x20role\x20list`\x20or\x20pass\x20--role\x20<id>.','includes','Run\x20`lovrabet\x20role\x20list`\x20and\x20use\x20a\x20role\x20from\x20the\x20current\x20app.','OWNER'];a59_0x480b=function(){return _0x4f3e89;};return a59_0x480b();}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_0x9b7241(0x1d6),a59_0x9b7241(0x1b8),a59_0x9b7241(0x1ca),'CUSTOM'];const BUILTIN_ROLE_TYPES=[a59_0x9b7241(0x1d6),a59_0x9b7241(0x1b8),a59_0x9b7241(0x1ca)];export const ROLE_ID_FLAG={'name':'id','type':a59_0x9b7241(0x1cb),'required':!![],'description':a59_0x9b7241(0x1d8)};export const ROLE_REF_FLAG={'name':a59_0x9b7241(0x1b9),'type':a59_0x9b7241(0x1ce),'required':!![],'description':a59_0x9b7241(0x1ed)};export const ROLE_CODE_FLAG={'name':a59_0x9b7241(0x1f8),'type':'string','description':a59_0x9b7241(0x1bc)};export const USER_ID_FLAG={'name':a59_0x9b7241(0x1e5),'type':a59_0x9b7241(0x1ce),'required':!![],'description':'Runtime\x20userId\x20(string)'};export const EXPECT_USER_COUNT_FLAG={'name':a59_0x9b7241(0x1fc),'type':'number','description':'Reject\x20when\x20the\x20target\x20role\x20member\x20count\x20has\x20changed'};export function isBuiltinRuntimeRole(_0x100432){const _0x278752=a59_0x9b7241;return BUILTIN_ROLE_TYPES[_0x278752(0x1c8)](_0x100432);}export function assertCustomRuntimeRole(_0x5e5f3b,_0x576a05){const _0x55affc=a59_0x9b7241;if(_0x5e5f3b[_0x55affc(0x1de)]!==_0x55affc(0x1d7))throw CliErrors['validation'](_0x55affc(0x1fe)+_0x576a05+_0x55affc(0x1bb)+_0x5e5f3b[_0x55affc(0x1c5)]+'\x20('+_0x5e5f3b[_0x55affc(0x1de)]+').',_0x55affc(0x1dc));}export function projectRuntimeRole(_0x339bec){const _0x2b8e60=a59_0x9b7241;return{'id':_0x339bec['id'],'roleCode':_0x339bec[_0x2b8e60(0x1b7)],'roleName':_0x339bec[_0x2b8e60(0x1c5)],'roleType':_0x339bec[_0x2b8e60(0x1de)],'remark':_0x339bec[_0x2b8e60(0x1e9)],'userCount':_0x339bec[_0x2b8e60(0x1cd)]??0x0,'permitCount':_0x339bec[_0x2b8e60(0x1dd)]??0x0,'builtin':isBuiltinRuntimeRole(_0x339bec['roleType'])};}export function readOptionalRuntimeRoleCode(_0x3fcf5c){const _0x39dff4=a59_0x9b7241,_0x2536f1=_0x3fcf5c[_0x39dff4(0x1d9)](_0x39dff4(0x1f8));if(_0x2536f1===undefined||_0x2536f1===null)return undefined;const _0x274de7=String(_0x2536f1)[_0x39dff4(0x201)]();if(!_0x274de7)throw CliErrors[_0x39dff4(0x1d4)](_0x39dff4(0x1bd));if(_0x274de7[_0x39dff4(0x1d1)]>0x40)throw CliErrors[_0x39dff4(0x1d4)](_0x39dff4(0x1fa));return _0x274de7;}export async function getRuntimeRoleById(_0x10a7c3,_0x4cc0a0){const _0x4c2a1e=a59_0x9b7241;if(!Number[_0x4c2a1e(0x1fb)](_0x4cc0a0)||_0x4cc0a0<=0x0)throw CliErrors['validation'](_0x4c2a1e(0x1ee));const _0x543dab=(await listAllRuntimeRoles(_0x10a7c3))[_0x4c2a1e(0x1cc)](_0x5a0f56=>_0x5a0f56['id']===_0x4cc0a0&&(!_0x5a0f56[_0x4c2a1e(0x1f5)]||_0x5a0f56['appCode']===_0x10a7c3));if(_0x543dab[_0x4c2a1e(0x1d1)]!==0x1)throw CliErrors[_0x4c2a1e(0x1d4)](_0x4c2a1e(0x1c0)+_0x4cc0a0+_0x4c2a1e(0x1ff)+_0x10a7c3+'.',_0x4c2a1e(0x1c9));const _0x51d3f0=_0x543dab[0x0],_0x293042=_0x51d3f0['id'];if(typeof _0x293042!==_0x4c2a1e(0x1cb)||!Number[_0x4c2a1e(0x1fb)](_0x293042)||_0x293042<=0x0)throw CliErrors['validation'](_0x4c2a1e(0x1df));return{..._0x51d3f0,'id':_0x293042};}export async function listAllRuntimeRoles(_0x233275,_0x19d63c={}){const _0x3f49b5=a59_0x9b7241,_0x5d02de=0x64,_0x2187f7=[];for(let _0x3538ad=0x1;;_0x3538ad+=0x1){const _0x444c32=await listRuntimeAppRoles(_0x233275,{..._0x19d63c[_0x3f49b5(0x1c5)]?{'roleName':_0x19d63c['roleName']}:{},'currentPage':_0x3538ad,'pageSize':_0x5d02de});_0x2187f7[_0x3f49b5(0x1f9)](..._0x444c32[_0x3f49b5(0x1ec)]);if(_0x444c32[_0x3f49b5(0x1ec)][_0x3f49b5(0x1d1)]<_0x5d02de||_0x444c32[_0x3f49b5(0x1f1)]&&_0x2187f7[_0x3f49b5(0x1d1)]>=_0x444c32[_0x3f49b5(0x1f1)][_0x3f49b5(0x204)])return _0x2187f7;}}export async function resolveRuntimeRoleRef(_0x24a303,_0x401255){const _0x5889d3=a59_0x9b7241,_0x5914eb=_0x401255[_0x5889d3(0x201)]();if(!_0x5914eb)throw CliErrors['validation'](_0x5889d3(0x1f2),'Pass\x20--role\x20<id|name>.');if(/^\d+$/['test'](_0x5914eb))return getRuntimeRoleById(_0x24a303,Number(_0x5914eb));const _0x2f6125=(await listAllRuntimeRoles(_0x24a303))['filter'](_0x156da7=>_0x156da7['roleName']===_0x5914eb);if(_0x2f6125[_0x5889d3(0x1d1)]===0x0)throw CliErrors[_0x5889d3(0x1d4)](_0x5889d3(0x200)+_0x5914eb+_0x5889d3(0x1d0)+_0x24a303+'.',_0x5889d3(0x1c7));if(_0x2f6125['length']>0x1)throw CliErrors[_0x5889d3(0x1d4)]('Runtime\x20role\x20name\x20\x22'+_0x5914eb+_0x5889d3(0x1f0),_0x5889d3(0x1d5)+_0x2f6125[_0x5889d3(0x1ba)](_0x414e6e=>_0x414e6e['id'])[_0x5889d3(0x1be)](',\x20')+'.');const _0x2d374f=_0x2f6125[0x0],_0x581350=_0x2d374f['id'];if(typeof _0x581350!==_0x5889d3(0x1cb)||!Number[_0x5889d3(0x1fb)](_0x581350)||_0x581350<=0x0)throw CliErrors[_0x5889d3(0x1d4)](_0x5889d3(0x1df));return{..._0x2d374f,'id':_0x581350};}function parseRuntimeUserId(_0x4f7d5b){const _0x234de3=a59_0x9b7241,_0x59c163=_0x4f7d5b[_0x234de3(0x201)](),_0x496408=normalizeRuntimeUserId(_0x59c163);if(_0x496408===undefined)throw CliErrors[_0x234de3(0x1d4)](_0x234de3(0x1e0),'Pass\x20--user\x20<userId>;\x20name\x20and\x20account\x20lookup\x20are\x20not\x20available\x20in\x20runtime\x20scope.');return _0x496408;}export async function prepareRuntimeMemberMutation(_0x1a9c2a,_0xd9a9f){const _0x5a4337=a59_0x9b7241,_0x2f7274=await resolveRuntimeRoleRef(_0x1a9c2a[_0x5a4337(0x1f5)],_0x1a9c2a[_0x5a4337(0x1da)]('role'));if(_0x2f7274[_0x5a4337(0x1de)]===_0x5a4337(0x1ca))throw CliErrors[_0x5a4337(0x1d4)](_0x5a4337(0x203),'Transfer\x20or\x20manage\x20application\x20ownership\x20through\x20the\x20dedicated\x20application\x20workflow.');const _0x19e764=parseRuntimeUserId(_0x1a9c2a[_0x5a4337(0x1da)]('user')),_0x4b1ee2=(await listRuntimeRoleUsers(_0x1a9c2a[_0x5a4337(0x1f5)]))[_0x5a4337(0x1ba)](_0x5391cd=>{const _0x9827c9=_0x5a4337;if(typeof _0x5391cd['id']!==_0x9827c9(0x1cb)||!Number[_0x9827c9(0x1fb)](_0x5391cd['id'])||_0x5391cd['id']<=0x0)throw CliErrors[_0x9827c9(0x1d4)](_0x9827c9(0x1e7));return{..._0x5391cd,'userList':[..._0x5391cd[_0x9827c9(0x1bf)]??[]],'applyUserList':[..._0x5391cd[_0x9827c9(0x202)]??[]]};}),_0x4963fc=_0x4b1ee2['find'](_0x72fbaf=>_0x72fbaf['id']===_0x2f7274['id']);if(!_0x4963fc)throw CliErrors['validation']('Runtime\x20role\x20'+_0x2f7274['id']+_0x5a4337(0x1c1),_0x5a4337(0x1d2));const _0x4923b6=_0x44d443=>{const _0x3ae592=_0x5a4337,_0x39cd98=normalizeRuntimeUserId(_0x44d443);if(_0x39cd98===undefined)throw CliErrors[_0x3ae592(0x1d4)](_0x3ae592(0x1f3));return _0x39cd98;},_0x56af60=_0x4963fc[_0x5a4337(0x1bf)][_0x5a4337(0x1ba)](_0x42d062=>_0x4923b6(_0x42d062['userId'])),_0x3aaea1=_0x1a9c2a['flag']('expect-user-count');if(_0x3aaea1!==undefined&&_0x3aaea1!==null&&_0x3aaea1!==''){const _0x34520d=_0x1a9c2a[_0x5a4337(0x1e2)](_0x5a4337(0x1fc));if(!Number[_0x5a4337(0x1fb)](_0x34520d)||_0x34520d<0x0)throw CliErrors[_0x5a4337(0x1d4)]('--expect-user-count\x20must\x20be\x20a\x20non-negative\x20integer.');if(_0x56af60['length']!==_0x34520d)throw CliErrors[_0x5a4337(0x1d4)](_0x5a4337(0x1e1)+_0x34520d+_0x5a4337(0x1c6)+_0x56af60[_0x5a4337(0x1d1)]+'.','Read\x20the\x20current\x20members\x20and\x20retry\x20with\x20the\x20new\x20expected\x20count.');}const _0x380651=_0x56af60['includes'](_0x19e764),_0x332fc6=[];let _0x3838cf=!![];if(_0xd9a9f==='user-add'){const _0x16ce7e=await listRuntimeAppUsers(_0x1a9c2a[_0x5a4337(0x1f5)]),_0x509dab=_0x16ce7e[_0x5a4337(0x1cc)](_0x3853c9=>normalizeRuntimeUserId(_0x3853c9[_0x5a4337(0x1cf)])===_0x19e764);if(_0x509dab['length']!==0x1||!_0x509dab[0x0][_0x5a4337(0x1fd)]?.[_0x5a4337(0x201)]())throw CliErrors[_0x5a4337(0x1d4)](_0x5a4337(0x1e8)+_0x19e764+_0x5a4337(0x1ff)+_0x1a9c2a[_0x5a4337(0x1f5)]+'.',_0x5a4337(0x1e3));_0x380651?(_0x3838cf=![],_0x332fc6[_0x5a4337(0x1f9)]('User\x20'+_0x19e764+_0x5a4337(0x1c4)+_0x2f7274['id']+'.')):_0x4963fc[_0x5a4337(0x1bf)][_0x5a4337(0x1f9)]({'userId':_0x19e764,'username':_0x509dab[0x0][_0x5a4337(0x1fd)]});}else!_0x380651?(_0x3838cf=![],_0x332fc6['push']('User\x20'+_0x19e764+'\x20is\x20not\x20in\x20runtime\x20role\x20'+_0x2f7274['id']+'.')):_0x4963fc[_0x5a4337(0x1bf)]=_0x4963fc[_0x5a4337(0x1bf)][_0x5a4337(0x1cc)](_0x35e2b4=>_0x4923b6(_0x35e2b4[_0x5a4337(0x1ef)])!==_0x19e764);return{'role':_0x2f7274,'userId':_0x19e764,'roleList':_0x4b1ee2,'before':{'userIds':_0x56af60},'after':{'userIds':_0x4963fc[_0x5a4337(0x1bf)]['map'](_0x3dd6cc=>_0x4923b6(_0x3dd6cc[_0x5a4337(0x1ef)]))},'shouldWrite':_0x3838cf,'warnings':_0x332fc6};}export function runtimeRoleWriteResult(_0x1bbcf7,_0x3160f7,_0xb89bb1,_0x407d5e,_0x133939,_0x544657=[]){const _0x1a1ffd=a59_0x9b7241;return{'operation':_0x1bbcf7,'scope':_0x1a1ffd(0x1d3),'selector':_0x3160f7,'before':_0xb89bb1,'after':_0x407d5e,'dryRun':![],'backend':_0x133939,'warnings':_0x544657};}
|
|
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 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a60_0xacec(_0x11e876,_0x3c140c){_0x11e876=_0x11e876-0x72;const _0x31cb3a=a60_0x31cb();let _0xacec7b=_0x31cb3a[_0x11e876];return _0xacec7b;}const a60_0x4368cc=a60_0xacec;(function(_0x247a4d,_0x2474b4){const _0x1c4299=a60_0xacec,_0x29bc4c=_0x247a4d();while(!![]){try{const _0x3db9f1=-parseInt(_0x1c4299(0x81))/0x1*(parseInt(_0x1c4299(0x8b))/0x2)+parseInt(_0x1c4299(0x79))/0x3*(-parseInt(_0x1c4299(0x7f))/0x4)+-parseInt(_0x1c4299(0x83))/0x5+-parseInt(_0x1c4299(0x7c))/0x6+-parseInt(_0x1c4299(0x74))/0x7*(-parseInt(_0x1c4299(0x86))/0x8)+-parseInt(_0x1c4299(0x84))/0x9*(-parseInt(_0x1c4299(0x77))/0xa)+-parseInt(_0x1c4299(0x92))/0xb*(-parseInt(_0x1c4299(0x8c))/0xc);if(_0x3db9f1===_0x2474b4)break;else _0x29bc4c['push'](_0x29bc4c['shift']());}catch(_0x3682c9){_0x29bc4c['push'](_0x29bc4c['shift']());}}}(a60_0x31cb,0xe9e07));import{updateRuntimeAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';function a60_0x31cb(){const _0x3866cc=['4FKgZDV','name','1PPDUYu','trim','1768990POfmpi','9ocyHRB','high-risk-write','8RijSRd','Preview:\x20update\x20a\x20runtime\x20CUSTOM\x20role','str','/client/permit/role/update','Pass\x20--role-code,\x20--name,\x20or\x20--remark\x20to\x20update\x20the\x20runtime\x20role.','978190EaKJuD','524652PVVudB','num','remark','The\x20current\x20runtime\x20role\x20API\x20does\x20not\x20support\x20clearing\x20an\x20existing\x20remark.','--remark\x20must\x20not\x20be\x20blank.','update','231fXOdLI','--name\x20must\x20not\x20be\x20blank.','validation','role','flag','3217011xQXVqR','appCode','Update\x20a\x20runtime\x20CUSTOM\x20role\x27s\x20code,\x20name,\x20or\x20remark','18926920LvKFYW','build','232449YKfejJ','POST','description','8352426YEFaSM','body','New\x20role\x20name'];a60_0x31cb=function(){return _0x3866cc;};return a60_0x31cb();}import{assertCustomRuntimeRole,getRuntimeRoleById,projectRuntimeRole,readOptionalRuntimeRoleCode,ROLE_CODE_FLAG,ROLE_ID_FLAG,runtimeRoleWriteResult}from'../../commands/role/shared.js';function updateFields(_0x34e04e){const _0x81c819=a60_0xacec,_0xdc8e85=_0x34e04e[_0x81c819(0x73)]('role-code')!==undefined,_0x4ad136=_0x34e04e[_0x81c819(0x73)](_0x81c819(0x80))!==undefined,_0x4bbab6=_0x34e04e[_0x81c819(0x73)](_0x81c819(0x8e))!==undefined;if(!_0xdc8e85&&!_0x4ad136&&!_0x4bbab6)throw CliErrors[_0x81c819(0x94)](_0x81c819(0x8a));const _0x112a56=readOptionalRuntimeRoleCode(_0x34e04e),_0x217188=_0x34e04e['str']('name')[_0x81c819(0x82)](),_0x4dbf20=_0x34e04e[_0x81c819(0x88)](_0x81c819(0x8e))['trim']();if(_0x4ad136&&!_0x217188)throw CliErrors['validation'](_0x81c819(0x93));if(_0x4bbab6&&!_0x4dbf20)throw CliErrors[_0x81c819(0x94)](_0x81c819(0x90),_0x81c819(0x8f));return{..._0x112a56?{'roleCode':_0x112a56}:{},..._0x4ad136?{'roleName':_0x217188}:{},..._0x4bbab6?{'remark':_0x4dbf20}:{}};}async function prepare(_0x316cd1){const _0x418178=a60_0xacec,_0x15ae7a=await getRuntimeRoleById(_0x316cd1['appCode'],_0x316cd1[_0x418178(0x8d)]('id'));return assertCustomRuntimeRole(_0x15ae7a,_0x418178(0x91)),{'role':_0x15ae7a,'body':{'id':_0x15ae7a['id'],'appCode':_0x316cd1[_0x418178(0x75)],...updateFields(_0x316cd1)}};}export const roleUpdate={'service':a60_0x4368cc(0x72),'command':a60_0x4368cc(0x91),'description':a60_0x4368cc(0x76),'risk':a60_0x4368cc(0x85),'confirmationDescription':'Changes\x20the\x20custom\x20role\x20code,\x20name,\x20or\x20note\x20in\x20the\x20current\x20runtime\x20app.\x20The\x20role\x20updates\x20immediately.','flags':[ROLE_ID_FLAG,ROLE_CODE_FLAG,{'name':a60_0x4368cc(0x80),'type':'string','description':a60_0x4368cc(0x7e)},{'name':'remark','type':'string','description':'New\x20non-empty\x20role\x20remark'}],async 'validate'(_0x4c2f57){updateFields(_0x4c2f57);},async 'dryRun'(_0x36d69f){const _0x264724=a60_0x4368cc,{body:_0x23c241}=await prepare(_0x36d69f);return dryRun(_0x264724(0x7a),_0x264724(0x89))[_0x264724(0x7d)](_0x23c241)[_0x264724(0x7b)](_0x264724(0x87))[_0x264724(0x78)]();},async 'execute'(_0x3734a3){const _0x34c281=a60_0x4368cc,{role:_0x171027,body:_0x1653aa}=await prepare(_0x3734a3),_0x57f270=await updateRuntimeAppRole(_0x1653aa);return{'ok':!![],'data':runtimeRoleWriteResult(_0x34c281(0x91),{'roleId':_0x171027['id']},projectRuntimeRole(_0x171027),projectRuntimeRole(_0x57f270),{'method':_0x34c281(0x7a),'path':_0x34c281(0x89)})};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a61_0x19fe49=a61_0x4481;(function(_0x633510,_0x257dbd){const _0x44ce00=a61_0x4481,_0x36d5a2=_0x633510();while(!![]){try{const _0x4b6896=-parseInt(_0x44ce00(0x1cc))/0x1*(-parseInt(_0x44ce00(0x1be))/0x2)+-parseInt(_0x44ce00(0x1b6))/0x3+-parseInt(_0x44ce00(0x1bd))/0x4*(-parseInt(_0x44ce00(0x1c7))/0x5)+-parseInt(_0x44ce00(0x1bb))/0x6+parseInt(_0x44ce00(0x1b7))/0x7+parseInt(_0x44ce00(0x1ce))/0x8*(-parseInt(_0x44ce00(0x1b3))/0x9)+-parseInt(_0x44ce00(0x1b4))/0xa*(-parseInt(_0x44ce00(0x1c3))/0xb);if(_0x4b6896===_0x257dbd)break;else _0x36d5a2['push'](_0x36d5a2['shift']());}catch(_0x41defb){_0x36d5a2['push'](_0x36d5a2['shift']());}}}(a61_0xfb2f,0xc2971));function a61_0x4481(_0x518302,_0x189d81){_0x518302=_0x518302-0x1b3;const _0xfb2ffe=a61_0xfb2f();let _0x448190=_0xfb2ffe[_0x518302];return _0x448190;}import{updateRuntimeRoleUsers}from'../../core/api-client.js';import{dryRun}from'../../framework/dryrun.js';import{EXPECT_USER_COUNT_FLAG,prepareRuntimeMemberMutation,ROLE_REF_FLAG,runtimeRoleWriteResult,USER_ID_FLAG}from'../../commands/role/shared.js';function a61_0xfb2f(){const _0x25680a=['role','Add\x20a\x20userId\x20to\x20one\x20runtime\x20role','POST','Adds\x20the\x20given\x20runtime\x20user\x20to\x20the\x20target\x20role.\x20The\x20user\x20receives\x20the\x20permissions\x20of\x20that\x20role.','14zWcooY','high-risk-write','12976mULyje','5751FKccYG','25332110OWhQen','user-add','4535205zwSFLf','827596JJbcZQ','Preview:\x20add\x20runtime\x20role\x20member','before','warnings','6294000OqYWqo','roleList','58468haABBn','63126vEwlKu','shouldWrite','body','build','userId','11LxuiAR','after','appCode','/client/permit/user-role/update-user-list','445xzAOHa'];a61_0xfb2f=function(){return _0x25680a;};return a61_0xfb2f();}export const roleUserAdd={'service':'role','command':a61_0x19fe49(0x1b5),'description':a61_0x19fe49(0x1c9),'risk':a61_0x19fe49(0x1cd),'confirmationDescription':a61_0x19fe49(0x1cb),'flags':[ROLE_REF_FLAG,USER_ID_FLAG,EXPECT_USER_COUNT_FLAG],async 'dryRun'(_0x48aade){const _0x267e9c=a61_0x19fe49,_0x274dc3=await prepareRuntimeMemberMutation(_0x48aade,_0x267e9c(0x1b5));return dryRun(_0x267e9c(0x1ca),_0x267e9c(0x1c6))[_0x267e9c(0x1c0)]({'appCode':_0x48aade[_0x267e9c(0x1c5)],'roleList':_0x274dc3[_0x267e9c(0x1bc)]})['description'](_0x274dc3['shouldWrite']?_0x267e9c(0x1b8):_0x274dc3[_0x267e9c(0x1ba)][0x0])[_0x267e9c(0x1c1)]();},async 'execute'(_0x162966){const _0x19c89b=a61_0x19fe49,_0x363314=await prepareRuntimeMemberMutation(_0x162966,_0x19c89b(0x1b5));return _0x363314[_0x19c89b(0x1bf)]&&await updateRuntimeRoleUsers(_0x162966['appCode'],_0x363314['roleList']),{'ok':!![],'data':runtimeRoleWriteResult(_0x19c89b(0x1b5),{'roleId':_0x363314[_0x19c89b(0x1c8)]['id'],'userId':_0x363314[_0x19c89b(0x1c2)]},_0x363314[_0x19c89b(0x1b9)],_0x363314[_0x19c89b(0x1c4)],{'method':_0x19c89b(0x1ca),'path':_0x19c89b(0x1c6)},_0x363314[_0x19c89b(0x1ba)])};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a62_0x46ba(_0x14ddf0,_0x5655ea){_0x14ddf0=_0x14ddf0-0x157;const _0xfeec14=a62_0xfeec();let _0x46bae8=_0xfeec14[_0x14ddf0];return _0x46bae8;}function a62_0xfeec(){const _0x25a4d8=['before','role','1372458iIocsF','roleList','POST','3333054wzAZST','12375eTShrF','Remove\x20a\x20userId\x20from\x20one\x20runtime\x20role','shouldWrite','after','697211JcvFms','5627573npkTiB','userId','956NFDKCL','Removes\x20the\x20given\x20runtime\x20user\x20from\x20the\x20target\x20role.\x20The\x20user\x20loses\x20permissions\x20granted\x20only\x20by\x20that\x20role.','warnings','high-risk-write','/client/permit/user-role/update-user-list','body','1548303mwRNKM','appCode','27726880BwARVM','Preview:\x20remove\x20runtime\x20role\x20member','user-remove'];a62_0xfeec=function(){return _0x25a4d8;};return a62_0xfeec();}const a62_0x29b157=a62_0x46ba;(function(_0x177834,_0x373a00){const _0x4274bb=a62_0x46ba,_0xc83a5f=_0x177834();while(!![]){try{const _0x8e988a=-parseInt(_0x4274bb(0x163))/0x1+-parseInt(_0x4274bb(0x15b))/0x2+parseInt(_0x4274bb(0x16c))/0x3+-parseInt(_0x4274bb(0x166))/0x4*(parseInt(_0x4274bb(0x15f))/0x5)+-parseInt(_0x4274bb(0x15e))/0x6+-parseInt(_0x4274bb(0x164))/0x7+parseInt(_0x4274bb(0x16e))/0x8;if(_0x8e988a===_0x373a00)break;else _0xc83a5f['push'](_0xc83a5f['shift']());}catch(_0x148cfe){_0xc83a5f['push'](_0xc83a5f['shift']());}}}(a62_0xfeec,0x9e17c));import{updateRuntimeRoleUsers}from'../../core/api-client.js';import{dryRun}from'../../framework/dryrun.js';import{EXPECT_USER_COUNT_FLAG,prepareRuntimeMemberMutation,ROLE_REF_FLAG,runtimeRoleWriteResult,USER_ID_FLAG}from'../../commands/role/shared.js';export const roleUserRemove={'service':a62_0x29b157(0x15a),'command':a62_0x29b157(0x158),'description':a62_0x29b157(0x160),'risk':a62_0x29b157(0x169),'confirmationDescription':a62_0x29b157(0x167),'flags':[ROLE_REF_FLAG,USER_ID_FLAG,EXPECT_USER_COUNT_FLAG],async 'dryRun'(_0x39be3a){const _0x13b332=a62_0x29b157,_0x3fd5da=await prepareRuntimeMemberMutation(_0x39be3a,_0x13b332(0x158));return dryRun(_0x13b332(0x15d),_0x13b332(0x16a))[_0x13b332(0x16b)]({'appCode':_0x39be3a[_0x13b332(0x16d)],'roleList':_0x3fd5da['roleList']})['description'](_0x3fd5da[_0x13b332(0x161)]?_0x13b332(0x157):_0x3fd5da[_0x13b332(0x168)][0x0])['build']();},async 'execute'(_0x22d11f){const _0x454dd3=a62_0x29b157,_0x2fe6e9=await prepareRuntimeMemberMutation(_0x22d11f,_0x454dd3(0x158));return _0x2fe6e9[_0x454dd3(0x161)]&&await updateRuntimeRoleUsers(_0x22d11f[_0x454dd3(0x16d)],_0x2fe6e9[_0x454dd3(0x15c)]),{'ok':!![],'data':runtimeRoleWriteResult(_0x454dd3(0x158),{'roleId':_0x2fe6e9[_0x454dd3(0x15a)]['id'],'userId':_0x2fe6e9[_0x454dd3(0x165)]},_0x2fe6e9[_0x454dd3(0x159)],_0x2fe6e9[_0x454dd3(0x162)],{'method':'POST','path':'/client/permit/user-role/update-user-list'},_0x2fe6e9[_0x454dd3(0x168)])};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a63_0x520fea=a63_0x198a;(function(_0x5f1d8a,_0x32fd9e){const _0x3fa48b=a63_0x198a,_0x21974a=_0x5f1d8a();while(!![]){try{const _0x157fe6=-parseInt(_0x3fa48b(0x1fd))/0x1*(-parseInt(_0x3fa48b(0x205))/0x2)+-parseInt(_0x3fa48b(0x203))/0x3+parseInt(_0x3fa48b(0x1e2))/0x4*(parseInt(_0x3fa48b(0x1ca))/0x5)+-parseInt(_0x3fa48b(0x1e6))/0x6+-parseInt(_0x3fa48b(0x1bb))/0x7*(parseInt(_0x3fa48b(0x1d3))/0x8)+-parseInt(_0x3fa48b(0x1e4))/0x9*(parseInt(_0x3fa48b(0x1c0))/0xa)+parseInt(_0x3fa48b(0x1c4))/0xb;if(_0x157fe6===_0x32fd9e)break;else _0x21974a['push'](_0x21974a['shift']());}catch(_0x5b8d88){_0x21974a['push'](_0x21974a['shift']());}}}(a63_0x106e,0xd8503));import{createRuntimeSchedule,deleteRuntimeSchedule,getRuntimeSchedule,listRuntimeSchedules,runRuntimeSchedule,validateRuntimeSchedule}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a63_0x106e(){const _0xad47b1=['UTC','Creates\x20a\x20schedule\x20in\x20the\x20current\x20app\x20that\x20can\x20auto-trigger\x20an\x20Agent.\x20At\x20the\x20scheduled\x20time\x20a\x20Task\x20is\x20created\x20and\x20run.','\x20schedule\x20','Preview:\x20create\x20an\x20Agent\x20schedule','5275688RsfPnC','Schedule\x20UUID','Prompt\x20sent\x20to\x20the\x20Agent\x20when\x20the\x20schedule\x20runs','Permanently\x20deletes\x20the\x20schedule\x20and\x20stops\x20future\x20auto-triggers.\x20Historical\x20Tasks\x20already\x20created\x20are\x20not\x20affected.','ONCE','description','high-risk-write','--cursor\x20must\x20be\x20the\x20unchanged\x20nextCursor\x20from\x20schedule\x20list.','a\x20UUID\x20returned\x20by\x20schedule\x20create/list','trim','List\x20current\x20user\x27s\x20schedules\x20for\x20the\x20current\x20app','scheduled-at','taskId','schedule','CRON','4KoIPwM','str','37026JidjFV','/run','10495998vtuFjq','Schedule\x20title','scheduleId','CRON\x20schedules\x20require\x20--cron\x20and\x20do\x20not\x20accept\x20--scheduled-at.','Create\x20a\x20recurring\x20or\x20one-shot\x20Agent\x20schedule','model','detail','--kind\x20must\x20be\x20CRON\x20or\x20ONCE.','Queued\x20Task\x20','kimi/k3','ONCE\x20schedules\x20require\x20--scheduled-at\x20and\x20do\x20not\x20accept\x20--cron.','\x20immediately','Schedule\x20input\x20is\x20valid','num','Delete\x20the\x20schedule\x20and\x20stop\x20future\x20triggers','cursor','--prompt\x20must\x20not\x20be\x20blank.','string','Show\x20one\x20schedule\x20by\x20schedule\x20ID','POST','/schedules','Opaque\x20nextCursor\x20returned\x20by\x20the\x20previous\x20list\x20call','Schedule\x20kind:\x20CRON\x20or\x20ONCE','22QmBpsf','Preview:\x20delete\x20schedule\x20','run','body','Preview:\x20run\x20schedule\x20','Task\x20model\x20used\x20when\x20the\x20schedule\x20runs','526554esFilV','prompt','106154WZripw','title','Run\x20the\x20schedule\x20once\x20immediately\x20and\x20create\x20a\x20Task','Validate\x20a\x20UTC\x20schedule\x20without\x20creating\x20it','14fuHVGj','kind','appCode','build','length','2420IZGhsX','isSafeInteger','Ignores\x20the\x20original\x20trigger\x20time,\x20runs\x20the\x20schedule\x20once\x20now,\x20and\x20creates\x20a\x20new\x20Agent\x20Task.','/api/harness/apps/','35625524BWaNJX','--limit\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.','deepseek-v4-flash-0731','limit','validation','read','3595010aUuFoh','Page\x20size\x20from\x201\x20to\x20100','validate','schedule-id','list'];a63_0x106e=function(){return _0xad47b1;};return a63_0x106e();}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_0x520fea(0x1bc),'type':'string','required':!![],'enum':[a63_0x520fea(0x1e1),a63_0x520fea(0x1d7)],'description':a63_0x520fea(0x1fc)},CRON_FLAG={'name':'cron','type':'string','description':'Five-field\x20UTC\x20cron\x20expression\x20for\x20CRON\x20schedules'},SCHEDULED_AT_FLAG={'name':a63_0x520fea(0x1de),'type':'string','description':'Canonical\x20UTC\x20ISO\x20datetime\x20for\x20ONCE\x20schedules'},TITLE_FLAG={'name':a63_0x520fea(0x206),'type':a63_0x520fea(0x1f7),'required':!![],'description':a63_0x520fea(0x1e7)},PROMPT_FLAG={'name':a63_0x520fea(0x204),'type':a63_0x520fea(0x1f7),'required':!![],'description':a63_0x520fea(0x1d5)},MODEL_FLAG={'name':a63_0x520fea(0x1eb),'type':'string','enum':[a63_0x520fea(0x1ef),a63_0x520fea(0x1c6),'deepseek-v4-pro-0813'],'default':a63_0x520fea(0x1c6),'description':a63_0x520fea(0x202)},SCHEDULE_ID_FLAG={'name':a63_0x520fea(0x1cd),'type':a63_0x520fea(0x1f7),'required':!![],'description':a63_0x520fea(0x1d4),'pattern':{'regex':SCHEDULE_ID_PATTERN,'description':a63_0x520fea(0x1db)}},LIMIT_FLAG={'name':a63_0x520fea(0x1c7),'type':'number','default':0x14,'description':a63_0x520fea(0x1cb)},CURSOR_FLAG={'name':a63_0x520fea(0x1f5),'type':a63_0x520fea(0x1f7),'description':a63_0x520fea(0x1fb)},INPUT_FLAGS=[KIND_FLAG,CRON_FLAG,SCHEDULED_AT_FLAG,TITLE_FLAG,PROMPT_FLAG,MODEL_FLAG];function a63_0x198a(_0x215cc5,_0x41824b){_0x215cc5=_0x215cc5-0x1bb;const _0x106edd=a63_0x106e();let _0x198a16=_0x106edd[_0x215cc5];return _0x198a16;}function readScheduleInput(_0x51dc38){const _0x1e2f8b=a63_0x520fea,_0x463ec9=_0x51dc38['str'](_0x1e2f8b(0x1bc)),_0x412b2d=_0x51dc38[_0x1e2f8b(0x1e3)](_0x1e2f8b(0x206))[_0x1e2f8b(0x1dc)](),_0x21a503=_0x51dc38['str'](_0x1e2f8b(0x204))[_0x1e2f8b(0x1dc)](),_0xf700e9=_0x51dc38['str']('model'),_0x158c22=_0x51dc38[_0x1e2f8b(0x1e3)]('cron'),_0x3fd00e=_0x51dc38[_0x1e2f8b(0x1e3)](_0x1e2f8b(0x1de));if(!_0x412b2d)throw CliErrors[_0x1e2f8b(0x1c8)]('--title\x20must\x20not\x20be\x20blank.');if(!_0x21a503)throw CliErrors['validation'](_0x1e2f8b(0x1f6));if(_0x463ec9==='CRON'){if(!_0x158c22||_0x3fd00e)throw CliErrors[_0x1e2f8b(0x1c8)](_0x1e2f8b(0x1e9));return{'kind':_0x463ec9,'timezone':_0x1e2f8b(0x1cf),'cron':_0x158c22,'title':_0x412b2d,'prompt':_0x21a503,'model':_0xf700e9};}if(_0x463ec9===_0x1e2f8b(0x1d7)){if(!_0x3fd00e||_0x158c22)throw CliErrors[_0x1e2f8b(0x1c8)](_0x1e2f8b(0x1f0));return{'kind':_0x463ec9,'timezone':_0x1e2f8b(0x1cf),'scheduledAt':_0x3fd00e,'title':_0x412b2d,'prompt':_0x21a503,'model':_0xf700e9};}throw CliErrors[_0x1e2f8b(0x1c8)](_0x1e2f8b(0x1ed));}function scheduleCollectionPath(_0x1e7cf6){const _0x4e6261=a63_0x520fea;return _0x4e6261(0x1c3)+encodeURIComponent(_0x1e7cf6)+_0x4e6261(0x1fa);}function scheduleItemPath(_0xc30387,_0x9bbf4c){return scheduleCollectionPath(_0xc30387)+'/'+encodeURIComponent(_0x9bbf4c);}const scheduleValidate={'service':a63_0x520fea(0x1e0),'command':a63_0x520fea(0x1cc),'description':a63_0x520fea(0x208),'risk':a63_0x520fea(0x1c9),'flags':INPUT_FLAGS,async 'validate'(_0xc8a3c3){readScheduleInput(_0xc8a3c3);},async 'execute'(_0x1654e4){const _0x366f4c=a63_0x520fea,_0x4cbf86=readScheduleInput(_0x1654e4),_0xdada15=await validateRuntimeSchedule(_0x1654e4[_0x366f4c(0x1bd)],_0x4cbf86);return{'ok':!![],'data':_0xdada15,'message':_0x366f4c(0x1f2)};}},scheduleCreate={'service':a63_0x520fea(0x1e0),'command':'create','description':a63_0x520fea(0x1ea),'risk':a63_0x520fea(0x1d9),'confirmationDescription':a63_0x520fea(0x1d0),'flags':INPUT_FLAGS,async 'validate'(_0x494117){readScheduleInput(_0x494117);},async 'execute'(_0x4e1ff4){const _0x45f815=a63_0x520fea,_0x5a09a8=readScheduleInput(_0x4e1ff4),_0x27ea06=await validateRuntimeSchedule(_0x4e1ff4[_0x45f815(0x1bd)],_0x5a09a8),_0x55fd98=await createRuntimeSchedule(_0x4e1ff4[_0x45f815(0x1bd)],_0x27ea06);return{'ok':!![],'data':_0x55fd98,'message':'Created\x20'+_0x55fd98[_0x45f815(0x1bc)]+_0x45f815(0x1d1)+_0x55fd98[_0x45f815(0x1e8)]};},async 'dryRun'(_0x464ec8){const _0xea7750=a63_0x520fea,_0x1ffbf9=readScheduleInput(_0x464ec8);return dryRun(_0xea7750(0x1f9),scheduleCollectionPath(_0x464ec8[_0xea7750(0x1bd)]))[_0xea7750(0x200)](_0x1ffbf9)[_0xea7750(0x1d8)](_0xea7750(0x1d2))[_0xea7750(0x1be)]();}},scheduleList={'service':'schedule','command':a63_0x520fea(0x1ce),'description':a63_0x520fea(0x1dd),'risk':a63_0x520fea(0x1c9),'flags':[KIND_FLAG,LIMIT_FLAG,CURSOR_FLAG],async 'validate'(_0x5af6d3){const _0x49ebd2=a63_0x520fea,_0x3280ba=_0x5af6d3[_0x49ebd2(0x1f3)]('limit');if(!Number[_0x49ebd2(0x1c1)](_0x3280ba)||_0x3280ba<0x1||_0x3280ba>0x64)throw CliErrors[_0x49ebd2(0x1c8)](_0x49ebd2(0x1c5));const _0x35d723=_0x5af6d3[_0x49ebd2(0x1e3)](_0x49ebd2(0x1f5));if(_0x35d723&&(_0x35d723[_0x49ebd2(0x1bf)]>0x400||_0x35d723[_0x49ebd2(0x1dc)]()!==_0x35d723))throw CliErrors['validation'](_0x49ebd2(0x1da));},async 'execute'(_0x11fa92){const _0x3f5e74=a63_0x520fea,_0xc6f9a6=_0x11fa92[_0x3f5e74(0x1e3)](_0x3f5e74(0x1f5)),_0x2c3579=await listRuntimeSchedules(_0x11fa92['appCode'],{'kind':_0x11fa92[_0x3f5e74(0x1e3)](_0x3f5e74(0x1bc)),'limit':_0x11fa92[_0x3f5e74(0x1f3)](_0x3f5e74(0x1c7)),..._0xc6f9a6?{'cursor':_0xc6f9a6}:{}});return{'ok':!![],'data':_0x2c3579};}},scheduleDetail={'service':a63_0x520fea(0x1e0),'command':a63_0x520fea(0x1ec),'description':a63_0x520fea(0x1f8),'risk':a63_0x520fea(0x1c9),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x9b6c95){const _0x39320b=a63_0x520fea,_0x30c65d=await getRuntimeSchedule(_0x9b6c95[_0x39320b(0x1bd)],_0x9b6c95[_0x39320b(0x1e3)]('schedule-id'));return{'ok':!![],'data':_0x30c65d};}},scheduleRun={'service':'schedule','command':a63_0x520fea(0x1ff),'description':a63_0x520fea(0x207),'risk':'high-risk-write','confirmationDescription':a63_0x520fea(0x1c2),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0xd19326){const _0x3c5d43=a63_0x520fea,_0x2f9ed2=_0xd19326[_0x3c5d43(0x1e3)]('schedule-id'),_0x1c2f66=await runRuntimeSchedule(_0xd19326[_0x3c5d43(0x1bd)],_0x2f9ed2);return{'ok':!![],'data':_0x1c2f66,'message':_0x3c5d43(0x1ee)+_0x1c2f66[_0x3c5d43(0x1df)]+'\x20from\x20schedule\x20'+_0x2f9ed2};},async 'dryRun'(_0x3a333e){const _0x4a26aa=a63_0x520fea,_0x236eda=_0x3a333e[_0x4a26aa(0x1e3)]('schedule-id');return dryRun(_0x4a26aa(0x1f9),scheduleItemPath(_0x3a333e[_0x4a26aa(0x1bd)],_0x236eda)+_0x4a26aa(0x1e5))[_0x4a26aa(0x1d8)](_0x4a26aa(0x201)+_0x236eda+_0x4a26aa(0x1f1))['build']();}},scheduleDelete={'service':'schedule','command':'delete','description':a63_0x520fea(0x1f4),'risk':a63_0x520fea(0x1d9),'confirmationDescription':a63_0x520fea(0x1d6),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x500348){const _0x916547=a63_0x520fea,_0x4c3ec9=_0x500348['str'](_0x916547(0x1cd)),_0xa5333c=await deleteRuntimeSchedule(_0x500348[_0x916547(0x1bd)],_0x4c3ec9);return{'ok':!![],'data':_0xa5333c,'message':'Deleted\x20schedule\x20'+_0x4c3ec9};},async 'dryRun'(_0x161eab){const _0x49d484=a63_0x520fea,_0x299966=_0x161eab[_0x49d484(0x1e3)](_0x49d484(0x1cd));return dryRun('DELETE',scheduleItemPath(_0x161eab[_0x49d484(0x1bd)],_0x299966))[_0x49d484(0x1d8)](_0x49d484(0x1fe)+_0x299966)[_0x49d484(0x1be)]();}};export const scheduleDefinitions=[scheduleValidate,scheduleCreate,scheduleList,scheduleDetail,scheduleRun,scheduleDelete];
|
|
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];
|
package/lib/commands/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a64_0x4a70(_0x3c93cd,_0x3ae134){_0x3c93cd=_0x3c93cd-0x1b2;const _0x1da116=a64_0x1da1();let _0x4a708f=_0x1da116[_0x3c93cd];return _0x4a708f;}const a64_0x387b85=a64_0x4a70;(function(_0x1cf56a,_0x3a1a1d){const _0x2c290d=a64_0x4a70,_0x374fba=_0x1cf56a();while(!![]){try{const _0x512575=-parseInt(_0x2c290d(0x1b7))/0x1*(parseInt(_0x2c290d(0x1ba))/0x2)+parseInt(_0x2c290d(0x1b3))/0x3*(parseInt(_0x2c290d(0x1bc))/0x4)+-parseInt(_0x2c290d(0x1b2))/0x5*(-parseInt(_0x2c290d(0x1b6))/0x6)+-parseInt(_0x2c290d(0x1bd))/0x7*(parseInt(_0x2c290d(0x1b8))/0x8)+parseInt(_0x2c290d(0x1bb))/0x9*(parseInt(_0x2c290d(0x1b4))/0xa)+-parseInt(_0x2c290d(0x1b9))/0xb*(-parseInt(_0x2c290d(0x1bf))/0xc)+-parseInt(_0x2c290d(0x1c0))/0xd;if(_0x512575===_0x3a1a1d)break;else _0x374fba['push'](_0x374fba['shift']());}catch(_0xb0f706){_0x374fba['push'](_0x374fba['shift']());}}}(a64_0x1da1,0x223c1));import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x159583){const _0xaf413c=await buildSchemaPayload();return{'ok':!![],'data':_0xaf413c};}function a64_0x1da1(){const _0xd02898=['32PhpRVP','8iDeREc','55QbTVRt','16146IrcTWH','54bLcswg','28ELtovO','1128785gpjsCU','export','204060BrOrjn','444886bMKadp','4115eDGpfu','33897wZbsfg','458660xqXmxB','read','1128FkbqNW'];a64_0x1da1=function(){return _0xd02898;};return a64_0x1da1();}export const schemaDefinition={'service':'schema','command':a64_0x387b85(0x1be),'description':'Export\x20machine-readable\x20command\x20schema\x20(JSON)','risk':a64_0x387b85(0x1b5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0xe2c0a8,_0xf3a6ca){const _0x52f9dc=a65_0x4715,_0x4503c4=_0xe2c0a8();while(!![]){try{const _0x4ba4d7=parseInt(_0x52f9dc(0x147))/0x1+parseInt(_0x52f9dc(0x13f))/0x2+parseInt(_0x52f9dc(0x112))/0x3+-parseInt(_0x52f9dc(0x105))/0x4+parseInt(_0x52f9dc(0x16c))/0x5*(parseInt(_0x52f9dc(0x149))/0x6)+parseInt(_0x52f9dc(0x12a))/0x7*(-parseInt(_0x52f9dc(0x102))/0x8)+parseInt(_0x52f9dc(0x128))/0x9;if(_0x4ba4d7===_0xf3a6ca)break;else _0x4503c4['push'](_0x4503c4['shift']());}catch(_0x30c1bd){_0x4503c4['push'](_0x4503c4['shift']());}}}(a65_0x1ceb,0x35dd7));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(_0x2920de,_0x541a82){const _0x5ed9c2=a65_0x4715,_0x5399ed=listLocalServiceTrees();let _0x1ea30a;for(const _0x334a4e of _0x5399ed){const _0x261fcf=matchServiceTreeCommand(_0x334a4e,_0x2920de);if(!_0x261fcf)continue;(!_0x1ea30a||_0x261fcf[_0x5ed9c2(0x113)][_0x5ed9c2(0x15e)]['length']>_0x1ea30a[_0x5ed9c2(0x113)][_0x5ed9c2(0x15e)]['length'])&&(_0x1ea30a={'tree':_0x334a4e,'command':_0x261fcf['command'],'remainingArgs':_0x261fcf[_0x5ed9c2(0x145)]});}if(!_0x1ea30a)return undefined;const _0x893782={..._0x541a82};return applyAppBinding(_0x1ea30a[_0x5ed9c2(0x137)],_0x1ea30a[_0x5ed9c2(0x113)],_0x893782),{'definition':buildDynamicCommandDefinition(_0x1ea30a[_0x5ed9c2(0x137)],_0x1ea30a['command']),'args':_0x1ea30a[_0x5ed9c2(0x145)],'flags':_0x893782,'tree':_0x1ea30a[_0x5ed9c2(0x137)],'command':_0x1ea30a[_0x5ed9c2(0x113)]};}function a65_0x4715(_0x29b779,_0x8422f7){_0x29b779=_0x29b779-0x101;const _0x1ceb7b=a65_0x1ceb();let _0x471578=_0x1ceb7b[_0x29b779];return _0x471578;}export function generateDynamicServiceHelp(_0x256dcd){const _0x3445cf=a65_0x4715,_0x133f9c=listLocalServiceTrees()[_0x3445cf(0x144)](_0x2316cd=>_0x2316cd[_0x3445cf(0x14c)][_0x3445cf(0x13b)]===_0x256dcd);if(!_0x133f9c)return undefined;const _0x29640f=[CLI_BIN_NAME+'\x20'+_0x256dcd+_0x3445cf(0x15f),'',_0x133f9c[_0x3445cf(0x14c)][_0x3445cf(0x131)]||_0x256dcd,_0x133f9c[_0x3445cf(0x14c)]['description']?'\x20\x20'+_0x133f9c[_0x3445cf(0x14c)][_0x3445cf(0x141)]:'','',_0x3445cf(0x116),..._0x133f9c['commands'][_0x3445cf(0x103)](_0xd491bd=>{const _0x481cf8=_0x3445cf,_0x57b203=_0xd491bd[_0x481cf8(0x15e)][_0x481cf8(0x15a)](0x1)[_0x481cf8(0x10c)]('\x20'),_0x1ae27a=_0xd491bd[_0x481cf8(0x171)]===_0x481cf8(0x125)?'':'\x20['+_0xd491bd['risk']+']';return'\x20\x20'+_0x57b203[_0x481cf8(0x139)](0x18)+'\x20'+(_0xd491bd[_0x481cf8(0x141)]||'')+_0x1ae27a;}),'',_0x3445cf(0x153)+CLI_BIN_NAME+'\x20service\x20detail\x20--service\x20'+_0x256dcd+_0x3445cf(0x16a)]['filter'](Boolean);return _0x29640f[_0x3445cf(0x10c)]('\x0a');}export function listDynamicServiceEntries(){return listLocalServices()['map'](_0xb97110=>{const _0x46d032=a65_0x4715,_0x2e9228=_0xb97110[_0x46d032(0x104)];return{'service':_0x2e9228[_0x46d032(0x14c)]['code'],'label':_0x2e9228['service'][_0x46d032(0x131)]||_0x2e9228[_0x46d032(0x14c)][_0x46d032(0x13b)],'commands':_0x2e9228[_0x46d032(0x121)]['map'](_0x2d4d2d=>({'command':dynamicCommandName(_0x2d4d2d),'description':_0x2d4d2d[_0x46d032(0x141)]||_0x46d032(0x13d)+_0x2d4d2d[_0x46d032(0x126)],'tag':riskTag(_0x2d4d2d[_0x46d032(0x171)])}))};});}export function getDynamicServiceEntry(_0x510c58){const _0x2ef883=a65_0x4715;return listDynamicServiceEntries()[_0x2ef883(0x144)](_0x5c8716=>_0x5c8716['service']===_0x510c58);}export function listDynamicServiceDefinitions(_0x645cd8){const _0x18acba=a65_0x4715;return listLocalServiceTrees()[_0x18acba(0x120)](_0x5c394e=>!_0x645cd8||_0x5c394e['service']['code']===_0x645cd8)[_0x18acba(0x161)](_0xdad321=>_0xdad321['commands'][_0x18acba(0x103)](_0x459ace=>buildDynamicCommandDefinition(_0xdad321,_0x459ace)));}export function getDynamicServiceDefinitions(_0x429a59){const _0x441e28=a65_0x4715,_0x2acaf4=listDynamicServiceDefinitions(_0x429a59);return _0x2acaf4[_0x441e28(0x124)]>0x0?_0x2acaf4:undefined;}export function findDynamicServiceDefinition(_0x4ec3c2,_0x1a507a){const _0x64ac18=a65_0x4715;return listDynamicServiceDefinitions(_0x4ec3c2)[_0x64ac18(0x144)](_0x5c9a07=>_0x5c9a07[_0x64ac18(0x113)]===_0x1a507a);}export function buildDynamicCommandDefinition(_0x5682a2,_0x520026){const _0x24f378=a65_0x4715;return{'service':_0x5682a2[_0x24f378(0x14c)][_0x24f378(0x13b)],'command':dynamicCommandName(_0x520026),'description':_0x520026[_0x24f378(0x141)]||_0x24f378(0x13d)+_0x520026[_0x24f378(0x126)],'risk':_0x520026[_0x24f378(0x171)],..._0x520026[_0x24f378(0x171)]===_0x24f378(0x125)?{}:{'confirmationDescription':buildDynamicConfirmationDescription(_0x520026)},'requiresAuth':!![],'requiresAppCode':!![],'args':_0x520026[_0x24f378(0x170)][_0x24f378(0x103)](_0x77f6ec=>({'name':_0x77f6ec['name'],'description':_0x77f6ec[_0x24f378(0x141)]||_0x77f6ec[_0x24f378(0x131)],'required':_0x77f6ec[_0x24f378(0x14b)]})),'flags':_0x520026[_0x24f378(0x122)][_0x24f378(0x103)](flagToCommandFlag),'helpExtra':()=>renderDynamicCommandHelp(_0x520026),async 'dryRun'(_0x3266ad){const _0x42482d=_0x24f378,_0x3bebff=await compilePlan(_0x5682a2,_0x520026,_0x3266ad);return{'method':_0x42482d(0x108),'url':_0x520026['cliPath'],'body':{'target':targetPreview(_0x3bebff),'params':_0x3bebff['params']},'description':_0x42482d(0x166)+_0x520026[_0x42482d(0x126)]};},async 'execute'(_0x301532){const _0x38b051=_0x24f378,_0x5040df=await compilePlan(_0x5682a2,_0x520026,_0x301532),_0x439515=Date[_0x38b051(0x151)](),_0x37dcb4=await executePlan(_0x5040df,_0x520026,_0x301532),_0x5652a7=Date[_0x38b051(0x151)]()-_0x439515;return{'ok':!![],'data':{'service':_0x5682a2[_0x38b051(0x14c)],'command':_0x520026['cliPath'],'target':targetPreview(_0x5040df),'result':_0x37dcb4,'elapsed':_0x5652a7},'message':_0x38b051(0x118)+_0x520026[_0x38b051(0x126)]+_0x38b051(0x127)+_0x5652a7+'ms'};}};}function buildDynamicConfirmationDescription(_0x30ce38){const _0x3cbfe4=a65_0x4715,_0x3ad91b=_0x30ce38['description']||_0x30ce38[_0x3cbfe4(0x126)],_0x103400=_0x30ce38['risk']===_0x3cbfe4(0x169)?_0x3cbfe4(0x165):_0x3cbfe4(0x16d);return _0x3cbfe4(0x155)+_0x3ad91b+_0x3cbfe4(0x133)+_0x103400;}function dynamicCommandName(_0x3b9fa6){const _0x160634=a65_0x4715;return _0x3b9fa6[_0x160634(0x15e)][_0x160634(0x15a)](0x1)[_0x160634(0x10c)]('\x20');}function riskTag(_0x5e8169){const _0x3ed6cc=a65_0x4715;return _0x5e8169===_0x3ed6cc(0x125)?'':_0x3ed6cc(0x129)+_0x5e8169+']';}function flagToCommandFlag(_0x13d789){const _0x5d11f8=a65_0x4715;return{'name':_0x13d789[_0x5d11f8(0x10d)],'type':_0x13d789[_0x5d11f8(0x156)]===_0x5d11f8(0x12f)?_0x5d11f8(0x12b):_0x13d789[_0x5d11f8(0x156)],'description':_0x13d789[_0x5d11f8(0x141)]||_0x13d789[_0x5d11f8(0x131)],'required':_0x13d789[_0x5d11f8(0x14b)],'default':isPrimitiveFlagDefault(_0x13d789[_0x5d11f8(0x148)])?_0x13d789[_0x5d11f8(0x148)]:undefined,'enum':_0x13d789['enum']};}async function compilePlan(_0x551539,_0x238fb8,_0x141c4d){const _0x21cd64=a65_0x4715,_0x59a718=_0x238fb8[_0x21cd64(0x110)][_0x21cd64(0x167)]?_0x551539[_0x21cd64(0x115)][_0x238fb8[_0x21cd64(0x110)][_0x21cd64(0x167)]]:undefined;if(_0x59a718?.[_0x21cd64(0x140)]){const _0x4daf1a=isDev(_0x59a718[_0x21cd64(0x140)])?_0x21cd64(0x11d):normalizeEnv(_0x59a718[_0x21cd64(0x140)]);if(_0x4daf1a!==_0x141c4d[_0x21cd64(0x10a)])throw CliErrors[_0x21cd64(0x15c)]('Service\x20command\x20'+_0x238fb8[_0x21cd64(0x126)]+_0x21cd64(0x12c)+_0x4daf1a+_0x21cd64(0x15b)+_0x141c4d['envName']+'\x22.',_0x21cd64(0x13c));}return compileServiceTreeCommand(_0x238fb8,{'flags':_0x141c4d[_0x21cd64(0x10e)],'args':_0x141c4d[_0x21cd64(0x170)],'context':await buildServiceContext(_0x238fb8,_0x141c4d)});}function a65_0x1ceb(){const _0xcc8f77=['\x20\x20\x20\x20command:\x20','development','const','some','filter','commands','flags','tenantCode','length','read','cliPath','\x20completed\x20in\x20','1989144RwpTxb','\x20\x20[','309071vGiDNl','string','\x20requires\x20environment\x20\x22','username','sqlCode','json','bff','name','Use\x20lovrabet\x20dataset\x20list\x20to\x20confirm\x20the\x20physical\x20table\x20name\x20or\x20add\x20target.datasetCode\x20to\x20the\x20manifest.','\x22.\x20','\x22\x20to\x20a\x20datasetCode\x20in\x20app\x20','startsWith','Define\x20the\x20appRef\x20under\x20appBindings\x20or\x20remove\x20target.appRef.','tree','kind','padEnd','nickname','code','Check\x20the\x20service\x20binding\x20and\x20current\x20connection.\x20Do\x20not\x20switch\x20environments\x20or\x20credentials\x20automatically.','Run\x20service\x20command\x20','Cannot\x20resolve\x20datatable\x20\x22','564466PnWMdr','env','description','params','scriptName','find','remainingArgs','datasetCode','109425xkulbI','default','29178mevsdE','fromEntries','required','service','app','appcode','userName','bffCode','now','\x20requires\x20target.sqlCode.','Use\x20`','operator','This\x20will\x20run\x20Service\x20Tree\x20command\x20\x22','type','push','\x20\x20\x20\x20datasetCode:\x20','appCode','slice','\x22,\x20but\x20the\x20current\x20environment\x20is\x20\x22','validation','\x20requires\x20target.functionName.','fullPath','\x20<command>\x20[flags]','\x20\x20\x20\x20functionName:\x20','flatMap','\x20\x20MAP\x20TO','ctx.','datatable','The\x20manifest\x20marks\x20this\x20command\x20as\x20a\x20high-risk\x20write.\x20It\x20may\x20make\x20business\x20changes\x20that\x20are\x20hard\x20to\x20reverse.','Preview\x20dynamic\x20service\x20command:\x20','appRef','bffId','high-risk-write','`\x20to\x20inspect\x20the\x20manifest.','number','235jXPYLM','The\x20manifest\x20marks\x20this\x20command\x20as\x20a\x20write.\x20It\x20may\x20change\x20business\x20data\x20or\x20service\x20state.','mapTo','source','args','risk','userId','64cjUVgr','map','normalizedManifest','1670944DwClNz','nickName','employeeId','SERVICE_TREE','\x20\x20\x20\x20sqlCode:\x20','envName','\x20->\x20','join','cliName','rawFlags','\x20\x20\x20\x20kind:\x20\x20\x20\x20','target','\x20requires\x20target.datasetCode\x20or\x20target.datatable.','451068Sqefms','command','loginName','appBindings','Commands:','entries','Service\x20command\x20','\x20\x20\x20\x20datatable:\x20','dbtableConfig','data'];a65_0x1ceb=function(){return _0xcc8f77;};return a65_0x1ceb();}async function buildServiceContext(_0x349834,_0x30f16e){const _0x26bce2=a65_0x4715,_0x49830d={'appCode':_0x30f16e['appCode'],'env':_0x30f16e[_0x26bce2(0x10a)],'envName':_0x30f16e[_0x26bce2(0x10a)]};if(!usesRuntimeContext(_0x349834))return _0x49830d;const _0x2d8805=await getLoginUserInfo(),_0x4239c1=pickFirst(_0x2d8805[_0x26bce2(0x101)],_0x2d8805['id']);return{..._0x49830d,'user':_0x2d8805,'userId':_0x4239c1,'id':_0x2d8805['id'],'username':pickFirst(_0x2d8805[_0x26bce2(0x12d)],_0x2d8805['userName'],_0x2d8805[_0x26bce2(0x114)]),'userName':_0x2d8805[_0x26bce2(0x14f)],'nickname':pickFirst(_0x2d8805[_0x26bce2(0x13a)],_0x2d8805[_0x26bce2(0x106)]),'nickName':_0x2d8805[_0x26bce2(0x106)],'tenantCode':_0x2d8805[_0x26bce2(0x123)],'employeeId':_0x2d8805[_0x26bce2(0x107)]};}function usesRuntimeContext(_0x2692be){const _0x1ee6be=a65_0x4715;return _0x2692be[_0x1ee6be(0x16e)][_0x1ee6be(0x11f)](_0x50be9e=>typeof _0x50be9e[_0x1ee6be(0x16f)]==='string'&&(_0x50be9e[_0x1ee6be(0x16f)]['startsWith']('context.')||_0x50be9e[_0x1ee6be(0x16f)][_0x1ee6be(0x135)](_0x1ee6be(0x163))));}function pickFirst(..._0x10132d){const _0x492e97=a65_0x4715;return _0x10132d[_0x492e97(0x144)](_0x353a4a=>_0x353a4a!==undefined&&_0x353a4a!==null);}async function executePlan(_0x5e73f0,_0x509fb7,_0x3405b1){const _0x3d7c37=a65_0x4715;if(_0x5e73f0[_0x3d7c37(0x138)]===_0x3d7c37(0x11b)){const _0x15cd36=await resolveDatasetCode(_0x5e73f0,_0x509fb7,_0x3405b1);return executeData(_0x15cd36,_0x5e73f0[_0x3d7c37(0x113)],_0x5e73f0['params']);}if(_0x5e73f0['kind']==='sql'){if(!_0x5e73f0['sqlCode'])throw CliErrors[_0x3d7c37(0x15c)](_0x3d7c37(0x118)+_0x509fb7[_0x3d7c37(0x126)]+_0x3d7c37(0x152));return executeSdkSql(_0x5e73f0[_0x3d7c37(0x12e)],normalizeScalarParams(_0x5e73f0[_0x3d7c37(0x142)]));}if(_0x5e73f0[_0x3d7c37(0x138)]===_0x3d7c37(0x130)){const _0x2579b1=_0x5e73f0[_0x3d7c37(0x143)]||_0x5e73f0[_0x3d7c37(0x150)]||(_0x5e73f0['bffId']==null?'':String(_0x5e73f0[_0x3d7c37(0x168)]));if(!_0x2579b1)throw CliErrors['validation'](_0x3d7c37(0x118)+_0x509fb7['cliPath']+_0x3d7c37(0x15d));return executeSdkBff(_0x2579b1,_0x5e73f0['params']);}throw CliErrors[_0x3d7c37(0x15c)]('Unsupported\x20service\x20target\x20kind:\x20'+_0x5e73f0['kind']);}async function resolveDatasetCode(_0x4b1cfa,_0x5416e3,_0x15d9ca){const _0x38ad42=a65_0x4715;if(_0x4b1cfa[_0x38ad42(0x146)])return _0x4b1cfa[_0x38ad42(0x146)];if(!_0x4b1cfa[_0x38ad42(0x164)])throw CliErrors[_0x38ad42(0x15c)](_0x38ad42(0x118)+_0x5416e3[_0x38ad42(0x126)]+_0x38ad42(0x111));const _0xda2e36=await listDatasets(_0x15d9ca[_0x38ad42(0x159)]),_0x21c5e0=_0xda2e36[_0x38ad42(0x144)](_0x1ad904=>_0x1ad904[_0x38ad42(0x11a)]?.['tableName']===_0x4b1cfa[_0x38ad42(0x164)]);if(!_0x21c5e0?.[_0x38ad42(0x13b)])throw CliErrors[_0x38ad42(0x15c)](_0x38ad42(0x13e)+_0x4b1cfa[_0x38ad42(0x164)]+_0x38ad42(0x134)+_0x15d9ca['appCode']+'.',_0x38ad42(0x132));return _0x21c5e0['code'];}function applyAppBinding(_0x3e256e,_0x58adc3,_0x8f8070){const _0x34e592=a65_0x4715,_0x28f8dd=_0x58adc3[_0x34e592(0x110)][_0x34e592(0x167)];if(!_0x28f8dd)return;const _0x57ee26=_0x3e256e['appBindings'][_0x28f8dd];if(!_0x57ee26)throw CliErrors[_0x34e592(0x15c)]('Unknown\x20appRef\x20\x22'+_0x28f8dd+'\x22\x20in\x20service\x20command\x20'+_0x58adc3[_0x34e592(0x126)]+'.',_0x34e592(0x136));const _0x6df57a=_0x57ee26['appcode']||_0x57ee26[_0x34e592(0x159)];_0x6df57a&&!hasText(_0x8f8070[_0x34e592(0x14e)])&&!hasText(_0x8f8070[_0x34e592(0x14d)])&&(_0x8f8070[_0x34e592(0x14e)]=_0x6df57a),_0x57ee26['app']&&!hasText(_0x8f8070[_0x34e592(0x14d)])&&!hasText(_0x8f8070[_0x34e592(0x14e)])&&(_0x8f8070[_0x34e592(0x14d)]=_0x57ee26[_0x34e592(0x14d)]);}function renderDynamicCommandHelp(_0x4068c6){const _0x417c76=a65_0x4715,_0x146903=['\x20\x20SERVICE\x20TREE\x20TARGET',_0x417c76(0x10f)+_0x4068c6['target'][_0x417c76(0x138)],_0x417c76(0x11c)+_0x4068c6['target']['command']];if(_0x4068c6[_0x417c76(0x110)][_0x417c76(0x146)])_0x146903[_0x417c76(0x157)](_0x417c76(0x158)+_0x4068c6[_0x417c76(0x110)][_0x417c76(0x146)]);if(_0x4068c6[_0x417c76(0x110)]['datatable'])_0x146903[_0x417c76(0x157)](_0x417c76(0x119)+_0x4068c6[_0x417c76(0x110)][_0x417c76(0x164)]);if(_0x4068c6[_0x417c76(0x110)][_0x417c76(0x12e)])_0x146903[_0x417c76(0x157)](_0x417c76(0x109)+_0x4068c6[_0x417c76(0x110)]['sqlCode']);if(_0x4068c6['target'][_0x417c76(0x143)])_0x146903[_0x417c76(0x157)](_0x417c76(0x160)+_0x4068c6['target']['scriptName']);if(_0x4068c6['mapTo'][_0x417c76(0x124)]>0x0){_0x146903['push']('',_0x417c76(0x162));for(const _0x32470d of _0x4068c6[_0x417c76(0x16e)]){_0x146903[_0x417c76(0x157)]('\x20\x20\x20\x20'+(_0x32470d[_0x417c76(0x16f)]||_0x417c76(0x11e))+_0x417c76(0x10b)+_0x32470d['target']+(_0x32470d[_0x417c76(0x154)]?'.'+_0x32470d['operator']:''));}}return _0x146903[_0x417c76(0x10c)]('\x0a');}function targetPreview(_0x201b15){const _0x2bcf6c=a65_0x4715;return{'kind':_0x201b15[_0x2bcf6c(0x138)],'command':_0x201b15[_0x2bcf6c(0x113)],'appRef':_0x201b15[_0x2bcf6c(0x167)],'datasetCode':_0x201b15['datasetCode'],'datatable':_0x201b15[_0x2bcf6c(0x164)],'sqlCode':_0x201b15[_0x2bcf6c(0x12e)],'bffCode':_0x201b15[_0x2bcf6c(0x150)],'bffId':_0x201b15[_0x2bcf6c(0x168)],'functionName':_0x201b15[_0x2bcf6c(0x143)]};}function normalizeScalarParams(_0x31b388){const _0x542ab4=a65_0x4715;return Object[_0x542ab4(0x14a)](Object[_0x542ab4(0x117)](_0x31b388)[_0x542ab4(0x120)](([,_0x190854])=>typeof _0x190854==='string'||typeof _0x190854===_0x542ab4(0x16b)));}function hasText(_0x229911){const _0x4e8a4e=a65_0x4715;return typeof _0x229911===_0x4e8a4e(0x12b)&&_0x229911['trim']()[_0x4e8a4e(0x124)]>0x0;}function isPrimitiveFlagDefault(_0x1bd6bb){return _0x1bd6bb===undefined||typeof _0x1bd6bb==='string'||typeof _0x1bd6bb==='number'||typeof _0x1bd6bb==='boolean';}
|
|
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 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5d30cc,_0x24cd9b){const _0x423d49=a66_0x5593,_0x50ead9=_0x5d30cc();while(!![]){try{const _0x40842f=parseInt(_0x423d49(0x207))/0x1*(-parseInt(_0x423d49(0x20d))/0x2)+parseInt(_0x423d49(0x20b))/0x3*(-parseInt(_0x423d49(0x202))/0x4)+-parseInt(_0x423d49(0x1fa))/0x5*(-parseInt(_0x423d49(0x1f2))/0x6)+parseInt(_0x423d49(0x211))/0x7+parseInt(_0x423d49(0x1fb))/0x8+parseInt(_0x423d49(0x1f7))/0x9*(-parseInt(_0x423d49(0x209))/0xa)+parseInt(_0x423d49(0x1f1))/0xb;if(_0x40842f===_0x24cd9b)break;else _0x50ead9['push'](_0x50ead9['shift']());}catch(_0x2d0570){_0x50ead9['push'](_0x50ead9['shift']());}}}(a66_0x2962,0xbe36a));export function adaptServiceTreeManifestForLegacyFramework(_0x5c89db){const _0xefecf8=a66_0x5593,_0x255d45=cloneJsonValue(_0x5c89db),_0x2ee31f=[];if(!isObjectRecord(_0x255d45))return{'manifest':_0x255d45,'errors':_0x2ee31f};return Array[_0xefecf8(0x1f5)](_0x255d45['commands'])&&_0x255d45[_0xefecf8(0x20f)]['forEach']((_0xfab9fe,_0x136c9c)=>{const _0x537cc0=_0xefecf8;if(!isObjectRecord(_0xfab9fe))return;adaptBffTarget(_0xfab9fe['target'],_0x537cc0(0x1f0)+_0x136c9c+_0x537cc0(0x212),_0x2ee31f);}),adaptResources(_0x255d45[_0xefecf8(0x1f6)],_0xefecf8(0x204),_0x2ee31f),{'manifest':_0x255d45,'errors':_0x2ee31f};}export function toPublicServiceTreeTarget(_0x4a9c55){const _0x39d259=a66_0x5593,{scriptName:_0x475ba1,..._0x4e8d6f}=_0x4a9c55;return typeof _0x475ba1===_0x39d259(0x1f4)&&_0x475ba1[_0x39d259(0x210)]()&&(_0x4e8d6f[_0x39d259(0x20e)]=_0x475ba1),_0x4e8d6f;}export function toPublicNormalizedServiceTree(_0x28cd20){const _0x5d4b2c=a66_0x5593;return{..._0x28cd20,'commands':_0x28cd20[_0x5d4b2c(0x20f)][_0x5d4b2c(0x208)](_0xec103=>({..._0xec103,'target':toPublicServiceTreeTarget(_0xec103[_0x5d4b2c(0x214)])}))};}function adaptResources(_0x589054,_0x56ac3b,_0x40dfb3){const _0x3d2c2f=a66_0x5593;if(!isObjectRecord(_0x589054))return;for(const [_0x20595d,_0x4ce7b9]of Object[_0x3d2c2f(0x215)](_0x589054)){if(!isObjectRecord(_0x4ce7b9))continue;const _0x2d669e=_0x56ac3b+'.'+_0x20595d;if(isObjectRecord(_0x4ce7b9[_0x3d2c2f(0x213)]))for(const [_0x3a9f2d,_0x2d58a9]of Object['entries'](_0x4ce7b9[_0x3d2c2f(0x213)])){if(!isObjectRecord(_0x2d58a9))continue;const _0x1e039b=_0x2d669e+_0x3d2c2f(0x1fc)+_0x3a9f2d,_0xd5cbe8=isObjectRecord(_0x2d58a9[_0x3d2c2f(0x214)])&&_0x2d58a9[_0x3d2c2f(0x214)][_0x3d2c2f(0x1f3)]===_0x3d2c2f(0x200);adaptBffTarget(_0x2d58a9[_0x3d2c2f(0x214)],_0x1e039b+'.target',_0x40dfb3),(_0xd5cbe8||isBffAction(_0x2d58a9))&&adaptFunctionNameField(_0x2d58a9,_0x1e039b,_0x40dfb3);}adaptResources(_0x4ce7b9['resources'],_0x2d669e+'.resources',_0x40dfb3);}}function a66_0x5593(_0x1a74c1,_0x81dbaa){_0x1a74c1=_0x1a74c1-0x1f0;const _0x296249=a66_0x2962();let _0x559312=_0x296249[_0x1a74c1];return _0x559312;}function a66_0x2962(){const _0x2557d5=['functionName','commands','trim','3301599ncIjQd','].target','actions','target','entries','$.commands[','15435552CeSkBL','18lTuBFr','kind','string','isArray','resources','23355xDnkOX','bff.exec','fromEntries','667465yMbxUw','11894152dIlgIF','.actions.','Use\x20functionName;\x20scriptName\x20is\x20not\x20part\x20of\x20the\x20runtime\x20Service\x20Tree\x20contract.','hasOwnProperty','object','bff','action','4PYFSPV','functionName\x20must\x20be\x20a\x20non-empty\x20string.','$.resources','error','push','106377GRZmNC','map','3050eqTyfF','.functionName','3702465JnzpxK','scriptName','18bDPbgw'];a66_0x2962=function(){return _0x2557d5;};return a66_0x2962();}function adaptBffTarget(_0x56ebb2,_0xf3b00e,_0x4ec055){const _0x392a63=a66_0x5593;if(!isObjectRecord(_0x56ebb2)||_0x56ebb2[_0x392a63(0x1f3)]!==_0x392a63(0x200))return;adaptFunctionNameField(_0x56ebb2,_0xf3b00e,_0x4ec055);}function adaptFunctionNameField(_0x4ec949,_0xbab01b,_0x23432b){const _0x7456d2=a66_0x5593;Object['prototype'][_0x7456d2(0x1fe)]['call'](_0x4ec949,_0x7456d2(0x20c))&&_0x23432b[_0x7456d2(0x206)]({'level':_0x7456d2(0x205),'path':_0xbab01b+'.scriptName','message':_0x7456d2(0x1fd)});if(Object['prototype'][_0x7456d2(0x1fe)]['call'](_0x4ec949,_0x7456d2(0x20e))){if(typeof _0x4ec949[_0x7456d2(0x20e)]!=='string'||!_0x4ec949['functionName'][_0x7456d2(0x210)]()){_0x23432b[_0x7456d2(0x206)]({'level':_0x7456d2(0x205),'path':_0xbab01b+_0x7456d2(0x20a),'message':_0x7456d2(0x203)}),delete _0x4ec949[_0x7456d2(0x20e)];return;}_0x4ec949['scriptName']=_0x4ec949[_0x7456d2(0x20e)],delete _0x4ec949[_0x7456d2(0x20e)];}}function isBffAction(_0x2d9c34){const _0x46caab=a66_0x5593;return _0x2d9c34['kind']===_0x46caab(0x200)||_0x2d9c34[_0x46caab(0x201)]===_0x46caab(0x1f8)||_0x2d9c34[_0x46caab(0x214)]===_0x46caab(0x1f8);}function cloneJsonValue(_0x235718){const _0x592929=a66_0x5593;if(Array[_0x592929(0x1f5)](_0x235718))return _0x235718['map'](_0xc863d2=>cloneJsonValue(_0xc863d2));if(isObjectRecord(_0x235718))return Object[_0x592929(0x1f9)](Object['entries'](_0x235718)[_0x592929(0x208)](([_0x448118,_0x1b8518])=>[_0x448118,cloneJsonValue(_0x1b8518)]));return _0x235718;}function isObjectRecord(_0x2ccab6){const _0x52ef50=a66_0x5593;return Boolean(_0x2ccab6)&&typeof _0x2ccab6===_0x52ef50(0x1ff)&&!Array[_0x52ef50(0x1f5)](_0x2ccab6);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a67_0x571d(_0x18e91c,_0x5ae27c){_0x18e91c=_0x18e91c-0x1d8;const _0x1b77b3=a67_0x1b77();let _0x571dc0=_0x1b77b3[_0x18e91c];return _0x571dc0;}const a67_0xe9936d=a67_0x571d;(function(_0xb717d2,_0x54f77e){const _0x1c3720=a67_0x571d,_0x2d5a21=_0xb717d2();while(!![]){try{const _0x318cd6=-parseInt(_0x1c3720(0x1d9))/0x1+parseInt(_0x1c3720(0x1e6))/0x2+-parseInt(_0x1c3720(0x1f6))/0x3*(-parseInt(_0x1c3720(0x1f1))/0x4)+parseInt(_0x1c3720(0x1df))/0x5*(-parseInt(_0x1c3720(0x205))/0x6)+parseInt(_0x1c3720(0x207))/0x7+parseInt(_0x1c3720(0x20a))/0x8*(-parseInt(_0x1c3720(0x1e0))/0x9)+parseInt(_0x1c3720(0x1fc))/0xa*(parseInt(_0x1c3720(0x203))/0xb);if(_0x318cd6===_0x54f77e)break;else _0x2d5a21['push'](_0x2d5a21['shift']());}catch(_0x35c65b){_0x2d5a21['push'](_0x2d5a21['shift']());}}}(a67_0x1b77,0x5864b));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':a67_0xe9936d(0x215),'type':a67_0xe9936d(0x1e9),'required':!![],'description':a67_0xe9936d(0x1f2)},SERVICE_FLAG={'name':'service','type':a67_0xe9936d(0x1e9),'required':!![],'description':'Local\x20service\x20code,\x20for\x20example\x20crm','pattern':{'regex':/^[a-z][a-z0-9-]*$/,'description':a67_0xe9936d(0x1e2)}};function summarizeService(_0xb406c7){const _0x379b0c=a67_0xe9936d;return{'serviceCode':_0xb406c7['serviceCode'],'name':_0xb406c7[_0x379b0c(0x1e3)][_0x379b0c(0x1ff)][_0x379b0c(0x1d8)],'version':_0xb406c7[_0x379b0c(0x1eb)],'importedAt':_0xb406c7['importedAt'],'source':_0xb406c7['source'],'commandCount':_0xb406c7['normalizedManifest']['commands'][_0x379b0c(0x202)],'commands':_0xb406c7[_0x379b0c(0x1e3)][_0x379b0c(0x219)][_0x379b0c(0x20f)](_0x2433fd=>({'path':_0x2433fd[_0x379b0c(0x1f8)],'description':_0x2433fd['description'],'risk':_0x2433fd[_0x379b0c(0x1dd)],'target':toPublicServiceTreeTarget(_0x2433fd[_0x379b0c(0x20e)]),'flags':_0x2433fd['flags'][_0x379b0c(0x20f)](_0xf03a94=>({'name':_0xf03a94[_0x379b0c(0x1d8)],'cliName':_0xf03a94['cliName'],'type':_0xf03a94[_0x379b0c(0x1fe)],'required':_0xf03a94['required']===!![]}))}))};}function a67_0x1b77(){const _0x1f9e73=['586926brwXxe','Imported','Service\x20registry\x20validation\x20passed.','WRITE','risk','manifests','360VPGNBR','5751099jRxtbr','serviceCode','lower\x20kebab-case\x20service\x20code','normalizedManifest','replaced','Preview\x20Service\x20Tree\x20removal\x20from\x20~/.lovrabet/service.json','1280282EuOTWP','registry','read','string','Preview\x20Service\x20Tree\x20export\x20from\x20~/.lovrabet/service.json','version','registryServiceCode','Removes\x20the\x20given\x20service\x20manifest\x20from\x20the\x20local\x20Service\x20Tree\x20registry.\x20Dynamic\x20commands\x20from\x20that\x20manifest\x20will\x20no\x20longer\x20be\x20available.','filePath','source','Export\x20the\x20local\x20Service\x20Tree\x20manifest\x20to\x20a\x20JSON\x20file','4LwPDRx','Service\x20Tree\x20manifest\x20file\x20path','entries','imported','hash','751821gFhzxi','str','cliPath','report','manifest','\x20service\x20','45460RuVSQD','Validate\x20a\x20Service\x20Tree\x20JSON\x20manifest','type','service','Preview\x20Service\x20Tree\x20import\x20into\x20~/.lovrabet/service.json','Removed\x20service\x20','length','2728YbWFUl','import','59118qRQsIY','Updated','1954792gDtBPl','entry','serviceCount','8EBOdFn','kind','updated','warnings','target','map','list','Remove\x20a\x20Service\x20Tree\x20manifest\x20from\x20the\x20local\x20runtime\x20registry','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.','errors','registryPath','file','write','Service\x20manifest\x20validation\x20passed.','registryIndex','commands','Import\x20a\x20Service\x20Tree\x20manifest\x20into\x20the\x20local\x20runtime\x20registry','name'];a67_0x1b77=function(){return _0x1f9e73;};return a67_0x1b77();}function summarizeLoadedManifest(_0x470427){const _0x1a6ef7=a67_0xe9936d;return{'service':_0x470427[_0x1a6ef7(0x1e3)]?.['service'],'version':_0x470427[_0x1a6ef7(0x1e3)]?.['version'],'commandCount':_0x470427[_0x1a6ef7(0x1e3)]?.[_0x1a6ef7(0x219)][_0x1a6ef7(0x202)]??0x0,'commands':_0x470427['normalizedManifest']?.[_0x1a6ef7(0x219)][_0x1a6ef7(0x20f)](_0x525268=>({'path':_0x525268[_0x1a6ef7(0x1f8)],'risk':_0x525268['risk'],'target':toPublicServiceTreeTarget(_0x525268[_0x1a6ef7(0x20e)])}))??[],'registryIndex':_0x470427[_0x1a6ef7(0x218)],'registryServiceCode':_0x470427[_0x1a6ef7(0x1ec)],'errors':_0x470427[_0x1a6ef7(0x1f9)][_0x1a6ef7(0x213)],'warnings':_0x470427['report'][_0x1a6ef7(0x20d)]};}export const serviceDefinitions=[{'service':a67_0xe9936d(0x1ff),'command':'validate','description':a67_0xe9936d(0x1fd),'risk':a67_0xe9936d(0x1e8),'requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'execute'(_0x2927b0){const _0x3b20ec=a67_0xe9936d,_0x198f3c=loadServiceManifestFromFile(_0x2927b0[_0x3b20ec(0x1f7)](_0x3b20ec(0x215)));if(!_0x198f3c[_0x3b20ec(0x1f9)]['ok'])return{'ok':![],'data':{'file':_0x198f3c[_0x3b20ec(0x1ee)],'hash':_0x198f3c['hash'],'kind':_0x198f3c[_0x3b20ec(0x20b)],'serviceCount':_0x198f3c['manifests'][_0x3b20ec(0x202)],'services':_0x198f3c['manifests'][_0x3b20ec(0x20f)](summarizeLoadedManifest),'errors':_0x198f3c[_0x3b20ec(0x1f9)][_0x3b20ec(0x213)],'warnings':_0x198f3c[_0x3b20ec(0x1f9)]['warnings']},'message':formatValidationFailure(_0x198f3c['report'])};if(_0x198f3c[_0x3b20ec(0x20b)]===_0x3b20ec(0x1e7)||_0x198f3c[_0x3b20ec(0x1de)][_0x3b20ec(0x202)]!==0x1)return{'ok':!![],'data':{'file':_0x198f3c[_0x3b20ec(0x1ee)],'hash':_0x198f3c[_0x3b20ec(0x1f5)],'kind':_0x198f3c[_0x3b20ec(0x20b)],'serviceCount':_0x198f3c[_0x3b20ec(0x1de)][_0x3b20ec(0x202)],'commandCount':_0x198f3c['manifests']['reduce']((_0x298e19,_0x2c35d3)=>_0x298e19+(_0x2c35d3[_0x3b20ec(0x1e3)]?.['commands']['length']??0x0),0x0),'services':_0x198f3c[_0x3b20ec(0x1de)][_0x3b20ec(0x20f)](summarizeLoadedManifest),'warnings':_0x198f3c[_0x3b20ec(0x1f9)]['warnings']},'message':_0x3b20ec(0x1db)};return{'ok':!![],'data':{'file':_0x198f3c[_0x3b20ec(0x1ee)],'hash':_0x198f3c[_0x3b20ec(0x1f5)],'kind':_0x198f3c[_0x3b20ec(0x20b)],'service':_0x198f3c[_0x3b20ec(0x1e3)]?.[_0x3b20ec(0x1ff)],'version':_0x198f3c[_0x3b20ec(0x1e3)]?.['version'],'commandCount':_0x198f3c[_0x3b20ec(0x1e3)]?.[_0x3b20ec(0x219)][_0x3b20ec(0x202)]??0x0,'commands':_0x198f3c[_0x3b20ec(0x1e3)]?.[_0x3b20ec(0x219)][_0x3b20ec(0x20f)](_0x462648=>({'path':_0x462648[_0x3b20ec(0x1f8)],'risk':_0x462648['risk'],'target':toPublicServiceTreeTarget(_0x462648[_0x3b20ec(0x20e)])})),'warnings':_0x198f3c['report'][_0x3b20ec(0x20d)]},'message':_0x3b20ec(0x217)};}},{'service':a67_0xe9936d(0x1ff),'command':a67_0xe9936d(0x204),'description':a67_0xe9936d(0x21a),'risk':a67_0xe9936d(0x216),'confirmationDescription':a67_0xe9936d(0x212),'requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'dryRun'(_0x57667a){const _0x46fb36=a67_0xe9936d,_0xe28f5b=loadServiceManifestFromFile(_0x57667a[_0x46fb36(0x1f7)](_0x46fb36(0x215)));return{'method':_0x46fb36(0x1dc),'url':getServiceRegistryPath(),'body':{'file':_0xe28f5b[_0x46fb36(0x1ee)],'hash':_0xe28f5b['hash'],'kind':_0xe28f5b[_0x46fb36(0x20b)],'ok':_0xe28f5b['report']['ok'],'service':_0xe28f5b[_0x46fb36(0x1e3)]?.[_0x46fb36(0x1ff)],'version':_0xe28f5b[_0x46fb36(0x1e3)]?.['version'],'serviceCount':_0xe28f5b[_0x46fb36(0x1de)][_0x46fb36(0x202)],'services':_0xe28f5b[_0x46fb36(0x1de)][_0x46fb36(0x20f)](_0x44abc8=>({'service':_0x44abc8[_0x46fb36(0x1e3)]?.[_0x46fb36(0x1ff)],'version':_0x44abc8[_0x46fb36(0x1e3)]?.[_0x46fb36(0x1eb)],'commandCount':_0x44abc8['normalizedManifest']?.[_0x46fb36(0x219)][_0x46fb36(0x202)]??0x0,'errors':_0x44abc8[_0x46fb36(0x1f9)]['errors']})),'errors':_0xe28f5b[_0x46fb36(0x1f9)][_0x46fb36(0x213)],'commandCount':_0xe28f5b['normalizedManifest']?.['commands'][_0x46fb36(0x202)]??0x0},'description':_0x46fb36(0x200)};},async 'execute'(_0x2060cc){const _0x1cee82=a67_0xe9936d,_0x5ae4a6=importServiceManifest(_0x2060cc[_0x1cee82(0x1f7)]('file'));if(_0x5ae4a6[_0x1cee82(0x1f3)][_0x1cee82(0x202)]!==0x1)return{'ok':!![],'data':{'registryPath':_0x5ae4a6['registryPath'],'imported':_0x5ae4a6[_0x1cee82(0x1f4)],'updated':_0x5ae4a6[_0x1cee82(0x20c)],'serviceCount':_0x5ae4a6[_0x1cee82(0x209)],'services':_0x5ae4a6[_0x1cee82(0x1f3)]['map'](summarizeService)},'message':'Imported\x20'+_0x5ae4a6[_0x1cee82(0x1f4)]+'\x20service(s),\x20updated\x20'+_0x5ae4a6['updated']+'\x20service(s).'};return{'ok':!![],'data':{'registryPath':_0x5ae4a6[_0x1cee82(0x214)],'replaced':_0x5ae4a6[_0x1cee82(0x1e4)],'imported':_0x5ae4a6[_0x1cee82(0x1f4)],'updated':_0x5ae4a6['updated'],'serviceCount':_0x5ae4a6[_0x1cee82(0x209)],'service':summarizeService(_0x5ae4a6[_0x1cee82(0x208)])},'message':(_0x5ae4a6[_0x1cee82(0x1e4)]?_0x1cee82(0x206):_0x1cee82(0x1da))+_0x1cee82(0x1fb)+_0x5ae4a6[_0x1cee82(0x208)][_0x1cee82(0x1e1)]+'.'};}},{'service':a67_0xe9936d(0x1ff),'command':'export','description':a67_0xe9936d(0x1f0),'risk':'write','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'(_0x46e097){const _0x512a62=a67_0xe9936d,_0x770316=getLocalServiceEntry(_0x46e097['str']('service'));return{'method':_0x512a62(0x1dc),'url':_0x46e097[_0x512a62(0x1f7)]('file'),'body':{'service':_0x46e097['str'](_0x512a62(0x1ff)),'found':Boolean(_0x770316),'version':_0x770316?.[_0x512a62(0x1eb)],'source':_0x770316?.[_0x512a62(0x1ef)]},'description':_0x512a62(0x1ea)};},async 'execute'(_0x366df3){const _0x3babbf=a67_0xe9936d,_0x736b95=exportServiceManifest(_0x366df3[_0x3babbf(0x1f7)](_0x3babbf(0x1ff)),_0x366df3[_0x3babbf(0x1f7)](_0x3babbf(0x215)));return{'ok':!![],'data':{'registryPath':_0x736b95[_0x3babbf(0x214)],'file':_0x736b95[_0x3babbf(0x1ee)],'service':summarizeService(_0x736b95[_0x3babbf(0x208)])},'message':'Exported\x20service\x20'+_0x736b95[_0x3babbf(0x208)][_0x3babbf(0x1e1)]+'.'};}},{'service':a67_0xe9936d(0x1ff),'command':a67_0xe9936d(0x210),'description':'List\x20locally\x20imported\x20Service\x20Tree\x20manifests','risk':a67_0xe9936d(0x1e8),'requiresAuth':![],'requiresAppCode':![],'flags':[],async 'execute'(){const _0x184712=a67_0xe9936d,_0x3f4ecb=listLocalServices();return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'total':_0x3f4ecb[_0x184712(0x202)],'services':_0x3f4ecb[_0x184712(0x20f)](summarizeService)}};}},{'service':'service','command':'remove','description':a67_0xe9936d(0x211),'risk':a67_0xe9936d(0x216),'confirmationDescription':a67_0xe9936d(0x1ed),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'dryRun'(_0x5ca82e){const _0x54d718=a67_0xe9936d,_0x2f6d6a=getLocalServiceEntry(_0x5ca82e[_0x54d718(0x1f7)](_0x54d718(0x1ff)));return{'method':_0x54d718(0x1dc),'url':getServiceRegistryPath(),'body':{'service':_0x5ca82e['str'](_0x54d718(0x1ff)),'found':Boolean(_0x2f6d6a),'version':_0x2f6d6a?.[_0x54d718(0x1eb)],'source':_0x2f6d6a?.[_0x54d718(0x1ef)]},'description':_0x54d718(0x1e5)};},async 'execute'(_0x2b0222){const _0x32ebd4=a67_0xe9936d,_0x11de01=removeServiceManifest(_0x2b0222[_0x32ebd4(0x1f7)]('service'));return{'ok':!![],'data':{'registryPath':_0x11de01[_0x32ebd4(0x214)],'serviceCount':_0x11de01[_0x32ebd4(0x209)],'service':summarizeService(_0x11de01[_0x32ebd4(0x208)])},'message':_0x32ebd4(0x201)+_0x11de01['entry'][_0x32ebd4(0x1e1)]+'.'};}},{'service':a67_0xe9936d(0x1ff),'command':'detail','description':'Show\x20a\x20locally\x20imported\x20Service\x20Tree\x20manifest','risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'execute'(_0xff3aec){const _0xae772a=a67_0xe9936d,_0x4285e0=getLocalServiceEntry(_0xff3aec[_0xae772a(0x1f7)](_0xae772a(0x1ff)));if(!_0x4285e0)return{'ok':![],'data':{'registryPath':getServiceRegistryPath(),'service':_0xff3aec[_0xae772a(0x1f7)](_0xae772a(0x1ff))},'message':'Local\x20service\x20not\x20found:\x20'+_0xff3aec[_0xae772a(0x1f7)](_0xae772a(0x1ff))};return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'service':summarizeService(_0x4285e0),'manifest':_0x4285e0[_0xae772a(0x1fa)],'normalizedManifest':toPublicNormalizedServiceTree(_0x4285e0[_0xae772a(0x1e3)])}};}}];
|
|
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)])}};}}];
|