@lovrabet/lovrabet-cli 2.3.8-beta.7 → 2.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/approval/index.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/import-excel.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/issue/context.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/permit/dataset-get.js +1 -1
- package/lib/commands/permit/dataset-set.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/schedule/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/function-name-adapter.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/diagram.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/diagram.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/user-account/bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-sdk-errors.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/access-error.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/raw-flags.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-import/auto-id-runner.js +1 -1
- package/lib/services/dataset-import/excel-reader.js +1 -1
- package/lib/services/dataset-import/image-bytes.js +1 -1
- package/lib/services/dataset-import/image-ooxml.js +1 -1
- package/lib/services/dataset-import/image-runner.js +1 -1
- package/lib/services/dataset-import/metadata.js +1 -1
- package/lib/services/dataset-import/preview.js +1 -1
- package/lib/services/dataset-import/runner.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/install-target.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/utils/access-key-redaction.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/positive-safe-integer.js +1 -1
- package/lib/utils/redaction.js +1 -1
- package/lib/utils/runtime-user-id.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/lovrabet/SKILL.md +1 -1
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a54_0x46b9(){const _0x1d1d94=['Preview:\x20create\x20a\x20runtime\x20CUSTOM\x20role','206649wekoVW','114689vkMVTD','remark','validation','3541344cxUDDC','role','1272486ZqlbCF','str','Creates\x20a\x20custom\x20role\x20in\x20the\x20current\x20runtime\x20app.\x20After\x20creation\x20it\x20can\x20be\x20used\x20for\x20member\x20and\x20resource\x20permissions.','trim','high-risk-write','description','POST','1788374IDMVGW','string','559305MLJGTE','build','appCode','39114pazoIX','name','create','/client/permit/role/create','4usePEJ'];a54_0x46b9=function(){return _0x1d1d94;};return a54_0x46b9();}function a54_0x3b34(_0x106db9,_0x1165ba){_0x106db9=_0x106db9-0xad;const _0x46b97c=a54_0x46b9();let _0x3b3486=_0x46b97c[_0x106db9];return _0x3b3486;}const a54_0x31d50f=a54_0x3b34;(function(_0x23ac37,_0x19c414){const _0x3a4727=a54_0x3b34,_0xbb2880=_0x23ac37();while(!![]){try{const _0x202da8=parseInt(_0x3a4727(0xbc))/0x1+parseInt(_0x3a4727(0xb5))/0x2+parseInt(_0x3a4727(0xbb))/0x3*(-parseInt(_0x3a4727(0xb9))/0x4)+parseInt(_0x3a4727(0xb2))/0x5+-parseInt(_0x3a4727(0xc1))/0x6+-parseInt(_0x3a4727(0xb0))/0x7+parseInt(_0x3a4727(0xbf))/0x8;if(_0x202da8===_0x19c414)break;else _0xbb2880['push'](_0xbb2880['shift']());}catch(_0x1ebf18){_0xbb2880['push'](_0xbb2880['shift']());}}}(a54_0x46b9,0x25309));import{createRuntimeAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';import{projectRuntimeRole,readOptionalRuntimeRoleCode,ROLE_CODE_FLAG,runtimeRoleWriteResult}from'../../commands/role/shared.js';function input(_0x120401){const _0x5b881b=a54_0x3b34,_0x30db10=_0x120401[_0x5b881b(0xc2)](_0x5b881b(0xb6))[_0x5b881b(0xc4)]();if(!_0x30db10)throw CliErrors[_0x5b881b(0xbe)]('--name\x20must\x20not\x20be\x20blank.');const _0x428c27=_0x120401[_0x5b881b(0xc2)](_0x5b881b(0xbd))[_0x5b881b(0xc4)](),_0x1966e3=readOptionalRuntimeRoleCode(_0x120401);return{'appCode':_0x120401[_0x5b881b(0xb4)],'roleName':_0x30db10,..._0x1966e3?{'roleCode':_0x1966e3}:{},..._0x428c27?{'remark':_0x428c27}:{}};}export const roleCreate={'service':a54_0x31d50f(0xc0),'command':a54_0x31d50f(0xb7),'description':'Create\x20a\x20runtime\x20CUSTOM\x20role','risk':a54_0x31d50f(0xad),'confirmationDescription':a54_0x31d50f(0xc3),'flags':[{'name':a54_0x31d50f(0xb6),'type':a54_0x31d50f(0xb1),'required':!![],'description':'Role\x20name'},ROLE_CODE_FLAG,{'name':a54_0x31d50f(0xbd),'type':'string','description':'Optional\x20role\x20remark'}],async 'validate'(_0x4e99b5){input(_0x4e99b5);},async 'dryRun'(_0x451b44){const _0x84c61c=a54_0x31d50f;return dryRun(_0x84c61c(0xaf),_0x84c61c(0xb8))['body']({'roleType':'CUSTOM',...input(_0x451b44)})[_0x84c61c(0xae)](_0x84c61c(0xba))[_0x84c61c(0xb3)]();},async 'execute'(_0x26cafa){const _0x4f6af3=a54_0x31d50f,_0x420a2e=await createRuntimeAppRole(input(_0x26cafa));return{'ok':!![],'data':runtimeRoleWriteResult(_0x4f6af3(0xb7),{'roleId':_0x420a2e['id']},null,projectRuntimeRole(_0x420a2e),{'method':_0x4f6af3(0xaf),'path':_0x4f6af3(0xb8)})};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a55_0x3780(){const _0x51d340=['9npFbig','3190831jAkMVU','2470770SDCbZV','delete','6713100vWJEdD','2804559DfrMjv','Delete\x20a\x20runtime\x20CUSTOM\x20role','appCode','high-risk-write','523259ZHcjcQ','role','num','/client/permit/role/delete','7UcQWGI','91192ZEcZci','4hjAtjq','12JkeXnI','876scquVX','7427856xqChme','build','Deletes\x20the\x20custom\x20role\x20in\x20the\x20current\x20runtime\x20app.\x20Membership\x20and\x20permission\x20config\x20for\x20that\x20role\x20may\x20become\x20invalid.'];a55_0x3780=function(){return _0x51d340;};return a55_0x3780();}const a55_0x1ec5ba=a55_0x5efb;function a55_0x5efb(_0x438ae7,_0x51b34c){_0x438ae7=_0x438ae7-0x162;const _0x3780ab=a55_0x3780();let _0x5efb61=_0x3780ab[_0x438ae7];return _0x5efb61;}(function(_0x5c0e3a,_0x14ec99){const _0x3c03cd=a55_0x5efb,_0x1f2244=_0x5c0e3a();while(!![]){try{const _0x2335d8=parseInt(_0x3c03cd(0x163))/0x1*(parseInt(_0x3c03cd(0x164))/0x2)+parseInt(_0x3c03cd(0x170))/0x3*(parseInt(_0x3c03cd(0x165))/0x4)+parseInt(_0x3c03cd(0x16d))/0x5+-parseInt(_0x3c03cd(0x166))/0x6*(-parseInt(_0x3c03cd(0x16c))/0x7)+parseInt(_0x3c03cd(0x168))/0x8+-parseInt(_0x3c03cd(0x16b))/0x9*(-parseInt(_0x3c03cd(0x16f))/0xa)+-parseInt(_0x3c03cd(0x174))/0xb*(parseInt(_0x3c03cd(0x167))/0xc);if(_0x2335d8===_0x14ec99)break;else _0x1f2244['push'](_0x1f2244['shift']());}catch(_0x13b197){_0x1f2244['push'](_0x1f2244['shift']());}}}(a55_0x3780,0xc029c));import{deleteRuntimeAppRole}from'../../core/api-client.js';import{dryRun}from'../../framework/dryrun.js';import{assertCustomRuntimeRole,getRuntimeRoleById,projectRuntimeRole,ROLE_ID_FLAG,runtimeRoleWriteResult}from'../../commands/role/shared.js';async function prepare(_0xf607b6){const _0x552907=a55_0x5efb,_0x2bd33c=await getRuntimeRoleById(_0xf607b6[_0x552907(0x172)],_0xf607b6[_0x552907(0x176)]('id'));return assertCustomRuntimeRole(_0x2bd33c,'delete'),_0x2bd33c;}export const roleDelete={'service':a55_0x1ec5ba(0x175),'command':a55_0x1ec5ba(0x16e),'description':a55_0x1ec5ba(0x171),'risk':a55_0x1ec5ba(0x173),'confirmationDescription':a55_0x1ec5ba(0x16a),'flags':[ROLE_ID_FLAG],async 'dryRun'(_0x5558ef){const _0x54e58f=a55_0x1ec5ba,_0x477b87=await prepare(_0x5558ef);return dryRun('POST','/client/permit/role/delete')['body']({'id':_0x477b87['id']})['description']('Preview:\x20delete\x20a\x20runtime\x20CUSTOM\x20role')[_0x54e58f(0x169)]();},async 'execute'(_0x4aae82){const _0x4c4846=a55_0x1ec5ba,_0x4ec0d1=await prepare(_0x4aae82);return await deleteRuntimeAppRole(_0x4ec0d1['id']),{'ok':!![],'data':runtimeRoleWriteResult(_0x4c4846(0x16e),{'roleId':_0x4ec0d1['id']},projectRuntimeRole(_0x4ec0d1),null,{'method':'POST','path':_0x4c4846(0x162)})};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a56_0x2db39b=a56_0xf699;(function(_0x2794a4,_0x39fa1e){const _0x29eaf1=a56_0xf699,_0x39e45b=_0x2794a4();while(!![]){try{const _0x16c69e=parseInt(_0x29eaf1(0x14d))/0x1*(parseInt(_0x29eaf1(0x14b))/0x2)+-parseInt(_0x29eaf1(0x14a))/0x3+-parseInt(_0x29eaf1(0x148))/0x4*(-parseInt(_0x29eaf1(0x14c))/0x5)+parseInt(_0x29eaf1(0x14f))/0x6+parseInt(_0x29eaf1(0x149))/0x7+-parseInt(_0x29eaf1(0x147))/0x8+-parseInt(_0x29eaf1(0x150))/0x9*(parseInt(_0x29eaf1(0x14e))/0xa);if(_0x16c69e===_0x39fa1e)break;else _0x39e45b['push'](_0x39e45b['shift']());}catch(_0x590a56){_0x39e45b['push'](_0x39e45b['shift']());}}}(a56_0x6a1f,0xb83d2));import{getRuntimeRoleById,projectRuntimeRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';function a56_0xf699(_0x364707,_0x5a2591){_0x364707=_0x364707-0x143;const _0x6a1fd0=a56_0x6a1f();let _0xf699fa=_0x6a1fd0[_0x364707];return _0xf699fa;}function a56_0x6a1f(){const _0x31633a=['detail','appCode','num','role','read','10960216TIHCaI','268tvvQuz','9162391hLHpfW','1947825WQpGFt','13022DYQltl','61760oLehpw','195aytrDk','220lbOqtQ','3666396dsnuTC','508608BlJNBI'];a56_0x6a1f=function(){return _0x31633a;};return a56_0x6a1f();}export const roleDetail={'service':a56_0x2db39b(0x145),'command':a56_0x2db39b(0x151),'description':'Show\x20one\x20runtime\x20role\x20by\x20ID','risk':a56_0x2db39b(0x146),'flags':[ROLE_ID_FLAG],async 'execute'(_0x2db3a8){const _0x39b817=a56_0x2db39b,_0xc1eeed=await getRuntimeRoleById(_0x2db3a8[_0x39b817(0x143)],_0x2db3a8[_0x39b817(0x144)]('id'));return{'ok':!![],'data':{'scope':'runtime','role':projectRuntimeRole(_0xc1eeed)}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2703bc,_0x8a7bc2){const _0x340427=a57_0x9f47,_0x3f0985=_0x2703bc();while(!![]){try{const _0x47f046=parseInt(_0x340427(0x16f))/0x1+-parseInt(_0x340427(0x179))/0x2*(parseInt(_0x340427(0x176))/0x3)+-parseInt(_0x340427(0x173))/0x4*(-parseInt(_0x340427(0x171))/0x5)+-parseInt(_0x340427(0x172))/0x6*(-parseInt(_0x340427(0x174))/0x7)+parseInt(_0x340427(0x178))/0x8*(-parseInt(_0x340427(0x170))/0x9)+-parseInt(_0x340427(0x175))/0xa+parseInt(_0x340427(0x177))/0xb;if(_0x47f046===_0x8a7bc2)break;else _0x3f0985['push'](_0x3f0985['shift']());}catch(_0x1dab5d){_0x3f0985['push'](_0x3f0985['shift']());}}}(a57_0x46c7,0x7ecfb));import{roleList}from'../../commands/role/list.js';import{roleDetail}from'../../commands/role/detail.js';import{roleCreate}from'../../commands/role/create.js';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';function a57_0x46c7(){const _0x179109=['559778pLPieB','5220981GEZbyH','24275zeiAAL','1899498sfZlib','500qWUCYL','14MPTuSS','5028020NAgREF','238461ExAQKl','9194262prhwoq','8hyyPCW','26ljIQcA'];a57_0x46c7=function(){return _0x179109;};return a57_0x46c7();}function a57_0x9f47(_0x900b99,_0x5ca2a5){_0x900b99=_0x900b99-0x16f;const _0x46c7e9=a57_0x46c7();let _0x9f4784=_0x46c7e9[_0x900b99];return _0x9f4784;}export const roleDefinitions=[roleList,roleDetail,roleCreate,roleUpdate,roleDelete,roleUserAdd,roleUserRemove];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a58_0x4790bf=a58_0x1003;function a58_0x3a54(){const _0x28aefd=['str','519QCXvIE','33628463FqbckD','page','54888ZCsDSq','2784177CqRDXV','6441526TNkNHx','Invalid\x20runtime\x20role\x20type:\x20','8OBKDMC','length','Fuzzy\x20role-name\x20filter','runtime','834508csyPLA','items','name','12434XNxasa','List\x20runtime\x20roles\x20for\x20the\x20current\x20app','340hMKdGC','list','pagesize','filter','trim','validation','includes','number','num','map','Runtime\x20role\x20type','62644zgKLab','type','--pagesize\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.','appCode','50hFJLnq','isSafeInteger','--page\x20must\x20be\x20a\x20positive\x20integer.','toUpperCase'];a58_0x3a54=function(){return _0x28aefd;};return a58_0x3a54();}(function(_0x4a46f3,_0x511ca3){const _0x2759d4=a58_0x1003,_0x462096=_0x4a46f3();while(!![]){try{const _0x523f41=-parseInt(_0x2759d4(0x12a))/0x1+-parseInt(_0x2759d4(0x11d))/0x2*(-parseInt(_0x2759d4(0x133))/0x3)+-parseInt(_0x2759d4(0x11a))/0x4+parseInt(_0x2759d4(0x11f))/0x5*(parseInt(_0x2759d4(0x136))/0x6)+-parseInt(_0x2759d4(0x138))/0x7*(-parseInt(_0x2759d4(0x116))/0x8)+-parseInt(_0x2759d4(0x137))/0x9*(-parseInt(_0x2759d4(0x12e))/0xa)+-parseInt(_0x2759d4(0x134))/0xb;if(_0x523f41===_0x511ca3)break;else _0x462096['push'](_0x462096['shift']());}catch(_0xa00d01){_0x462096['push'](_0x462096['shift']());}}}(a58_0x3a54,0xcc258));function a58_0x1003(_0x50d2ab,_0x4fd170){_0x50d2ab=_0x50d2ab-0x116;const _0x3a549d=a58_0x3a54();let _0x1003a2=_0x3a549d[_0x50d2ab];return _0x1003a2;}import{listRuntimeAppRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{listAllRuntimeRoles,projectRuntimeRole,RUNTIME_ROLE_TYPES}from'../../commands/role/shared.js';export const roleList={'service':'role','command':a58_0x4790bf(0x120),'description':a58_0x4790bf(0x11e),'risk':'read','flags':[{'name':a58_0x4790bf(0x12b),'type':'string','enum':RUNTIME_ROLE_TYPES,'description':a58_0x4790bf(0x129)},{'name':a58_0x4790bf(0x11c),'type':'string','description':a58_0x4790bf(0x118)},{'name':'page','type':a58_0x4790bf(0x126),'default':0x1,'description':'Page\x20number'},{'name':a58_0x4790bf(0x121),'type':'number','default':0x64,'description':'Page\x20size\x20from\x201\x20to\x20100'}],async 'validate'(_0x42a46d){const _0x3f6038=a58_0x4790bf,_0xa642b7=_0x42a46d[_0x3f6038(0x132)](_0x3f6038(0x12b))[_0x3f6038(0x131)]();if(_0xa642b7&&!RUNTIME_ROLE_TYPES[_0x3f6038(0x125)](_0xa642b7))throw CliErrors[_0x3f6038(0x124)](_0x3f6038(0x139)+_0xa642b7+'.');const _0x52d099=_0x42a46d[_0x3f6038(0x127)](_0x3f6038(0x135),0x1),_0x420659=_0x42a46d[_0x3f6038(0x127)]('pagesize',0x64);if(!Number[_0x3f6038(0x12f)](_0x52d099)||_0x52d099<0x1)throw CliErrors['validation'](_0x3f6038(0x130));if(!Number[_0x3f6038(0x12f)](_0x420659)||_0x420659<0x1||_0x420659>0x64)throw CliErrors['validation'](_0x3f6038(0x12c));},async 'execute'(_0x191a85){const _0x398084=a58_0x4790bf,_0xa125e0=_0x191a85[_0x398084(0x132)]('type')[_0x398084(0x131)](),_0x2aabd1=_0x191a85[_0x398084(0x132)](_0x398084(0x11c))[_0x398084(0x123)](),_0x451acf=_0x191a85[_0x398084(0x127)](_0x398084(0x135),0x1),_0x446b02=_0x191a85['num'](_0x398084(0x121),0x64);if(_0xa125e0){const _0x48b51a=(await listAllRuntimeRoles(_0x191a85[_0x398084(0x12d)],{..._0x2aabd1?{'roleName':_0x2aabd1}:{}}))[_0x398084(0x122)](_0x5feba2=>_0x5feba2['roleType']===_0xa125e0),_0x20ffcf=(_0x451acf-0x1)*_0x446b02;return{'ok':!![],'data':{'scope':_0x398084(0x119),'roles':_0x48b51a['slice'](_0x20ffcf,_0x20ffcf+_0x446b02)['map'](projectRuntimeRole),'paging':{'currentPage':_0x451acf,'pageSize':_0x446b02,'totalCount':_0x48b51a[_0x398084(0x117)]}}};}const _0x49571c=await listRuntimeAppRoles(_0x191a85['appCode'],{..._0x2aabd1?{'roleName':_0x2aabd1}:{},'currentPage':_0x451acf,'pageSize':_0x446b02});return{'ok':!![],'data':{'scope':_0x398084(0x119),'roles':_0x49571c[_0x398084(0x11b)][_0x398084(0x128)](projectRuntimeRole),'paging':_0x49571c['paging']}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a59_0x34490e=a59_0x2fed;(function(_0x32c0a4,_0x345c95){const _0x584bdb=a59_0x2fed,_0x9f1649=_0x32c0a4();while(!![]){try{const _0x4270d2=parseInt(_0x584bdb(0x194))/0x1+-parseInt(_0x584bdb(0x1a3))/0x2+parseInt(_0x584bdb(0x1a7))/0x3+parseInt(_0x584bdb(0x188))/0x4+parseInt(_0x584bdb(0x19a))/0x5*(-parseInt(_0x584bdb(0x16e))/0x6)+parseInt(_0x584bdb(0x193))/0x7+parseInt(_0x584bdb(0x162))/0x8*(-parseInt(_0x584bdb(0x16a))/0x9);if(_0x4270d2===_0x345c95)break;else _0x9f1649['push'](_0x9f1649['shift']());}catch(_0x52b620){_0x9f1649['push'](_0x9f1649['shift']());}}}(a59_0x358e,0x50a7a));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=['ADMIN','USER','OWNER',a59_0x34490e(0x184)];const BUILTIN_ROLE_TYPES=[a59_0x34490e(0x16d),a59_0x34490e(0x19b),a59_0x34490e(0x1a5)];export const ROLE_ID_FLAG={'name':'id','type':a59_0x34490e(0x164),'required':!![],'description':a59_0x34490e(0x169)};export const ROLE_REF_FLAG={'name':'role','type':'string','required':!![],'description':'Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name'};export const ROLE_CODE_FLAG={'name':a59_0x34490e(0x1ad),'type':a59_0x34490e(0x1a1),'description':a59_0x34490e(0x16c)};function a59_0x2fed(_0x282e8e,_0x4a8a0f){_0x282e8e=_0x282e8e-0x162;const _0x358e9a=a59_0x358e();let _0x2fed34=_0x358e9a[_0x282e8e];return _0x2fed34;}export const USER_ID_FLAG={'name':a59_0x34490e(0x187),'type':a59_0x34490e(0x1a1),'required':!![],'description':a59_0x34490e(0x173)};function a59_0x358e(){const _0x566430=['expect-user-count','Pass\x20--role\x20<id|name>.','roleName','string','trim','250268HLpBOO','Run\x20`lovrabet\x20role\x20list`\x20or\x20pass\x20--role\x20<id>.','OWNER','filter','999633NbVPqX','map','flag','userCount','role','items','role-code','99336gmLfGA','userName','number','isSafeInteger','roleType','permitCount','Missing\x20runtime\x20role\x20reference.','Runtime\x20role\x20ID\x20returned\x20by\x20role\x20list','171XjONmg','Runtime\x20role\x20name\x20\x22','Globally\x20unique\x20roleCode\x20(maximum\x2064\x20characters)','ADMIN','24lbhTvb','Invalid\x20runtime\x20userId.','Role\x20ID\x20must\x20be\x20a\x20positive\x20integer.','paging','appCode','Runtime\x20userId\x20(string)','--role-code\x20cannot\x20exceed\x2064\x20characters.','\x20built-in\x20runtime\x20role\x20','length','Runtime\x20user\x20','roleCode','Cannot\x20','validation','\x20was\x20not\x20found\x20in\x20app\x20','Runtime\x20role\x20member\x20has\x20an\x20invalid\x20userId.','OWNER\x20runtime\x20role\x20membership\x20cannot\x20be\x20changed\x20with\x20this\x20command.','Transfer\x20or\x20manage\x20application\x20ownership\x20through\x20the\x20dedicated\x20application\x20workflow.','userList','Runtime\x20role\x20has\x20an\x20invalid\x20ID;\x20reload\x20roles\x20before\x20writing.','Runtime\x20role\x20','Use\x20a\x20userId\x20returned\x20by\x20the\x20current\x20application\x27s\x20personnel\x20list.','num','CUSTOM','Pass\x20one\x20role\x20ID:\x20','Run\x20`lovrabet\x20role\x20list`\x20and\x20use\x20a\x20role\x20from\x20the\x20current\x20app.','user','2399188WODOkE','userId','totalCount','find','user-add','Only\x20CUSTOM\x20runtime\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','str','\x22\x20is\x20ambiguous.','push','User\x20','applyUserList','992894PQmWUb','39357HiwPQL','--role-code\x20must\x20not\x20be\x20blank.','Reload\x20the\x20role\x20list\x20and\x20retry\x20after\x20the\x20server\x20state\x20is\x20consistent.','\x20is\x20not\x20in\x20runtime\x20role\x20','Reject\x20when\x20the\x20target\x20role\x20member\x20count\x20has\x20changed','includes','528485HnEmZZ','USER','Runtime\x20role\x20member\x20snapshot\x20has\x20an\x20invalid\x20role\x20ID;\x20reload\x20before\x20writing.','join'];a59_0x358e=function(){return _0x566430;};return a59_0x358e();}export const EXPECT_USER_COUNT_FLAG={'name':a59_0x34490e(0x19e),'type':a59_0x34490e(0x164),'description':a59_0x34490e(0x198)};export function isBuiltinRuntimeRole(_0x498237){const _0x301caf=a59_0x34490e;return BUILTIN_ROLE_TYPES[_0x301caf(0x199)](_0x498237);}export function assertCustomRuntimeRole(_0x2b43b7,_0x5f22bc){const _0x12594b=a59_0x34490e;if(_0x2b43b7['roleType']!==_0x12594b(0x184))throw CliErrors[_0x12594b(0x17a)](_0x12594b(0x179)+_0x5f22bc+_0x12594b(0x175)+_0x2b43b7['roleName']+'\x20('+_0x2b43b7[_0x12594b(0x166)]+').',_0x12594b(0x18d));}export function projectRuntimeRole(_0xcf236f){const _0x4fbbf2=a59_0x34490e;return{'id':_0xcf236f['id'],'roleCode':_0xcf236f[_0x4fbbf2(0x178)],'roleName':_0xcf236f[_0x4fbbf2(0x1a0)],'roleType':_0xcf236f[_0x4fbbf2(0x166)],'remark':_0xcf236f['remark'],'userCount':_0xcf236f[_0x4fbbf2(0x1aa)]??0x0,'permitCount':_0xcf236f[_0x4fbbf2(0x167)]??0x0,'builtin':isBuiltinRuntimeRole(_0xcf236f[_0x4fbbf2(0x166)])};}export function readOptionalRuntimeRoleCode(_0x21e0b3){const _0x4cfc02=a59_0x34490e,_0x9698b4=_0x21e0b3[_0x4cfc02(0x1a9)](_0x4cfc02(0x1ad));if(_0x9698b4===undefined||_0x9698b4===null)return undefined;const _0xd9ba87=String(_0x9698b4)['trim']();if(!_0xd9ba87)throw CliErrors[_0x4cfc02(0x17a)](_0x4cfc02(0x195));if(_0xd9ba87[_0x4cfc02(0x176)]>0x40)throw CliErrors['validation'](_0x4cfc02(0x174));return _0xd9ba87;}export async function getRuntimeRoleById(_0x3721bd,_0x228b98){const _0x49ba19=a59_0x34490e;if(!Number['isSafeInteger'](_0x228b98)||_0x228b98<=0x0)throw CliErrors[_0x49ba19(0x17a)](_0x49ba19(0x170));const _0xb092b4=(await listAllRuntimeRoles(_0x3721bd))[_0x49ba19(0x1a6)](_0x5d99ac=>_0x5d99ac['id']===_0x228b98&&(!_0x5d99ac['appCode']||_0x5d99ac[_0x49ba19(0x172)]===_0x3721bd));if(_0xb092b4[_0x49ba19(0x176)]!==0x1)throw CliErrors[_0x49ba19(0x17a)]('Runtime\x20role\x20id\x20'+_0x228b98+'\x20was\x20not\x20found\x20in\x20app\x20'+_0x3721bd+'.',_0x49ba19(0x186));const _0x36656a=_0xb092b4[0x0],_0x30f1dd=_0x36656a['id'];if(typeof _0x30f1dd!==_0x49ba19(0x164)||!Number[_0x49ba19(0x165)](_0x30f1dd)||_0x30f1dd<=0x0)throw CliErrors[_0x49ba19(0x17a)](_0x49ba19(0x180));return{..._0x36656a,'id':_0x30f1dd};}export async function listAllRuntimeRoles(_0x4db8bf,_0x6145e0={}){const _0x31553d=a59_0x34490e,_0x3130d9=0x64,_0x53ebf6=[];for(let _0x1f4fbe=0x1;;_0x1f4fbe+=0x1){const _0x24d6a7=await listRuntimeAppRoles(_0x4db8bf,{..._0x6145e0[_0x31553d(0x1a0)]?{'roleName':_0x6145e0['roleName']}:{},'currentPage':_0x1f4fbe,'pageSize':_0x3130d9});_0x53ebf6[_0x31553d(0x190)](..._0x24d6a7[_0x31553d(0x1ac)]);if(_0x24d6a7[_0x31553d(0x1ac)][_0x31553d(0x176)]<_0x3130d9||_0x24d6a7[_0x31553d(0x171)]&&_0x53ebf6[_0x31553d(0x176)]>=_0x24d6a7['paging'][_0x31553d(0x18a)])return _0x53ebf6;}}export async function resolveRuntimeRoleRef(_0x1ef94a,_0x572194){const _0x4107f0=a59_0x34490e,_0x195b9f=_0x572194['trim']();if(!_0x195b9f)throw CliErrors['validation'](_0x4107f0(0x168),_0x4107f0(0x19f));if(/^\d+$/['test'](_0x195b9f))return getRuntimeRoleById(_0x1ef94a,Number(_0x195b9f));const _0x31b681=(await listAllRuntimeRoles(_0x1ef94a))['filter'](_0x8a81e5=>_0x8a81e5['roleName']===_0x195b9f);if(_0x31b681['length']===0x0)throw CliErrors[_0x4107f0(0x17a)](_0x4107f0(0x16b)+_0x195b9f+'\x22\x20was\x20not\x20found\x20in\x20app\x20'+_0x1ef94a+'.',_0x4107f0(0x1a4));if(_0x31b681['length']>0x1)throw CliErrors['validation'](_0x4107f0(0x16b)+_0x195b9f+_0x4107f0(0x18f),_0x4107f0(0x185)+_0x31b681[_0x4107f0(0x1a8)](_0x546a05=>_0x546a05['id'])[_0x4107f0(0x19d)](',\x20')+'.');const _0x4db522=_0x31b681[0x0],_0x46b430=_0x4db522['id'];if(typeof _0x46b430!==_0x4107f0(0x164)||!Number[_0x4107f0(0x165)](_0x46b430)||_0x46b430<=0x0)throw CliErrors['validation'](_0x4107f0(0x180));return{..._0x4db522,'id':_0x46b430};}function parseRuntimeUserId(_0x55f6b3){const _0x4b46b1=a59_0x34490e,_0xd67f76=_0x55f6b3['trim'](),_0x1d81bf=normalizeRuntimeUserId(_0xd67f76);if(_0x1d81bf===undefined)throw CliErrors[_0x4b46b1(0x17a)](_0x4b46b1(0x16f),'Pass\x20--user\x20<userId>;\x20name\x20and\x20account\x20lookup\x20are\x20not\x20available\x20in\x20runtime\x20scope.');return _0x1d81bf;}export async function prepareRuntimeMemberMutation(_0x32e709,_0x10824a){const _0x58d311=a59_0x34490e,_0x43feec=await resolveRuntimeRoleRef(_0x32e709[_0x58d311(0x172)],_0x32e709[_0x58d311(0x18e)](_0x58d311(0x1ab)));if(_0x43feec[_0x58d311(0x166)]==='OWNER')throw CliErrors[_0x58d311(0x17a)](_0x58d311(0x17d),_0x58d311(0x17e));const _0x4c5d48=parseRuntimeUserId(_0x32e709[_0x58d311(0x18e)](_0x58d311(0x187))),_0x1bbd19=(await listRuntimeRoleUsers(_0x32e709[_0x58d311(0x172)]))[_0x58d311(0x1a8)](_0x40843b=>{const _0x4a3107=_0x58d311;if(typeof _0x40843b['id']!==_0x4a3107(0x164)||!Number['isSafeInteger'](_0x40843b['id'])||_0x40843b['id']<=0x0)throw CliErrors[_0x4a3107(0x17a)](_0x4a3107(0x19c));return{..._0x40843b,'userList':[..._0x40843b[_0x4a3107(0x17f)]??[]],'applyUserList':[..._0x40843b[_0x4a3107(0x192)]??[]]};}),_0x4d7844=_0x1bbd19[_0x58d311(0x18b)](_0x4161dc=>_0x4161dc['id']===_0x43feec['id']);if(!_0x4d7844)throw CliErrors[_0x58d311(0x17a)](_0x58d311(0x181)+_0x43feec['id']+'\x20is\x20missing\x20from\x20the\x20grouped\x20member\x20snapshot.',_0x58d311(0x196));const _0x5272fd=_0x380d73=>{const _0x3a5cd9=_0x58d311,_0x90e7e5=normalizeRuntimeUserId(_0x380d73);if(_0x90e7e5===undefined)throw CliErrors[_0x3a5cd9(0x17a)](_0x3a5cd9(0x17c));return _0x90e7e5;},_0xad39ad=_0x4d7844[_0x58d311(0x17f)][_0x58d311(0x1a8)](_0x3cd138=>_0x5272fd(_0x3cd138['userId'])),_0x52ba04=_0x32e709[_0x58d311(0x1a9)]('expect-user-count');if(_0x52ba04!==undefined&&_0x52ba04!==null&&_0x52ba04!==''){const _0x362bbe=_0x32e709[_0x58d311(0x183)](_0x58d311(0x19e));if(!Number[_0x58d311(0x165)](_0x362bbe)||_0x362bbe<0x0)throw CliErrors[_0x58d311(0x17a)]('--expect-user-count\x20must\x20be\x20a\x20non-negative\x20integer.');if(_0xad39ad[_0x58d311(0x176)]!==_0x362bbe)throw CliErrors[_0x58d311(0x17a)]('Runtime\x20role\x20member\x20count\x20changed:\x20expected\x20'+_0x362bbe+',\x20found\x20'+_0xad39ad[_0x58d311(0x176)]+'.','Read\x20the\x20current\x20members\x20and\x20retry\x20with\x20the\x20new\x20expected\x20count.');}const _0x14e634=_0xad39ad[_0x58d311(0x199)](_0x4c5d48),_0x392480=[];let _0x31ca19=!![];if(_0x10824a===_0x58d311(0x18c)){const _0x4ac3db=await listRuntimeAppUsers(_0x32e709[_0x58d311(0x172)]),_0x499c65=_0x4ac3db[_0x58d311(0x1a6)](_0x46e3e5=>normalizeRuntimeUserId(_0x46e3e5['code'])===_0x4c5d48);if(_0x499c65[_0x58d311(0x176)]!==0x1||!_0x499c65[0x0]['userName']?.[_0x58d311(0x1a2)]())throw CliErrors[_0x58d311(0x17a)](_0x58d311(0x177)+_0x4c5d48+_0x58d311(0x17b)+_0x32e709['appCode']+'.',_0x58d311(0x182));_0x14e634?(_0x31ca19=![],_0x392480[_0x58d311(0x190)]('User\x20'+_0x4c5d48+'\x20is\x20already\x20in\x20runtime\x20role\x20'+_0x43feec['id']+'.')):_0x4d7844[_0x58d311(0x17f)][_0x58d311(0x190)]({'userId':_0x4c5d48,'username':_0x499c65[0x0][_0x58d311(0x163)]});}else!_0x14e634?(_0x31ca19=![],_0x392480[_0x58d311(0x190)](_0x58d311(0x191)+_0x4c5d48+_0x58d311(0x197)+_0x43feec['id']+'.')):_0x4d7844['userList']=_0x4d7844[_0x58d311(0x17f)][_0x58d311(0x1a6)](_0x8edf09=>_0x5272fd(_0x8edf09[_0x58d311(0x189)])!==_0x4c5d48);return{'role':_0x43feec,'userId':_0x4c5d48,'roleList':_0x1bbd19,'before':{'userIds':_0xad39ad},'after':{'userIds':_0x4d7844[_0x58d311(0x17f)][_0x58d311(0x1a8)](_0x103b8f=>_0x5272fd(_0x103b8f[_0x58d311(0x189)]))},'shouldWrite':_0x31ca19,'warnings':_0x392480};}export function runtimeRoleWriteResult(_0x37fbc0,_0x4bb322,_0x50f0dd,_0x523006,_0x15b121,_0x2ba718=[]){return{'operation':_0x37fbc0,'scope':'runtime','selector':_0x4bb322,'before':_0x50f0dd,'after':_0x523006,'dryRun':![],'backend':_0x15b121,'warnings':_0x2ba718};}
|
|
1
|
+
function a59_0x581a(){const _0x9264f5=['2xBXHDU','421743YsBFVM','OWNER\x20runtime\x20role\x20membership\x20cannot\x20be\x20changed\x20with\x20this\x20command.','Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name','Transfer\x20or\x20manage\x20application\x20ownership\x20through\x20the\x20dedicated\x20application\x20workflow.','OWNER','Runtime\x20role\x20member\x20has\x20an\x20invalid\x20userId.','role-code','Globally\x20unique\x20roleCode\x20(maximum\x2064\x20characters)','paging','permitCount','Runtime\x20userId\x20(string)','validation','totalCount','ADMIN','28EvMrJH','trim','includes','runtime','test','399291KwxFLs','Invalid\x20runtime\x20userId.','userId','number','4120920cAUrvL','Runtime\x20role\x20has\x20an\x20invalid\x20ID;\x20reload\x20roles\x20before\x20writing.','Use\x20a\x20userId\x20returned\x20by\x20the\x20current\x20application\x27s\x20personnel\x20list.','Runtime\x20role\x20name\x20\x22','Missing\x20runtime\x20role\x20reference.','495444mXQzhm','find','Runtime\x20role\x20member\x20count\x20changed:\x20expected\x20','\x20was\x20not\x20found\x20in\x20app\x20','expect-user-count','roleCode','Run\x20`lovrabet\x20role\x20list`\x20or\x20pass\x20--role\x20<id>.','Cannot\x20','join','654572lHmPyI','--expect-user-count\x20must\x20be\x20a\x20non-negative\x20integer.','filter','userCount','string','USER','user-add','Reject\x20when\x20the\x20target\x20role\x20member\x20count\x20has\x20changed','Read\x20the\x20current\x20members\x20and\x20retry\x20with\x20the\x20new\x20expected\x20count.','map','length','Runtime\x20user\x20','roleType','Pass\x20--user\x20<userId>;\x20name\x20and\x20account\x20lookup\x20are\x20not\x20available\x20in\x20runtime\x20scope.','Runtime\x20role\x20id\x20','role','items','1718451UQpToR','userName','--role-code\x20must\x20not\x20be\x20blank.','86603jAYHuJ','Pass\x20--role\x20<id|name>.','5cFfWgE','appCode','430EYfTdH','num','\x20is\x20missing\x20from\x20the\x20grouped\x20member\x20snapshot.','remark','\x20is\x20already\x20in\x20runtime\x20role\x20','Runtime\x20role\x20member\x20snapshot\x20has\x20an\x20invalid\x20role\x20ID;\x20reload\x20before\x20writing.','\x22\x20is\x20ambiguous.','str','Runtime\x20role\x20ID\x20returned\x20by\x20role\x20list','flag','userList','push','8RBRUaf','isSafeInteger','user','\x20is\x20not\x20in\x20runtime\x20role\x20','\x22\x20was\x20not\x20found\x20in\x20app\x20','applyUserList','Role\x20ID\x20must\x20be\x20a\x20positive\x20integer.','roleName','Reload\x20the\x20role\x20list\x20and\x20retry\x20after\x20the\x20server\x20state\x20is\x20consistent.','Run\x20`lovrabet\x20role\x20list`\x20and\x20use\x20a\x20role\x20from\x20the\x20current\x20app.','Runtime\x20role\x20'];a59_0x581a=function(){return _0x9264f5;};return a59_0x581a();}const a59_0x4078d5=a59_0x5bf9;(function(_0x68215c,_0x92cb61){const _0x14e010=a59_0x5bf9,_0x4e625f=_0x68215c();while(!![]){try{const _0x39be52=parseInt(_0x14e010(0x1d5))/0x1+parseInt(_0x14e010(0x1d4))/0x2*(-parseInt(_0x14e010(0x1e8))/0x3)+parseInt(_0x14e010(0x1fa))/0x4*(-parseInt(_0x14e010(0x210))/0x5)+-parseInt(_0x14e010(0x1f1))/0x6*(-parseInt(_0x14e010(0x1e3))/0x7)+parseInt(_0x14e010(0x1c9))/0x8*(-parseInt(_0x14e010(0x20b))/0x9)+parseInt(_0x14e010(0x212))/0xa*(parseInt(_0x14e010(0x20e))/0xb)+-parseInt(_0x14e010(0x1ec))/0xc;if(_0x39be52===_0x92cb61)break;else _0x4e625f['push'](_0x4e625f['shift']());}catch(_0x49b64c){_0x4e625f['push'](_0x4e625f['shift']());}}}(a59_0x581a,0x3f5a1));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_0x4078d5(0x1e2),a59_0x4078d5(0x1ff),a59_0x4078d5(0x1d9),'CUSTOM'];const BUILTIN_ROLE_TYPES=[a59_0x4078d5(0x1e2),a59_0x4078d5(0x1ff),a59_0x4078d5(0x1d9)];function a59_0x5bf9(_0x45252a,_0x232630){_0x45252a=_0x45252a-0x1c9;const _0x581a1a=a59_0x581a();let _0x5bf9b5=_0x581a1a[_0x45252a];return _0x5bf9b5;}export const ROLE_ID_FLAG={'name':'id','type':a59_0x4078d5(0x1eb),'required':!![],'description':a59_0x4078d5(0x21a)};export const ROLE_REF_FLAG={'name':'role','type':a59_0x4078d5(0x1fe),'required':!![],'description':a59_0x4078d5(0x1d7)};export const ROLE_CODE_FLAG={'name':'role-code','type':'string','description':a59_0x4078d5(0x1dc)};export const USER_ID_FLAG={'name':'user','type':'string','required':!![],'description':a59_0x4078d5(0x1df)};export const EXPECT_USER_COUNT_FLAG={'name':a59_0x4078d5(0x1f5),'type':a59_0x4078d5(0x1eb),'description':a59_0x4078d5(0x201)};export function isBuiltinRuntimeRole(_0x46a8cf){return BUILTIN_ROLE_TYPES['includes'](_0x46a8cf);}export function assertCustomRuntimeRole(_0xd89983,_0x5e5e74){const _0x84bfc5=a59_0x4078d5;if(_0xd89983[_0x84bfc5(0x206)]!=='CUSTOM')throw CliErrors['validation'](_0x84bfc5(0x1f8)+_0x5e5e74+'\x20built-in\x20runtime\x20role\x20'+_0xd89983[_0x84bfc5(0x1d0)]+'\x20('+_0xd89983[_0x84bfc5(0x206)]+').','Only\x20CUSTOM\x20runtime\x20roles\x20can\x20be\x20modified\x20or\x20deleted.');}export function projectRuntimeRole(_0x80383e){const _0x46eb9a=a59_0x4078d5;return{'id':_0x80383e['id'],'roleCode':_0x80383e[_0x46eb9a(0x1f6)],'roleName':_0x80383e['roleName'],'roleType':_0x80383e['roleType'],'remark':_0x80383e[_0x46eb9a(0x215)],'userCount':_0x80383e[_0x46eb9a(0x1fd)]??0x0,'permitCount':_0x80383e[_0x46eb9a(0x1de)]??0x0,'builtin':isBuiltinRuntimeRole(_0x80383e[_0x46eb9a(0x206)])};}export function readOptionalRuntimeRoleCode(_0x416ef8){const _0x2d9a26=a59_0x4078d5,_0x4364b9=_0x416ef8[_0x2d9a26(0x21b)](_0x2d9a26(0x1db));if(_0x4364b9===undefined||_0x4364b9===null)return undefined;const _0x42963b=String(_0x4364b9)[_0x2d9a26(0x1e4)]();if(!_0x42963b)throw CliErrors[_0x2d9a26(0x1e0)](_0x2d9a26(0x20d));if(_0x42963b['length']>0x40)throw CliErrors[_0x2d9a26(0x1e0)]('--role-code\x20cannot\x20exceed\x2064\x20characters.');return _0x42963b;}export async function getRuntimeRoleById(_0x157076,_0x248426){const _0x4631d6=a59_0x4078d5;if(!Number[_0x4631d6(0x1ca)](_0x248426)||_0x248426<=0x0)throw CliErrors[_0x4631d6(0x1e0)](_0x4631d6(0x1cf));const _0x2fcd9c=(await listAllRuntimeRoles(_0x157076))['filter'](_0x3f0dc1=>_0x3f0dc1['id']===_0x248426&&(!_0x3f0dc1[_0x4631d6(0x211)]||_0x3f0dc1[_0x4631d6(0x211)]===_0x157076));if(_0x2fcd9c['length']!==0x1)throw CliErrors[_0x4631d6(0x1e0)](_0x4631d6(0x208)+_0x248426+'\x20was\x20not\x20found\x20in\x20app\x20'+_0x157076+'.',_0x4631d6(0x1d2));const _0x6d308c=_0x2fcd9c[0x0],_0x27099f=_0x6d308c['id'];if(typeof _0x27099f!==_0x4631d6(0x1eb)||!Number[_0x4631d6(0x1ca)](_0x27099f)||_0x27099f<=0x0)throw CliErrors[_0x4631d6(0x1e0)](_0x4631d6(0x1ed));return{..._0x6d308c,'id':_0x27099f};}export async function listAllRuntimeRoles(_0x48e4c0,_0x580885={}){const _0x39994e=a59_0x4078d5,_0x9b0b45=0x64,_0xbe07f4=[];for(let _0x4e31a3=0x1;;_0x4e31a3+=0x1){const _0x3bf5e0=await listRuntimeAppRoles(_0x48e4c0,{..._0x580885[_0x39994e(0x1d0)]?{'roleName':_0x580885['roleName']}:{},'currentPage':_0x4e31a3,'pageSize':_0x9b0b45});_0xbe07f4[_0x39994e(0x21d)](..._0x3bf5e0[_0x39994e(0x20a)]);if(_0x3bf5e0[_0x39994e(0x20a)][_0x39994e(0x204)]<_0x9b0b45||_0x3bf5e0['paging']&&_0xbe07f4[_0x39994e(0x204)]>=_0x3bf5e0[_0x39994e(0x1dd)][_0x39994e(0x1e1)])return _0xbe07f4;}}export async function resolveRuntimeRoleRef(_0x37d27e,_0x46f870){const _0x33c21=a59_0x4078d5,_0x360159=_0x46f870['trim']();if(!_0x360159)throw CliErrors[_0x33c21(0x1e0)](_0x33c21(0x1f0),_0x33c21(0x20f));if(/^\d+$/[_0x33c21(0x1e7)](_0x360159))return getRuntimeRoleById(_0x37d27e,Number(_0x360159));const _0x5025df=(await listAllRuntimeRoles(_0x37d27e))[_0x33c21(0x1fc)](_0x3f5c3b=>_0x3f5c3b[_0x33c21(0x1d0)]===_0x360159);if(_0x5025df[_0x33c21(0x204)]===0x0)throw CliErrors[_0x33c21(0x1e0)](_0x33c21(0x1ef)+_0x360159+_0x33c21(0x1cd)+_0x37d27e+'.',_0x33c21(0x1f7));if(_0x5025df['length']>0x1)throw CliErrors[_0x33c21(0x1e0)](_0x33c21(0x1ef)+_0x360159+_0x33c21(0x218),'Pass\x20one\x20role\x20ID:\x20'+_0x5025df[_0x33c21(0x203)](_0x1a8277=>_0x1a8277['id'])[_0x33c21(0x1f9)](',\x20')+'.');const _0x23e50e=_0x5025df[0x0],_0x2853ab=_0x23e50e['id'];if(typeof _0x2853ab!=='number'||!Number[_0x33c21(0x1ca)](_0x2853ab)||_0x2853ab<=0x0)throw CliErrors[_0x33c21(0x1e0)](_0x33c21(0x1ed));return{..._0x23e50e,'id':_0x2853ab};}function parseRuntimeUserId(_0x2891dc){const _0xcba80b=a59_0x4078d5,_0x2ff87c=_0x2891dc[_0xcba80b(0x1e4)](),_0x4ffcb6=normalizeRuntimeUserId(_0x2ff87c);if(_0x4ffcb6===undefined)throw CliErrors[_0xcba80b(0x1e0)](_0xcba80b(0x1e9),_0xcba80b(0x207));return _0x4ffcb6;}export async function prepareRuntimeMemberMutation(_0x1e5f42,_0x5c78c5){const _0xb7c7f=a59_0x4078d5,_0x28808e=await resolveRuntimeRoleRef(_0x1e5f42['appCode'],_0x1e5f42['str'](_0xb7c7f(0x209)));if(_0x28808e[_0xb7c7f(0x206)]===_0xb7c7f(0x1d9))throw CliErrors[_0xb7c7f(0x1e0)](_0xb7c7f(0x1d6),_0xb7c7f(0x1d8));const _0xfbc183=parseRuntimeUserId(_0x1e5f42[_0xb7c7f(0x219)](_0xb7c7f(0x1cb))),_0x447f6b=(await listRuntimeRoleUsers(_0x1e5f42[_0xb7c7f(0x211)]))[_0xb7c7f(0x203)](_0x5a1f54=>{const _0x4e1f04=_0xb7c7f;if(typeof _0x5a1f54['id']!=='number'||!Number[_0x4e1f04(0x1ca)](_0x5a1f54['id'])||_0x5a1f54['id']<=0x0)throw CliErrors['validation'](_0x4e1f04(0x217));return{..._0x5a1f54,'userList':[..._0x5a1f54[_0x4e1f04(0x21c)]??[]],'applyUserList':[..._0x5a1f54[_0x4e1f04(0x1ce)]??[]]};}),_0x38f4f5=_0x447f6b[_0xb7c7f(0x1f2)](_0x9aed76=>_0x9aed76['id']===_0x28808e['id']);if(!_0x38f4f5)throw CliErrors[_0xb7c7f(0x1e0)](_0xb7c7f(0x1d3)+_0x28808e['id']+_0xb7c7f(0x214),_0xb7c7f(0x1d1));const _0x2c9833=_0x3fd817=>{const _0x5b5950=_0xb7c7f,_0x522ab5=normalizeRuntimeUserId(_0x3fd817);if(_0x522ab5===undefined)throw CliErrors[_0x5b5950(0x1e0)](_0x5b5950(0x1da));return _0x522ab5;},_0x55f5a6=_0x38f4f5[_0xb7c7f(0x21c)]['map'](_0x1a2fc8=>_0x2c9833(_0x1a2fc8[_0xb7c7f(0x1ea)])),_0x46c087=_0x1e5f42[_0xb7c7f(0x21b)](_0xb7c7f(0x1f5));if(_0x46c087!==undefined&&_0x46c087!==null&&_0x46c087!==''){const _0xde3520=_0x1e5f42[_0xb7c7f(0x213)](_0xb7c7f(0x1f5));if(!Number['isSafeInteger'](_0xde3520)||_0xde3520<0x0)throw CliErrors['validation'](_0xb7c7f(0x1fb));if(_0x55f5a6[_0xb7c7f(0x204)]!==_0xde3520)throw CliErrors[_0xb7c7f(0x1e0)](_0xb7c7f(0x1f3)+_0xde3520+',\x20found\x20'+_0x55f5a6['length']+'.',_0xb7c7f(0x202));}const _0x5c54db=_0x55f5a6[_0xb7c7f(0x1e5)](_0xfbc183),_0x5edb50=[];let _0x7ff4da=!![];if(_0x5c78c5===_0xb7c7f(0x200)){const _0x58ecc1=await listRuntimeAppUsers(_0x1e5f42['appCode']),_0x4e5b6b=_0x58ecc1['filter'](_0x40b65b=>normalizeRuntimeUserId(_0x40b65b['code'])===_0xfbc183);if(_0x4e5b6b[_0xb7c7f(0x204)]!==0x1||!_0x4e5b6b[0x0][_0xb7c7f(0x20c)]?.[_0xb7c7f(0x1e4)]())throw CliErrors[_0xb7c7f(0x1e0)](_0xb7c7f(0x205)+_0xfbc183+_0xb7c7f(0x1f4)+_0x1e5f42[_0xb7c7f(0x211)]+'.',_0xb7c7f(0x1ee));_0x5c54db?(_0x7ff4da=![],_0x5edb50[_0xb7c7f(0x21d)]('User\x20'+_0xfbc183+_0xb7c7f(0x216)+_0x28808e['id']+'.')):_0x38f4f5[_0xb7c7f(0x21c)][_0xb7c7f(0x21d)]({'userId':_0xfbc183,'username':_0x4e5b6b[0x0][_0xb7c7f(0x20c)]});}else!_0x5c54db?(_0x7ff4da=![],_0x5edb50['push']('User\x20'+_0xfbc183+_0xb7c7f(0x1cc)+_0x28808e['id']+'.')):_0x38f4f5[_0xb7c7f(0x21c)]=_0x38f4f5['userList']['filter'](_0x908327=>_0x2c9833(_0x908327[_0xb7c7f(0x1ea)])!==_0xfbc183);return{'role':_0x28808e,'userId':_0xfbc183,'roleList':_0x447f6b,'before':{'userIds':_0x55f5a6},'after':{'userIds':_0x38f4f5[_0xb7c7f(0x21c)][_0xb7c7f(0x203)](_0x137ca5=>_0x2c9833(_0x137ca5[_0xb7c7f(0x1ea)]))},'shouldWrite':_0x7ff4da,'warnings':_0x5edb50};}export function runtimeRoleWriteResult(_0x3a1db1,_0x2fb1ec,_0x38e919,_0x510e9f,_0x42e95c,_0x173875=[]){const _0x5d0c12=a59_0x4078d5;return{'operation':_0x3a1db1,'scope':_0x5d0c12(0x1e6),'selector':_0x2fb1ec,'before':_0x38e919,'after':_0x510e9f,'dryRun':![],'backend':_0x42e95c,'warnings':_0x173875};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a60_0x380493=a60_0x1b67;(function(_0x41a7ff,_0x545482){const _0x245c27=a60_0x1b67,_0x588027=_0x41a7ff();while(!![]){try{const _0x483b6a=parseInt(_0x245c27(0x1ed))/0x1+parseInt(_0x245c27(0x1db))/0x2+-parseInt(_0x245c27(0x1d9))/0x3*(-parseInt(_0x245c27(0x1df))/0x4)+parseInt(_0x245c27(0x1e1))/0x5*(-parseInt(_0x245c27(0x1eb))/0x6)+-parseInt(_0x245c27(0x1f1))/0x7*(parseInt(_0x245c27(0x1e9))/0x8)+parseInt(_0x245c27(0x1f7))/0x9+-parseInt(_0x245c27(0x1e8))/0xa*(-parseInt(_0x245c27(0x1f6))/0xb);if(_0x483b6a===_0x545482)break;else _0x588027['push'](_0x588027['shift']());}catch(_0x5a5597){_0x588027['push'](_0x588027['shift']());}}}(a60_0x31f5,0x5b979));import{updateRuntimeAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';import{assertCustomRuntimeRole,getRuntimeRoleById,projectRuntimeRole,readOptionalRuntimeRoleCode,ROLE_CODE_FLAG,ROLE_ID_FLAG,runtimeRoleWriteResult}from'../../commands/role/shared.js';function a60_0x1b67(_0x2fc2e4,_0xc8f58){_0x2fc2e4=_0x2fc2e4-0x1d8;const _0x31f5c0=a60_0x31f5();let _0x1b6764=_0x31f5c0[_0x2fc2e4];return _0x1b6764;}function updateFields(_0x48360b){const _0x43919d=a60_0x1b67,_0x401297=_0x48360b[_0x43919d(0x1e2)](_0x43919d(0x1f3))!==undefined,_0x5600ba=_0x48360b[_0x43919d(0x1e2)](_0x43919d(0x1dd))!==undefined,_0x186901=_0x48360b[_0x43919d(0x1e2)]('remark')!==undefined;if(!_0x401297&&!_0x5600ba&&!_0x186901)throw CliErrors['validation'](_0x43919d(0x1e6));const _0x4b0598=readOptionalRuntimeRoleCode(_0x48360b),_0x211e76=_0x48360b[_0x43919d(0x1ef)](_0x43919d(0x1dd))[_0x43919d(0x1ea)](),_0x276148=_0x48360b[_0x43919d(0x1ef)](_0x43919d(0x1da))[_0x43919d(0x1ea)]();if(_0x5600ba&&!_0x211e76)throw CliErrors[_0x43919d(0x1dc)](_0x43919d(0x1de));if(_0x186901&&!_0x276148)throw CliErrors[_0x43919d(0x1dc)](_0x43919d(0x1d8),_0x43919d(0x1e5));return{..._0x4b0598?{'roleCode':_0x4b0598}:{},..._0x5600ba?{'roleName':_0x211e76}:{},..._0x186901?{'remark':_0x276148}:{}};}async function prepare(_0x29594f){const _0x129191=a60_0x1b67,_0x240a80=await getRuntimeRoleById(_0x29594f[_0x129191(0x1f2)],_0x29594f['num']('id'));return assertCustomRuntimeRole(_0x240a80,_0x129191(0x1e3)),{'role':_0x240a80,'body':{'id':_0x240a80['id'],'appCode':_0x29594f['appCode'],...updateFields(_0x29594f)}};}export const roleUpdate={'service':'role','command':a60_0x380493(0x1e3),'description':a60_0x380493(0x1ee),'risk':a60_0x380493(0x1e7),'confirmationDescription':a60_0x380493(0x1ec),'flags':[ROLE_ID_FLAG,ROLE_CODE_FLAG,{'name':a60_0x380493(0x1dd),'type':a60_0x380493(0x1e4),'description':'New\x20role\x20name'},{'name':a60_0x380493(0x1da),'type':'string','description':'New\x20non-empty\x20role\x20remark'}],async 'validate'(_0x58e5e1){updateFields(_0x58e5e1);},async 'dryRun'(_0x51844e){const _0x354698=a60_0x380493,{body:_0x160de9}=await prepare(_0x51844e);return dryRun(_0x354698(0x1f0),_0x354698(0x1f4))[_0x354698(0x1e0)](_0x160de9)['description'](_0x354698(0x1f5))['build']();},async 'execute'(_0x558b18){const _0x403045=a60_0x380493,{role:_0x53cee7,body:_0x1ed4ac}=await prepare(_0x558b18),_0x5612f0=await updateRuntimeAppRole(_0x1ed4ac);return{'ok':!![],'data':runtimeRoleWriteResult(_0x403045(0x1e3),{'roleId':_0x53cee7['id']},projectRuntimeRole(_0x53cee7),projectRuntimeRole(_0x5612f0),{'method':_0x403045(0x1f0),'path':'/client/permit/role/update'})};}};function a60_0x31f5(){const _0x5d81da=['body','565SuKUAX','flag','update','string','The\x20current\x20runtime\x20role\x20API\x20does\x20not\x20support\x20clearing\x20an\x20existing\x20remark.','Pass\x20--role-code,\x20--name,\x20or\x20--remark\x20to\x20update\x20the\x20runtime\x20role.','high-risk-write','10LWIBZz','24mGcsOH','trim','13278HYZgRf','Changes\x20the\x20custom\x20role\x20code,\x20name,\x20or\x20note\x20in\x20the\x20current\x20runtime\x20app.\x20The\x20role\x20updates\x20immediately.','428486esowON','Update\x20a\x20runtime\x20CUSTOM\x20role\x27s\x20code,\x20name,\x20or\x20remark','str','POST','660590FMkIGZ','appCode','role-code','/client/permit/role/update','Preview:\x20update\x20a\x20runtime\x20CUSTOM\x20role','2014837XsBNLN','981117gclfFN','--remark\x20must\x20not\x20be\x20blank.','122025WaDxFm','remark','131298jQHVrD','validation','name','--name\x20must\x20not\x20be\x20blank.','12ILZvXh'];a60_0x31f5=function(){return _0x5d81da;};return a60_0x31f5();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a61_0x25365b=a61_0x3fa9;function a61_0x3fa9(_0x38facc,_0x5b62b6){_0x38facc=_0x38facc-0xc4;const _0x7f89bc=a61_0x7f89();let _0x3fa990=_0x7f89bc[_0x38facc];return _0x3fa990;}function a61_0x7f89(){const _0x1281f2=['8QcskAy','Adds\x20the\x20given\x20runtime\x20user\x20to\x20the\x20target\x20role.\x20The\x20user\x20receives\x20the\x20permissions\x20of\x20that\x20role.','365625TwhdPt','12zDTdmb','userId','high-risk-write','roleList','279977ZqVPFO','2330881weMuLo','30VubuHp','shouldWrite','16BHVeUC','build','warnings','body','after','316668tAnbNC','Add\x20a\x20userId\x20to\x20one\x20runtime\x20role','1660380PUmGYa','3566694RLYPym','user-add','/client/permit/user-role/update-user-list','appCode','role','POST','15006013Besydf'];a61_0x7f89=function(){return _0x1281f2;};return a61_0x7f89();}(function(_0x5e871f,_0x22e662){const _0x12a37c=a61_0x3fa9,_0x532d09=_0x5e871f();while(!![]){try{const _0x4f8a57=parseInt(_0x12a37c(0xd3))/0x1+-parseInt(_0x12a37c(0xdc))/0x2*(-parseInt(_0x12a37c(0xcf))/0x3)+-parseInt(_0x12a37c(0xcc))/0x4*(parseInt(_0x12a37c(0xc4))/0x5)+-parseInt(_0x12a37c(0xc5))/0x6+-parseInt(_0x12a37c(0xd4))/0x7*(parseInt(_0x12a37c(0xd7))/0x8)+-parseInt(_0x12a37c(0xce))/0x9*(-parseInt(_0x12a37c(0xd5))/0xa)+parseInt(_0x12a37c(0xcb))/0xb;if(_0x4f8a57===_0x22e662)break;else _0x532d09['push'](_0x532d09['shift']());}catch(_0x50b26b){_0x532d09['push'](_0x532d09['shift']());}}}(a61_0x7f89,0x73eb4));import{updateRuntimeRoleUsers}from'../../core/api-client.js';import{dryRun}from'../../framework/dryrun.js';import{EXPECT_USER_COUNT_FLAG,prepareRuntimeMemberMutation,ROLE_REF_FLAG,runtimeRoleWriteResult,USER_ID_FLAG}from'../../commands/role/shared.js';export const roleUserAdd={'service':'role','command':a61_0x25365b(0xc6),'description':a61_0x25365b(0xdd),'risk':a61_0x25365b(0xd1),'confirmationDescription':a61_0x25365b(0xcd),'flags':[ROLE_REF_FLAG,USER_ID_FLAG,EXPECT_USER_COUNT_FLAG],async 'dryRun'(_0x13498c){const _0x36d03c=a61_0x25365b,_0x2d9e89=await prepareRuntimeMemberMutation(_0x13498c,_0x36d03c(0xc6));return dryRun(_0x36d03c(0xca),'/client/permit/user-role/update-user-list')[_0x36d03c(0xda)]({'appCode':_0x13498c[_0x36d03c(0xc8)],'roleList':_0x2d9e89[_0x36d03c(0xd2)]})['description'](_0x2d9e89[_0x36d03c(0xd6)]?'Preview:\x20add\x20runtime\x20role\x20member':_0x2d9e89[_0x36d03c(0xd9)][0x0])[_0x36d03c(0xd8)]();},async 'execute'(_0x6ab569){const _0x562c8c=a61_0x25365b,_0x1b21bf=await prepareRuntimeMemberMutation(_0x6ab569,_0x562c8c(0xc6));return _0x1b21bf[_0x562c8c(0xd6)]&&await updateRuntimeRoleUsers(_0x6ab569[_0x562c8c(0xc8)],_0x1b21bf[_0x562c8c(0xd2)]),{'ok':!![],'data':runtimeRoleWriteResult(_0x562c8c(0xc6),{'roleId':_0x1b21bf[_0x562c8c(0xc9)]['id'],'userId':_0x1b21bf[_0x562c8c(0xd0)]},_0x1b21bf['before'],_0x1b21bf[_0x562c8c(0xdb)],{'method':_0x562c8c(0xca),'path':_0x562c8c(0xc7)},_0x1b21bf[_0x562c8c(0xd9)])};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a62_0x74cd8a=a62_0x194c;(function(_0x16e6a5,_0x4656d0){const _0x121632=a62_0x194c,_0x11e23c=_0x16e6a5();while(!![]){try{const _0x2279b5=-parseInt(_0x121632(0x1c7))/0x1+-parseInt(_0x121632(0x1bc))/0x2+-parseInt(_0x121632(0x1bb))/0x3*(parseInt(_0x121632(0x1c4))/0x4)+-parseInt(_0x121632(0x1ca))/0x5+-parseInt(_0x121632(0x1cc))/0x6*(-parseInt(_0x121632(0x1b8))/0x7)+-parseInt(_0x121632(0x1cb))/0x8+parseInt(_0x121632(0x1be))/0x9*(parseInt(_0x121632(0x1c1))/0xa);if(_0x2279b5===_0x4656d0)break;else _0x11e23c['push'](_0x11e23c['shift']());}catch(_0x230c74){_0x11e23c['push'](_0x11e23c['shift']());}}}(a62_0x4420,0x1da61));import{updateRuntimeRoleUsers}from'../../core/api-client.js';function a62_0x4420(){const _0x5acaa6=['appCode','40NVUnHe','build','shouldWrite','27746TtxZZn','role','roleList','871610xKArGQ','1378920enloXn','111906ObMLMb','Preview:\x20remove\x20runtime\x20role\x20member','userId','warnings','body','28scnaiy','/client/permit/user-role/update-user-list','Removes\x20the\x20given\x20runtime\x20user\x20from\x20the\x20target\x20role.\x20The\x20user\x20loses\x20permissions\x20granted\x20only\x20by\x20that\x20role.','65586VgiMED','15014jBndQV','high-risk-write','81kBDKpA','user-remove','POST','719330ICMxtX','Remove\x20a\x20userId\x20from\x20one\x20runtime\x20role'];a62_0x4420=function(){return _0x5acaa6;};return a62_0x4420();}function a62_0x194c(_0x2ba622,_0x1bdb76){_0x2ba622=_0x2ba622-0x1b7;const _0x44206b=a62_0x4420();let _0x194c4=_0x44206b[_0x2ba622];return _0x194c4;}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_0x74cd8a(0x1c8),'command':a62_0x74cd8a(0x1bf),'description':a62_0x74cd8a(0x1c2),'risk':a62_0x74cd8a(0x1bd),'confirmationDescription':a62_0x74cd8a(0x1ba),'flags':[ROLE_REF_FLAG,USER_ID_FLAG,EXPECT_USER_COUNT_FLAG],async 'dryRun'(_0xbb9a49){const _0x1e83d4=a62_0x74cd8a,_0x4bcf5a=await prepareRuntimeMemberMutation(_0xbb9a49,_0x1e83d4(0x1bf));return dryRun(_0x1e83d4(0x1c0),_0x1e83d4(0x1b9))[_0x1e83d4(0x1b7)]({'appCode':_0xbb9a49[_0x1e83d4(0x1c3)],'roleList':_0x4bcf5a[_0x1e83d4(0x1c9)]})['description'](_0x4bcf5a[_0x1e83d4(0x1c6)]?_0x1e83d4(0x1cd):_0x4bcf5a[_0x1e83d4(0x1cf)][0x0])[_0x1e83d4(0x1c5)]();},async 'execute'(_0x2d721c){const _0x1bd581=a62_0x74cd8a,_0x583e2e=await prepareRuntimeMemberMutation(_0x2d721c,'user-remove');return _0x583e2e['shouldWrite']&&await updateRuntimeRoleUsers(_0x2d721c[_0x1bd581(0x1c3)],_0x583e2e[_0x1bd581(0x1c9)]),{'ok':!![],'data':runtimeRoleWriteResult(_0x1bd581(0x1bf),{'roleId':_0x583e2e['role']['id'],'userId':_0x583e2e[_0x1bd581(0x1ce)]},_0x583e2e['before'],_0x583e2e['after'],{'method':_0x1bd581(0x1c0),'path':_0x1bd581(0x1b9)},_0x583e2e[_0x1bd581(0x1cf)])};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a63_0x4bac27=a63_0x351d;(function(_0x9552b5,_0x2cc8fa){const _0x237ba4=a63_0x351d,_0x3afd9e=_0x9552b5();while(!![]){try{const _0x47982e=-parseInt(_0x237ba4(0x170))/0x1*(-parseInt(_0x237ba4(0x199))/0x2)+parseInt(_0x237ba4(0x190))/0x3+parseInt(_0x237ba4(0x187))/0x4*(-parseInt(_0x237ba4(0x172))/0x5)+parseInt(_0x237ba4(0x166))/0x6*(parseInt(_0x237ba4(0x14f))/0x7)+parseInt(_0x237ba4(0x152))/0x8*(parseInt(_0x237ba4(0x186))/0x9)+-parseInt(_0x237ba4(0x159))/0xa*(parseInt(_0x237ba4(0x16d))/0xb)+parseInt(_0x237ba4(0x189))/0xc*(-parseInt(_0x237ba4(0x198))/0xd);if(_0x47982e===_0x2cc8fa)break;else _0x3afd9e['push'](_0x3afd9e['shift']());}catch(_0x2fb9be){_0x3afd9e['push'](_0x3afd9e['shift']());}}}(a63_0x1ac1,0x413e2));import{createRuntimeSchedule,deleteRuntimeSchedule,getRuntimeSchedule,listRuntimeSchedules,runRuntimeSchedule,validateRuntimeSchedule}from'../../core/api-client.js';function a63_0x351d(_0x345050,_0x355985){_0x345050=_0x345050-0x148;const _0x1ac12f=a63_0x1ac1();let _0x351d87=_0x1ac12f[_0x345050];return _0x351d87;}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_0x4bac27(0x178),'type':a63_0x4bac27(0x164),'required':!![],'enum':['CRON',a63_0x4bac27(0x197)],'description':a63_0x4bac27(0x184)},CRON_FLAG={'name':a63_0x4bac27(0x169),'type':a63_0x4bac27(0x164),'description':a63_0x4bac27(0x162)},SCHEDULED_AT_FLAG={'name':'scheduled-at','type':'string','description':a63_0x4bac27(0x195)},TITLE_FLAG={'name':a63_0x4bac27(0x18b),'type':a63_0x4bac27(0x164),'required':!![],'description':a63_0x4bac27(0x188)},PROMPT_FLAG={'name':a63_0x4bac27(0x181),'type':a63_0x4bac27(0x164),'required':!![],'description':a63_0x4bac27(0x148)},MODEL_FLAG={'name':'model','type':a63_0x4bac27(0x164),'enum':[a63_0x4bac27(0x15e),a63_0x4bac27(0x171),a63_0x4bac27(0x17d)],'default':'deepseek-v4-flash-0731','description':a63_0x4bac27(0x168)},SCHEDULE_ID_FLAG={'name':a63_0x4bac27(0x193),'type':'string','required':!![],'description':a63_0x4bac27(0x18c),'pattern':{'regex':SCHEDULE_ID_PATTERN,'description':a63_0x4bac27(0x157)}},LIMIT_FLAG={'name':a63_0x4bac27(0x150),'type':a63_0x4bac27(0x15a),'default':0x14,'description':a63_0x4bac27(0x19a)},CURSOR_FLAG={'name':'cursor','type':'string','description':a63_0x4bac27(0x191)},INPUT_FLAGS=[KIND_FLAG,CRON_FLAG,SCHEDULED_AT_FLAG,TITLE_FLAG,PROMPT_FLAG,MODEL_FLAG];function readScheduleInput(_0x7e6747){const _0x3ec498=a63_0x4bac27,_0x4cc8a4=_0x7e6747[_0x3ec498(0x16c)](_0x3ec498(0x178)),_0x645a31=_0x7e6747[_0x3ec498(0x16c)]('title')['trim'](),_0x2b8b37=_0x7e6747[_0x3ec498(0x16c)]('prompt')[_0x3ec498(0x154)](),_0x20c340=_0x7e6747[_0x3ec498(0x16c)](_0x3ec498(0x16b)),_0x3672aa=_0x7e6747[_0x3ec498(0x16c)](_0x3ec498(0x169)),_0x15077a=_0x7e6747[_0x3ec498(0x16c)](_0x3ec498(0x180));if(!_0x645a31)throw CliErrors[_0x3ec498(0x14a)](_0x3ec498(0x177));if(!_0x2b8b37)throw CliErrors[_0x3ec498(0x14a)](_0x3ec498(0x16e));if(_0x4cc8a4===_0x3ec498(0x182)){if(!_0x3672aa||_0x15077a)throw CliErrors[_0x3ec498(0x14a)](_0x3ec498(0x149));return{'kind':_0x4cc8a4,'timezone':_0x3ec498(0x17f),'cron':_0x3672aa,'title':_0x645a31,'prompt':_0x2b8b37,'model':_0x20c340};}if(_0x4cc8a4==='ONCE'){if(!_0x15077a||_0x3672aa)throw CliErrors[_0x3ec498(0x14a)](_0x3ec498(0x194));return{'kind':_0x4cc8a4,'timezone':_0x3ec498(0x17f),'scheduledAt':_0x15077a,'title':_0x645a31,'prompt':_0x2b8b37,'model':_0x20c340};}throw CliErrors['validation'](_0x3ec498(0x160));}function scheduleCollectionPath(_0x33a007){const _0x214ae5=a63_0x4bac27;return _0x214ae5(0x14c)+encodeURIComponent(_0x33a007)+_0x214ae5(0x15b);}function a63_0x1ac1(){const _0x389ea8=['body','UTC','scheduled-at','prompt','CRON','POST','Schedule\x20kind:\x20CRON\x20or\x20ONCE','cursor','468rxmbWG','373444kwrHAA','Schedule\x20title','2446104qHaLNw','Deleted\x20schedule\x20','title','Schedule\x20UUID','/run','build','appCode','837468dgffcF','Opaque\x20nextCursor\x20returned\x20by\x20the\x20previous\x20list\x20call','Ignores\x20the\x20original\x20trigger\x20time,\x20runs\x20the\x20schedule\x20once\x20now,\x20and\x20creates\x20a\x20new\x20Agent\x20Task.','schedule-id','ONCE\x20schedules\x20require\x20--scheduled-at\x20and\x20do\x20not\x20accept\x20--cron.','Canonical\x20UTC\x20ISO\x20datetime\x20for\x20ONCE\x20schedules','taskId','ONCE','39csZunP','2TVmxTH','Page\x20size\x20from\x201\x20to\x20100','Prompt\x20sent\x20to\x20the\x20Agent\x20when\x20the\x20schedule\x20runs','CRON\x20schedules\x20require\x20--cron\x20and\x20do\x20not\x20accept\x20--scheduled-at.','validation','length','/api/harness/apps/','high-risk-write','Created\x20','14pSPckn','limit','Show\x20one\x20schedule\x20by\x20schedule\x20ID','37432jygjSb','schedule','trim','\x20schedule\x20','description','a\x20UUID\x20returned\x20by\x20schedule\x20create/list','DELETE','1440ecLowV','number','/schedules','read','Validate\x20a\x20UTC\x20schedule\x20without\x20creating\x20it','kimi/k3','List\x20current\x20user\x27s\x20schedules\x20for\x20the\x20current\x20app','--kind\x20must\x20be\x20CRON\x20or\x20ONCE.','Create\x20a\x20recurring\x20or\x20one-shot\x20Agent\x20schedule','Five-field\x20UTC\x20cron\x20expression\x20for\x20CRON\x20schedules','validate','string','list','633234LlwIXg','Preview:\x20run\x20schedule\x20','Task\x20model\x20used\x20when\x20the\x20schedule\x20runs','cron','\x20immediately','model','str','8921iNbjrj','--prompt\x20must\x20not\x20be\x20blank.','create','355363IABLpi','deepseek-v4-flash-0731','5vWAAgm','Queued\x20Task\x20','Run\x20the\x20schedule\x20once\x20immediately\x20and\x20create\x20a\x20Task','scheduleId','Creates\x20a\x20schedule\x20in\x20the\x20current\x20app\x20that\x20can\x20auto-trigger\x20an\x20Agent.\x20At\x20the\x20scheduled\x20time\x20a\x20Task\x20is\x20created\x20and\x20run.','--title\x20must\x20not\x20be\x20blank.','kind','Permanently\x20deletes\x20the\x20schedule\x20and\x20stops\x20future\x20auto-triggers.\x20Historical\x20Tasks\x20already\x20created\x20are\x20not\x20affected.','detail','--limit\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.','num','deepseek-v4-pro-0813'];a63_0x1ac1=function(){return _0x389ea8;};return a63_0x1ac1();}function scheduleItemPath(_0x4d785b,_0xfd4a70){return scheduleCollectionPath(_0x4d785b)+'/'+encodeURIComponent(_0xfd4a70);}const scheduleValidate={'service':a63_0x4bac27(0x153),'command':a63_0x4bac27(0x163),'description':a63_0x4bac27(0x15d),'risk':a63_0x4bac27(0x15c),'flags':INPUT_FLAGS,async 'validate'(_0x537815){readScheduleInput(_0x537815);},async 'execute'(_0x4d6dac){const _0x201b6b=a63_0x4bac27,_0x1e67ff=readScheduleInput(_0x4d6dac),_0x2a151a=await validateRuntimeSchedule(_0x4d6dac[_0x201b6b(0x18f)],_0x1e67ff);return{'ok':!![],'data':_0x2a151a,'message':'Schedule\x20input\x20is\x20valid'};}},scheduleCreate={'service':a63_0x4bac27(0x153),'command':a63_0x4bac27(0x16f),'description':a63_0x4bac27(0x161),'risk':a63_0x4bac27(0x14d),'confirmationDescription':a63_0x4bac27(0x176),'flags':INPUT_FLAGS,async 'validate'(_0x3edffd){readScheduleInput(_0x3edffd);},async 'execute'(_0x321a77){const _0x189aeb=a63_0x4bac27,_0x231b33=readScheduleInput(_0x321a77),_0x477864=await validateRuntimeSchedule(_0x321a77[_0x189aeb(0x18f)],_0x231b33),_0x3ca771=await createRuntimeSchedule(_0x321a77['appCode'],_0x477864);return{'ok':!![],'data':_0x3ca771,'message':_0x189aeb(0x14e)+_0x3ca771[_0x189aeb(0x178)]+_0x189aeb(0x155)+_0x3ca771[_0x189aeb(0x175)]};},async 'dryRun'(_0x2db952){const _0xd1132b=a63_0x4bac27,_0x9e5d1b=readScheduleInput(_0x2db952);return dryRun(_0xd1132b(0x183),scheduleCollectionPath(_0x2db952[_0xd1132b(0x18f)]))[_0xd1132b(0x17e)](_0x9e5d1b)[_0xd1132b(0x156)]('Preview:\x20create\x20an\x20Agent\x20schedule')[_0xd1132b(0x18e)]();}},scheduleList={'service':'schedule','command':a63_0x4bac27(0x165),'description':a63_0x4bac27(0x15f),'risk':a63_0x4bac27(0x15c),'flags':[KIND_FLAG,LIMIT_FLAG,CURSOR_FLAG],async 'validate'(_0x52b500){const _0x355227=a63_0x4bac27,_0x2740a4=_0x52b500[_0x355227(0x17c)]('limit');if(!Number['isSafeInteger'](_0x2740a4)||_0x2740a4<0x1||_0x2740a4>0x64)throw CliErrors[_0x355227(0x14a)](_0x355227(0x17b));const _0x3991aa=_0x52b500[_0x355227(0x16c)](_0x355227(0x185));if(_0x3991aa&&(_0x3991aa[_0x355227(0x14b)]>0x400||_0x3991aa[_0x355227(0x154)]()!==_0x3991aa))throw CliErrors[_0x355227(0x14a)]('--cursor\x20must\x20be\x20the\x20unchanged\x20nextCursor\x20from\x20schedule\x20list.');},async 'execute'(_0x51f405){const _0x3f0358=a63_0x4bac27,_0x1b2e8c=_0x51f405[_0x3f0358(0x16c)](_0x3f0358(0x185)),_0x55a114=await listRuntimeSchedules(_0x51f405[_0x3f0358(0x18f)],{'kind':_0x51f405[_0x3f0358(0x16c)](_0x3f0358(0x178)),'limit':_0x51f405['num'](_0x3f0358(0x150)),..._0x1b2e8c?{'cursor':_0x1b2e8c}:{}});return{'ok':!![],'data':_0x55a114};}},scheduleDetail={'service':a63_0x4bac27(0x153),'command':a63_0x4bac27(0x17a),'description':a63_0x4bac27(0x151),'risk':a63_0x4bac27(0x15c),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x5cbd4c){const _0x3a8475=a63_0x4bac27,_0x14d6f8=await getRuntimeSchedule(_0x5cbd4c[_0x3a8475(0x18f)],_0x5cbd4c['str'](_0x3a8475(0x193)));return{'ok':!![],'data':_0x14d6f8};}},scheduleRun={'service':a63_0x4bac27(0x153),'command':'run','description':a63_0x4bac27(0x174),'risk':'high-risk-write','confirmationDescription':a63_0x4bac27(0x192),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0xcfb5b0){const _0x127998=a63_0x4bac27,_0x5d982b=_0xcfb5b0[_0x127998(0x16c)](_0x127998(0x193)),_0x35afbe=await runRuntimeSchedule(_0xcfb5b0[_0x127998(0x18f)],_0x5d982b);return{'ok':!![],'data':_0x35afbe,'message':_0x127998(0x173)+_0x35afbe[_0x127998(0x196)]+'\x20from\x20schedule\x20'+_0x5d982b};},async 'dryRun'(_0x53a8d3){const _0x27dbeb=a63_0x4bac27,_0x221b6b=_0x53a8d3[_0x27dbeb(0x16c)](_0x27dbeb(0x193));return dryRun(_0x27dbeb(0x183),scheduleItemPath(_0x53a8d3[_0x27dbeb(0x18f)],_0x221b6b)+_0x27dbeb(0x18d))[_0x27dbeb(0x156)](_0x27dbeb(0x167)+_0x221b6b+_0x27dbeb(0x16a))['build']();}},scheduleDelete={'service':a63_0x4bac27(0x153),'command':'delete','description':'Delete\x20the\x20schedule\x20and\x20stop\x20future\x20triggers','risk':'high-risk-write','confirmationDescription':a63_0x4bac27(0x179),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x5ddf38){const _0x5cc1fe=a63_0x4bac27,_0x457fa8=_0x5ddf38['str'](_0x5cc1fe(0x193)),_0x38e07a=await deleteRuntimeSchedule(_0x5ddf38[_0x5cc1fe(0x18f)],_0x457fa8);return{'ok':!![],'data':_0x38e07a,'message':_0x5cc1fe(0x18a)+_0x457fa8};},async 'dryRun'(_0x461bec){const _0x4e6a43=a63_0x4bac27,_0x52c0f6=_0x461bec[_0x4e6a43(0x16c)]('schedule-id');return dryRun(_0x4e6a43(0x158),scheduleItemPath(_0x461bec[_0x4e6a43(0x18f)],_0x52c0f6))[_0x4e6a43(0x156)]('Preview:\x20delete\x20schedule\x20'+_0x52c0f6)['build']();}};export const scheduleDefinitions=[scheduleValidate,scheduleCreate,scheduleList,scheduleDetail,scheduleRun,scheduleDelete];
|
|
1
|
+
const a63_0x3939d6=a63_0x4fef;(function(_0x2a7eda,_0x6b271d){const _0x1d1d8c=a63_0x4fef,_0x174e8a=_0x2a7eda();while(!![]){try{const _0x38bfbe=parseInt(_0x1d1d8c(0xb8))/0x1*(-parseInt(_0x1d1d8c(0x95))/0x2)+parseInt(_0x1d1d8c(0xa6))/0x3+parseInt(_0x1d1d8c(0x9f))/0x4+parseInt(_0x1d1d8c(0x73))/0x5+-parseInt(_0x1d1d8c(0xbc))/0x6+parseInt(_0x1d1d8c(0x94))/0x7+parseInt(_0x1d1d8c(0x75))/0x8*(parseInt(_0x1d1d8c(0x8f))/0x9);if(_0x38bfbe===_0x6b271d)break;else _0x174e8a['push'](_0x174e8a['shift']());}catch(_0x120e01){_0x174e8a['push'](_0x174e8a['shift']());}}}(a63_0x2a42,0xa79dc));import{createRuntimeSchedule,deleteRuntimeSchedule,getRuntimeSchedule,listRuntimeSchedules,runRuntimeSchedule,validateRuntimeSchedule}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';function a63_0x2a42(){const _0x29e56f=['description','2180751XSVRGi','kind','num','Five-field\x20UTC\x20cron\x20expression\x20for\x20CRON\x20schedules','str','kimi/k3','appCode','List\x20current\x20user\x27s\x20schedules\x20for\x20the\x20current\x20app','Show\x20one\x20schedule\x20by\x20schedule\x20ID','ONCE','cursor','CRON','limit','Delete\x20the\x20schedule\x20and\x20stop\x20future\x20triggers','CRON\x20schedules\x20require\x20--cron\x20and\x20do\x20not\x20accept\x20--scheduled-at.','--prompt\x20must\x20not\x20be\x20blank.','DELETE','deepseek-v4-flash-0731','95geiKDc','Schedule\x20kind:\x20CRON\x20or\x20ONCE','/api/harness/apps/','--title\x20must\x20not\x20be\x20blank.','4125396FXmuYJ','string','789830UlfHDh','Preview:\x20create\x20an\x20Agent\x20schedule','8ysJIbr','Deleted\x20schedule\x20','Validate\x20a\x20UTC\x20schedule\x20without\x20creating\x20it','model','length','schedule','Prompt\x20sent\x20to\x20the\x20Agent\x20when\x20the\x20schedule\x20runs','run','POST','Task\x20model\x20used\x20when\x20the\x20schedule\x20runs','Preview:\x20run\x20schedule\x20','/schedules','/run','taskId','Queued\x20Task\x20','scheduled-at','number','delete','Schedule\x20input\x20is\x20valid','isSafeInteger','Creates\x20a\x20schedule\x20in\x20the\x20current\x20app\x20that\x20can\x20auto-trigger\x20an\x20Agent.\x20At\x20the\x20scheduled\x20time\x20a\x20Task\x20is\x20created\x20and\x20run.','Permanently\x20deletes\x20the\x20schedule\x20and\x20stops\x20future\x20auto-triggers.\x20Historical\x20Tasks\x20already\x20created\x20are\x20not\x20affected.','\x20from\x20schedule\x20','create','--cursor\x20must\x20be\x20the\x20unchanged\x20nextCursor\x20from\x20schedule\x20list.','ONCE\x20schedules\x20require\x20--scheduled-at\x20and\x20do\x20not\x20accept\x20--cron.','10025739CAfCjN','Canonical\x20UTC\x20ISO\x20datetime\x20for\x20ONCE\x20schedules','read','Created\x20','Run\x20the\x20schedule\x20once\x20immediately\x20and\x20create\x20a\x20Task','3814300iEXOem','27768YhEkzS','validation','--kind\x20must\x20be\x20CRON\x20or\x20ONCE.','prompt','Ignores\x20the\x20original\x20trigger\x20time,\x20runs\x20the\x20schedule\x20once\x20now,\x20and\x20creates\x20a\x20new\x20Agent\x20Task.','list','cron','trim','scheduleId','body','597392OdPbuk','schedule-id','high-risk-write','UTC','title','a\x20UUID\x20returned\x20by\x20schedule\x20create/list'];a63_0x2a42=function(){return _0x29e56f;};return a63_0x2a42();}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_0x3939d6(0xa7),'type':a63_0x3939d6(0xbd),'required':!![],'enum':[a63_0x3939d6(0xb1),a63_0x3939d6(0xaf)],'description':a63_0x3939d6(0xb9)},CRON_FLAG={'name':'cron','type':a63_0x3939d6(0xbd),'description':a63_0x3939d6(0xa9)},SCHEDULED_AT_FLAG={'name':a63_0x3939d6(0x84),'type':a63_0x3939d6(0xbd),'description':a63_0x3939d6(0x90)},TITLE_FLAG={'name':a63_0x3939d6(0xa3),'type':a63_0x3939d6(0xbd),'required':!![],'description':'Schedule\x20title'},PROMPT_FLAG={'name':a63_0x3939d6(0x98),'type':a63_0x3939d6(0xbd),'required':!![],'description':a63_0x3939d6(0x7b)},MODEL_FLAG={'name':a63_0x3939d6(0x78),'type':a63_0x3939d6(0xbd),'enum':[a63_0x3939d6(0xab),a63_0x3939d6(0xb7),'deepseek-v4-pro-0813'],'default':a63_0x3939d6(0xb7),'description':a63_0x3939d6(0x7e)},SCHEDULE_ID_FLAG={'name':'schedule-id','type':'string','required':!![],'description':'Schedule\x20UUID','pattern':{'regex':SCHEDULE_ID_PATTERN,'description':a63_0x3939d6(0xa4)}},LIMIT_FLAG={'name':a63_0x3939d6(0xb2),'type':a63_0x3939d6(0x85),'default':0x14,'description':'Page\x20size\x20from\x201\x20to\x20100'},CURSOR_FLAG={'name':a63_0x3939d6(0xb0),'type':a63_0x3939d6(0xbd),'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(_0x1f9efe){const _0x562d66=a63_0x3939d6,_0x50ecc3=_0x1f9efe[_0x562d66(0xaa)](_0x562d66(0xa7)),_0x2c98f3=_0x1f9efe[_0x562d66(0xaa)](_0x562d66(0xa3))[_0x562d66(0x9c)](),_0x2e6f7c=_0x1f9efe[_0x562d66(0xaa)](_0x562d66(0x98))[_0x562d66(0x9c)](),_0x201a34=_0x1f9efe[_0x562d66(0xaa)](_0x562d66(0x78)),_0xa95055=_0x1f9efe[_0x562d66(0xaa)](_0x562d66(0x9b)),_0x45509e=_0x1f9efe[_0x562d66(0xaa)](_0x562d66(0x84));if(!_0x2c98f3)throw CliErrors[_0x562d66(0x96)](_0x562d66(0xbb));if(!_0x2e6f7c)throw CliErrors['validation'](_0x562d66(0xb5));if(_0x50ecc3===_0x562d66(0xb1)){if(!_0xa95055||_0x45509e)throw CliErrors[_0x562d66(0x96)](_0x562d66(0xb4));return{'kind':_0x50ecc3,'timezone':_0x562d66(0xa2),'cron':_0xa95055,'title':_0x2c98f3,'prompt':_0x2e6f7c,'model':_0x201a34};}if(_0x50ecc3==='ONCE'){if(!_0x45509e||_0xa95055)throw CliErrors[_0x562d66(0x96)](_0x562d66(0x8e));return{'kind':_0x50ecc3,'timezone':_0x562d66(0xa2),'scheduledAt':_0x45509e,'title':_0x2c98f3,'prompt':_0x2e6f7c,'model':_0x201a34};}throw CliErrors[_0x562d66(0x96)](_0x562d66(0x97));}function scheduleCollectionPath(_0x520442){const _0x757357=a63_0x3939d6;return _0x757357(0xba)+encodeURIComponent(_0x520442)+_0x757357(0x80);}function scheduleItemPath(_0x33972c,_0x2eb577){return scheduleCollectionPath(_0x33972c)+'/'+encodeURIComponent(_0x2eb577);}function a63_0x4fef(_0x18208f,_0x1ed180){_0x18208f=_0x18208f-0x73;const _0x2a42a1=a63_0x2a42();let _0x4fef34=_0x2a42a1[_0x18208f];return _0x4fef34;}const scheduleValidate={'service':a63_0x3939d6(0x7a),'command':'validate','description':a63_0x3939d6(0x77),'risk':a63_0x3939d6(0x91),'flags':INPUT_FLAGS,async 'validate'(_0xa38cc){readScheduleInput(_0xa38cc);},async 'execute'(_0x3ba0a1){const _0x450ad6=a63_0x3939d6,_0x27ad88=readScheduleInput(_0x3ba0a1),_0x34963e=await validateRuntimeSchedule(_0x3ba0a1[_0x450ad6(0xac)],_0x27ad88);return{'ok':!![],'data':_0x34963e,'message':_0x450ad6(0x87)};}},scheduleCreate={'service':a63_0x3939d6(0x7a),'command':a63_0x3939d6(0x8c),'description':'Create\x20a\x20recurring\x20or\x20one-shot\x20Agent\x20schedule','risk':a63_0x3939d6(0xa1),'confirmationDescription':a63_0x3939d6(0x89),'flags':INPUT_FLAGS,async 'validate'(_0x27e614){readScheduleInput(_0x27e614);},async 'execute'(_0x4dee3f){const _0x109114=a63_0x3939d6,_0xe95a57=readScheduleInput(_0x4dee3f),_0x29d3b5=await validateRuntimeSchedule(_0x4dee3f['appCode'],_0xe95a57),_0x4a526f=await createRuntimeSchedule(_0x4dee3f[_0x109114(0xac)],_0x29d3b5);return{'ok':!![],'data':_0x4a526f,'message':_0x109114(0x92)+_0x4a526f[_0x109114(0xa7)]+'\x20schedule\x20'+_0x4a526f[_0x109114(0x9d)]};},async 'dryRun'(_0x2034e4){const _0x2c5423=a63_0x3939d6,_0x226cd2=readScheduleInput(_0x2034e4);return dryRun(_0x2c5423(0x7d),scheduleCollectionPath(_0x2034e4[_0x2c5423(0xac)]))[_0x2c5423(0x9e)](_0x226cd2)[_0x2c5423(0xa5)](_0x2c5423(0x74))['build']();}},scheduleList={'service':a63_0x3939d6(0x7a),'command':a63_0x3939d6(0x9a),'description':a63_0x3939d6(0xad),'risk':a63_0x3939d6(0x91),'flags':[KIND_FLAG,LIMIT_FLAG,CURSOR_FLAG],async 'validate'(_0x4d7317){const _0x3ca4af=a63_0x3939d6,_0x1234aa=_0x4d7317[_0x3ca4af(0xa8)]('limit');if(!Number[_0x3ca4af(0x88)](_0x1234aa)||_0x1234aa<0x1||_0x1234aa>0x64)throw CliErrors[_0x3ca4af(0x96)]('--limit\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.');const _0x557e3e=_0x4d7317['str']('cursor');if(_0x557e3e&&(_0x557e3e[_0x3ca4af(0x79)]>0x400||_0x557e3e[_0x3ca4af(0x9c)]()!==_0x557e3e))throw CliErrors[_0x3ca4af(0x96)](_0x3ca4af(0x8d));},async 'execute'(_0x51107f){const _0xc11eda=a63_0x3939d6,_0x2ada31=_0x51107f[_0xc11eda(0xaa)](_0xc11eda(0xb0)),_0x1c1d77=await listRuntimeSchedules(_0x51107f[_0xc11eda(0xac)],{'kind':_0x51107f[_0xc11eda(0xaa)](_0xc11eda(0xa7)),'limit':_0x51107f[_0xc11eda(0xa8)](_0xc11eda(0xb2)),..._0x2ada31?{'cursor':_0x2ada31}:{}});return{'ok':!![],'data':_0x1c1d77};}},scheduleDetail={'service':a63_0x3939d6(0x7a),'command':'detail','description':a63_0x3939d6(0xae),'risk':'read','flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x4bcaba){const _0x50ee9e=a63_0x3939d6,_0x4ffded=await getRuntimeSchedule(_0x4bcaba['appCode'],_0x4bcaba[_0x50ee9e(0xaa)](_0x50ee9e(0xa0)));return{'ok':!![],'data':_0x4ffded};}},scheduleRun={'service':'schedule','command':a63_0x3939d6(0x7c),'description':a63_0x3939d6(0x93),'risk':a63_0x3939d6(0xa1),'confirmationDescription':a63_0x3939d6(0x99),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x10ef26){const _0xf9e350=a63_0x3939d6,_0x1b7aa3=_0x10ef26[_0xf9e350(0xaa)](_0xf9e350(0xa0)),_0x332247=await runRuntimeSchedule(_0x10ef26[_0xf9e350(0xac)],_0x1b7aa3);return{'ok':!![],'data':_0x332247,'message':_0xf9e350(0x83)+_0x332247[_0xf9e350(0x82)]+_0xf9e350(0x8b)+_0x1b7aa3};},async 'dryRun'(_0x396d55){const _0x85c74d=a63_0x3939d6,_0x13169a=_0x396d55[_0x85c74d(0xaa)](_0x85c74d(0xa0));return dryRun('POST',scheduleItemPath(_0x396d55['appCode'],_0x13169a)+_0x85c74d(0x81))['description'](_0x85c74d(0x7f)+_0x13169a+'\x20immediately')['build']();}},scheduleDelete={'service':a63_0x3939d6(0x7a),'command':a63_0x3939d6(0x86),'description':a63_0x3939d6(0xb3),'risk':a63_0x3939d6(0xa1),'confirmationDescription':a63_0x3939d6(0x8a),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x287a1c){const _0x56f66f=a63_0x3939d6,_0x558d2b=_0x287a1c['str'](_0x56f66f(0xa0)),_0x176260=await deleteRuntimeSchedule(_0x287a1c[_0x56f66f(0xac)],_0x558d2b);return{'ok':!![],'data':_0x176260,'message':_0x56f66f(0x76)+_0x558d2b};},async 'dryRun'(_0x56b7a3){const _0x455a18=a63_0x3939d6,_0x294926=_0x56b7a3[_0x455a18(0xaa)]('schedule-id');return dryRun(_0x455a18(0xb6),scheduleItemPath(_0x56b7a3['appCode'],_0x294926))[_0x455a18(0xa5)]('Preview:\x20delete\x20schedule\x20'+_0x294926)['build']();}};export const scheduleDefinitions=[scheduleValidate,scheduleCreate,scheduleList,scheduleDetail,scheduleRun,scheduleDelete];
|
package/lib/commands/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a64_0x2d5b(){const _0x3276d0=['7696374nbCMLC','410PsfEpv','4339688hLyvXw','3330651XNeBnn','4646474dHXATq','2884UHrNAS','572134tHpjmD','export','read','2fDEdIm','5474880kpMJBU','18fXtTGA'];a64_0x2d5b=function(){return _0x3276d0;};return a64_0x2d5b();}function a64_0x457b(_0x56db3c,_0x24d7a1){_0x56db3c=_0x56db3c-0x1d4;const _0x2d5bec=a64_0x2d5b();let _0x457b02=_0x2d5bec[_0x56db3c];return _0x457b02;}const a64_0x3e97db=a64_0x457b;(function(_0x7f84f3,_0x328501){const _0x177c64=a64_0x457b,_0x12e6d6=_0x7f84f3();while(!![]){try{const _0x2c6878=parseInt(_0x177c64(0x1dc))/0x1*(-parseInt(_0x177c64(0x1df))/0x2)+parseInt(_0x177c64(0x1d9))/0x3+parseInt(_0x177c64(0x1db))/0x4*(parseInt(_0x177c64(0x1d7))/0x5)+parseInt(_0x177c64(0x1d6))/0x6+-parseInt(_0x177c64(0x1da))/0x7+-parseInt(_0x177c64(0x1d8))/0x8*(parseInt(_0x177c64(0x1d5))/0x9)+parseInt(_0x177c64(0x1d4))/0xa;if(_0x2c6878===_0x328501)break;else _0x12e6d6['push'](_0x12e6d6['shift']());}catch(_0x3c3307){_0x12e6d6['push'](_0x12e6d6['shift']());}}}(a64_0x2d5b,0xa5b3e));import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x55af53){const _0x3895e9=await buildSchemaPayload();return{'ok':!![],'data':_0x3895e9};}export const schemaDefinition={'service':'schema','command':a64_0x3e97db(0x1dd),'description':'Export\x20machine-readable\x20command\x20schema\x20(JSON)','risk':a64_0x3e97db(0x1de),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x39964f,_0x25990b){const _0x117f28=a65_0x5b78,_0x3ab4e4=_0x39964f();while(!![]){try{const _0x1bfda9=-parseInt(_0x117f28(0x132))/0x1*(-parseInt(_0x117f28(0x122))/0x2)+-parseInt(_0x117f28(0x162))/0x3+parseInt(_0x117f28(0x133))/0x4*(parseInt(_0x117f28(0x14f))/0x5)+parseInt(_0x117f28(0x16a))/0x6+parseInt(_0x117f28(0x14d))/0x7+parseInt(_0x117f28(0x15e))/0x8+-parseInt(_0x117f28(0x12d))/0x9;if(_0x1bfda9===_0x25990b)break;else _0x3ab4e4['push'](_0x3ab4e4['shift']());}catch(_0x14db5c){_0x3ab4e4['push'](_0x3ab4e4['shift']());}}}(a65_0x1c16,0x7145d));import{compileServiceTreeCommand,matchServiceTreeCommand}from'@lovrabet/cli-framework';import{getLoginUserInfo,listDatasets}from'../../core/api-client.js';import{executeData,executeSdkBff,executeSdkSql}from'../../core/sdk-client.js';function a65_0x1c16(){const _0x4f1c10=['\x22\x20in\x20service\x20command\x20','padEnd','source','bffId','\x20\x20\x20\x20command:\x20','description','\x20\x20\x20\x20sqlCode:\x20','mapTo','3577630jjpLTT','app','693645QqFAhJ','sqlCode','startsWith','\x20\x20\x20\x20kind:\x20\x20\x20\x20','cliPath','default','env','appRef','envName','rawFlags','target','type','filter','now','map','5302440FxEeGT','enum','\x20\x20\x20\x20','const','1596147HNgsZp','Define\x20the\x20appRef\x20under\x20appBindings\x20or\x20remove\x20target.appRef.','This\x20will\x20run\x20Service\x20Tree\x20command\x20\x22','bff','entries','Preview\x20dynamic\x20service\x20command:\x20','code','context.','1178190ljhWXJ','slice','dbtableConfig','length','\x20\x20[','\x20service\x20detail\x20--service\x20','fromEntries','\x20\x20\x20\x20datasetCode:\x20','SERVICE_TREE','bffCode','string','\x22.\x20','data','datasetCode','\x20\x20MAP\x20TO','normalizedManifest','find','scriptName','some','nickName','args','\x20->\x20','Use\x20lovrabet\x20dataset\x20list\x20to\x20confirm\x20the\x20physical\x20table\x20name\x20or\x20add\x20target.datasetCode\x20to\x20the\x20manifest.','The\x20manifest\x20marks\x20this\x20command\x20as\x20a\x20write.\x20It\x20may\x20change\x20business\x20data\x20or\x20service\x20state.','\x20completed\x20in\x20','service','flags','risk','operator','\x20requires\x20target.sqlCode.','join','2PTINIR','validation','high-risk-write','params','Run\x20service\x20command\x20','Use\x20`','\x20<command>\x20[flags]','fullPath','\x20\x20\x20\x20datatable:\x20','tree','\x20\x20\x20\x20functionName:\x20','9638514YFUotL','userName','appcode','name','kind','3055zsDDTa','20NGvshb','Unsupported\x20service\x20target\x20kind:\x20','tenantCode','appBindings','\x20requires\x20target.datasetCode\x20or\x20target.datatable.','employeeId','commands','\x20requires\x20target.functionName.','Service\x20command\x20','\x20\x20SERVICE\x20TREE\x20TARGET','command','required','remainingArgs','push','appCode','tableName','datatable','read'];a65_0x1c16=function(){return _0x4f1c10;};return a65_0x1c16();}import{CliErrors}from'../../errors.js';import{listLocalServices,listLocalServiceTrees}from'../../commands/service/registry.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export function resolveDynamicServiceCommand(_0x530513,_0x4a8266){const _0x23b6fe=a65_0x5b78,_0x1f1907=listLocalServiceTrees();let _0x38406a;for(const _0x25c75e of _0x1f1907){const _0x583ebd=matchServiceTreeCommand(_0x25c75e,_0x530513);if(!_0x583ebd)continue;(!_0x38406a||_0x583ebd[_0x23b6fe(0x13d)][_0x23b6fe(0x129)][_0x23b6fe(0x16d)]>_0x38406a[_0x23b6fe(0x13d)][_0x23b6fe(0x129)][_0x23b6fe(0x16d)])&&(_0x38406a={'tree':_0x25c75e,'command':_0x583ebd[_0x23b6fe(0x13d)],'remainingArgs':_0x583ebd[_0x23b6fe(0x13f)]});}if(!_0x38406a)return undefined;const _0x69edbd={..._0x4a8266};return applyAppBinding(_0x38406a[_0x23b6fe(0x12b)],_0x38406a[_0x23b6fe(0x13d)],_0x69edbd),{'definition':buildDynamicCommandDefinition(_0x38406a[_0x23b6fe(0x12b)],_0x38406a[_0x23b6fe(0x13d)]),'args':_0x38406a[_0x23b6fe(0x13f)],'flags':_0x69edbd,'tree':_0x38406a[_0x23b6fe(0x12b)],'command':_0x38406a['command']};}export function generateDynamicServiceHelp(_0x3b8e22){const _0x296751=a65_0x5b78,_0x193a43=listLocalServiceTrees()[_0x296751(0x113)](_0xdaf977=>_0xdaf977['service'][_0x296751(0x168)]===_0x3b8e22);if(!_0x193a43)return undefined;const _0x41cd17=[CLI_BIN_NAME+'\x20'+_0x3b8e22+_0x296751(0x128),'',_0x193a43['service'][_0x296751(0x130)]||_0x3b8e22,_0x193a43[_0x296751(0x11c)]['description']?'\x20\x20'+_0x193a43[_0x296751(0x11c)]['description']:'','','Commands:',..._0x193a43[_0x296751(0x139)][_0x296751(0x15d)](_0x3e68fc=>{const _0x33650f=_0x296751,_0x53c7bd=_0x3e68fc[_0x33650f(0x129)][_0x33650f(0x16b)](0x1)['join']('\x20'),_0x223227=_0x3e68fc[_0x33650f(0x11e)]===_0x33650f(0x144)?'':'\x20['+_0x3e68fc['risk']+']';return'\x20\x20'+_0x53c7bd[_0x33650f(0x146)](0x18)+'\x20'+(_0x3e68fc[_0x33650f(0x14a)]||'')+_0x223227;}),'',_0x296751(0x127)+CLI_BIN_NAME+_0x296751(0x16f)+_0x3b8e22+'`\x20to\x20inspect\x20the\x20manifest.'][_0x296751(0x15b)](Boolean);return _0x41cd17[_0x296751(0x121)]('\x0a');}export function listDynamicServiceEntries(){const _0x5ba00e=a65_0x5b78;return listLocalServices()[_0x5ba00e(0x15d)](_0x59a7c6=>{const _0x338742=_0x5ba00e,_0x2db72c=_0x59a7c6[_0x338742(0x112)];return{'service':_0x2db72c[_0x338742(0x11c)]['code'],'label':_0x2db72c['service'][_0x338742(0x130)]||_0x2db72c[_0x338742(0x11c)][_0x338742(0x168)],'commands':_0x2db72c['commands'][_0x338742(0x15d)](_0x54f9dc=>({'command':dynamicCommandName(_0x54f9dc),'description':_0x54f9dc[_0x338742(0x14a)]||_0x338742(0x126)+_0x54f9dc['cliPath'],'tag':riskTag(_0x54f9dc[_0x338742(0x11e)])}))};});}export function getDynamicServiceEntry(_0x414e71){const _0x593131=a65_0x5b78;return listDynamicServiceEntries()[_0x593131(0x113)](_0x41d68f=>_0x41d68f[_0x593131(0x11c)]===_0x414e71);}export function listDynamicServiceDefinitions(_0x266043){const _0x545d66=a65_0x5b78;return listLocalServiceTrees()[_0x545d66(0x15b)](_0x213057=>!_0x266043||_0x213057[_0x545d66(0x11c)]['code']===_0x266043)['flatMap'](_0x76c23a=>_0x76c23a[_0x545d66(0x139)][_0x545d66(0x15d)](_0x15e728=>buildDynamicCommandDefinition(_0x76c23a,_0x15e728)));}export function getDynamicServiceDefinitions(_0x50f0a8){const _0x1a6685=a65_0x5b78,_0x3f7230=listDynamicServiceDefinitions(_0x50f0a8);return _0x3f7230[_0x1a6685(0x16d)]>0x0?_0x3f7230:undefined;}export function findDynamicServiceDefinition(_0x93b6c0,_0xc0154a){const _0x548e83=a65_0x5b78;return listDynamicServiceDefinitions(_0x93b6c0)[_0x548e83(0x113)](_0x2a7986=>_0x2a7986[_0x548e83(0x13d)]===_0xc0154a);}export function buildDynamicCommandDefinition(_0x2395b3,_0x40e304){const _0x40ba00=a65_0x5b78;return{'service':_0x2395b3['service'][_0x40ba00(0x168)],'command':dynamicCommandName(_0x40e304),'description':_0x40e304[_0x40ba00(0x14a)]||_0x40ba00(0x126)+_0x40e304['cliPath'],'risk':_0x40e304[_0x40ba00(0x11e)],..._0x40e304['risk']===_0x40ba00(0x144)?{}:{'confirmationDescription':buildDynamicConfirmationDescription(_0x40e304)},'requiresAuth':!![],'requiresAppCode':!![],'args':_0x40e304[_0x40ba00(0x117)]['map'](_0x24ae61=>({'name':_0x24ae61[_0x40ba00(0x130)],'description':_0x24ae61[_0x40ba00(0x14a)]||_0x24ae61[_0x40ba00(0x130)],'required':_0x24ae61[_0x40ba00(0x13e)]})),'flags':_0x40e304[_0x40ba00(0x11d)]['map'](flagToCommandFlag),'helpExtra':()=>renderDynamicCommandHelp(_0x40e304),async 'dryRun'(_0x1c6463){const _0x358dda=_0x40ba00,_0x5e111a=await compilePlan(_0x40e304,_0x1c6463);return{'method':_0x358dda(0x10b),'url':_0x40e304[_0x358dda(0x153)],'body':{'target':targetPreview(_0x5e111a),'params':_0x5e111a['params']},'description':_0x358dda(0x167)+_0x40e304[_0x358dda(0x153)]};},async 'execute'(_0xc8903b){const _0x4ead68=_0x40ba00,_0x53d6fd=await compilePlan(_0x40e304,_0xc8903b),_0x57f555=Date['now'](),_0xc54925=await executePlan(_0x53d6fd,_0x40e304,_0xc8903b),_0x4da8e7=Date[_0x4ead68(0x15c)]()-_0x57f555;return{'ok':!![],'data':{'service':_0x2395b3[_0x4ead68(0x11c)],'command':_0x40e304[_0x4ead68(0x153)],'target':targetPreview(_0x53d6fd),'result':_0xc54925,'elapsed':_0x4da8e7},'message':_0x4ead68(0x13b)+_0x40e304['cliPath']+_0x4ead68(0x11b)+_0x4da8e7+'ms'};}};}function buildDynamicConfirmationDescription(_0x51ba63){const _0x477cdb=a65_0x5b78,_0x2801b3=_0x51ba63[_0x477cdb(0x14a)]||_0x51ba63[_0x477cdb(0x153)],_0x433c12=_0x51ba63[_0x477cdb(0x11e)]===_0x477cdb(0x124)?'The\x20manifest\x20marks\x20this\x20command\x20as\x20a\x20high-risk\x20write.\x20It\x20may\x20make\x20business\x20changes\x20that\x20are\x20hard\x20to\x20reverse.':_0x477cdb(0x11a);return _0x477cdb(0x164)+_0x2801b3+_0x477cdb(0x10e)+_0x433c12;}function dynamicCommandName(_0x122d80){const _0x1e507e=a65_0x5b78;return _0x122d80[_0x1e507e(0x129)]['slice'](0x1)['join']('\x20');}function riskTag(_0x29cb79){const _0x21b303=a65_0x5b78;return _0x29cb79===_0x21b303(0x144)?'':_0x21b303(0x16e)+_0x29cb79+']';}function flagToCommandFlag(_0x4bda08){const _0x3274c3=a65_0x5b78;return{'name':_0x4bda08['cliName'],'type':_0x4bda08[_0x3274c3(0x15a)]==='json'?_0x3274c3(0x10d):_0x4bda08['type'],'description':_0x4bda08['description']||_0x4bda08['name'],'required':_0x4bda08['required'],'default':isPrimitiveFlagDefault(_0x4bda08[_0x3274c3(0x154)])?_0x4bda08[_0x3274c3(0x154)]:undefined,'enum':_0x4bda08[_0x3274c3(0x15f)]};}async function compilePlan(_0xacb22d,_0x2218d9){const _0x46be53=a65_0x5b78;return compileServiceTreeCommand(_0xacb22d,{'flags':_0x2218d9[_0x46be53(0x158)],'args':_0x2218d9[_0x46be53(0x117)],'context':await buildServiceContext(_0xacb22d,_0x2218d9)});}async function buildServiceContext(_0x59bcec,_0x2d2e6a){const _0x42568d=a65_0x5b78,_0x253693={'appCode':_0x2d2e6a[_0x42568d(0x141)],'env':_0x2d2e6a[_0x42568d(0x157)],'envName':_0x2d2e6a[_0x42568d(0x157)]};if(!usesRuntimeContext(_0x59bcec))return _0x253693;const _0x4bfe05=await getLoginUserInfo(),_0x54f4dd=pickFirst(_0x4bfe05['userId'],_0x4bfe05['id']);return{..._0x253693,'user':_0x4bfe05,'userId':_0x54f4dd,'id':_0x4bfe05['id'],'username':pickFirst(_0x4bfe05['username'],_0x4bfe05[_0x42568d(0x12e)],_0x4bfe05['loginName']),'userName':_0x4bfe05[_0x42568d(0x12e)],'nickname':pickFirst(_0x4bfe05['nickname'],_0x4bfe05[_0x42568d(0x116)]),'nickName':_0x4bfe05['nickName'],'tenantCode':_0x4bfe05[_0x42568d(0x135)],'employeeId':_0x4bfe05[_0x42568d(0x138)]};}function usesRuntimeContext(_0x48c896){const _0x47f77c=a65_0x5b78;return _0x48c896[_0x47f77c(0x14c)][_0x47f77c(0x115)](_0x3d78a3=>typeof _0x3d78a3[_0x47f77c(0x147)]==='string'&&(_0x3d78a3['source'][_0x47f77c(0x151)](_0x47f77c(0x169))||_0x3d78a3[_0x47f77c(0x147)]['startsWith']('ctx.')));}function pickFirst(..._0x59f566){const _0x9d3729=a65_0x5b78;return _0x59f566[_0x9d3729(0x113)](_0x37cb2b=>_0x37cb2b!==undefined&&_0x37cb2b!==null);}async function executePlan(_0x27c075,_0x7bcdff,_0x1277af){const _0x15dc50=a65_0x5b78;if(_0x27c075[_0x15dc50(0x131)]===_0x15dc50(0x10f)){const _0x4d5182=await resolveDatasetCode(_0x27c075,_0x7bcdff,_0x1277af);return executeData(_0x4d5182,_0x27c075[_0x15dc50(0x13d)],_0x27c075[_0x15dc50(0x125)]);}if(_0x27c075[_0x15dc50(0x131)]==='sql'){if(!_0x27c075['sqlCode'])throw CliErrors['validation'](_0x15dc50(0x13b)+_0x7bcdff[_0x15dc50(0x153)]+_0x15dc50(0x120));return executeSdkSql(_0x27c075[_0x15dc50(0x150)],normalizeScalarParams(_0x27c075[_0x15dc50(0x125)]));}if(_0x27c075['kind']===_0x15dc50(0x165)){const _0x1336cc=_0x27c075[_0x15dc50(0x114)]||_0x27c075[_0x15dc50(0x10c)]||(_0x27c075[_0x15dc50(0x148)]==null?'':String(_0x27c075[_0x15dc50(0x148)]));if(!_0x1336cc)throw CliErrors['validation']('Service\x20command\x20'+_0x7bcdff[_0x15dc50(0x153)]+_0x15dc50(0x13a));return executeSdkBff(_0x1336cc,_0x27c075['params']);}throw CliErrors[_0x15dc50(0x123)](_0x15dc50(0x134)+_0x27c075[_0x15dc50(0x131)]);}function a65_0x5b78(_0x44a44a,_0x59d3df){_0x44a44a=_0x44a44a-0x10b;const _0x1c166e=a65_0x1c16();let _0x5b783e=_0x1c166e[_0x44a44a];return _0x5b783e;}async function resolveDatasetCode(_0x1db582,_0xbc3865,_0x1d9fd8){const _0x41b5f1=a65_0x5b78;if(_0x1db582[_0x41b5f1(0x110)])return _0x1db582['datasetCode'];if(!_0x1db582['datatable'])throw CliErrors['validation'](_0x41b5f1(0x13b)+_0xbc3865['cliPath']+_0x41b5f1(0x137));const _0x330c71=await listDatasets(_0x1d9fd8[_0x41b5f1(0x141)]),_0x3c9711=_0x330c71[_0x41b5f1(0x113)](_0x2c4b2d=>_0x2c4b2d[_0x41b5f1(0x16c)]?.[_0x41b5f1(0x142)]===_0x1db582['datatable']);if(!_0x3c9711?.['code'])throw CliErrors[_0x41b5f1(0x123)]('Cannot\x20resolve\x20datatable\x20\x22'+_0x1db582['datatable']+'\x22\x20to\x20a\x20datasetCode\x20in\x20app\x20'+_0x1d9fd8[_0x41b5f1(0x141)]+'.',_0x41b5f1(0x119));return _0x3c9711[_0x41b5f1(0x168)];}function applyAppBinding(_0x19f2ee,_0x41811c,_0x3a61da){const _0x4bc5d2=a65_0x5b78,_0x4c92e3=_0x41811c[_0x4bc5d2(0x159)][_0x4bc5d2(0x156)];if(!_0x4c92e3)return;const _0x1fb2e7=_0x19f2ee[_0x4bc5d2(0x136)][_0x4c92e3];if(!_0x1fb2e7)throw CliErrors[_0x4bc5d2(0x123)]('Unknown\x20appRef\x20\x22'+_0x4c92e3+_0x4bc5d2(0x145)+_0x41811c[_0x4bc5d2(0x153)]+'.',_0x4bc5d2(0x163));const _0xef0768=_0x1fb2e7[_0x4bc5d2(0x12f)]||_0x1fb2e7[_0x4bc5d2(0x141)];_0xef0768&&!hasText(_0x3a61da[_0x4bc5d2(0x12f)])&&(_0x3a61da[_0x4bc5d2(0x12f)]=_0xef0768),_0x1fb2e7[_0x4bc5d2(0x14e)]&&!hasText(_0x3a61da[_0x4bc5d2(0x14e)])&&!hasText(_0x3a61da[_0x4bc5d2(0x12f)])&&(_0x3a61da['app']=_0x1fb2e7[_0x4bc5d2(0x14e)]),_0x1fb2e7[_0x4bc5d2(0x155)]&&!hasText(_0x3a61da[_0x4bc5d2(0x155)])&&(_0x3a61da['env']=_0x1fb2e7[_0x4bc5d2(0x155)]);}function renderDynamicCommandHelp(_0xf8638){const _0xe9f258=a65_0x5b78,_0x30d61b=[_0xe9f258(0x13c),_0xe9f258(0x152)+_0xf8638['target'][_0xe9f258(0x131)],_0xe9f258(0x149)+_0xf8638['target'][_0xe9f258(0x13d)]];if(_0xf8638[_0xe9f258(0x159)]['datasetCode'])_0x30d61b[_0xe9f258(0x140)](_0xe9f258(0x171)+_0xf8638[_0xe9f258(0x159)][_0xe9f258(0x110)]);if(_0xf8638[_0xe9f258(0x159)]['datatable'])_0x30d61b[_0xe9f258(0x140)](_0xe9f258(0x12a)+_0xf8638[_0xe9f258(0x159)][_0xe9f258(0x143)]);if(_0xf8638[_0xe9f258(0x159)]['sqlCode'])_0x30d61b[_0xe9f258(0x140)](_0xe9f258(0x14b)+_0xf8638['target'][_0xe9f258(0x150)]);if(_0xf8638['target']['scriptName'])_0x30d61b[_0xe9f258(0x140)](_0xe9f258(0x12c)+_0xf8638['target']['scriptName']);if(_0xf8638[_0xe9f258(0x14c)][_0xe9f258(0x16d)]>0x0){_0x30d61b[_0xe9f258(0x140)]('',_0xe9f258(0x111));for(const _0x45753d of _0xf8638['mapTo']){_0x30d61b[_0xe9f258(0x140)](_0xe9f258(0x160)+(_0x45753d['source']||_0xe9f258(0x161))+_0xe9f258(0x118)+_0x45753d['target']+(_0x45753d['operator']?'.'+_0x45753d[_0xe9f258(0x11f)]:''));}}return _0x30d61b[_0xe9f258(0x121)]('\x0a');}function targetPreview(_0x5ca2b1){const _0x5a2a27=a65_0x5b78;return{'kind':_0x5ca2b1['kind'],'command':_0x5ca2b1[_0x5a2a27(0x13d)],'appRef':_0x5ca2b1[_0x5a2a27(0x156)],'datasetCode':_0x5ca2b1[_0x5a2a27(0x110)],'datatable':_0x5ca2b1[_0x5a2a27(0x143)],'sqlCode':_0x5ca2b1[_0x5a2a27(0x150)],'bffCode':_0x5ca2b1['bffCode'],'bffId':_0x5ca2b1[_0x5a2a27(0x148)],'functionName':_0x5ca2b1[_0x5a2a27(0x114)]};}function normalizeScalarParams(_0x5a7419){const _0x4172a8=a65_0x5b78;return Object[_0x4172a8(0x170)](Object[_0x4172a8(0x166)](_0x5a7419)['filter'](([,_0x40a93c])=>typeof _0x40a93c==='string'||typeof _0x40a93c==='number'));}function hasText(_0x29e587){const _0x2bf698=a65_0x5b78;return typeof _0x29e587==='string'&&_0x29e587['trim']()[_0x2bf698(0x16d)]>0x0;}function isPrimitiveFlagDefault(_0x3390aa){return _0x3390aa===undefined||typeof _0x3390aa==='string'||typeof _0x3390aa==='number'||typeof _0x3390aa==='boolean';}
|
|
1
|
+
(function(_0x2a280f,_0x24e3b4){const _0x3492b1=a65_0x31fa,_0x2d6a95=_0x2a280f();while(!![]){try{const _0x287a16=parseInt(_0x3492b1(0xd8))/0x1+parseInt(_0x3492b1(0xe6))/0x2*(-parseInt(_0x3492b1(0xdd))/0x3)+parseInt(_0x3492b1(0x9c))/0x4*(-parseInt(_0x3492b1(0xfc))/0x5)+-parseInt(_0x3492b1(0xb0))/0x6+-parseInt(_0x3492b1(0xec))/0x7*(parseInt(_0x3492b1(0xe8))/0x8)+parseInt(_0x3492b1(0xb8))/0x9+parseInt(_0x3492b1(0xc5))/0xa*(-parseInt(_0x3492b1(0x98))/0xb);if(_0x287a16===_0x24e3b4)break;else _0x2d6a95['push'](_0x2d6a95['shift']());}catch(_0x583621){_0x2d6a95['push'](_0x2d6a95['shift']());}}}(a65_0x3bf8,0x6898f));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';export function resolveDynamicServiceCommand(_0x1545b4,_0xd3b0e6){const _0x31b1b4=a65_0x31fa,_0x2d4332=listLocalServiceTrees();let _0x4b08f9;for(const _0x53f246 of _0x2d4332){const _0x2a06ff=matchServiceTreeCommand(_0x53f246,_0x1545b4);if(!_0x2a06ff)continue;(!_0x4b08f9||_0x2a06ff[_0x31b1b4(0xf8)][_0x31b1b4(0xe7)]['length']>_0x4b08f9['command']['fullPath'][_0x31b1b4(0xd7)])&&(_0x4b08f9={'tree':_0x53f246,'command':_0x2a06ff['command'],'remainingArgs':_0x2a06ff[_0x31b1b4(0xcd)]});}if(!_0x4b08f9)return undefined;const _0x150c05={..._0xd3b0e6};return applyAppBinding(_0x4b08f9[_0x31b1b4(0xc8)],_0x4b08f9[_0x31b1b4(0xf8)],_0x150c05),{'definition':buildDynamicCommandDefinition(_0x4b08f9[_0x31b1b4(0xc8)],_0x4b08f9[_0x31b1b4(0xf8)]),'args':_0x4b08f9[_0x31b1b4(0xcd)],'flags':_0x150c05,'tree':_0x4b08f9[_0x31b1b4(0xc8)],'command':_0x4b08f9[_0x31b1b4(0xf8)]};}export function generateDynamicServiceHelp(_0x4e128b){const _0x17981f=a65_0x31fa,_0x423fcb=listLocalServiceTrees()[_0x17981f(0xaa)](_0x5b21e0=>_0x5b21e0[_0x17981f(0xb5)]['code']===_0x4e128b);if(!_0x423fcb)return undefined;const _0x2359c5=[CLI_BIN_NAME+'\x20'+_0x4e128b+_0x17981f(0xe3),'',_0x423fcb[_0x17981f(0xb5)]['name']||_0x4e128b,_0x423fcb[_0x17981f(0xb5)][_0x17981f(0xac)]?'\x20\x20'+_0x423fcb['service'][_0x17981f(0xac)]:'','',_0x17981f(0xe0),..._0x423fcb['commands'][_0x17981f(0xf1)](_0xf1de4f=>{const _0x12f9fb=_0x17981f,_0x595239=_0xf1de4f[_0x12f9fb(0xe7)]['slice'](0x1)[_0x12f9fb(0xfa)]('\x20'),_0x4999f8=_0xf1de4f[_0x12f9fb(0xbf)]===_0x12f9fb(0xca)?'':'\x20['+_0xf1de4f['risk']+']';return'\x20\x20'+_0x595239['padEnd'](0x18)+'\x20'+(_0xf1de4f[_0x12f9fb(0xac)]||'')+_0x4999f8;}),'',_0x17981f(0xdc)+CLI_BIN_NAME+_0x17981f(0xa5)+_0x4e128b+_0x17981f(0xb4)][_0x17981f(0x9a)](Boolean);return _0x2359c5[_0x17981f(0xfa)]('\x0a');}export function listDynamicServiceEntries(){const _0x3d3e40=a65_0x31fa;return listLocalServices()[_0x3d3e40(0xf1)](_0x27546a=>{const _0x2e2bd3=_0x3d3e40,_0x131293=_0x27546a['normalizedManifest'];return{'service':_0x131293[_0x2e2bd3(0xb5)]['code'],'label':_0x131293[_0x2e2bd3(0xb5)]['name']||_0x131293['service']['code'],'commands':_0x131293[_0x2e2bd3(0xf3)][_0x2e2bd3(0xf1)](_0x4aaedb=>({'command':dynamicCommandName(_0x4aaedb),'description':_0x4aaedb[_0x2e2bd3(0xac)]||_0x2e2bd3(0xa9)+_0x4aaedb['cliPath'],'tag':riskTag(_0x4aaedb[_0x2e2bd3(0xbf)])}))};});}export function getDynamicServiceEntry(_0x52856b){const _0x2bf1df=a65_0x31fa;return listDynamicServiceEntries()[_0x2bf1df(0xaa)](_0x4848d1=>_0x4848d1[_0x2bf1df(0xb5)]===_0x52856b);}export function listDynamicServiceDefinitions(_0x1bbbbb){const _0x4010c4=a65_0x31fa;return listLocalServiceTrees()[_0x4010c4(0x9a)](_0x1918f4=>!_0x1bbbbb||_0x1918f4[_0x4010c4(0xb5)]['code']===_0x1bbbbb)[_0x4010c4(0xd5)](_0x4aa2ec=>_0x4aa2ec[_0x4010c4(0xf3)][_0x4010c4(0xf1)](_0xa28d29=>buildDynamicCommandDefinition(_0x4aa2ec,_0xa28d29)));}function a65_0x3bf8(){const _0x49dccc=['The\x20manifest\x20marks\x20this\x20command\x20as\x20a\x20high-risk\x20write.\x20It\x20may\x20make\x20business\x20changes\x20that\x20are\x20hard\x20to\x20reverse.','Run\x20service\x20command\x20','find','\x20\x20\x20\x20functionName:\x20','description','operator','\x20requires\x20target.functionName.','\x20\x20SERVICE\x20TREE\x20TARGET','294030nWDcKw','cliName','\x20\x20MAP\x20TO','app','`\x20to\x20inspect\x20the\x20manifest.','service','validation','SERVICE_TREE','6379317ggDnTp','number','\x20\x20\x20\x20','data','sql','mapTo','args','risk','const','scriptName','enum','\x20->\x20','Define\x20the\x20appRef\x20under\x20appBindings\x20or\x20remove\x20target.appRef.','19280zmOgbE','appBindings','nickName','tree','code','read','\x22\x20to\x20a\x20datasetCode\x20in\x20app\x20','tenantCode','remainingArgs','ctx.','env','envName','\x20\x20\x20\x20kind:\x20\x20\x20\x20','Service\x20command\x20','default','Cannot\x20resolve\x20datatable\x20\x22','flatMap','appcode','length','762007ktTneZ','trim','fromEntries','required','Use\x20`','12YNFxLK','name','rawFlags','Commands:','cliPath','This\x20will\x20run\x20Service\x20Tree\x20command\x20\x22','\x20<command>\x20[flags]','boolean','now','180552KQGYzv','fullPath','337120PaicoA','bffCode','slice','datasetCode','21TDnXmj','datatable','type','appRef','startsWith','map','sqlCode','commands','high-risk-write','Preview\x20dynamic\x20service\x20command:\x20','employeeId','\x22.\x20','command','appCode','join','target','4340PNlNZu','userName','tableName','\x20\x20[','bff','\x20requires\x20target.datasetCode\x20or\x20target.datatable.','string','loginName','\x20\x20\x20\x20datatable:\x20','2277mMNVks','bffId','filter','\x20\x20\x20\x20datasetCode:\x20','492TWRvZG','flags','username','source','dbtableConfig','\x20completed\x20in\x20','kind','userId','entries','\x20service\x20detail\x20--service\x20','params','push'];a65_0x3bf8=function(){return _0x49dccc;};return a65_0x3bf8();}export function getDynamicServiceDefinitions(_0x1d23d8){const _0xbe16ce=listDynamicServiceDefinitions(_0x1d23d8);return _0xbe16ce['length']>0x0?_0xbe16ce:undefined;}export function findDynamicServiceDefinition(_0x3d5740,_0x261750){const _0x2a145f=a65_0x31fa;return listDynamicServiceDefinitions(_0x3d5740)[_0x2a145f(0xaa)](_0x1060f8=>_0x1060f8[_0x2a145f(0xf8)]===_0x261750);}export function buildDynamicCommandDefinition(_0x2e7aa2,_0x333e06){const _0x662cd4=a65_0x31fa;return{'service':_0x2e7aa2[_0x662cd4(0xb5)][_0x662cd4(0xc9)],'command':dynamicCommandName(_0x333e06),'description':_0x333e06[_0x662cd4(0xac)]||_0x662cd4(0xa9)+_0x333e06[_0x662cd4(0xe1)],'risk':_0x333e06['risk'],..._0x333e06['risk']==='read'?{}:{'confirmationDescription':buildDynamicConfirmationDescription(_0x333e06)},'requiresAuth':!![],'requiresAppCode':!![],'args':_0x333e06['args']['map'](_0x109c7d=>({'name':_0x109c7d[_0x662cd4(0xde)],'description':_0x109c7d['description']||_0x109c7d['name'],'required':_0x109c7d[_0x662cd4(0xdb)]})),'flags':_0x333e06[_0x662cd4(0x9d)][_0x662cd4(0xf1)](flagToCommandFlag),'helpExtra':()=>renderDynamicCommandHelp(_0x333e06),async 'dryRun'(_0x5990b8){const _0x28749a=_0x662cd4,_0x16b4e6=await compilePlan(_0x333e06,_0x5990b8);return{'method':_0x28749a(0xb7),'url':_0x333e06[_0x28749a(0xe1)],'body':{'target':targetPreview(_0x16b4e6),'params':_0x16b4e6['params']},'description':_0x28749a(0xf5)+_0x333e06[_0x28749a(0xe1)]};},async 'execute'(_0x12a176){const _0x55c368=_0x662cd4,_0x384e46=await compilePlan(_0x333e06,_0x12a176),_0x593281=Date[_0x55c368(0xe5)](),_0x42085b=await executePlan(_0x384e46,_0x333e06,_0x12a176),_0x13ad5d=Date[_0x55c368(0xe5)]()-_0x593281;return{'ok':!![],'data':{'service':_0x2e7aa2[_0x55c368(0xb5)],'command':_0x333e06['cliPath'],'target':targetPreview(_0x384e46),'result':_0x42085b,'elapsed':_0x13ad5d},'message':'Service\x20command\x20'+_0x333e06[_0x55c368(0xe1)]+_0x55c368(0xa1)+_0x13ad5d+'ms'};}};}function buildDynamicConfirmationDescription(_0x504ef8){const _0x4b53bd=a65_0x31fa,_0x3686cf=_0x504ef8[_0x4b53bd(0xac)]||_0x504ef8[_0x4b53bd(0xe1)],_0x3ed1c6=_0x504ef8['risk']===_0x4b53bd(0xf4)?_0x4b53bd(0xa8):'The\x20manifest\x20marks\x20this\x20command\x20as\x20a\x20write.\x20It\x20may\x20change\x20business\x20data\x20or\x20service\x20state.';return _0x4b53bd(0xe2)+_0x3686cf+_0x4b53bd(0xf7)+_0x3ed1c6;}function dynamicCommandName(_0x2143ea){const _0x442e8f=a65_0x31fa;return _0x2143ea[_0x442e8f(0xe7)][_0x442e8f(0xea)](0x1)[_0x442e8f(0xfa)]('\x20');}function riskTag(_0x57532e){const _0x438a83=a65_0x31fa;return _0x57532e===_0x438a83(0xca)?'':_0x438a83(0x92)+_0x57532e+']';}function flagToCommandFlag(_0x573e54){const _0x532b86=a65_0x31fa;return{'name':_0x573e54[_0x532b86(0xb1)],'type':_0x573e54[_0x532b86(0xee)]==='json'?_0x532b86(0x95):_0x573e54[_0x532b86(0xee)],'description':_0x573e54['description']||_0x573e54[_0x532b86(0xde)],'required':_0x573e54[_0x532b86(0xdb)],'default':isPrimitiveFlagDefault(_0x573e54[_0x532b86(0xd3)])?_0x573e54[_0x532b86(0xd3)]:undefined,'enum':_0x573e54[_0x532b86(0xc2)]};}async function compilePlan(_0x587bb5,_0x5574a1){const _0x5df85d=a65_0x31fa;return compileServiceTreeCommand(_0x587bb5,{'flags':_0x5574a1[_0x5df85d(0xdf)],'args':_0x5574a1[_0x5df85d(0xbe)],'context':await buildServiceContext(_0x587bb5,_0x5574a1)});}async function buildServiceContext(_0x5a1970,_0x2c1727){const _0x3ca744=a65_0x31fa,_0xc13043={'appCode':_0x2c1727[_0x3ca744(0xf9)],'env':_0x2c1727['envName'],'envName':_0x2c1727[_0x3ca744(0xd0)]};if(!usesRuntimeContext(_0x5a1970))return _0xc13043;const _0x59a5e1=await getLoginUserInfo(),_0x1c43e3=pickFirst(_0x59a5e1[_0x3ca744(0xa3)],_0x59a5e1['id']);return{..._0xc13043,'user':_0x59a5e1,'userId':_0x1c43e3,'id':_0x59a5e1['id'],'username':pickFirst(_0x59a5e1[_0x3ca744(0x9e)],_0x59a5e1['userName'],_0x59a5e1[_0x3ca744(0x96)]),'userName':_0x59a5e1[_0x3ca744(0xfd)],'nickname':pickFirst(_0x59a5e1['nickname'],_0x59a5e1[_0x3ca744(0xc7)]),'nickName':_0x59a5e1['nickName'],'tenantCode':_0x59a5e1[_0x3ca744(0xcc)],'employeeId':_0x59a5e1[_0x3ca744(0xf6)]};}function usesRuntimeContext(_0x5b6038){const _0x2c9192=a65_0x31fa;return _0x5b6038[_0x2c9192(0xbd)]['some'](_0x59d9db=>typeof _0x59d9db['source']===_0x2c9192(0x95)&&(_0x59d9db[_0x2c9192(0x9f)][_0x2c9192(0xf0)]('context.')||_0x59d9db['source'][_0x2c9192(0xf0)](_0x2c9192(0xce))));}function pickFirst(..._0x5af354){const _0x182e69=a65_0x31fa;return _0x5af354[_0x182e69(0xaa)](_0x43527e=>_0x43527e!==undefined&&_0x43527e!==null);}async function executePlan(_0x1bf759,_0x329a50,_0x2c524f){const _0x3671fa=a65_0x31fa;if(_0x1bf759[_0x3671fa(0xa2)]===_0x3671fa(0xbb)){const _0x25b3fb=await resolveDatasetCode(_0x1bf759,_0x329a50,_0x2c524f);return executeData(_0x25b3fb,_0x1bf759['command'],_0x1bf759[_0x3671fa(0xa6)]);}if(_0x1bf759[_0x3671fa(0xa2)]===_0x3671fa(0xbc)){if(!_0x1bf759[_0x3671fa(0xf2)])throw CliErrors[_0x3671fa(0xb6)](_0x3671fa(0xd2)+_0x329a50[_0x3671fa(0xe1)]+'\x20requires\x20target.sqlCode.');return executeSdkSql(_0x1bf759[_0x3671fa(0xf2)],normalizeScalarParams(_0x1bf759[_0x3671fa(0xa6)]));}if(_0x1bf759[_0x3671fa(0xa2)]===_0x3671fa(0x93)){const _0x531501=_0x1bf759[_0x3671fa(0xc1)]||_0x1bf759[_0x3671fa(0xe9)]||(_0x1bf759[_0x3671fa(0x99)]==null?'':String(_0x1bf759[_0x3671fa(0x99)]));if(!_0x531501)throw CliErrors[_0x3671fa(0xb6)](_0x3671fa(0xd2)+_0x329a50[_0x3671fa(0xe1)]+_0x3671fa(0xae));return executeSdkBff(_0x531501,_0x1bf759[_0x3671fa(0xa6)]);}throw CliErrors[_0x3671fa(0xb6)]('Unsupported\x20service\x20target\x20kind:\x20'+_0x1bf759[_0x3671fa(0xa2)]);}async function resolveDatasetCode(_0x49db08,_0x27c21a,_0x27e6c7){const _0x5b32ff=a65_0x31fa;if(_0x49db08[_0x5b32ff(0xeb)])return _0x49db08['datasetCode'];if(!_0x49db08[_0x5b32ff(0xed)])throw CliErrors[_0x5b32ff(0xb6)](_0x5b32ff(0xd2)+_0x27c21a[_0x5b32ff(0xe1)]+_0x5b32ff(0x94));const _0x3b0494=await listDatasets(_0x27e6c7[_0x5b32ff(0xf9)]),_0x7f2cc5=_0x3b0494[_0x5b32ff(0xaa)](_0x588ec3=>_0x588ec3[_0x5b32ff(0xa0)]?.[_0x5b32ff(0x91)]===_0x49db08[_0x5b32ff(0xed)]);if(!_0x7f2cc5?.['code'])throw CliErrors['validation'](_0x5b32ff(0xd4)+_0x49db08['datatable']+_0x5b32ff(0xcb)+_0x27e6c7[_0x5b32ff(0xf9)]+'.','Use\x20lovrabet\x20dataset\x20list\x20to\x20confirm\x20the\x20physical\x20table\x20name\x20or\x20add\x20target.datasetCode\x20to\x20the\x20manifest.');return _0x7f2cc5[_0x5b32ff(0xc9)];}function applyAppBinding(_0x3ac152,_0x33c670,_0x5b662e){const _0x51ae90=a65_0x31fa,_0x68c2f9=_0x33c670[_0x51ae90(0xfb)][_0x51ae90(0xef)];if(!_0x68c2f9)return;const _0x4b9703=_0x3ac152[_0x51ae90(0xc6)][_0x68c2f9];if(!_0x4b9703)throw CliErrors['validation']('Unknown\x20appRef\x20\x22'+_0x68c2f9+'\x22\x20in\x20service\x20command\x20'+_0x33c670[_0x51ae90(0xe1)]+'.',_0x51ae90(0xc4));const _0x1e84c5=_0x4b9703[_0x51ae90(0xd6)]||_0x4b9703[_0x51ae90(0xf9)];_0x1e84c5&&!hasText(_0x5b662e['appcode'])&&(_0x5b662e[_0x51ae90(0xd6)]=_0x1e84c5),_0x4b9703[_0x51ae90(0xb3)]&&!hasText(_0x5b662e['app'])&&!hasText(_0x5b662e[_0x51ae90(0xd6)])&&(_0x5b662e[_0x51ae90(0xb3)]=_0x4b9703['app']),_0x4b9703['env']&&!hasText(_0x5b662e['env'])&&(_0x5b662e[_0x51ae90(0xcf)]=_0x4b9703[_0x51ae90(0xcf)]);}function renderDynamicCommandHelp(_0xef613){const _0x158d29=a65_0x31fa,_0x3cf82f=[_0x158d29(0xaf),_0x158d29(0xd1)+_0xef613[_0x158d29(0xfb)][_0x158d29(0xa2)],'\x20\x20\x20\x20command:\x20'+_0xef613['target']['command']];if(_0xef613[_0x158d29(0xfb)][_0x158d29(0xeb)])_0x3cf82f['push'](_0x158d29(0x9b)+_0xef613['target'][_0x158d29(0xeb)]);if(_0xef613[_0x158d29(0xfb)][_0x158d29(0xed)])_0x3cf82f[_0x158d29(0xa7)](_0x158d29(0x97)+_0xef613[_0x158d29(0xfb)][_0x158d29(0xed)]);if(_0xef613[_0x158d29(0xfb)]['sqlCode'])_0x3cf82f[_0x158d29(0xa7)]('\x20\x20\x20\x20sqlCode:\x20'+_0xef613['target']['sqlCode']);if(_0xef613[_0x158d29(0xfb)][_0x158d29(0xc1)])_0x3cf82f[_0x158d29(0xa7)](_0x158d29(0xab)+_0xef613[_0x158d29(0xfb)]['scriptName']);if(_0xef613['mapTo']['length']>0x0){_0x3cf82f[_0x158d29(0xa7)]('',_0x158d29(0xb2));for(const _0x380771 of _0xef613[_0x158d29(0xbd)]){_0x3cf82f[_0x158d29(0xa7)](_0x158d29(0xba)+(_0x380771['source']||_0x158d29(0xc0))+_0x158d29(0xc3)+_0x380771['target']+(_0x380771[_0x158d29(0xad)]?'.'+_0x380771[_0x158d29(0xad)]:''));}}return _0x3cf82f[_0x158d29(0xfa)]('\x0a');}function targetPreview(_0x5c55c4){const _0x64b5d6=a65_0x31fa;return{'kind':_0x5c55c4['kind'],'command':_0x5c55c4[_0x64b5d6(0xf8)],'appRef':_0x5c55c4[_0x64b5d6(0xef)],'datasetCode':_0x5c55c4[_0x64b5d6(0xeb)],'datatable':_0x5c55c4[_0x64b5d6(0xed)],'sqlCode':_0x5c55c4[_0x64b5d6(0xf2)],'bffCode':_0x5c55c4[_0x64b5d6(0xe9)],'bffId':_0x5c55c4[_0x64b5d6(0x99)],'functionName':_0x5c55c4[_0x64b5d6(0xc1)]};}function normalizeScalarParams(_0x2fdd29){const _0x443bc1=a65_0x31fa;return Object[_0x443bc1(0xda)](Object[_0x443bc1(0xa4)](_0x2fdd29)[_0x443bc1(0x9a)](([,_0x5eb478])=>typeof _0x5eb478===_0x443bc1(0x95)||typeof _0x5eb478===_0x443bc1(0xb9)));}function hasText(_0x307261){const _0x13ee36=a65_0x31fa;return typeof _0x307261===_0x13ee36(0x95)&&_0x307261[_0x13ee36(0xd9)]()[_0x13ee36(0xd7)]>0x0;}function a65_0x31fa(_0x1c3b08,_0x226f7c){_0x1c3b08=_0x1c3b08-0x91;const _0x3bf8cf=a65_0x3bf8();let _0x31fa93=_0x3bf8cf[_0x1c3b08];return _0x31fa93;}function isPrimitiveFlagDefault(_0x33e438){const _0x55d670=a65_0x31fa;return _0x33e438===undefined||typeof _0x33e438===_0x55d670(0x95)||typeof _0x33e438===_0x55d670(0xb9)||typeof _0x33e438===_0x55d670(0xe4);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x660fe9,_0x55fa82){const _0x110082=a66_0x2144,_0x23a7ee=_0x660fe9();while(!![]){try{const _0x1270ba=parseInt(_0x110082(0xf4))/0x1+parseInt(_0x110082(0xdb))/0x2*(-parseInt(_0x110082(0xe8))/0x3)+parseInt(_0x110082(0xd9))/0x4*(parseInt(_0x110082(0xef))/0x5)+-parseInt(_0x110082(0xdf))/0x6*(-parseInt(_0x110082(0xeb))/0x7)+-parseInt(_0x110082(0xf5))/0x8*(-parseInt(_0x110082(0xec))/0x9)+parseInt(_0x110082(0x100))/0xa*(-parseInt(_0x110082(0xfe))/0xb)+parseInt(_0x110082(0xe5))/0xc*(parseInt(_0x110082(0xf1))/0xd);if(_0x1270ba===_0x55fa82)break;else _0x23a7ee['push'](_0x23a7ee['shift']());}catch(_0x17e8ad){_0x23a7ee['push'](_0x23a7ee['shift']());}}}(a66_0x3bd9,0xd447a));export function adaptServiceTreeManifestForLegacyFramework(_0x1c1e07){const _0x24d31c=a66_0x2144,_0x30919a=cloneJsonValue(_0x1c1e07),_0x4f78d0=[];if(!isObjectRecord(_0x30919a))return{'manifest':_0x30919a,'errors':_0x4f78d0};return Array[_0x24d31c(0xd8)](_0x30919a['commands'])&&_0x30919a[_0x24d31c(0xe0)][_0x24d31c(0xe2)]((_0x5c4105,_0x21f8cc)=>{const _0x1ab668=_0x24d31c;if(!isObjectRecord(_0x5c4105))return;adaptBffTarget(_0x5c4105[_0x1ab668(0xf0)],'$.commands['+_0x21f8cc+_0x1ab668(0xe1),_0x4f78d0);}),adaptResources(_0x30919a[_0x24d31c(0xfd)],_0x24d31c(0xda),_0x4f78d0),{'manifest':_0x30919a,'errors':_0x4f78d0};}export function toPublicServiceTreeTarget(_0x52c9a5){const _0x1593c7=a66_0x2144,{scriptName:_0x112bf9,..._0x41fb36}=_0x52c9a5;return typeof _0x112bf9===_0x1593c7(0xf8)&&_0x112bf9[_0x1593c7(0xe9)]()&&(_0x41fb36[_0x1593c7(0xdd)]=_0x112bf9),_0x41fb36;}export function toPublicNormalizedServiceTree(_0x1e7e81){const _0x385b33=a66_0x2144;return{..._0x1e7e81,'commands':_0x1e7e81[_0x385b33(0xe0)][_0x385b33(0xed)](_0x49615b=>({..._0x49615b,'target':toPublicServiceTreeTarget(_0x49615b[_0x385b33(0xf0)])}))};}function adaptResources(_0x2663fd,_0x5f2ce2,_0x58ae0b){const _0x4c980b=a66_0x2144;if(!isObjectRecord(_0x2663fd))return;for(const [_0x4b6ed5,_0x47300d]of Object[_0x4c980b(0xe6)](_0x2663fd)){if(!isObjectRecord(_0x47300d))continue;const _0x201108=_0x5f2ce2+'.'+_0x4b6ed5;if(isObjectRecord(_0x47300d[_0x4c980b(0xde)]))for(const [_0x37cc2e,_0x43efa5]of Object['entries'](_0x47300d[_0x4c980b(0xde)])){if(!isObjectRecord(_0x43efa5))continue;const _0x5b948e=_0x201108+_0x4c980b(0xdc)+_0x37cc2e,_0x3ad481=isObjectRecord(_0x43efa5[_0x4c980b(0xf0)])&&_0x43efa5['target'][_0x4c980b(0xf2)]===_0x4c980b(0xe4);adaptBffTarget(_0x43efa5[_0x4c980b(0xf0)],_0x5b948e+'.target',_0x58ae0b),(_0x3ad481||isBffAction(_0x43efa5))&&adaptFunctionNameField(_0x43efa5,_0x5b948e,_0x58ae0b);}adaptResources(_0x47300d[_0x4c980b(0xfd)],_0x201108+_0x4c980b(0xf7),_0x58ae0b);}}function adaptBffTarget(_0x2d49ff,_0x5056fb,_0x200030){const _0x1b98ed=a66_0x2144;if(!isObjectRecord(_0x2d49ff)||_0x2d49ff[_0x1b98ed(0xf2)]!==_0x1b98ed(0xe4))return;adaptFunctionNameField(_0x2d49ff,_0x5056fb,_0x200030);}function adaptFunctionNameField(_0x119863,_0x34f2d8,_0xfd961b){const _0x5cd2bc=a66_0x2144;Object['prototype'][_0x5cd2bc(0xfa)][_0x5cd2bc(0xf9)](_0x119863,'scriptName')&&_0xfd961b[_0x5cd2bc(0xfc)]({'level':_0x5cd2bc(0xee),'path':_0x34f2d8+_0x5cd2bc(0xf3),'message':_0x5cd2bc(0xe3)});if(Object[_0x5cd2bc(0xea)][_0x5cd2bc(0xfa)][_0x5cd2bc(0xf9)](_0x119863,_0x5cd2bc(0xdd))){if(typeof _0x119863[_0x5cd2bc(0xdd)]!==_0x5cd2bc(0xf8)||!_0x119863[_0x5cd2bc(0xdd)][_0x5cd2bc(0xe9)]()){_0xfd961b[_0x5cd2bc(0xfc)]({'level':_0x5cd2bc(0xee),'path':_0x34f2d8+_0x5cd2bc(0xf6),'message':_0x5cd2bc(0xd7)}),delete _0x119863[_0x5cd2bc(0xdd)];return;}_0x119863['scriptName']=_0x119863[_0x5cd2bc(0xdd)],delete _0x119863[_0x5cd2bc(0xdd)];}}function isBffAction(_0x292d30){const _0x452316=a66_0x2144;return _0x292d30[_0x452316(0xf2)]===_0x452316(0xe4)||_0x292d30['action']==='bff.exec'||_0x292d30['target']===_0x452316(0xe7);}function a66_0x2144(_0x3fa76d,_0x2d4d84){_0x3fa76d=_0x3fa76d-0xd7;const _0x3bd9ca=a66_0x3bd9();let _0x21442f=_0x3bd9ca[_0x3fa76d];return _0x21442f;}function cloneJsonValue(_0x1dce2c){const _0x5e5f68=a66_0x2144;if(Array[_0x5e5f68(0xd8)](_0x1dce2c))return _0x1dce2c['map'](_0x5a18ee=>cloneJsonValue(_0x5a18ee));if(isObjectRecord(_0x1dce2c))return Object[_0x5e5f68(0xff)](Object[_0x5e5f68(0xe6)](_0x1dce2c)[_0x5e5f68(0xed)](([_0x2abd2d,_0x539ce4])=>[_0x2abd2d,cloneJsonValue(_0x539ce4)]));return _0x1dce2c;}function isObjectRecord(_0x3b0ebf){const _0x28c0a0=a66_0x2144;return Boolean(_0x3b0ebf)&&typeof _0x3b0ebf===_0x28c0a0(0xfb)&&!Array[_0x28c0a0(0xd8)](_0x3b0ebf);}function a66_0x3bd9(){const _0x24b4dc=['error','1720txbcKw','target','16189004KuqNjk','kind','.scriptName','706411vvxqfE','6322552AUakGw','.functionName','.resources','string','call','hasOwnProperty','object','push','resources','578644BfBEDQ','fromEntries','310tCvCzr','functionName\x20must\x20be\x20a\x20non-empty\x20string.','isArray','13276FsEHQx','$.resources','4ObSMqs','.actions.','functionName','actions','6kmMuBl','commands','].target','forEach','Use\x20functionName;\x20scriptName\x20is\x20not\x20part\x20of\x20the\x20runtime\x20Service\x20Tree\x20contract.','bff','12vnycAu','entries','bff.exec','2597349reFfjt','trim','prototype','2436098ZOlJJK','9FqZNTp','map'];a66_0x3bd9=function(){return _0x24b4dc;};return a66_0x3bd9();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a67_0x14f0(){const _0x122aae=['Service\x20Tree\x20manifest\x20file\x20path','version','serviceCode','filePath','description','registryServiceCode','Import\x20a\x20Service\x20Tree\x20manifest\x20into\x20the\x20local\x20runtime\x20registry','commands','entry','read','Validate\x20a\x20Service\x20Tree\x20JSON\x20manifest','registry','name','160912gXPVKJ','\x20service(s).','updated','lower\x20kebab-case\x20service\x20code','1187154MaQjgJ','source','imported','replaced','required','manifests','Imported','Preview\x20Service\x20Tree\x20removal\x20from\x20~/.lovrabet/service.json','206922wszFGd','importedAt','119BFAitq','List\x20locally\x20imported\x20Service\x20Tree\x20manifests','Preview\x20Service\x20Tree\x20import\x20into\x20~/.lovrabet/service.json','service','120644iBzLkR','map','length','write','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.','manifest','Remove\x20a\x20Service\x20Tree\x20manifest\x20from\x20the\x20local\x20runtime\x20registry','3307158dgaEyN','type','hash','1085490qfsISV','Show\x20a\x20locally\x20imported\x20Service\x20Tree\x20manifest','kind','export','Imported\x20','536888qlZnvw','serviceCount','validate','str','target','3GAJopw','8TbHkEO','string','flags','Local\x20service\x20code,\x20for\x20example\x20crm','WRITE','errors','Export\x20the\x20local\x20Service\x20Tree\x20manifest\x20to\x20a\x20JSON\x20file','cliName','detail','entries','registryPath','normalizedManifest','file','report','10QeZGOg','warnings'];a67_0x14f0=function(){return _0x122aae;};return a67_0x14f0();}function a67_0x4c67(_0x4c9666,_0x1a7652){_0x4c9666=_0x4c9666-0x1af;const _0x14f0ec=a67_0x14f0();let _0x4c6737=_0x14f0ec[_0x4c9666];return _0x4c6737;}const a67_0x176f3c=a67_0x4c67;(function(_0x5714bf,_0x999f58){const _0x1f15f6=a67_0x4c67,_0x1031b8=_0x5714bf();while(!![]){try{const _0x27c4ca=parseInt(_0x1f15f6(0x1f1))/0x1+parseInt(_0x1f15f6(0x1b1))/0x2+-parseInt(_0x1f15f6(0x1d3))/0x3*(-parseInt(_0x1f15f6(0x1bf))/0x4)+-parseInt(_0x1f15f6(0x1c9))/0x5+parseInt(_0x1f15f6(0x1b9))/0x6*(-parseInt(_0x1f15f6(0x1bb))/0x7)+parseInt(_0x1f15f6(0x1d4))/0x8*(parseInt(_0x1f15f6(0x1c6))/0x9)+-parseInt(_0x1f15f6(0x1e2))/0xa*(parseInt(_0x1f15f6(0x1ce))/0xb);if(_0x27c4ca===_0x999f58)break;else _0x1031b8['push'](_0x1031b8['shift']());}catch(_0x1604e0){_0x1031b8['push'](_0x1031b8['shift']());}}}(a67_0x14f0,0x49397));import{exportServiceManifest,formatValidationFailure,getLocalServiceEntry,getServiceRegistryPath,importServiceManifest,listLocalServices,loadServiceManifestFromFile,removeServiceManifest}from'../../commands/service/registry.js';import{toPublicNormalizedServiceTree,toPublicServiceTreeTarget}from'../../commands/service/function-name-adapter.js';const FILE_FLAG={'name':a67_0x176f3c(0x1e0),'type':a67_0x176f3c(0x1d5),'required':!![],'description':a67_0x176f3c(0x1e4)},SERVICE_FLAG={'name':a67_0x176f3c(0x1be),'type':a67_0x176f3c(0x1d5),'required':!![],'description':a67_0x176f3c(0x1d7),'pattern':{'regex':/^[a-z][a-z0-9-]*$/,'description':a67_0x176f3c(0x1b0)}};function summarizeService(_0x2a987a){const _0xd2c140=a67_0x176f3c;return{'serviceCode':_0x2a987a[_0xd2c140(0x1e6)],'name':_0x2a987a[_0xd2c140(0x1df)][_0xd2c140(0x1be)][_0xd2c140(0x1f0)],'version':_0x2a987a[_0xd2c140(0x1e5)],'importedAt':_0x2a987a[_0xd2c140(0x1ba)],'source':_0x2a987a[_0xd2c140(0x1b2)],'commandCount':_0x2a987a[_0xd2c140(0x1df)][_0xd2c140(0x1eb)][_0xd2c140(0x1c1)],'commands':_0x2a987a[_0xd2c140(0x1df)][_0xd2c140(0x1eb)][_0xd2c140(0x1c0)](_0x368e0f=>({'path':_0x368e0f['cliPath'],'description':_0x368e0f[_0xd2c140(0x1e8)],'risk':_0x368e0f['risk'],'target':toPublicServiceTreeTarget(_0x368e0f[_0xd2c140(0x1d2)]),'flags':_0x368e0f[_0xd2c140(0x1d6)][_0xd2c140(0x1c0)](_0x2e8d16=>({'name':_0x2e8d16[_0xd2c140(0x1f0)],'cliName':_0x2e8d16[_0xd2c140(0x1db)],'type':_0x2e8d16[_0xd2c140(0x1c7)],'required':_0x2e8d16[_0xd2c140(0x1b5)]===!![]}))}))};}function summarizeLoadedManifest(_0x11210d){const _0x175529=a67_0x176f3c;return{'service':_0x11210d[_0x175529(0x1df)]?.['service'],'version':_0x11210d[_0x175529(0x1df)]?.[_0x175529(0x1e5)],'commandCount':_0x11210d[_0x175529(0x1df)]?.[_0x175529(0x1eb)][_0x175529(0x1c1)]??0x0,'commands':_0x11210d[_0x175529(0x1df)]?.[_0x175529(0x1eb)][_0x175529(0x1c0)](_0x40aaf5=>({'path':_0x40aaf5['cliPath'],'risk':_0x40aaf5['risk'],'target':toPublicServiceTreeTarget(_0x40aaf5['target'])}))??[],'registryIndex':_0x11210d['registryIndex'],'registryServiceCode':_0x11210d[_0x175529(0x1e9)],'errors':_0x11210d['report'][_0x175529(0x1d9)],'warnings':_0x11210d[_0x175529(0x1e1)]['warnings']};}export const serviceDefinitions=[{'service':'service','command':a67_0x176f3c(0x1d0),'description':a67_0x176f3c(0x1ee),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'execute'(_0x1ef0af){const _0x56054f=a67_0x176f3c,_0x5805a4=loadServiceManifestFromFile(_0x1ef0af[_0x56054f(0x1d1)](_0x56054f(0x1e0)));if(!_0x5805a4[_0x56054f(0x1e1)]['ok'])return{'ok':![],'data':{'file':_0x5805a4[_0x56054f(0x1e7)],'hash':_0x5805a4[_0x56054f(0x1c8)],'kind':_0x5805a4[_0x56054f(0x1cb)],'serviceCount':_0x5805a4[_0x56054f(0x1b6)][_0x56054f(0x1c1)],'services':_0x5805a4[_0x56054f(0x1b6)]['map'](summarizeLoadedManifest),'errors':_0x5805a4[_0x56054f(0x1e1)][_0x56054f(0x1d9)],'warnings':_0x5805a4[_0x56054f(0x1e1)][_0x56054f(0x1e3)]},'message':formatValidationFailure(_0x5805a4[_0x56054f(0x1e1)])};if(_0x5805a4['kind']===_0x56054f(0x1ef)||_0x5805a4[_0x56054f(0x1b6)]['length']!==0x1)return{'ok':!![],'data':{'file':_0x5805a4[_0x56054f(0x1e7)],'hash':_0x5805a4[_0x56054f(0x1c8)],'kind':_0x5805a4['kind'],'serviceCount':_0x5805a4[_0x56054f(0x1b6)][_0x56054f(0x1c1)],'commandCount':_0x5805a4[_0x56054f(0x1b6)]['reduce']((_0x3fd536,_0x48e531)=>_0x3fd536+(_0x48e531[_0x56054f(0x1df)]?.[_0x56054f(0x1eb)][_0x56054f(0x1c1)]??0x0),0x0),'services':_0x5805a4['manifests'][_0x56054f(0x1c0)](summarizeLoadedManifest),'warnings':_0x5805a4[_0x56054f(0x1e1)]['warnings']},'message':'Service\x20registry\x20validation\x20passed.'};return{'ok':!![],'data':{'file':_0x5805a4[_0x56054f(0x1e7)],'hash':_0x5805a4[_0x56054f(0x1c8)],'kind':_0x5805a4['kind'],'service':_0x5805a4[_0x56054f(0x1df)]?.[_0x56054f(0x1be)],'version':_0x5805a4[_0x56054f(0x1df)]?.[_0x56054f(0x1e5)],'commandCount':_0x5805a4[_0x56054f(0x1df)]?.[_0x56054f(0x1eb)][_0x56054f(0x1c1)]??0x0,'commands':_0x5805a4[_0x56054f(0x1df)]?.[_0x56054f(0x1eb)][_0x56054f(0x1c0)](_0x5e5850=>({'path':_0x5e5850['cliPath'],'risk':_0x5e5850['risk'],'target':toPublicServiceTreeTarget(_0x5e5850[_0x56054f(0x1d2)])})),'warnings':_0x5805a4['report'][_0x56054f(0x1e3)]},'message':'Service\x20manifest\x20validation\x20passed.'};}},{'service':a67_0x176f3c(0x1be),'command':'import','description':a67_0x176f3c(0x1ea),'risk':'write','confirmationDescription':a67_0x176f3c(0x1c3),'requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'dryRun'(_0x527c2e){const _0x2341a3=a67_0x176f3c,_0x11e3ad=loadServiceManifestFromFile(_0x527c2e['str'](_0x2341a3(0x1e0)));return{'method':'WRITE','url':getServiceRegistryPath(),'body':{'file':_0x11e3ad[_0x2341a3(0x1e7)],'hash':_0x11e3ad[_0x2341a3(0x1c8)],'kind':_0x11e3ad[_0x2341a3(0x1cb)],'ok':_0x11e3ad[_0x2341a3(0x1e1)]['ok'],'service':_0x11e3ad[_0x2341a3(0x1df)]?.['service'],'version':_0x11e3ad[_0x2341a3(0x1df)]?.[_0x2341a3(0x1e5)],'serviceCount':_0x11e3ad['manifests']['length'],'services':_0x11e3ad['manifests'][_0x2341a3(0x1c0)](_0x3aa5a3=>({'service':_0x3aa5a3[_0x2341a3(0x1df)]?.[_0x2341a3(0x1be)],'version':_0x3aa5a3[_0x2341a3(0x1df)]?.[_0x2341a3(0x1e5)],'commandCount':_0x3aa5a3[_0x2341a3(0x1df)]?.['commands'][_0x2341a3(0x1c1)]??0x0,'errors':_0x3aa5a3[_0x2341a3(0x1e1)]['errors']})),'errors':_0x11e3ad[_0x2341a3(0x1e1)]['errors'],'commandCount':_0x11e3ad[_0x2341a3(0x1df)]?.[_0x2341a3(0x1eb)][_0x2341a3(0x1c1)]??0x0},'description':_0x2341a3(0x1bd)};},async 'execute'(_0x3bf514){const _0x2ab257=a67_0x176f3c,_0x42a8d4=importServiceManifest(_0x3bf514[_0x2ab257(0x1d1)]('file'));if(_0x42a8d4[_0x2ab257(0x1dd)]['length']!==0x1)return{'ok':!![],'data':{'registryPath':_0x42a8d4[_0x2ab257(0x1de)],'imported':_0x42a8d4['imported'],'updated':_0x42a8d4[_0x2ab257(0x1af)],'serviceCount':_0x42a8d4[_0x2ab257(0x1cf)],'services':_0x42a8d4['entries'][_0x2ab257(0x1c0)](summarizeService)},'message':_0x2ab257(0x1cd)+_0x42a8d4[_0x2ab257(0x1b3)]+'\x20service(s),\x20updated\x20'+_0x42a8d4[_0x2ab257(0x1af)]+_0x2ab257(0x1f2)};return{'ok':!![],'data':{'registryPath':_0x42a8d4['registryPath'],'replaced':_0x42a8d4[_0x2ab257(0x1b4)],'imported':_0x42a8d4[_0x2ab257(0x1b3)],'updated':_0x42a8d4['updated'],'serviceCount':_0x42a8d4['serviceCount'],'service':summarizeService(_0x42a8d4[_0x2ab257(0x1ec)])},'message':(_0x42a8d4[_0x2ab257(0x1b4)]?'Updated':_0x2ab257(0x1b7))+'\x20service\x20'+_0x42a8d4[_0x2ab257(0x1ec)][_0x2ab257(0x1e6)]+'.'};}},{'service':a67_0x176f3c(0x1be),'command':a67_0x176f3c(0x1cc),'description':a67_0x176f3c(0x1da),'risk':a67_0x176f3c(0x1c2),'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'(_0x1a2af7){const _0xc4df56=a67_0x176f3c,_0x58db6d=getLocalServiceEntry(_0x1a2af7[_0xc4df56(0x1d1)](_0xc4df56(0x1be)));return{'method':_0xc4df56(0x1d8),'url':_0x1a2af7['str'](_0xc4df56(0x1e0)),'body':{'service':_0x1a2af7['str'](_0xc4df56(0x1be)),'found':Boolean(_0x58db6d),'version':_0x58db6d?.[_0xc4df56(0x1e5)],'source':_0x58db6d?.['source']},'description':'Preview\x20Service\x20Tree\x20export\x20from\x20~/.lovrabet/service.json'};},async 'execute'(_0x491afa){const _0x2d0bad=a67_0x176f3c,_0x4d38b0=exportServiceManifest(_0x491afa[_0x2d0bad(0x1d1)](_0x2d0bad(0x1be)),_0x491afa[_0x2d0bad(0x1d1)](_0x2d0bad(0x1e0)));return{'ok':!![],'data':{'registryPath':_0x4d38b0[_0x2d0bad(0x1de)],'file':_0x4d38b0['filePath'],'service':summarizeService(_0x4d38b0[_0x2d0bad(0x1ec)])},'message':'Exported\x20service\x20'+_0x4d38b0[_0x2d0bad(0x1ec)][_0x2d0bad(0x1e6)]+'.'};}},{'service':'service','command':'list','description':a67_0x176f3c(0x1bc),'risk':a67_0x176f3c(0x1ed),'requiresAuth':![],'requiresAppCode':![],'flags':[],async 'execute'(){const _0x5873fa=a67_0x176f3c,_0x320e16=listLocalServices();return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'total':_0x320e16[_0x5873fa(0x1c1)],'services':_0x320e16[_0x5873fa(0x1c0)](summarizeService)}};}},{'service':a67_0x176f3c(0x1be),'command':'remove','description':a67_0x176f3c(0x1c5),'risk':a67_0x176f3c(0x1c2),'confirmationDescription':'Removes\x20the\x20given\x20service\x20manifest\x20from\x20the\x20local\x20Service\x20Tree\x20registry.\x20Dynamic\x20commands\x20from\x20that\x20manifest\x20will\x20no\x20longer\x20be\x20available.','requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'dryRun'(_0x3cec45){const _0x1d9c38=a67_0x176f3c,_0xf44012=getLocalServiceEntry(_0x3cec45['str'](_0x1d9c38(0x1be)));return{'method':_0x1d9c38(0x1d8),'url':getServiceRegistryPath(),'body':{'service':_0x3cec45[_0x1d9c38(0x1d1)](_0x1d9c38(0x1be)),'found':Boolean(_0xf44012),'version':_0xf44012?.[_0x1d9c38(0x1e5)],'source':_0xf44012?.['source']},'description':_0x1d9c38(0x1b8)};},async 'execute'(_0x573ce1){const _0x4c52c3=a67_0x176f3c,_0x425997=removeServiceManifest(_0x573ce1[_0x4c52c3(0x1d1)](_0x4c52c3(0x1be)));return{'ok':!![],'data':{'registryPath':_0x425997['registryPath'],'serviceCount':_0x425997[_0x4c52c3(0x1cf)],'service':summarizeService(_0x425997[_0x4c52c3(0x1ec)])},'message':'Removed\x20service\x20'+_0x425997[_0x4c52c3(0x1ec)][_0x4c52c3(0x1e6)]+'.'};}},{'service':a67_0x176f3c(0x1be),'command':a67_0x176f3c(0x1dc),'description':a67_0x176f3c(0x1ca),'risk':a67_0x176f3c(0x1ed),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'execute'(_0x16707f){const _0x16241b=a67_0x176f3c,_0x479fc5=getLocalServiceEntry(_0x16707f[_0x16241b(0x1d1)](_0x16241b(0x1be)));if(!_0x479fc5)return{'ok':![],'data':{'registryPath':getServiceRegistryPath(),'service':_0x16707f[_0x16241b(0x1d1)]('service')},'message':'Local\x20service\x20not\x20found:\x20'+_0x16707f['str']('service')};return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'service':summarizeService(_0x479fc5),'manifest':_0x479fc5[_0x16241b(0x1c4)],'normalizedManifest':toPublicNormalizedServiceTree(_0x479fc5[_0x16241b(0x1df)])}};}}];
|
|
1
|
+
const a67_0x19959d=a67_0x3c27;function a67_0x19f6(){const _0xb8c022=['4645iCFqlo','commands','lower\x20kebab-case\x20service\x20code','Preview\x20Service\x20Tree\x20import\x20into\x20~/.lovrabet/service.json','serviceCount','entries','manifests','name','updated','List\x20locally\x20imported\x20Service\x20Tree\x20manifests','filePath','4434727YONGsj','1507719VlhyyJ','\x20service(s).','WRITE','str','Local\x20service\x20not\x20found:\x20','entry','service','source','16YSssIV','2568ewzILO','cliPath','length','\x20service\x20','Removes\x20the\x20given\x20service\x20manifest\x20from\x20the\x20local\x20Service\x20Tree\x20registry.\x20Dynamic\x20commands\x20from\x20that\x20manifest\x20will\x20no\x20longer\x20be\x20available.','kind','Validate\x20a\x20Service\x20Tree\x20JSON\x20manifest','map','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.','cliName','imported','import','importedAt','target','list','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.','replaced','write','errors','warnings','export','4204270BtWdIj','3298MDQYbS','read','string','Show\x20a\x20locally\x20imported\x20Service\x20Tree\x20manifest','type','manifest','18ZprtcT','Imported','risk','registry','flags','580538NkzJeH','version','description','hash','file','required','Preview\x20Service\x20Tree\x20export\x20from\x20~/.lovrabet/service.json','normalizedManifest','1545348iUCGMd','109MCJKdz','registryPath','Exported\x20service\x20','Service\x20registry\x20validation\x20passed.','serviceCode','registryServiceCode','report','Preview\x20Service\x20Tree\x20removal\x20from\x20~/.lovrabet/service.json','Removed\x20service\x20','Import\x20a\x20Service\x20Tree\x20manifest\x20into\x20the\x20local\x20runtime\x20registry','Remove\x20a\x20Service\x20Tree\x20manifest\x20from\x20the\x20local\x20runtime\x20registry'];a67_0x19f6=function(){return _0xb8c022;};return a67_0x19f6();}(function(_0x35fc2e,_0x56057b){const _0x21ffaf=a67_0x3c27,_0x2a8c7c=_0x35fc2e();while(!![]){try{const _0x3e42de=parseInt(_0x21ffaf(0x1f1))/0x1*(-parseInt(_0x21ffaf(0x1dd))/0x2)+-parseInt(_0x21ffaf(0x1be))/0x3+parseInt(_0x21ffaf(0x1c7))/0x4*(parseInt(_0x21ffaf(0x1b2))/0x5)+parseInt(_0x21ffaf(0x1f0))/0x6+parseInt(_0x21ffaf(0x1e8))/0x7*(-parseInt(_0x21ffaf(0x1c6))/0x8)+-parseInt(_0x21ffaf(0x1e3))/0x9*(-parseInt(_0x21ffaf(0x1dc))/0xa)+-parseInt(_0x21ffaf(0x1bd))/0xb;if(_0x3e42de===_0x56057b)break;else _0x2a8c7c['push'](_0x2a8c7c['shift']());}catch(_0x2252f0){_0x2a8c7c['push'](_0x2a8c7c['shift']());}}}(a67_0x19f6,0x6c463));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':'string','required':!![],'description':'Service\x20Tree\x20manifest\x20file\x20path'},SERVICE_FLAG={'name':a67_0x19959d(0x1c4),'type':a67_0x19959d(0x1df),'required':!![],'description':'Local\x20service\x20code,\x20for\x20example\x20crm','pattern':{'regex':/^[a-z][a-z0-9-]*$/,'description':a67_0x19959d(0x1b4)}};function a67_0x3c27(_0x45fa78,_0x400fde){_0x45fa78=_0x45fa78-0x1ab;const _0x19f6f3=a67_0x19f6();let _0x3c2757=_0x19f6f3[_0x45fa78];return _0x3c2757;}function summarizeService(_0x1d3071){const _0x413af4=a67_0x19959d;return{'serviceCode':_0x1d3071['serviceCode'],'name':_0x1d3071[_0x413af4(0x1ef)][_0x413af4(0x1c4)][_0x413af4(0x1b9)],'version':_0x1d3071[_0x413af4(0x1e9)],'importedAt':_0x1d3071[_0x413af4(0x1d3)],'source':_0x1d3071['source'],'commandCount':_0x1d3071[_0x413af4(0x1ef)][_0x413af4(0x1b3)][_0x413af4(0x1c9)],'commands':_0x1d3071['normalizedManifest'][_0x413af4(0x1b3)][_0x413af4(0x1ce)](_0x33d081=>({'path':_0x33d081['cliPath'],'description':_0x33d081[_0x413af4(0x1ea)],'risk':_0x33d081[_0x413af4(0x1e5)],'target':toPublicServiceTreeTarget(_0x33d081[_0x413af4(0x1d4)]),'flags':_0x33d081[_0x413af4(0x1e7)]['map'](_0x4b7f0d=>({'name':_0x4b7f0d['name'],'cliName':_0x4b7f0d[_0x413af4(0x1d0)],'type':_0x4b7f0d[_0x413af4(0x1e1)],'required':_0x4b7f0d[_0x413af4(0x1ed)]===!![]}))}))};}function summarizeLoadedManifest(_0x183a9e){const _0x5b3606=a67_0x19959d;return{'service':_0x183a9e[_0x5b3606(0x1ef)]?.[_0x5b3606(0x1c4)],'version':_0x183a9e[_0x5b3606(0x1ef)]?.[_0x5b3606(0x1e9)],'commandCount':_0x183a9e[_0x5b3606(0x1ef)]?.[_0x5b3606(0x1b3)]['length']??0x0,'commands':_0x183a9e[_0x5b3606(0x1ef)]?.[_0x5b3606(0x1b3)][_0x5b3606(0x1ce)](_0x4f66f9=>({'path':_0x4f66f9[_0x5b3606(0x1c8)],'risk':_0x4f66f9['risk'],'target':toPublicServiceTreeTarget(_0x4f66f9[_0x5b3606(0x1d4)])}))??[],'registryIndex':_0x183a9e['registryIndex'],'registryServiceCode':_0x183a9e[_0x5b3606(0x1ac)],'errors':_0x183a9e[_0x5b3606(0x1ad)]['errors'],'warnings':_0x183a9e[_0x5b3606(0x1ad)][_0x5b3606(0x1da)]};}export const serviceDefinitions=[{'service':'service','command':'validate','description':a67_0x19959d(0x1cd),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'execute'(_0x4a4a90){const _0x537db1=a67_0x19959d,_0x1eab6e=loadServiceManifestFromFile(_0x4a4a90[_0x537db1(0x1c1)]('file'));if(!_0x1eab6e['report']['ok'])return{'ok':![],'data':{'file':_0x1eab6e['filePath'],'hash':_0x1eab6e[_0x537db1(0x1eb)],'kind':_0x1eab6e[_0x537db1(0x1cc)],'serviceCount':_0x1eab6e[_0x537db1(0x1b8)]['length'],'services':_0x1eab6e[_0x537db1(0x1b8)]['map'](summarizeLoadedManifest),'errors':_0x1eab6e['report'][_0x537db1(0x1d9)],'warnings':_0x1eab6e[_0x537db1(0x1ad)][_0x537db1(0x1da)]},'message':formatValidationFailure(_0x1eab6e[_0x537db1(0x1ad)])};if(_0x1eab6e[_0x537db1(0x1cc)]===_0x537db1(0x1e6)||_0x1eab6e[_0x537db1(0x1b8)]['length']!==0x1)return{'ok':!![],'data':{'file':_0x1eab6e[_0x537db1(0x1bc)],'hash':_0x1eab6e[_0x537db1(0x1eb)],'kind':_0x1eab6e[_0x537db1(0x1cc)],'serviceCount':_0x1eab6e[_0x537db1(0x1b8)][_0x537db1(0x1c9)],'commandCount':_0x1eab6e[_0x537db1(0x1b8)]['reduce']((_0x3eff10,_0x59dbc5)=>_0x3eff10+(_0x59dbc5[_0x537db1(0x1ef)]?.[_0x537db1(0x1b3)]['length']??0x0),0x0),'services':_0x1eab6e[_0x537db1(0x1b8)][_0x537db1(0x1ce)](summarizeLoadedManifest),'warnings':_0x1eab6e[_0x537db1(0x1ad)]['warnings']},'message':_0x537db1(0x1f4)};return{'ok':!![],'data':{'file':_0x1eab6e[_0x537db1(0x1bc)],'hash':_0x1eab6e['hash'],'kind':_0x1eab6e[_0x537db1(0x1cc)],'service':_0x1eab6e[_0x537db1(0x1ef)]?.['service'],'version':_0x1eab6e[_0x537db1(0x1ef)]?.[_0x537db1(0x1e9)],'commandCount':_0x1eab6e['normalizedManifest']?.[_0x537db1(0x1b3)]['length']??0x0,'commands':_0x1eab6e[_0x537db1(0x1ef)]?.[_0x537db1(0x1b3)][_0x537db1(0x1ce)](_0x58f6cb=>({'path':_0x58f6cb['cliPath'],'risk':_0x58f6cb[_0x537db1(0x1e5)],'target':toPublicServiceTreeTarget(_0x58f6cb[_0x537db1(0x1d4)])})),'warnings':_0x1eab6e[_0x537db1(0x1ad)][_0x537db1(0x1da)]},'message':'Service\x20manifest\x20validation\x20passed.'};}},{'service':'service','command':a67_0x19959d(0x1d2),'description':a67_0x19959d(0x1b0),'risk':a67_0x19959d(0x1d8),'confirmationDescription':a67_0x19959d(0x1d6),'requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'dryRun'(_0x22b0aa){const _0x4330d6=a67_0x19959d,_0x5e3958=loadServiceManifestFromFile(_0x22b0aa[_0x4330d6(0x1c1)](_0x4330d6(0x1ec)));return{'method':_0x4330d6(0x1c0),'url':getServiceRegistryPath(),'body':{'file':_0x5e3958[_0x4330d6(0x1bc)],'hash':_0x5e3958[_0x4330d6(0x1eb)],'kind':_0x5e3958['kind'],'ok':_0x5e3958[_0x4330d6(0x1ad)]['ok'],'service':_0x5e3958['normalizedManifest']?.[_0x4330d6(0x1c4)],'version':_0x5e3958['normalizedManifest']?.[_0x4330d6(0x1e9)],'serviceCount':_0x5e3958[_0x4330d6(0x1b8)][_0x4330d6(0x1c9)],'services':_0x5e3958['manifests'][_0x4330d6(0x1ce)](_0x2e07e4=>({'service':_0x2e07e4[_0x4330d6(0x1ef)]?.['service'],'version':_0x2e07e4[_0x4330d6(0x1ef)]?.['version'],'commandCount':_0x2e07e4[_0x4330d6(0x1ef)]?.[_0x4330d6(0x1b3)]['length']??0x0,'errors':_0x2e07e4[_0x4330d6(0x1ad)][_0x4330d6(0x1d9)]})),'errors':_0x5e3958[_0x4330d6(0x1ad)]['errors'],'commandCount':_0x5e3958['normalizedManifest']?.[_0x4330d6(0x1b3)][_0x4330d6(0x1c9)]??0x0},'description':_0x4330d6(0x1b5)};},async 'execute'(_0x330ea3){const _0x231131=a67_0x19959d,_0x182d25=importServiceManifest(_0x330ea3[_0x231131(0x1c1)]('file'));if(_0x182d25[_0x231131(0x1b7)][_0x231131(0x1c9)]!==0x1)return{'ok':!![],'data':{'registryPath':_0x182d25['registryPath'],'imported':_0x182d25[_0x231131(0x1d1)],'updated':_0x182d25['updated'],'serviceCount':_0x182d25[_0x231131(0x1b6)],'services':_0x182d25[_0x231131(0x1b7)]['map'](summarizeService)},'message':'Imported\x20'+_0x182d25[_0x231131(0x1d1)]+'\x20service(s),\x20updated\x20'+_0x182d25[_0x231131(0x1ba)]+_0x231131(0x1bf)};return{'ok':!![],'data':{'registryPath':_0x182d25[_0x231131(0x1f2)],'replaced':_0x182d25['replaced'],'imported':_0x182d25[_0x231131(0x1d1)],'updated':_0x182d25[_0x231131(0x1ba)],'serviceCount':_0x182d25['serviceCount'],'service':summarizeService(_0x182d25[_0x231131(0x1c3)])},'message':(_0x182d25[_0x231131(0x1d7)]?'Updated':_0x231131(0x1e4))+_0x231131(0x1ca)+_0x182d25[_0x231131(0x1c3)]['serviceCode']+'.'};}},{'service':a67_0x19959d(0x1c4),'command':a67_0x19959d(0x1db),'description':'Export\x20the\x20local\x20Service\x20Tree\x20manifest\x20to\x20a\x20JSON\x20file','risk':'write','confirmationDescription':a67_0x19959d(0x1cf),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG,FILE_FLAG],async 'dryRun'(_0x6a18e3){const _0x304149=a67_0x19959d,_0x441c2e=getLocalServiceEntry(_0x6a18e3['str'](_0x304149(0x1c4)));return{'method':_0x304149(0x1c0),'url':_0x6a18e3[_0x304149(0x1c1)](_0x304149(0x1ec)),'body':{'service':_0x6a18e3[_0x304149(0x1c1)]('service'),'found':Boolean(_0x441c2e),'version':_0x441c2e?.[_0x304149(0x1e9)],'source':_0x441c2e?.[_0x304149(0x1c5)]},'description':_0x304149(0x1ee)};},async 'execute'(_0x6ff158){const _0x368e1b=a67_0x19959d,_0x461a88=exportServiceManifest(_0x6ff158[_0x368e1b(0x1c1)](_0x368e1b(0x1c4)),_0x6ff158[_0x368e1b(0x1c1)](_0x368e1b(0x1ec)));return{'ok':!![],'data':{'registryPath':_0x461a88['registryPath'],'file':_0x461a88[_0x368e1b(0x1bc)],'service':summarizeService(_0x461a88[_0x368e1b(0x1c3)])},'message':_0x368e1b(0x1f3)+_0x461a88[_0x368e1b(0x1c3)][_0x368e1b(0x1ab)]+'.'};}},{'service':a67_0x19959d(0x1c4),'command':a67_0x19959d(0x1d5),'description':a67_0x19959d(0x1bb),'risk':a67_0x19959d(0x1de),'requiresAuth':![],'requiresAppCode':![],'flags':[],async 'execute'(){const _0x9b3b5d=a67_0x19959d,_0x594ae7=listLocalServices();return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'total':_0x594ae7[_0x9b3b5d(0x1c9)],'services':_0x594ae7['map'](summarizeService)}};}},{'service':a67_0x19959d(0x1c4),'command':'remove','description':a67_0x19959d(0x1b1),'risk':a67_0x19959d(0x1d8),'confirmationDescription':a67_0x19959d(0x1cb),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'dryRun'(_0x35c2e7){const _0x110200=a67_0x19959d,_0x1fb0ee=getLocalServiceEntry(_0x35c2e7[_0x110200(0x1c1)](_0x110200(0x1c4)));return{'method':_0x110200(0x1c0),'url':getServiceRegistryPath(),'body':{'service':_0x35c2e7['str'](_0x110200(0x1c4)),'found':Boolean(_0x1fb0ee),'version':_0x1fb0ee?.[_0x110200(0x1e9)],'source':_0x1fb0ee?.[_0x110200(0x1c5)]},'description':_0x110200(0x1ae)};},async 'execute'(_0x57915e){const _0x4b6f95=a67_0x19959d,_0x519b91=removeServiceManifest(_0x57915e[_0x4b6f95(0x1c1)](_0x4b6f95(0x1c4)));return{'ok':!![],'data':{'registryPath':_0x519b91[_0x4b6f95(0x1f2)],'serviceCount':_0x519b91[_0x4b6f95(0x1b6)],'service':summarizeService(_0x519b91['entry'])},'message':_0x4b6f95(0x1af)+_0x519b91[_0x4b6f95(0x1c3)][_0x4b6f95(0x1ab)]+'.'};}},{'service':a67_0x19959d(0x1c4),'command':'detail','description':a67_0x19959d(0x1e0),'risk':a67_0x19959d(0x1de),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'execute'(_0x5a087c){const _0xb13c00=a67_0x19959d,_0x3bb0b7=getLocalServiceEntry(_0x5a087c['str'](_0xb13c00(0x1c4)));if(!_0x3bb0b7)return{'ok':![],'data':{'registryPath':getServiceRegistryPath(),'service':_0x5a087c['str'](_0xb13c00(0x1c4))},'message':_0xb13c00(0x1c2)+_0x5a087c['str'](_0xb13c00(0x1c4))};return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'service':summarizeService(_0x3bb0b7),'manifest':_0x3bb0b7[_0xb13c00(0x1e2)],'normalizedManifest':toPublicNormalizedServiceTree(_0x3bb0b7[_0xb13c00(0x1ef)])}};}}];
|