@lovrabet/lovrabet-cli 2.3.8-beta.5 → 2.3.8-beta.7
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 +3 -3
- package/skills/lovrabet/SKILL.md +10 -2
- package/skills/lovrabet/guides/development-intent-handoff.md +58 -0
- package/skills/lovrabet.manifest.json +4 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a55_0x53926a=a55_0x7572;(function(_0x5c4e73,_0x547ce8){const _0x647238=a55_0x7572,_0x2c20e3=_0x5c4e73();while(!![]){try{const _0x886515=parseInt(_0x647238(0x92))/0x1+parseInt(_0x647238(0x85))/0x2*(parseInt(_0x647238(0x94))/0x3)+-parseInt(_0x647238(0x87))/0x4+parseInt(_0x647238(0x93))/0x5+parseInt(_0x647238(0x83))/0x6+parseInt(_0x647238(0x8b))/0x7*(parseInt(_0x647238(0x91))/0x8)+-parseInt(_0x647238(0x90))/0x9;if(_0x886515===_0x547ce8)break;else _0x2c20e3['push'](_0x2c20e3['shift']());}catch(_0xe85332){_0x2c20e3['push'](_0x2c20e3['shift']());}}}(a55_0x4100,0x82622));import{deleteRuntimeAppRole}from'../../core/api-client.js';function a55_0x4100(){const _0x310055=['997467bBSNcF','871035nvxWvi','18231xxtaqQ','/client/permit/role/delete','2880792cwrFFb','appCode','62lkNqZf','role','2403808KIfTNB','POST','high-risk-write','build','7ZzFOzW','delete','Deletes\x20the\x20custom\x20role\x20in\x20the\x20current\x20runtime\x20app.\x20Membership\x20and\x20permission\x20config\x20for\x20that\x20role\x20may\x20become\x20invalid.','Preview:\x20delete\x20a\x20runtime\x20CUSTOM\x20role','body','14412708pPhMDs','7169768uenLto'];a55_0x4100=function(){return _0x310055;};return a55_0x4100();}import{dryRun}from'../../framework/dryrun.js';function a55_0x7572(_0x27fbca,_0x5d8968){_0x27fbca=_0x27fbca-0x82;const _0x410058=a55_0x4100();let _0x7572aa=_0x410058[_0x27fbca];return _0x7572aa;}import{assertCustomRuntimeRole,getRuntimeRoleById,projectRuntimeRole,ROLE_ID_FLAG,runtimeRoleWriteResult}from'../../commands/role/shared.js';async function prepare(_0x36c20f){const _0x2850cf=a55_0x7572,_0x319d21=await getRuntimeRoleById(_0x36c20f[_0x2850cf(0x84)],_0x36c20f['num']('id'));return assertCustomRuntimeRole(_0x319d21,_0x2850cf(0x8c)),_0x319d21;}export const roleDelete={'service':a55_0x53926a(0x86),'command':a55_0x53926a(0x8c),'description':'Delete\x20a\x20runtime\x20CUSTOM\x20role','risk':a55_0x53926a(0x89),'confirmationDescription':a55_0x53926a(0x8d),'flags':[ROLE_ID_FLAG],async 'dryRun'(_0x54e979){const _0x1a8396=a55_0x53926a,_0x15222b=await prepare(_0x54e979);return dryRun(_0x1a8396(0x88),'/client/permit/role/delete')[_0x1a8396(0x8f)]({'id':_0x15222b['id']})['description'](_0x1a8396(0x8e))[_0x1a8396(0x8a)]();},async 'execute'(_0x1b1ffb){const _0x509abf=a55_0x53926a,_0x3e7629=await prepare(_0x1b1ffb);return await deleteRuntimeAppRole(_0x3e7629['id']),{'ok':!![],'data':runtimeRoleWriteResult(_0x509abf(0x8c),{'roleId':_0x3e7629['id']},projectRuntimeRole(_0x3e7629),null,{'method':_0x509abf(0x88),'path':_0x509abf(0x82)})};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a56_0x2e6d19=a56_0x483c;(function(_0x183f9b,_0x5d1a14){const _0x53b708=a56_0x483c,_0x1b3e56=_0x183f9b();while(!![]){try{const _0x5db753=-parseInt(_0x53b708(0x16b))/0x1*(parseInt(_0x53b708(0x161))/0x2)+parseInt(_0x53b708(0x168))/0x3*(-parseInt(_0x53b708(0x16a))/0x4)+parseInt(_0x53b708(0x169))/0x5*(-parseInt(_0x53b708(0x162))/0x6)+parseInt(_0x53b708(0x16d))/0x7+-parseInt(_0x53b708(0x16c))/0x8*(-parseInt(_0x53b708(0x163))/0x9)+parseInt(_0x53b708(0x15e))/0xa+parseInt(_0x53b708(0x166))/0xb*(-parseInt(_0x53b708(0x160))/0xc);if(_0x5db753===_0x5d1a14)break;else _0x1b3e56['push'](_0x1b3e56['shift']());}catch(_0x58d048){_0x1b3e56['push'](_0x1b3e56['shift']());}}}(a56_0xcc0b,0x699f0));import{getRuntimeRoleById,projectRuntimeRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';function a56_0x483c(_0x304bef,_0x295a1f){_0x304bef=_0x304bef-0x15e;const _0xcc0bc0=a56_0xcc0b();let _0x483c65=_0xcc0bc0[_0x304bef];return _0x483c65;}export const roleDetail={'service':'role','command':a56_0x2e6d19(0x15f),'description':a56_0x2e6d19(0x165),'risk':a56_0x2e6d19(0x167),'flags':[ROLE_ID_FLAG],async 'execute'(_0x59229c){const _0x40d89b=a56_0x2e6d19,_0x565679=await getRuntimeRoleById(_0x59229c[_0x40d89b(0x164)],_0x59229c['num']('id'));return{'ok':!![],'data':{'scope':_0x40d89b(0x16e),'role':projectRuntimeRole(_0x565679)}};}};function a56_0xcc0b(){const _0x541bca=['read','6mTHWGG','17565oGzvPC','368164GVSsSt','3bXyqDu','8oKwgXK','5160463JNGqUY','runtime','3513340cfhvgq','detail','36ydpqeB','182706GIawIT','1302pAnUKY','7213185VHpJOt','appCode','Show\x20one\x20runtime\x20role\x20by\x20ID','868714rpRaOQ'];a56_0xcc0b=function(){return _0x541bca;};return a56_0xcc0b();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x20bc29,_0x34d5af){const _0x2f97a8=a57_0x42b1,_0x5f0160=_0x20bc29();while(!![]){try{const _0x204e2c=-parseInt(_0x2f97a8(0x9a))/0x1+-parseInt(_0x2f97a8(0x9e))/0x2*(-parseInt(_0x2f97a8(0x9b))/0x3)+parseInt(_0x2f97a8(0xa0))/0x4*(-parseInt(_0x2f97a8(0x9d))/0x5)+-parseInt(_0x2f97a8(0xa3))/0x6*(parseInt(_0x2f97a8(0xa2))/0x7)+parseInt(_0x2f97a8(0xa4))/0x8+-parseInt(_0x2f97a8(0x9f))/0x9*(-parseInt(_0x2f97a8(0xa1))/0xa)+parseInt(_0x2f97a8(0x9c))/0xb;if(_0x204e2c===_0x34d5af)break;else _0x5f0160['push'](_0x5f0160['shift']());}catch(_0xd5ab1a){_0x5f0160['push'](_0x5f0160['shift']());}}}(a57_0x10cf,0x976ad));function a57_0x42b1(_0x3dbd81,_0x3c49bf){_0x3dbd81=_0x3dbd81-0x9a;const _0x10cffe=a57_0x10cf();let _0x42b106=_0x10cffe[_0x3dbd81];return _0x42b106;}function a57_0x10cf(){const _0x345c44=['456861cIaQDa','12899436GUtSdS','170uHnCdx','4imDryd','99IYIxjI','36296oQIkrM','754530PwmhhX','2789801DyqoCV','18pgCSaK','3422792aanmHM','610732lDiybq'];a57_0x10cf=function(){return _0x345c44;};return a57_0x10cf();}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';export const roleDefinitions=[roleList,roleDetail,roleCreate,roleUpdate,roleDelete,roleUserAdd,roleUserRemove];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a58_0x1a5b(_0x39a8c,_0x116710){_0x39a8c=_0x39a8c-0x1b4;const _0x549a45=a58_0x549a();let _0x1a5b29=_0x549a45[_0x39a8c];return _0x1a5b29;}const a58_0x357771=a58_0x1a5b;function a58_0x549a(){const _0x50ed32=['pagesize','168JCzyIm','2855tGvBEg','1758015nGVFFN','Invalid\x20runtime\x20role\x20type:\x20','name','15821JQceNL','num','33sMoNyz','toUpperCase','type','1753756fwHpsZ','Page\x20size\x20from\x201\x20to\x20100','filter','3CLrRbJ','read','appCode','Fuzzy\x20role-name\x20filter','roleType','trim','runtime','4Markbt','items','112054rCFwhp','list','isSafeInteger','page','--page\x20must\x20be\x20a\x20positive\x20integer.','length','str','81216ZZsKxH','3786SAcLlJ','222030CuRPYy','string','204wZOatY','validation','map','number'];a58_0x549a=function(){return _0x50ed32;};return a58_0x549a();}(function(_0x1860c5,_0x337849){const _0x317fff=a58_0x1a5b,_0x38fb19=_0x1860c5();while(!![]){try{const _0x164dc7=-parseInt(_0x317fff(0x1bb))/0x1*(-parseInt(_0x317fff(0x1b9))/0x2)+-parseInt(_0x317fff(0x1d8))/0x3*(parseInt(_0x317fff(0x1d5))/0x4)+parseInt(_0x317fff(0x1cc))/0x5*(parseInt(_0x317fff(0x1c3))/0x6)+parseInt(_0x317fff(0x1cd))/0x7+parseInt(_0x317fff(0x1cb))/0x8*(-parseInt(_0x317fff(0x1c2))/0x9)+-parseInt(_0x317fff(0x1c4))/0xa*(-parseInt(_0x317fff(0x1d2))/0xb)+-parseInt(_0x317fff(0x1c6))/0xc*(parseInt(_0x317fff(0x1d0))/0xd);if(_0x164dc7===_0x337849)break;else _0x38fb19['push'](_0x38fb19['shift']());}catch(_0x4b65f2){_0x38fb19['push'](_0x38fb19['shift']());}}}(a58_0x549a,0x3de5b));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_0x357771(0x1bc),'description':'List\x20runtime\x20roles\x20for\x20the\x20current\x20app','risk':a58_0x357771(0x1d9),'flags':[{'name':a58_0x357771(0x1d4),'type':a58_0x357771(0x1c5),'enum':RUNTIME_ROLE_TYPES,'description':'Runtime\x20role\x20type'},{'name':'name','type':a58_0x357771(0x1c5),'description':a58_0x357771(0x1b5)},{'name':a58_0x357771(0x1be),'type':a58_0x357771(0x1c9),'default':0x1,'description':'Page\x20number'},{'name':'pagesize','type':a58_0x357771(0x1c9),'default':0x64,'description':a58_0x357771(0x1d6)}],async 'validate'(_0x7e20ab){const _0x2484b5=a58_0x357771,_0x260794=_0x7e20ab[_0x2484b5(0x1c1)](_0x2484b5(0x1d4))['toUpperCase']();if(_0x260794&&!RUNTIME_ROLE_TYPES['includes'](_0x260794))throw CliErrors['validation'](_0x2484b5(0x1ce)+_0x260794+'.');const _0x5da14d=_0x7e20ab[_0x2484b5(0x1d1)](_0x2484b5(0x1be),0x1),_0x4c6805=_0x7e20ab[_0x2484b5(0x1d1)](_0x2484b5(0x1ca),0x64);if(!Number[_0x2484b5(0x1bd)](_0x5da14d)||_0x5da14d<0x1)throw CliErrors[_0x2484b5(0x1c7)](_0x2484b5(0x1bf));if(!Number['isSafeInteger'](_0x4c6805)||_0x4c6805<0x1||_0x4c6805>0x64)throw CliErrors[_0x2484b5(0x1c7)]('--pagesize\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.');},async 'execute'(_0x4825b7){const _0x579e41=a58_0x357771,_0x5d9636=_0x4825b7[_0x579e41(0x1c1)](_0x579e41(0x1d4))[_0x579e41(0x1d3)](),_0x5b976b=_0x4825b7[_0x579e41(0x1c1)](_0x579e41(0x1cf))[_0x579e41(0x1b7)](),_0x4d326e=_0x4825b7[_0x579e41(0x1d1)](_0x579e41(0x1be),0x1),_0x3cc119=_0x4825b7[_0x579e41(0x1d1)](_0x579e41(0x1ca),0x64);if(_0x5d9636){const _0xdda189=(await listAllRuntimeRoles(_0x4825b7[_0x579e41(0x1b4)],{..._0x5b976b?{'roleName':_0x5b976b}:{}}))[_0x579e41(0x1d7)](_0x282910=>_0x282910[_0x579e41(0x1b6)]===_0x5d9636),_0x5768dc=(_0x4d326e-0x1)*_0x3cc119;return{'ok':!![],'data':{'scope':'runtime','roles':_0xdda189['slice'](_0x5768dc,_0x5768dc+_0x3cc119)[_0x579e41(0x1c8)](projectRuntimeRole),'paging':{'currentPage':_0x4d326e,'pageSize':_0x3cc119,'totalCount':_0xdda189[_0x579e41(0x1c0)]}}};}const _0x3df53c=await listRuntimeAppRoles(_0x4825b7[_0x579e41(0x1b4)],{..._0x5b976b?{'roleName':_0x5b976b}:{},'currentPage':_0x4d326e,'pageSize':_0x3cc119});return{'ok':!![],'data':{'scope':_0x579e41(0x1b8),'roles':_0x3df53c[_0x579e41(0x1ba)]['map'](projectRuntimeRole),'paging':_0x3df53c['paging']}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a59_0x6769df=a59_0x36e1;(function(_0x18b6b5,_0x17486b){const _0x4b0c09=a59_0x36e1,_0x26bfbe=_0x18b6b5();while(!![]){try{const _0x1216eb=-parseInt(_0x4b0c09(0x1da))/0x1+parseInt(_0x4b0c09(0x1c6))/0x2*(parseInt(_0x4b0c09(0x1e3))/0x3)+parseInt(_0x4b0c09(0x1d0))/0x4+-parseInt(_0x4b0c09(0x1b6))/0x5*(parseInt(_0x4b0c09(0x1a0))/0x6)+-parseInt(_0x4b0c09(0x1d2))/0x7+parseInt(_0x4b0c09(0x1e4))/0x8*(parseInt(_0x4b0c09(0x1c0))/0x9)+parseInt(_0x4b0c09(0x1bd))/0xa*(parseInt(_0x4b0c09(0x1d1))/0xb);if(_0x1216eb===_0x17486b)break;else _0x26bfbe['push'](_0x26bfbe['shift']());}catch(_0x3e029b){_0x26bfbe['push'](_0x26bfbe['shift']());}}}(a59_0x3c8e,0x6d3ff));import{listRuntimeAppUsers,listRuntimeAppRoles,listRuntimeRoleUsers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{normalizeRuntimeUserId}from'../../utils/runtime-user-id.js';function a59_0x3c8e(){const _0x42d09c=['Runtime\x20role\x20member\x20has\x20an\x20invalid\x20userId.',',\x20found\x20','remark','--role-code\x20must\x20not\x20be\x20blank.','Runtime\x20role\x20has\x20an\x20invalid\x20ID;\x20reload\x20roles\x20before\x20writing.','push','userId','Run\x20`lovrabet\x20role\x20list`\x20and\x20use\x20a\x20role\x20from\x20the\x20current\x20app.','Globally\x20unique\x20roleCode\x20(maximum\x2064\x20characters)','USER','applyUserList','Reject\x20when\x20the\x20target\x20role\x20member\x20count\x20has\x20changed','Runtime\x20role\x20ID\x20returned\x20by\x20role\x20list','isSafeInteger','Runtime\x20user\x20','trim','role-code','\x20was\x20not\x20found\x20in\x20app\x20','Invalid\x20runtime\x20userId.','4461695yalbwq','--expect-user-count\x20must\x20be\x20a\x20non-negative\x20integer.','code','Pass\x20--role\x20<id|name>.','string','Only\x20CUSTOM\x20runtime\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','Pass\x20one\x20role\x20ID:\x20','1677790KUpszP','user-add','includes','6380757huwIyu','expect-user-count','appCode','Runtime\x20role\x20name\x20\x22','ADMIN','number','36466uQDGej','flag','OWNER\x20runtime\x20role\x20membership\x20cannot\x20be\x20changed\x20with\x20this\x20command.','Reload\x20the\x20role\x20list\x20and\x20retry\x20after\x20the\x20server\x20state\x20is\x20consistent.','str','Runtime\x20userId\x20(string)','OWNER','--role-code\x20cannot\x20exceed\x2064\x20characters.','role','runtime','1250216mvvAOW','55WiGydU','5545953YBPQEV','items','Read\x20the\x20current\x20members\x20and\x20retry\x20with\x20the\x20new\x20expected\x20count.','Transfer\x20or\x20manage\x20application\x20ownership\x20through\x20the\x20dedicated\x20application\x20workflow.','userName','userList','roleName','Runtime\x20role\x20member\x20snapshot\x20has\x20an\x20invalid\x20role\x20ID;\x20reload\x20before\x20writing.','402938HyviSP','roleType','length','paging','Cannot\x20','num','Use\x20a\x20userId\x20returned\x20by\x20the\x20current\x20application\x27s\x20personnel\x20list.','User\x20','filter','111SgcrqQ','8DUWIjg','CUSTOM','Role\x20ID\x20must\x20be\x20a\x20positive\x20integer.','test','userCount','join','Pass\x20--user\x20<userId>;\x20name\x20and\x20account\x20lookup\x20are\x20not\x20available\x20in\x20runtime\x20scope.','map','\x20is\x20already\x20in\x20runtime\x20role\x20','totalCount','6ZCtKaP','\x20is\x20not\x20in\x20runtime\x20role\x20','validation'];a59_0x3c8e=function(){return _0x42d09c;};return a59_0x3c8e();}export const RUNTIME_ROLE_TYPES=[a59_0x6769df(0x1c4),a59_0x6769df(0x1ac),a59_0x6769df(0x1cc),a59_0x6769df(0x1e5)];const BUILTIN_ROLE_TYPES=[a59_0x6769df(0x1c4),a59_0x6769df(0x1ac),a59_0x6769df(0x1cc)];export const ROLE_ID_FLAG={'name':'id','type':'number','required':!![],'description':a59_0x6769df(0x1af)};export const ROLE_REF_FLAG={'name':a59_0x6769df(0x1ce),'type':'string','required':!![],'description':'Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name'};export const ROLE_CODE_FLAG={'name':a59_0x6769df(0x1b3),'type':'string','description':a59_0x6769df(0x1ab)};export const USER_ID_FLAG={'name':'user','type':a59_0x6769df(0x1ba),'required':!![],'description':a59_0x6769df(0x1cb)};export const EXPECT_USER_COUNT_FLAG={'name':'expect-user-count','type':'number','description':a59_0x6769df(0x1ae)};export function isBuiltinRuntimeRole(_0x3ee0f2){const _0x418d43=a59_0x6769df;return BUILTIN_ROLE_TYPES[_0x418d43(0x1bf)](_0x3ee0f2);}export function assertCustomRuntimeRole(_0xe779d4,_0x2a588f){const _0x2915a2=a59_0x6769df;if(_0xe779d4[_0x2915a2(0x1db)]!==_0x2915a2(0x1e5))throw CliErrors[_0x2915a2(0x1a2)](_0x2915a2(0x1de)+_0x2a588f+'\x20built-in\x20runtime\x20role\x20'+_0xe779d4[_0x2915a2(0x1d8)]+'\x20('+_0xe779d4[_0x2915a2(0x1db)]+').',_0x2915a2(0x1bb));}export function projectRuntimeRole(_0xa9dcbe){const _0x25016c=a59_0x6769df;return{'id':_0xa9dcbe['id'],'roleCode':_0xa9dcbe['roleCode'],'roleName':_0xa9dcbe[_0x25016c(0x1d8)],'roleType':_0xa9dcbe[_0x25016c(0x1db)],'remark':_0xa9dcbe[_0x25016c(0x1a5)],'userCount':_0xa9dcbe[_0x25016c(0x1e8)]??0x0,'permitCount':_0xa9dcbe['permitCount']??0x0,'builtin':isBuiltinRuntimeRole(_0xa9dcbe[_0x25016c(0x1db)])};}export function readOptionalRuntimeRoleCode(_0x2eed1e){const _0x59fc19=a59_0x6769df,_0x23d028=_0x2eed1e[_0x59fc19(0x1c7)]('role-code');if(_0x23d028===undefined||_0x23d028===null)return undefined;const _0x160a3c=String(_0x23d028)[_0x59fc19(0x1b2)]();if(!_0x160a3c)throw CliErrors['validation'](_0x59fc19(0x1a6));if(_0x160a3c[_0x59fc19(0x1dc)]>0x40)throw CliErrors[_0x59fc19(0x1a2)](_0x59fc19(0x1cd));return _0x160a3c;}export async function getRuntimeRoleById(_0x41566f,_0x334f0b){const _0x217082=a59_0x6769df;if(!Number[_0x217082(0x1b0)](_0x334f0b)||_0x334f0b<=0x0)throw CliErrors['validation'](_0x217082(0x1e6));const _0x3cbcd7=(await listAllRuntimeRoles(_0x41566f))[_0x217082(0x1e2)](_0x42bcc3=>_0x42bcc3['id']===_0x334f0b&&(!_0x42bcc3[_0x217082(0x1c2)]||_0x42bcc3[_0x217082(0x1c2)]===_0x41566f));if(_0x3cbcd7[_0x217082(0x1dc)]!==0x1)throw CliErrors[_0x217082(0x1a2)]('Runtime\x20role\x20id\x20'+_0x334f0b+'\x20was\x20not\x20found\x20in\x20app\x20'+_0x41566f+'.',_0x217082(0x1aa));const _0x43f126=_0x3cbcd7[0x0],_0x42d717=_0x43f126['id'];if(typeof _0x42d717!==_0x217082(0x1c5)||!Number[_0x217082(0x1b0)](_0x42d717)||_0x42d717<=0x0)throw CliErrors[_0x217082(0x1a2)](_0x217082(0x1a7));return{..._0x43f126,'id':_0x42d717};}function a59_0x36e1(_0x44800a,_0x5b5a3a){_0x44800a=_0x44800a-0x19e;const _0x3c8e4b=a59_0x3c8e();let _0x36e124=_0x3c8e4b[_0x44800a];return _0x36e124;}export async function listAllRuntimeRoles(_0xf85fc,_0x3ff312={}){const _0x4dafeb=a59_0x6769df,_0x3bd4da=0x64,_0x22eb3a=[];for(let _0x494480=0x1;;_0x494480+=0x1){const _0x2fd965=await listRuntimeAppRoles(_0xf85fc,{..._0x3ff312['roleName']?{'roleName':_0x3ff312[_0x4dafeb(0x1d8)]}:{},'currentPage':_0x494480,'pageSize':_0x3bd4da});_0x22eb3a[_0x4dafeb(0x1a8)](..._0x2fd965[_0x4dafeb(0x1d3)]);if(_0x2fd965[_0x4dafeb(0x1d3)][_0x4dafeb(0x1dc)]<_0x3bd4da||_0x2fd965[_0x4dafeb(0x1dd)]&&_0x22eb3a[_0x4dafeb(0x1dc)]>=_0x2fd965[_0x4dafeb(0x1dd)][_0x4dafeb(0x19f)])return _0x22eb3a;}}export async function resolveRuntimeRoleRef(_0x3a8ba0,_0x7d6d9d){const _0x10113d=a59_0x6769df,_0x3dc861=_0x7d6d9d[_0x10113d(0x1b2)]();if(!_0x3dc861)throw CliErrors[_0x10113d(0x1a2)]('Missing\x20runtime\x20role\x20reference.',_0x10113d(0x1b9));if(/^\d+$/[_0x10113d(0x1e7)](_0x3dc861))return getRuntimeRoleById(_0x3a8ba0,Number(_0x3dc861));const _0x4e690a=(await listAllRuntimeRoles(_0x3a8ba0))[_0x10113d(0x1e2)](_0x9e9ea2=>_0x9e9ea2[_0x10113d(0x1d8)]===_0x3dc861);if(_0x4e690a[_0x10113d(0x1dc)]===0x0)throw CliErrors['validation'](_0x10113d(0x1c3)+_0x3dc861+'\x22\x20was\x20not\x20found\x20in\x20app\x20'+_0x3a8ba0+'.','Run\x20`lovrabet\x20role\x20list`\x20or\x20pass\x20--role\x20<id>.');if(_0x4e690a['length']>0x1)throw CliErrors['validation'](_0x10113d(0x1c3)+_0x3dc861+'\x22\x20is\x20ambiguous.',_0x10113d(0x1bc)+_0x4e690a['map'](_0x3bb402=>_0x3bb402['id'])[_0x10113d(0x1e9)](',\x20')+'.');const _0x1fa026=_0x4e690a[0x0],_0x17e7ed=_0x1fa026['id'];if(typeof _0x17e7ed!=='number'||!Number[_0x10113d(0x1b0)](_0x17e7ed)||_0x17e7ed<=0x0)throw CliErrors['validation'](_0x10113d(0x1a7));return{..._0x1fa026,'id':_0x17e7ed};}function parseRuntimeUserId(_0x19f2c9){const _0x58b15b=a59_0x6769df,_0x974b90=_0x19f2c9[_0x58b15b(0x1b2)](),_0x24d969=normalizeRuntimeUserId(_0x974b90);if(_0x24d969===undefined)throw CliErrors[_0x58b15b(0x1a2)](_0x58b15b(0x1b5),_0x58b15b(0x1ea));return _0x24d969;}export async function prepareRuntimeMemberMutation(_0x1ede5d,_0x2a426f){const _0x40e1fc=a59_0x6769df,_0x2eff46=await resolveRuntimeRoleRef(_0x1ede5d[_0x40e1fc(0x1c2)],_0x1ede5d[_0x40e1fc(0x1ca)](_0x40e1fc(0x1ce)));if(_0x2eff46[_0x40e1fc(0x1db)]===_0x40e1fc(0x1cc))throw CliErrors[_0x40e1fc(0x1a2)](_0x40e1fc(0x1c8),_0x40e1fc(0x1d5));const _0x245a3c=parseRuntimeUserId(_0x1ede5d['str']('user')),_0x83913b=(await listRuntimeRoleUsers(_0x1ede5d[_0x40e1fc(0x1c2)]))['map'](_0x2a73fd=>{const _0x2f3745=_0x40e1fc;if(typeof _0x2a73fd['id']!==_0x2f3745(0x1c5)||!Number['isSafeInteger'](_0x2a73fd['id'])||_0x2a73fd['id']<=0x0)throw CliErrors[_0x2f3745(0x1a2)](_0x2f3745(0x1d9));return{..._0x2a73fd,'userList':[..._0x2a73fd['userList']??[]],'applyUserList':[..._0x2a73fd[_0x2f3745(0x1ad)]??[]]};}),_0x50ff3b=_0x83913b['find'](_0x18f23f=>_0x18f23f['id']===_0x2eff46['id']);if(!_0x50ff3b)throw CliErrors['validation']('Runtime\x20role\x20'+_0x2eff46['id']+'\x20is\x20missing\x20from\x20the\x20grouped\x20member\x20snapshot.',_0x40e1fc(0x1c9));const _0x1d1968=_0x46f603=>{const _0x244970=_0x40e1fc,_0x3158e4=normalizeRuntimeUserId(_0x46f603);if(_0x3158e4===undefined)throw CliErrors[_0x244970(0x1a2)](_0x244970(0x1a3));return _0x3158e4;},_0x52c28c=_0x50ff3b['userList'][_0x40e1fc(0x1eb)](_0x440498=>_0x1d1968(_0x440498[_0x40e1fc(0x1a9)])),_0x4c7892=_0x1ede5d[_0x40e1fc(0x1c7)]('expect-user-count');if(_0x4c7892!==undefined&&_0x4c7892!==null&&_0x4c7892!==''){const _0x33da77=_0x1ede5d[_0x40e1fc(0x1df)](_0x40e1fc(0x1c1));if(!Number[_0x40e1fc(0x1b0)](_0x33da77)||_0x33da77<0x0)throw CliErrors[_0x40e1fc(0x1a2)](_0x40e1fc(0x1b7));if(_0x52c28c[_0x40e1fc(0x1dc)]!==_0x33da77)throw CliErrors[_0x40e1fc(0x1a2)]('Runtime\x20role\x20member\x20count\x20changed:\x20expected\x20'+_0x33da77+_0x40e1fc(0x1a4)+_0x52c28c[_0x40e1fc(0x1dc)]+'.',_0x40e1fc(0x1d4));}const _0x23dfde=_0x52c28c['includes'](_0x245a3c),_0x240387=[];let _0x3b36a7=!![];if(_0x2a426f===_0x40e1fc(0x1be)){const _0x1c428e=await listRuntimeAppUsers(_0x1ede5d[_0x40e1fc(0x1c2)]),_0x39b3ef=_0x1c428e[_0x40e1fc(0x1e2)](_0x1bf9fb=>normalizeRuntimeUserId(_0x1bf9fb[_0x40e1fc(0x1b8)])===_0x245a3c);if(_0x39b3ef[_0x40e1fc(0x1dc)]!==0x1||!_0x39b3ef[0x0][_0x40e1fc(0x1d6)]?.[_0x40e1fc(0x1b2)]())throw CliErrors[_0x40e1fc(0x1a2)](_0x40e1fc(0x1b1)+_0x245a3c+_0x40e1fc(0x1b4)+_0x1ede5d[_0x40e1fc(0x1c2)]+'.',_0x40e1fc(0x1e0));_0x23dfde?(_0x3b36a7=![],_0x240387[_0x40e1fc(0x1a8)](_0x40e1fc(0x1e1)+_0x245a3c+_0x40e1fc(0x19e)+_0x2eff46['id']+'.')):_0x50ff3b[_0x40e1fc(0x1d7)][_0x40e1fc(0x1a8)]({'userId':_0x245a3c,'username':_0x39b3ef[0x0][_0x40e1fc(0x1d6)]});}else!_0x23dfde?(_0x3b36a7=![],_0x240387[_0x40e1fc(0x1a8)](_0x40e1fc(0x1e1)+_0x245a3c+_0x40e1fc(0x1a1)+_0x2eff46['id']+'.')):_0x50ff3b[_0x40e1fc(0x1d7)]=_0x50ff3b[_0x40e1fc(0x1d7)][_0x40e1fc(0x1e2)](_0x3eb4d4=>_0x1d1968(_0x3eb4d4[_0x40e1fc(0x1a9)])!==_0x245a3c);return{'role':_0x2eff46,'userId':_0x245a3c,'roleList':_0x83913b,'before':{'userIds':_0x52c28c},'after':{'userIds':_0x50ff3b['userList'][_0x40e1fc(0x1eb)](_0x395506=>_0x1d1968(_0x395506[_0x40e1fc(0x1a9)]))},'shouldWrite':_0x3b36a7,'warnings':_0x240387};}export function runtimeRoleWriteResult(_0xcee13d,_0x3dfa69,_0x44305a,_0x1bd930,_0x1cc6bc,_0x1288e8=[]){const _0x12cd9e=a59_0x6769df;return{'operation':_0xcee13d,'scope':_0x12cd9e(0x1cf),'selector':_0x3dfa69,'before':_0x44305a,'after':_0x1bd930,'dryRun':![],'backend':_0x1cc6bc,'warnings':_0x1288e8};}
|
|
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 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a60_0x4fd709=a60_0x3e6c;(function(_0x13a92d,_0x4ea451){const _0xdcfc34=a60_0x3e6c,_0x334478=_0x13a92d();while(!![]){try{const _0x5eeefe=-parseInt(_0xdcfc34(0x191))/0x1*(parseInt(_0xdcfc34(0x195))/0x2)+parseInt(_0xdcfc34(0x187))/0x3+-parseInt(_0xdcfc34(0x17e))/0x4*(-parseInt(_0xdcfc34(0x180))/0x5)+-parseInt(_0xdcfc34(0x18f))/0x6+-parseInt(_0xdcfc34(0x190))/0x7*(parseInt(_0xdcfc34(0x18b))/0x8)+-parseInt(_0xdcfc34(0x17a))/0x9*(parseInt(_0xdcfc34(0x178))/0xa)+-parseInt(_0xdcfc34(0x18d))/0xb*(-parseInt(_0xdcfc34(0x184))/0xc);if(_0x5eeefe===_0x4ea451)break;else _0x334478['push'](_0x334478['shift']());}catch(_0x75cf28){_0x334478['push'](_0x334478['shift']());}}}(a60_0xe225,0x4bade));import{updateRuntimeAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a60_0xe225(){const _0x248e1d=['New\x20role\x20name','8277252PTqSaz','Pass\x20--role-code,\x20--name,\x20or\x20--remark\x20to\x20update\x20the\x20runtime\x20role.','validation','1832733oxAPpV','Preview:\x20update\x20a\x20runtime\x20CUSTOM\x20role','update','/client/permit/role/update','8744fCgugZ','build','11CnCOVK','name','3121662syoymK','301LQovNi','121522XELEYe','description','POST','role-code','2eQJjva','remark','appCode','New\x20non-empty\x20role\x20remark','body','99410qfuQhd','trim','558aMMDpS','str','string','--remark\x20must\x20not\x20be\x20blank.','112kWHoKo','num','56150eCoRPX','flag','Changes\x20the\x20custom\x20role\x20code,\x20name,\x20or\x20note\x20in\x20the\x20current\x20runtime\x20app.\x20The\x20role\x20updates\x20immediately.'];a60_0xe225=function(){return _0x248e1d;};return a60_0xe225();}import{dryRun}from'../../framework/dryrun.js';function a60_0x3e6c(_0x1ea440,_0x25dc0f){_0x1ea440=_0x1ea440-0x178;const _0xe225e5=a60_0xe225();let _0x3e6cc8=_0xe225e5[_0x1ea440];return _0x3e6cc8;}import{assertCustomRuntimeRole,getRuntimeRoleById,projectRuntimeRole,readOptionalRuntimeRoleCode,ROLE_CODE_FLAG,ROLE_ID_FLAG,runtimeRoleWriteResult}from'../../commands/role/shared.js';function updateFields(_0x552800){const _0x43fb2b=a60_0x3e6c,_0x3e800c=_0x552800[_0x43fb2b(0x181)](_0x43fb2b(0x194))!==undefined,_0x28ed67=_0x552800[_0x43fb2b(0x181)](_0x43fb2b(0x18e))!==undefined,_0x25f3bd=_0x552800[_0x43fb2b(0x181)](_0x43fb2b(0x196))!==undefined;if(!_0x3e800c&&!_0x28ed67&&!_0x25f3bd)throw CliErrors[_0x43fb2b(0x186)](_0x43fb2b(0x185));const _0x4ffac5=readOptionalRuntimeRoleCode(_0x552800),_0x34da4a=_0x552800[_0x43fb2b(0x17b)]('name')[_0x43fb2b(0x179)](),_0x841a27=_0x552800[_0x43fb2b(0x17b)](_0x43fb2b(0x196))[_0x43fb2b(0x179)]();if(_0x28ed67&&!_0x34da4a)throw CliErrors[_0x43fb2b(0x186)]('--name\x20must\x20not\x20be\x20blank.');if(_0x25f3bd&&!_0x841a27)throw CliErrors['validation'](_0x43fb2b(0x17d),'The\x20current\x20runtime\x20role\x20API\x20does\x20not\x20support\x20clearing\x20an\x20existing\x20remark.');return{..._0x4ffac5?{'roleCode':_0x4ffac5}:{},..._0x28ed67?{'roleName':_0x34da4a}:{},..._0x25f3bd?{'remark':_0x841a27}:{}};}async function prepare(_0x22a07e){const _0x1c6c3d=a60_0x3e6c,_0x53be9c=await getRuntimeRoleById(_0x22a07e[_0x1c6c3d(0x197)],_0x22a07e[_0x1c6c3d(0x17f)]('id'));return assertCustomRuntimeRole(_0x53be9c,_0x1c6c3d(0x189)),{'role':_0x53be9c,'body':{'id':_0x53be9c['id'],'appCode':_0x22a07e[_0x1c6c3d(0x197)],...updateFields(_0x22a07e)}};}export const roleUpdate={'service':'role','command':a60_0x4fd709(0x189),'description':'Update\x20a\x20runtime\x20CUSTOM\x20role\x27s\x20code,\x20name,\x20or\x20remark','risk':'high-risk-write','confirmationDescription':a60_0x4fd709(0x182),'flags':[ROLE_ID_FLAG,ROLE_CODE_FLAG,{'name':a60_0x4fd709(0x18e),'type':'string','description':a60_0x4fd709(0x183)},{'name':a60_0x4fd709(0x196),'type':a60_0x4fd709(0x17c),'description':a60_0x4fd709(0x198)}],async 'validate'(_0x163831){updateFields(_0x163831);},async 'dryRun'(_0x3f350a){const _0x47937f=a60_0x4fd709,{body:_0x33391e}=await prepare(_0x3f350a);return dryRun(_0x47937f(0x193),_0x47937f(0x18a))[_0x47937f(0x199)](_0x33391e)[_0x47937f(0x192)](_0x47937f(0x188))[_0x47937f(0x18c)]();},async 'execute'(_0x5b8455){const _0x53ccb0=a60_0x4fd709,{role:_0x3c6950,body:_0x3e969f}=await prepare(_0x5b8455),_0x3b3beb=await updateRuntimeAppRole(_0x3e969f);return{'ok':!![],'data':runtimeRoleWriteResult('update',{'roleId':_0x3c6950['id']},projectRuntimeRole(_0x3c6950),projectRuntimeRole(_0x3b3beb),{'method':_0x53ccb0(0x193),'path':_0x53ccb0(0x18a)})};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a61_0x21e88e=a61_0xf8b9;(function(_0x5ad39d,_0x2ab70d){const _0x2ab952=a61_0xf8b9,_0x1195dd=_0x5ad39d();while(!![]){try{const _0x2a2283=-parseInt(_0x2ab952(0x1f3))/0x1*(parseInt(_0x2ab952(0x1ee))/0x2)+parseInt(_0x2ab952(0x1f7))/0x3+-parseInt(_0x2ab952(0x1ef))/0x4*(parseInt(_0x2ab952(0x1fc))/0x5)+-parseInt(_0x2ab952(0x1ed))/0x6*(parseInt(_0x2ab952(0x204))/0x7)+-parseInt(_0x2ab952(0x1f4))/0x8*(-parseInt(_0x2ab952(0x1f6))/0x9)+parseInt(_0x2ab952(0x1f9))/0xa*(parseInt(_0x2ab952(0x1f1))/0xb)+parseInt(_0x2ab952(0x208))/0xc;if(_0x2a2283===_0x2ab70d)break;else _0x1195dd['push'](_0x1195dd['shift']());}catch(_0x20f290){_0x1195dd['push'](_0x1195dd['shift']());}}}(a61_0x4caf,0xb4271));function a61_0x4caf(){const _0x3cf71b=['5eaVLgR','body','/client/permit/user-role/update-user-list','after','role','user-add','description','Add\x20a\x20userId\x20to\x20one\x20runtime\x20role','217QKjqVB','Preview:\x20add\x20runtime\x20role\x20member','userId','high-risk-write','17468136vQzRSs','231666SIwbrL','1462SjyLBP','4622216DqWLVu','POST','3875091LcPPVF','warnings','508GBGSKK','7056SnXcQB','roleList','5427eGkJys','2308986IgVisO','Adds\x20the\x20given\x20runtime\x20user\x20to\x20the\x20target\x20role.\x20The\x20user\x20receives\x20the\x20permissions\x20of\x20that\x20role.','20IQJhfe','appCode','shouldWrite'];a61_0x4caf=function(){return _0x3cf71b;};return a61_0x4caf();}import{updateRuntimeRoleUsers}from'../../core/api-client.js';import{dryRun}from'../../framework/dryrun.js';function a61_0xf8b9(_0x196dec,_0x594241){_0x196dec=_0x196dec-0x1ed;const _0x4caf66=a61_0x4caf();let _0xf8b980=_0x4caf66[_0x196dec];return _0xf8b980;}import{EXPECT_USER_COUNT_FLAG,prepareRuntimeMemberMutation,ROLE_REF_FLAG,runtimeRoleWriteResult,USER_ID_FLAG}from'../../commands/role/shared.js';export const roleUserAdd={'service':a61_0x21e88e(0x200),'command':a61_0x21e88e(0x201),'description':a61_0x21e88e(0x203),'risk':a61_0x21e88e(0x207),'confirmationDescription':a61_0x21e88e(0x1f8),'flags':[ROLE_REF_FLAG,USER_ID_FLAG,EXPECT_USER_COUNT_FLAG],async 'dryRun'(_0x41e3a6){const _0x1573f5=a61_0x21e88e,_0x210b7=await prepareRuntimeMemberMutation(_0x41e3a6,_0x1573f5(0x201));return dryRun(_0x1573f5(0x1f0),_0x1573f5(0x1fe))[_0x1573f5(0x1fd)]({'appCode':_0x41e3a6['appCode'],'roleList':_0x210b7['roleList']})[_0x1573f5(0x202)](_0x210b7[_0x1573f5(0x1fb)]?_0x1573f5(0x205):_0x210b7['warnings'][0x0])['build']();},async 'execute'(_0x3b2af2){const _0x2ea2d9=a61_0x21e88e,_0x4220fa=await prepareRuntimeMemberMutation(_0x3b2af2,_0x2ea2d9(0x201));return _0x4220fa['shouldWrite']&&await updateRuntimeRoleUsers(_0x3b2af2[_0x2ea2d9(0x1fa)],_0x4220fa[_0x2ea2d9(0x1f5)]),{'ok':!![],'data':runtimeRoleWriteResult(_0x2ea2d9(0x201),{'roleId':_0x4220fa[_0x2ea2d9(0x200)]['id'],'userId':_0x4220fa[_0x2ea2d9(0x206)]},_0x4220fa['before'],_0x4220fa[_0x2ea2d9(0x1ff)],{'method':'POST','path':_0x2ea2d9(0x1fe)},_0x4220fa[_0x2ea2d9(0x1f2)])};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a62_0x51de7c=a62_0x4dd9;function a62_0x54c6(){const _0x39a415=['user-remove','8ryfcPG','build','45439210NPtjHd','28HVFVZD','7073649cdJgDe','POST','high-risk-write','Preview:\x20remove\x20runtime\x20role\x20member','body','1698553hQeWlw','description','role','/client/permit/user-role/update-user-list','12spcqbh','appCode','userId','after','11aXgaAG','5743848CETLmc','1271535HHblJd','825055GBFoQf','warnings','shouldWrite','roleList','before','191217ByjORj'];a62_0x54c6=function(){return _0x39a415;};return a62_0x54c6();}(function(_0x3a2955,_0xf14249){const _0x5c5aa7=a62_0x4dd9,_0x44a26e=_0x3a2955();while(!![]){try{const _0x94863e=-parseInt(_0x5c5aa7(0x1ad))/0x1+-parseInt(_0x5c5aa7(0x1c2))/0x2*(-parseInt(_0x5c5aa7(0x1bd))/0x3)+-parseInt(_0x5c5aa7(0x1b6))/0x4+parseInt(_0x5c5aa7(0x1b7))/0x5*(-parseInt(_0x5c5aa7(0x1b1))/0x6)+-parseInt(_0x5c5aa7(0x1b8))/0x7*(parseInt(_0x5c5aa7(0x1bf))/0x8)+-parseInt(_0x5c5aa7(0x1c3))/0x9+parseInt(_0x5c5aa7(0x1c1))/0xa*(parseInt(_0x5c5aa7(0x1b5))/0xb);if(_0x94863e===_0xf14249)break;else _0x44a26e['push'](_0x44a26e['shift']());}catch(_0x3f4f8a){_0x44a26e['push'](_0x44a26e['shift']());}}}(a62_0x54c6,0xd91e0));import{updateRuntimeRoleUsers}from'../../core/api-client.js';import{dryRun}from'../../framework/dryrun.js';function a62_0x4dd9(_0x5c0482,_0x27a832){_0x5c0482=_0x5c0482-0x1aa;const _0x54c630=a62_0x54c6();let _0x4dd938=_0x54c630[_0x5c0482];return _0x4dd938;}import{EXPECT_USER_COUNT_FLAG,prepareRuntimeMemberMutation,ROLE_REF_FLAG,runtimeRoleWriteResult,USER_ID_FLAG}from'../../commands/role/shared.js';export const roleUserRemove={'service':a62_0x51de7c(0x1af),'command':a62_0x51de7c(0x1be),'description':'Remove\x20a\x20userId\x20from\x20one\x20runtime\x20role','risk':a62_0x51de7c(0x1aa),'confirmationDescription':'Removes\x20the\x20given\x20runtime\x20user\x20from\x20the\x20target\x20role.\x20The\x20user\x20loses\x20permissions\x20granted\x20only\x20by\x20that\x20role.','flags':[ROLE_REF_FLAG,USER_ID_FLAG,EXPECT_USER_COUNT_FLAG],async 'dryRun'(_0x38c27f){const _0x23ecfe=a62_0x51de7c,_0x253f87=await prepareRuntimeMemberMutation(_0x38c27f,_0x23ecfe(0x1be));return dryRun('POST',_0x23ecfe(0x1b0))[_0x23ecfe(0x1ac)]({'appCode':_0x38c27f['appCode'],'roleList':_0x253f87[_0x23ecfe(0x1bb)]})[_0x23ecfe(0x1ae)](_0x253f87[_0x23ecfe(0x1ba)]?_0x23ecfe(0x1ab):_0x253f87[_0x23ecfe(0x1b9)][0x0])[_0x23ecfe(0x1c0)]();},async 'execute'(_0x21b3a8){const _0x1c61a9=a62_0x51de7c,_0x4ae395=await prepareRuntimeMemberMutation(_0x21b3a8,_0x1c61a9(0x1be));return _0x4ae395[_0x1c61a9(0x1ba)]&&await updateRuntimeRoleUsers(_0x21b3a8[_0x1c61a9(0x1b2)],_0x4ae395[_0x1c61a9(0x1bb)]),{'ok':!![],'data':runtimeRoleWriteResult(_0x1c61a9(0x1be),{'roleId':_0x4ae395[_0x1c61a9(0x1af)]['id'],'userId':_0x4ae395[_0x1c61a9(0x1b3)]},_0x4ae395[_0x1c61a9(0x1bc)],_0x4ae395[_0x1c61a9(0x1b4)],{'method':_0x1c61a9(0x1c4),'path':_0x1c61a9(0x1b0)},_0x4ae395[_0x1c61a9(0x1b9)])};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a63_0x3e3f95=a63_0x4051;(function(_0x7b155b,_0x231481){const _0x52b0c3=a63_0x4051,_0x4ca99c=_0x7b155b();while(!![]){try{const _0x55517d=-parseInt(_0x52b0c3(0x186))/0x1+-parseInt(_0x52b0c3(0x178))/0x2*(parseInt(_0x52b0c3(0x171))/0x3)+parseInt(_0x52b0c3(0x15a))/0x4+parseInt(_0x52b0c3(0x18c))/0x5*(-parseInt(_0x52b0c3(0x189))/0x6)+-parseInt(_0x52b0c3(0x177))/0x7+-parseInt(_0x52b0c3(0x152))/0x8*(parseInt(_0x52b0c3(0x17a))/0x9)+parseInt(_0x52b0c3(0x157))/0xa*(parseInt(_0x52b0c3(0x148))/0xb);if(_0x55517d===_0x231481)break;else _0x4ca99c['push'](_0x4ca99c['shift']());}catch(_0x2d9d10){_0x4ca99c['push'](_0x4ca99c['shift']());}}}(a63_0x56cb,0x19795));import{createRuntimeSchedule,deleteRuntimeSchedule,getRuntimeSchedule,listRuntimeSchedules,runRuntimeSchedule,validateRuntimeSchedule}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const SCHEDULE_ID_PATTERN=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,KIND_FLAG={'name':a63_0x3e3f95(0x176),'type':a63_0x3e3f95(0x169),'required':!![],'enum':[a63_0x3e3f95(0x173),a63_0x3e3f95(0x16a)],'description':a63_0x3e3f95(0x174)},CRON_FLAG={'name':a63_0x3e3f95(0x18a),'type':'string','description':'Five-field\x20UTC\x20cron\x20expression\x20for\x20CRON\x20schedules'},SCHEDULED_AT_FLAG={'name':a63_0x3e3f95(0x18e),'type':a63_0x3e3f95(0x169),'description':'Canonical\x20UTC\x20ISO\x20datetime\x20for\x20ONCE\x20schedules'},TITLE_FLAG={'name':a63_0x3e3f95(0x181),'type':a63_0x3e3f95(0x169),'required':!![],'description':a63_0x3e3f95(0x162)},PROMPT_FLAG={'name':a63_0x3e3f95(0x18b),'type':a63_0x3e3f95(0x169),'required':!![],'description':a63_0x3e3f95(0x15f)},MODEL_FLAG={'name':a63_0x3e3f95(0x159),'type':'string','enum':[a63_0x3e3f95(0x183),a63_0x3e3f95(0x17b),'deepseek-v4-pro-0813'],'default':a63_0x3e3f95(0x17b),'description':a63_0x3e3f95(0x14e)},SCHEDULE_ID_FLAG={'name':'schedule-id','type':a63_0x3e3f95(0x169),'required':!![],'description':a63_0x3e3f95(0x164),'pattern':{'regex':SCHEDULE_ID_PATTERN,'description':'a\x20UUID\x20returned\x20by\x20schedule\x20create/list'}},LIMIT_FLAG={'name':a63_0x3e3f95(0x17d),'type':a63_0x3e3f95(0x185),'default':0x14,'description':'Page\x20size\x20from\x201\x20to\x20100'},CURSOR_FLAG={'name':a63_0x3e3f95(0x14d),'type':a63_0x3e3f95(0x169),'description':a63_0x3e3f95(0x170)},INPUT_FLAGS=[KIND_FLAG,CRON_FLAG,SCHEDULED_AT_FLAG,TITLE_FLAG,PROMPT_FLAG,MODEL_FLAG];function readScheduleInput(_0xf19af4){const _0x53b40d=a63_0x3e3f95,_0x1c4d23=_0xf19af4[_0x53b40d(0x172)]('kind'),_0x1ddab5=_0xf19af4[_0x53b40d(0x172)]('title')[_0x53b40d(0x158)](),_0x223ac9=_0xf19af4[_0x53b40d(0x172)]('prompt')[_0x53b40d(0x158)](),_0x5d886b=_0xf19af4['str']('model'),_0x441350=_0xf19af4['str']('cron'),_0x642e09=_0xf19af4[_0x53b40d(0x172)](_0x53b40d(0x18e));if(!_0x1ddab5)throw CliErrors['validation'](_0x53b40d(0x168));if(!_0x223ac9)throw CliErrors[_0x53b40d(0x14c)](_0x53b40d(0x163));if(_0x1c4d23===_0x53b40d(0x173)){if(!_0x441350||_0x642e09)throw CliErrors[_0x53b40d(0x14c)](_0x53b40d(0x16b));return{'kind':_0x1c4d23,'timezone':_0x53b40d(0x175),'cron':_0x441350,'title':_0x1ddab5,'prompt':_0x223ac9,'model':_0x5d886b};}if(_0x1c4d23==='ONCE'){if(!_0x642e09||_0x441350)throw CliErrors[_0x53b40d(0x14c)](_0x53b40d(0x15c));return{'kind':_0x1c4d23,'timezone':_0x53b40d(0x175),'scheduledAt':_0x642e09,'title':_0x1ddab5,'prompt':_0x223ac9,'model':_0x5d886b};}throw CliErrors[_0x53b40d(0x14c)]('--kind\x20must\x20be\x20CRON\x20or\x20ONCE.');}function scheduleCollectionPath(_0x3dc7a8){return'/api/harness/apps/'+encodeURIComponent(_0x3dc7a8)+'/schedules';}function a63_0x56cb(){const _0x40723b=['string','ONCE','CRON\x20schedules\x20require\x20--cron\x20and\x20do\x20not\x20accept\x20--scheduled-at.','Preview:\x20create\x20an\x20Agent\x20schedule','Preview:\x20run\x20schedule\x20','num','Created\x20','Opaque\x20nextCursor\x20returned\x20by\x20the\x20previous\x20list\x20call','3021MRqKKV','str','CRON','Schedule\x20kind:\x20CRON\x20or\x20ONCE','UTC','kind','433615oeSxpG','146WErtgQ','validate','4122OjtydZ','deepseek-v4-flash-0731','Show\x20one\x20schedule\x20by\x20schedule\x20ID','limit','description','\x20from\x20schedule\x20','detail','title','length','kimi/k3','\x20immediately','number','119411xkdmdn','build','isSafeInteger','6axUWYF','cron','prompt','167695dATnJS','create','scheduled-at','Deleted\x20schedule\x20','4570731YvwRbE','Creates\x20a\x20schedule\x20in\x20the\x20current\x20app\x20that\x20can\x20auto-trigger\x20an\x20Agent.\x20At\x20the\x20scheduled\x20time\x20a\x20Task\x20is\x20created\x20and\x20run.','Run\x20the\x20schedule\x20once\x20immediately\x20and\x20create\x20a\x20Task','schedule-id','validation','cursor','Task\x20model\x20used\x20when\x20the\x20schedule\x20runs','body','Preview:\x20delete\x20schedule\x20','high-risk-write','776puWCFn','delete','List\x20current\x20user\x27s\x20schedules\x20for\x20the\x20current\x20app','appCode','list','10YtRyhJ','trim','model','86608CNaBQx','taskId','ONCE\x20schedules\x20require\x20--scheduled-at\x20and\x20do\x20not\x20accept\x20--cron.','--limit\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.','Queued\x20Task\x20','Prompt\x20sent\x20to\x20the\x20Agent\x20when\x20the\x20schedule\x20runs','Ignores\x20the\x20original\x20trigger\x20time,\x20runs\x20the\x20schedule\x20once\x20now,\x20and\x20creates\x20a\x20new\x20Agent\x20Task.','POST','Schedule\x20title','--prompt\x20must\x20not\x20be\x20blank.','Schedule\x20UUID','schedule','--cursor\x20must\x20be\x20the\x20unchanged\x20nextCursor\x20from\x20schedule\x20list.','read','--title\x20must\x20not\x20be\x20blank.'];a63_0x56cb=function(){return _0x40723b;};return a63_0x56cb();}function scheduleItemPath(_0x5b067c,_0x19add9){return scheduleCollectionPath(_0x5b067c)+'/'+encodeURIComponent(_0x19add9);}function a63_0x4051(_0x16d990,_0x4b4f56){_0x16d990=_0x16d990-0x147;const _0x56cbc0=a63_0x56cb();let _0x4051dc=_0x56cbc0[_0x16d990];return _0x4051dc;}const scheduleValidate={'service':a63_0x3e3f95(0x165),'command':a63_0x3e3f95(0x179),'description':'Validate\x20a\x20UTC\x20schedule\x20without\x20creating\x20it','risk':a63_0x3e3f95(0x167),'flags':INPUT_FLAGS,async 'validate'(_0x116098){readScheduleInput(_0x116098);},async 'execute'(_0x3bfb09){const _0x1925a7=a63_0x3e3f95,_0x327608=readScheduleInput(_0x3bfb09),_0x1cf488=await validateRuntimeSchedule(_0x3bfb09[_0x1925a7(0x155)],_0x327608);return{'ok':!![],'data':_0x1cf488,'message':'Schedule\x20input\x20is\x20valid'};}},scheduleCreate={'service':a63_0x3e3f95(0x165),'command':a63_0x3e3f95(0x18d),'description':'Create\x20a\x20recurring\x20or\x20one-shot\x20Agent\x20schedule','risk':a63_0x3e3f95(0x151),'confirmationDescription':a63_0x3e3f95(0x149),'flags':INPUT_FLAGS,async 'validate'(_0x418a38){readScheduleInput(_0x418a38);},async 'execute'(_0x220ba9){const _0x38d514=a63_0x3e3f95,_0x13b8c1=readScheduleInput(_0x220ba9),_0x1e7f9d=await validateRuntimeSchedule(_0x220ba9[_0x38d514(0x155)],_0x13b8c1),_0x3e32ee=await createRuntimeSchedule(_0x220ba9['appCode'],_0x1e7f9d);return{'ok':!![],'data':_0x3e32ee,'message':_0x38d514(0x16f)+_0x3e32ee['kind']+'\x20schedule\x20'+_0x3e32ee['scheduleId']};},async 'dryRun'(_0x15e5fe){const _0x55d5fa=a63_0x3e3f95,_0x5946d5=readScheduleInput(_0x15e5fe);return dryRun(_0x55d5fa(0x161),scheduleCollectionPath(_0x15e5fe[_0x55d5fa(0x155)]))[_0x55d5fa(0x14f)](_0x5946d5)[_0x55d5fa(0x17e)](_0x55d5fa(0x16c))['build']();}},scheduleList={'service':a63_0x3e3f95(0x165),'command':a63_0x3e3f95(0x156),'description':a63_0x3e3f95(0x154),'risk':a63_0x3e3f95(0x167),'flags':[KIND_FLAG,LIMIT_FLAG,CURSOR_FLAG],async 'validate'(_0x48f9b9){const _0x3ff959=a63_0x3e3f95,_0x130672=_0x48f9b9[_0x3ff959(0x16e)](_0x3ff959(0x17d));if(!Number[_0x3ff959(0x188)](_0x130672)||_0x130672<0x1||_0x130672>0x64)throw CliErrors[_0x3ff959(0x14c)](_0x3ff959(0x15d));const _0x56daa8=_0x48f9b9[_0x3ff959(0x172)](_0x3ff959(0x14d));if(_0x56daa8&&(_0x56daa8[_0x3ff959(0x182)]>0x400||_0x56daa8[_0x3ff959(0x158)]()!==_0x56daa8))throw CliErrors['validation'](_0x3ff959(0x166));},async 'execute'(_0x36c554){const _0x3f6a5d=a63_0x3e3f95,_0x59b006=_0x36c554[_0x3f6a5d(0x172)](_0x3f6a5d(0x14d)),_0x1a95b5=await listRuntimeSchedules(_0x36c554[_0x3f6a5d(0x155)],{'kind':_0x36c554['str'](_0x3f6a5d(0x176)),'limit':_0x36c554[_0x3f6a5d(0x16e)](_0x3f6a5d(0x17d)),..._0x59b006?{'cursor':_0x59b006}:{}});return{'ok':!![],'data':_0x1a95b5};}},scheduleDetail={'service':'schedule','command':a63_0x3e3f95(0x180),'description':a63_0x3e3f95(0x17c),'risk':a63_0x3e3f95(0x167),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x2acc34){const _0x2a4af0=a63_0x3e3f95,_0x511701=await getRuntimeSchedule(_0x2acc34[_0x2a4af0(0x155)],_0x2acc34[_0x2a4af0(0x172)](_0x2a4af0(0x14b)));return{'ok':!![],'data':_0x511701};}},scheduleRun={'service':a63_0x3e3f95(0x165),'command':'run','description':a63_0x3e3f95(0x14a),'risk':'high-risk-write','confirmationDescription':a63_0x3e3f95(0x160),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x43ca18){const _0x387958=a63_0x3e3f95,_0x3e1315=_0x43ca18[_0x387958(0x172)](_0x387958(0x14b)),_0x1d033e=await runRuntimeSchedule(_0x43ca18[_0x387958(0x155)],_0x3e1315);return{'ok':!![],'data':_0x1d033e,'message':_0x387958(0x15e)+_0x1d033e[_0x387958(0x15b)]+_0x387958(0x17f)+_0x3e1315};},async 'dryRun'(_0x433816){const _0x4e4c2a=a63_0x3e3f95,_0x2759cf=_0x433816[_0x4e4c2a(0x172)](_0x4e4c2a(0x14b));return dryRun(_0x4e4c2a(0x161),scheduleItemPath(_0x433816[_0x4e4c2a(0x155)],_0x2759cf)+'/run')['description'](_0x4e4c2a(0x16d)+_0x2759cf+_0x4e4c2a(0x184))['build']();}},scheduleDelete={'service':a63_0x3e3f95(0x165),'command':a63_0x3e3f95(0x153),'description':'Delete\x20the\x20schedule\x20and\x20stop\x20future\x20triggers','risk':a63_0x3e3f95(0x151),'confirmationDescription':'Permanently\x20deletes\x20the\x20schedule\x20and\x20stops\x20future\x20auto-triggers.\x20Historical\x20Tasks\x20already\x20created\x20are\x20not\x20affected.','flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x12e05a){const _0x578c50=a63_0x3e3f95,_0x2766d7=_0x12e05a[_0x578c50(0x172)](_0x578c50(0x14b)),_0x2d315c=await deleteRuntimeSchedule(_0x12e05a[_0x578c50(0x155)],_0x2766d7);return{'ok':!![],'data':_0x2d315c,'message':_0x578c50(0x147)+_0x2766d7};},async 'dryRun'(_0xbf0abf){const _0x435f8e=a63_0x3e3f95,_0x1887a5=_0xbf0abf[_0x435f8e(0x172)]('schedule-id');return dryRun('DELETE',scheduleItemPath(_0xbf0abf[_0x435f8e(0x155)],_0x1887a5))[_0x435f8e(0x17e)](_0x435f8e(0x150)+_0x1887a5)[_0x435f8e(0x187)]();}};export const scheduleDefinitions=[scheduleValidate,scheduleCreate,scheduleList,scheduleDetail,scheduleRun,scheduleDelete];
|
|
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];
|
package/lib/commands/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a64_0x4e9a(_0x36ad63,_0x263492){_0x36ad63=_0x36ad63-0x8d;const _0x210eb6=a64_0x210e();let _0x4e9afd=_0x210eb6[_0x36ad63];return _0x4e9afd;}const a64_0x29e47f=a64_0x4e9a;(function(_0x20d48e,_0x31449d){const _0x4640eb=a64_0x4e9a,_0x10f45e=_0x20d48e();while(!![]){try{const _0x21fa8d=-parseInt(_0x4640eb(0x94))/0x1+parseInt(_0x4640eb(0x95))/0x2*(parseInt(_0x4640eb(0x8d))/0x3)+parseInt(_0x4640eb(0x8f))/0x4*(-parseInt(_0x4640eb(0x97))/0x5)+parseInt(_0x4640eb(0x8e))/0x6*(-parseInt(_0x4640eb(0x93))/0x7)+-parseInt(_0x4640eb(0x92))/0x8+-parseInt(_0x4640eb(0x96))/0x9+parseInt(_0x4640eb(0x98))/0xa;if(_0x21fa8d===_0x31449d)break;else _0x10f45e['push'](_0x10f45e['shift']());}catch(_0x311486){_0x10f45e['push'](_0x10f45e['shift']());}}}(a64_0x210e,0xf3da3));import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x370808){const _0x567909=await buildSchemaPayload();return{'ok':!![],'data':_0x567909};}export const schemaDefinition={'service':'schema','command':a64_0x29e47f(0x91),'description':'Export\x20machine-readable\x20command\x20schema\x20(JSON)','risk':a64_0x29e47f(0x90),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};function a64_0x210e(){const _0x488851=['11248488KUjhaO','48895pwIWWd','1140306QwBchR','6rqhYPx','1414044sSiISK','298990mLzfnW','55001220DAuzkx','232599JPtAxB','1590pWvMKP','12nGvcxQ','read','export'];a64_0x210e=function(){return _0x488851;};return a64_0x210e();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x2ca033,_0x1fd538){const _0x2b5e33=a65_0xf524,_0x132d96=_0x2ca033();while(!![]){try{const _0x1ddfd6=-parseInt(_0x2b5e33(0x15d))/0x1+parseInt(_0x2b5e33(0x14f))/0x2*(parseInt(_0x2b5e33(0x146))/0x3)+-parseInt(_0x2b5e33(0x18a))/0x4+-parseInt(_0x2b5e33(0x169))/0x5*(parseInt(_0x2b5e33(0x148))/0x6)+-parseInt(_0x2b5e33(0x179))/0x7+-parseInt(_0x2b5e33(0x185))/0x8+parseInt(_0x2b5e33(0x182))/0x9*(parseInt(_0x2b5e33(0x154))/0xa);if(_0x1ddfd6===_0x1fd538)break;else _0x132d96['push'](_0x132d96['shift']());}catch(_0x30d758){_0x132d96['push'](_0x132d96['shift']());}}}(a65_0x144e,0x7f4d5));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(_0x3fc155,_0x3b4659){const _0x3278d5=a65_0xf524,_0x2533fe=listLocalServiceTrees();let _0x104392;for(const _0x1c6c4c of _0x2533fe){const _0x578882=matchServiceTreeCommand(_0x1c6c4c,_0x3fc155);if(!_0x578882)continue;(!_0x104392||_0x578882[_0x3278d5(0x14d)][_0x3278d5(0x147)][_0x3278d5(0x15f)]>_0x104392[_0x3278d5(0x14d)][_0x3278d5(0x147)][_0x3278d5(0x15f)])&&(_0x104392={'tree':_0x1c6c4c,'command':_0x578882[_0x3278d5(0x14d)],'remainingArgs':_0x578882[_0x3278d5(0x15e)]});}if(!_0x104392)return undefined;const _0x420b7e={..._0x3b4659};return applyAppBinding(_0x104392[_0x3278d5(0x136)],_0x104392['command'],_0x420b7e),{'definition':buildDynamicCommandDefinition(_0x104392[_0x3278d5(0x136)],_0x104392[_0x3278d5(0x14d)]),'args':_0x104392[_0x3278d5(0x15e)],'flags':_0x420b7e,'tree':_0x104392['tree'],'command':_0x104392[_0x3278d5(0x14d)]};}export function generateDynamicServiceHelp(_0x10208c){const _0x273b16=a65_0xf524,_0x2006a3=listLocalServiceTrees()[_0x273b16(0x135)](_0x8f88a0=>_0x8f88a0[_0x273b16(0x16e)][_0x273b16(0x17c)]===_0x10208c);if(!_0x2006a3)return undefined;const _0x4b1238=[CLI_BIN_NAME+'\x20'+_0x10208c+_0x273b16(0x17d),'',_0x2006a3[_0x273b16(0x16e)][_0x273b16(0x196)]||_0x10208c,_0x2006a3[_0x273b16(0x16e)]['description']?'\x20\x20'+_0x2006a3['service'][_0x273b16(0x18d)]:'','',_0x273b16(0x16d),..._0x2006a3[_0x273b16(0x178)][_0x273b16(0x13b)](_0x146465=>{const _0x459742=_0x273b16,_0x3bb772=_0x146465[_0x459742(0x147)][_0x459742(0x14c)](0x1)['join']('\x20'),_0x36a245=_0x146465[_0x459742(0x18c)]===_0x459742(0x155)?'':'\x20['+_0x146465[_0x459742(0x18c)]+']';return'\x20\x20'+_0x3bb772[_0x459742(0x166)](0x18)+'\x20'+(_0x146465[_0x459742(0x18d)]||'')+_0x36a245;}),'',_0x273b16(0x167)+CLI_BIN_NAME+_0x273b16(0x193)+_0x10208c+'`\x20to\x20inspect\x20the\x20manifest.']['filter'](Boolean);return _0x4b1238[_0x273b16(0x13f)]('\x0a');}export function listDynamicServiceEntries(){return listLocalServices()['map'](_0x207e1=>{const _0x1d5c0e=a65_0xf524,_0x5ddeab=_0x207e1[_0x1d5c0e(0x191)];return{'service':_0x5ddeab[_0x1d5c0e(0x16e)][_0x1d5c0e(0x17c)],'label':_0x5ddeab['service'][_0x1d5c0e(0x196)]||_0x5ddeab['service'][_0x1d5c0e(0x17c)],'commands':_0x5ddeab[_0x1d5c0e(0x178)]['map'](_0x5607ea=>({'command':dynamicCommandName(_0x5607ea),'description':_0x5607ea[_0x1d5c0e(0x18d)]||_0x1d5c0e(0x168)+_0x5607ea[_0x1d5c0e(0x184)],'tag':riskTag(_0x5607ea['risk'])}))};});}export function getDynamicServiceEntry(_0x2326c9){const _0x4fc436=a65_0xf524;return listDynamicServiceEntries()['find'](_0x3fa7e5=>_0x3fa7e5[_0x4fc436(0x16e)]===_0x2326c9);}export function listDynamicServiceDefinitions(_0x506bb1){const _0x51267b=a65_0xf524;return listLocalServiceTrees()[_0x51267b(0x183)](_0x19836a=>!_0x506bb1||_0x19836a[_0x51267b(0x16e)][_0x51267b(0x17c)]===_0x506bb1)[_0x51267b(0x140)](_0x4fce49=>_0x4fce49[_0x51267b(0x178)][_0x51267b(0x13b)](_0x270c44=>buildDynamicCommandDefinition(_0x4fce49,_0x270c44)));}export function getDynamicServiceDefinitions(_0x19dce1){const _0x4a43da=a65_0xf524,_0x412707=listDynamicServiceDefinitions(_0x19dce1);return _0x412707[_0x4a43da(0x15f)]>0x0?_0x412707:undefined;}function a65_0xf524(_0x4a5201,_0x2c13ce){_0x4a5201=_0x4a5201-0x131;const _0x144e94=a65_0x144e();let _0xf52464=_0x144e94[_0x4a5201];return _0xf52464;}export function findDynamicServiceDefinition(_0xd7bb23,_0x5c792f){const _0x3c621f=a65_0xf524;return listDynamicServiceDefinitions(_0xd7bb23)[_0x3c621f(0x135)](_0xe1850a=>_0xe1850a['command']===_0x5c792f);}export function buildDynamicCommandDefinition(_0x1cabcc,_0x3e4308){const _0x310c0a=a65_0xf524;return{'service':_0x1cabcc[_0x310c0a(0x16e)]['code'],'command':dynamicCommandName(_0x3e4308),'description':_0x3e4308['description']||_0x310c0a(0x168)+_0x3e4308['cliPath'],'risk':_0x3e4308[_0x310c0a(0x18c)],..._0x3e4308[_0x310c0a(0x18c)]===_0x310c0a(0x155)?{}:{'confirmationDescription':buildDynamicConfirmationDescription(_0x3e4308)},'requiresAuth':!![],'requiresAppCode':!![],'args':_0x3e4308[_0x310c0a(0x13c)]['map'](_0x38c91a=>({'name':_0x38c91a['name'],'description':_0x38c91a[_0x310c0a(0x18d)]||_0x38c91a['name'],'required':_0x38c91a[_0x310c0a(0x17f)]})),'flags':_0x3e4308['flags'][_0x310c0a(0x13b)](flagToCommandFlag),'helpExtra':()=>renderDynamicCommandHelp(_0x3e4308),async 'dryRun'(_0x24fbf0){const _0x57e92d=_0x310c0a,_0x55f022=await compilePlan(_0x3e4308,_0x24fbf0);return{'method':'SERVICE_TREE','url':_0x3e4308[_0x57e92d(0x184)],'body':{'target':targetPreview(_0x55f022),'params':_0x55f022[_0x57e92d(0x159)]},'description':_0x57e92d(0x14e)+_0x3e4308[_0x57e92d(0x184)]};},async 'execute'(_0x32937a){const _0x1853d9=_0x310c0a,_0x1731a4=await compilePlan(_0x3e4308,_0x32937a),_0x1ba543=Date[_0x1853d9(0x151)](),_0x1d627f=await executePlan(_0x1731a4,_0x3e4308,_0x32937a),_0x347c38=Date[_0x1853d9(0x151)]()-_0x1ba543;return{'ok':!![],'data':{'service':_0x1cabcc['service'],'command':_0x3e4308[_0x1853d9(0x184)],'target':targetPreview(_0x1731a4),'result':_0x1d627f,'elapsed':_0x347c38},'message':_0x1853d9(0x145)+_0x3e4308[_0x1853d9(0x184)]+_0x1853d9(0x164)+_0x347c38+'ms'};}};}function buildDynamicConfirmationDescription(_0x2f0c35){const _0x2bf782=a65_0xf524,_0x8bd4cf=_0x2f0c35[_0x2bf782(0x18d)]||_0x2f0c35['cliPath'],_0x532473=_0x2f0c35[_0x2bf782(0x18c)]===_0x2bf782(0x152)?_0x2bf782(0x192):'The\x20manifest\x20marks\x20this\x20command\x20as\x20a\x20write.\x20It\x20may\x20change\x20business\x20data\x20or\x20service\x20state.';return'This\x20will\x20run\x20Service\x20Tree\x20command\x20\x22'+_0x8bd4cf+_0x2bf782(0x15c)+_0x532473;}function dynamicCommandName(_0x4ac6da){const _0x594cb0=a65_0xf524;return _0x4ac6da[_0x594cb0(0x147)][_0x594cb0(0x14c)](0x1)['join']('\x20');}function riskTag(_0x5b064d){const _0x1b1489=a65_0xf524;return _0x5b064d===_0x1b1489(0x155)?'':_0x1b1489(0x181)+_0x5b064d+']';}function flagToCommandFlag(_0x366f8e){const _0x2e3085=a65_0xf524;return{'name':_0x366f8e[_0x2e3085(0x16f)],'type':_0x366f8e[_0x2e3085(0x171)]===_0x2e3085(0x18f)?_0x2e3085(0x13d):_0x366f8e[_0x2e3085(0x171)],'description':_0x366f8e[_0x2e3085(0x18d)]||_0x366f8e[_0x2e3085(0x196)],'required':_0x366f8e[_0x2e3085(0x17f)],'default':isPrimitiveFlagDefault(_0x366f8e['default'])?_0x366f8e['default']:undefined,'enum':_0x366f8e[_0x2e3085(0x141)]};}async function compilePlan(_0x2dac66,_0x32f9bd){const _0x46726e=a65_0xf524;return compileServiceTreeCommand(_0x2dac66,{'flags':_0x32f9bd[_0x46726e(0x175)],'args':_0x32f9bd[_0x46726e(0x13c)],'context':await buildServiceContext(_0x2dac66,_0x32f9bd)});}async function buildServiceContext(_0x58ca76,_0x3ba02f){const _0x59541b=a65_0xf524,_0x45ca96={'appCode':_0x3ba02f['appCode'],'env':_0x3ba02f['envName'],'envName':_0x3ba02f[_0x59541b(0x17a)]};if(!usesRuntimeContext(_0x58ca76))return _0x45ca96;const _0xbf37e0=await getLoginUserInfo(),_0x2c07da=pickFirst(_0xbf37e0[_0x59541b(0x144)],_0xbf37e0['id']);return{..._0x45ca96,'user':_0xbf37e0,'userId':_0x2c07da,'id':_0xbf37e0['id'],'username':pickFirst(_0xbf37e0[_0x59541b(0x153)],_0xbf37e0[_0x59541b(0x15b)],_0xbf37e0[_0x59541b(0x149)]),'userName':_0xbf37e0[_0x59541b(0x15b)],'nickname':pickFirst(_0xbf37e0[_0x59541b(0x163)],_0xbf37e0[_0x59541b(0x194)]),'nickName':_0xbf37e0[_0x59541b(0x194)],'tenantCode':_0xbf37e0[_0x59541b(0x156)],'employeeId':_0xbf37e0[_0x59541b(0x186)]};}function usesRuntimeContext(_0x1ca04d){const _0x13cec3=a65_0xf524;return _0x1ca04d[_0x13cec3(0x13e)][_0x13cec3(0x16b)](_0x143586=>typeof _0x143586[_0x13cec3(0x138)]===_0x13cec3(0x13d)&&(_0x143586[_0x13cec3(0x138)][_0x13cec3(0x172)](_0x13cec3(0x190))||_0x143586[_0x13cec3(0x138)][_0x13cec3(0x172)](_0x13cec3(0x142))));}function pickFirst(..._0x2555cb){const _0x10e787=a65_0xf524;return _0x2555cb[_0x10e787(0x135)](_0x274db4=>_0x274db4!==undefined&&_0x274db4!==null);}async function executePlan(_0x2b8450,_0x2011e2,_0x2f90ca){const _0x3cd988=a65_0xf524;if(_0x2b8450['kind']==='data'){const _0x44a926=await resolveDatasetCode(_0x2b8450,_0x2011e2,_0x2f90ca);return executeData(_0x44a926,_0x2b8450['command'],_0x2b8450['params']);}if(_0x2b8450['kind']===_0x3cd988(0x198)){if(!_0x2b8450[_0x3cd988(0x187)])throw CliErrors[_0x3cd988(0x180)](_0x3cd988(0x145)+_0x2011e2[_0x3cd988(0x184)]+_0x3cd988(0x170));return executeSdkSql(_0x2b8450[_0x3cd988(0x187)],normalizeScalarParams(_0x2b8450['params']));}if(_0x2b8450['kind']===_0x3cd988(0x165)){const _0x13253d=_0x2b8450[_0x3cd988(0x174)]||_0x2b8450[_0x3cd988(0x14b)]||(_0x2b8450['bffId']==null?'':String(_0x2b8450[_0x3cd988(0x15a)]));if(!_0x13253d)throw CliErrors[_0x3cd988(0x180)](_0x3cd988(0x145)+_0x2011e2['cliPath']+'\x20requires\x20target.functionName.');return executeSdkBff(_0x13253d,_0x2b8450[_0x3cd988(0x159)]);}throw CliErrors[_0x3cd988(0x180)](_0x3cd988(0x133)+_0x2b8450[_0x3cd988(0x161)]);}async function resolveDatasetCode(_0x2fd72a,_0x113a57,_0x39c0d3){const _0x5ce7e7=a65_0xf524;if(_0x2fd72a[_0x5ce7e7(0x17e)])return _0x2fd72a['datasetCode'];if(!_0x2fd72a[_0x5ce7e7(0x131)])throw CliErrors[_0x5ce7e7(0x180)](_0x5ce7e7(0x145)+_0x113a57[_0x5ce7e7(0x184)]+_0x5ce7e7(0x188));const _0x5cbfe0=await listDatasets(_0x39c0d3[_0x5ce7e7(0x137)]),_0x372fb0=_0x5cbfe0['find'](_0x2141cc=>_0x2141cc['dbtableConfig']?.[_0x5ce7e7(0x150)]===_0x2fd72a[_0x5ce7e7(0x131)]);if(!_0x372fb0?.[_0x5ce7e7(0x17c)])throw CliErrors[_0x5ce7e7(0x180)](_0x5ce7e7(0x160)+_0x2fd72a[_0x5ce7e7(0x131)]+_0x5ce7e7(0x173)+_0x39c0d3[_0x5ce7e7(0x137)]+'.',_0x5ce7e7(0x17b));return _0x372fb0[_0x5ce7e7(0x17c)];}function applyAppBinding(_0x41d269,_0x4aef43,_0x29cb8c){const _0x14d72e=a65_0xf524,_0x50a0e5=_0x4aef43[_0x14d72e(0x195)][_0x14d72e(0x162)];if(!_0x50a0e5)return;const _0xd83f9=_0x41d269['appBindings'][_0x50a0e5];if(!_0xd83f9)throw CliErrors[_0x14d72e(0x180)](_0x14d72e(0x157)+_0x50a0e5+_0x14d72e(0x189)+_0x4aef43['cliPath']+'.',_0x14d72e(0x18e));const _0x5db1c7=_0xd83f9[_0x14d72e(0x14a)]||_0xd83f9[_0x14d72e(0x137)];_0x5db1c7&&!hasText(_0x29cb8c[_0x14d72e(0x14a)])&&(_0x29cb8c['appcode']=_0x5db1c7),_0xd83f9[_0x14d72e(0x197)]&&!hasText(_0x29cb8c['app'])&&!hasText(_0x29cb8c[_0x14d72e(0x14a)])&&(_0x29cb8c[_0x14d72e(0x197)]=_0xd83f9[_0x14d72e(0x197)]),_0xd83f9[_0x14d72e(0x176)]&&!hasText(_0x29cb8c['env'])&&(_0x29cb8c[_0x14d72e(0x176)]=_0xd83f9[_0x14d72e(0x176)]);}function a65_0x144e(){const _0x3816db=['find','tree','appCode','source','\x20\x20\x20\x20datatable:\x20','trim','map','args','string','mapTo','join','flatMap','enum','ctx.','\x20\x20\x20\x20functionName:\x20','userId','Service\x20command\x20','15MkILSP','fullPath','2514EmSyAK','loginName','appcode','bffCode','slice','command','Preview\x20dynamic\x20service\x20command:\x20','33238opAAnT','tableName','now','high-risk-write','username','35493890QgJzmy','read','tenantCode','Unknown\x20appRef\x20\x22','\x20->\x20','params','bffId','userName','\x22.\x20','846052OWbNhR','remainingArgs','length','Cannot\x20resolve\x20datatable\x20\x22','kind','appRef','nickname','\x20completed\x20in\x20','bff','padEnd','Use\x20`','Run\x20service\x20command\x20','6865TdteAt','operator','some','\x20\x20\x20\x20','Commands:','service','cliName','\x20requires\x20target.sqlCode.','type','startsWith','\x22\x20to\x20a\x20datasetCode\x20in\x20app\x20','scriptName','rawFlags','env','\x20\x20SERVICE\x20TREE\x20TARGET','commands','7015757VESkMc','envName','Use\x20lovrabet\x20dataset\x20list\x20to\x20confirm\x20the\x20physical\x20table\x20name\x20or\x20add\x20target.datasetCode\x20to\x20the\x20manifest.','code','\x20<command>\x20[flags]','datasetCode','required','validation','\x20\x20[','9jwnuok','filter','cliPath','4694352duRTUg','employeeId','sqlCode','\x20requires\x20target.datasetCode\x20or\x20target.datatable.','\x22\x20in\x20service\x20command\x20','402684bLhuxy','\x20\x20\x20\x20datasetCode:\x20','risk','description','Define\x20the\x20appRef\x20under\x20appBindings\x20or\x20remove\x20target.appRef.','json','context.','normalizedManifest','The\x20manifest\x20marks\x20this\x20command\x20as\x20a\x20high-risk\x20write.\x20It\x20may\x20make\x20business\x20changes\x20that\x20are\x20hard\x20to\x20reverse.','\x20service\x20detail\x20--service\x20','nickName','target','name','app','sql','\x20\x20\x20\x20command:\x20','datatable','push','Unsupported\x20service\x20target\x20kind:\x20','const'];a65_0x144e=function(){return _0x3816db;};return a65_0x144e();}function renderDynamicCommandHelp(_0xb58173){const _0x46189a=a65_0xf524,_0x351f31=[_0x46189a(0x177),'\x20\x20\x20\x20kind:\x20\x20\x20\x20'+_0xb58173[_0x46189a(0x195)][_0x46189a(0x161)],_0x46189a(0x199)+_0xb58173[_0x46189a(0x195)][_0x46189a(0x14d)]];if(_0xb58173[_0x46189a(0x195)][_0x46189a(0x17e)])_0x351f31[_0x46189a(0x132)](_0x46189a(0x18b)+_0xb58173[_0x46189a(0x195)]['datasetCode']);if(_0xb58173[_0x46189a(0x195)][_0x46189a(0x131)])_0x351f31[_0x46189a(0x132)](_0x46189a(0x139)+_0xb58173[_0x46189a(0x195)][_0x46189a(0x131)]);if(_0xb58173[_0x46189a(0x195)][_0x46189a(0x187)])_0x351f31[_0x46189a(0x132)]('\x20\x20\x20\x20sqlCode:\x20'+_0xb58173[_0x46189a(0x195)][_0x46189a(0x187)]);if(_0xb58173['target'][_0x46189a(0x174)])_0x351f31['push'](_0x46189a(0x143)+_0xb58173[_0x46189a(0x195)][_0x46189a(0x174)]);if(_0xb58173['mapTo'][_0x46189a(0x15f)]>0x0){_0x351f31[_0x46189a(0x132)]('','\x20\x20MAP\x20TO');for(const _0x380b2a of _0xb58173[_0x46189a(0x13e)]){_0x351f31[_0x46189a(0x132)](_0x46189a(0x16c)+(_0x380b2a['source']||_0x46189a(0x134))+_0x46189a(0x158)+_0x380b2a[_0x46189a(0x195)]+(_0x380b2a['operator']?'.'+_0x380b2a[_0x46189a(0x16a)]:''));}}return _0x351f31[_0x46189a(0x13f)]('\x0a');}function targetPreview(_0x1276fa){const _0x53e294=a65_0xf524;return{'kind':_0x1276fa[_0x53e294(0x161)],'command':_0x1276fa['command'],'appRef':_0x1276fa[_0x53e294(0x162)],'datasetCode':_0x1276fa['datasetCode'],'datatable':_0x1276fa['datatable'],'sqlCode':_0x1276fa['sqlCode'],'bffCode':_0x1276fa[_0x53e294(0x14b)],'bffId':_0x1276fa[_0x53e294(0x15a)],'functionName':_0x1276fa[_0x53e294(0x174)]};}function normalizeScalarParams(_0x44b40b){const _0x41c34b=a65_0xf524;return Object['fromEntries'](Object['entries'](_0x44b40b)[_0x41c34b(0x183)](([,_0x565a27])=>typeof _0x565a27==='string'||typeof _0x565a27==='number'));}function hasText(_0x4f9086){const _0x18e2ad=a65_0xf524;return typeof _0x4f9086===_0x18e2ad(0x13d)&&_0x4f9086[_0x18e2ad(0x13a)]()['length']>0x0;}function isPrimitiveFlagDefault(_0x51ba9d){const _0x467c6d=a65_0xf524;return _0x51ba9d===undefined||typeof _0x51ba9d===_0x467c6d(0x13d)||typeof _0x51ba9d==='number'||typeof _0x51ba9d==='boolean';}
|
|
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 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a66_0x58e0(_0x345234,_0x307078){_0x345234=_0x345234-0x13c;const _0xe6ca19=a66_0xe6ca();let _0x58e0a3=_0xe6ca19[_0x345234];return _0x58e0a3;}(function(_0x2459c7,_0x524791){const _0x187b66=a66_0x58e0,_0x500848=_0x2459c7();while(!![]){try{const _0xbcdb07=-parseInt(_0x187b66(0x15e))/0x1*(parseInt(_0x187b66(0x141))/0x2)+-parseInt(_0x187b66(0x149))/0x3*(-parseInt(_0x187b66(0x145))/0x4)+parseInt(_0x187b66(0x148))/0x5*(-parseInt(_0x187b66(0x162))/0x6)+-parseInt(_0x187b66(0x154))/0x7*(parseInt(_0x187b66(0x14e))/0x8)+parseInt(_0x187b66(0x14d))/0x9*(-parseInt(_0x187b66(0x13f))/0xa)+parseInt(_0x187b66(0x15c))/0xb+parseInt(_0x187b66(0x153))/0xc;if(_0xbcdb07===_0x524791)break;else _0x500848['push'](_0x500848['shift']());}catch(_0x421bea){_0x500848['push'](_0x500848['shift']());}}}(a66_0xe6ca,0x8e4fb));export function adaptServiceTreeManifestForLegacyFramework(_0x3b3de1){const _0xd0056e=a66_0x58e0,_0x57e0a0=cloneJsonValue(_0x3b3de1),_0x1e8ae=[];if(!isObjectRecord(_0x57e0a0))return{'manifest':_0x57e0a0,'errors':_0x1e8ae};return Array['isArray'](_0x57e0a0[_0xd0056e(0x14a)])&&_0x57e0a0[_0xd0056e(0x14a)][_0xd0056e(0x13e)]((_0x489d5f,_0x2f134b)=>{const _0x41900e=_0xd0056e;if(!isObjectRecord(_0x489d5f))return;adaptBffTarget(_0x489d5f['target'],_0x41900e(0x14c)+_0x2f134b+'].target',_0x1e8ae);}),adaptResources(_0x57e0a0[_0xd0056e(0x15a)],_0xd0056e(0x150),_0x1e8ae),{'manifest':_0x57e0a0,'errors':_0x1e8ae};}export function toPublicServiceTreeTarget(_0x211e4c){const _0x3a0b38=a66_0x58e0,{scriptName:_0x4687a6,..._0x474725}=_0x211e4c;return typeof _0x4687a6===_0x3a0b38(0x147)&&_0x4687a6[_0x3a0b38(0x159)]()&&(_0x474725[_0x3a0b38(0x157)]=_0x4687a6),_0x474725;}export function toPublicNormalizedServiceTree(_0xfd1f47){const _0x3cef29=a66_0x58e0;return{..._0xfd1f47,'commands':_0xfd1f47[_0x3cef29(0x14a)][_0x3cef29(0x144)](_0x1752ab=>({..._0x1752ab,'target':toPublicServiceTreeTarget(_0x1752ab[_0x3cef29(0x164)])}))};}function adaptResources(_0x4e27c3,_0x3d5e70,_0x414a0a){const _0x26183d=a66_0x58e0;if(!isObjectRecord(_0x4e27c3))return;for(const [_0x56be9b,_0x425284]of Object[_0x26183d(0x142)](_0x4e27c3)){if(!isObjectRecord(_0x425284))continue;const _0x4be721=_0x3d5e70+'.'+_0x56be9b;if(isObjectRecord(_0x425284['actions']))for(const [_0x37b66d,_0xb5f301]of Object[_0x26183d(0x142)](_0x425284[_0x26183d(0x158)])){if(!isObjectRecord(_0xb5f301))continue;const _0x5494a7=_0x4be721+_0x26183d(0x13d)+_0x37b66d,_0x521570=isObjectRecord(_0xb5f301[_0x26183d(0x164)])&&_0xb5f301[_0x26183d(0x164)][_0x26183d(0x13c)]===_0x26183d(0x15b);adaptBffTarget(_0xb5f301[_0x26183d(0x164)],_0x5494a7+'.target',_0x414a0a),(_0x521570||isBffAction(_0xb5f301))&&adaptFunctionNameField(_0xb5f301,_0x5494a7,_0x414a0a);}adaptResources(_0x425284[_0x26183d(0x15a)],_0x4be721+_0x26183d(0x160),_0x414a0a);}}function adaptBffTarget(_0x206e81,_0x3f9dea,_0x5f0322){const _0x568168=a66_0x58e0;if(!isObjectRecord(_0x206e81)||_0x206e81[_0x568168(0x13c)]!==_0x568168(0x15b))return;adaptFunctionNameField(_0x206e81,_0x3f9dea,_0x5f0322);}function adaptFunctionNameField(_0x5bc607,_0x25b499,_0x35da46){const _0x391174=a66_0x58e0;Object[_0x391174(0x140)][_0x391174(0x14b)]['call'](_0x5bc607,_0x391174(0x156))&&_0x35da46[_0x391174(0x143)]({'level':_0x391174(0x151),'path':_0x25b499+'.scriptName','message':_0x391174(0x15f)});if(Object[_0x391174(0x140)][_0x391174(0x14b)][_0x391174(0x15d)](_0x5bc607,'functionName')){if(typeof _0x5bc607[_0x391174(0x157)]!==_0x391174(0x147)||!_0x5bc607[_0x391174(0x157)][_0x391174(0x159)]()){_0x35da46['push']({'level':'error','path':_0x25b499+'.functionName','message':_0x391174(0x152)}),delete _0x5bc607[_0x391174(0x157)];return;}_0x5bc607[_0x391174(0x156)]=_0x5bc607[_0x391174(0x157)],delete _0x5bc607['functionName'];}}function isBffAction(_0x2fa360){const _0x520bb1=a66_0x58e0;return _0x2fa360[_0x520bb1(0x13c)]===_0x520bb1(0x15b)||_0x2fa360[_0x520bb1(0x14f)]===_0x520bb1(0x161)||_0x2fa360['target']===_0x520bb1(0x161);}function a66_0xe6ca(){const _0x15b6ba=['error','functionName\x20must\x20be\x20a\x20non-empty\x20string.','3747552zFBgZP','154ckzSgX','object','scriptName','functionName','actions','trim','resources','bff','3828385bwmUiv','call','6201NjiMFf','Use\x20functionName;\x20scriptName\x20is\x20not\x20part\x20of\x20the\x20runtime\x20Service\x20Tree\x20contract.','.resources','bff.exec','3450fbzWVH','isArray','target','kind','.actions.','forEach','70tnUESF','prototype','154rzpAzT','entries','push','map','1352188qQSmJA','fromEntries','string','1895OYGDFZ','6tkPXXO','commands','hasOwnProperty','$.commands[','15462XZmbip','16760pfpIgP','action','$.resources'];a66_0xe6ca=function(){return _0x15b6ba;};return a66_0xe6ca();}function cloneJsonValue(_0x46f4f2){const _0x2210d4=a66_0x58e0;if(Array[_0x2210d4(0x163)](_0x46f4f2))return _0x46f4f2[_0x2210d4(0x144)](_0x549f62=>cloneJsonValue(_0x549f62));if(isObjectRecord(_0x46f4f2))return Object[_0x2210d4(0x146)](Object[_0x2210d4(0x142)](_0x46f4f2)[_0x2210d4(0x144)](([_0x192793,_0x37bb4a])=>[_0x192793,cloneJsonValue(_0x37bb4a)]));return _0x46f4f2;}function isObjectRecord(_0x2d2b53){const _0x39a883=a66_0x58e0;return Boolean(_0x2d2b53)&&typeof _0x2d2b53===_0x39a883(0x155)&&!Array[_0x39a883(0x163)](_0x2d2b53);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a67_0x6ff935=a67_0x26e2;(function(_0x181c11,_0x261469){const _0x14c6a1=a67_0x26e2,_0x32db29=_0x181c11();while(!![]){try{const _0x1cf078=parseInt(_0x14c6a1(0x1b2))/0x1*(-parseInt(_0x14c6a1(0x1a7))/0x2)+-parseInt(_0x14c6a1(0x1b3))/0x3+parseInt(_0x14c6a1(0x1c5))/0x4*(parseInt(_0x14c6a1(0x1cc))/0x5)+parseInt(_0x14c6a1(0x1db))/0x6*(-parseInt(_0x14c6a1(0x1af))/0x7)+-parseInt(_0x14c6a1(0x1c0))/0x8+parseInt(_0x14c6a1(0x1bf))/0x9+parseInt(_0x14c6a1(0x1ad))/0xa*(parseInt(_0x14c6a1(0x1a2))/0xb);if(_0x1cf078===_0x261469)break;else _0x32db29['push'](_0x32db29['shift']());}catch(_0x479ae9){_0x32db29['push'](_0x32db29['shift']());}}}(a67_0x23de,0xa0fc1));function a67_0x23de(){const _0x5b86a7=['9993708antdYH','4894208YXxmBx','Validate\x20a\x20Service\x20Tree\x20JSON\x20manifest','entries','hash','list','386108pARshX','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.','serviceCode','validate','imported','WRITE','updated','10mbxAuG','List\x20locally\x20imported\x20Service\x20Tree\x20manifests','description','kind','string','manifests','\x20service(s),\x20updated\x20','Imported\x20','warnings','serviceCount','map','Show\x20a\x20locally\x20imported\x20Service\x20Tree\x20manifest','commands','Removes\x20the\x20given\x20service\x20manifest\x20from\x20the\x20local\x20Service\x20Tree\x20registry.\x20Dynamic\x20commands\x20from\x20that\x20manifest\x20will\x20no\x20longer\x20be\x20available.','replaced','6HUhWjE','Imported','target','version','name','file','Exported\x20service\x20','registryServiceCode','manifest','length','risk','source','Import\x20a\x20Service\x20Tree\x20manifest\x20into\x20the\x20local\x20runtime\x20registry','entry','187YpMYub','required','str','detail','filePath','6754eMYQpg','read','write','registryPath','lower\x20kebab-case\x20service\x20code','registry','1191650XdqXnJ','errors','672371RKrpSB','cliName','Local\x20service\x20code,\x20for\x20example\x20crm','305dukuWO','2796192HCGAbT','reduce','report','service','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.','import','cliPath','\x20service\x20','normalizedManifest','registryIndex','Removed\x20service\x20','remove'];a67_0x23de=function(){return _0x5b86a7;};return a67_0x23de();}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_0x6ff935(0x1e0),'type':a67_0x6ff935(0x1d0),'required':!![],'description':'Service\x20Tree\x20manifest\x20file\x20path'},SERVICE_FLAG={'name':a67_0x6ff935(0x1b6),'type':a67_0x6ff935(0x1d0),'required':!![],'description':a67_0x6ff935(0x1b1),'pattern':{'regex':/^[a-z][a-z0-9-]*$/,'description':a67_0x6ff935(0x1ab)}};function a67_0x26e2(_0x4414ba,_0x4928cc){_0x4414ba=_0x4414ba-0x19c;const _0x23de48=a67_0x23de();let _0x26e21c=_0x23de48[_0x4414ba];return _0x26e21c;}function summarizeService(_0x9980f3){const _0xbf3223=a67_0x6ff935;return{'serviceCode':_0x9980f3[_0xbf3223(0x1c7)],'name':_0x9980f3[_0xbf3223(0x1bb)][_0xbf3223(0x1b6)][_0xbf3223(0x1df)],'version':_0x9980f3[_0xbf3223(0x1de)],'importedAt':_0x9980f3['importedAt'],'source':_0x9980f3[_0xbf3223(0x19f)],'commandCount':_0x9980f3[_0xbf3223(0x1bb)][_0xbf3223(0x1d8)][_0xbf3223(0x19d)],'commands':_0x9980f3[_0xbf3223(0x1bb)][_0xbf3223(0x1d8)][_0xbf3223(0x1d6)](_0x31f38e=>({'path':_0x31f38e[_0xbf3223(0x1b9)],'description':_0x31f38e[_0xbf3223(0x1ce)],'risk':_0x31f38e[_0xbf3223(0x19e)],'target':toPublicServiceTreeTarget(_0x31f38e['target']),'flags':_0x31f38e['flags'][_0xbf3223(0x1d6)](_0x423d57=>({'name':_0x423d57['name'],'cliName':_0x423d57[_0xbf3223(0x1b0)],'type':_0x423d57['type'],'required':_0x423d57[_0xbf3223(0x1a3)]===!![]}))}))};}function summarizeLoadedManifest(_0x265ebf){const _0x122703=a67_0x6ff935;return{'service':_0x265ebf[_0x122703(0x1bb)]?.['service'],'version':_0x265ebf[_0x122703(0x1bb)]?.['version'],'commandCount':_0x265ebf['normalizedManifest']?.[_0x122703(0x1d8)][_0x122703(0x19d)]??0x0,'commands':_0x265ebf[_0x122703(0x1bb)]?.[_0x122703(0x1d8)]['map'](_0x303c80=>({'path':_0x303c80[_0x122703(0x1b9)],'risk':_0x303c80[_0x122703(0x19e)],'target':toPublicServiceTreeTarget(_0x303c80[_0x122703(0x1dd)])}))??[],'registryIndex':_0x265ebf[_0x122703(0x1bc)],'registryServiceCode':_0x265ebf[_0x122703(0x1e2)],'errors':_0x265ebf['report'][_0x122703(0x1ae)],'warnings':_0x265ebf[_0x122703(0x1b5)][_0x122703(0x1d4)]};}export const serviceDefinitions=[{'service':a67_0x6ff935(0x1b6),'command':a67_0x6ff935(0x1c8),'description':a67_0x6ff935(0x1c1),'risk':a67_0x6ff935(0x1a8),'requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'execute'(_0x288ce5){const _0x1bfd90=a67_0x6ff935,_0x594e99=loadServiceManifestFromFile(_0x288ce5['str'](_0x1bfd90(0x1e0)));if(!_0x594e99[_0x1bfd90(0x1b5)]['ok'])return{'ok':![],'data':{'file':_0x594e99[_0x1bfd90(0x1a6)],'hash':_0x594e99[_0x1bfd90(0x1c3)],'kind':_0x594e99['kind'],'serviceCount':_0x594e99[_0x1bfd90(0x1d1)][_0x1bfd90(0x19d)],'services':_0x594e99[_0x1bfd90(0x1d1)][_0x1bfd90(0x1d6)](summarizeLoadedManifest),'errors':_0x594e99[_0x1bfd90(0x1b5)]['errors'],'warnings':_0x594e99[_0x1bfd90(0x1b5)][_0x1bfd90(0x1d4)]},'message':formatValidationFailure(_0x594e99[_0x1bfd90(0x1b5)])};if(_0x594e99[_0x1bfd90(0x1cf)]===_0x1bfd90(0x1ac)||_0x594e99[_0x1bfd90(0x1d1)]['length']!==0x1)return{'ok':!![],'data':{'file':_0x594e99[_0x1bfd90(0x1a6)],'hash':_0x594e99['hash'],'kind':_0x594e99[_0x1bfd90(0x1cf)],'serviceCount':_0x594e99['manifests']['length'],'commandCount':_0x594e99['manifests'][_0x1bfd90(0x1b4)]((_0x48df84,_0x40198f)=>_0x48df84+(_0x40198f[_0x1bfd90(0x1bb)]?.[_0x1bfd90(0x1d8)][_0x1bfd90(0x19d)]??0x0),0x0),'services':_0x594e99[_0x1bfd90(0x1d1)][_0x1bfd90(0x1d6)](summarizeLoadedManifest),'warnings':_0x594e99['report']['warnings']},'message':'Service\x20registry\x20validation\x20passed.'};return{'ok':!![],'data':{'file':_0x594e99[_0x1bfd90(0x1a6)],'hash':_0x594e99[_0x1bfd90(0x1c3)],'kind':_0x594e99['kind'],'service':_0x594e99[_0x1bfd90(0x1bb)]?.[_0x1bfd90(0x1b6)],'version':_0x594e99[_0x1bfd90(0x1bb)]?.[_0x1bfd90(0x1de)],'commandCount':_0x594e99[_0x1bfd90(0x1bb)]?.[_0x1bfd90(0x1d8)]['length']??0x0,'commands':_0x594e99[_0x1bfd90(0x1bb)]?.[_0x1bfd90(0x1d8)][_0x1bfd90(0x1d6)](_0x18cb4e=>({'path':_0x18cb4e[_0x1bfd90(0x1b9)],'risk':_0x18cb4e['risk'],'target':toPublicServiceTreeTarget(_0x18cb4e['target'])})),'warnings':_0x594e99[_0x1bfd90(0x1b5)][_0x1bfd90(0x1d4)]},'message':'Service\x20manifest\x20validation\x20passed.'};}},{'service':a67_0x6ff935(0x1b6),'command':a67_0x6ff935(0x1b8),'description':a67_0x6ff935(0x1a0),'risk':'write','confirmationDescription':a67_0x6ff935(0x1b7),'requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'dryRun'(_0x5da3f4){const _0xfbfd27=a67_0x6ff935,_0x1afbfe=loadServiceManifestFromFile(_0x5da3f4[_0xfbfd27(0x1a4)](_0xfbfd27(0x1e0)));return{'method':'WRITE','url':getServiceRegistryPath(),'body':{'file':_0x1afbfe['filePath'],'hash':_0x1afbfe[_0xfbfd27(0x1c3)],'kind':_0x1afbfe[_0xfbfd27(0x1cf)],'ok':_0x1afbfe[_0xfbfd27(0x1b5)]['ok'],'service':_0x1afbfe[_0xfbfd27(0x1bb)]?.[_0xfbfd27(0x1b6)],'version':_0x1afbfe[_0xfbfd27(0x1bb)]?.['version'],'serviceCount':_0x1afbfe[_0xfbfd27(0x1d1)]['length'],'services':_0x1afbfe['manifests'][_0xfbfd27(0x1d6)](_0x4c1b7a=>({'service':_0x4c1b7a[_0xfbfd27(0x1bb)]?.[_0xfbfd27(0x1b6)],'version':_0x4c1b7a[_0xfbfd27(0x1bb)]?.[_0xfbfd27(0x1de)],'commandCount':_0x4c1b7a[_0xfbfd27(0x1bb)]?.['commands'][_0xfbfd27(0x19d)]??0x0,'errors':_0x4c1b7a[_0xfbfd27(0x1b5)][_0xfbfd27(0x1ae)]})),'errors':_0x1afbfe['report'][_0xfbfd27(0x1ae)],'commandCount':_0x1afbfe[_0xfbfd27(0x1bb)]?.[_0xfbfd27(0x1d8)]['length']??0x0},'description':'Preview\x20Service\x20Tree\x20import\x20into\x20~/.lovrabet/service.json'};},async 'execute'(_0x2e5155){const _0x96198a=a67_0x6ff935,_0x51ee73=importServiceManifest(_0x2e5155[_0x96198a(0x1a4)](_0x96198a(0x1e0)));if(_0x51ee73['entries'][_0x96198a(0x19d)]!==0x1)return{'ok':!![],'data':{'registryPath':_0x51ee73['registryPath'],'imported':_0x51ee73['imported'],'updated':_0x51ee73[_0x96198a(0x1cb)],'serviceCount':_0x51ee73[_0x96198a(0x1d5)],'services':_0x51ee73[_0x96198a(0x1c2)][_0x96198a(0x1d6)](summarizeService)},'message':_0x96198a(0x1d3)+_0x51ee73[_0x96198a(0x1c9)]+_0x96198a(0x1d2)+_0x51ee73[_0x96198a(0x1cb)]+'\x20service(s).'};return{'ok':!![],'data':{'registryPath':_0x51ee73[_0x96198a(0x1aa)],'replaced':_0x51ee73[_0x96198a(0x1da)],'imported':_0x51ee73[_0x96198a(0x1c9)],'updated':_0x51ee73[_0x96198a(0x1cb)],'serviceCount':_0x51ee73[_0x96198a(0x1d5)],'service':summarizeService(_0x51ee73[_0x96198a(0x1a1)])},'message':(_0x51ee73['replaced']?'Updated':_0x96198a(0x1dc))+_0x96198a(0x1ba)+_0x51ee73['entry']['serviceCode']+'.'};}},{'service':'service','command':'export','description':'Export\x20the\x20local\x20Service\x20Tree\x20manifest\x20to\x20a\x20JSON\x20file','risk':'write','confirmationDescription':a67_0x6ff935(0x1c6),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG,FILE_FLAG],async 'dryRun'(_0x5cbeb0){const _0x5bf49b=a67_0x6ff935,_0x18448f=getLocalServiceEntry(_0x5cbeb0[_0x5bf49b(0x1a4)](_0x5bf49b(0x1b6)));return{'method':_0x5bf49b(0x1ca),'url':_0x5cbeb0[_0x5bf49b(0x1a4)]('file'),'body':{'service':_0x5cbeb0['str'](_0x5bf49b(0x1b6)),'found':Boolean(_0x18448f),'version':_0x18448f?.['version'],'source':_0x18448f?.['source']},'description':'Preview\x20Service\x20Tree\x20export\x20from\x20~/.lovrabet/service.json'};},async 'execute'(_0x1273ab){const _0x1b14dd=a67_0x6ff935,_0x4cec65=exportServiceManifest(_0x1273ab[_0x1b14dd(0x1a4)](_0x1b14dd(0x1b6)),_0x1273ab[_0x1b14dd(0x1a4)](_0x1b14dd(0x1e0)));return{'ok':!![],'data':{'registryPath':_0x4cec65[_0x1b14dd(0x1aa)],'file':_0x4cec65[_0x1b14dd(0x1a6)],'service':summarizeService(_0x4cec65['entry'])},'message':_0x1b14dd(0x1e1)+_0x4cec65[_0x1b14dd(0x1a1)]['serviceCode']+'.'};}},{'service':a67_0x6ff935(0x1b6),'command':a67_0x6ff935(0x1c4),'description':a67_0x6ff935(0x1cd),'risk':a67_0x6ff935(0x1a8),'requiresAuth':![],'requiresAppCode':![],'flags':[],async 'execute'(){const _0x13308f=a67_0x6ff935,_0x3a460d=listLocalServices();return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'total':_0x3a460d['length'],'services':_0x3a460d[_0x13308f(0x1d6)](summarizeService)}};}},{'service':a67_0x6ff935(0x1b6),'command':a67_0x6ff935(0x1be),'description':'Remove\x20a\x20Service\x20Tree\x20manifest\x20from\x20the\x20local\x20runtime\x20registry','risk':a67_0x6ff935(0x1a9),'confirmationDescription':a67_0x6ff935(0x1d9),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'dryRun'(_0x12abf0){const _0x7421f5=a67_0x6ff935,_0x4a766c=getLocalServiceEntry(_0x12abf0['str']('service'));return{'method':_0x7421f5(0x1ca),'url':getServiceRegistryPath(),'body':{'service':_0x12abf0[_0x7421f5(0x1a4)]('service'),'found':Boolean(_0x4a766c),'version':_0x4a766c?.[_0x7421f5(0x1de)],'source':_0x4a766c?.[_0x7421f5(0x19f)]},'description':'Preview\x20Service\x20Tree\x20removal\x20from\x20~/.lovrabet/service.json'};},async 'execute'(_0x2513d9){const _0x3b9121=a67_0x6ff935,_0xfa0e66=removeServiceManifest(_0x2513d9['str'](_0x3b9121(0x1b6)));return{'ok':!![],'data':{'registryPath':_0xfa0e66[_0x3b9121(0x1aa)],'serviceCount':_0xfa0e66[_0x3b9121(0x1d5)],'service':summarizeService(_0xfa0e66[_0x3b9121(0x1a1)])},'message':_0x3b9121(0x1bd)+_0xfa0e66[_0x3b9121(0x1a1)]['serviceCode']+'.'};}},{'service':a67_0x6ff935(0x1b6),'command':a67_0x6ff935(0x1a5),'description':a67_0x6ff935(0x1d7),'risk':a67_0x6ff935(0x1a8),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'execute'(_0x48dd1c){const _0x464155=a67_0x6ff935,_0x74fd39=getLocalServiceEntry(_0x48dd1c[_0x464155(0x1a4)](_0x464155(0x1b6)));if(!_0x74fd39)return{'ok':![],'data':{'registryPath':getServiceRegistryPath(),'service':_0x48dd1c[_0x464155(0x1a4)]('service')},'message':'Local\x20service\x20not\x20found:\x20'+_0x48dd1c[_0x464155(0x1a4)]('service')};return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'service':summarizeService(_0x74fd39),'manifest':_0x74fd39[_0x464155(0x19c)],'normalizedManifest':toPublicNormalizedServiceTree(_0x74fd39[_0x464155(0x1bb)])}};}}];
|
|
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)])}};}}];
|