@lovrabet/lovrabet-cli 2.3.10-beta.3 → 2.3.11-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/approval/index.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/import-excel.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/issue/context.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/permit/dataset-get.js +1 -1
- package/lib/commands/permit/dataset-set.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/schedule/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/function-name-adapter.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/diagram.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/diagram.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/user-account/bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-sdk-errors.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/access-error.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/raw-flags.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-import/auto-id-runner.js +1 -1
- package/lib/services/dataset-import/excel-reader.js +1 -1
- package/lib/services/dataset-import/image-bytes.js +1 -1
- package/lib/services/dataset-import/image-ooxml.js +1 -1
- package/lib/services/dataset-import/image-runner.js +1 -1
- package/lib/services/dataset-import/metadata.js +1 -1
- package/lib/services/dataset-import/preview.js +1 -1
- package/lib/services/dataset-import/runner.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/install-target.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/utils/access-key-redaction.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/positive-safe-integer.js +1 -1
- package/lib/utils/redaction.js +1 -1
- package/lib/utils/runtime-user-id.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/lovrabet/SKILL.md +3 -3
- package/skills/lovrabet/references/lovrabet-schedule-workflow.md +50 -1
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a55_0x1fb9fa=a55_0x287c;(function(_0xa8b0f3,_0x5c3097){const _0x2b4cd=a55_0x287c,_0x568bfd=_0xa8b0f3();while(!![]){try{const _0x1abb7a=-parseInt(_0x2b4cd(0x128))/0x1+parseInt(_0x2b4cd(0x139))/0x2*(parseInt(_0x2b4cd(0x12d))/0x3)+-parseInt(_0x2b4cd(0x13a))/0x4+-parseInt(_0x2b4cd(0x127))/0x5*(parseInt(_0x2b4cd(0x135))/0x6)+parseInt(_0x2b4cd(0x12e))/0x7+-parseInt(_0x2b4cd(0x130))/0x8+parseInt(_0x2b4cd(0x131))/0x9;if(_0x1abb7a===_0x5c3097)break;else _0x568bfd['push'](_0x568bfd['shift']());}catch(_0x5d54a5){_0x568bfd['push'](_0x568bfd['shift']());}}}(a55_0x34dc,0xe98fd));import{deleteRuntimeAppRole}from'../../core/api-client.js';import{dryRun}from'../../framework/dryrun.js';function a55_0x287c(_0x3e475f,_0x15b303){_0x3e475f=_0x3e475f-0x127;const _0x34dc2b=a55_0x34dc();let _0x287ccc=_0x34dc2b[_0x3e475f];return _0x287ccc;}import{assertCustomRuntimeRole,getRuntimeRoleById,projectRuntimeRole,ROLE_ID_FLAG,runtimeRoleWriteResult}from'../../commands/role/shared.js';async function prepare(_0xbf28dc){const _0x1eb37f=a55_0x287c,_0x531ffa=await getRuntimeRoleById(_0xbf28dc[_0x1eb37f(0x12b)],_0xbf28dc[_0x1eb37f(0x133)]('id'));return assertCustomRuntimeRole(_0x531ffa,_0x1eb37f(0x132)),_0x531ffa;}export const roleDelete={'service':a55_0x1fb9fa(0x138),'command':a55_0x1fb9fa(0x132),'description':a55_0x1fb9fa(0x12c),'risk':a55_0x1fb9fa(0x129),'confirmationDescription':a55_0x1fb9fa(0x12f),'flags':[ROLE_ID_FLAG],async 'dryRun'(_0x3d9f72){const _0x4ff163=a55_0x1fb9fa,_0x47c316=await prepare(_0x3d9f72);return dryRun(_0x4ff163(0x134),_0x4ff163(0x12a))[_0x4ff163(0x136)]({'id':_0x47c316['id']})[_0x4ff163(0x137)]('Preview:\x20delete\x20a\x20runtime\x20CUSTOM\x20role')['build']();},async 'execute'(_0x436bd3){const _0x373f9a=a55_0x1fb9fa,_0x4cc6d8=await prepare(_0x436bd3);return await deleteRuntimeAppRole(_0x4cc6d8['id']),{'ok':!![],'data':runtimeRoleWriteResult(_0x373f9a(0x132),{'roleId':_0x4cc6d8['id']},projectRuntimeRole(_0x4cc6d8),null,{'method':_0x373f9a(0x134),'path':_0x373f9a(0x12a)})};}};function a55_0x34dc(){const _0x4b5c40=['597mKyJFB','2811235JloxuU','Deletes\x20the\x20custom\x20role\x20in\x20the\x20current\x20runtime\x20app.\x20Membership\x20and\x20permission\x20config\x20for\x20that\x20role\x20may\x20become\x20invalid.','14258648kcIrsw','54467001ydlTaJ','delete','num','POST','6blHelm','body','description','role','7336fbmzhI','6535032Ofvsvt','6306415LdVXJj','1549385pKRVqh','high-risk-write','/client/permit/role/delete','appCode','Delete\x20a\x20runtime\x20CUSTOM\x20role'];a55_0x34dc=function(){return _0x4b5c40;};return a55_0x34dc();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a56_0x409992=a56_0x2031;function a56_0x2031(_0x222337,_0x4e4696){_0x222337=_0x222337-0x1aa;const _0x13512f=a56_0x1351();let _0x2031e8=_0x13512f[_0x222337];return _0x2031e8;}(function(_0x2dc29a,_0x46305c){const _0x4b79b1=a56_0x2031,_0x2c7e46=_0x2dc29a();while(!![]){try{const _0x40431a=parseInt(_0x4b79b1(0x1b9))/0x1+-parseInt(_0x4b79b1(0x1b4))/0x2+-parseInt(_0x4b79b1(0x1aa))/0x3+-parseInt(_0x4b79b1(0x1b5))/0x4+-parseInt(_0x4b79b1(0x1b8))/0x5*(-parseInt(_0x4b79b1(0x1ab))/0x6)+parseInt(_0x4b79b1(0x1ac))/0x7*(parseInt(_0x4b79b1(0x1b2))/0x8)+parseInt(_0x4b79b1(0x1b0))/0x9*(parseInt(_0x4b79b1(0x1b7))/0xa);if(_0x40431a===_0x46305c)break;else _0x2c7e46['push'](_0x2c7e46['shift']());}catch(_0x1ecffb){_0x2c7e46['push'](_0x2c7e46['shift']());}}}(a56_0x1351,0x6bdfa));function a56_0x1351(){const _0x42673f=['1228856DriBtl','detail','506960ynJrGf','15EUwRwP','473262xxUfmq','num','887388KGqEJr','213024KAJFsg','1876DpPvYo','role','runtime','Show\x20one\x20runtime\x20role\x20by\x20ID','90GBybEE','read','10600JGhOdT','appCode','793948OEQSrz'];a56_0x1351=function(){return _0x42673f;};return a56_0x1351();}import{getRuntimeRoleById,projectRuntimeRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';export const roleDetail={'service':a56_0x409992(0x1ad),'command':a56_0x409992(0x1b6),'description':a56_0x409992(0x1af),'risk':a56_0x409992(0x1b1),'flags':[ROLE_ID_FLAG],async 'execute'(_0x47af47){const _0x32af7f=a56_0x409992,_0x3484bf=await getRuntimeRoleById(_0x47af47[_0x32af7f(0x1b3)],_0x47af47[_0x32af7f(0x1ba)]('id'));return{'ok':!![],'data':{'scope':_0x32af7f(0x1ae),'role':projectRuntimeRole(_0x3484bf)}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a57_0x5be9(_0x4491ea,_0x78b4fd){_0x4491ea=_0x4491ea-0x1b9;const _0x56be2e=a57_0x56be();let _0x5be9b7=_0x56be2e[_0x4491ea];return _0x5be9b7;}(function(_0x3c7f26,_0x9e8cc5){const _0x5b4d4a=a57_0x5be9,_0x31195c=_0x3c7f26();while(!![]){try{const _0x219c01=parseInt(_0x5b4d4a(0x1c0))/0x1+parseInt(_0x5b4d4a(0x1bc))/0x2+parseInt(_0x5b4d4a(0x1c1))/0x3+parseInt(_0x5b4d4a(0x1ba))/0x4*(parseInt(_0x5b4d4a(0x1bb))/0x5)+parseInt(_0x5b4d4a(0x1b9))/0x6+parseInt(_0x5b4d4a(0x1c2))/0x7*(parseInt(_0x5b4d4a(0x1bd))/0x8)+-parseInt(_0x5b4d4a(0x1bf))/0x9*(parseInt(_0x5b4d4a(0x1be))/0xa);if(_0x219c01===_0x9e8cc5)break;else _0x31195c['push'](_0x31195c['shift']());}catch(_0x26c543){_0x31195c['push'](_0x31195c['shift']());}}}(a57_0x56be,0x93f82));import{roleList}from'../../commands/role/list.js';import{roleDetail}from'../../commands/role/detail.js';import{roleCreate}from'../../commands/role/create.js';function a57_0x56be(){const _0x1fe34f=['7tztYej','3925386wDMJle','16nWoIdo','942495LTZCsa','1940992byiUWB','1021648ArkOhD','4310SDaLFT','50373MVYUOr','155577SlpyhV','1069149SncqaD'];a57_0x56be=function(){return _0x1fe34f;};return a57_0x56be();}import{roleUpdate}from'../../commands/role/update.js';import{roleDelete}from'../../commands/role/delete.js';import{roleUserAdd}from'../../commands/role/user-add.js';import{roleUserRemove}from'../../commands/role/user-remove.js';export const roleDefinitions=[roleList,roleDetail,roleCreate,roleUpdate,roleDelete,roleUserAdd,roleUserRemove];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a58_0x70bb2e=a58_0x5dd0;function a58_0x5dd0(_0x4fefdd,_0x1b76e2){_0x4fefdd=_0x4fefdd-0x100;const _0x272bf0=a58_0x272b();let _0x5dd0bd=_0x272bf0[_0x4fefdd];return _0x5dd0bd;}(function(_0x13472d,_0x419cd5){const _0x1b6634=a58_0x5dd0,_0x4d47df=_0x13472d();while(!![]){try{const _0x2c506f=parseInt(_0x1b6634(0x119))/0x1*(-parseInt(_0x1b6634(0x105))/0x2)+parseInt(_0x1b6634(0x106))/0x3*(parseInt(_0x1b6634(0x12a))/0x4)+parseInt(_0x1b6634(0x123))/0x5*(parseInt(_0x1b6634(0x126))/0x6)+parseInt(_0x1b6634(0x120))/0x7+-parseInt(_0x1b6634(0x10b))/0x8*(-parseInt(_0x1b6634(0x101))/0x9)+parseInt(_0x1b6634(0x114))/0xa+-parseInt(_0x1b6634(0x107))/0xb;if(_0x2c506f===_0x419cd5)break;else _0x4d47df['push'](_0x4d47df['shift']());}catch(_0x149424){_0x4d47df['push'](_0x4d47df['shift']());}}}(a58_0x272b,0xebc38));function a58_0x272b(){const _0x2dc97d=['length','map','Invalid\x20runtime\x20role\x20type:\x20','List\x20runtime\x20roles\x20for\x20the\x20current\x20app','roleType','string','6177465QbhCUb','isSafeInteger','Fuzzy\x20role-name\x20filter','895qGTiHk','role','page','38838yNwMoT','number','validation','Runtime\x20role\x20type','1306448xaAZNl','toUpperCase','3397761oeEUpu','filter','type','includes','2pOvezE','6MONGDs','11368544NnmBwc','runtime','Page\x20number','--pagesize\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.','8lWbeCy','trim','appCode','items','str','slice','read','list','Page\x20size\x20from\x201\x20to\x20100','7533030GNDiMK','num','pagesize','name','--page\x20must\x20be\x20a\x20positive\x20integer.','1826026NWceRd'];a58_0x272b=function(){return _0x2dc97d;};return a58_0x272b();}import{listRuntimeAppRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{listAllRuntimeRoles,projectRuntimeRole,RUNTIME_ROLE_TYPES}from'../../commands/role/shared.js';export const roleList={'service':a58_0x70bb2e(0x124),'command':a58_0x70bb2e(0x112),'description':a58_0x70bb2e(0x11d),'risk':a58_0x70bb2e(0x111),'flags':[{'name':'type','type':a58_0x70bb2e(0x11f),'enum':RUNTIME_ROLE_TYPES,'description':a58_0x70bb2e(0x129)},{'name':a58_0x70bb2e(0x117),'type':a58_0x70bb2e(0x11f),'description':a58_0x70bb2e(0x122)},{'name':'page','type':a58_0x70bb2e(0x127),'default':0x1,'description':a58_0x70bb2e(0x109)},{'name':a58_0x70bb2e(0x116),'type':a58_0x70bb2e(0x127),'default':0x64,'description':a58_0x70bb2e(0x113)}],async 'validate'(_0xe6137f){const _0x451d1e=a58_0x70bb2e,_0x177ed7=_0xe6137f[_0x451d1e(0x10f)](_0x451d1e(0x103))[_0x451d1e(0x100)]();if(_0x177ed7&&!RUNTIME_ROLE_TYPES[_0x451d1e(0x104)](_0x177ed7))throw CliErrors[_0x451d1e(0x128)](_0x451d1e(0x11c)+_0x177ed7+'.');const _0x4d6606=_0xe6137f[_0x451d1e(0x115)]('page',0x1),_0x5255d3=_0xe6137f[_0x451d1e(0x115)](_0x451d1e(0x116),0x64);if(!Number['isSafeInteger'](_0x4d6606)||_0x4d6606<0x1)throw CliErrors[_0x451d1e(0x128)](_0x451d1e(0x118));if(!Number[_0x451d1e(0x121)](_0x5255d3)||_0x5255d3<0x1||_0x5255d3>0x64)throw CliErrors[_0x451d1e(0x128)](_0x451d1e(0x10a));},async 'execute'(_0x8a6e76){const _0x42667f=a58_0x70bb2e,_0x5ecc40=_0x8a6e76[_0x42667f(0x10f)](_0x42667f(0x103))[_0x42667f(0x100)](),_0x2e02ce=_0x8a6e76[_0x42667f(0x10f)](_0x42667f(0x117))[_0x42667f(0x10c)](),_0x4454ec=_0x8a6e76[_0x42667f(0x115)](_0x42667f(0x125),0x1),_0x59b1c8=_0x8a6e76[_0x42667f(0x115)](_0x42667f(0x116),0x64);if(_0x5ecc40){const _0x38daa4=(await listAllRuntimeRoles(_0x8a6e76[_0x42667f(0x10d)],{..._0x2e02ce?{'roleName':_0x2e02ce}:{}}))[_0x42667f(0x102)](_0x14c68b=>_0x14c68b[_0x42667f(0x11e)]===_0x5ecc40),_0x1d78ab=(_0x4454ec-0x1)*_0x59b1c8;return{'ok':!![],'data':{'scope':_0x42667f(0x108),'roles':_0x38daa4[_0x42667f(0x110)](_0x1d78ab,_0x1d78ab+_0x59b1c8)[_0x42667f(0x11b)](projectRuntimeRole),'paging':{'currentPage':_0x4454ec,'pageSize':_0x59b1c8,'totalCount':_0x38daa4[_0x42667f(0x11a)]}}};}const _0x35d33b=await listRuntimeAppRoles(_0x8a6e76['appCode'],{..._0x2e02ce?{'roleName':_0x2e02ce}:{},'currentPage':_0x4454ec,'pageSize':_0x59b1c8});return{'ok':!![],'data':{'scope':'runtime','roles':_0x35d33b[_0x42667f(0x10e)][_0x42667f(0x11b)](projectRuntimeRole),'paging':_0x35d33b['paging']}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a59_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_0x2a4e98=a59_0x5228;(function(_0x26c5bf,_0x3e3632){const _0x332ba8=a59_0x5228,_0x1a44f4=_0x26c5bf();while(!![]){try{const _0x32dbda=parseInt(_0x332ba8(0x107))/0x1+-parseInt(_0x332ba8(0x11c))/0x2*(parseInt(_0x332ba8(0x128))/0x3)+parseInt(_0x332ba8(0x137))/0x4*(-parseInt(_0x332ba8(0x126))/0x5)+parseInt(_0x332ba8(0x11b))/0x6+-parseInt(_0x332ba8(0x110))/0x7*(-parseInt(_0x332ba8(0x134))/0x8)+-parseInt(_0x332ba8(0x124))/0x9+-parseInt(_0x332ba8(0xff))/0xa;if(_0x32dbda===_0x3e3632)break;else _0x1a44f4['push'](_0x1a44f4['shift']());}catch(_0x1e69da){_0x1a44f4['push'](_0x1a44f4['shift']());}}}(a59_0x1ce6,0x531bd));import{listRuntimeAppUsers,listRuntimeAppRoles,listRuntimeRoleUsers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{normalizeRuntimeUserId}from'../../utils/runtime-user-id.js';export const RUNTIME_ROLE_TYPES=[a59_0x2a4e98(0x139),'USER',a59_0x2a4e98(0x106),a59_0x2a4e98(0x117)];const BUILTIN_ROLE_TYPES=[a59_0x2a4e98(0x139),a59_0x2a4e98(0x10b),'OWNER'];function a59_0x1ce6(){const _0x241753=['permitCount','join','runtime','727072JFWmlE','Runtime\x20role\x20','test','4wBvRGd','remark','ADMIN','length','items','role-code','str','filter','totalCount','Missing\x20runtime\x20role\x20reference.','user','validation','flag','Globally\x20unique\x20roleCode\x20(maximum\x2064\x20characters)','User\x20','Invalid\x20runtime\x20userId.','Use\x20a\x20userId\x20returned\x20by\x20the\x20current\x20application\x27s\x20personnel\x20list.','userList','map','\x22\x20is\x20ambiguous.','Runtime\x20role\x20ID\x20returned\x20by\x20role\x20list','Runtime\x20role\x20member\x20count\x20changed:\x20expected\x20','6820370vNNpzQ','push','paging','\x20is\x20already\x20in\x20runtime\x20role\x20','userCount','Runtime\x20role\x20name\x20\x22','role','OWNER','440245dqMcqF','includes','Pass\x20one\x20role\x20ID:\x20','applyUserList','USER','--role-code\x20cannot\x20exceed\x2064\x20characters.','--expect-user-count\x20must\x20be\x20a\x20non-negative\x20integer.','Runtime\x20userId\x20(string)','Reject\x20when\x20the\x20target\x20role\x20member\x20count\x20has\x20changed','49WpCJph','\x20was\x20not\x20found\x20in\x20app\x20','Run\x20`lovrabet\x20role\x20list`\x20and\x20use\x20a\x20role\x20from\x20the\x20current\x20app.','roleName','Runtime\x20user\x20','\x20is\x20missing\x20from\x20the\x20grouped\x20member\x20snapshot.','\x20built-in\x20runtime\x20role\x20','CUSTOM','find','number','Pass\x20--user\x20<userId>;\x20name\x20and\x20account\x20lookup\x20are\x20not\x20available\x20in\x20runtime\x20scope.','3683802ZwXVJr','226076RdokCg','roleCode','Run\x20`lovrabet\x20role\x20list`\x20or\x20pass\x20--role\x20<id>.','userName','Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name','Runtime\x20role\x20id\x20','userId','isSafeInteger','605187CKOdJF','Runtime\x20role\x20has\x20an\x20invalid\x20ID;\x20reload\x20roles\x20before\x20writing.','1307965RxUxqd','appCode','9uotJEv','Cannot\x20','Role\x20ID\x20must\x20be\x20a\x20positive\x20integer.','string','OWNER\x20runtime\x20role\x20membership\x20cannot\x20be\x20changed\x20with\x20this\x20command.','--role-code\x20must\x20not\x20be\x20blank.','trim','roleType','expect-user-count'];a59_0x1ce6=function(){return _0x241753;};return a59_0x1ce6();}export const ROLE_ID_FLAG={'name':'id','type':a59_0x2a4e98(0x119),'required':!![],'description':a59_0x2a4e98(0xfd)};export const ROLE_REF_FLAG={'name':a59_0x2a4e98(0x105),'type':a59_0x2a4e98(0x12b),'required':!![],'description':a59_0x2a4e98(0x120)};export const ROLE_CODE_FLAG={'name':a59_0x2a4e98(0x13c),'type':'string','description':a59_0x2a4e98(0x144)};export const USER_ID_FLAG={'name':'user','type':'string','required':!![],'description':a59_0x2a4e98(0x10e)};export const EXPECT_USER_COUNT_FLAG={'name':'expect-user-count','type':a59_0x2a4e98(0x119),'description':a59_0x2a4e98(0x10f)};export function isBuiltinRuntimeRole(_0x1a8362){const _0x2411fb=a59_0x2a4e98;return BUILTIN_ROLE_TYPES[_0x2411fb(0x108)](_0x1a8362);}export function assertCustomRuntimeRole(_0x136a1f,_0x445468){const _0x9a729d=a59_0x2a4e98;if(_0x136a1f[_0x9a729d(0x12f)]!==_0x9a729d(0x117))throw CliErrors[_0x9a729d(0x142)](_0x9a729d(0x129)+_0x445468+_0x9a729d(0x116)+_0x136a1f[_0x9a729d(0x113)]+'\x20('+_0x136a1f[_0x9a729d(0x12f)]+').','Only\x20CUSTOM\x20runtime\x20roles\x20can\x20be\x20modified\x20or\x20deleted.');}export function projectRuntimeRole(_0x146d1c){const _0x5017ae=a59_0x2a4e98;return{'id':_0x146d1c['id'],'roleCode':_0x146d1c[_0x5017ae(0x11d)],'roleName':_0x146d1c[_0x5017ae(0x113)],'roleType':_0x146d1c[_0x5017ae(0x12f)],'remark':_0x146d1c[_0x5017ae(0x138)],'userCount':_0x146d1c[_0x5017ae(0x103)]??0x0,'permitCount':_0x146d1c[_0x5017ae(0x131)]??0x0,'builtin':isBuiltinRuntimeRole(_0x146d1c[_0x5017ae(0x12f)])};}export function readOptionalRuntimeRoleCode(_0x4bf624){const _0x147fe9=a59_0x2a4e98,_0x380387=_0x4bf624[_0x147fe9(0x143)]('role-code');if(_0x380387===undefined||_0x380387===null)return undefined;const _0x4e2c2d=String(_0x380387)[_0x147fe9(0x12e)]();if(!_0x4e2c2d)throw CliErrors['validation'](_0x147fe9(0x12d));if(_0x4e2c2d[_0x147fe9(0x13a)]>0x40)throw CliErrors[_0x147fe9(0x142)](_0x147fe9(0x10c));return _0x4e2c2d;}export async function getRuntimeRoleById(_0x7259ce,_0x57c57a){const _0x494f00=a59_0x2a4e98;if(!Number[_0x494f00(0x123)](_0x57c57a)||_0x57c57a<=0x0)throw CliErrors[_0x494f00(0x142)](_0x494f00(0x12a));const _0x5678ee=(await listAllRuntimeRoles(_0x7259ce))[_0x494f00(0x13e)](_0x1b560c=>_0x1b560c['id']===_0x57c57a&&(!_0x1b560c[_0x494f00(0x127)]||_0x1b560c[_0x494f00(0x127)]===_0x7259ce));if(_0x5678ee['length']!==0x1)throw CliErrors[_0x494f00(0x142)](_0x494f00(0x121)+_0x57c57a+_0x494f00(0x111)+_0x7259ce+'.',_0x494f00(0x112));const _0x58094b=_0x5678ee[0x0],_0x1ea4a2=_0x58094b['id'];if(typeof _0x1ea4a2!==_0x494f00(0x119)||!Number[_0x494f00(0x123)](_0x1ea4a2)||_0x1ea4a2<=0x0)throw CliErrors[_0x494f00(0x142)]('Runtime\x20role\x20has\x20an\x20invalid\x20ID;\x20reload\x20roles\x20before\x20writing.');return{..._0x58094b,'id':_0x1ea4a2};}function a59_0x5228(_0x277c27,_0x3f2f20){_0x277c27=_0x277c27-0xfb;const _0x1ce6b6=a59_0x1ce6();let _0x522876=_0x1ce6b6[_0x277c27];return _0x522876;}export async function listAllRuntimeRoles(_0x1413d2,_0xe1a9e5={}){const _0x4b808d=a59_0x2a4e98,_0x330de6=0x64,_0x6b3e9e=[];for(let _0x4ac344=0x1;;_0x4ac344+=0x1){const _0x29eb0a=await listRuntimeAppRoles(_0x1413d2,{..._0xe1a9e5[_0x4b808d(0x113)]?{'roleName':_0xe1a9e5[_0x4b808d(0x113)]}:{},'currentPage':_0x4ac344,'pageSize':_0x330de6});_0x6b3e9e[_0x4b808d(0x100)](..._0x29eb0a[_0x4b808d(0x13b)]);if(_0x29eb0a[_0x4b808d(0x13b)][_0x4b808d(0x13a)]<_0x330de6||_0x29eb0a[_0x4b808d(0x101)]&&_0x6b3e9e['length']>=_0x29eb0a[_0x4b808d(0x101)][_0x4b808d(0x13f)])return _0x6b3e9e;}}export async function resolveRuntimeRoleRef(_0x349544,_0x44cae5){const _0x5b3780=a59_0x2a4e98,_0x4e3a9f=_0x44cae5[_0x5b3780(0x12e)]();if(!_0x4e3a9f)throw CliErrors[_0x5b3780(0x142)](_0x5b3780(0x140),'Pass\x20--role\x20<id|name>.');if(/^\d+$/[_0x5b3780(0x136)](_0x4e3a9f))return getRuntimeRoleById(_0x349544,Number(_0x4e3a9f));const _0x18de8f=(await listAllRuntimeRoles(_0x349544))['filter'](_0xa22d60=>_0xa22d60[_0x5b3780(0x113)]===_0x4e3a9f);if(_0x18de8f[_0x5b3780(0x13a)]===0x0)throw CliErrors[_0x5b3780(0x142)](_0x5b3780(0x104)+_0x4e3a9f+'\x22\x20was\x20not\x20found\x20in\x20app\x20'+_0x349544+'.',_0x5b3780(0x11e));if(_0x18de8f['length']>0x1)throw CliErrors['validation'](_0x5b3780(0x104)+_0x4e3a9f+_0x5b3780(0xfc),_0x5b3780(0x109)+_0x18de8f[_0x5b3780(0xfb)](_0x5a3b4b=>_0x5a3b4b['id'])[_0x5b3780(0x132)](',\x20')+'.');const _0x3c27d6=_0x18de8f[0x0],_0x38e68a=_0x3c27d6['id'];if(typeof _0x38e68a!==_0x5b3780(0x119)||!Number['isSafeInteger'](_0x38e68a)||_0x38e68a<=0x0)throw CliErrors[_0x5b3780(0x142)](_0x5b3780(0x125));return{..._0x3c27d6,'id':_0x38e68a};}function parseRuntimeUserId(_0x4711e5){const _0x26ea64=a59_0x2a4e98,_0x397ef2=_0x4711e5[_0x26ea64(0x12e)](),_0x561ccf=normalizeRuntimeUserId(_0x397ef2);if(_0x561ccf===undefined)throw CliErrors['validation'](_0x26ea64(0x146),_0x26ea64(0x11a));return _0x561ccf;}export async function prepareRuntimeMemberMutation(_0x594d39,_0x5de6da){const _0x349394=a59_0x2a4e98,_0x52a4e4=await resolveRuntimeRoleRef(_0x594d39['appCode'],_0x594d39[_0x349394(0x13d)]('role'));if(_0x52a4e4[_0x349394(0x12f)]===_0x349394(0x106))throw CliErrors[_0x349394(0x142)](_0x349394(0x12c),'Transfer\x20or\x20manage\x20application\x20ownership\x20through\x20the\x20dedicated\x20application\x20workflow.');const _0x96cd0f=parseRuntimeUserId(_0x594d39['str'](_0x349394(0x141))),_0x574dba=(await listRuntimeRoleUsers(_0x594d39[_0x349394(0x127)]))[_0x349394(0xfb)](_0x38b355=>{const _0x48354f=_0x349394;if(typeof _0x38b355['id']!==_0x48354f(0x119)||!Number['isSafeInteger'](_0x38b355['id'])||_0x38b355['id']<=0x0)throw CliErrors['validation']('Runtime\x20role\x20member\x20snapshot\x20has\x20an\x20invalid\x20role\x20ID;\x20reload\x20before\x20writing.');return{..._0x38b355,'userList':[..._0x38b355['userList']??[]],'applyUserList':[..._0x38b355[_0x48354f(0x10a)]??[]]};}),_0x16ad5d=_0x574dba[_0x349394(0x118)](_0xaee714=>_0xaee714['id']===_0x52a4e4['id']);if(!_0x16ad5d)throw CliErrors[_0x349394(0x142)](_0x349394(0x135)+_0x52a4e4['id']+_0x349394(0x115),'Reload\x20the\x20role\x20list\x20and\x20retry\x20after\x20the\x20server\x20state\x20is\x20consistent.');const _0x1e9c5d=_0xed5c9a=>{const _0x48056e=_0x349394,_0x379479=normalizeRuntimeUserId(_0xed5c9a);if(_0x379479===undefined)throw CliErrors[_0x48056e(0x142)]('Runtime\x20role\x20member\x20has\x20an\x20invalid\x20userId.');return _0x379479;},_0x3fe000=_0x16ad5d[_0x349394(0x148)][_0x349394(0xfb)](_0x19d20e=>_0x1e9c5d(_0x19d20e[_0x349394(0x122)])),_0x3096d3=_0x594d39[_0x349394(0x143)](_0x349394(0x130));if(_0x3096d3!==undefined&&_0x3096d3!==null&&_0x3096d3!==''){const _0x3886cd=_0x594d39['num']('expect-user-count');if(!Number[_0x349394(0x123)](_0x3886cd)||_0x3886cd<0x0)throw CliErrors['validation'](_0x349394(0x10d));if(_0x3fe000[_0x349394(0x13a)]!==_0x3886cd)throw CliErrors[_0x349394(0x142)](_0x349394(0xfe)+_0x3886cd+',\x20found\x20'+_0x3fe000['length']+'.','Read\x20the\x20current\x20members\x20and\x20retry\x20with\x20the\x20new\x20expected\x20count.');}const _0x128fcd=_0x3fe000[_0x349394(0x108)](_0x96cd0f),_0x153dff=[];let _0x1de1c2=!![];if(_0x5de6da==='user-add'){const _0x1ba7cf=await listRuntimeAppUsers(_0x594d39[_0x349394(0x127)]),_0x78b415=_0x1ba7cf[_0x349394(0x13e)](_0x51a7d3=>normalizeRuntimeUserId(_0x51a7d3['code'])===_0x96cd0f);if(_0x78b415[_0x349394(0x13a)]!==0x1||!_0x78b415[0x0][_0x349394(0x11f)]?.[_0x349394(0x12e)]())throw CliErrors[_0x349394(0x142)](_0x349394(0x114)+_0x96cd0f+'\x20was\x20not\x20found\x20in\x20app\x20'+_0x594d39[_0x349394(0x127)]+'.',_0x349394(0x147));_0x128fcd?(_0x1de1c2=![],_0x153dff['push'](_0x349394(0x145)+_0x96cd0f+_0x349394(0x102)+_0x52a4e4['id']+'.')):_0x16ad5d[_0x349394(0x148)]['push']({'userId':_0x96cd0f,'username':_0x78b415[0x0][_0x349394(0x11f)]});}else!_0x128fcd?(_0x1de1c2=![],_0x153dff[_0x349394(0x100)]('User\x20'+_0x96cd0f+'\x20is\x20not\x20in\x20runtime\x20role\x20'+_0x52a4e4['id']+'.')):_0x16ad5d[_0x349394(0x148)]=_0x16ad5d[_0x349394(0x148)]['filter'](_0x59c21a=>_0x1e9c5d(_0x59c21a[_0x349394(0x122)])!==_0x96cd0f);return{'role':_0x52a4e4,'userId':_0x96cd0f,'roleList':_0x574dba,'before':{'userIds':_0x3fe000},'after':{'userIds':_0x16ad5d[_0x349394(0x148)][_0x349394(0xfb)](_0x1963da=>_0x1e9c5d(_0x1963da[_0x349394(0x122)]))},'shouldWrite':_0x1de1c2,'warnings':_0x153dff};}export function runtimeRoleWriteResult(_0x480c67,_0x149308,_0x30a1e4,_0x58f41a,_0x577f7d,_0x9616cf=[]){const _0x52a4f6=a59_0x2a4e98;return{'operation':_0x480c67,'scope':_0x52a4f6(0x133),'selector':_0x149308,'before':_0x30a1e4,'after':_0x58f41a,'dryRun':![],'backend':_0x577f7d,'warnings':_0x9616cf};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a60_0x8fb4(){const _0x22fb18=['New\x20non-empty\x20role\x20remark','Changes\x20the\x20custom\x20role\x20code,\x20name,\x20or\x20note\x20in\x20the\x20current\x20runtime\x20app.\x20The\x20role\x20updates\x20immediately.','48NUHFqs','string','Update\x20a\x20runtime\x20CUSTOM\x20role\x27s\x20code,\x20name,\x20or\x20remark','353005XppwUZ','8403060TgjDUU','14mUnAyY','num','2912994bukGxc','1047927Dyryne','Preview:\x20update\x20a\x20runtime\x20CUSTOM\x20role','flag','New\x20role\x20name','build','trim','POST','name','update','2352774oGCaQY','remark','Pass\x20--role-code,\x20--name,\x20or\x20--remark\x20to\x20update\x20the\x20runtime\x20role.','--name\x20must\x20not\x20be\x20blank.','str','280976QvJfys','description','17246070exVTaw','validation','--remark\x20must\x20not\x20be\x20blank.','body'];a60_0x8fb4=function(){return _0x22fb18;};return a60_0x8fb4();}const a60_0x5b541b=a60_0x341f;(function(_0x4d5e02,_0x8b883c){const _0x6b03f6=a60_0x341f,_0x4aa766=_0x4d5e02();while(!![]){try{const _0x3cb5d4=-parseInt(_0x6b03f6(0x1c4))/0x1+-parseInt(_0x6b03f6(0x1c3))/0x2+-parseInt(_0x6b03f6(0x1af))/0x3+parseInt(_0x6b03f6(0x1bc))/0x4*(parseInt(_0x6b03f6(0x1bf))/0x5)+parseInt(_0x6b03f6(0x1c0))/0x6+-parseInt(_0x6b03f6(0x1c1))/0x7*(parseInt(_0x6b03f6(0x1b4))/0x8)+parseInt(_0x6b03f6(0x1b6))/0x9;if(_0x3cb5d4===_0x8b883c)break;else _0x4aa766['push'](_0x4aa766['shift']());}catch(_0x8d0c79){_0x4aa766['push'](_0x4aa766['shift']());}}}(a60_0x8fb4,0xc48a2));import{updateRuntimeAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';function a60_0x341f(_0x287ef7,_0xbe7c1d){_0x287ef7=_0x287ef7-0x1ad;const _0x8fb414=a60_0x8fb4();let _0x341f79=_0x8fb414[_0x287ef7];return _0x341f79;}import{assertCustomRuntimeRole,getRuntimeRoleById,projectRuntimeRole,readOptionalRuntimeRoleCode,ROLE_CODE_FLAG,ROLE_ID_FLAG,runtimeRoleWriteResult}from'../../commands/role/shared.js';function updateFields(_0x3ed0f5){const _0x1da621=a60_0x341f,_0x36dc11=_0x3ed0f5['flag']('role-code')!==undefined,_0x14e280=_0x3ed0f5['flag']('name')!==undefined,_0x5bb47a=_0x3ed0f5[_0x1da621(0x1c6)](_0x1da621(0x1b0))!==undefined;if(!_0x36dc11&&!_0x14e280&&!_0x5bb47a)throw CliErrors[_0x1da621(0x1b7)](_0x1da621(0x1b1));const _0x1d945b=readOptionalRuntimeRoleCode(_0x3ed0f5),_0x48fb0b=_0x3ed0f5[_0x1da621(0x1b3)](_0x1da621(0x1ad))[_0x1da621(0x1c9)](),_0x46e782=_0x3ed0f5['str'](_0x1da621(0x1b0))[_0x1da621(0x1c9)]();if(_0x14e280&&!_0x48fb0b)throw CliErrors['validation'](_0x1da621(0x1b2));if(_0x5bb47a&&!_0x46e782)throw CliErrors[_0x1da621(0x1b7)](_0x1da621(0x1b8),'The\x20current\x20runtime\x20role\x20API\x20does\x20not\x20support\x20clearing\x20an\x20existing\x20remark.');return{..._0x1d945b?{'roleCode':_0x1d945b}:{},..._0x14e280?{'roleName':_0x48fb0b}:{},..._0x5bb47a?{'remark':_0x46e782}:{}};}async function prepare(_0x19bb91){const _0x802780=a60_0x341f,_0x42593e=await getRuntimeRoleById(_0x19bb91['appCode'],_0x19bb91[_0x802780(0x1c2)]('id'));return assertCustomRuntimeRole(_0x42593e,_0x802780(0x1ae)),{'role':_0x42593e,'body':{'id':_0x42593e['id'],'appCode':_0x19bb91['appCode'],...updateFields(_0x19bb91)}};}export const roleUpdate={'service':'role','command':a60_0x5b541b(0x1ae),'description':a60_0x5b541b(0x1be),'risk':'high-risk-write','confirmationDescription':a60_0x5b541b(0x1bb),'flags':[ROLE_ID_FLAG,ROLE_CODE_FLAG,{'name':'name','type':a60_0x5b541b(0x1bd),'description':a60_0x5b541b(0x1c7)},{'name':a60_0x5b541b(0x1b0),'type':a60_0x5b541b(0x1bd),'description':a60_0x5b541b(0x1ba)}],async 'validate'(_0x572681){updateFields(_0x572681);},async 'dryRun'(_0x4de75c){const _0x7a6a03=a60_0x5b541b,{body:_0x503891}=await prepare(_0x4de75c);return dryRun(_0x7a6a03(0x1ca),'/client/permit/role/update')[_0x7a6a03(0x1b9)](_0x503891)[_0x7a6a03(0x1b5)](_0x7a6a03(0x1c5))[_0x7a6a03(0x1c8)]();},async 'execute'(_0x210800){const _0x179bba=a60_0x5b541b,{role:_0x472848,body:_0x1d105a}=await prepare(_0x210800),_0x192c03=await updateRuntimeAppRole(_0x1d105a);return{'ok':!![],'data':runtimeRoleWriteResult(_0x179bba(0x1ae),{'roleId':_0x472848['id']},projectRuntimeRole(_0x472848),projectRuntimeRole(_0x192c03),{'method':_0x179bba(0x1ca),'path':'/client/permit/role/update'})};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a61_0xd7ffbc=a61_0x3840;(function(_0x2886d8,_0x3b75f1){const _0x2c4d63=a61_0x3840,_0x33d8b4=_0x2886d8();while(!![]){try{const _0x2b0c3a=parseInt(_0x2c4d63(0xb4))/0x1*(-parseInt(_0x2c4d63(0xc4))/0x2)+parseInt(_0x2c4d63(0xae))/0x3*(parseInt(_0x2c4d63(0xaf))/0x4)+-parseInt(_0x2c4d63(0xad))/0x5*(parseInt(_0x2c4d63(0xbe))/0x6)+-parseInt(_0x2c4d63(0xa9))/0x7*(-parseInt(_0x2c4d63(0xb2))/0x8)+-parseInt(_0x2c4d63(0xb7))/0x9*(parseInt(_0x2c4d63(0xb5))/0xa)+parseInt(_0x2c4d63(0xc0))/0xb+-parseInt(_0x2c4d63(0xb9))/0xc*(-parseInt(_0x2c4d63(0xb1))/0xd);if(_0x2b0c3a===_0x3b75f1)break;else _0x33d8b4['push'](_0x33d8b4['shift']());}catch(_0x3ed9b6){_0x33d8b4['push'](_0x33d8b4['shift']());}}}(a61_0x3f40,0xb3834));function a61_0x3f40(){const _0xcba509=['14YzbNew','description','7LPvJGP','after','userId','role','5YTwNFx','2319gQtMzP','644sCkaKf','warnings','6266aTfkZy','5023304oczsZB','roleList','69196tijwDJ','10770cMKQjF','user-add','8946xFhivn','Add\x20a\x20userId\x20to\x20one\x20runtime\x20role','42348BMOBNM','build','before','Adds\x20the\x20given\x20runtime\x20user\x20to\x20the\x20target\x20role.\x20The\x20user\x20receives\x20the\x20permissions\x20of\x20that\x20role.','/client/permit/user-role/update-user-list','5402556IPJxVf','Preview:\x20add\x20runtime\x20role\x20member','8110036rWjzUK','shouldWrite','appCode','POST'];a61_0x3f40=function(){return _0xcba509;};return a61_0x3f40();}import{updateRuntimeRoleUsers}from'../../core/api-client.js';function a61_0x3840(_0x51b3e7,_0x15b6ef){_0x51b3e7=_0x51b3e7-0xa9;const _0x3f40b7=a61_0x3f40();let _0x3840f0=_0x3f40b7[_0x51b3e7];return _0x3840f0;}import{dryRun}from'../../framework/dryrun.js';import{EXPECT_USER_COUNT_FLAG,prepareRuntimeMemberMutation,ROLE_REF_FLAG,runtimeRoleWriteResult,USER_ID_FLAG}from'../../commands/role/shared.js';export const roleUserAdd={'service':a61_0xd7ffbc(0xac),'command':a61_0xd7ffbc(0xb6),'description':a61_0xd7ffbc(0xb8),'risk':'high-risk-write','confirmationDescription':a61_0xd7ffbc(0xbc),'flags':[ROLE_REF_FLAG,USER_ID_FLAG,EXPECT_USER_COUNT_FLAG],async 'dryRun'(_0x56f922){const _0x3fc40d=a61_0xd7ffbc,_0x24f157=await prepareRuntimeMemberMutation(_0x56f922,_0x3fc40d(0xb6));return dryRun(_0x3fc40d(0xc3),_0x3fc40d(0xbd))['body']({'appCode':_0x56f922[_0x3fc40d(0xc2)],'roleList':_0x24f157[_0x3fc40d(0xb3)]})[_0x3fc40d(0xc5)](_0x24f157[_0x3fc40d(0xc1)]?_0x3fc40d(0xbf):_0x24f157[_0x3fc40d(0xb0)][0x0])[_0x3fc40d(0xba)]();},async 'execute'(_0x320697){const _0xf38c84=a61_0xd7ffbc,_0x1e6e8b=await prepareRuntimeMemberMutation(_0x320697,_0xf38c84(0xb6));return _0x1e6e8b[_0xf38c84(0xc1)]&&await updateRuntimeRoleUsers(_0x320697[_0xf38c84(0xc2)],_0x1e6e8b[_0xf38c84(0xb3)]),{'ok':!![],'data':runtimeRoleWriteResult(_0xf38c84(0xb6),{'roleId':_0x1e6e8b['role']['id'],'userId':_0x1e6e8b[_0xf38c84(0xab)]},_0x1e6e8b[_0xf38c84(0xbb)],_0x1e6e8b[_0xf38c84(0xaa)],{'method':_0xf38c84(0xc3),'path':_0xf38c84(0xbd)},_0x1e6e8b[_0xf38c84(0xb0)])};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a62_0x273974=a62_0x3a1c;(function(_0x5dec2c,_0x4c495d){const _0x341ce6=a62_0x3a1c,_0xc5a1ff=_0x5dec2c();while(!![]){try{const _0x4a4588=parseInt(_0x341ce6(0x18f))/0x1+-parseInt(_0x341ce6(0x183))/0x2+parseInt(_0x341ce6(0x190))/0x3*(-parseInt(_0x341ce6(0x186))/0x4)+-parseInt(_0x341ce6(0x185))/0x5+parseInt(_0x341ce6(0x196))/0x6+parseInt(_0x341ce6(0x180))/0x7*(-parseInt(_0x341ce6(0x191))/0x8)+parseInt(_0x341ce6(0x182))/0x9*(parseInt(_0x341ce6(0x18d))/0xa);if(_0x4a4588===_0x4c495d)break;else _0xc5a1ff['push'](_0xc5a1ff['shift']());}catch(_0x4c39ae){_0xc5a1ff['push'](_0xc5a1ff['shift']());}}}(a62_0x40d4,0x6eb12));import{updateRuntimeRoleUsers}from'../../core/api-client.js';function a62_0x3a1c(_0x2d1f5f,_0x195911){_0x2d1f5f=_0x2d1f5f-0x180;const _0x40d410=a62_0x40d4();let _0x3a1c31=_0x40d410[_0x2d1f5f];return _0x3a1c31;}import{dryRun}from'../../framework/dryrun.js';import{EXPECT_USER_COUNT_FLAG,prepareRuntimeMemberMutation,ROLE_REF_FLAG,runtimeRoleWriteResult,USER_ID_FLAG}from'../../commands/role/shared.js';export const roleUserRemove={'service':a62_0x273974(0x188),'command':a62_0x273974(0x18a),'description':a62_0x273974(0x192),'risk':'high-risk-write','confirmationDescription':a62_0x273974(0x18b),'flags':[ROLE_REF_FLAG,USER_ID_FLAG,EXPECT_USER_COUNT_FLAG],async 'dryRun'(_0x19e849){const _0x2e8859=a62_0x273974,_0x48cce5=await prepareRuntimeMemberMutation(_0x19e849,_0x2e8859(0x18a));return dryRun('POST','/client/permit/user-role/update-user-list')[_0x2e8859(0x187)]({'appCode':_0x19e849[_0x2e8859(0x189)],'roleList':_0x48cce5[_0x2e8859(0x193)]})[_0x2e8859(0x18e)](_0x48cce5['shouldWrite']?'Preview:\x20remove\x20runtime\x20role\x20member':_0x48cce5['warnings'][0x0])[_0x2e8859(0x194)]();},async 'execute'(_0x10855d){const _0x66bc1a=a62_0x273974,_0x4f29ff=await prepareRuntimeMemberMutation(_0x10855d,'user-remove');return _0x4f29ff[_0x66bc1a(0x18c)]&&await updateRuntimeRoleUsers(_0x10855d[_0x66bc1a(0x189)],_0x4f29ff[_0x66bc1a(0x193)]),{'ok':!![],'data':runtimeRoleWriteResult('user-remove',{'roleId':_0x4f29ff[_0x66bc1a(0x188)]['id'],'userId':_0x4f29ff[_0x66bc1a(0x181)]},_0x4f29ff[_0x66bc1a(0x184)],_0x4f29ff['after'],{'method':_0x66bc1a(0x195),'path':'/client/permit/user-role/update-user-list'},_0x4f29ff['warnings'])};}};function a62_0x40d4(){const _0x322ace=['9BNgmnr','1019192UMSrsl','before','1911780SZbRNd','4xQjPkO','body','role','appCode','user-remove','Removes\x20the\x20given\x20runtime\x20user\x20from\x20the\x20target\x20role.\x20The\x20user\x20loses\x20permissions\x20granted\x20only\x20by\x20that\x20role.','shouldWrite','13069300HuHtdB','description','46307BNaieJ','1041231WvkCWO','12504hERFTU','Remove\x20a\x20userId\x20from\x20one\x20runtime\x20role','roleList','build','POST','4182678vDWGiA','1603srKPxE','userId'];a62_0x40d4=function(){return _0x322ace;};return a62_0x40d4();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
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
|
+
const a63_0x58cd8e=a63_0x4f3b;(function(_0x5b837e,_0xeb0b6c){const _0x57e441=a63_0x4f3b,_0xe59639=_0x5b837e();while(!![]){try{const _0x5bb7d3=parseInt(_0x57e441(0xed))/0x1+parseInt(_0x57e441(0xcf))/0x2+-parseInt(_0x57e441(0xda))/0x3*(parseInt(_0x57e441(0xc3))/0x4)+parseInt(_0x57e441(0xe9))/0x5+-parseInt(_0x57e441(0xe4))/0x6*(-parseInt(_0x57e441(0xe0))/0x7)+parseInt(_0x57e441(0xf9))/0x8+-parseInt(_0x57e441(0xe2))/0x9;if(_0x5bb7d3===_0xeb0b6c)break;else _0xe59639['push'](_0xe59639['shift']());}catch(_0x4185e7){_0xe59639['push'](_0xe59639['shift']());}}}(a63_0x4f28,0x3f672));function a63_0x4f28(){const _0x56e21c=['Permanently\x20deletes\x20the\x20schedule\x20and\x20stops\x20future\x20auto-triggers.\x20Historical\x20Tasks\x20already\x20created\x20are\x20not\x20affected.','Five-field\x20UTC\x20cron\x20expression\x20for\x20CRON\x20schedules','body','132lVQnYB','schedule','trim','/api/harness/apps/','a\x20UUID\x20returned\x20by\x20schedule\x20create/list','Ignores\x20the\x20original\x20trigger\x20time,\x20runs\x20the\x20schedule\x20once\x20now,\x20and\x20creates\x20a\x20new\x20Agent\x20Task.','--limit\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.','delete','limit','CRON','--cursor\x20must\x20be\x20the\x20unchanged\x20nextCursor\x20from\x20schedule\x20list.','str','31184nUDYAx','cursor','/schedules','string','isSafeInteger','deepseek-v4-flash-0731','schedule-id','validation','ONCE\x20schedules\x20require\x20--scheduled-at\x20and\x20do\x20not\x20accept\x20--cron.','ONCE','run','5298lwYERL','Preview:\x20create\x20an\x20Agent\x20schedule','title','description','Page\x20size\x20from\x201\x20to\x20100','scheduled-at','573293GajzFN','high-risk-write','7830720jfRUhT','Schedule\x20input\x20is\x20valid','6RliOlE','--prompt\x20must\x20not\x20be\x20blank.','--title\x20must\x20not\x20be\x20blank.','POST','kind','995720XUfevH','prompt','List\x20current\x20user\x27s\x20schedules\x20for\x20the\x20current\x20app','CRON\x20schedules\x20require\x20--cron\x20and\x20do\x20not\x20accept\x20--scheduled-at.','415210IhlSjk','Show\x20one\x20schedule\x20by\x20schedule\x20ID','Deleted\x20schedule\x20','read','Task\x20model\x20used\x20when\x20the\x20schedule\x20runs','Created\x20','list','Canonical\x20UTC\x20ISO\x20datetime\x20for\x20ONCE\x20schedules','appCode','num','model','build','3809688yhPgQE','\x20immediately','\x20schedule\x20','length','number','Opaque\x20nextCursor\x20returned\x20by\x20the\x20previous\x20list\x20call','/run','cron','kimi/k3','Delete\x20the\x20schedule\x20and\x20stop\x20future\x20triggers'];a63_0x4f28=function(){return _0x56e21c;};return a63_0x4f28();}import{createRuntimeSchedule,deleteRuntimeSchedule,getRuntimeSchedule,listRuntimeSchedules,runRuntimeSchedule,validateRuntimeSchedule}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const SCHEDULE_ID_PATTERN=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,KIND_FLAG={'name':a63_0x58cd8e(0xe8),'type':a63_0x58cd8e(0xd2),'required':!![],'enum':[a63_0x58cd8e(0xcc),a63_0x58cd8e(0xd8)],'description':'Schedule\x20kind:\x20CRON\x20or\x20ONCE'},CRON_FLAG={'name':a63_0x58cd8e(0xbd),'type':a63_0x58cd8e(0xd2),'description':a63_0x58cd8e(0xc1)},SCHEDULED_AT_FLAG={'name':a63_0x58cd8e(0xdf),'type':a63_0x58cd8e(0xd2),'description':a63_0x58cd8e(0xf4)},TITLE_FLAG={'name':a63_0x58cd8e(0xdc),'type':a63_0x58cd8e(0xd2),'required':!![],'description':'Schedule\x20title'},PROMPT_FLAG={'name':a63_0x58cd8e(0xea),'type':'string','required':!![],'description':'Prompt\x20sent\x20to\x20the\x20Agent\x20when\x20the\x20schedule\x20runs'},MODEL_FLAG={'name':a63_0x58cd8e(0xf7),'type':'string','enum':[a63_0x58cd8e(0xbe),a63_0x58cd8e(0xd4),'deepseek-v4-pro-0813'],'default':a63_0x58cd8e(0xd4),'description':a63_0x58cd8e(0xf1)},SCHEDULE_ID_FLAG={'name':a63_0x58cd8e(0xd5),'type':a63_0x58cd8e(0xd2),'required':!![],'description':'Schedule\x20UUID','pattern':{'regex':SCHEDULE_ID_PATTERN,'description':a63_0x58cd8e(0xc7)}},LIMIT_FLAG={'name':'limit','type':a63_0x58cd8e(0xfd),'default':0x14,'description':a63_0x58cd8e(0xde)},CURSOR_FLAG={'name':a63_0x58cd8e(0xd0),'type':'string','description':a63_0x58cd8e(0xfe)},INPUT_FLAGS=[KIND_FLAG,CRON_FLAG,SCHEDULED_AT_FLAG,TITLE_FLAG,PROMPT_FLAG,MODEL_FLAG];function a63_0x4f3b(_0x5d4d5a,_0x273a99){_0x5d4d5a=_0x5d4d5a-0xbd;const _0x4f2813=a63_0x4f28();let _0x4f3b7a=_0x4f2813[_0x5d4d5a];return _0x4f3b7a;}function readScheduleInput(_0x56387e){const _0x4cfb3d=a63_0x58cd8e,_0x584519=_0x56387e[_0x4cfb3d(0xce)](_0x4cfb3d(0xe8)),_0x5036fa=_0x56387e[_0x4cfb3d(0xce)](_0x4cfb3d(0xdc))['trim'](),_0x81e33a=_0x56387e['str'](_0x4cfb3d(0xea))['trim'](),_0x38e347=_0x56387e['str'](_0x4cfb3d(0xf7)),_0x16457c=_0x56387e[_0x4cfb3d(0xce)](_0x4cfb3d(0xbd)),_0x28168b=_0x56387e['str'](_0x4cfb3d(0xdf));if(!_0x5036fa)throw CliErrors[_0x4cfb3d(0xd6)](_0x4cfb3d(0xe6));if(!_0x81e33a)throw CliErrors[_0x4cfb3d(0xd6)](_0x4cfb3d(0xe5));if(_0x584519==='CRON'){if(!_0x16457c||_0x28168b)throw CliErrors[_0x4cfb3d(0xd6)](_0x4cfb3d(0xec));return{'kind':_0x584519,'timezone':'UTC','cron':_0x16457c,'title':_0x5036fa,'prompt':_0x81e33a,'model':_0x38e347};}if(_0x584519===_0x4cfb3d(0xd8)){if(!_0x28168b||_0x16457c)throw CliErrors[_0x4cfb3d(0xd6)](_0x4cfb3d(0xd7));return{'kind':_0x584519,'timezone':'UTC','scheduledAt':_0x28168b,'title':_0x5036fa,'prompt':_0x81e33a,'model':_0x38e347};}throw CliErrors[_0x4cfb3d(0xd6)]('--kind\x20must\x20be\x20CRON\x20or\x20ONCE.');}function scheduleCollectionPath(_0x56e109){const _0x226c82=a63_0x58cd8e;return _0x226c82(0xc6)+encodeURIComponent(_0x56e109)+_0x226c82(0xd1);}function scheduleItemPath(_0x203673,_0x2f6625){return scheduleCollectionPath(_0x203673)+'/'+encodeURIComponent(_0x2f6625);}const scheduleValidate={'service':a63_0x58cd8e(0xc4),'command':'validate','description':'Validate\x20a\x20UTC\x20schedule\x20without\x20creating\x20it','risk':a63_0x58cd8e(0xf0),'flags':INPUT_FLAGS,async 'validate'(_0x3b80af){readScheduleInput(_0x3b80af);},async 'execute'(_0x4a41e0){const _0x3ef01e=a63_0x58cd8e,_0x50770a=readScheduleInput(_0x4a41e0),_0x1e8d15=await validateRuntimeSchedule(_0x4a41e0[_0x3ef01e(0xf5)],_0x50770a);return{'ok':!![],'data':_0x1e8d15,'message':_0x3ef01e(0xe3)};}},scheduleCreate={'service':a63_0x58cd8e(0xc4),'command':'create','description':'Create\x20a\x20recurring\x20or\x20one-shot\x20Agent\x20schedule','risk':'high-risk-write','confirmationDescription':'Creates\x20a\x20schedule\x20in\x20the\x20current\x20app\x20that\x20can\x20auto-trigger\x20an\x20Agent.\x20At\x20the\x20scheduled\x20time\x20a\x20Task\x20is\x20created\x20and\x20run.','flags':INPUT_FLAGS,async 'validate'(_0x223c62){readScheduleInput(_0x223c62);},async 'execute'(_0x415e05){const _0xe2f60f=a63_0x58cd8e,_0x51f515=readScheduleInput(_0x415e05),_0x572853=await validateRuntimeSchedule(_0x415e05['appCode'],_0x51f515),_0x21cea3=await createRuntimeSchedule(_0x415e05[_0xe2f60f(0xf5)],_0x572853);return{'ok':!![],'data':_0x21cea3,'message':_0xe2f60f(0xf2)+_0x21cea3['kind']+_0xe2f60f(0xfb)+_0x21cea3['scheduleId']};},async 'dryRun'(_0x163894){const _0x52eb9e=a63_0x58cd8e,_0xb8770=readScheduleInput(_0x163894);return dryRun(_0x52eb9e(0xe7),scheduleCollectionPath(_0x163894[_0x52eb9e(0xf5)]))[_0x52eb9e(0xc2)](_0xb8770)[_0x52eb9e(0xdd)](_0x52eb9e(0xdb))[_0x52eb9e(0xf8)]();}},scheduleList={'service':a63_0x58cd8e(0xc4),'command':a63_0x58cd8e(0xf3),'description':a63_0x58cd8e(0xeb),'risk':a63_0x58cd8e(0xf0),'flags':[KIND_FLAG,LIMIT_FLAG,CURSOR_FLAG],async 'validate'(_0x17bf83){const _0x1eaaf=a63_0x58cd8e,_0xae539=_0x17bf83[_0x1eaaf(0xf6)](_0x1eaaf(0xcb));if(!Number[_0x1eaaf(0xd3)](_0xae539)||_0xae539<0x1||_0xae539>0x64)throw CliErrors[_0x1eaaf(0xd6)](_0x1eaaf(0xc9));const _0xee21a5=_0x17bf83[_0x1eaaf(0xce)](_0x1eaaf(0xd0));if(_0xee21a5&&(_0xee21a5[_0x1eaaf(0xfc)]>0x400||_0xee21a5[_0x1eaaf(0xc5)]()!==_0xee21a5))throw CliErrors[_0x1eaaf(0xd6)](_0x1eaaf(0xcd));},async 'execute'(_0x164f9d){const _0x329594=a63_0x58cd8e,_0x4d2d6a=_0x164f9d[_0x329594(0xce)](_0x329594(0xd0)),_0x363838=await listRuntimeSchedules(_0x164f9d[_0x329594(0xf5)],{'kind':_0x164f9d['str'](_0x329594(0xe8)),'limit':_0x164f9d[_0x329594(0xf6)](_0x329594(0xcb)),..._0x4d2d6a?{'cursor':_0x4d2d6a}:{}});return{'ok':!![],'data':_0x363838};}},scheduleDetail={'service':a63_0x58cd8e(0xc4),'command':'detail','description':a63_0x58cd8e(0xee),'risk':a63_0x58cd8e(0xf0),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x58ac35){const _0x121e81=a63_0x58cd8e,_0x20cdb1=await getRuntimeSchedule(_0x58ac35[_0x121e81(0xf5)],_0x58ac35[_0x121e81(0xce)]('schedule-id'));return{'ok':!![],'data':_0x20cdb1};}},scheduleRun={'service':a63_0x58cd8e(0xc4),'command':a63_0x58cd8e(0xd9),'description':'Run\x20the\x20schedule\x20once\x20immediately\x20and\x20create\x20a\x20Task','risk':a63_0x58cd8e(0xe1),'confirmationDescription':a63_0x58cd8e(0xc8),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x2e62e7){const _0x3f5977=a63_0x58cd8e,_0x3b0b35=_0x2e62e7['str'](_0x3f5977(0xd5)),_0x5b3355=await runRuntimeSchedule(_0x2e62e7[_0x3f5977(0xf5)],_0x3b0b35);return{'ok':!![],'data':_0x5b3355,'message':'Queued\x20Task\x20'+_0x5b3355['taskId']+'\x20from\x20schedule\x20'+_0x3b0b35};},async 'dryRun'(_0x4af3c8){const _0x38246c=a63_0x58cd8e,_0x4ba887=_0x4af3c8['str'](_0x38246c(0xd5));return dryRun('POST',scheduleItemPath(_0x4af3c8[_0x38246c(0xf5)],_0x4ba887)+_0x38246c(0xff))[_0x38246c(0xdd)]('Preview:\x20run\x20schedule\x20'+_0x4ba887+_0x38246c(0xfa))[_0x38246c(0xf8)]();}},scheduleDelete={'service':a63_0x58cd8e(0xc4),'command':a63_0x58cd8e(0xca),'description':a63_0x58cd8e(0xbf),'risk':a63_0x58cd8e(0xe1),'confirmationDescription':a63_0x58cd8e(0xc0),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x378844){const _0x3dce57=a63_0x58cd8e,_0x5ea60c=_0x378844[_0x3dce57(0xce)]('schedule-id'),_0x8e93e5=await deleteRuntimeSchedule(_0x378844[_0x3dce57(0xf5)],_0x5ea60c);return{'ok':!![],'data':_0x8e93e5,'message':_0x3dce57(0xef)+_0x5ea60c};},async 'dryRun'(_0xdebbab){const _0x10cac0=a63_0x58cd8e,_0x1ddd56=_0xdebbab['str'](_0x10cac0(0xd5));return dryRun('DELETE',scheduleItemPath(_0xdebbab[_0x10cac0(0xf5)],_0x1ddd56))['description']('Preview:\x20delete\x20schedule\x20'+_0x1ddd56)['build']();}};export const scheduleDefinitions=[scheduleValidate,scheduleCreate,scheduleList,scheduleDetail,scheduleRun,scheduleDelete];
|
package/lib/commands/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a64_0x3b00(){const _0x430d9c=['23060zxkalx','export','4878979pIzwKd','857011ImaIjv','5537979HesPPj','87uZdUsL','41922LjeYXg','Export\x20machine-readable\x20command\x20schema\x20(JSON)','read','460WSFMbs','16CohIkn','schema','12437380KqiCjo','784052pZtmfi'];a64_0x3b00=function(){return _0x430d9c;};return a64_0x3b00();}const a64_0x36d876=a64_0x157d;function a64_0x157d(_0x30e77e,_0x111c2e){_0x30e77e=_0x30e77e-0xe6;const _0x3b0049=a64_0x3b00();let _0x157daa=_0x3b0049[_0x30e77e];return _0x157daa;}(function(_0x25c43a,_0x2c8e7c){const _0x29fcf0=a64_0x157d,_0x2da61e=_0x25c43a();while(!![]){try{const _0x57c0fa=-parseInt(_0x29fcf0(0xe6))/0x1+-parseInt(_0x29fcf0(0xf1))/0x2*(-parseInt(_0x29fcf0(0xe8))/0x3)+parseInt(_0x29fcf0(0xf0))/0x4+-parseInt(_0x29fcf0(0xec))/0x5*(parseInt(_0x29fcf0(0xe9))/0x6)+-parseInt(_0x29fcf0(0xf3))/0x7+-parseInt(_0x29fcf0(0xed))/0x8*(-parseInt(_0x29fcf0(0xe7))/0x9)+parseInt(_0x29fcf0(0xef))/0xa;if(_0x57c0fa===_0x2c8e7c)break;else _0x2da61e['push'](_0x2da61e['shift']());}catch(_0x9dc57){_0x2da61e['push'](_0x2da61e['shift']());}}}(a64_0x3b00,0xc5423));import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x1f3a8c){const _0x11d1d1=await buildSchemaPayload();return{'ok':!![],'data':_0x11d1d1};}export const schemaDefinition={'service':a64_0x36d876(0xee),'command':a64_0x36d876(0xf2),'description':a64_0x36d876(0xea),'risk':a64_0x36d876(0xeb),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_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(_0x1f8e35,_0x9fd0f3){const _0x4e1678=a65_0x2466,_0x3cf5f5=_0x1f8e35();while(!![]){try{const _0x4a0297=parseInt(_0x4e1678(0x216))/0x1+-parseInt(_0x4e1678(0x21f))/0x2*(parseInt(_0x4e1678(0x20e))/0x3)+parseInt(_0x4e1678(0x232))/0x4+parseInt(_0x4e1678(0x1ec))/0x5*(-parseInt(_0x4e1678(0x1fc))/0x6)+-parseInt(_0x4e1678(0x1ff))/0x7*(parseInt(_0x4e1678(0x221))/0x8)+-parseInt(_0x4e1678(0x218))/0x9+parseInt(_0x4e1678(0x21b))/0xa;if(_0x4a0297===_0x9fd0f3)break;else _0x3cf5f5['push'](_0x3cf5f5['shift']());}catch(_0x10c474){_0x3cf5f5['push'](_0x3cf5f5['shift']());}}}(a65_0xafd7,0x26fa8));import{compileServiceTreeCommand,matchServiceTreeCommand}from'@lovrabet/cli-framework';import{getLoginUserInfo,listDatasets}from'../../core/api-client.js';import{executeData,executeSdkBff,executeSdkSql}from'../../core/sdk-client.js';import{CliErrors}from'../../errors.js';import{listLocalServices,listLocalServiceTrees}from'../../commands/service/registry.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{isDev,normalizeEnv}from'../../constant/env.js';export function resolveDynamicServiceCommand(_0x146af5,_0x2cc7da){const _0x4eaca8=a65_0x2466,_0x3b633b=listLocalServiceTrees();let _0x3eaaca;for(const _0x3522bd of _0x3b633b){const _0x267618=matchServiceTreeCommand(_0x3522bd,_0x146af5);if(!_0x267618)continue;(!_0x3eaaca||_0x267618[_0x4eaca8(0x217)][_0x4eaca8(0x1ee)][_0x4eaca8(0x20b)]>_0x3eaaca[_0x4eaca8(0x217)][_0x4eaca8(0x1ee)][_0x4eaca8(0x20b)])&&(_0x3eaaca={'tree':_0x3522bd,'command':_0x267618[_0x4eaca8(0x217)],'remainingArgs':_0x267618[_0x4eaca8(0x1d9)]});}if(!_0x3eaaca)return undefined;const _0x43a87a={..._0x2cc7da};return applyAppBinding(_0x3eaaca[_0x4eaca8(0x1e0)],_0x3eaaca['command'],_0x43a87a),{'definition':buildDynamicCommandDefinition(_0x3eaaca[_0x4eaca8(0x1e0)],_0x3eaaca[_0x4eaca8(0x217)]),'args':_0x3eaaca['remainingArgs'],'flags':_0x43a87a,'tree':_0x3eaaca['tree'],'command':_0x3eaaca[_0x4eaca8(0x217)]};}export function generateDynamicServiceHelp(_0x2be554){const _0x4523ea=a65_0x2466,_0x539dc3=listLocalServiceTrees()['find'](_0xaa9ba6=>_0xaa9ba6[_0x4523ea(0x1d8)][_0x4523ea(0x224)]===_0x2be554);if(!_0x539dc3)return undefined;const _0x4e2360=[CLI_BIN_NAME+'\x20'+_0x2be554+_0x4523ea(0x22a),'',_0x539dc3[_0x4523ea(0x1d8)][_0x4523ea(0x223)]||_0x2be554,_0x539dc3[_0x4523ea(0x1d8)]['description']?'\x20\x20'+_0x539dc3['service']['description']:'','','Commands:',..._0x539dc3[_0x4523ea(0x236)][_0x4523ea(0x1f4)](_0x145f12=>{const _0xbf761a=_0x4523ea,_0x4709a0=_0x145f12[_0xbf761a(0x1ee)][_0xbf761a(0x1de)](0x1)[_0xbf761a(0x1df)]('\x20'),_0xb5a687=_0x145f12[_0xbf761a(0x1e7)]==='read'?'':'\x20['+_0x145f12[_0xbf761a(0x1e7)]+']';return'\x20\x20'+_0x4709a0[_0xbf761a(0x212)](0x18)+'\x20'+(_0x145f12[_0xbf761a(0x21c)]||'')+_0xb5a687;}),'',_0x4523ea(0x22c)+CLI_BIN_NAME+'\x20service\x20detail\x20--service\x20'+_0x2be554+'`\x20to\x20inspect\x20the\x20manifest.'][_0x4523ea(0x1fe)](Boolean);return _0x4e2360['join']('\x0a');}export function listDynamicServiceEntries(){const _0x289600=a65_0x2466;return listLocalServices()[_0x289600(0x1f4)](_0x1aa197=>{const _0x1a3b0c=_0x289600,_0x35e409=_0x1aa197[_0x1a3b0c(0x207)];return{'service':_0x35e409['service'][_0x1a3b0c(0x224)],'label':_0x35e409[_0x1a3b0c(0x1d8)][_0x1a3b0c(0x223)]||_0x35e409[_0x1a3b0c(0x1d8)][_0x1a3b0c(0x224)],'commands':_0x35e409['commands'][_0x1a3b0c(0x1f4)](_0x3a451a=>({'command':dynamicCommandName(_0x3a451a),'description':_0x3a451a[_0x1a3b0c(0x21c)]||'Run\x20service\x20command\x20'+_0x3a451a['cliPath'],'tag':riskTag(_0x3a451a[_0x1a3b0c(0x1e7)])}))};});}export function getDynamicServiceEntry(_0x30111b){const _0x8853fd=a65_0x2466;return listDynamicServiceEntries()[_0x8853fd(0x235)](_0x2ba1c3=>_0x2ba1c3['service']===_0x30111b);}export function listDynamicServiceDefinitions(_0xaadaec){const _0x36faa1=a65_0x2466;return listLocalServiceTrees()[_0x36faa1(0x1fe)](_0x112335=>!_0xaadaec||_0x112335[_0x36faa1(0x1d8)]['code']===_0xaadaec)[_0x36faa1(0x213)](_0x32b8ac=>_0x32b8ac['commands'][_0x36faa1(0x1f4)](_0x28ba1d=>buildDynamicCommandDefinition(_0x32b8ac,_0x28ba1d)));}export function getDynamicServiceDefinitions(_0x38ebba){const _0x4573fd=listDynamicServiceDefinitions(_0x38ebba);return _0x4573fd['length']>0x0?_0x4573fd:undefined;}export function findDynamicServiceDefinition(_0x50e07d,_0x17b506){const _0x477517=a65_0x2466;return listDynamicServiceDefinitions(_0x50e07d)[_0x477517(0x235)](_0x5bdea2=>_0x5bdea2[_0x477517(0x217)]===_0x17b506);}export function buildDynamicCommandDefinition(_0x123645,_0x4a6b59){const _0x229ea4=a65_0x2466;return{'service':_0x123645[_0x229ea4(0x1d8)][_0x229ea4(0x224)],'command':dynamicCommandName(_0x4a6b59),'description':_0x4a6b59[_0x229ea4(0x21c)]||'Run\x20service\x20command\x20'+_0x4a6b59[_0x229ea4(0x1f5)],'risk':_0x4a6b59[_0x229ea4(0x1e7)],..._0x4a6b59['risk']===_0x229ea4(0x233)?{}:{'confirmationDescription':buildDynamicConfirmationDescription(_0x4a6b59)},'requiresAuth':!![],'requiresAppCode':!![],'args':_0x4a6b59[_0x229ea4(0x22d)][_0x229ea4(0x1f4)](_0x1c65e6=>({'name':_0x1c65e6[_0x229ea4(0x223)],'description':_0x1c65e6['description']||_0x1c65e6['name'],'required':_0x1c65e6['required']})),'flags':_0x4a6b59['flags']['map'](flagToCommandFlag),'helpExtra':()=>renderDynamicCommandHelp(_0x4a6b59),async 'dryRun'(_0x427cd3){const _0x1a3d55=_0x229ea4,_0x32ab9a=await compilePlan(_0x123645,_0x4a6b59,_0x427cd3);return{'method':_0x1a3d55(0x234),'url':_0x4a6b59[_0x1a3d55(0x1f5)],'body':{'target':targetPreview(_0x32ab9a),'params':_0x32ab9a[_0x1a3d55(0x1ef)]},'description':'Preview\x20dynamic\x20service\x20command:\x20'+_0x4a6b59['cliPath']};},async 'execute'(_0x3c1022){const _0x3235f9=_0x229ea4,_0x45c2ff=await compilePlan(_0x123645,_0x4a6b59,_0x3c1022),_0x45ad53=Date['now'](),_0x117dce=await executePlan(_0x45c2ff,_0x4a6b59,_0x3c1022),_0x45b4df=Date[_0x3235f9(0x208)]()-_0x45ad53;return{'ok':!![],'data':{'service':_0x123645[_0x3235f9(0x1d8)],'command':_0x4a6b59[_0x3235f9(0x1f5)],'target':targetPreview(_0x45c2ff),'result':_0x117dce,'elapsed':_0x45b4df},'message':_0x3235f9(0x225)+_0x4a6b59[_0x3235f9(0x1f5)]+'\x20completed\x20in\x20'+_0x45b4df+'ms'};}};}function buildDynamicConfirmationDescription(_0x526a7e){const _0x14444d=a65_0x2466,_0x4d25ba=_0x526a7e[_0x14444d(0x21c)]||_0x526a7e[_0x14444d(0x1f5)],_0x2bfbb5=_0x526a7e[_0x14444d(0x1e7)]==='high-risk-write'?_0x14444d(0x1e1):_0x14444d(0x210);return _0x14444d(0x231)+_0x4d25ba+'\x22.\x20'+_0x2bfbb5;}function dynamicCommandName(_0x20ec69){const _0x29a26c=a65_0x2466;return _0x20ec69['fullPath'][_0x29a26c(0x1de)](0x1)[_0x29a26c(0x1df)]('\x20');}function riskTag(_0x1bdf05){const _0x333330=a65_0x2466;return _0x1bdf05===_0x333330(0x233)?'':_0x333330(0x204)+_0x1bdf05+']';}function flagToCommandFlag(_0x18b4bd){const _0x59f0a3=a65_0x2466;return{'name':_0x18b4bd[_0x59f0a3(0x1e3)],'type':_0x18b4bd[_0x59f0a3(0x215)]===_0x59f0a3(0x219)?_0x59f0a3(0x227):_0x18b4bd[_0x59f0a3(0x215)],'description':_0x18b4bd['description']||_0x18b4bd['name'],'required':_0x18b4bd['required'],'default':isPrimitiveFlagDefault(_0x18b4bd['default'])?_0x18b4bd[_0x59f0a3(0x1e2)]:undefined,'enum':_0x18b4bd['enum']};}async function compilePlan(_0x130f12,_0x1903f6,_0x5b0a42){const _0x30df6d=a65_0x2466,_0x2a58b4=_0x1903f6[_0x30df6d(0x1ed)]['appRef']?_0x130f12[_0x30df6d(0x21d)][_0x1903f6[_0x30df6d(0x1ed)][_0x30df6d(0x238)]]:undefined;if(_0x2a58b4?.['env']){const _0x17e9b6=isDev(_0x2a58b4[_0x30df6d(0x1f9)])?'development':normalizeEnv(_0x2a58b4['env']);if(_0x17e9b6!==_0x5b0a42[_0x30df6d(0x1fb)])throw CliErrors[_0x30df6d(0x23c)]('Service\x20command\x20'+_0x1903f6['cliPath']+'\x20requires\x20environment\x20\x22'+_0x17e9b6+_0x30df6d(0x1eb)+_0x5b0a42['envName']+'\x22.',_0x30df6d(0x20d));}return compileServiceTreeCommand(_0x1903f6,{'flags':_0x5b0a42[_0x30df6d(0x220)],'args':_0x5b0a42[_0x30df6d(0x22d)],'context':await buildServiceContext(_0x1903f6,_0x5b0a42)});}function a65_0x2466(_0x3e7317,_0x5a4443){_0x3e7317=_0x3e7317-0x1d8;const _0xafd7ea=a65_0xafd7();let _0x246643=_0xafd7ea[_0x3e7317];return _0x246643;}async function buildServiceContext(_0x3a363b,_0x424556){const _0x142b0b=a65_0x2466,_0x3efc10={'appCode':_0x424556[_0x142b0b(0x1f8)],'env':_0x424556[_0x142b0b(0x1fb)],'envName':_0x424556[_0x142b0b(0x1fb)]};if(!usesRuntimeContext(_0x3a363b))return _0x3efc10;const _0x2a1cf3=await getLoginUserInfo(),_0x4caa3d=pickFirst(_0x2a1cf3['userId'],_0x2a1cf3['id']);return{..._0x3efc10,'user':_0x2a1cf3,'userId':_0x4caa3d,'id':_0x2a1cf3['id'],'username':pickFirst(_0x2a1cf3['username'],_0x2a1cf3['userName'],_0x2a1cf3['loginName']),'userName':_0x2a1cf3['userName'],'nickname':pickFirst(_0x2a1cf3[_0x142b0b(0x222)],_0x2a1cf3[_0x142b0b(0x1f0)]),'nickName':_0x2a1cf3[_0x142b0b(0x1f0)],'tenantCode':_0x2a1cf3[_0x142b0b(0x1f6)],'employeeId':_0x2a1cf3[_0x142b0b(0x1e4)]};}function usesRuntimeContext(_0x3e06d5){const _0x4db953=a65_0x2466;return _0x3e06d5[_0x4db953(0x206)][_0x4db953(0x200)](_0x374d32=>typeof _0x374d32[_0x4db953(0x1e8)]===_0x4db953(0x227)&&(_0x374d32[_0x4db953(0x1e8)]['startsWith']('context.')||_0x374d32['source'][_0x4db953(0x1f3)]('ctx.')));}function pickFirst(..._0x42f786){const _0x430207=a65_0x2466;return _0x42f786[_0x430207(0x235)](_0x28f3cf=>_0x28f3cf!==undefined&&_0x28f3cf!==null);}async function executePlan(_0x11bf02,_0x5e52f2,_0x3af158){const _0x32a4eb=a65_0x2466;if(_0x11bf02[_0x32a4eb(0x20c)]===_0x32a4eb(0x211)){const _0x1d2bbe=await resolveDatasetCode(_0x11bf02,_0x5e52f2,_0x3af158);return executeData(_0x1d2bbe,_0x11bf02['command'],_0x11bf02[_0x32a4eb(0x1ef)]);}if(_0x11bf02['kind']===_0x32a4eb(0x214)){if(!_0x11bf02[_0x32a4eb(0x1f2)])throw CliErrors[_0x32a4eb(0x23c)](_0x32a4eb(0x225)+_0x5e52f2['cliPath']+_0x32a4eb(0x1f1));return executeSdkSql(_0x11bf02[_0x32a4eb(0x1f2)],normalizeScalarParams(_0x11bf02['params']));}if(_0x11bf02[_0x32a4eb(0x20c)]===_0x32a4eb(0x20f)){const _0x395f3f=_0x11bf02[_0x32a4eb(0x226)]||_0x11bf02['bffCode']||(_0x11bf02['bffId']==null?'':String(_0x11bf02[_0x32a4eb(0x22f)]));if(!_0x395f3f)throw CliErrors[_0x32a4eb(0x23c)]('Service\x20command\x20'+_0x5e52f2[_0x32a4eb(0x1f5)]+'\x20requires\x20target.functionName.');return executeSdkBff(_0x395f3f,_0x11bf02[_0x32a4eb(0x1ef)]);}throw CliErrors[_0x32a4eb(0x23c)](_0x32a4eb(0x1db)+_0x11bf02['kind']);}async function resolveDatasetCode(_0x48065f,_0x371d54,_0x4fcab0){const _0x24401a=a65_0x2466;if(_0x48065f[_0x24401a(0x21e)])return _0x48065f[_0x24401a(0x21e)];if(!_0x48065f[_0x24401a(0x230)])throw CliErrors['validation'](_0x24401a(0x225)+_0x371d54['cliPath']+_0x24401a(0x21a));const _0x4f9fe6=await listDatasets(_0x4fcab0['appCode']),_0x1ab9bb=_0x4f9fe6[_0x24401a(0x235)](_0x1da442=>_0x1da442['dbtableConfig']?.['tableName']===_0x48065f[_0x24401a(0x230)]);if(!_0x1ab9bb?.[_0x24401a(0x224)])throw CliErrors['validation'](_0x24401a(0x1fa)+_0x48065f[_0x24401a(0x230)]+_0x24401a(0x239)+_0x4fcab0[_0x24401a(0x1f8)]+'.',_0x24401a(0x1fd));return _0x1ab9bb[_0x24401a(0x224)];}function applyAppBinding(_0x6b2695,_0x425382,_0x4f0fc3){const _0x4b14f4=a65_0x2466,_0xca4df9=_0x425382['target']['appRef'];if(!_0xca4df9)return;const _0x407c4f=_0x6b2695[_0x4b14f4(0x21d)][_0xca4df9];if(!_0x407c4f)throw CliErrors[_0x4b14f4(0x23c)](_0x4b14f4(0x203)+_0xca4df9+'\x22\x20in\x20service\x20command\x20'+_0x425382['cliPath']+'.',_0x4b14f4(0x1e5));const _0x84313=_0x407c4f[_0x4b14f4(0x20a)]||_0x407c4f[_0x4b14f4(0x1f8)];_0x84313&&!hasText(_0x4f0fc3[_0x4b14f4(0x20a)])&&!hasText(_0x4f0fc3[_0x4b14f4(0x22e)])&&(_0x4f0fc3['appcode']=_0x84313),_0x407c4f['app']&&!hasText(_0x4f0fc3[_0x4b14f4(0x22e)])&&!hasText(_0x4f0fc3[_0x4b14f4(0x20a)])&&(_0x4f0fc3['app']=_0x407c4f[_0x4b14f4(0x22e)]);}function renderDynamicCommandHelp(_0x3598fd){const _0x30e201=a65_0x2466,_0x3c4447=[_0x30e201(0x209),_0x30e201(0x205)+_0x3598fd[_0x30e201(0x1ed)][_0x30e201(0x20c)],'\x20\x20\x20\x20command:\x20'+_0x3598fd[_0x30e201(0x1ed)][_0x30e201(0x217)]];if(_0x3598fd[_0x30e201(0x1ed)][_0x30e201(0x21e)])_0x3c4447['push'](_0x30e201(0x1dd)+_0x3598fd['target']['datasetCode']);if(_0x3598fd[_0x30e201(0x1ed)][_0x30e201(0x230)])_0x3c4447[_0x30e201(0x237)](_0x30e201(0x201)+_0x3598fd[_0x30e201(0x1ed)]['datatable']);if(_0x3598fd[_0x30e201(0x1ed)][_0x30e201(0x1f2)])_0x3c4447[_0x30e201(0x237)](_0x30e201(0x22b)+_0x3598fd[_0x30e201(0x1ed)][_0x30e201(0x1f2)]);if(_0x3598fd[_0x30e201(0x1ed)][_0x30e201(0x226)])_0x3c4447[_0x30e201(0x237)](_0x30e201(0x23b)+_0x3598fd['target'][_0x30e201(0x226)]);if(_0x3598fd['mapTo'][_0x30e201(0x20b)]>0x0){_0x3c4447[_0x30e201(0x237)]('',_0x30e201(0x228));for(const _0x3ae0d8 of _0x3598fd[_0x30e201(0x206)]){_0x3c4447[_0x30e201(0x237)](_0x30e201(0x23a)+(_0x3ae0d8[_0x30e201(0x1e8)]||_0x30e201(0x202))+_0x30e201(0x1f7)+_0x3ae0d8[_0x30e201(0x1ed)]+(_0x3ae0d8[_0x30e201(0x229)]?'.'+_0x3ae0d8[_0x30e201(0x229)]:''));}}return _0x3c4447[_0x30e201(0x1df)]('\x0a');}function targetPreview(_0x37e543){const _0x211c6e=a65_0x2466;return{'kind':_0x37e543[_0x211c6e(0x20c)],'command':_0x37e543[_0x211c6e(0x217)],'appRef':_0x37e543[_0x211c6e(0x238)],'datasetCode':_0x37e543['datasetCode'],'datatable':_0x37e543[_0x211c6e(0x230)],'sqlCode':_0x37e543[_0x211c6e(0x1f2)],'bffCode':_0x37e543[_0x211c6e(0x1ea)],'bffId':_0x37e543[_0x211c6e(0x22f)],'functionName':_0x37e543['scriptName']};}function normalizeScalarParams(_0x3437f9){const _0x446668=a65_0x2466;return Object[_0x446668(0x1da)](Object[_0x446668(0x1dc)](_0x3437f9)[_0x446668(0x1fe)](([,_0x45a943])=>typeof _0x45a943===_0x446668(0x227)||typeof _0x45a943===_0x446668(0x1e6)));}function hasText(_0x4d7503){const _0x263eb3=a65_0x2466;return typeof _0x4d7503===_0x263eb3(0x227)&&_0x4d7503[_0x263eb3(0x1e9)]()[_0x263eb3(0x20b)]>0x0;}function isPrimitiveFlagDefault(_0x159904){const _0x3cc359=a65_0x2466;return _0x159904===undefined||typeof _0x159904===_0x3cc359(0x227)||typeof _0x159904===_0x3cc359(0x1e6)||typeof _0x159904==='boolean';}function a65_0xafd7(){const _0x5967d6=['8QOMcFN','nickname','name','code','Service\x20command\x20','scriptName','string','\x20\x20MAP\x20TO','operator','\x20<command>\x20[flags]','\x20\x20\x20\x20sqlCode:\x20','Use\x20`','args','app','bffId','datatable','This\x20will\x20run\x20Service\x20Tree\x20command\x20\x22','852188dHRSXU','read','SERVICE_TREE','find','commands','push','appRef','\x22\x20to\x20a\x20datasetCode\x20in\x20app\x20','\x20\x20\x20\x20','\x20\x20\x20\x20functionName:\x20','validation','service','remainingArgs','fromEntries','Unsupported\x20service\x20target\x20kind:\x20','entries','\x20\x20\x20\x20datasetCode:\x20','slice','join','tree','The\x20manifest\x20marks\x20this\x20command\x20as\x20a\x20high-risk\x20write.\x20It\x20may\x20make\x20business\x20changes\x20that\x20are\x20hard\x20to\x20reverse.','default','cliName','employeeId','Define\x20the\x20appRef\x20under\x20appBindings\x20or\x20remove\x20target.appRef.','number','risk','source','trim','bffCode','\x22,\x20but\x20the\x20current\x20environment\x20is\x20\x22','247415cWQUXD','target','fullPath','params','nickName','\x20requires\x20target.sqlCode.','sqlCode','startsWith','map','cliPath','tenantCode','\x20->\x20','appCode','env','Cannot\x20resolve\x20datatable\x20\x22','envName','6vbBRJt','Use\x20lovrabet\x20dataset\x20list\x20to\x20confirm\x20the\x20physical\x20table\x20name\x20or\x20add\x20target.datasetCode\x20to\x20the\x20manifest.','filter','2042726BGWcgZ','some','\x20\x20\x20\x20datatable:\x20','const','Unknown\x20appRef\x20\x22','\x20\x20[','\x20\x20\x20\x20kind:\x20\x20\x20\x20','mapTo','normalizedManifest','now','\x20\x20SERVICE\x20TREE\x20TARGET','appcode','length','kind','Check\x20the\x20service\x20binding\x20and\x20current\x20connection.\x20Do\x20not\x20switch\x20environments\x20or\x20credentials\x20automatically.','317181uIYCFL','bff','The\x20manifest\x20marks\x20this\x20command\x20as\x20a\x20write.\x20It\x20may\x20change\x20business\x20data\x20or\x20service\x20state.','data','padEnd','flatMap','sql','type','218555rvhGkq','command','1342224YiiCSq','json','\x20requires\x20target.datasetCode\x20or\x20target.datatable.','5356720glNaLD','description','appBindings','datasetCode','6cMlhGM','rawFlags'];a65_0xafd7=function(){return _0x5967d6;};return a65_0xafd7();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x26c9e2,_0x3cc1ab){const _0x1d020e=a66_0x3bc4,_0x5e2778=_0x26c9e2();while(!![]){try{const _0x1e1627=parseInt(_0x1d020e(0x1ae))/0x1+-parseInt(_0x1d020e(0x196))/0x2+-parseInt(_0x1d020e(0x1b9))/0x3*(-parseInt(_0x1d020e(0x197))/0x4)+parseInt(_0x1d020e(0x194))/0x5*(-parseInt(_0x1d020e(0x1bb))/0x6)+parseInt(_0x1d020e(0x19e))/0x7*(-parseInt(_0x1d020e(0x1af))/0x8)+-parseInt(_0x1d020e(0x1a1))/0x9*(parseInt(_0x1d020e(0x1b7))/0xa)+parseInt(_0x1d020e(0x1a3))/0xb*(parseInt(_0x1d020e(0x1b0))/0xc);if(_0x1e1627===_0x3cc1ab)break;else _0x5e2778['push'](_0x5e2778['shift']());}catch(_0xeb41e7){_0x5e2778['push'](_0x5e2778['shift']());}}}(a66_0x3cb2,0x7bfba));function a66_0x3bc4(_0x39c338,_0x298570){_0x39c338=_0x39c338-0x194;const _0x3cb200=a66_0x3cb2();let _0x3bc405=_0x3cb200[_0x39c338];return _0x3bc405;}export function adaptServiceTreeManifestForLegacyFramework(_0x2bcc40){const _0x27d534=a66_0x3bc4,_0x3dc83f=cloneJsonValue(_0x2bcc40),_0x29f00b=[];if(!isObjectRecord(_0x3dc83f))return{'manifest':_0x3dc83f,'errors':_0x29f00b};return Array[_0x27d534(0x1a5)](_0x3dc83f['commands'])&&_0x3dc83f[_0x27d534(0x1ba)][_0x27d534(0x195)]((_0x285a8c,_0x382f6d)=>{const _0x538b7e=_0x27d534;if(!isObjectRecord(_0x285a8c))return;adaptBffTarget(_0x285a8c[_0x538b7e(0x1bc)],_0x538b7e(0x1b3)+_0x382f6d+_0x538b7e(0x19c),_0x29f00b);}),adaptResources(_0x3dc83f['resources'],_0x27d534(0x1ac),_0x29f00b),{'manifest':_0x3dc83f,'errors':_0x29f00b};}export function toPublicServiceTreeTarget(_0x42ca61){const _0x82341b=a66_0x3bc4,{scriptName:_0x1957f3,..._0x44438e}=_0x42ca61;return typeof _0x1957f3===_0x82341b(0x1b5)&&_0x1957f3['trim']()&&(_0x44438e[_0x82341b(0x1ad)]=_0x1957f3),_0x44438e;}export function toPublicNormalizedServiceTree(_0x583cc1){const _0x5096ad=a66_0x3bc4;return{..._0x583cc1,'commands':_0x583cc1[_0x5096ad(0x1ba)][_0x5096ad(0x19b)](_0x4890c0=>({..._0x4890c0,'target':toPublicServiceTreeTarget(_0x4890c0[_0x5096ad(0x1bc)])}))};}function adaptResources(_0x5f0913,_0x19bde6,_0x578c1d){const _0x573742=a66_0x3bc4;if(!isObjectRecord(_0x5f0913))return;for(const [_0x4b6432,_0x3e15f4]of Object[_0x573742(0x1b1)](_0x5f0913)){if(!isObjectRecord(_0x3e15f4))continue;const _0x4b0fad=_0x19bde6+'.'+_0x4b6432;if(isObjectRecord(_0x3e15f4['actions']))for(const [_0x11827a,_0x32a76e]of Object[_0x573742(0x1b1)](_0x3e15f4[_0x573742(0x1a0)])){if(!isObjectRecord(_0x32a76e))continue;const _0x463c18=_0x4b0fad+_0x573742(0x1a9)+_0x11827a,_0x3f49c5=isObjectRecord(_0x32a76e['target'])&&_0x32a76e[_0x573742(0x1bc)][_0x573742(0x1a4)]==='bff';adaptBffTarget(_0x32a76e[_0x573742(0x1bc)],_0x463c18+_0x573742(0x1aa),_0x578c1d),(_0x3f49c5||isBffAction(_0x32a76e))&&adaptFunctionNameField(_0x32a76e,_0x463c18,_0x578c1d);}adaptResources(_0x3e15f4[_0x573742(0x198)],_0x4b0fad+_0x573742(0x1a8),_0x578c1d);}}function adaptBffTarget(_0x3d1a84,_0x51878d,_0x7142d){const _0x452fa2=a66_0x3bc4;if(!isObjectRecord(_0x3d1a84)||_0x3d1a84[_0x452fa2(0x1a4)]!==_0x452fa2(0x1a2))return;adaptFunctionNameField(_0x3d1a84,_0x51878d,_0x7142d);}function a66_0x3cb2(){const _0x39158e=['hasOwnProperty','$.commands[','action','string','error','3220qweIkG','.functionName','112554JZXqwn','commands','18ndnjoJ','target','199275mRFxFv','forEach','1598850HrSqor','28VkrVEe','resources','scriptName','fromEntries','map','].target','prototype','3745EHTGoa','functionName\x20must\x20be\x20a\x20non-empty\x20string.','actions','15831GkpmZg','bff','13483613LAYHvN','kind','isArray','bff.exec','trim','.resources','.actions.','.target','call','$.resources','functionName','610208erkKxJ','1576EsjVIH','12AMvkNa','entries'];a66_0x3cb2=function(){return _0x39158e;};return a66_0x3cb2();}function adaptFunctionNameField(_0x9fef17,_0x5163bb,_0x47254e){const _0x3e778a=a66_0x3bc4;Object['prototype'][_0x3e778a(0x1b2)][_0x3e778a(0x1ab)](_0x9fef17,_0x3e778a(0x199))&&_0x47254e['push']({'level':_0x3e778a(0x1b6),'path':_0x5163bb+'.scriptName','message':'Use\x20functionName;\x20scriptName\x20is\x20not\x20part\x20of\x20the\x20runtime\x20Service\x20Tree\x20contract.'});if(Object[_0x3e778a(0x19d)][_0x3e778a(0x1b2)][_0x3e778a(0x1ab)](_0x9fef17,_0x3e778a(0x1ad))){if(typeof _0x9fef17['functionName']!==_0x3e778a(0x1b5)||!_0x9fef17[_0x3e778a(0x1ad)][_0x3e778a(0x1a7)]()){_0x47254e['push']({'level':_0x3e778a(0x1b6),'path':_0x5163bb+_0x3e778a(0x1b8),'message':_0x3e778a(0x19f)}),delete _0x9fef17[_0x3e778a(0x1ad)];return;}_0x9fef17[_0x3e778a(0x199)]=_0x9fef17[_0x3e778a(0x1ad)],delete _0x9fef17[_0x3e778a(0x1ad)];}}function isBffAction(_0x20414e){const _0x1f1a13=a66_0x3bc4;return _0x20414e['kind']===_0x1f1a13(0x1a2)||_0x20414e[_0x1f1a13(0x1b4)]===_0x1f1a13(0x1a6)||_0x20414e[_0x1f1a13(0x1bc)]===_0x1f1a13(0x1a6);}function cloneJsonValue(_0x310701){const _0x46747d=a66_0x3bc4;if(Array[_0x46747d(0x1a5)](_0x310701))return _0x310701[_0x46747d(0x19b)](_0x55341b=>cloneJsonValue(_0x55341b));if(isObjectRecord(_0x310701))return Object[_0x46747d(0x19a)](Object[_0x46747d(0x1b1)](_0x310701)[_0x46747d(0x19b)](([_0x3cf5bd,_0x3403c4])=>[_0x3cf5bd,cloneJsonValue(_0x3403c4)]));return _0x310701;}function isObjectRecord(_0x546865){const _0x23979c=a66_0x3bc4;return Boolean(_0x546865)&&typeof _0x546865==='object'&&!Array[_0x23979c(0x1a5)](_0x546865);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
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_0x3148e4=a67_0x5abd;(function(_0x175d87,_0x123cd6){const _0x50b279=a67_0x5abd,_0x3d7c05=_0x175d87();while(!![]){try{const _0x46fa1d=parseInt(_0x50b279(0xb7))/0x1+parseInt(_0x50b279(0x7f))/0x2+parseInt(_0x50b279(0x93))/0x3*(parseInt(_0x50b279(0xb3))/0x4)+parseInt(_0x50b279(0x8e))/0x5*(-parseInt(_0x50b279(0xaa))/0x6)+parseInt(_0x50b279(0x82))/0x7+parseInt(_0x50b279(0x8a))/0x8+-parseInt(_0x50b279(0xb0))/0x9;if(_0x46fa1d===_0x123cd6)break;else _0x3d7c05['push'](_0x3d7c05['shift']());}catch(_0x36132d){_0x3d7c05['push'](_0x3d7c05['shift']());}}}(a67_0x2f5a,0x7f1d9));function a67_0x5abd(_0x439b4d,_0x1bda59){_0x439b4d=_0x439b4d-0x72;const _0x2f5aec=a67_0x2f5a();let _0x5abd13=_0x2f5aec[_0x439b4d];return _0x5abd13;}import{exportServiceManifest,formatValidationFailure,getLocalServiceEntry,getServiceRegistryPath,importServiceManifest,listLocalServices,loadServiceManifestFromFile,removeServiceManifest}from'../../commands/service/registry.js';import{toPublicNormalizedServiceTree,toPublicServiceTreeTarget}from'../../commands/service/function-name-adapter.js';const FILE_FLAG={'name':'file','type':a67_0x3148e4(0xaf),'required':!![],'description':a67_0x3148e4(0xac)},SERVICE_FLAG={'name':a67_0x3148e4(0xb5),'type':a67_0x3148e4(0xaf),'required':!![],'description':'Local\x20service\x20code,\x20for\x20example\x20crm','pattern':{'regex':/^[a-z][a-z0-9-]*$/,'description':a67_0x3148e4(0x83)}};function summarizeService(_0x17f1f1){const _0x36be0a=a67_0x3148e4;return{'serviceCode':_0x17f1f1['serviceCode'],'name':_0x17f1f1[_0x36be0a(0x9e)][_0x36be0a(0xb5)][_0x36be0a(0xa0)],'version':_0x17f1f1[_0x36be0a(0x7c)],'importedAt':_0x17f1f1[_0x36be0a(0xa5)],'source':_0x17f1f1[_0x36be0a(0xb6)],'commandCount':_0x17f1f1[_0x36be0a(0x9e)][_0x36be0a(0x9c)]['length'],'commands':_0x17f1f1[_0x36be0a(0x9e)]['commands'][_0x36be0a(0x77)](_0x2a9900=>({'path':_0x2a9900[_0x36be0a(0xb2)],'description':_0x2a9900[_0x36be0a(0x99)],'risk':_0x2a9900['risk'],'target':toPublicServiceTreeTarget(_0x2a9900['target']),'flags':_0x2a9900[_0x36be0a(0x7b)][_0x36be0a(0x77)](_0x173403=>({'name':_0x173403[_0x36be0a(0xa0)],'cliName':_0x173403['cliName'],'type':_0x173403[_0x36be0a(0xb1)],'required':_0x173403[_0x36be0a(0x87)]===!![]}))}))};}function a67_0x2f5a(){const _0x4920bf=['detail','commands','updated','normalizedManifest','import','name','Updated','read','report','write','importedAt','\x20service\x20','errors','str','serviceCount','6QGDLfK','filePath','Service\x20Tree\x20manifest\x20file\x20path','Imported\x20','replaced','string','319446UWvHkd','type','cliPath','19540ZtbbUy','file','service','source','58401TOaUkr','manifests','Exported\x20service\x20','imported','length','kind','list','Preview\x20Service\x20Tree\x20import\x20into\x20~/.lovrabet/service.json','map','Preview\x20Service\x20Tree\x20export\x20from\x20~/.lovrabet/service.json','Imported','Preview\x20Service\x20Tree\x20removal\x20from\x20~/.lovrabet/service.json','flags','version','registryIndex','Reads\x20the\x20given\x20manifest\x20into\x20the\x20local\x20Service\x20Tree\x20registry.\x20An\x20existing\x20manifest\x20with\x20the\x20same\x20service\x20code\x20is\x20updated.\x20The\x20confirmation\x20UI\x20does\x20not\x20show\x20local\x20file\x20paths.','273678AunfUF','Validate\x20a\x20Service\x20Tree\x20JSON\x20manifest','Export\x20the\x20local\x20Service\x20Tree\x20manifest\x20to\x20a\x20JSON\x20file','843493LrYiGm','lower\x20kebab-case\x20service\x20code','Show\x20a\x20locally\x20imported\x20Service\x20Tree\x20manifest','registryServiceCode','serviceCode','required','WRITE','validate','5562584Eeovqy','registryPath','\x20service(s),\x20updated\x20','manifest','4692590uqgdnL','entry','warnings','target','List\x20locally\x20imported\x20Service\x20Tree\x20manifests','297QbILQd','Removes\x20the\x20given\x20service\x20manifest\x20from\x20the\x20local\x20Service\x20Tree\x20registry.\x20Dynamic\x20commands\x20from\x20that\x20manifest\x20will\x20no\x20longer\x20be\x20available.','Removed\x20service\x20','registry','Local\x20service\x20not\x20found:\x20','export','description','hash'];a67_0x2f5a=function(){return _0x4920bf;};return a67_0x2f5a();}function summarizeLoadedManifest(_0x10fbe7){const _0x44e443=a67_0x3148e4;return{'service':_0x10fbe7[_0x44e443(0x9e)]?.['service'],'version':_0x10fbe7['normalizedManifest']?.[_0x44e443(0x7c)],'commandCount':_0x10fbe7[_0x44e443(0x9e)]?.[_0x44e443(0x9c)][_0x44e443(0x73)]??0x0,'commands':_0x10fbe7[_0x44e443(0x9e)]?.[_0x44e443(0x9c)]['map'](_0x3f99b6=>({'path':_0x3f99b6[_0x44e443(0xb2)],'risk':_0x3f99b6['risk'],'target':toPublicServiceTreeTarget(_0x3f99b6[_0x44e443(0x91)])}))??[],'registryIndex':_0x10fbe7[_0x44e443(0x7d)],'registryServiceCode':_0x10fbe7[_0x44e443(0x85)],'errors':_0x10fbe7['report'][_0x44e443(0xa7)],'warnings':_0x10fbe7['report'][_0x44e443(0x90)]};}export const serviceDefinitions=[{'service':a67_0x3148e4(0xb5),'command':a67_0x3148e4(0x89),'description':a67_0x3148e4(0x80),'risk':a67_0x3148e4(0xa2),'requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'execute'(_0x113708){const _0x54a8d6=a67_0x3148e4,_0x21e707=loadServiceManifestFromFile(_0x113708[_0x54a8d6(0xa8)](_0x54a8d6(0xb4)));if(!_0x21e707[_0x54a8d6(0xa3)]['ok'])return{'ok':![],'data':{'file':_0x21e707[_0x54a8d6(0xab)],'hash':_0x21e707[_0x54a8d6(0x9a)],'kind':_0x21e707[_0x54a8d6(0x74)],'serviceCount':_0x21e707['manifests']['length'],'services':_0x21e707[_0x54a8d6(0xb8)]['map'](summarizeLoadedManifest),'errors':_0x21e707['report'][_0x54a8d6(0xa7)],'warnings':_0x21e707[_0x54a8d6(0xa3)]['warnings']},'message':formatValidationFailure(_0x21e707[_0x54a8d6(0xa3)])};if(_0x21e707[_0x54a8d6(0x74)]===_0x54a8d6(0x96)||_0x21e707['manifests'][_0x54a8d6(0x73)]!==0x1)return{'ok':!![],'data':{'file':_0x21e707[_0x54a8d6(0xab)],'hash':_0x21e707[_0x54a8d6(0x9a)],'kind':_0x21e707[_0x54a8d6(0x74)],'serviceCount':_0x21e707['manifests'][_0x54a8d6(0x73)],'commandCount':_0x21e707[_0x54a8d6(0xb8)]['reduce']((_0x2a7f0f,_0x1625b8)=>_0x2a7f0f+(_0x1625b8['normalizedManifest']?.[_0x54a8d6(0x9c)][_0x54a8d6(0x73)]??0x0),0x0),'services':_0x21e707[_0x54a8d6(0xb8)][_0x54a8d6(0x77)](summarizeLoadedManifest),'warnings':_0x21e707[_0x54a8d6(0xa3)]['warnings']},'message':'Service\x20registry\x20validation\x20passed.'};return{'ok':!![],'data':{'file':_0x21e707[_0x54a8d6(0xab)],'hash':_0x21e707[_0x54a8d6(0x9a)],'kind':_0x21e707[_0x54a8d6(0x74)],'service':_0x21e707[_0x54a8d6(0x9e)]?.[_0x54a8d6(0xb5)],'version':_0x21e707[_0x54a8d6(0x9e)]?.[_0x54a8d6(0x7c)],'commandCount':_0x21e707[_0x54a8d6(0x9e)]?.[_0x54a8d6(0x9c)][_0x54a8d6(0x73)]??0x0,'commands':_0x21e707[_0x54a8d6(0x9e)]?.[_0x54a8d6(0x9c)][_0x54a8d6(0x77)](_0x2b5d27=>({'path':_0x2b5d27[_0x54a8d6(0xb2)],'risk':_0x2b5d27['risk'],'target':toPublicServiceTreeTarget(_0x2b5d27['target'])})),'warnings':_0x21e707['report'][_0x54a8d6(0x90)]},'message':'Service\x20manifest\x20validation\x20passed.'};}},{'service':a67_0x3148e4(0xb5),'command':a67_0x3148e4(0x9f),'description':'Import\x20a\x20Service\x20Tree\x20manifest\x20into\x20the\x20local\x20runtime\x20registry','risk':a67_0x3148e4(0xa4),'confirmationDescription':a67_0x3148e4(0x7e),'requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'dryRun'(_0x30402d){const _0x112274=a67_0x3148e4,_0x4ff910=loadServiceManifestFromFile(_0x30402d[_0x112274(0xa8)](_0x112274(0xb4)));return{'method':'WRITE','url':getServiceRegistryPath(),'body':{'file':_0x4ff910['filePath'],'hash':_0x4ff910[_0x112274(0x9a)],'kind':_0x4ff910[_0x112274(0x74)],'ok':_0x4ff910[_0x112274(0xa3)]['ok'],'service':_0x4ff910[_0x112274(0x9e)]?.[_0x112274(0xb5)],'version':_0x4ff910['normalizedManifest']?.[_0x112274(0x7c)],'serviceCount':_0x4ff910['manifests']['length'],'services':_0x4ff910['manifests']['map'](_0x84eda0=>({'service':_0x84eda0[_0x112274(0x9e)]?.[_0x112274(0xb5)],'version':_0x84eda0[_0x112274(0x9e)]?.['version'],'commandCount':_0x84eda0[_0x112274(0x9e)]?.[_0x112274(0x9c)][_0x112274(0x73)]??0x0,'errors':_0x84eda0[_0x112274(0xa3)]['errors']})),'errors':_0x4ff910[_0x112274(0xa3)][_0x112274(0xa7)],'commandCount':_0x4ff910['normalizedManifest']?.[_0x112274(0x9c)][_0x112274(0x73)]??0x0},'description':_0x112274(0x76)};},async 'execute'(_0x3380cf){const _0x568e48=a67_0x3148e4,_0x4e84bc=importServiceManifest(_0x3380cf[_0x568e48(0xa8)](_0x568e48(0xb4)));if(_0x4e84bc['entries']['length']!==0x1)return{'ok':!![],'data':{'registryPath':_0x4e84bc[_0x568e48(0x8b)],'imported':_0x4e84bc[_0x568e48(0x72)],'updated':_0x4e84bc['updated'],'serviceCount':_0x4e84bc[_0x568e48(0xa9)],'services':_0x4e84bc['entries'][_0x568e48(0x77)](summarizeService)},'message':_0x568e48(0xad)+_0x4e84bc[_0x568e48(0x72)]+_0x568e48(0x8c)+_0x4e84bc[_0x568e48(0x9d)]+'\x20service(s).'};return{'ok':!![],'data':{'registryPath':_0x4e84bc[_0x568e48(0x8b)],'replaced':_0x4e84bc[_0x568e48(0xae)],'imported':_0x4e84bc[_0x568e48(0x72)],'updated':_0x4e84bc['updated'],'serviceCount':_0x4e84bc[_0x568e48(0xa9)],'service':summarizeService(_0x4e84bc[_0x568e48(0x8f)])},'message':(_0x4e84bc[_0x568e48(0xae)]?_0x568e48(0xa1):_0x568e48(0x79))+_0x568e48(0xa6)+_0x4e84bc[_0x568e48(0x8f)][_0x568e48(0x86)]+'.'};}},{'service':a67_0x3148e4(0xb5),'command':a67_0x3148e4(0x98),'description':a67_0x3148e4(0x81),'risk':a67_0x3148e4(0xa4),'confirmationDescription':'Writes\x20the\x20local\x20Service\x20Tree\x20manifest\x20for\x20the\x20given\x20service\x20to\x20a\x20JSON\x20file.\x20An\x20existing\x20file\x20at\x20the\x20target\x20may\x20be\x20overwritten.\x20The\x20confirmation\x20UI\x20does\x20not\x20show\x20local\x20file\x20paths.','requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG,FILE_FLAG],async 'dryRun'(_0x15c1f1){const _0x6dd704=a67_0x3148e4,_0x256c7e=getLocalServiceEntry(_0x15c1f1['str'](_0x6dd704(0xb5)));return{'method':_0x6dd704(0x88),'url':_0x15c1f1[_0x6dd704(0xa8)](_0x6dd704(0xb4)),'body':{'service':_0x15c1f1[_0x6dd704(0xa8)]('service'),'found':Boolean(_0x256c7e),'version':_0x256c7e?.[_0x6dd704(0x7c)],'source':_0x256c7e?.[_0x6dd704(0xb6)]},'description':_0x6dd704(0x78)};},async 'execute'(_0x4e71e1){const _0x15e8b2=a67_0x3148e4,_0x17c52d=exportServiceManifest(_0x4e71e1[_0x15e8b2(0xa8)](_0x15e8b2(0xb5)),_0x4e71e1['str']('file'));return{'ok':!![],'data':{'registryPath':_0x17c52d[_0x15e8b2(0x8b)],'file':_0x17c52d['filePath'],'service':summarizeService(_0x17c52d[_0x15e8b2(0x8f)])},'message':_0x15e8b2(0xb9)+_0x17c52d[_0x15e8b2(0x8f)][_0x15e8b2(0x86)]+'.'};}},{'service':'service','command':a67_0x3148e4(0x75),'description':a67_0x3148e4(0x92),'risk':a67_0x3148e4(0xa2),'requiresAuth':![],'requiresAppCode':![],'flags':[],async 'execute'(){const _0x30e53f=a67_0x3148e4,_0x5e6dd5=listLocalServices();return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'total':_0x5e6dd5['length'],'services':_0x5e6dd5[_0x30e53f(0x77)](summarizeService)}};}},{'service':a67_0x3148e4(0xb5),'command':'remove','description':'Remove\x20a\x20Service\x20Tree\x20manifest\x20from\x20the\x20local\x20runtime\x20registry','risk':a67_0x3148e4(0xa4),'confirmationDescription':a67_0x3148e4(0x94),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'dryRun'(_0x15e3cb){const _0x4578f9=a67_0x3148e4,_0x43851b=getLocalServiceEntry(_0x15e3cb[_0x4578f9(0xa8)](_0x4578f9(0xb5)));return{'method':'WRITE','url':getServiceRegistryPath(),'body':{'service':_0x15e3cb[_0x4578f9(0xa8)](_0x4578f9(0xb5)),'found':Boolean(_0x43851b),'version':_0x43851b?.['version'],'source':_0x43851b?.[_0x4578f9(0xb6)]},'description':_0x4578f9(0x7a)};},async 'execute'(_0x370a39){const _0x141f5a=a67_0x3148e4,_0x316bad=removeServiceManifest(_0x370a39[_0x141f5a(0xa8)]('service'));return{'ok':!![],'data':{'registryPath':_0x316bad[_0x141f5a(0x8b)],'serviceCount':_0x316bad[_0x141f5a(0xa9)],'service':summarizeService(_0x316bad[_0x141f5a(0x8f)])},'message':_0x141f5a(0x95)+_0x316bad[_0x141f5a(0x8f)][_0x141f5a(0x86)]+'.'};}},{'service':'service','command':a67_0x3148e4(0x9b),'description':a67_0x3148e4(0x84),'risk':a67_0x3148e4(0xa2),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'execute'(_0x236a16){const _0x243c9f=a67_0x3148e4,_0x1d0642=getLocalServiceEntry(_0x236a16[_0x243c9f(0xa8)](_0x243c9f(0xb5)));if(!_0x1d0642)return{'ok':![],'data':{'registryPath':getServiceRegistryPath(),'service':_0x236a16[_0x243c9f(0xa8)](_0x243c9f(0xb5))},'message':_0x243c9f(0x97)+_0x236a16[_0x243c9f(0xa8)](_0x243c9f(0xb5))};return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'service':summarizeService(_0x1d0642),'manifest':_0x1d0642[_0x243c9f(0x8d)],'normalizedManifest':toPublicNormalizedServiceTree(_0x1d0642[_0x243c9f(0x9e)])}};}}];
|