@lovrabet/lovrabet-cli 2.3.10-beta.3 → 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.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-sdk-errors.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/access-error.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/raw-flags.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-import/auto-id-runner.js +1 -1
- package/lib/services/dataset-import/excel-reader.js +1 -1
- package/lib/services/dataset-import/image-bytes.js +1 -1
- package/lib/services/dataset-import/image-ooxml.js +1 -1
- package/lib/services/dataset-import/image-runner.js +1 -1
- package/lib/services/dataset-import/metadata.js +1 -1
- package/lib/services/dataset-import/preview.js +1 -1
- package/lib/services/dataset-import/runner.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/install-target.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/utils/access-key-redaction.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/positive-safe-integer.js +1 -1
- package/lib/utils/redaction.js +1 -1
- package/lib/utils/runtime-user-id.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/lovrabet/SKILL.md +1 -1
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -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
|
-
|
|
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
|
-
function
|
|
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_0x1e9bfe=a59_0x5cc3;(function(_0x4853d6,_0x55e06d){const _0x3bbf36=a59_0x5cc3,_0xd93194=_0x4853d6();while(!![]){try{const _0x5091fc=-parseInt(_0x3bbf36(0x7a))/0x1*(parseInt(_0x3bbf36(0xaa))/0x2)+parseInt(_0x3bbf36(0x85))/0x3*(-parseInt(_0x3bbf36(0x92))/0x4)+parseInt(_0x3bbf36(0x77))/0x5*(-parseInt(_0x3bbf36(0x75))/0x6)+parseInt(_0x3bbf36(0xb6))/0x7+parseInt(_0x3bbf36(0xb5))/0x8*(parseInt(_0x3bbf36(0xab))/0x9)+-parseInt(_0x3bbf36(0x9c))/0xa*(-parseInt(_0x3bbf36(0x8d))/0xb)+parseInt(_0x3bbf36(0x6e))/0xc;if(_0x5091fc===_0x55e06d)break;else _0xd93194['push'](_0xd93194['shift']());}catch(_0x2c46a0){_0xd93194['push'](_0xd93194['shift']());}}}(a59_0x3fec,0xa5c06));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_0x1e9bfe(0x9e),a59_0x1e9bfe(0x6c),'OWNER','CUSTOM'];const BUILTIN_ROLE_TYPES=[a59_0x1e9bfe(0x9e),a59_0x1e9bfe(0x6c),'OWNER'];export const ROLE_ID_FLAG={'name':'id','type':a59_0x1e9bfe(0x8a),'required':!![],'description':'Runtime\x20role\x20ID\x20returned\x20by\x20role\x20list'};export const ROLE_REF_FLAG={'name':a59_0x1e9bfe(0x96),'type':a59_0x1e9bfe(0xa2),'required':!![],'description':a59_0x1e9bfe(0xa7)};export const ROLE_CODE_FLAG={'name':a59_0x1e9bfe(0xa9),'type':a59_0x1e9bfe(0xa2),'description':a59_0x1e9bfe(0x7d)};function a59_0x3fec(){const _0x27444c=['role','user','\x20is\x20not\x20in\x20runtime\x20role\x20','\x22\x20was\x20not\x20found\x20in\x20app\x20','length','Cannot\x20','20rdNvPY','items','ADMIN','str','user-add','Runtime\x20user\x20','string','userId','Runtime\x20role\x20member\x20count\x20changed:\x20expected\x20','Missing\x20runtime\x20role\x20reference.','filter','Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name','join','role-code','1071332NTPcDn','9jbckfR','\x20built-in\x20runtime\x20role\x20','includes','Runtime\x20role\x20has\x20an\x20invalid\x20ID;\x20reload\x20roles\x20before\x20writing.','--role-code\x20cannot\x20exceed\x2064\x20characters.','roleType','totalCount','userCount','Role\x20ID\x20must\x20be\x20a\x20positive\x20integer.','Pass\x20--user\x20<userId>;\x20name\x20and\x20account\x20lookup\x20are\x20not\x20available\x20in\x20runtime\x20scope.','3286664ebmZRs','976150RsUtTB','map','applyUserList','User\x20','isSafeInteger','Runtime\x20role\x20id\x20','push','USER','appCode','6916548MLwHPa','num','userList','flag','Pass\x20one\x20role\x20ID:\x20','CUSTOM','Use\x20a\x20userId\x20returned\x20by\x20the\x20current\x20application\x27s\x20personnel\x20list.','387444WTwFoh','validation','5mPUefa','permitCount','Runtime\x20role\x20name\x20\x22','1AQYELZ','Runtime\x20userId\x20(string)','userName','Globally\x20unique\x20roleCode\x20(maximum\x2064\x20characters)','find','trim','Read\x20the\x20current\x20members\x20and\x20retry\x20with\x20the\x20new\x20expected\x20count.','\x20was\x20not\x20found\x20in\x20app\x20','\x20is\x20already\x20in\x20runtime\x20role\x20','Invalid\x20runtime\x20userId.','\x22\x20is\x20ambiguous.','729777ArqZbK','Runtime\x20role\x20member\x20snapshot\x20has\x20an\x20invalid\x20role\x20ID;\x20reload\x20before\x20writing.','Reload\x20the\x20role\x20list\x20and\x20retry\x20after\x20the\x20server\x20state\x20is\x20consistent.','Reject\x20when\x20the\x20target\x20role\x20member\x20count\x20has\x20changed','paging','number','Run\x20`lovrabet\x20role\x20list`\x20and\x20use\x20a\x20role\x20from\x20the\x20current\x20app.','Runtime\x20role\x20','3514577ZShmBV','remark','runtime','roleName','expect-user-count','8MowwaU','OWNER\x20runtime\x20role\x20membership\x20cannot\x20be\x20changed\x20with\x20this\x20command.','\x20is\x20missing\x20from\x20the\x20grouped\x20member\x20snapshot.','--role-code\x20must\x20not\x20be\x20blank.'];a59_0x3fec=function(){return _0x27444c;};return a59_0x3fec();}export const USER_ID_FLAG={'name':a59_0x1e9bfe(0x97),'type':a59_0x1e9bfe(0xa2),'required':!![],'description':a59_0x1e9bfe(0x7b)};export const EXPECT_USER_COUNT_FLAG={'name':'expect-user-count','type':'number','description':a59_0x1e9bfe(0x88)};export function isBuiltinRuntimeRole(_0x35de5e){const _0x43c0b3=a59_0x1e9bfe;return BUILTIN_ROLE_TYPES[_0x43c0b3(0xad)](_0x35de5e);}export function assertCustomRuntimeRole(_0x218f0b,_0x5e5b1d){const _0x2c41e8=a59_0x1e9bfe;if(_0x218f0b[_0x2c41e8(0xb0)]!==_0x2c41e8(0x73))throw CliErrors['validation'](_0x2c41e8(0x9b)+_0x5e5b1d+_0x2c41e8(0xac)+_0x218f0b[_0x2c41e8(0x90)]+'\x20('+_0x218f0b[_0x2c41e8(0xb0)]+').','Only\x20CUSTOM\x20runtime\x20roles\x20can\x20be\x20modified\x20or\x20deleted.');}export function projectRuntimeRole(_0x206051){const _0x14345c=a59_0x1e9bfe;return{'id':_0x206051['id'],'roleCode':_0x206051['roleCode'],'roleName':_0x206051[_0x14345c(0x90)],'roleType':_0x206051[_0x14345c(0xb0)],'remark':_0x206051[_0x14345c(0x8e)],'userCount':_0x206051[_0x14345c(0xb2)]??0x0,'permitCount':_0x206051[_0x14345c(0x78)]??0x0,'builtin':isBuiltinRuntimeRole(_0x206051[_0x14345c(0xb0)])};}export function readOptionalRuntimeRoleCode(_0x3250a0){const _0x4167ef=a59_0x1e9bfe,_0x5503b3=_0x3250a0[_0x4167ef(0x71)]('role-code');if(_0x5503b3===undefined||_0x5503b3===null)return undefined;const _0x2aa889=String(_0x5503b3)[_0x4167ef(0x7f)]();if(!_0x2aa889)throw CliErrors[_0x4167ef(0x76)](_0x4167ef(0x95));if(_0x2aa889[_0x4167ef(0x9a)]>0x40)throw CliErrors[_0x4167ef(0x76)](_0x4167ef(0xaf));return _0x2aa889;}export async function getRuntimeRoleById(_0x88feb1,_0x21363e){const _0x8f93d0=a59_0x1e9bfe;if(!Number[_0x8f93d0(0x69)](_0x21363e)||_0x21363e<=0x0)throw CliErrors['validation'](_0x8f93d0(0xb3));const _0x2646f0=(await listAllRuntimeRoles(_0x88feb1))[_0x8f93d0(0xa6)](_0x3dbe0f=>_0x3dbe0f['id']===_0x21363e&&(!_0x3dbe0f[_0x8f93d0(0x6d)]||_0x3dbe0f[_0x8f93d0(0x6d)]===_0x88feb1));if(_0x2646f0['length']!==0x1)throw CliErrors[_0x8f93d0(0x76)](_0x8f93d0(0x6a)+_0x21363e+_0x8f93d0(0x81)+_0x88feb1+'.',_0x8f93d0(0x8b));const _0x2893e3=_0x2646f0[0x0],_0x442118=_0x2893e3['id'];if(typeof _0x442118!==_0x8f93d0(0x8a)||!Number[_0x8f93d0(0x69)](_0x442118)||_0x442118<=0x0)throw CliErrors[_0x8f93d0(0x76)](_0x8f93d0(0xae));return{..._0x2893e3,'id':_0x442118};}function a59_0x5cc3(_0x1b0623,_0x58f805){_0x1b0623=_0x1b0623-0x67;const _0x3fecc0=a59_0x3fec();let _0x5cc317=_0x3fecc0[_0x1b0623];return _0x5cc317;}export async function listAllRuntimeRoles(_0xd450e7,_0x164b74={}){const _0x17a9b2=a59_0x1e9bfe,_0xc60f9=0x64,_0x3266cc=[];for(let _0x3b4b83=0x1;;_0x3b4b83+=0x1){const _0x5454a2=await listRuntimeAppRoles(_0xd450e7,{..._0x164b74[_0x17a9b2(0x90)]?{'roleName':_0x164b74[_0x17a9b2(0x90)]}:{},'currentPage':_0x3b4b83,'pageSize':_0xc60f9});_0x3266cc['push'](..._0x5454a2[_0x17a9b2(0x9d)]);if(_0x5454a2[_0x17a9b2(0x9d)][_0x17a9b2(0x9a)]<_0xc60f9||_0x5454a2['paging']&&_0x3266cc[_0x17a9b2(0x9a)]>=_0x5454a2[_0x17a9b2(0x89)][_0x17a9b2(0xb1)])return _0x3266cc;}}export async function resolveRuntimeRoleRef(_0x27e557,_0x5b4685){const _0x46b1e6=a59_0x1e9bfe,_0x2d5c7a=_0x5b4685[_0x46b1e6(0x7f)]();if(!_0x2d5c7a)throw CliErrors[_0x46b1e6(0x76)](_0x46b1e6(0xa5),'Pass\x20--role\x20<id|name>.');if(/^\d+$/['test'](_0x2d5c7a))return getRuntimeRoleById(_0x27e557,Number(_0x2d5c7a));const _0x33f8b8=(await listAllRuntimeRoles(_0x27e557))[_0x46b1e6(0xa6)](_0x3e360d=>_0x3e360d[_0x46b1e6(0x90)]===_0x2d5c7a);if(_0x33f8b8[_0x46b1e6(0x9a)]===0x0)throw CliErrors[_0x46b1e6(0x76)](_0x46b1e6(0x79)+_0x2d5c7a+_0x46b1e6(0x99)+_0x27e557+'.','Run\x20`lovrabet\x20role\x20list`\x20or\x20pass\x20--role\x20<id>.');if(_0x33f8b8[_0x46b1e6(0x9a)]>0x1)throw CliErrors[_0x46b1e6(0x76)]('Runtime\x20role\x20name\x20\x22'+_0x2d5c7a+_0x46b1e6(0x84),_0x46b1e6(0x72)+_0x33f8b8[_0x46b1e6(0xb7)](_0x574d4c=>_0x574d4c['id'])[_0x46b1e6(0xa8)](',\x20')+'.');const _0x305dea=_0x33f8b8[0x0],_0x1586f0=_0x305dea['id'];if(typeof _0x1586f0!==_0x46b1e6(0x8a)||!Number['isSafeInteger'](_0x1586f0)||_0x1586f0<=0x0)throw CliErrors[_0x46b1e6(0x76)](_0x46b1e6(0xae));return{..._0x305dea,'id':_0x1586f0};}function parseRuntimeUserId(_0x80a2f1){const _0x20bcfe=a59_0x1e9bfe,_0x542a37=_0x80a2f1[_0x20bcfe(0x7f)](),_0x10a775=normalizeRuntimeUserId(_0x542a37);if(_0x10a775===undefined)throw CliErrors[_0x20bcfe(0x76)](_0x20bcfe(0x83),_0x20bcfe(0xb4));return _0x10a775;}export async function prepareRuntimeMemberMutation(_0x1357a9,_0x65a5cd){const _0x50b19a=a59_0x1e9bfe,_0x1c667a=await resolveRuntimeRoleRef(_0x1357a9[_0x50b19a(0x6d)],_0x1357a9[_0x50b19a(0x9f)](_0x50b19a(0x96)));if(_0x1c667a[_0x50b19a(0xb0)]==='OWNER')throw CliErrors[_0x50b19a(0x76)](_0x50b19a(0x93),'Transfer\x20or\x20manage\x20application\x20ownership\x20through\x20the\x20dedicated\x20application\x20workflow.');const _0x1068c7=parseRuntimeUserId(_0x1357a9[_0x50b19a(0x9f)]('user')),_0x2efecd=(await listRuntimeRoleUsers(_0x1357a9[_0x50b19a(0x6d)]))[_0x50b19a(0xb7)](_0x452345=>{const _0x333783=_0x50b19a;if(typeof _0x452345['id']!==_0x333783(0x8a)||!Number[_0x333783(0x69)](_0x452345['id'])||_0x452345['id']<=0x0)throw CliErrors[_0x333783(0x76)](_0x333783(0x86));return{..._0x452345,'userList':[..._0x452345[_0x333783(0x70)]??[]],'applyUserList':[..._0x452345[_0x333783(0x67)]??[]]};}),_0x82810a=_0x2efecd[_0x50b19a(0x7e)](_0x30fe9a=>_0x30fe9a['id']===_0x1c667a['id']);if(!_0x82810a)throw CliErrors['validation'](_0x50b19a(0x8c)+_0x1c667a['id']+_0x50b19a(0x94),_0x50b19a(0x87));const _0xf5453f=_0x52e62d=>{const _0x55b1b0=_0x50b19a,_0x18c94d=normalizeRuntimeUserId(_0x52e62d);if(_0x18c94d===undefined)throw CliErrors[_0x55b1b0(0x76)]('Runtime\x20role\x20member\x20has\x20an\x20invalid\x20userId.');return _0x18c94d;},_0x2cba12=_0x82810a['userList'][_0x50b19a(0xb7)](_0x517f1f=>_0xf5453f(_0x517f1f[_0x50b19a(0xa3)])),_0x1060ff=_0x1357a9[_0x50b19a(0x71)](_0x50b19a(0x91));if(_0x1060ff!==undefined&&_0x1060ff!==null&&_0x1060ff!==''){const _0x5e6f46=_0x1357a9[_0x50b19a(0x6f)](_0x50b19a(0x91));if(!Number[_0x50b19a(0x69)](_0x5e6f46)||_0x5e6f46<0x0)throw CliErrors['validation']('--expect-user-count\x20must\x20be\x20a\x20non-negative\x20integer.');if(_0x2cba12[_0x50b19a(0x9a)]!==_0x5e6f46)throw CliErrors[_0x50b19a(0x76)](_0x50b19a(0xa4)+_0x5e6f46+',\x20found\x20'+_0x2cba12[_0x50b19a(0x9a)]+'.',_0x50b19a(0x80));}const _0x93d84c=_0x2cba12['includes'](_0x1068c7),_0x21410c=[];let _0x224514=!![];if(_0x65a5cd===_0x50b19a(0xa0)){const _0x567eaf=await listRuntimeAppUsers(_0x1357a9[_0x50b19a(0x6d)]),_0x19391f=_0x567eaf['filter'](_0x16aae0=>normalizeRuntimeUserId(_0x16aae0['code'])===_0x1068c7);if(_0x19391f[_0x50b19a(0x9a)]!==0x1||!_0x19391f[0x0]['userName']?.['trim']())throw CliErrors[_0x50b19a(0x76)](_0x50b19a(0xa1)+_0x1068c7+_0x50b19a(0x81)+_0x1357a9['appCode']+'.',_0x50b19a(0x74));_0x93d84c?(_0x224514=![],_0x21410c[_0x50b19a(0x6b)]('User\x20'+_0x1068c7+_0x50b19a(0x82)+_0x1c667a['id']+'.')):_0x82810a[_0x50b19a(0x70)]['push']({'userId':_0x1068c7,'username':_0x19391f[0x0][_0x50b19a(0x7c)]});}else!_0x93d84c?(_0x224514=![],_0x21410c[_0x50b19a(0x6b)](_0x50b19a(0x68)+_0x1068c7+_0x50b19a(0x98)+_0x1c667a['id']+'.')):_0x82810a[_0x50b19a(0x70)]=_0x82810a[_0x50b19a(0x70)][_0x50b19a(0xa6)](_0x3a6544=>_0xf5453f(_0x3a6544[_0x50b19a(0xa3)])!==_0x1068c7);return{'role':_0x1c667a,'userId':_0x1068c7,'roleList':_0x2efecd,'before':{'userIds':_0x2cba12},'after':{'userIds':_0x82810a['userList'][_0x50b19a(0xb7)](_0x3cb5b3=>_0xf5453f(_0x3cb5b3['userId']))},'shouldWrite':_0x224514,'warnings':_0x21410c};}export function runtimeRoleWriteResult(_0xa8fdbf,_0x43ab62,_0x2d2dc3,_0x3cd1a7,_0x54483c,_0x5e2ce9=[]){const _0x441743=a59_0x1e9bfe;return{'operation':_0xa8fdbf,'scope':_0x441743(0x8f),'selector':_0x43ab62,'before':_0x2d2dc3,'after':_0x3cd1a7,'dryRun':![],'backend':_0x54483c,'warnings':_0x5e2ce9};}
|
|
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
|
-
|
|
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
|
-
const
|
|
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_0x410a7a=a63_0x55a8;function a63_0x4634(){const _0x4a573f=['detail','kimi/k3','cursor','delete','schedule','--limit\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.','Delete\x20the\x20schedule\x20and\x20stop\x20future\x20triggers','1841493pMRcaa','Schedule\x20input\x20is\x20valid','create','--title\x20must\x20not\x20be\x20blank.','run','/api/harness/apps/','--kind\x20must\x20be\x20CRON\x20or\x20ONCE.','schedule-id','high-risk-write','description','kind','string','Task\x20model\x20used\x20when\x20the\x20schedule\x20runs','build','validation','List\x20current\x20user\x27s\x20schedules\x20for\x20the\x20current\x20app','Canonical\x20UTC\x20ISO\x20datetime\x20for\x20ONCE\x20schedules','deepseek-v4-pro-0813','limit','Five-field\x20UTC\x20cron\x20expression\x20for\x20CRON\x20schedules','Created\x20','Creates\x20a\x20schedule\x20in\x20the\x20current\x20app\x20that\x20can\x20auto-trigger\x20an\x20Agent.\x20At\x20the\x20scheduled\x20time\x20a\x20Task\x20is\x20created\x20and\x20run.','list','Schedule\x20UUID','taskId','ONCE\x20schedules\x20require\x20--scheduled-at\x20and\x20do\x20not\x20accept\x20--cron.','494473FVrDfG','--prompt\x20must\x20not\x20be\x20blank.','Preview:\x20run\x20schedule\x20','Create\x20a\x20recurring\x20or\x20one-shot\x20Agent\x20schedule','ONCE','48663120oevhKF','Ignores\x20the\x20original\x20trigger\x20time,\x20runs\x20the\x20schedule\x20once\x20now,\x20and\x20creates\x20a\x20new\x20Agent\x20Task.','Permanently\x20deletes\x20the\x20schedule\x20and\x20stops\x20future\x20auto-triggers.\x20Historical\x20Tasks\x20already\x20created\x20are\x20not\x20affected.','/run','Deleted\x20schedule\x20','/schedules','appCode','Schedule\x20kind:\x20CRON\x20or\x20ONCE','CRON\x20schedules\x20require\x20--cron\x20and\x20do\x20not\x20accept\x20--scheduled-at.','length','\x20immediately','Preview:\x20create\x20an\x20Agent\x20schedule','num','read','number','7147040ntnvaD','DELETE','12JlgrAp','title','cron','14347782goaXfd','prompt','UTC','model','validate','Page\x20size\x20from\x201\x20to\x20100','str','8SaFRVM','POST','Show\x20one\x20schedule\x20by\x20schedule\x20ID','1180350vQMQRx','deepseek-v4-flash-0731','Queued\x20Task\x20','Run\x20the\x20schedule\x20once\x20immediately\x20and\x20create\x20a\x20Task','\x20schedule\x20','a\x20UUID\x20returned\x20by\x20schedule\x20create/list','scheduled-at','Schedule\x20title','Preview:\x20delete\x20schedule\x20','8GKUCUd','1721649GFAiCF'];a63_0x4634=function(){return _0x4a573f;};return a63_0x4634();}(function(_0xde1036,_0x16cabc){const _0x3a2b06=a63_0x55a8,_0x5be0aa=_0xde1036();while(!![]){try{const _0x2bc06b=-parseInt(_0x3a2b06(0x1d2))/0x1+-parseInt(_0x3a2b06(0x1c8))/0x2+-parseInt(_0x3a2b06(0x18b))/0x3*(-parseInt(_0x3a2b06(0x1d1))/0x4)+-parseInt(_0x3a2b06(0x1b9))/0x5+-parseInt(_0x3a2b06(0x1bb))/0x6*(-parseInt(_0x3a2b06(0x1a5))/0x7)+parseInt(_0x3a2b06(0x1c5))/0x8*(-parseInt(_0x3a2b06(0x1be))/0x9)+parseInt(_0x3a2b06(0x1aa))/0xa;if(_0x2bc06b===_0x16cabc)break;else _0x5be0aa['push'](_0x5be0aa['shift']());}catch(_0x3147da){_0x5be0aa['push'](_0x5be0aa['shift']());}}}(a63_0x4634,0xdbaee));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':'kind','type':a63_0x410a7a(0x196),'required':!![],'enum':['CRON','ONCE'],'description':a63_0x410a7a(0x1b1)},CRON_FLAG={'name':a63_0x410a7a(0x1bd),'type':a63_0x410a7a(0x196),'description':a63_0x410a7a(0x19e)},SCHEDULED_AT_FLAG={'name':a63_0x410a7a(0x1ce),'type':a63_0x410a7a(0x196),'description':a63_0x410a7a(0x19b)},TITLE_FLAG={'name':a63_0x410a7a(0x1bc),'type':a63_0x410a7a(0x196),'required':!![],'description':a63_0x410a7a(0x1cf)},PROMPT_FLAG={'name':'prompt','type':a63_0x410a7a(0x196),'required':!![],'description':'Prompt\x20sent\x20to\x20the\x20Agent\x20when\x20the\x20schedule\x20runs'},MODEL_FLAG={'name':a63_0x410a7a(0x1c1),'type':a63_0x410a7a(0x196),'enum':[a63_0x410a7a(0x185),'deepseek-v4-flash-0731',a63_0x410a7a(0x19c)],'default':a63_0x410a7a(0x1c9),'description':a63_0x410a7a(0x197)},SCHEDULE_ID_FLAG={'name':a63_0x410a7a(0x192),'type':a63_0x410a7a(0x196),'required':!![],'description':a63_0x410a7a(0x1a2),'pattern':{'regex':SCHEDULE_ID_PATTERN,'description':a63_0x410a7a(0x1cd)}},LIMIT_FLAG={'name':'limit','type':a63_0x410a7a(0x1b8),'default':0x14,'description':a63_0x410a7a(0x1c3)},CURSOR_FLAG={'name':'cursor','type':'string','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 readScheduleInput(_0x1032dc){const _0x1437d3=a63_0x410a7a,_0x6fc599=_0x1032dc[_0x1437d3(0x1c4)](_0x1437d3(0x195)),_0x286209=_0x1032dc[_0x1437d3(0x1c4)](_0x1437d3(0x1bc))['trim'](),_0x2ee2a2=_0x1032dc[_0x1437d3(0x1c4)](_0x1437d3(0x1bf))['trim'](),_0x2d2254=_0x1032dc[_0x1437d3(0x1c4)](_0x1437d3(0x1c1)),_0x201a9a=_0x1032dc[_0x1437d3(0x1c4)](_0x1437d3(0x1bd)),_0x3f6fbf=_0x1032dc[_0x1437d3(0x1c4)](_0x1437d3(0x1ce));if(!_0x286209)throw CliErrors[_0x1437d3(0x199)](_0x1437d3(0x18e));if(!_0x2ee2a2)throw CliErrors[_0x1437d3(0x199)](_0x1437d3(0x1a6));if(_0x6fc599==='CRON'){if(!_0x201a9a||_0x3f6fbf)throw CliErrors['validation'](_0x1437d3(0x1b2));return{'kind':_0x6fc599,'timezone':_0x1437d3(0x1c0),'cron':_0x201a9a,'title':_0x286209,'prompt':_0x2ee2a2,'model':_0x2d2254};}if(_0x6fc599===_0x1437d3(0x1a9)){if(!_0x3f6fbf||_0x201a9a)throw CliErrors['validation'](_0x1437d3(0x1a4));return{'kind':_0x6fc599,'timezone':_0x1437d3(0x1c0),'scheduledAt':_0x3f6fbf,'title':_0x286209,'prompt':_0x2ee2a2,'model':_0x2d2254};}throw CliErrors[_0x1437d3(0x199)](_0x1437d3(0x191));}function scheduleCollectionPath(_0x3db43f){const _0x13c9d8=a63_0x410a7a;return _0x13c9d8(0x190)+encodeURIComponent(_0x3db43f)+_0x13c9d8(0x1af);}function a63_0x55a8(_0x69ccc6,_0x2dec4d){_0x69ccc6=_0x69ccc6-0x184;const _0x463492=a63_0x4634();let _0x55a8a7=_0x463492[_0x69ccc6];return _0x55a8a7;}function scheduleItemPath(_0x9415b3,_0x285354){return scheduleCollectionPath(_0x9415b3)+'/'+encodeURIComponent(_0x285354);}const scheduleValidate={'service':a63_0x410a7a(0x188),'command':a63_0x410a7a(0x1c2),'description':'Validate\x20a\x20UTC\x20schedule\x20without\x20creating\x20it','risk':a63_0x410a7a(0x1b7),'flags':INPUT_FLAGS,async 'validate'(_0x5cde55){readScheduleInput(_0x5cde55);},async 'execute'(_0x5c44ff){const _0x2f31df=a63_0x410a7a,_0x484b85=readScheduleInput(_0x5c44ff),_0x4ea04a=await validateRuntimeSchedule(_0x5c44ff['appCode'],_0x484b85);return{'ok':!![],'data':_0x4ea04a,'message':_0x2f31df(0x18c)};}},scheduleCreate={'service':'schedule','command':a63_0x410a7a(0x18d),'description':a63_0x410a7a(0x1a8),'risk':'high-risk-write','confirmationDescription':a63_0x410a7a(0x1a0),'flags':INPUT_FLAGS,async 'validate'(_0x41e928){readScheduleInput(_0x41e928);},async 'execute'(_0x437f16){const _0x1068d5=a63_0x410a7a,_0x317340=readScheduleInput(_0x437f16),_0x5e304a=await validateRuntimeSchedule(_0x437f16[_0x1068d5(0x1b0)],_0x317340),_0x15f75a=await createRuntimeSchedule(_0x437f16[_0x1068d5(0x1b0)],_0x5e304a);return{'ok':!![],'data':_0x15f75a,'message':_0x1068d5(0x19f)+_0x15f75a[_0x1068d5(0x195)]+_0x1068d5(0x1cc)+_0x15f75a['scheduleId']};},async 'dryRun'(_0x2b65ff){const _0x5baca6=a63_0x410a7a,_0x3e2a04=readScheduleInput(_0x2b65ff);return dryRun(_0x5baca6(0x1c6),scheduleCollectionPath(_0x2b65ff['appCode']))['body'](_0x3e2a04)['description'](_0x5baca6(0x1b5))[_0x5baca6(0x198)]();}},scheduleList={'service':a63_0x410a7a(0x188),'command':a63_0x410a7a(0x1a1),'description':a63_0x410a7a(0x19a),'risk':a63_0x410a7a(0x1b7),'flags':[KIND_FLAG,LIMIT_FLAG,CURSOR_FLAG],async 'validate'(_0x3aaa25){const _0x53dcba=a63_0x410a7a,_0xfd9158=_0x3aaa25[_0x53dcba(0x1b6)](_0x53dcba(0x19d));if(!Number['isSafeInteger'](_0xfd9158)||_0xfd9158<0x1||_0xfd9158>0x64)throw CliErrors['validation'](_0x53dcba(0x189));const _0x551ae6=_0x3aaa25[_0x53dcba(0x1c4)](_0x53dcba(0x186));if(_0x551ae6&&(_0x551ae6[_0x53dcba(0x1b3)]>0x400||_0x551ae6['trim']()!==_0x551ae6))throw CliErrors[_0x53dcba(0x199)]('--cursor\x20must\x20be\x20the\x20unchanged\x20nextCursor\x20from\x20schedule\x20list.');},async 'execute'(_0x1e7d7c){const _0x1aff33=a63_0x410a7a,_0x3e17db=_0x1e7d7c[_0x1aff33(0x1c4)]('cursor'),_0xe6eea6=await listRuntimeSchedules(_0x1e7d7c[_0x1aff33(0x1b0)],{'kind':_0x1e7d7c[_0x1aff33(0x1c4)](_0x1aff33(0x195)),'limit':_0x1e7d7c[_0x1aff33(0x1b6)](_0x1aff33(0x19d)),..._0x3e17db?{'cursor':_0x3e17db}:{}});return{'ok':!![],'data':_0xe6eea6};}},scheduleDetail={'service':'schedule','command':a63_0x410a7a(0x184),'description':a63_0x410a7a(0x1c7),'risk':a63_0x410a7a(0x1b7),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x41a46c){const _0x3acf2f=a63_0x410a7a,_0x56b5f6=await getRuntimeSchedule(_0x41a46c[_0x3acf2f(0x1b0)],_0x41a46c['str'](_0x3acf2f(0x192)));return{'ok':!![],'data':_0x56b5f6};}},scheduleRun={'service':a63_0x410a7a(0x188),'command':a63_0x410a7a(0x18f),'description':a63_0x410a7a(0x1cb),'risk':a63_0x410a7a(0x193),'confirmationDescription':a63_0x410a7a(0x1ab),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x66fce8){const _0x1d7e74=a63_0x410a7a,_0x214b18=_0x66fce8['str']('schedule-id'),_0x15b4b4=await runRuntimeSchedule(_0x66fce8[_0x1d7e74(0x1b0)],_0x214b18);return{'ok':!![],'data':_0x15b4b4,'message':_0x1d7e74(0x1ca)+_0x15b4b4[_0x1d7e74(0x1a3)]+'\x20from\x20schedule\x20'+_0x214b18};},async 'dryRun'(_0x877194){const _0x3c099=a63_0x410a7a,_0x27a93c=_0x877194[_0x3c099(0x1c4)]('schedule-id');return dryRun(_0x3c099(0x1c6),scheduleItemPath(_0x877194[_0x3c099(0x1b0)],_0x27a93c)+_0x3c099(0x1ad))[_0x3c099(0x194)](_0x3c099(0x1a7)+_0x27a93c+_0x3c099(0x1b4))[_0x3c099(0x198)]();}},scheduleDelete={'service':a63_0x410a7a(0x188),'command':a63_0x410a7a(0x187),'description':a63_0x410a7a(0x18a),'risk':a63_0x410a7a(0x193),'confirmationDescription':a63_0x410a7a(0x1ac),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x1219d5){const _0x1b03ea=a63_0x410a7a,_0x1aa42f=_0x1219d5['str']('schedule-id'),_0x542227=await deleteRuntimeSchedule(_0x1219d5[_0x1b03ea(0x1b0)],_0x1aa42f);return{'ok':!![],'data':_0x542227,'message':_0x1b03ea(0x1ae)+_0x1aa42f};},async 'dryRun'(_0x514c1c){const _0x1b2935=a63_0x410a7a,_0x57020d=_0x514c1c['str'](_0x1b2935(0x192));return dryRun(_0x1b2935(0x1ba),scheduleItemPath(_0x514c1c['appCode'],_0x57020d))[_0x1b2935(0x194)](_0x1b2935(0x1d0)+_0x57020d)[_0x1b2935(0x198)]();}};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
|
-
|
|
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(_0x14e38a,_0x517168){const _0x1c33da=a65_0x56ba,_0x1c7da0=_0x14e38a();while(!![]){try{const _0x4acb29=-parseInt(_0x1c33da(0xee))/0x1*(parseInt(_0x1c33da(0xd7))/0x2)+-parseInt(_0x1c33da(0xc9))/0x3+-parseInt(_0x1c33da(0xd8))/0x4+parseInt(_0x1c33da(0xcf))/0x5*(parseInt(_0x1c33da(0x127))/0x6)+-parseInt(_0x1c33da(0x113))/0x7*(parseInt(_0x1c33da(0x11a))/0x8)+parseInt(_0x1c33da(0x10d))/0x9*(-parseInt(_0x1c33da(0xd5))/0xa)+parseInt(_0x1c33da(0x10a))/0xb*(parseInt(_0x1c33da(0xda))/0xc);if(_0x4acb29===_0x517168)break;else _0x1c7da0['push'](_0x1c7da0['shift']());}catch(_0x656da7){_0x1c7da0['push'](_0x1c7da0['shift']());}}}(a65_0x11fc,0x90861));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(_0x35a74b,_0x3afa79){const _0x1ae97a=a65_0x56ba,_0x2a0090=listLocalServiceTrees();let _0x261973;for(const _0x3e26f5 of _0x2a0090){const _0x45c352=matchServiceTreeCommand(_0x3e26f5,_0x35a74b);if(!_0x45c352)continue;(!_0x261973||_0x45c352[_0x1ae97a(0x10e)]['fullPath'][_0x1ae97a(0x122)]>_0x261973[_0x1ae97a(0x10e)][_0x1ae97a(0x12d)][_0x1ae97a(0x122)])&&(_0x261973={'tree':_0x3e26f5,'command':_0x45c352[_0x1ae97a(0x10e)],'remainingArgs':_0x45c352[_0x1ae97a(0x125)]});}if(!_0x261973)return undefined;const _0x427c04={..._0x3afa79};return applyAppBinding(_0x261973[_0x1ae97a(0x107)],_0x261973['command'],_0x427c04),{'definition':buildDynamicCommandDefinition(_0x261973['tree'],_0x261973['command']),'args':_0x261973[_0x1ae97a(0x125)],'flags':_0x427c04,'tree':_0x261973['tree'],'command':_0x261973[_0x1ae97a(0x10e)]};}function a65_0x11fc(){const _0x280488=['args','appBindings','Run\x20service\x20command\x20','fromEntries','operator','source','\x20requires\x20target.datasetCode\x20or\x20target.datatable.','rawFlags','nickname','map','The\x20manifest\x20marks\x20this\x20command\x20as\x20a\x20write.\x20It\x20may\x20change\x20business\x20data\x20or\x20service\x20state.','tree','Check\x20the\x20service\x20binding\x20and\x20current\x20connection.\x20Do\x20not\x20switch\x20environments\x20or\x20credentials\x20automatically.','boolean','22qVWIkJ','find','number','171ITnmIN','command','type','loginName','join','\x20\x20\x20\x20','7IjfcCP','target','\x20completed\x20in\x20','\x20\x20\x20\x20datatable:\x20','code','envName','\x20requires\x20target.functionName.','1377056VOFJee','Define\x20the\x20appRef\x20under\x20appBindings\x20or\x20remove\x20target.appRef.','app','json','slice','flags','bffId','\x22\x20in\x20service\x20command\x20','length','commands','entries','remainingArgs','Use\x20lovrabet\x20dataset\x20list\x20to\x20confirm\x20the\x20physical\x20table\x20name\x20or\x20add\x20target.datasetCode\x20to\x20the\x20manifest.','438ounEKx','datasetCode','Service\x20command\x20','sqlCode','sql','datatable','fullPath','\x20\x20[','appcode','cliName','\x22\x20to\x20a\x20datasetCode\x20in\x20app\x20','push','\x20\x20\x20\x20functionName:\x20','padEnd','2969037gVFuXG','ctx.','const','trim','read','cliPath','24825YAgXuO','appRef','\x20requires\x20target.sqlCode.','Use\x20`','\x20\x20\x20\x20datasetCode:\x20','bff','90620GXTvwQ','description','134Cbrprs','924584BLkWvX','flatMap','13081464skLSjn','\x20\x20\x20\x20sqlCode:\x20','validation','default','string','tenantCode','scriptName','some','env','kind','Preview\x20dynamic\x20service\x20command:\x20','nickName','userName','dbtableConfig','service','filter','\x20\x20\x20\x20command:\x20','\x20\x20SERVICE\x20TREE\x20TARGET','startsWith','context.','5755VLPWCl','\x22,\x20but\x20the\x20current\x20environment\x20is\x20\x22','name','\x20requires\x20environment\x20\x22','\x22.\x20','Cannot\x20resolve\x20datatable\x20\x22','username','params','required','\x20<command>\x20[flags]','bffCode','risk','employeeId','data'];a65_0x11fc=function(){return _0x280488;};return a65_0x11fc();}export function generateDynamicServiceHelp(_0x1c6788){const _0x30f3b4=a65_0x56ba,_0x577fcd=listLocalServiceTrees()['find'](_0x2d2b52=>_0x2d2b52[_0x30f3b4(0xe8)][_0x30f3b4(0x117)]===_0x1c6788);if(!_0x577fcd)return undefined;const _0x79f283=[CLI_BIN_NAME+'\x20'+_0x1c6788+_0x30f3b4(0xf7),'',_0x577fcd[_0x30f3b4(0xe8)][_0x30f3b4(0xf0)]||_0x1c6788,_0x577fcd['service'][_0x30f3b4(0xd6)]?'\x20\x20'+_0x577fcd[_0x30f3b4(0xe8)][_0x30f3b4(0xd6)]:'','','Commands:',..._0x577fcd[_0x30f3b4(0x123)][_0x30f3b4(0x105)](_0x37d22d=>{const _0x31f505=_0x30f3b4,_0x547de0=_0x37d22d[_0x31f505(0x12d)][_0x31f505(0x11e)](0x1)[_0x31f505(0x111)]('\x20'),_0x2bab7d=_0x37d22d[_0x31f505(0xf9)]===_0x31f505(0xcd)?'':'\x20['+_0x37d22d[_0x31f505(0xf9)]+']';return'\x20\x20'+_0x547de0[_0x31f505(0xc8)](0x18)+'\x20'+(_0x37d22d[_0x31f505(0xd6)]||'')+_0x2bab7d;}),'',_0x30f3b4(0xd2)+CLI_BIN_NAME+'\x20service\x20detail\x20--service\x20'+_0x1c6788+'`\x20to\x20inspect\x20the\x20manifest.'][_0x30f3b4(0xe9)](Boolean);return _0x79f283[_0x30f3b4(0x111)]('\x0a');}export function listDynamicServiceEntries(){return listLocalServices()['map'](_0x2d55f3=>{const _0xb482b=a65_0x56ba,_0x3123a1=_0x2d55f3['normalizedManifest'];return{'service':_0x3123a1[_0xb482b(0xe8)][_0xb482b(0x117)],'label':_0x3123a1[_0xb482b(0xe8)][_0xb482b(0xf0)]||_0x3123a1[_0xb482b(0xe8)][_0xb482b(0x117)],'commands':_0x3123a1[_0xb482b(0x123)]['map'](_0x33de98=>({'command':dynamicCommandName(_0x33de98),'description':_0x33de98[_0xb482b(0xd6)]||_0xb482b(0xfe)+_0x33de98[_0xb482b(0xce)],'tag':riskTag(_0x33de98[_0xb482b(0xf9)])}))};});}export function getDynamicServiceEntry(_0x214913){const _0x3516e8=a65_0x56ba;return listDynamicServiceEntries()[_0x3516e8(0x10b)](_0x4e2789=>_0x4e2789[_0x3516e8(0xe8)]===_0x214913);}export function listDynamicServiceDefinitions(_0x4918d6){const _0x6af1f9=a65_0x56ba;return listLocalServiceTrees()[_0x6af1f9(0xe9)](_0x26925b=>!_0x4918d6||_0x26925b['service'][_0x6af1f9(0x117)]===_0x4918d6)[_0x6af1f9(0xd9)](_0x26dc12=>_0x26dc12[_0x6af1f9(0x123)][_0x6af1f9(0x105)](_0x3b69ea=>buildDynamicCommandDefinition(_0x26dc12,_0x3b69ea)));}export function getDynamicServiceDefinitions(_0x576ce2){const _0x385cc7=a65_0x56ba,_0x30ac10=listDynamicServiceDefinitions(_0x576ce2);return _0x30ac10[_0x385cc7(0x122)]>0x0?_0x30ac10:undefined;}export function findDynamicServiceDefinition(_0x26a950,_0x417b0b){const _0x25afca=a65_0x56ba;return listDynamicServiceDefinitions(_0x26a950)[_0x25afca(0x10b)](_0x198ee6=>_0x198ee6[_0x25afca(0x10e)]===_0x417b0b);}export function buildDynamicCommandDefinition(_0x2800bd,_0x53ebbe){const _0x258da7=a65_0x56ba;return{'service':_0x2800bd[_0x258da7(0xe8)]['code'],'command':dynamicCommandName(_0x53ebbe),'description':_0x53ebbe[_0x258da7(0xd6)]||_0x258da7(0xfe)+_0x53ebbe[_0x258da7(0xce)],'risk':_0x53ebbe[_0x258da7(0xf9)],..._0x53ebbe[_0x258da7(0xf9)]===_0x258da7(0xcd)?{}:{'confirmationDescription':buildDynamicConfirmationDescription(_0x53ebbe)},'requiresAuth':!![],'requiresAppCode':!![],'args':_0x53ebbe[_0x258da7(0xfc)]['map'](_0x4dfc52=>({'name':_0x4dfc52['name'],'description':_0x4dfc52[_0x258da7(0xd6)]||_0x4dfc52[_0x258da7(0xf0)],'required':_0x4dfc52[_0x258da7(0xf6)]})),'flags':_0x53ebbe[_0x258da7(0x11f)][_0x258da7(0x105)](flagToCommandFlag),'helpExtra':()=>renderDynamicCommandHelp(_0x53ebbe),async 'dryRun'(_0x4d1e11){const _0x3cb4a6=_0x258da7,_0x216d58=await compilePlan(_0x2800bd,_0x53ebbe,_0x4d1e11);return{'method':'SERVICE_TREE','url':_0x53ebbe[_0x3cb4a6(0xce)],'body':{'target':targetPreview(_0x216d58),'params':_0x216d58['params']},'description':_0x3cb4a6(0xe4)+_0x53ebbe['cliPath']};},async 'execute'(_0x4f8725){const _0x595a0b=_0x258da7,_0x3e5349=await compilePlan(_0x2800bd,_0x53ebbe,_0x4f8725),_0x185ec7=Date['now'](),_0x5edf8d=await executePlan(_0x3e5349,_0x53ebbe,_0x4f8725),_0x3ac956=Date['now']()-_0x185ec7;return{'ok':!![],'data':{'service':_0x2800bd[_0x595a0b(0xe8)],'command':_0x53ebbe['cliPath'],'target':targetPreview(_0x3e5349),'result':_0x5edf8d,'elapsed':_0x3ac956},'message':_0x595a0b(0x129)+_0x53ebbe[_0x595a0b(0xce)]+_0x595a0b(0x115)+_0x3ac956+'ms'};}};}function buildDynamicConfirmationDescription(_0x103c0d){const _0x4d48c4=a65_0x56ba,_0x5268bb=_0x103c0d['description']||_0x103c0d[_0x4d48c4(0xce)],_0x489d29=_0x103c0d[_0x4d48c4(0xf9)]==='high-risk-write'?'The\x20manifest\x20marks\x20this\x20command\x20as\x20a\x20high-risk\x20write.\x20It\x20may\x20make\x20business\x20changes\x20that\x20are\x20hard\x20to\x20reverse.':_0x4d48c4(0x106);return'This\x20will\x20run\x20Service\x20Tree\x20command\x20\x22'+_0x5268bb+_0x4d48c4(0xf2)+_0x489d29;}function dynamicCommandName(_0x58f234){const _0x495d8c=a65_0x56ba;return _0x58f234[_0x495d8c(0x12d)][_0x495d8c(0x11e)](0x1)['join']('\x20');}function riskTag(_0x10d4c8){const _0x58d6f3=a65_0x56ba;return _0x10d4c8===_0x58d6f3(0xcd)?'':_0x58d6f3(0x12e)+_0x10d4c8+']';}function a65_0x56ba(_0x5a7688,_0x58e210){_0x5a7688=_0x5a7688-0xc4;const _0x11fce0=a65_0x11fc();let _0x56bac7=_0x11fce0[_0x5a7688];return _0x56bac7;}function flagToCommandFlag(_0x4e3e2e){const _0x534d8a=a65_0x56ba;return{'name':_0x4e3e2e[_0x534d8a(0xc4)],'type':_0x4e3e2e[_0x534d8a(0x10f)]===_0x534d8a(0x11d)?_0x534d8a(0xde):_0x4e3e2e[_0x534d8a(0x10f)],'description':_0x4e3e2e[_0x534d8a(0xd6)]||_0x4e3e2e['name'],'required':_0x4e3e2e[_0x534d8a(0xf6)],'default':isPrimitiveFlagDefault(_0x4e3e2e[_0x534d8a(0xdd)])?_0x4e3e2e['default']:undefined,'enum':_0x4e3e2e['enum']};}async function compilePlan(_0x51c93b,_0x4a98ed,_0x5390fa){const _0x525667=a65_0x56ba,_0x4a11c5=_0x4a98ed[_0x525667(0x114)][_0x525667(0xd0)]?_0x51c93b[_0x525667(0xfd)][_0x4a98ed[_0x525667(0x114)][_0x525667(0xd0)]]:undefined;if(_0x4a11c5?.['env']){const _0xab941a=isDev(_0x4a11c5['env'])?'development':normalizeEnv(_0x4a11c5[_0x525667(0xe2)]);if(_0xab941a!==_0x5390fa[_0x525667(0x118)])throw CliErrors[_0x525667(0xdc)](_0x525667(0x129)+_0x4a98ed[_0x525667(0xce)]+_0x525667(0xf1)+_0xab941a+_0x525667(0xef)+_0x5390fa[_0x525667(0x118)]+'\x22.',_0x525667(0x108));}return compileServiceTreeCommand(_0x4a98ed,{'flags':_0x5390fa[_0x525667(0x103)],'args':_0x5390fa[_0x525667(0xfc)],'context':await buildServiceContext(_0x4a98ed,_0x5390fa)});}async function buildServiceContext(_0x5f15ed,_0x31fb1f){const _0x597dd3=a65_0x56ba,_0x16358b={'appCode':_0x31fb1f['appCode'],'env':_0x31fb1f[_0x597dd3(0x118)],'envName':_0x31fb1f['envName']};if(!usesRuntimeContext(_0x5f15ed))return _0x16358b;const _0x135e2f=await getLoginUserInfo(),_0x3cbbba=pickFirst(_0x135e2f['userId'],_0x135e2f['id']);return{..._0x16358b,'user':_0x135e2f,'userId':_0x3cbbba,'id':_0x135e2f['id'],'username':pickFirst(_0x135e2f[_0x597dd3(0xf4)],_0x135e2f['userName'],_0x135e2f[_0x597dd3(0x110)]),'userName':_0x135e2f[_0x597dd3(0xe6)],'nickname':pickFirst(_0x135e2f[_0x597dd3(0x104)],_0x135e2f[_0x597dd3(0xe5)]),'nickName':_0x135e2f[_0x597dd3(0xe5)],'tenantCode':_0x135e2f[_0x597dd3(0xdf)],'employeeId':_0x135e2f[_0x597dd3(0xfa)]};}function usesRuntimeContext(_0x1da5ab){const _0x4e6122=a65_0x56ba;return _0x1da5ab['mapTo'][_0x4e6122(0xe1)](_0x26a0ef=>typeof _0x26a0ef[_0x4e6122(0x101)]===_0x4e6122(0xde)&&(_0x26a0ef['source'][_0x4e6122(0xec)](_0x4e6122(0xed))||_0x26a0ef['source'][_0x4e6122(0xec)](_0x4e6122(0xca))));}function pickFirst(..._0x1ad639){return _0x1ad639['find'](_0x2d8793=>_0x2d8793!==undefined&&_0x2d8793!==null);}async function executePlan(_0x59a2fa,_0x3ae542,_0x490a6d){const _0x9d85ab=a65_0x56ba;if(_0x59a2fa[_0x9d85ab(0xe3)]===_0x9d85ab(0xfb)){const _0x471dbf=await resolveDatasetCode(_0x59a2fa,_0x3ae542,_0x490a6d);return executeData(_0x471dbf,_0x59a2fa[_0x9d85ab(0x10e)],_0x59a2fa['params']);}if(_0x59a2fa[_0x9d85ab(0xe3)]===_0x9d85ab(0x12b)){if(!_0x59a2fa[_0x9d85ab(0x12a)])throw CliErrors[_0x9d85ab(0xdc)]('Service\x20command\x20'+_0x3ae542[_0x9d85ab(0xce)]+_0x9d85ab(0xd1));return executeSdkSql(_0x59a2fa['sqlCode'],normalizeScalarParams(_0x59a2fa[_0x9d85ab(0xf5)]));}if(_0x59a2fa[_0x9d85ab(0xe3)]===_0x9d85ab(0xd4)){const _0xbeaf6e=_0x59a2fa['scriptName']||_0x59a2fa[_0x9d85ab(0xf8)]||(_0x59a2fa[_0x9d85ab(0x120)]==null?'':String(_0x59a2fa['bffId']));if(!_0xbeaf6e)throw CliErrors[_0x9d85ab(0xdc)]('Service\x20command\x20'+_0x3ae542[_0x9d85ab(0xce)]+_0x9d85ab(0x119));return executeSdkBff(_0xbeaf6e,_0x59a2fa[_0x9d85ab(0xf5)]);}throw CliErrors[_0x9d85ab(0xdc)]('Unsupported\x20service\x20target\x20kind:\x20'+_0x59a2fa[_0x9d85ab(0xe3)]);}async function resolveDatasetCode(_0x19b042,_0x467ed1,_0x27c7b7){const _0x213572=a65_0x56ba;if(_0x19b042[_0x213572(0x128)])return _0x19b042[_0x213572(0x128)];if(!_0x19b042[_0x213572(0x12c)])throw CliErrors[_0x213572(0xdc)](_0x213572(0x129)+_0x467ed1['cliPath']+_0x213572(0x102));const _0x402081=await listDatasets(_0x27c7b7['appCode']),_0x5a6b60=_0x402081['find'](_0x321b3e=>_0x321b3e[_0x213572(0xe7)]?.['tableName']===_0x19b042['datatable']);if(!_0x5a6b60?.[_0x213572(0x117)])throw CliErrors[_0x213572(0xdc)](_0x213572(0xf3)+_0x19b042[_0x213572(0x12c)]+_0x213572(0xc5)+_0x27c7b7['appCode']+'.',_0x213572(0x126));return _0x5a6b60[_0x213572(0x117)];}function applyAppBinding(_0x48490e,_0x4b2d3b,_0xb5c7ea){const _0x539838=a65_0x56ba,_0x56826c=_0x4b2d3b[_0x539838(0x114)][_0x539838(0xd0)];if(!_0x56826c)return;const _0x4a7965=_0x48490e[_0x539838(0xfd)][_0x56826c];if(!_0x4a7965)throw CliErrors['validation']('Unknown\x20appRef\x20\x22'+_0x56826c+_0x539838(0x121)+_0x4b2d3b['cliPath']+'.',_0x539838(0x11b));const _0x2ae086=_0x4a7965['appcode']||_0x4a7965['appCode'];_0x2ae086&&!hasText(_0xb5c7ea[_0x539838(0x12f)])&&!hasText(_0xb5c7ea[_0x539838(0x11c)])&&(_0xb5c7ea['appcode']=_0x2ae086),_0x4a7965['app']&&!hasText(_0xb5c7ea['app'])&&!hasText(_0xb5c7ea[_0x539838(0x12f)])&&(_0xb5c7ea['app']=_0x4a7965[_0x539838(0x11c)]);}function renderDynamicCommandHelp(_0x2880f6){const _0x318679=a65_0x56ba,_0x40e642=[_0x318679(0xeb),'\x20\x20\x20\x20kind:\x20\x20\x20\x20'+_0x2880f6['target'][_0x318679(0xe3)],_0x318679(0xea)+_0x2880f6['target'][_0x318679(0x10e)]];if(_0x2880f6[_0x318679(0x114)][_0x318679(0x128)])_0x40e642[_0x318679(0xc6)](_0x318679(0xd3)+_0x2880f6['target'][_0x318679(0x128)]);if(_0x2880f6['target'][_0x318679(0x12c)])_0x40e642[_0x318679(0xc6)](_0x318679(0x116)+_0x2880f6['target'][_0x318679(0x12c)]);if(_0x2880f6[_0x318679(0x114)][_0x318679(0x12a)])_0x40e642[_0x318679(0xc6)](_0x318679(0xdb)+_0x2880f6['target'][_0x318679(0x12a)]);if(_0x2880f6[_0x318679(0x114)][_0x318679(0xe0)])_0x40e642[_0x318679(0xc6)](_0x318679(0xc7)+_0x2880f6[_0x318679(0x114)][_0x318679(0xe0)]);if(_0x2880f6['mapTo'][_0x318679(0x122)]>0x0){_0x40e642[_0x318679(0xc6)]('','\x20\x20MAP\x20TO');for(const _0x4f38bc of _0x2880f6['mapTo']){_0x40e642[_0x318679(0xc6)](_0x318679(0x112)+(_0x4f38bc['source']||_0x318679(0xcb))+'\x20->\x20'+_0x4f38bc[_0x318679(0x114)]+(_0x4f38bc[_0x318679(0x100)]?'.'+_0x4f38bc['operator']:''));}}return _0x40e642[_0x318679(0x111)]('\x0a');}function targetPreview(_0x349570){const _0x298a20=a65_0x56ba;return{'kind':_0x349570[_0x298a20(0xe3)],'command':_0x349570[_0x298a20(0x10e)],'appRef':_0x349570[_0x298a20(0xd0)],'datasetCode':_0x349570[_0x298a20(0x128)],'datatable':_0x349570[_0x298a20(0x12c)],'sqlCode':_0x349570[_0x298a20(0x12a)],'bffCode':_0x349570[_0x298a20(0xf8)],'bffId':_0x349570['bffId'],'functionName':_0x349570[_0x298a20(0xe0)]};}function normalizeScalarParams(_0x3ff755){const _0x5d4839=a65_0x56ba;return Object[_0x5d4839(0xff)](Object[_0x5d4839(0x124)](_0x3ff755)['filter'](([,_0x1cd1b8])=>typeof _0x1cd1b8===_0x5d4839(0xde)||typeof _0x1cd1b8===_0x5d4839(0x10c)));}function hasText(_0x290998){const _0x5d009f=a65_0x56ba;return typeof _0x290998===_0x5d009f(0xde)&&_0x290998[_0x5d009f(0xcc)]()[_0x5d009f(0x122)]>0x0;}function isPrimitiveFlagDefault(_0x46cfa0){const _0xeffee3=a65_0x56ba;return _0x46cfa0===undefined||typeof _0x46cfa0===_0xeffee3(0xde)||typeof _0x46cfa0===_0xeffee3(0x10c)||typeof _0x46cfa0===_0xeffee3(0x109);}
|
|
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_0x1e54(_0x102530,_0x183170){_0x102530=_0x102530-0xe3;const _0x219c97=a67_0x219c();let _0x1e5428=_0x219c97[_0x102530];return _0x1e5428;}const a67_0x56ec4b=a67_0x1e54;(function(_0x57cb07,_0x242322){const _0x2b805f=a67_0x1e54,_0x550ed4=_0x57cb07();while(!![]){try{const _0x48c66f=parseInt(_0x2b805f(0x12a))/0x1*(parseInt(_0x2b805f(0xf0))/0x2)+-parseInt(_0x2b805f(0x118))/0x3+-parseInt(_0x2b805f(0x10b))/0x4+parseInt(_0x2b805f(0x105))/0x5*(parseInt(_0x2b805f(0x111))/0x6)+-parseInt(_0x2b805f(0x104))/0x7+parseInt(_0x2b805f(0x107))/0x8*(-parseInt(_0x2b805f(0x116))/0x9)+-parseInt(_0x2b805f(0xe6))/0xa*(-parseInt(_0x2b805f(0x11c))/0xb);if(_0x48c66f===_0x242322)break;else _0x550ed4['push'](_0x550ed4['shift']());}catch(_0x27332b){_0x550ed4['push'](_0x550ed4['shift']());}}}(a67_0x219c,0xd7abc));import{exportServiceManifest,formatValidationFailure,getLocalServiceEntry,getServiceRegistryPath,importServiceManifest,listLocalServices,loadServiceManifestFromFile,removeServiceManifest}from'../../commands/service/registry.js';function a67_0x219c(){const _0x52b697=['reduce','imported','target','5033226ESGGWm','risk','registryServiceCode','registry','Removed\x20service\x20','updated','length','Exported\x20service\x20','warnings','Imported','Validate\x20a\x20Service\x20Tree\x20JSON\x20manifest','kind','version','Preview\x20Service\x20Tree\x20removal\x20from\x20~/.lovrabet/service.json','21994BhkWkj','Import\x20a\x20Service\x20Tree\x20manifest\x20into\x20the\x20local\x20runtime\x20registry','export','Imported\x20','30qigFaN','manifest','normalizedManifest','commands','file','Removes\x20the\x20given\x20service\x20manifest\x20from\x20the\x20local\x20Service\x20Tree\x20registry.\x20Dynamic\x20commands\x20from\x20that\x20manifest\x20will\x20no\x20longer\x20be\x20available.','cliName','str','name','manifests','126XSNssZ','Service\x20registry\x20validation\x20passed.','write','entry','registryIndex','Local\x20service\x20not\x20found:\x20','flags','registryPath','report','entries','service','List\x20locally\x20imported\x20Service\x20Tree\x20manifests','errors','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.','Service\x20Tree\x20manifest\x20file\x20path','Service\x20manifest\x20validation\x20passed.','list','replaced','map','read','7916034PILGnQ','5NFUzul','serviceCount','3925920ABFbwb','source','WRITE','Updated','56120vDDFoE','serviceCode','Export\x20the\x20local\x20Service\x20Tree\x20manifest\x20to\x20a\x20JSON\x20file','remove','Preview\x20Service\x20Tree\x20export\x20from\x20~/.lovrabet/service.json','hash','1567176jhCHof','validate','cliPath','filePath','Show\x20a\x20locally\x20imported\x20Service\x20Tree\x20manifest','9pyoqZh','string','1501488LIwxcQ'];a67_0x219c=function(){return _0x52b697;};return a67_0x219c();}import{toPublicNormalizedServiceTree,toPublicServiceTreeTarget}from'../../commands/service/function-name-adapter.js';const FILE_FLAG={'name':a67_0x56ec4b(0xea),'type':a67_0x56ec4b(0x117),'required':!![],'description':a67_0x56ec4b(0xfe)},SERVICE_FLAG={'name':a67_0x56ec4b(0xfa),'type':a67_0x56ec4b(0x117),'required':!![],'description':'Local\x20service\x20code,\x20for\x20example\x20crm','pattern':{'regex':/^[a-z][a-z0-9-]*$/,'description':'lower\x20kebab-case\x20service\x20code'}};function summarizeService(_0x21252f){const _0x6907ac=a67_0x56ec4b;return{'serviceCode':_0x21252f[_0x6907ac(0x10c)],'name':_0x21252f[_0x6907ac(0xe8)]['service'][_0x6907ac(0xee)],'version':_0x21252f[_0x6907ac(0x128)],'importedAt':_0x21252f['importedAt'],'source':_0x21252f[_0x6907ac(0x108)],'commandCount':_0x21252f['normalizedManifest'][_0x6907ac(0xe9)]['length'],'commands':_0x21252f[_0x6907ac(0xe8)][_0x6907ac(0xe9)][_0x6907ac(0x102)](_0x5ae668=>({'path':_0x5ae668[_0x6907ac(0x113)],'description':_0x5ae668['description'],'risk':_0x5ae668[_0x6907ac(0x11d)],'target':toPublicServiceTreeTarget(_0x5ae668[_0x6907ac(0x11b)]),'flags':_0x5ae668[_0x6907ac(0xf6)]['map'](_0x5764c0=>({'name':_0x5764c0[_0x6907ac(0xee)],'cliName':_0x5764c0[_0x6907ac(0xec)],'type':_0x5764c0['type'],'required':_0x5764c0['required']===!![]}))}))};}function summarizeLoadedManifest(_0x2676e1){const _0x4c92cd=a67_0x56ec4b;return{'service':_0x2676e1[_0x4c92cd(0xe8)]?.[_0x4c92cd(0xfa)],'version':_0x2676e1[_0x4c92cd(0xe8)]?.[_0x4c92cd(0x128)],'commandCount':_0x2676e1['normalizedManifest']?.[_0x4c92cd(0xe9)][_0x4c92cd(0x122)]??0x0,'commands':_0x2676e1[_0x4c92cd(0xe8)]?.[_0x4c92cd(0xe9)]['map'](_0x35b2f=>({'path':_0x35b2f[_0x4c92cd(0x113)],'risk':_0x35b2f[_0x4c92cd(0x11d)],'target':toPublicServiceTreeTarget(_0x35b2f[_0x4c92cd(0x11b)])}))??[],'registryIndex':_0x2676e1[_0x4c92cd(0xf4)],'registryServiceCode':_0x2676e1[_0x4c92cd(0x11e)],'errors':_0x2676e1[_0x4c92cd(0xf8)][_0x4c92cd(0xfc)],'warnings':_0x2676e1[_0x4c92cd(0xf8)][_0x4c92cd(0x124)]};}export const serviceDefinitions=[{'service':a67_0x56ec4b(0xfa),'command':a67_0x56ec4b(0x112),'description':a67_0x56ec4b(0x126),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'execute'(_0x349b95){const _0x285ff4=a67_0x56ec4b,_0x16e6e4=loadServiceManifestFromFile(_0x349b95[_0x285ff4(0xed)](_0x285ff4(0xea)));if(!_0x16e6e4[_0x285ff4(0xf8)]['ok'])return{'ok':![],'data':{'file':_0x16e6e4[_0x285ff4(0x114)],'hash':_0x16e6e4['hash'],'kind':_0x16e6e4['kind'],'serviceCount':_0x16e6e4[_0x285ff4(0xef)][_0x285ff4(0x122)],'services':_0x16e6e4[_0x285ff4(0xef)]['map'](summarizeLoadedManifest),'errors':_0x16e6e4[_0x285ff4(0xf8)][_0x285ff4(0xfc)],'warnings':_0x16e6e4[_0x285ff4(0xf8)][_0x285ff4(0x124)]},'message':formatValidationFailure(_0x16e6e4[_0x285ff4(0xf8)])};if(_0x16e6e4[_0x285ff4(0x127)]===_0x285ff4(0x11f)||_0x16e6e4[_0x285ff4(0xef)][_0x285ff4(0x122)]!==0x1)return{'ok':!![],'data':{'file':_0x16e6e4['filePath'],'hash':_0x16e6e4[_0x285ff4(0x110)],'kind':_0x16e6e4[_0x285ff4(0x127)],'serviceCount':_0x16e6e4[_0x285ff4(0xef)]['length'],'commandCount':_0x16e6e4['manifests'][_0x285ff4(0x119)]((_0x1ee471,_0x59d8ef)=>_0x1ee471+(_0x59d8ef[_0x285ff4(0xe8)]?.[_0x285ff4(0xe9)][_0x285ff4(0x122)]??0x0),0x0),'services':_0x16e6e4[_0x285ff4(0xef)][_0x285ff4(0x102)](summarizeLoadedManifest),'warnings':_0x16e6e4[_0x285ff4(0xf8)][_0x285ff4(0x124)]},'message':_0x285ff4(0xf1)};return{'ok':!![],'data':{'file':_0x16e6e4[_0x285ff4(0x114)],'hash':_0x16e6e4['hash'],'kind':_0x16e6e4[_0x285ff4(0x127)],'service':_0x16e6e4[_0x285ff4(0xe8)]?.[_0x285ff4(0xfa)],'version':_0x16e6e4['normalizedManifest']?.['version'],'commandCount':_0x16e6e4[_0x285ff4(0xe8)]?.[_0x285ff4(0xe9)][_0x285ff4(0x122)]??0x0,'commands':_0x16e6e4[_0x285ff4(0xe8)]?.[_0x285ff4(0xe9)][_0x285ff4(0x102)](_0x69a82c=>({'path':_0x69a82c[_0x285ff4(0x113)],'risk':_0x69a82c[_0x285ff4(0x11d)],'target':toPublicServiceTreeTarget(_0x69a82c[_0x285ff4(0x11b)])})),'warnings':_0x16e6e4[_0x285ff4(0xf8)][_0x285ff4(0x124)]},'message':_0x285ff4(0xff)};}},{'service':a67_0x56ec4b(0xfa),'command':'import','description':a67_0x56ec4b(0xe3),'risk':a67_0x56ec4b(0xf2),'confirmationDescription':'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.','requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'dryRun'(_0x3cf8dd){const _0x114414=a67_0x56ec4b,_0xac950=loadServiceManifestFromFile(_0x3cf8dd[_0x114414(0xed)](_0x114414(0xea)));return{'method':_0x114414(0x109),'url':getServiceRegistryPath(),'body':{'file':_0xac950['filePath'],'hash':_0xac950[_0x114414(0x110)],'kind':_0xac950[_0x114414(0x127)],'ok':_0xac950['report']['ok'],'service':_0xac950[_0x114414(0xe8)]?.[_0x114414(0xfa)],'version':_0xac950[_0x114414(0xe8)]?.[_0x114414(0x128)],'serviceCount':_0xac950[_0x114414(0xef)]['length'],'services':_0xac950[_0x114414(0xef)][_0x114414(0x102)](_0x12c6eb=>({'service':_0x12c6eb[_0x114414(0xe8)]?.[_0x114414(0xfa)],'version':_0x12c6eb[_0x114414(0xe8)]?.[_0x114414(0x128)],'commandCount':_0x12c6eb['normalizedManifest']?.[_0x114414(0xe9)][_0x114414(0x122)]??0x0,'errors':_0x12c6eb[_0x114414(0xf8)][_0x114414(0xfc)]})),'errors':_0xac950[_0x114414(0xf8)][_0x114414(0xfc)],'commandCount':_0xac950[_0x114414(0xe8)]?.[_0x114414(0xe9)][_0x114414(0x122)]??0x0},'description':'Preview\x20Service\x20Tree\x20import\x20into\x20~/.lovrabet/service.json'};},async 'execute'(_0x587d22){const _0x5e8b7b=a67_0x56ec4b,_0x1a14f9=importServiceManifest(_0x587d22[_0x5e8b7b(0xed)](_0x5e8b7b(0xea)));if(_0x1a14f9[_0x5e8b7b(0xf9)][_0x5e8b7b(0x122)]!==0x1)return{'ok':!![],'data':{'registryPath':_0x1a14f9[_0x5e8b7b(0xf7)],'imported':_0x1a14f9['imported'],'updated':_0x1a14f9['updated'],'serviceCount':_0x1a14f9[_0x5e8b7b(0x106)],'services':_0x1a14f9[_0x5e8b7b(0xf9)]['map'](summarizeService)},'message':_0x5e8b7b(0xe5)+_0x1a14f9['imported']+'\x20service(s),\x20updated\x20'+_0x1a14f9['updated']+'\x20service(s).'};return{'ok':!![],'data':{'registryPath':_0x1a14f9[_0x5e8b7b(0xf7)],'replaced':_0x1a14f9[_0x5e8b7b(0x101)],'imported':_0x1a14f9[_0x5e8b7b(0x11a)],'updated':_0x1a14f9[_0x5e8b7b(0x121)],'serviceCount':_0x1a14f9['serviceCount'],'service':summarizeService(_0x1a14f9[_0x5e8b7b(0xf3)])},'message':(_0x1a14f9['replaced']?_0x5e8b7b(0x10a):_0x5e8b7b(0x125))+'\x20service\x20'+_0x1a14f9[_0x5e8b7b(0xf3)][_0x5e8b7b(0x10c)]+'.'};}},{'service':'service','command':a67_0x56ec4b(0xe4),'description':a67_0x56ec4b(0x10d),'risk':a67_0x56ec4b(0xf2),'confirmationDescription':a67_0x56ec4b(0xfd),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG,FILE_FLAG],async 'dryRun'(_0x3f18c3){const _0x515b2c=a67_0x56ec4b,_0x48b2d3=getLocalServiceEntry(_0x3f18c3[_0x515b2c(0xed)]('service'));return{'method':_0x515b2c(0x109),'url':_0x3f18c3[_0x515b2c(0xed)]('file'),'body':{'service':_0x3f18c3[_0x515b2c(0xed)](_0x515b2c(0xfa)),'found':Boolean(_0x48b2d3),'version':_0x48b2d3?.[_0x515b2c(0x128)],'source':_0x48b2d3?.[_0x515b2c(0x108)]},'description':_0x515b2c(0x10f)};},async 'execute'(_0x1ae955){const _0x115ba3=a67_0x56ec4b,_0xd32f88=exportServiceManifest(_0x1ae955[_0x115ba3(0xed)]('service'),_0x1ae955['str'](_0x115ba3(0xea)));return{'ok':!![],'data':{'registryPath':_0xd32f88[_0x115ba3(0xf7)],'file':_0xd32f88['filePath'],'service':summarizeService(_0xd32f88[_0x115ba3(0xf3)])},'message':_0x115ba3(0x123)+_0xd32f88[_0x115ba3(0xf3)][_0x115ba3(0x10c)]+'.'};}},{'service':a67_0x56ec4b(0xfa),'command':a67_0x56ec4b(0x100),'description':a67_0x56ec4b(0xfb),'risk':a67_0x56ec4b(0x103),'requiresAuth':![],'requiresAppCode':![],'flags':[],async 'execute'(){const _0xa16d6f=a67_0x56ec4b,_0x1d0055=listLocalServices();return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'total':_0x1d0055[_0xa16d6f(0x122)],'services':_0x1d0055['map'](summarizeService)}};}},{'service':a67_0x56ec4b(0xfa),'command':a67_0x56ec4b(0x10e),'description':'Remove\x20a\x20Service\x20Tree\x20manifest\x20from\x20the\x20local\x20runtime\x20registry','risk':a67_0x56ec4b(0xf2),'confirmationDescription':a67_0x56ec4b(0xeb),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'dryRun'(_0x32b3fa){const _0x3c7fbb=a67_0x56ec4b,_0x1797a0=getLocalServiceEntry(_0x32b3fa[_0x3c7fbb(0xed)](_0x3c7fbb(0xfa)));return{'method':_0x3c7fbb(0x109),'url':getServiceRegistryPath(),'body':{'service':_0x32b3fa['str'](_0x3c7fbb(0xfa)),'found':Boolean(_0x1797a0),'version':_0x1797a0?.[_0x3c7fbb(0x128)],'source':_0x1797a0?.[_0x3c7fbb(0x108)]},'description':_0x3c7fbb(0x129)};},async 'execute'(_0x35f585){const _0x32c4ca=a67_0x56ec4b,_0x368036=removeServiceManifest(_0x35f585[_0x32c4ca(0xed)]('service'));return{'ok':!![],'data':{'registryPath':_0x368036['registryPath'],'serviceCount':_0x368036['serviceCount'],'service':summarizeService(_0x368036['entry'])},'message':_0x32c4ca(0x120)+_0x368036[_0x32c4ca(0xf3)][_0x32c4ca(0x10c)]+'.'};}},{'service':a67_0x56ec4b(0xfa),'command':'detail','description':a67_0x56ec4b(0x115),'risk':a67_0x56ec4b(0x103),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'execute'(_0x3efa4b){const _0x5aa5dd=a67_0x56ec4b,_0xa6de16=getLocalServiceEntry(_0x3efa4b[_0x5aa5dd(0xed)](_0x5aa5dd(0xfa)));if(!_0xa6de16)return{'ok':![],'data':{'registryPath':getServiceRegistryPath(),'service':_0x3efa4b[_0x5aa5dd(0xed)](_0x5aa5dd(0xfa))},'message':_0x5aa5dd(0xf5)+_0x3efa4b['str'](_0x5aa5dd(0xfa))};return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'service':summarizeService(_0xa6de16),'manifest':_0xa6de16[_0x5aa5dd(0xe7)],'normalizedManifest':toPublicNormalizedServiceTree(_0xa6de16[_0x5aa5dd(0xe8)])}};}}];
|
|
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)])}};}}];
|