@lovrabet/lovrabet-cli 2.3.10 → 2.3.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/approval/index.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/import-excel.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/issue/context.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/permit/dataset-get.js +1 -1
- package/lib/commands/permit/dataset-set.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/schedule/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/function-name-adapter.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/diagram.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/diagram.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/user-account/bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-sdk-errors.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/access-error.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/raw-flags.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-import/auto-id-runner.js +1 -1
- package/lib/services/dataset-import/excel-reader.js +1 -1
- package/lib/services/dataset-import/image-bytes.js +1 -1
- package/lib/services/dataset-import/image-ooxml.js +1 -1
- package/lib/services/dataset-import/image-runner.js +1 -1
- package/lib/services/dataset-import/metadata.js +1 -1
- package/lib/services/dataset-import/preview.js +1 -1
- package/lib/services/dataset-import/runner.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/install-target.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/utils/access-key-redaction.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/positive-safe-integer.js +1 -1
- package/lib/utils/redaction.js +1 -1
- package/lib/utils/runtime-user-id.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/lovrabet/SKILL.md +3 -3
- package/skills/lovrabet/references/lovrabet-schedule-workflow.md +50 -1
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a54_0x290c70=a54_0x1b60;(function(_0x2c121c,_0x51008e){const _0x58394e=a54_0x1b60,_0x20b472=_0x2c121c();while(!![]){try{const _0x2671f9=-parseInt(_0x58394e(0x110))/0x1+-parseInt(_0x58394e(0x109))/0x2*(-parseInt(_0x58394e(0x11b))/0x3)+-parseInt(_0x58394e(0x11e))/0x4+parseInt(_0x58394e(0x106))/0x5+-parseInt(_0x58394e(0x105))/0x6*(parseInt(_0x58394e(0x11a))/0x7)+parseInt(_0x58394e(0x111))/0x8+parseInt(_0x58394e(0x10e))/0x9*(parseInt(_0x58394e(0x11d))/0xa);if(_0x2671f9===_0x51008e)break;else _0x20b472['push'](_0x20b472['shift']());}catch(_0x2ed4f6){_0x20b472['push'](_0x20b472['shift']());}}}(a54_0x1994,0x37e09));import{createRuntimeAppRole}from'../../core/api-client.js';function a54_0x1b60(_0x15ef22,_0x27bd25){_0x15ef22=_0x15ef22-0x105;const _0x199450=a54_0x1994();let _0x1b60ba=_0x199450[_0x15ef22];return _0x1b60ba;}import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';import{projectRuntimeRole,readOptionalRuntimeRoleCode,ROLE_CODE_FLAG,runtimeRoleWriteResult}from'../../commands/role/shared.js';function input(_0x41ac4b){const _0x56ad2f=a54_0x1b60,_0x5c4a90=_0x41ac4b[_0x56ad2f(0x11c)](_0x56ad2f(0x117))[_0x56ad2f(0x114)]();if(!_0x5c4a90)throw CliErrors['validation']('--name\x20must\x20not\x20be\x20blank.');const _0x212904=_0x41ac4b[_0x56ad2f(0x11c)]('remark')[_0x56ad2f(0x114)](),_0x4aebc3=readOptionalRuntimeRoleCode(_0x41ac4b);return{'appCode':_0x41ac4b[_0x56ad2f(0x11f)],'roleName':_0x5c4a90,..._0x4aebc3?{'roleCode':_0x4aebc3}:{},..._0x212904?{'remark':_0x212904}:{}};}export const roleCreate={'service':a54_0x290c70(0x112),'command':a54_0x290c70(0x108),'description':a54_0x290c70(0x10b),'risk':a54_0x290c70(0x10a),'confirmationDescription':a54_0x290c70(0x116),'flags':[{'name':a54_0x290c70(0x117),'type':a54_0x290c70(0x107),'required':!![],'description':a54_0x290c70(0x115)},ROLE_CODE_FLAG,{'name':a54_0x290c70(0x10f),'type':a54_0x290c70(0x107),'description':'Optional\x20role\x20remark'}],async 'validate'(_0x7d1e8b){input(_0x7d1e8b);},async 'dryRun'(_0x5dac6b){const _0x2f99ec=a54_0x290c70;return dryRun('POST',_0x2f99ec(0x119))['body']({'roleType':_0x2f99ec(0x113),...input(_0x5dac6b)})['description'](_0x2f99ec(0x10c))[_0x2f99ec(0x10d)]();},async 'execute'(_0xa32f0){const _0x5d1d24=a54_0x290c70,_0x37b0af=await createRuntimeAppRole(input(_0xa32f0));return{'ok':!![],'data':runtimeRoleWriteResult(_0x5d1d24(0x108),{'roleId':_0x37b0af['id']},null,projectRuntimeRole(_0x37b0af),{'method':_0x5d1d24(0x118),'path':_0x5d1d24(0x119)})};}};function a54_0x1994(){const _0x33881f=['30609NdGgQn','str','90GpsRTz','1544408JWMBjW','appCode','42QzkPVN','686115BLIKqe','string','create','44difIyE','high-risk-write','Create\x20a\x20runtime\x20CUSTOM\x20role','Preview:\x20create\x20a\x20runtime\x20CUSTOM\x20role','build','304911aoizSt','remark','79116PBWpVd','1800024bpYgBP','role','CUSTOM','trim','Role\x20name','Creates\x20a\x20custom\x20role\x20in\x20the\x20current\x20runtime\x20app.\x20After\x20creation\x20it\x20can\x20be\x20used\x20for\x20member\x20and\x20resource\x20permissions.','name','POST','/client/permit/role/create','197512wuWdVQ'];a54_0x1994=function(){return _0x33881f;};return a54_0x1994();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a55_0x21ded2=a55_0x381f;(function(_0x4af5a2,_0x314e7c){const _0x500a9b=a55_0x381f,_0x102d63=_0x4af5a2();while(!![]){try{const _0x2e4161=parseInt(_0x500a9b(0x147))/0x1*(parseInt(_0x500a9b(0x13e))/0x2)+parseInt(_0x500a9b(0x144))/0x3+parseInt(_0x500a9b(0x146))/0x4+parseInt(_0x500a9b(0x142))/0x5+parseInt(_0x500a9b(0x13b))/0x6+-parseInt(_0x500a9b(0x139))/0x7*(parseInt(_0x500a9b(0x143))/0x8)+-parseInt(_0x500a9b(0x145))/0x9*(parseInt(_0x500a9b(0x138))/0xa);if(_0x2e4161===_0x314e7c)break;else _0x102d63['push'](_0x102d63['shift']());}catch(_0x576613){_0x102d63['push'](_0x102d63['shift']());}}}(a55_0x39ad,0x34222));function a55_0x381f(_0x107619,_0x1a72fa){_0x107619=_0x107619-0x137;const _0x39adfd=a55_0x39ad();let _0x381f8a=_0x39adfd[_0x107619];return _0x381f8a;}function a55_0x39ad(){const _0x58f572=['/client/permit/role/delete','num','2021655AXFEra','88GLdzrJ','1215741awuozn','435627BjBQJu','1382508CFaFir','6362bukkJa','delete','description','Deletes\x20the\x20custom\x20role\x20in\x20the\x20current\x20runtime\x20app.\x20Membership\x20and\x20permission\x20config\x20for\x20that\x20role\x20may\x20become\x20invalid.','250jnzGtU','139447oPblkT','build','2314482gUEaFW','role','high-risk-write','32evHHqu','POST'];a55_0x39ad=function(){return _0x58f572;};return a55_0x39ad();}import{deleteRuntimeAppRole}from'../../core/api-client.js';import{dryRun}from'../../framework/dryrun.js';import{assertCustomRuntimeRole,getRuntimeRoleById,projectRuntimeRole,ROLE_ID_FLAG,runtimeRoleWriteResult}from'../../commands/role/shared.js';async function prepare(_0x20ea1c){const _0x1dd2fb=a55_0x381f,_0x24c157=await getRuntimeRoleById(_0x20ea1c['appCode'],_0x20ea1c[_0x1dd2fb(0x141)]('id'));return assertCustomRuntimeRole(_0x24c157,_0x1dd2fb(0x148)),_0x24c157;}export const roleDelete={'service':a55_0x21ded2(0x13c),'command':'delete','description':'Delete\x20a\x20runtime\x20CUSTOM\x20role','risk':a55_0x21ded2(0x13d),'confirmationDescription':a55_0x21ded2(0x137),'flags':[ROLE_ID_FLAG],async 'dryRun'(_0x499ea1){const _0x19ac35=a55_0x21ded2,_0x316e5c=await prepare(_0x499ea1);return dryRun(_0x19ac35(0x13f),_0x19ac35(0x140))['body']({'id':_0x316e5c['id']})[_0x19ac35(0x149)]('Preview:\x20delete\x20a\x20runtime\x20CUSTOM\x20role')[_0x19ac35(0x13a)]();},async 'execute'(_0x56694b){const _0x1d9cea=a55_0x21ded2,_0x4b8acb=await prepare(_0x56694b);return await deleteRuntimeAppRole(_0x4b8acb['id']),{'ok':!![],'data':runtimeRoleWriteResult(_0x1d9cea(0x148),{'roleId':_0x4b8acb['id']},projectRuntimeRole(_0x4b8acb),null,{'method':_0x1d9cea(0x13f),'path':'/client/permit/role/delete'})};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a56_0x889274=a56_0x1c89;function a56_0x1c89(_0x3e326b,_0x1fea57){_0x3e326b=_0x3e326b-0xe0;const _0x497a09=a56_0x497a();let _0x1c89f9=_0x497a09[_0x3e326b];return _0x1c89f9;}function a56_0x497a(){const _0x3e9095=['606027NVNBwD','3378600FIwXWs','8jJYFKs','353038JrIdeG','1671229fDDxEz','role','517wrzWnW','76mXPWve','118205mZuUiA','Show\x20one\x20runtime\x20role\x20by\x20ID','2KxTLwz','159690fLKFoq','num','appCode','1397850oROHZa'];a56_0x497a=function(){return _0x3e9095;};return a56_0x497a();}(function(_0x55f0ba,_0x3e6a90){const _0x7dad2a=a56_0x1c89,_0x5c2dc2=_0x55f0ba();while(!![]){try{const _0xf4121=parseInt(_0x7dad2a(0xe8))/0x1*(-parseInt(_0x7dad2a(0xe1))/0x2)+-parseInt(_0x7dad2a(0xed))/0x3+parseInt(_0x7dad2a(0xe5))/0x4*(parseInt(_0x7dad2a(0xe6))/0x5)+parseInt(_0x7dad2a(0xec))/0x6+-parseInt(_0x7dad2a(0xe2))/0x7+parseInt(_0x7dad2a(0xe0))/0x8*(-parseInt(_0x7dad2a(0xee))/0x9)+parseInt(_0x7dad2a(0xe9))/0xa*(parseInt(_0x7dad2a(0xe4))/0xb);if(_0xf4121===_0x3e6a90)break;else _0x5c2dc2['push'](_0x5c2dc2['shift']());}catch(_0x3791d5){_0x5c2dc2['push'](_0x5c2dc2['shift']());}}}(a56_0x497a,0x4054f));import{getRuntimeRoleById,projectRuntimeRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';export const roleDetail={'service':a56_0x889274(0xe3),'command':'detail','description':a56_0x889274(0xe7),'risk':'read','flags':[ROLE_ID_FLAG],async 'execute'(_0x23795e){const _0x347c48=a56_0x889274,_0x3007c3=await getRuntimeRoleById(_0x23795e[_0x347c48(0xeb)],_0x23795e[_0x347c48(0xea)]('id'));return{'ok':!![],'data':{'scope':'runtime','role':projectRuntimeRole(_0x3007c3)}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x53f956,_0x4adbe9){const _0x304fe9=a57_0x247d,_0x51983f=_0x53f956();while(!![]){try{const _0x2fafdd=-parseInt(_0x304fe9(0x176))/0x1+parseInt(_0x304fe9(0x172))/0x2+-parseInt(_0x304fe9(0x170))/0x3+parseInt(_0x304fe9(0x171))/0x4*(-parseInt(_0x304fe9(0x174))/0x5)+parseInt(_0x304fe9(0x16e))/0x6+-parseInt(_0x304fe9(0x173))/0x7*(parseInt(_0x304fe9(0x175))/0x8)+parseInt(_0x304fe9(0x16f))/0x9;if(_0x2fafdd===_0x4adbe9)break;else _0x51983f['push'](_0x51983f['shift']());}catch(_0x846d99){_0x51983f['push'](_0x51983f['shift']());}}}(a57_0x450c,0x91df6));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';function a57_0x450c(){const _0x25e043=['1348095JyOBTt','712rRxHYY','1974PWDAFe','7ePYdIR','25405oaBBKx','2375880ElNHow','315734ymmEkz','1330398alwOjf','21071484aFYrSp'];a57_0x450c=function(){return _0x25e043;};return a57_0x450c();}import{roleUserAdd}from'../../commands/role/user-add.js';function a57_0x247d(_0x529745,_0x28748b){_0x529745=_0x529745-0x16e;const _0x450cdd=a57_0x450c();let _0x247d74=_0x450cdd[_0x529745];return _0x247d74;}import{roleUserRemove}from'../../commands/role/user-remove.js';export const roleDefinitions=[roleList,roleDetail,roleCreate,roleUpdate,roleDelete,roleUserAdd,roleUserRemove];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a58_0xac6aa7=a58_0x4ca9;(function(_0x15561b,_0x1d043b){const _0x3f41be=a58_0x4ca9,_0x503a99=_0x15561b();while(!![]){try{const _0x4b284c=-parseInt(_0x3f41be(0xba))/0x1*(-parseInt(_0x3f41be(0xa6))/0x2)+parseInt(_0x3f41be(0xc5))/0x3*(-parseInt(_0x3f41be(0xc0))/0x4)+-parseInt(_0x3f41be(0xcd))/0x5*(parseInt(_0x3f41be(0xb5))/0x6)+parseInt(_0x3f41be(0xa8))/0x7*(-parseInt(_0x3f41be(0xaa))/0x8)+-parseInt(_0x3f41be(0xbe))/0x9+-parseInt(_0x3f41be(0xc8))/0xa*(parseInt(_0x3f41be(0xae))/0xb)+parseInt(_0x3f41be(0xac))/0xc*(parseInt(_0x3f41be(0xca))/0xd);if(_0x4b284c===_0x1d043b)break;else _0x503a99['push'](_0x503a99['shift']());}catch(_0x1ee676){_0x503a99['push'](_0x503a99['shift']());}}}(a58_0x591a,0xb37be));function a58_0x4ca9(_0x29ef0e,_0xbc5463){_0x29ef0e=_0x29ef0e-0xa4;const _0x591a00=a58_0x591a();let _0x4ca92c=_0x591a00[_0x29ef0e];return _0x4ca92c;}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_0xac6aa7(0xc9),'description':a58_0xac6aa7(0xbb),'risk':a58_0xac6aa7(0xb9),'flags':[{'name':a58_0xac6aa7(0xb8),'type':a58_0xac6aa7(0xc3),'enum':RUNTIME_ROLE_TYPES,'description':'Runtime\x20role\x20type'},{'name':'name','type':a58_0xac6aa7(0xc3),'description':'Fuzzy\x20role-name\x20filter'},{'name':'page','type':a58_0xac6aa7(0xa5),'default':0x1,'description':a58_0xac6aa7(0xc4)},{'name':a58_0xac6aa7(0xb3),'type':a58_0xac6aa7(0xa5),'default':0x64,'description':a58_0xac6aa7(0xb6)}],async 'validate'(_0x35e590){const _0xcbc0a8=a58_0xac6aa7,_0x36dae1=_0x35e590['str'](_0xcbc0a8(0xb8))[_0xcbc0a8(0xb1)]();if(_0x36dae1&&!RUNTIME_ROLE_TYPES[_0xcbc0a8(0xa7)](_0x36dae1))throw CliErrors[_0xcbc0a8(0xb4)](_0xcbc0a8(0xaf)+_0x36dae1+'.');const _0x2cc899=_0x35e590[_0xcbc0a8(0xcb)](_0xcbc0a8(0xc2),0x1),_0x252f9f=_0x35e590[_0xcbc0a8(0xcb)]('pagesize',0x64);if(!Number['isSafeInteger'](_0x2cc899)||_0x2cc899<0x1)throw CliErrors[_0xcbc0a8(0xb4)](_0xcbc0a8(0xa9));if(!Number['isSafeInteger'](_0x252f9f)||_0x252f9f<0x1||_0x252f9f>0x64)throw CliErrors[_0xcbc0a8(0xb4)](_0xcbc0a8(0xc6));},async 'execute'(_0x26c024){const _0x2324f0=a58_0xac6aa7,_0x4a114a=_0x26c024[_0x2324f0(0xcc)](_0x2324f0(0xb8))[_0x2324f0(0xb1)](),_0x39a288=_0x26c024['str'](_0x2324f0(0xbd))[_0x2324f0(0xb2)](),_0x42bb81=_0x26c024[_0x2324f0(0xcb)](_0x2324f0(0xc2),0x1),_0x59a7b1=_0x26c024[_0x2324f0(0xcb)](_0x2324f0(0xb3),0x64);if(_0x4a114a){const _0x5452f9=(await listAllRuntimeRoles(_0x26c024[_0x2324f0(0xbf)],{..._0x39a288?{'roleName':_0x39a288}:{}}))[_0x2324f0(0xb0)](_0xbc3e94=>_0xbc3e94[_0x2324f0(0xc1)]===_0x4a114a),_0x4b0964=(_0x42bb81-0x1)*_0x59a7b1;return{'ok':!![],'data':{'scope':_0x2324f0(0xad),'roles':_0x5452f9[_0x2324f0(0xbc)](_0x4b0964,_0x4b0964+_0x59a7b1)[_0x2324f0(0xa4)](projectRuntimeRole),'paging':{'currentPage':_0x42bb81,'pageSize':_0x59a7b1,'totalCount':_0x5452f9[_0x2324f0(0xc7)]}}};}const _0x162914=await listRuntimeAppRoles(_0x26c024['appCode'],{..._0x39a288?{'roleName':_0x39a288}:{},'currentPage':_0x42bb81,'pageSize':_0x59a7b1});return{'ok':!![],'data':{'scope':_0x2324f0(0xad),'roles':_0x162914[_0x2324f0(0xb7)][_0x2324f0(0xa4)](projectRuntimeRole),'paging':_0x162914[_0x2324f0(0xab)]}};}};function a58_0x591a(){const _0x1fc8e4=['filter','toUpperCase','trim','pagesize','validation','3135504jsrynb','Page\x20size\x20from\x201\x20to\x20100','items','type','read','535016xZdiOx','List\x20runtime\x20roles\x20for\x20the\x20current\x20app','slice','name','9685584GfaCFb','appCode','20lLbAFe','roleType','page','string','Page\x20number','685068WhepRr','--pagesize\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.','length','10eraRFb','list','13ZcCYmM','num','str','5iThaoP','map','number','2SQxLwc','includes','21cxdCsa','--page\x20must\x20be\x20a\x20positive\x20integer.','216184GJZlIn','paging','40038072DvvqoM','runtime','3462217DbrNBB','Invalid\x20runtime\x20role\x20type:\x20'];a58_0x591a=function(){return _0x1fc8e4;};return a58_0x591a();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a59_0x4510ec=a59_0x11fd;(function(_0x298d85,_0x2d7f20){const _0x483ec1=a59_0x11fd,_0xbc474c=_0x298d85();while(!![]){try{const _0x2b263c=-parseInt(_0x483ec1(0x182))/0x1*(-parseInt(_0x483ec1(0x191))/0x2)+parseInt(_0x483ec1(0x18b))/0x3*(-parseInt(_0x483ec1(0x171))/0x4)+-parseInt(_0x483ec1(0x163))/0x5*(parseInt(_0x483ec1(0x1a2))/0x6)+parseInt(_0x483ec1(0x18a))/0x7+-parseInt(_0x483ec1(0x17b))/0x8+-parseInt(_0x483ec1(0x173))/0x9*(parseInt(_0x483ec1(0x164))/0xa)+parseInt(_0x483ec1(0x159))/0xb;if(_0x2b263c===_0x2d7f20)break;else _0xbc474c['push'](_0xbc474c['shift']());}catch(_0x4b8fd7){_0xbc474c['push'](_0xbc474c['shift']());}}}(a59_0x3b96,0xd1a09));import{listRuntimeAppUsers,listRuntimeAppRoles,listRuntimeRoleUsers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{normalizeRuntimeUserId}from'../../utils/runtime-user-id.js';function a59_0x11fd(_0x50b31a,_0x1fc8f4){_0x50b31a=_0x50b31a-0x155;const _0x3b96f3=a59_0x3b96();let _0x11fda0=_0x3b96f3[_0x50b31a];return _0x11fda0;}export const RUNTIME_ROLE_TYPES=[a59_0x4510ec(0x157),a59_0x4510ec(0x186),'OWNER',a59_0x4510ec(0x194)];const BUILTIN_ROLE_TYPES=[a59_0x4510ec(0x157),a59_0x4510ec(0x186),a59_0x4510ec(0x192)];export const ROLE_ID_FLAG={'name':'id','type':a59_0x4510ec(0x196),'required':!![],'description':a59_0x4510ec(0x174)};export const ROLE_REF_FLAG={'name':a59_0x4510ec(0x18e),'type':'string','required':!![],'description':a59_0x4510ec(0x172)};export const ROLE_CODE_FLAG={'name':a59_0x4510ec(0x162),'type':a59_0x4510ec(0x185),'description':a59_0x4510ec(0x18d)};export const USER_ID_FLAG={'name':'user','type':a59_0x4510ec(0x185),'required':!![],'description':a59_0x4510ec(0x1a1)};export const EXPECT_USER_COUNT_FLAG={'name':a59_0x4510ec(0x17a),'type':a59_0x4510ec(0x196),'description':a59_0x4510ec(0x184)};export function isBuiltinRuntimeRole(_0x57888b){const _0x28c5d0=a59_0x4510ec;return BUILTIN_ROLE_TYPES[_0x28c5d0(0x16c)](_0x57888b);}export function assertCustomRuntimeRole(_0x4a14f8,_0x456423){const _0xd2af27=a59_0x4510ec;if(_0x4a14f8[_0xd2af27(0x18c)]!==_0xd2af27(0x194))throw CliErrors[_0xd2af27(0x179)](_0xd2af27(0x16a)+_0x456423+_0xd2af27(0x181)+_0x4a14f8['roleName']+'\x20('+_0x4a14f8[_0xd2af27(0x18c)]+').',_0xd2af27(0x18f));}export function projectRuntimeRole(_0x550a1e){const _0x57981a=a59_0x4510ec;return{'id':_0x550a1e['id'],'roleCode':_0x550a1e['roleCode'],'roleName':_0x550a1e[_0x57981a(0x16d)],'roleType':_0x550a1e['roleType'],'remark':_0x550a1e[_0x57981a(0x180)],'userCount':_0x550a1e[_0x57981a(0x195)]??0x0,'permitCount':_0x550a1e[_0x57981a(0x19a)]??0x0,'builtin':isBuiltinRuntimeRole(_0x550a1e['roleType'])};}export function readOptionalRuntimeRoleCode(_0x5aefba){const _0x5f3753=a59_0x4510ec,_0x58cc3a=_0x5aefba[_0x5f3753(0x16e)]('role-code');if(_0x58cc3a===undefined||_0x58cc3a===null)return undefined;const _0x58ce25=String(_0x58cc3a)[_0x5f3753(0x178)]();if(!_0x58ce25)throw CliErrors[_0x5f3753(0x179)](_0x5f3753(0x17d));if(_0x58ce25[_0x5f3753(0x1a0)]>0x40)throw CliErrors[_0x5f3753(0x179)]('--role-code\x20cannot\x20exceed\x2064\x20characters.');return _0x58ce25;}export async function getRuntimeRoleById(_0x537f58,_0x2d6794){const _0x12a48a=a59_0x4510ec;if(!Number[_0x12a48a(0x177)](_0x2d6794)||_0x2d6794<=0x0)throw CliErrors[_0x12a48a(0x179)](_0x12a48a(0x175));const _0x2373ec=(await listAllRuntimeRoles(_0x537f58))['filter'](_0x12b93b=>_0x12b93b['id']===_0x2d6794&&(!_0x12b93b[_0x12a48a(0x19c)]||_0x12b93b[_0x12a48a(0x19c)]===_0x537f58));if(_0x2373ec[_0x12a48a(0x1a0)]!==0x1)throw CliErrors[_0x12a48a(0x179)]('Runtime\x20role\x20id\x20'+_0x2d6794+_0x12a48a(0x156)+_0x537f58+'.',_0x12a48a(0x15b));const _0x276d49=_0x2373ec[0x0],_0x45299c=_0x276d49['id'];if(typeof _0x45299c!==_0x12a48a(0x196)||!Number[_0x12a48a(0x177)](_0x45299c)||_0x45299c<=0x0)throw CliErrors[_0x12a48a(0x179)]('Runtime\x20role\x20has\x20an\x20invalid\x20ID;\x20reload\x20roles\x20before\x20writing.');return{..._0x276d49,'id':_0x45299c};}function a59_0x3b96(){const _0x554d0e=['Reject\x20when\x20the\x20target\x20role\x20member\x20count\x20has\x20changed','string','USER','Runtime\x20role\x20name\x20\x22','runtime','join','31297FwyMTZ','84XvdPmg','roleType','Globally\x20unique\x20roleCode\x20(maximum\x2064\x20characters)','role','Only\x20CUSTOM\x20runtime\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','\x20is\x20already\x20in\x20runtime\x20role\x20','6bQOekN','OWNER','\x20is\x20missing\x20from\x20the\x20grouped\x20member\x20snapshot.','CUSTOM','userCount','number','userList','\x22\x20is\x20ambiguous.','Runtime\x20role\x20member\x20count\x20changed:\x20expected\x20','permitCount','Runtime\x20user\x20','appCode','filter','Pass\x20--user\x20<userId>;\x20name\x20and\x20account\x20lookup\x20are\x20not\x20available\x20in\x20runtime\x20scope.','Invalid\x20runtime\x20userId.','length','Runtime\x20userId\x20(string)','31032TdyZsP','push','Runtime\x20role\x20member\x20snapshot\x20has\x20an\x20invalid\x20role\x20ID;\x20reload\x20before\x20writing.','num','--expect-user-count\x20must\x20be\x20a\x20non-negative\x20integer.','\x20was\x20not\x20found\x20in\x20app\x20','ADMIN','paging','44705749WLUSdQ','OWNER\x20runtime\x20role\x20membership\x20cannot\x20be\x20changed\x20with\x20this\x20command.','Run\x20`lovrabet\x20role\x20list`\x20and\x20use\x20a\x20role\x20from\x20the\x20current\x20app.','userId','str','Use\x20a\x20userId\x20returned\x20by\x20the\x20current\x20application\x27s\x20personnel\x20list.','Transfer\x20or\x20manage\x20application\x20ownership\x20through\x20the\x20dedicated\x20application\x20workflow.','Pass\x20one\x20role\x20ID:\x20','Missing\x20runtime\x20role\x20reference.','role-code','475nUspTN','7238390sFWHaG','user-add','code','User\x20','Pass\x20--role\x20<id|name>.',',\x20found\x20','Cannot\x20','items','includes','roleName','flag','user','test','221992pTbGCs','Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name','9oioCaq','Runtime\x20role\x20ID\x20returned\x20by\x20role\x20list','Role\x20ID\x20must\x20be\x20a\x20positive\x20integer.','totalCount','isSafeInteger','trim','validation','expect-user-count','10848264RsdIOM','userName','--role-code\x20must\x20not\x20be\x20blank.','applyUserList','map','remark','\x20built-in\x20runtime\x20role\x20','305053TJZkfS','Run\x20`lovrabet\x20role\x20list`\x20or\x20pass\x20--role\x20<id>.'];a59_0x3b96=function(){return _0x554d0e;};return a59_0x3b96();}export async function listAllRuntimeRoles(_0x1d666b,_0x343fac={}){const _0x4b8f1f=a59_0x4510ec,_0x46d0a6=0x64,_0x4cd080=[];for(let _0x3d7850=0x1;;_0x3d7850+=0x1){const _0x45f438=await listRuntimeAppRoles(_0x1d666b,{..._0x343fac['roleName']?{'roleName':_0x343fac['roleName']}:{},'currentPage':_0x3d7850,'pageSize':_0x46d0a6});_0x4cd080[_0x4b8f1f(0x1a3)](..._0x45f438[_0x4b8f1f(0x16b)]);if(_0x45f438[_0x4b8f1f(0x16b)][_0x4b8f1f(0x1a0)]<_0x46d0a6||_0x45f438[_0x4b8f1f(0x158)]&&_0x4cd080['length']>=_0x45f438[_0x4b8f1f(0x158)][_0x4b8f1f(0x176)])return _0x4cd080;}}export async function resolveRuntimeRoleRef(_0x32007e,_0x52db07){const _0x294b22=a59_0x4510ec,_0x363dbc=_0x52db07[_0x294b22(0x178)]();if(!_0x363dbc)throw CliErrors['validation'](_0x294b22(0x161),_0x294b22(0x168));if(/^\d+$/[_0x294b22(0x170)](_0x363dbc))return getRuntimeRoleById(_0x32007e,Number(_0x363dbc));const _0x42f7c2=(await listAllRuntimeRoles(_0x32007e))[_0x294b22(0x19d)](_0xb60e6c=>_0xb60e6c['roleName']===_0x363dbc);if(_0x42f7c2[_0x294b22(0x1a0)]===0x0)throw CliErrors[_0x294b22(0x179)](_0x294b22(0x187)+_0x363dbc+'\x22\x20was\x20not\x20found\x20in\x20app\x20'+_0x32007e+'.',_0x294b22(0x183));if(_0x42f7c2[_0x294b22(0x1a0)]>0x1)throw CliErrors[_0x294b22(0x179)](_0x294b22(0x187)+_0x363dbc+_0x294b22(0x198),_0x294b22(0x160)+_0x42f7c2['map'](_0x1a86d8=>_0x1a86d8['id'])[_0x294b22(0x189)](',\x20')+'.');const _0x5117b1=_0x42f7c2[0x0],_0x38ea40=_0x5117b1['id'];if(typeof _0x38ea40!==_0x294b22(0x196)||!Number['isSafeInteger'](_0x38ea40)||_0x38ea40<=0x0)throw CliErrors[_0x294b22(0x179)]('Runtime\x20role\x20has\x20an\x20invalid\x20ID;\x20reload\x20roles\x20before\x20writing.');return{..._0x5117b1,'id':_0x38ea40};}function parseRuntimeUserId(_0x14106f){const _0x156de5=a59_0x4510ec,_0x3b246c=_0x14106f['trim'](),_0x8e45fc=normalizeRuntimeUserId(_0x3b246c);if(_0x8e45fc===undefined)throw CliErrors[_0x156de5(0x179)](_0x156de5(0x19f),_0x156de5(0x19e));return _0x8e45fc;}export async function prepareRuntimeMemberMutation(_0xa934b7,_0x241017){const _0x5ade9c=a59_0x4510ec,_0x172fc7=await resolveRuntimeRoleRef(_0xa934b7['appCode'],_0xa934b7[_0x5ade9c(0x15d)](_0x5ade9c(0x18e)));if(_0x172fc7['roleType']===_0x5ade9c(0x192))throw CliErrors[_0x5ade9c(0x179)](_0x5ade9c(0x15a),_0x5ade9c(0x15f));const _0x23bc1b=parseRuntimeUserId(_0xa934b7['str'](_0x5ade9c(0x16f))),_0x3d5edd=(await listRuntimeRoleUsers(_0xa934b7[_0x5ade9c(0x19c)]))['map'](_0x433f87=>{const _0x18e080=_0x5ade9c;if(typeof _0x433f87['id']!==_0x18e080(0x196)||!Number[_0x18e080(0x177)](_0x433f87['id'])||_0x433f87['id']<=0x0)throw CliErrors[_0x18e080(0x179)](_0x18e080(0x1a4));return{..._0x433f87,'userList':[..._0x433f87[_0x18e080(0x197)]??[]],'applyUserList':[..._0x433f87[_0x18e080(0x17e)]??[]]};}),_0x4b675c=_0x3d5edd['find'](_0x2d5fc0=>_0x2d5fc0['id']===_0x172fc7['id']);if(!_0x4b675c)throw CliErrors[_0x5ade9c(0x179)]('Runtime\x20role\x20'+_0x172fc7['id']+_0x5ade9c(0x193),'Reload\x20the\x20role\x20list\x20and\x20retry\x20after\x20the\x20server\x20state\x20is\x20consistent.');const _0x11cb06=_0x11d7c0=>{const _0x4ddf36=_0x5ade9c,_0x2ecbf7=normalizeRuntimeUserId(_0x11d7c0);if(_0x2ecbf7===undefined)throw CliErrors[_0x4ddf36(0x179)]('Runtime\x20role\x20member\x20has\x20an\x20invalid\x20userId.');return _0x2ecbf7;},_0x5a27f0=_0x4b675c[_0x5ade9c(0x197)][_0x5ade9c(0x17f)](_0x5b9459=>_0x11cb06(_0x5b9459[_0x5ade9c(0x15c)])),_0x1631d2=_0xa934b7[_0x5ade9c(0x16e)]('expect-user-count');if(_0x1631d2!==undefined&&_0x1631d2!==null&&_0x1631d2!==''){const _0x5bd81a=_0xa934b7[_0x5ade9c(0x1a5)](_0x5ade9c(0x17a));if(!Number['isSafeInteger'](_0x5bd81a)||_0x5bd81a<0x0)throw CliErrors['validation'](_0x5ade9c(0x155));if(_0x5a27f0['length']!==_0x5bd81a)throw CliErrors[_0x5ade9c(0x179)](_0x5ade9c(0x199)+_0x5bd81a+_0x5ade9c(0x169)+_0x5a27f0[_0x5ade9c(0x1a0)]+'.','Read\x20the\x20current\x20members\x20and\x20retry\x20with\x20the\x20new\x20expected\x20count.');}const _0x1f2a31=_0x5a27f0[_0x5ade9c(0x16c)](_0x23bc1b),_0x2c8953=[];let _0x598826=!![];if(_0x241017===_0x5ade9c(0x165)){const _0x214289=await listRuntimeAppUsers(_0xa934b7[_0x5ade9c(0x19c)]),_0x2027d0=_0x214289[_0x5ade9c(0x19d)](_0x3567eb=>normalizeRuntimeUserId(_0x3567eb[_0x5ade9c(0x166)])===_0x23bc1b);if(_0x2027d0[_0x5ade9c(0x1a0)]!==0x1||!_0x2027d0[0x0][_0x5ade9c(0x17c)]?.['trim']())throw CliErrors[_0x5ade9c(0x179)](_0x5ade9c(0x19b)+_0x23bc1b+_0x5ade9c(0x156)+_0xa934b7[_0x5ade9c(0x19c)]+'.',_0x5ade9c(0x15e));_0x1f2a31?(_0x598826=![],_0x2c8953['push'](_0x5ade9c(0x167)+_0x23bc1b+_0x5ade9c(0x190)+_0x172fc7['id']+'.')):_0x4b675c[_0x5ade9c(0x197)]['push']({'userId':_0x23bc1b,'username':_0x2027d0[0x0]['userName']});}else!_0x1f2a31?(_0x598826=![],_0x2c8953[_0x5ade9c(0x1a3)](_0x5ade9c(0x167)+_0x23bc1b+'\x20is\x20not\x20in\x20runtime\x20role\x20'+_0x172fc7['id']+'.')):_0x4b675c['userList']=_0x4b675c[_0x5ade9c(0x197)][_0x5ade9c(0x19d)](_0x43b75d=>_0x11cb06(_0x43b75d[_0x5ade9c(0x15c)])!==_0x23bc1b);return{'role':_0x172fc7,'userId':_0x23bc1b,'roleList':_0x3d5edd,'before':{'userIds':_0x5a27f0},'after':{'userIds':_0x4b675c[_0x5ade9c(0x197)][_0x5ade9c(0x17f)](_0x4cf78d=>_0x11cb06(_0x4cf78d['userId']))},'shouldWrite':_0x598826,'warnings':_0x2c8953};}export function runtimeRoleWriteResult(_0x153364,_0x30098a,_0x2153f3,_0x299afc,_0x3d2abb,_0x4cf30b=[]){const _0x3d80a6=a59_0x4510ec;return{'operation':_0x153364,'scope':_0x3d80a6(0x188),'selector':_0x30098a,'before':_0x2153f3,'after':_0x299afc,'dryRun':![],'backend':_0x3d2abb,'warnings':_0x4cf30b};}
|
|
1
|
+
const a59_0xe9ac8b=a59_0x1c7b;(function(_0x2afd8e,_0x1dab86){const _0x5d3910=a59_0x1c7b,_0x5ce0a5=_0x2afd8e();while(!![]){try{const _0x3f76f5=-parseInt(_0x5d3910(0x138))/0x1+-parseInt(_0x5d3910(0x11f))/0x2+-parseInt(_0x5d3910(0x13a))/0x3+parseInt(_0x5d3910(0x127))/0x4+parseInt(_0x5d3910(0x149))/0x5*(parseInt(_0x5d3910(0x122))/0x6)+parseInt(_0x5d3910(0x15c))/0x7*(-parseInt(_0x5d3910(0x161))/0x8)+-parseInt(_0x5d3910(0x139))/0x9*(-parseInt(_0x5d3910(0x12b))/0xa);if(_0x3f76f5===_0x1dab86)break;else _0x5ce0a5['push'](_0x5ce0a5['shift']());}catch(_0x27c710){_0x5ce0a5['push'](_0x5ce0a5['shift']());}}}(a59_0x4152,0x5db4f));function a59_0x4152(){const _0x42215d=['userList','\x20is\x20not\x20in\x20runtime\x20role\x20','2507252iyPrVB','Cannot\x20','paging','trim','352300KhHYAu','length','join','applyUserList','Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name','USER','--role-code\x20must\x20not\x20be\x20blank.','Role\x20ID\x20must\x20be\x20a\x20positive\x20integer.','string','filter','Use\x20a\x20userId\x20returned\x20by\x20the\x20current\x20application\x27s\x20personnel\x20list.','Runtime\x20role\x20has\x20an\x20invalid\x20ID;\x20reload\x20roles\x20before\x20writing.','appCode','296090oIvinI','279UDjFsP','1359675XqdSsD','Runtime\x20role\x20member\x20snapshot\x20has\x20an\x20invalid\x20role\x20ID;\x20reload\x20before\x20writing.','Runtime\x20role\x20member\x20has\x20an\x20invalid\x20userId.','--role-code\x20cannot\x20exceed\x2064\x20characters.','\x20is\x20missing\x20from\x20the\x20grouped\x20member\x20snapshot.','OWNER','Pass\x20--role\x20<id|name>.','Runtime\x20userId\x20(string)','roleType','Run\x20`lovrabet\x20role\x20list`\x20and\x20use\x20a\x20role\x20from\x20the\x20current\x20app.','permitCount','flag','userId','OWNER\x20runtime\x20role\x20membership\x20cannot\x20be\x20changed\x20with\x20this\x20command.','Runtime\x20role\x20','85MTrTtx','User\x20','validation','push','items','Transfer\x20or\x20manage\x20application\x20ownership\x20through\x20the\x20dedicated\x20application\x20workflow.','Runtime\x20role\x20ID\x20returned\x20by\x20role\x20list','map','test','Globally\x20unique\x20roleCode\x20(maximum\x2064\x20characters)','includes','ADMIN','Runtime\x20role\x20name\x20\x22','role','roleCode','CUSTOM','userName','Reject\x20when\x20the\x20target\x20role\x20member\x20count\x20has\x20changed','role-code','679MeEEXM','Runtime\x20role\x20member\x20count\x20changed:\x20expected\x20',',\x20found\x20','find','roleName','34392cszEME','number','--expect-user-count\x20must\x20be\x20a\x20non-negative\x20integer.','Pass\x20--user\x20<userId>;\x20name\x20and\x20account\x20lookup\x20are\x20not\x20available\x20in\x20runtime\x20scope.','str','num','\x22\x20was\x20not\x20found\x20in\x20app\x20','expect-user-count','Invalid\x20runtime\x20userId.','Reload\x20the\x20role\x20list\x20and\x20retry\x20after\x20the\x20server\x20state\x20is\x20consistent.','529738nCjPAW','runtime','isSafeInteger','33906YNctJm','\x20was\x20not\x20found\x20in\x20app\x20','\x20built-in\x20runtime\x20role\x20'];a59_0x4152=function(){return _0x42215d;};return a59_0x4152();}import{listRuntimeAppUsers,listRuntimeAppRoles,listRuntimeRoleUsers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{normalizeRuntimeUserId}from'../../utils/runtime-user-id.js';export const RUNTIME_ROLE_TYPES=[a59_0xe9ac8b(0x154),a59_0xe9ac8b(0x130),a59_0xe9ac8b(0x13f),a59_0xe9ac8b(0x158)];const BUILTIN_ROLE_TYPES=[a59_0xe9ac8b(0x154),a59_0xe9ac8b(0x130),a59_0xe9ac8b(0x13f)];export const ROLE_ID_FLAG={'name':'id','type':'number','required':!![],'description':a59_0xe9ac8b(0x14f)};export const ROLE_REF_FLAG={'name':a59_0xe9ac8b(0x156),'type':a59_0xe9ac8b(0x133),'required':!![],'description':a59_0xe9ac8b(0x12f)};export const ROLE_CODE_FLAG={'name':a59_0xe9ac8b(0x15b),'type':a59_0xe9ac8b(0x133),'description':a59_0xe9ac8b(0x152)};export const USER_ID_FLAG={'name':'user','type':'string','required':!![],'description':a59_0xe9ac8b(0x141)};export const EXPECT_USER_COUNT_FLAG={'name':a59_0xe9ac8b(0x11c),'type':a59_0xe9ac8b(0x162),'description':a59_0xe9ac8b(0x15a)};export function isBuiltinRuntimeRole(_0x18802b){const _0x10d800=a59_0xe9ac8b;return BUILTIN_ROLE_TYPES[_0x10d800(0x153)](_0x18802b);}export function assertCustomRuntimeRole(_0x380953,_0x5a2c58){const _0x3e13b3=a59_0xe9ac8b;if(_0x380953[_0x3e13b3(0x142)]!==_0x3e13b3(0x158))throw CliErrors[_0x3e13b3(0x14b)](_0x3e13b3(0x128)+_0x5a2c58+_0x3e13b3(0x124)+_0x380953['roleName']+'\x20('+_0x380953['roleType']+').','Only\x20CUSTOM\x20runtime\x20roles\x20can\x20be\x20modified\x20or\x20deleted.');}export function projectRuntimeRole(_0x32c987){const _0x3d9154=a59_0xe9ac8b;return{'id':_0x32c987['id'],'roleCode':_0x32c987[_0x3d9154(0x157)],'roleName':_0x32c987['roleName'],'roleType':_0x32c987[_0x3d9154(0x142)],'remark':_0x32c987['remark'],'userCount':_0x32c987['userCount']??0x0,'permitCount':_0x32c987[_0x3d9154(0x144)]??0x0,'builtin':isBuiltinRuntimeRole(_0x32c987[_0x3d9154(0x142)])};}export function readOptionalRuntimeRoleCode(_0x1a88b9){const _0xe24d18=a59_0xe9ac8b,_0x20c62d=_0x1a88b9[_0xe24d18(0x145)](_0xe24d18(0x15b));if(_0x20c62d===undefined||_0x20c62d===null)return undefined;const _0x4e5a00=String(_0x20c62d)[_0xe24d18(0x12a)]();if(!_0x4e5a00)throw CliErrors[_0xe24d18(0x14b)](_0xe24d18(0x131));if(_0x4e5a00[_0xe24d18(0x12c)]>0x40)throw CliErrors[_0xe24d18(0x14b)](_0xe24d18(0x13d));return _0x4e5a00;}export async function getRuntimeRoleById(_0xc478dd,_0x30f032){const _0x29f025=a59_0xe9ac8b;if(!Number[_0x29f025(0x121)](_0x30f032)||_0x30f032<=0x0)throw CliErrors[_0x29f025(0x14b)](_0x29f025(0x132));const _0x3baed2=(await listAllRuntimeRoles(_0xc478dd))[_0x29f025(0x134)](_0xbdec3f=>_0xbdec3f['id']===_0x30f032&&(!_0xbdec3f[_0x29f025(0x137)]||_0xbdec3f[_0x29f025(0x137)]===_0xc478dd));if(_0x3baed2[_0x29f025(0x12c)]!==0x1)throw CliErrors[_0x29f025(0x14b)]('Runtime\x20role\x20id\x20'+_0x30f032+'\x20was\x20not\x20found\x20in\x20app\x20'+_0xc478dd+'.',_0x29f025(0x143));const _0x35fbd8=_0x3baed2[0x0],_0x5e4134=_0x35fbd8['id'];if(typeof _0x5e4134!=='number'||!Number[_0x29f025(0x121)](_0x5e4134)||_0x5e4134<=0x0)throw CliErrors[_0x29f025(0x14b)]('Runtime\x20role\x20has\x20an\x20invalid\x20ID;\x20reload\x20roles\x20before\x20writing.');return{..._0x35fbd8,'id':_0x5e4134};}function a59_0x1c7b(_0x4c1c2d,_0x2424b2){_0x4c1c2d=_0x4c1c2d-0x11a;const _0x41527f=a59_0x4152();let _0x1c7bbb=_0x41527f[_0x4c1c2d];return _0x1c7bbb;}export async function listAllRuntimeRoles(_0x489f6c,_0x30bbce={}){const _0xd24206=a59_0xe9ac8b,_0x3787d0=0x64,_0x42c6ef=[];for(let _0x6b87db=0x1;;_0x6b87db+=0x1){const _0xccc2ee=await listRuntimeAppRoles(_0x489f6c,{..._0x30bbce[_0xd24206(0x160)]?{'roleName':_0x30bbce[_0xd24206(0x160)]}:{},'currentPage':_0x6b87db,'pageSize':_0x3787d0});_0x42c6ef[_0xd24206(0x14c)](..._0xccc2ee[_0xd24206(0x14d)]);if(_0xccc2ee[_0xd24206(0x14d)][_0xd24206(0x12c)]<_0x3787d0||_0xccc2ee[_0xd24206(0x129)]&&_0x42c6ef[_0xd24206(0x12c)]>=_0xccc2ee[_0xd24206(0x129)]['totalCount'])return _0x42c6ef;}}export async function resolveRuntimeRoleRef(_0x164343,_0xa62445){const _0x362167=a59_0xe9ac8b,_0xe4269c=_0xa62445[_0x362167(0x12a)]();if(!_0xe4269c)throw CliErrors[_0x362167(0x14b)]('Missing\x20runtime\x20role\x20reference.',_0x362167(0x140));if(/^\d+$/[_0x362167(0x151)](_0xe4269c))return getRuntimeRoleById(_0x164343,Number(_0xe4269c));const _0x4a5947=(await listAllRuntimeRoles(_0x164343))['filter'](_0x2543eb=>_0x2543eb['roleName']===_0xe4269c);if(_0x4a5947[_0x362167(0x12c)]===0x0)throw CliErrors[_0x362167(0x14b)]('Runtime\x20role\x20name\x20\x22'+_0xe4269c+_0x362167(0x11b)+_0x164343+'.','Run\x20`lovrabet\x20role\x20list`\x20or\x20pass\x20--role\x20<id>.');if(_0x4a5947[_0x362167(0x12c)]>0x1)throw CliErrors['validation'](_0x362167(0x155)+_0xe4269c+'\x22\x20is\x20ambiguous.','Pass\x20one\x20role\x20ID:\x20'+_0x4a5947[_0x362167(0x150)](_0x1c2a5d=>_0x1c2a5d['id'])[_0x362167(0x12d)](',\x20')+'.');const _0x24a9c9=_0x4a5947[0x0],_0x3df005=_0x24a9c9['id'];if(typeof _0x3df005!=='number'||!Number[_0x362167(0x121)](_0x3df005)||_0x3df005<=0x0)throw CliErrors[_0x362167(0x14b)](_0x362167(0x136));return{..._0x24a9c9,'id':_0x3df005};}function parseRuntimeUserId(_0x574cf5){const _0x5f0ca5=a59_0xe9ac8b,_0x70a0e9=_0x574cf5[_0x5f0ca5(0x12a)](),_0x4ed72e=normalizeRuntimeUserId(_0x70a0e9);if(_0x4ed72e===undefined)throw CliErrors[_0x5f0ca5(0x14b)](_0x5f0ca5(0x11d),_0x5f0ca5(0x164));return _0x4ed72e;}export async function prepareRuntimeMemberMutation(_0x536c36,_0x4494ec){const _0x4d104e=a59_0xe9ac8b,_0x17ea83=await resolveRuntimeRoleRef(_0x536c36[_0x4d104e(0x137)],_0x536c36[_0x4d104e(0x165)](_0x4d104e(0x156)));if(_0x17ea83['roleType']==='OWNER')throw CliErrors[_0x4d104e(0x14b)](_0x4d104e(0x147),_0x4d104e(0x14e));const _0x3f716b=parseRuntimeUserId(_0x536c36[_0x4d104e(0x165)]('user')),_0x302eb3=(await listRuntimeRoleUsers(_0x536c36[_0x4d104e(0x137)]))[_0x4d104e(0x150)](_0x1105d6=>{const _0x51085c=_0x4d104e;if(typeof _0x1105d6['id']!==_0x51085c(0x162)||!Number[_0x51085c(0x121)](_0x1105d6['id'])||_0x1105d6['id']<=0x0)throw CliErrors[_0x51085c(0x14b)](_0x51085c(0x13b));return{..._0x1105d6,'userList':[..._0x1105d6[_0x51085c(0x125)]??[]],'applyUserList':[..._0x1105d6[_0x51085c(0x12e)]??[]]};}),_0x1bfc0f=_0x302eb3[_0x4d104e(0x15f)](_0x3a4fe2=>_0x3a4fe2['id']===_0x17ea83['id']);if(!_0x1bfc0f)throw CliErrors[_0x4d104e(0x14b)](_0x4d104e(0x148)+_0x17ea83['id']+_0x4d104e(0x13e),_0x4d104e(0x11e));const _0x3cdacf=_0x763f18=>{const _0x301ee6=_0x4d104e,_0x33dd75=normalizeRuntimeUserId(_0x763f18);if(_0x33dd75===undefined)throw CliErrors['validation'](_0x301ee6(0x13c));return _0x33dd75;},_0x2471f3=_0x1bfc0f[_0x4d104e(0x125)]['map'](_0x53f3a5=>_0x3cdacf(_0x53f3a5[_0x4d104e(0x146)])),_0x222726=_0x536c36[_0x4d104e(0x145)](_0x4d104e(0x11c));if(_0x222726!==undefined&&_0x222726!==null&&_0x222726!==''){const _0xdf71da=_0x536c36[_0x4d104e(0x11a)](_0x4d104e(0x11c));if(!Number[_0x4d104e(0x121)](_0xdf71da)||_0xdf71da<0x0)throw CliErrors['validation'](_0x4d104e(0x163));if(_0x2471f3[_0x4d104e(0x12c)]!==_0xdf71da)throw CliErrors[_0x4d104e(0x14b)](_0x4d104e(0x15d)+_0xdf71da+_0x4d104e(0x15e)+_0x2471f3[_0x4d104e(0x12c)]+'.','Read\x20the\x20current\x20members\x20and\x20retry\x20with\x20the\x20new\x20expected\x20count.');}const _0x4f760b=_0x2471f3[_0x4d104e(0x153)](_0x3f716b),_0xd5e4d=[];let _0x1cc48e=!![];if(_0x4494ec==='user-add'){const _0x4cf0f1=await listRuntimeAppUsers(_0x536c36[_0x4d104e(0x137)]),_0xdb74fd=_0x4cf0f1[_0x4d104e(0x134)](_0x33c564=>normalizeRuntimeUserId(_0x33c564['code'])===_0x3f716b);if(_0xdb74fd[_0x4d104e(0x12c)]!==0x1||!_0xdb74fd[0x0][_0x4d104e(0x159)]?.[_0x4d104e(0x12a)]())throw CliErrors['validation']('Runtime\x20user\x20'+_0x3f716b+_0x4d104e(0x123)+_0x536c36[_0x4d104e(0x137)]+'.',_0x4d104e(0x135));_0x4f760b?(_0x1cc48e=![],_0xd5e4d[_0x4d104e(0x14c)](_0x4d104e(0x14a)+_0x3f716b+'\x20is\x20already\x20in\x20runtime\x20role\x20'+_0x17ea83['id']+'.')):_0x1bfc0f[_0x4d104e(0x125)][_0x4d104e(0x14c)]({'userId':_0x3f716b,'username':_0xdb74fd[0x0]['userName']});}else!_0x4f760b?(_0x1cc48e=![],_0xd5e4d[_0x4d104e(0x14c)]('User\x20'+_0x3f716b+_0x4d104e(0x126)+_0x17ea83['id']+'.')):_0x1bfc0f[_0x4d104e(0x125)]=_0x1bfc0f[_0x4d104e(0x125)][_0x4d104e(0x134)](_0x398c89=>_0x3cdacf(_0x398c89['userId'])!==_0x3f716b);return{'role':_0x17ea83,'userId':_0x3f716b,'roleList':_0x302eb3,'before':{'userIds':_0x2471f3},'after':{'userIds':_0x1bfc0f[_0x4d104e(0x125)][_0x4d104e(0x150)](_0x47f07f=>_0x3cdacf(_0x47f07f[_0x4d104e(0x146)]))},'shouldWrite':_0x1cc48e,'warnings':_0xd5e4d};}export function runtimeRoleWriteResult(_0x169479,_0x551c6b,_0x27df01,_0x1e33c3,_0x4a252f,_0x5e2980=[]){const _0x593037=a59_0xe9ac8b;return{'operation':_0x169479,'scope':_0x593037(0x120),'selector':_0x551c6b,'before':_0x27df01,'after':_0x1e33c3,'dryRun':![],'backend':_0x4a252f,'warnings':_0x5e2980};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a60_0x1e5a84=a60_0x5085;(function(_0x3ae94e,_0x4ca5bc){const _0x2f9d37=a60_0x5085,_0x4638f5=_0x3ae94e();while(!![]){try{const _0x11d57c=-parseInt(_0x2f9d37(0x1d9))/0x1+parseInt(_0x2f9d37(0x1de))/0x2*(-parseInt(_0x2f9d37(0x1e4))/0x3)+parseInt(_0x2f9d37(0x1cd))/0x4+parseInt(_0x2f9d37(0x1d6))/0x5+-parseInt(_0x2f9d37(0x1dc))/0x6*(-parseInt(_0x2f9d37(0x1e1))/0x7)+parseInt(_0x2f9d37(0x1df))/0x8+-parseInt(_0x2f9d37(0x1da))/0x9;if(_0x11d57c===_0x4ca5bc)break;else _0x4638f5['push'](_0x4638f5['shift']());}catch(_0x1560fd){_0x4638f5['push'](_0x4638f5['shift']());}}}(a60_0x5aa1,0x89a88));import{updateRuntimeAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';import{assertCustomRuntimeRole,getRuntimeRoleById,projectRuntimeRole,readOptionalRuntimeRoleCode,ROLE_CODE_FLAG,ROLE_ID_FLAG,runtimeRoleWriteResult}from'../../commands/role/shared.js';function a60_0x5aa1(){const _0x2efdaa=['update','/client/permit/role/update','2731180jIAAeA','validation','trim','--remark\x20must\x20not\x20be\x20blank.','name','body','Preview:\x20update\x20a\x20runtime\x20CUSTOM\x20role','Update\x20a\x20runtime\x20CUSTOM\x20role\x27s\x20code,\x20name,\x20or\x20remark','num','4651250KXFVFh','New\x20role\x20name','appCode','1026742VUtduA','2649735UzLJfD','New\x20non-empty\x20role\x20remark','6KCfhLh','Changes\x20the\x20custom\x20role\x20code,\x20name,\x20or\x20note\x20in\x20the\x20current\x20runtime\x20app.\x20The\x20role\x20updates\x20immediately.','214294nYHgXf','4057672SitrNu','flag','5103518TohkeF','string','remark','27ajPuBP','POST','The\x20current\x20runtime\x20role\x20API\x20does\x20not\x20support\x20clearing\x20an\x20existing\x20remark.','str','--name\x20must\x20not\x20be\x20blank.','Pass\x20--role-code,\x20--name,\x20or\x20--remark\x20to\x20update\x20the\x20runtime\x20role.','description'];a60_0x5aa1=function(){return _0x2efdaa;};return a60_0x5aa1();}function updateFields(_0x4b62e0){const _0x50df73=a60_0x5085,_0x4649aa=_0x4b62e0[_0x50df73(0x1e0)]('role-code')!==undefined,_0x552346=_0x4b62e0[_0x50df73(0x1e0)](_0x50df73(0x1d1))!==undefined,_0x80ee54=_0x4b62e0[_0x50df73(0x1e0)](_0x50df73(0x1e3))!==undefined;if(!_0x4649aa&&!_0x552346&&!_0x80ee54)throw CliErrors[_0x50df73(0x1ce)](_0x50df73(0x1e9));const _0x388b2c=readOptionalRuntimeRoleCode(_0x4b62e0),_0x285da0=_0x4b62e0[_0x50df73(0x1e7)](_0x50df73(0x1d1))['trim'](),_0x4c98e9=_0x4b62e0[_0x50df73(0x1e7)]('remark')[_0x50df73(0x1cf)]();if(_0x552346&&!_0x285da0)throw CliErrors[_0x50df73(0x1ce)](_0x50df73(0x1e8));if(_0x80ee54&&!_0x4c98e9)throw CliErrors[_0x50df73(0x1ce)](_0x50df73(0x1d0),_0x50df73(0x1e6));return{..._0x388b2c?{'roleCode':_0x388b2c}:{},..._0x552346?{'roleName':_0x285da0}:{},..._0x80ee54?{'remark':_0x4c98e9}:{}};}function a60_0x5085(_0x5bb86a,_0x2e37f9){_0x5bb86a=_0x5bb86a-0x1ca;const _0x5aa17a=a60_0x5aa1();let _0x50857d=_0x5aa17a[_0x5bb86a];return _0x50857d;}async function prepare(_0x568217){const _0x51d0bf=a60_0x5085,_0x4654df=await getRuntimeRoleById(_0x568217[_0x51d0bf(0x1d8)],_0x568217[_0x51d0bf(0x1d5)]('id'));return assertCustomRuntimeRole(_0x4654df,_0x51d0bf(0x1cb)),{'role':_0x4654df,'body':{'id':_0x4654df['id'],'appCode':_0x568217[_0x51d0bf(0x1d8)],...updateFields(_0x568217)}};}export const roleUpdate={'service':'role','command':a60_0x1e5a84(0x1cb),'description':a60_0x1e5a84(0x1d4),'risk':'high-risk-write','confirmationDescription':a60_0x1e5a84(0x1dd),'flags':[ROLE_ID_FLAG,ROLE_CODE_FLAG,{'name':a60_0x1e5a84(0x1d1),'type':a60_0x1e5a84(0x1e2),'description':a60_0x1e5a84(0x1d7)},{'name':a60_0x1e5a84(0x1e3),'type':a60_0x1e5a84(0x1e2),'description':a60_0x1e5a84(0x1db)}],async 'validate'(_0x12b6c5){updateFields(_0x12b6c5);},async 'dryRun'(_0x73c7b4){const _0x35412a=a60_0x1e5a84,{body:_0x328498}=await prepare(_0x73c7b4);return dryRun(_0x35412a(0x1e5),'/client/permit/role/update')[_0x35412a(0x1d2)](_0x328498)[_0x35412a(0x1ca)](_0x35412a(0x1d3))['build']();},async 'execute'(_0xb480b2){const _0x3977cc=a60_0x1e5a84,{role:_0x3bfe02,body:_0x23181e}=await prepare(_0xb480b2),_0x4983ee=await updateRuntimeAppRole(_0x23181e);return{'ok':!![],'data':runtimeRoleWriteResult('update',{'roleId':_0x3bfe02['id']},projectRuntimeRole(_0x3bfe02),projectRuntimeRole(_0x4983ee),{'method':'POST','path':_0x3977cc(0x1cc)})};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a61_0x100ecd=a61_0x2e5e;(function(_0x3acfd1,_0x271fb5){const _0x3865ae=a61_0x2e5e,_0x3b72e1=_0x3acfd1();while(!![]){try{const _0x2ea263=parseInt(_0x3865ae(0x105))/0x1*(parseInt(_0x3865ae(0x109))/0x2)+-parseInt(_0x3865ae(0x10d))/0x3+-parseInt(_0x3865ae(0x108))/0x4+-parseInt(_0x3865ae(0xfd))/0x5+parseInt(_0x3865ae(0x111))/0x6+parseInt(_0x3865ae(0xfb))/0x7*(-parseInt(_0x3865ae(0x102))/0x8)+parseInt(_0x3865ae(0xfc))/0x9*(parseInt(_0x3865ae(0x100))/0xa);if(_0x2ea263===_0x271fb5)break;else _0x3b72e1['push'](_0x3b72e1['shift']());}catch(_0x1f914b){_0x3b72e1['push'](_0x3b72e1['shift']());}}}(a61_0x426c,0xbfaa2));function a61_0x426c(){const _0x482da1=['4770090dggVxT','POST','high-risk-write','Preview:\x20add\x20runtime\x20role\x20member','warnings','1413482euIPHR','81udDUrk','7559115IgizkM','Adds\x20the\x20given\x20runtime\x20user\x20to\x20the\x20target\x20role.\x20The\x20user\x20receives\x20the\x20permissions\x20of\x20that\x20role.','body','2497190hxibAZ','before','16WCCRSF','userId','role','22RfhakH','user-add','shouldWrite','2477268KJMEda','92562vDwSjA','Add\x20a\x20userId\x20to\x20one\x20runtime\x20role','roleList','appCode','2221854NDfNTb','/client/permit/user-role/update-user-list','build','after'];a61_0x426c=function(){return _0x482da1;};return a61_0x426c();}function a61_0x2e5e(_0x45efd4,_0x354206){_0x45efd4=_0x45efd4-0xfb;const _0x426cde=a61_0x426c();let _0x2e5e6e=_0x426cde[_0x45efd4];return _0x2e5e6e;}import{updateRuntimeRoleUsers}from'../../core/api-client.js';import{dryRun}from'../../framework/dryrun.js';import{EXPECT_USER_COUNT_FLAG,prepareRuntimeMemberMutation,ROLE_REF_FLAG,runtimeRoleWriteResult,USER_ID_FLAG}from'../../commands/role/shared.js';export const roleUserAdd={'service':a61_0x100ecd(0x104),'command':a61_0x100ecd(0x106),'description':a61_0x100ecd(0x10a),'risk':a61_0x100ecd(0x113),'confirmationDescription':a61_0x100ecd(0xfe),'flags':[ROLE_REF_FLAG,USER_ID_FLAG,EXPECT_USER_COUNT_FLAG],async 'dryRun'(_0x31976b){const _0x2da490=a61_0x100ecd,_0x16aceb=await prepareRuntimeMemberMutation(_0x31976b,_0x2da490(0x106));return dryRun(_0x2da490(0x112),_0x2da490(0x10e))[_0x2da490(0xff)]({'appCode':_0x31976b['appCode'],'roleList':_0x16aceb['roleList']})['description'](_0x16aceb[_0x2da490(0x107)]?_0x2da490(0x114):_0x16aceb[_0x2da490(0x115)][0x0])[_0x2da490(0x10f)]();},async 'execute'(_0x2f75fa){const _0x332184=a61_0x100ecd,_0x489715=await prepareRuntimeMemberMutation(_0x2f75fa,_0x332184(0x106));return _0x489715[_0x332184(0x107)]&&await updateRuntimeRoleUsers(_0x2f75fa[_0x332184(0x10c)],_0x489715[_0x332184(0x10b)]),{'ok':!![],'data':runtimeRoleWriteResult(_0x332184(0x106),{'roleId':_0x489715[_0x332184(0x104)]['id'],'userId':_0x489715[_0x332184(0x103)]},_0x489715[_0x332184(0x101)],_0x489715[_0x332184(0x110)],{'method':'POST','path':_0x332184(0x10e)},_0x489715[_0x332184(0x115)])};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a62_0x2783d8=a62_0x4f8b;(function(_0x2906b1,_0x2c0873){const _0x4a4391=a62_0x4f8b,_0x3722bf=_0x2906b1();while(!![]){try{const _0x43c3fc=-parseInt(_0x4a4391(0x129))/0x1+parseInt(_0x4a4391(0x128))/0x2+parseInt(_0x4a4391(0x125))/0x3*(-parseInt(_0x4a4391(0x12f))/0x4)+parseInt(_0x4a4391(0x12d))/0x5*(parseInt(_0x4a4391(0x126))/0x6)+-parseInt(_0x4a4391(0x11f))/0x7*(parseInt(_0x4a4391(0x12e))/0x8)+-parseInt(_0x4a4391(0x124))/0x9*(-parseInt(_0x4a4391(0x133))/0xa)+parseInt(_0x4a4391(0x130))/0xb;if(_0x43c3fc===_0x2c0873)break;else _0x3722bf['push'](_0x3722bf['shift']());}catch(_0x251cd0){_0x3722bf['push'](_0x3722bf['shift']());}}}(a62_0x2069,0x862f1));import{updateRuntimeRoleUsers}from'../../core/api-client.js';function a62_0x4f8b(_0xc91256,_0x43881a){_0xc91256=_0xc91256-0x11c;const _0x206958=a62_0x2069();let _0x4f8bf6=_0x206958[_0xc91256];return _0x4f8bf6;}import{dryRun}from'../../framework/dryrun.js';import{EXPECT_USER_COUNT_FLAG,prepareRuntimeMemberMutation,ROLE_REF_FLAG,runtimeRoleWriteResult,USER_ID_FLAG}from'../../commands/role/shared.js';export const roleUserRemove={'service':'role','command':a62_0x2783d8(0x12c),'description':'Remove\x20a\x20userId\x20from\x20one\x20runtime\x20role','risk':'high-risk-write','confirmationDescription':a62_0x2783d8(0x121),'flags':[ROLE_REF_FLAG,USER_ID_FLAG,EXPECT_USER_COUNT_FLAG],async 'dryRun'(_0xc6075e){const _0x6fd963=a62_0x2783d8,_0x172f22=await prepareRuntimeMemberMutation(_0xc6075e,_0x6fd963(0x12c));return dryRun(_0x6fd963(0x11e),_0x6fd963(0x12a))['body']({'appCode':_0xc6075e[_0x6fd963(0x122)],'roleList':_0x172f22[_0x6fd963(0x127)]})[_0x6fd963(0x132)](_0x172f22[_0x6fd963(0x11d)]?_0x6fd963(0x131):_0x172f22[_0x6fd963(0x120)][0x0])[_0x6fd963(0x11c)]();},async 'execute'(_0x1db2ff){const _0x4e6442=a62_0x2783d8,_0x3caf0c=await prepareRuntimeMemberMutation(_0x1db2ff,_0x4e6442(0x12c));return _0x3caf0c[_0x4e6442(0x11d)]&&await updateRuntimeRoleUsers(_0x1db2ff[_0x4e6442(0x122)],_0x3caf0c[_0x4e6442(0x127)]),{'ok':!![],'data':runtimeRoleWriteResult(_0x4e6442(0x12c),{'roleId':_0x3caf0c['role']['id'],'userId':_0x3caf0c[_0x4e6442(0x12b)]},_0x3caf0c['before'],_0x3caf0c[_0x4e6442(0x123)],{'method':_0x4e6442(0x11e),'path':_0x4e6442(0x12a)},_0x3caf0c['warnings'])};}};function a62_0x2069(){const _0x2fa209=['build','shouldWrite','POST','77LULClR','warnings','Removes\x20the\x20given\x20runtime\x20user\x20from\x20the\x20target\x20role.\x20The\x20user\x20loses\x20permissions\x20granted\x20only\x20by\x20that\x20role.','appCode','after','13779OiSPuZ','15OyvGKc','8754PXmxMF','roleList','1335740Zgtcxw','429006GtHAPA','/client/permit/user-role/update-user-list','userId','user-remove','2360geFUJc','363192WHWRvV','700936JyuZKZ','10923781NsKLwZ','Preview:\x20remove\x20runtime\x20role\x20member','description','30ItnAnp'];a62_0x2069=function(){return _0x2fa209;};return a62_0x2069();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a63_0x1d14(_0x1325f8,_0xb93a55){_0x1325f8=_0x1325f8-0x77;const _0x43f29c=a63_0x43f2();let _0x1d141a=_0x43f29c[_0x1325f8];return _0x1d141a;}const a63_0x3e6040=a63_0x1d14;(function(_0x5212ea,_0x783da4){const _0x42e452=a63_0x1d14,_0x359ac6=_0x5212ea();while(!![]){try{const _0x3b5643=-parseInt(_0x42e452(0xb2))/0x1+parseInt(_0x42e452(0xb6))/0x2*(parseInt(_0x42e452(0xb3))/0x3)+parseInt(_0x42e452(0x7d))/0x4+parseInt(_0x42e452(0xa5))/0x5*(parseInt(_0x42e452(0x8e))/0x6)+parseInt(_0x42e452(0x97))/0x7+parseInt(_0x42e452(0x95))/0x8*(-parseInt(_0x42e452(0xa7))/0x9)+-parseInt(_0x42e452(0x9a))/0xa*(parseInt(_0x42e452(0xb5))/0xb);if(_0x3b5643===_0x783da4)break;else _0x359ac6['push'](_0x359ac6['shift']());}catch(_0xd12c4c){_0x359ac6['push'](_0x359ac6['shift']());}}}(a63_0x43f2,0xd57d1));import{createRuntimeSchedule,deleteRuntimeSchedule,getRuntimeSchedule,listRuntimeSchedules,runRuntimeSchedule,validateRuntimeSchedule}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const SCHEDULE_ID_PATTERN=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,KIND_FLAG={'name':a63_0x3e6040(0x79),'type':a63_0x3e6040(0xab),'required':!![],'enum':[a63_0x3e6040(0x82),a63_0x3e6040(0x81)],'description':a63_0x3e6040(0xa2)},CRON_FLAG={'name':'cron','type':a63_0x3e6040(0xab),'description':'Five-field\x20UTC\x20cron\x20expression\x20for\x20CRON\x20schedules'},SCHEDULED_AT_FLAG={'name':a63_0x3e6040(0x87),'type':a63_0x3e6040(0xab),'description':'Canonical\x20UTC\x20ISO\x20datetime\x20for\x20ONCE\x20schedules'},TITLE_FLAG={'name':a63_0x3e6040(0x9d),'type':a63_0x3e6040(0xab),'required':!![],'description':'Schedule\x20title'},PROMPT_FLAG={'name':a63_0x3e6040(0x80),'type':a63_0x3e6040(0xab),'required':!![],'description':'Prompt\x20sent\x20to\x20the\x20Agent\x20when\x20the\x20schedule\x20runs'},MODEL_FLAG={'name':a63_0x3e6040(0xbf),'type':a63_0x3e6040(0xab),'enum':[a63_0x3e6040(0xbc),a63_0x3e6040(0x88),a63_0x3e6040(0x9e)],'default':a63_0x3e6040(0x88),'description':a63_0x3e6040(0xa1)},SCHEDULE_ID_FLAG={'name':'schedule-id','type':'string','required':!![],'description':'Schedule\x20UUID','pattern':{'regex':SCHEDULE_ID_PATTERN,'description':'a\x20UUID\x20returned\x20by\x20schedule\x20create/list'}},LIMIT_FLAG={'name':a63_0x3e6040(0xb9),'type':a63_0x3e6040(0x92),'default':0x14,'description':a63_0x3e6040(0x86)},CURSOR_FLAG={'name':a63_0x3e6040(0x9b),'type':a63_0x3e6040(0xab),'description':'Opaque\x20nextCursor\x20returned\x20by\x20the\x20previous\x20list\x20call'},INPUT_FLAGS=[KIND_FLAG,CRON_FLAG,SCHEDULED_AT_FLAG,TITLE_FLAG,PROMPT_FLAG,MODEL_FLAG];function a63_0x43f2(){const _0xe009c=['5cfpEvH','length','9jockOd','/api/harness/apps/','\x20immediately','taskId','string','schedule','run','create','Permanently\x20deletes\x20the\x20schedule\x20and\x20stops\x20future\x20auto-triggers.\x20Historical\x20Tasks\x20already\x20created\x20are\x20not\x20affected.','validate','body','1344945QmktcZ','213vXLLuU','detail','759wkGwtn','34064muGqDl','read','Ignores\x20the\x20original\x20trigger\x20time,\x20runs\x20the\x20schedule\x20once\x20now,\x20and\x20creates\x20a\x20new\x20Agent\x20Task.','limit','--kind\x20must\x20be\x20CRON\x20or\x20ONCE.','Created\x20','kimi/k3','List\x20current\x20user\x27s\x20schedules\x20for\x20the\x20current\x20app','POST','model','Validate\x20a\x20UTC\x20schedule\x20without\x20creating\x20it','cron','--cursor\x20must\x20be\x20the\x20unchanged\x20nextCursor\x20from\x20schedule\x20list.','kind','Create\x20a\x20recurring\x20or\x20one-shot\x20Agent\x20schedule','Creates\x20a\x20schedule\x20in\x20the\x20current\x20app\x20that\x20can\x20auto-trigger\x20an\x20Agent.\x20At\x20the\x20scheduled\x20time\x20a\x20Task\x20is\x20created\x20and\x20run.','delete','3901824RgaVZG','num','appCode','prompt','ONCE','CRON','Show\x20one\x20schedule\x20by\x20schedule\x20ID','Run\x20the\x20schedule\x20once\x20immediately\x20and\x20create\x20a\x20Task','validation','Page\x20size\x20from\x201\x20to\x20100','scheduled-at','deepseek-v4-flash-0731','isSafeInteger','description','UTC','\x20schedule\x20','scheduleId','5146104MbAxIO','Deleted\x20schedule\x20','build','list','number','ONCE\x20schedules\x20require\x20--scheduled-at\x20and\x20do\x20not\x20accept\x20--cron.','DELETE','3654680Mowesk','trim','3816183fEfDyR','high-risk-write','Preview:\x20delete\x20schedule\x20','132080FwchZz','cursor','str','title','deepseek-v4-pro-0813','Schedule\x20input\x20is\x20valid','schedule-id','Task\x20model\x20used\x20when\x20the\x20schedule\x20runs','Schedule\x20kind:\x20CRON\x20or\x20ONCE','CRON\x20schedules\x20require\x20--cron\x20and\x20do\x20not\x20accept\x20--scheduled-at.','/run'];a63_0x43f2=function(){return _0xe009c;};return a63_0x43f2();}function readScheduleInput(_0x3c5da9){const _0x319900=a63_0x3e6040,_0x81934a=_0x3c5da9[_0x319900(0x9c)]('kind'),_0x2da082=_0x3c5da9[_0x319900(0x9c)](_0x319900(0x9d))[_0x319900(0x96)](),_0x4857ee=_0x3c5da9[_0x319900(0x9c)](_0x319900(0x80))[_0x319900(0x96)](),_0x31a5ac=_0x3c5da9[_0x319900(0x9c)](_0x319900(0xbf)),_0x5279e9=_0x3c5da9[_0x319900(0x9c)](_0x319900(0x77)),_0x1ac520=_0x3c5da9[_0x319900(0x9c)](_0x319900(0x87));if(!_0x2da082)throw CliErrors[_0x319900(0x85)]('--title\x20must\x20not\x20be\x20blank.');if(!_0x4857ee)throw CliErrors['validation']('--prompt\x20must\x20not\x20be\x20blank.');if(_0x81934a==='CRON'){if(!_0x5279e9||_0x1ac520)throw CliErrors['validation'](_0x319900(0xa3));return{'kind':_0x81934a,'timezone':_0x319900(0x8b),'cron':_0x5279e9,'title':_0x2da082,'prompt':_0x4857ee,'model':_0x31a5ac};}if(_0x81934a==='ONCE'){if(!_0x1ac520||_0x5279e9)throw CliErrors[_0x319900(0x85)](_0x319900(0x93));return{'kind':_0x81934a,'timezone':_0x319900(0x8b),'scheduledAt':_0x1ac520,'title':_0x2da082,'prompt':_0x4857ee,'model':_0x31a5ac};}throw CliErrors[_0x319900(0x85)](_0x319900(0xba));}function scheduleCollectionPath(_0x33c871){const _0x1fcb72=a63_0x3e6040;return _0x1fcb72(0xa8)+encodeURIComponent(_0x33c871)+'/schedules';}function scheduleItemPath(_0x4b1f29,_0x8e6cfc){return scheduleCollectionPath(_0x4b1f29)+'/'+encodeURIComponent(_0x8e6cfc);}const scheduleValidate={'service':a63_0x3e6040(0xac),'command':a63_0x3e6040(0xb0),'description':a63_0x3e6040(0xc0),'risk':a63_0x3e6040(0xb7),'flags':INPUT_FLAGS,async 'validate'(_0x47289e){readScheduleInput(_0x47289e);},async 'execute'(_0x51e64b){const _0x12fc6f=a63_0x3e6040,_0x4f30b0=readScheduleInput(_0x51e64b),_0xae69dd=await validateRuntimeSchedule(_0x51e64b[_0x12fc6f(0x7f)],_0x4f30b0);return{'ok':!![],'data':_0xae69dd,'message':_0x12fc6f(0x9f)};}},scheduleCreate={'service':'schedule','command':a63_0x3e6040(0xae),'description':a63_0x3e6040(0x7a),'risk':a63_0x3e6040(0x98),'confirmationDescription':a63_0x3e6040(0x7b),'flags':INPUT_FLAGS,async 'validate'(_0x4151d3){readScheduleInput(_0x4151d3);},async 'execute'(_0x1e88ce){const _0x46149b=a63_0x3e6040,_0x4f4077=readScheduleInput(_0x1e88ce),_0x3b90c9=await validateRuntimeSchedule(_0x1e88ce[_0x46149b(0x7f)],_0x4f4077),_0x57f67d=await createRuntimeSchedule(_0x1e88ce[_0x46149b(0x7f)],_0x3b90c9);return{'ok':!![],'data':_0x57f67d,'message':_0x46149b(0xbb)+_0x57f67d[_0x46149b(0x79)]+_0x46149b(0x8c)+_0x57f67d[_0x46149b(0x8d)]};},async 'dryRun'(_0x3ae4b6){const _0x459c67=a63_0x3e6040,_0x2984fd=readScheduleInput(_0x3ae4b6);return dryRun('POST',scheduleCollectionPath(_0x3ae4b6[_0x459c67(0x7f)]))[_0x459c67(0xb1)](_0x2984fd)[_0x459c67(0x8a)]('Preview:\x20create\x20an\x20Agent\x20schedule')['build']();}},scheduleList={'service':a63_0x3e6040(0xac),'command':a63_0x3e6040(0x91),'description':a63_0x3e6040(0xbd),'risk':'read','flags':[KIND_FLAG,LIMIT_FLAG,CURSOR_FLAG],async 'validate'(_0x52d789){const _0x5cec93=a63_0x3e6040,_0x4d5912=_0x52d789[_0x5cec93(0x7e)](_0x5cec93(0xb9));if(!Number[_0x5cec93(0x89)](_0x4d5912)||_0x4d5912<0x1||_0x4d5912>0x64)throw CliErrors[_0x5cec93(0x85)]('--limit\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.');const _0x4a44ff=_0x52d789[_0x5cec93(0x9c)](_0x5cec93(0x9b));if(_0x4a44ff&&(_0x4a44ff[_0x5cec93(0xa6)]>0x400||_0x4a44ff[_0x5cec93(0x96)]()!==_0x4a44ff))throw CliErrors[_0x5cec93(0x85)](_0x5cec93(0x78));},async 'execute'(_0x25c7d5){const _0x34b04a=a63_0x3e6040,_0x54e939=_0x25c7d5['str'](_0x34b04a(0x9b)),_0x2c1466=await listRuntimeSchedules(_0x25c7d5[_0x34b04a(0x7f)],{'kind':_0x25c7d5[_0x34b04a(0x9c)](_0x34b04a(0x79)),'limit':_0x25c7d5['num'](_0x34b04a(0xb9)),..._0x54e939?{'cursor':_0x54e939}:{}});return{'ok':!![],'data':_0x2c1466};}},scheduleDetail={'service':a63_0x3e6040(0xac),'command':a63_0x3e6040(0xb4),'description':a63_0x3e6040(0x83),'risk':a63_0x3e6040(0xb7),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0xc33edb){const _0x12754e=a63_0x3e6040,_0x208bf3=await getRuntimeSchedule(_0xc33edb[_0x12754e(0x7f)],_0xc33edb['str']('schedule-id'));return{'ok':!![],'data':_0x208bf3};}},scheduleRun={'service':a63_0x3e6040(0xac),'command':a63_0x3e6040(0xad),'description':a63_0x3e6040(0x84),'risk':a63_0x3e6040(0x98),'confirmationDescription':a63_0x3e6040(0xb8),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x25068c){const _0x4e4314=a63_0x3e6040,_0x88c22f=_0x25068c[_0x4e4314(0x9c)]('schedule-id'),_0x4c8b0e=await runRuntimeSchedule(_0x25068c['appCode'],_0x88c22f);return{'ok':!![],'data':_0x4c8b0e,'message':'Queued\x20Task\x20'+_0x4c8b0e[_0x4e4314(0xaa)]+'\x20from\x20schedule\x20'+_0x88c22f};},async 'dryRun'(_0x72b1c4){const _0x2140b5=a63_0x3e6040,_0x43a384=_0x72b1c4[_0x2140b5(0x9c)](_0x2140b5(0xa0));return dryRun(_0x2140b5(0xbe),scheduleItemPath(_0x72b1c4[_0x2140b5(0x7f)],_0x43a384)+_0x2140b5(0xa4))[_0x2140b5(0x8a)]('Preview:\x20run\x20schedule\x20'+_0x43a384+_0x2140b5(0xa9))[_0x2140b5(0x90)]();}},scheduleDelete={'service':a63_0x3e6040(0xac),'command':a63_0x3e6040(0x7c),'description':'Delete\x20the\x20schedule\x20and\x20stop\x20future\x20triggers','risk':'high-risk-write','confirmationDescription':a63_0x3e6040(0xaf),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x345bb1){const _0x183c68=a63_0x3e6040,_0x4edd2e=_0x345bb1[_0x183c68(0x9c)]('schedule-id'),_0x3de79d=await deleteRuntimeSchedule(_0x345bb1['appCode'],_0x4edd2e);return{'ok':!![],'data':_0x3de79d,'message':_0x183c68(0x8f)+_0x4edd2e};},async 'dryRun'(_0x15a6a6){const _0x45e351=a63_0x3e6040,_0x30914a=_0x15a6a6[_0x45e351(0x9c)](_0x45e351(0xa0));return dryRun(_0x45e351(0x94),scheduleItemPath(_0x15a6a6[_0x45e351(0x7f)],_0x30914a))[_0x45e351(0x8a)](_0x45e351(0x99)+_0x30914a)[_0x45e351(0x90)]();}};export const scheduleDefinitions=[scheduleValidate,scheduleCreate,scheduleList,scheduleDetail,scheduleRun,scheduleDelete];
|
|
1
|
+
const a63_0x496e64=a63_0x17b0;(function(_0x436c01,_0x2eef24){const _0x35e8bc=a63_0x17b0,_0x336d8e=_0x436c01();while(!![]){try{const _0xf69030=parseInt(_0x35e8bc(0x1cf))/0x1*(-parseInt(_0x35e8bc(0x1df))/0x2)+-parseInt(_0x35e8bc(0x1e7))/0x3*(-parseInt(_0x35e8bc(0x1a6))/0x4)+parseInt(_0x35e8bc(0x1b6))/0x5+parseInt(_0x35e8bc(0x1bf))/0x6+-parseInt(_0x35e8bc(0x1c2))/0x7+-parseInt(_0x35e8bc(0x1dc))/0x8*(parseInt(_0x35e8bc(0x1de))/0x9)+parseInt(_0x35e8bc(0x1cc))/0xa*(-parseInt(_0x35e8bc(0x1ee))/0xb);if(_0xf69030===_0x2eef24)break;else _0x336d8e['push'](_0x336d8e['shift']());}catch(_0x3c82b1){_0x336d8e['push'](_0x336d8e['shift']());}}}(a63_0x353c,0x41bcd));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_0x496e64(0x1bd),'type':a63_0x496e64(0x1be),'required':!![],'enum':['CRON',a63_0x496e64(0x1ac)],'description':a63_0x496e64(0x1ec)},CRON_FLAG={'name':a63_0x496e64(0x1c6),'type':a63_0x496e64(0x1be),'description':a63_0x496e64(0x1a9)},SCHEDULED_AT_FLAG={'name':a63_0x496e64(0x1d0),'type':'string','description':a63_0x496e64(0x1c1)},TITLE_FLAG={'name':a63_0x496e64(0x1cd),'type':a63_0x496e64(0x1be),'required':!![],'description':'Schedule\x20title'},PROMPT_FLAG={'name':a63_0x496e64(0x1b0),'type':a63_0x496e64(0x1be),'required':!![],'description':a63_0x496e64(0x1b4)},MODEL_FLAG={'name':a63_0x496e64(0x1ed),'type':a63_0x496e64(0x1be),'enum':['kimi/k3',a63_0x496e64(0x1cb),'deepseek-v4-pro-0813'],'default':a63_0x496e64(0x1cb),'description':'Task\x20model\x20used\x20when\x20the\x20schedule\x20runs'},SCHEDULE_ID_FLAG={'name':'schedule-id','type':'string','required':!![],'description':a63_0x496e64(0x1d2),'pattern':{'regex':SCHEDULE_ID_PATTERN,'description':a63_0x496e64(0x1d5)}},LIMIT_FLAG={'name':a63_0x496e64(0x1b2),'type':a63_0x496e64(0x1bc),'default':0x14,'description':a63_0x496e64(0x1e9)},CURSOR_FLAG={'name':a63_0x496e64(0x1e5),'type':a63_0x496e64(0x1be),'description':a63_0x496e64(0x1ef)},INPUT_FLAGS=[KIND_FLAG,CRON_FLAG,SCHEDULED_AT_FLAG,TITLE_FLAG,PROMPT_FLAG,MODEL_FLAG];function readScheduleInput(_0xd85263){const _0x5e3a87=a63_0x496e64,_0x228b19=_0xd85263['str']('kind'),_0x51cac3=_0xd85263[_0x5e3a87(0x1ab)](_0x5e3a87(0x1cd))[_0x5e3a87(0x1e8)](),_0x45e52c=_0xd85263[_0x5e3a87(0x1ab)]('prompt')['trim'](),_0x40976c=_0xd85263[_0x5e3a87(0x1ab)](_0x5e3a87(0x1ed)),_0x4a641f=_0xd85263[_0x5e3a87(0x1ab)](_0x5e3a87(0x1c6)),_0x31557f=_0xd85263['str'](_0x5e3a87(0x1d0));if(!_0x51cac3)throw CliErrors['validation'](_0x5e3a87(0x1c5));if(!_0x45e52c)throw CliErrors[_0x5e3a87(0x1e4)](_0x5e3a87(0x1bb));if(_0x228b19===_0x5e3a87(0x1e3)){if(!_0x4a641f||_0x31557f)throw CliErrors['validation']('CRON\x20schedules\x20require\x20--cron\x20and\x20do\x20not\x20accept\x20--scheduled-at.');return{'kind':_0x228b19,'timezone':_0x5e3a87(0x1d1),'cron':_0x4a641f,'title':_0x51cac3,'prompt':_0x45e52c,'model':_0x40976c};}if(_0x228b19==='ONCE'){if(!_0x31557f||_0x4a641f)throw CliErrors[_0x5e3a87(0x1e4)](_0x5e3a87(0x1c7));return{'kind':_0x228b19,'timezone':_0x5e3a87(0x1d1),'scheduledAt':_0x31557f,'title':_0x51cac3,'prompt':_0x45e52c,'model':_0x40976c};}throw CliErrors[_0x5e3a87(0x1e4)](_0x5e3a87(0x1ae));}function scheduleCollectionPath(_0x31a320){const _0x51a21c=a63_0x496e64;return _0x51a21c(0x1c8)+encodeURIComponent(_0x31a320)+_0x51a21c(0x1ca);}function a63_0x17b0(_0x3e5a76,_0x504e0a){_0x3e5a76=_0x3e5a76-0x1a6;const _0x353c95=a63_0x353c();let _0x17b0ba=_0x353c95[_0x3e5a76];return _0x17b0ba;}function scheduleItemPath(_0x119ed8,_0x372614){return scheduleCollectionPath(_0x119ed8)+'/'+encodeURIComponent(_0x372614);}function a63_0x353c(){const _0x25bb7c=['validate','--title\x20must\x20not\x20be\x20blank.','cron','ONCE\x20schedules\x20require\x20--scheduled-at\x20and\x20do\x20not\x20accept\x20--cron.','/api/harness/apps/','List\x20current\x20user\x27s\x20schedules\x20for\x20the\x20current\x20app','/schedules','deepseek-v4-flash-0731','10zeMnfN','title','appCode','2OHHNub','scheduled-at','UTC','Schedule\x20UUID','Created\x20','body','a\x20UUID\x20returned\x20by\x20schedule\x20create/list','schedule-id','description','Deleted\x20schedule\x20','\x20immediately','DELETE','length','563032omAqzK','\x20schedule\x20','18IWXJnI','15604BtPDRk','POST','Delete\x20the\x20schedule\x20and\x20stop\x20future\x20triggers','schedule','CRON','validation','cursor','Preview:\x20delete\x20schedule\x20','3aXFhus','trim','Page\x20size\x20from\x201\x20to\x20100','--limit\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.','read','Schedule\x20kind:\x20CRON\x20or\x20ONCE','model','1349623yEpzmD','Opaque\x20nextCursor\x20returned\x20by\x20the\x20previous\x20list\x20call','\x20from\x20schedule\x20','1401868seGvfT','num','create','Five-field\x20UTC\x20cron\x20expression\x20for\x20CRON\x20schedules','delete','str','ONCE','Preview:\x20run\x20schedule\x20','--kind\x20must\x20be\x20CRON\x20or\x20ONCE.','detail','prompt','--cursor\x20must\x20be\x20the\x20unchanged\x20nextCursor\x20from\x20schedule\x20list.','limit','Permanently\x20deletes\x20the\x20schedule\x20and\x20stops\x20future\x20auto-triggers.\x20Historical\x20Tasks\x20already\x20created\x20are\x20not\x20affected.','Prompt\x20sent\x20to\x20the\x20Agent\x20when\x20the\x20schedule\x20runs','build','562290RxGvqk','Validate\x20a\x20UTC\x20schedule\x20without\x20creating\x20it','Preview:\x20create\x20an\x20Agent\x20schedule','Creates\x20a\x20schedule\x20in\x20the\x20current\x20app\x20that\x20can\x20auto-trigger\x20an\x20Agent.\x20At\x20the\x20scheduled\x20time\x20a\x20Task\x20is\x20created\x20and\x20run.','Run\x20the\x20schedule\x20once\x20immediately\x20and\x20create\x20a\x20Task','--prompt\x20must\x20not\x20be\x20blank.','number','kind','string','1320102bMnerm','Schedule\x20input\x20is\x20valid','Canonical\x20UTC\x20ISO\x20datetime\x20for\x20ONCE\x20schedules','942382KgYdZk','high-risk-write'];a63_0x353c=function(){return _0x25bb7c;};return a63_0x353c();}const scheduleValidate={'service':'schedule','command':a63_0x496e64(0x1c4),'description':a63_0x496e64(0x1b7),'risk':'read','flags':INPUT_FLAGS,async 'validate'(_0x1abcab){readScheduleInput(_0x1abcab);},async 'execute'(_0x4670d0){const _0x12823b=a63_0x496e64,_0x495f85=readScheduleInput(_0x4670d0),_0x28cb43=await validateRuntimeSchedule(_0x4670d0[_0x12823b(0x1ce)],_0x495f85);return{'ok':!![],'data':_0x28cb43,'message':_0x12823b(0x1c0)};}},scheduleCreate={'service':a63_0x496e64(0x1e2),'command':a63_0x496e64(0x1a8),'description':'Create\x20a\x20recurring\x20or\x20one-shot\x20Agent\x20schedule','risk':a63_0x496e64(0x1c3),'confirmationDescription':a63_0x496e64(0x1b9),'flags':INPUT_FLAGS,async 'validate'(_0xc16bed){readScheduleInput(_0xc16bed);},async 'execute'(_0x548a15){const _0xd0cead=a63_0x496e64,_0x586c28=readScheduleInput(_0x548a15),_0x45c6f4=await validateRuntimeSchedule(_0x548a15[_0xd0cead(0x1ce)],_0x586c28),_0x283fe4=await createRuntimeSchedule(_0x548a15[_0xd0cead(0x1ce)],_0x45c6f4);return{'ok':!![],'data':_0x283fe4,'message':_0xd0cead(0x1d3)+_0x283fe4[_0xd0cead(0x1bd)]+_0xd0cead(0x1dd)+_0x283fe4['scheduleId']};},async 'dryRun'(_0x3dc32e){const _0x319ca8=a63_0x496e64,_0x395e10=readScheduleInput(_0x3dc32e);return dryRun(_0x319ca8(0x1e0),scheduleCollectionPath(_0x3dc32e[_0x319ca8(0x1ce)]))[_0x319ca8(0x1d4)](_0x395e10)[_0x319ca8(0x1d7)](_0x319ca8(0x1b8))[_0x319ca8(0x1b5)]();}},scheduleList={'service':a63_0x496e64(0x1e2),'command':'list','description':a63_0x496e64(0x1c9),'risk':'read','flags':[KIND_FLAG,LIMIT_FLAG,CURSOR_FLAG],async 'validate'(_0x20456b){const _0x43711d=a63_0x496e64,_0x1a84e5=_0x20456b[_0x43711d(0x1a7)](_0x43711d(0x1b2));if(!Number['isSafeInteger'](_0x1a84e5)||_0x1a84e5<0x1||_0x1a84e5>0x64)throw CliErrors['validation'](_0x43711d(0x1ea));const _0x45e18f=_0x20456b[_0x43711d(0x1ab)](_0x43711d(0x1e5));if(_0x45e18f&&(_0x45e18f[_0x43711d(0x1db)]>0x400||_0x45e18f[_0x43711d(0x1e8)]()!==_0x45e18f))throw CliErrors[_0x43711d(0x1e4)](_0x43711d(0x1b1));},async 'execute'(_0x3447f2){const _0x1fcf17=a63_0x496e64,_0x292796=_0x3447f2[_0x1fcf17(0x1ab)](_0x1fcf17(0x1e5)),_0x40744b=await listRuntimeSchedules(_0x3447f2[_0x1fcf17(0x1ce)],{'kind':_0x3447f2[_0x1fcf17(0x1ab)](_0x1fcf17(0x1bd)),'limit':_0x3447f2[_0x1fcf17(0x1a7)](_0x1fcf17(0x1b2)),..._0x292796?{'cursor':_0x292796}:{}});return{'ok':!![],'data':_0x40744b};}},scheduleDetail={'service':a63_0x496e64(0x1e2),'command':a63_0x496e64(0x1af),'description':'Show\x20one\x20schedule\x20by\x20schedule\x20ID','risk':a63_0x496e64(0x1eb),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x5901f9){const _0x1396e2=a63_0x496e64,_0x183f3d=await getRuntimeSchedule(_0x5901f9[_0x1396e2(0x1ce)],_0x5901f9['str'](_0x1396e2(0x1d6)));return{'ok':!![],'data':_0x183f3d};}},scheduleRun={'service':a63_0x496e64(0x1e2),'command':'run','description':a63_0x496e64(0x1ba),'risk':a63_0x496e64(0x1c3),'confirmationDescription':'Ignores\x20the\x20original\x20trigger\x20time,\x20runs\x20the\x20schedule\x20once\x20now,\x20and\x20creates\x20a\x20new\x20Agent\x20Task.','flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x645355){const _0x5cd393=a63_0x496e64,_0x1c60d6=_0x645355['str'](_0x5cd393(0x1d6)),_0x45bc0c=await runRuntimeSchedule(_0x645355[_0x5cd393(0x1ce)],_0x1c60d6);return{'ok':!![],'data':_0x45bc0c,'message':'Queued\x20Task\x20'+_0x45bc0c['taskId']+_0x5cd393(0x1f0)+_0x1c60d6};},async 'dryRun'(_0x4528e9){const _0x425d15=a63_0x496e64,_0x54e095=_0x4528e9[_0x425d15(0x1ab)](_0x425d15(0x1d6));return dryRun(_0x425d15(0x1e0),scheduleItemPath(_0x4528e9[_0x425d15(0x1ce)],_0x54e095)+'/run')[_0x425d15(0x1d7)](_0x425d15(0x1ad)+_0x54e095+_0x425d15(0x1d9))[_0x425d15(0x1b5)]();}},scheduleDelete={'service':'schedule','command':a63_0x496e64(0x1aa),'description':a63_0x496e64(0x1e1),'risk':a63_0x496e64(0x1c3),'confirmationDescription':a63_0x496e64(0x1b3),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x45bdb2){const _0x9c9394=a63_0x496e64,_0x329821=_0x45bdb2[_0x9c9394(0x1ab)](_0x9c9394(0x1d6)),_0x3bab29=await deleteRuntimeSchedule(_0x45bdb2[_0x9c9394(0x1ce)],_0x329821);return{'ok':!![],'data':_0x3bab29,'message':_0x9c9394(0x1d8)+_0x329821};},async 'dryRun'(_0x146a41){const _0x277649=a63_0x496e64,_0x4c6603=_0x146a41[_0x277649(0x1ab)](_0x277649(0x1d6));return dryRun(_0x277649(0x1da),scheduleItemPath(_0x146a41[_0x277649(0x1ce)],_0x4c6603))['description'](_0x277649(0x1e6)+_0x4c6603)[_0x277649(0x1b5)]();}};export const scheduleDefinitions=[scheduleValidate,scheduleCreate,scheduleList,scheduleDetail,scheduleRun,scheduleDelete];
|
package/lib/commands/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a64_0x3a60a4=a64_0x166f;(function(_0x373ab8,_0x30a348){const _0x4c6096=a64_0x166f,_0x2b8633=_0x373ab8();while(!![]){try{const _0x394ad0=parseInt(_0x4c6096(0x125))/0x1+-parseInt(_0x4c6096(0x123))/0x2*(-parseInt(_0x4c6096(0x11f))/0x3)+parseInt(_0x4c6096(0x128))/0x4+-parseInt(_0x4c6096(0x126))/0x5+parseInt(_0x4c6096(0x120))/0x6*(-parseInt(_0x4c6096(0x127))/0x7)+-parseInt(_0x4c6096(0x121))/0x8+-parseInt(_0x4c6096(0x11e))/0x9;if(_0x394ad0===_0x30a348)break;else _0x2b8633['push'](_0x2b8633['shift']());}catch(_0xd93e51){_0x2b8633['push'](_0x2b8633['shift']());}}}(a64_0x356c,0x40f93));function a64_0x356c(){const _0x1c64e3=['read','513152Adchfc','664195kjGvho','322lQHxIN','876808WCdZMV','Export\x20machine-readable\x20command\x20schema\x20(JSON)','3169467kUnguX','31743hfXbPM','90GtJIpO','606080fzlpeK','schema','18tloLCd'];a64_0x356c=function(){return _0x1c64e3;};return a64_0x356c();}import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x5a0197){const _0x3966b3=await buildSchemaPayload();return{'ok':!![],'data':_0x3966b3};}function a64_0x166f(_0x18de35,_0x384b40){_0x18de35=_0x18de35-0x11d;const _0x356cd8=a64_0x356c();let _0x166fbb=_0x356cd8[_0x18de35];return _0x166fbb;}export const schemaDefinition={'service':a64_0x3a60a4(0x122),'command':'export','description':a64_0x3a60a4(0x11d),'risk':a64_0x3a60a4(0x124),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x4ad540,_0x2c7a15){const _0x29b4de=a65_0x307e,_0x1836aa=_0x4ad540();while(!![]){try{const _0x26a7da=-parseInt(_0x29b4de(0x160))/0x1*(parseInt(_0x29b4de(0x157))/0x2)+-parseInt(_0x29b4de(0x165))/0x3+parseInt(_0x29b4de(0x156))/0x4*(-parseInt(_0x29b4de(0x12c))/0x5)+parseInt(_0x29b4de(0x179))/0x6*(parseInt(_0x29b4de(0x142))/0x7)+-parseInt(_0x29b4de(0x155))/0x8+parseInt(_0x29b4de(0x10f))/0x9+-parseInt(_0x29b4de(0x126))/0xa*(-parseInt(_0x29b4de(0x168))/0xb);if(_0x26a7da===_0x2c7a15)break;else _0x1836aa['push'](_0x1836aa['shift']());}catch(_0x2fd3c3){_0x1836aa['push'](_0x1836aa['shift']());}}}(a65_0xdfd4,0x90b93));import{compileServiceTreeCommand,matchServiceTreeCommand}from'@lovrabet/cli-framework';import{getLoginUserInfo,listDatasets}from'../../core/api-client.js';import{executeData,executeSdkBff,executeSdkSql}from'../../core/sdk-client.js';import{CliErrors}from'../../errors.js';import{listLocalServices,listLocalServiceTrees}from'../../commands/service/registry.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{isDev,normalizeEnv}from'../../constant/env.js';export function resolveDynamicServiceCommand(_0x161c49,_0x52275c){const _0xc81d6f=a65_0x307e,_0x4ed78f=listLocalServiceTrees();let _0x65e818;for(const _0x5c6af6 of _0x4ed78f){const _0x1da5ae=matchServiceTreeCommand(_0x5c6af6,_0x161c49);if(!_0x1da5ae)continue;(!_0x65e818||_0x1da5ae[_0xc81d6f(0x113)][_0xc81d6f(0x132)][_0xc81d6f(0x14f)]>_0x65e818['command'][_0xc81d6f(0x132)][_0xc81d6f(0x14f)])&&(_0x65e818={'tree':_0x5c6af6,'command':_0x1da5ae['command'],'remainingArgs':_0x1da5ae[_0xc81d6f(0x12b)]});}if(!_0x65e818)return undefined;const _0x93321c={..._0x52275c};return applyAppBinding(_0x65e818['tree'],_0x65e818['command'],_0x93321c),{'definition':buildDynamicCommandDefinition(_0x65e818[_0xc81d6f(0x129)],_0x65e818[_0xc81d6f(0x113)]),'args':_0x65e818[_0xc81d6f(0x12b)],'flags':_0x93321c,'tree':_0x65e818[_0xc81d6f(0x129)],'command':_0x65e818[_0xc81d6f(0x113)]};}export function generateDynamicServiceHelp(_0x278e4a){const _0x1eb82c=a65_0x307e,_0x3d2bc6=listLocalServiceTrees()[_0x1eb82c(0x11c)](_0x37d808=>_0x37d808[_0x1eb82c(0x117)][_0x1eb82c(0x12e)]===_0x278e4a);if(!_0x3d2bc6)return undefined;const _0x4ade99=[CLI_BIN_NAME+'\x20'+_0x278e4a+_0x1eb82c(0x11f),'',_0x3d2bc6['service'][_0x1eb82c(0x16b)]||_0x278e4a,_0x3d2bc6['service']['description']?'\x20\x20'+_0x3d2bc6[_0x1eb82c(0x117)]['description']:'','','Commands:',..._0x3d2bc6[_0x1eb82c(0x172)][_0x1eb82c(0x127)](_0x275178=>{const _0x4b9bb2=_0x1eb82c,_0x3b1d1f=_0x275178[_0x4b9bb2(0x132)][_0x4b9bb2(0x177)](0x1)[_0x4b9bb2(0x153)]('\x20'),_0xb21db2=_0x275178['risk']===_0x4b9bb2(0x15f)?'':'\x20['+_0x275178[_0x4b9bb2(0x131)]+']';return'\x20\x20'+_0x3b1d1f[_0x4b9bb2(0x159)](0x18)+'\x20'+(_0x275178[_0x4b9bb2(0x17b)]||'')+_0xb21db2;}),'',_0x1eb82c(0x14c)+CLI_BIN_NAME+_0x1eb82c(0x11d)+_0x278e4a+'`\x20to\x20inspect\x20the\x20manifest.'][_0x1eb82c(0x116)](Boolean);return _0x4ade99[_0x1eb82c(0x153)]('\x0a');}export function listDynamicServiceEntries(){const _0x46a190=a65_0x307e;return listLocalServices()[_0x46a190(0x127)](_0x413eec=>{const _0x2a8f75=_0x46a190,_0x27bf21=_0x413eec[_0x2a8f75(0x111)];return{'service':_0x27bf21[_0x2a8f75(0x117)]['code'],'label':_0x27bf21[_0x2a8f75(0x117)][_0x2a8f75(0x16b)]||_0x27bf21[_0x2a8f75(0x117)][_0x2a8f75(0x12e)],'commands':_0x27bf21[_0x2a8f75(0x172)]['map'](_0x287f6c=>({'command':dynamicCommandName(_0x287f6c),'description':_0x287f6c['description']||'Run\x20service\x20command\x20'+_0x287f6c[_0x2a8f75(0x14a)],'tag':riskTag(_0x287f6c[_0x2a8f75(0x131)])}))};});}export function getDynamicServiceEntry(_0x203e19){const _0x45fd1d=a65_0x307e;return listDynamicServiceEntries()['find'](_0x973e22=>_0x973e22[_0x45fd1d(0x117)]===_0x203e19);}export function listDynamicServiceDefinitions(_0x454c61){const _0x449ada=a65_0x307e;return listLocalServiceTrees()[_0x449ada(0x116)](_0x54039e=>!_0x454c61||_0x54039e[_0x449ada(0x117)][_0x449ada(0x12e)]===_0x454c61)[_0x449ada(0x16c)](_0x2d4371=>_0x2d4371[_0x449ada(0x172)][_0x449ada(0x127)](_0x29a701=>buildDynamicCommandDefinition(_0x2d4371,_0x29a701)));}export function getDynamicServiceDefinitions(_0x330d5c){const _0x563ec3=listDynamicServiceDefinitions(_0x330d5c);return _0x563ec3['length']>0x0?_0x563ec3:undefined;}export function findDynamicServiceDefinition(_0x572832,_0x12b2e7){const _0x24b892=a65_0x307e;return listDynamicServiceDefinitions(_0x572832)['find'](_0x3967b8=>_0x3967b8[_0x24b892(0x113)]===_0x12b2e7);}function a65_0xdfd4(){const _0x415695=['normalizedManifest','entries','command','params','\x20\x20MAP\x20TO','filter','service','This\x20will\x20run\x20Service\x20Tree\x20command\x20\x22','validation','\x20\x20\x20\x20functionName:\x20','default','find','\x20service\x20detail\x20--service\x20','\x20requires\x20target.datasetCode\x20or\x20target.datatable.','\x20<command>\x20[flags]','ctx.','sqlCode','push','envName','userName','appCode','1270QZjvaQ','map','enum','tree','some','remainingArgs','30815HPolkz','username','code','Preview\x20dynamic\x20service\x20command:\x20','string','risk','fullPath','\x20completed\x20in\x20','context.','\x20->\x20','source','number','\x20\x20\x20\x20datatable:\x20','\x20\x20\x20\x20','bffCode','scriptName','mapTo','target','tableName','Run\x20service\x20command\x20','json','\x20\x20[','7QIoAKa','bffId','employeeId','Cannot\x20resolve\x20datatable\x20\x22','development','Unsupported\x20service\x20target\x20kind:\x20','Service\x20command\x20','userId','cliPath','appBindings','Use\x20`','\x20\x20\x20\x20kind:\x20\x20\x20\x20','now','length','high-risk-write','nickName','The\x20manifest\x20marks\x20this\x20command\x20as\x20a\x20high-risk\x20write.\x20It\x20may\x20make\x20business\x20changes\x20that\x20are\x20hard\x20to\x20reverse.','join','kind','5973840NqMifJ','12GBzkEA','574xgQfVC','sql','padEnd','type','\x20requires\x20target.functionName.','env','loginName','args','read','4006UGFBzD','SERVICE_TREE','Check\x20the\x20service\x20binding\x20and\x20current\x20connection.\x20Do\x20not\x20switch\x20environments\x20or\x20credentials\x20automatically.','\x22\x20in\x20service\x20command\x20','data','93945dELQPe','datasetCode','\x20requires\x20target.sqlCode.','92081Waigks','\x20\x20\x20\x20sqlCode:\x20','The\x20manifest\x20marks\x20this\x20command\x20as\x20a\x20write.\x20It\x20may\x20change\x20business\x20data\x20or\x20service\x20state.','name','flatMap','Unknown\x20appRef\x20\x22','boolean','appcode','const','cliName','commands','flags','required','\x20requires\x20environment\x20\x22','\x22,\x20but\x20the\x20current\x20environment\x20is\x20\x22','slice','datatable','4065702gwXmrq','app','description','\x20\x20\x20\x20command:\x20','operator','7184781emjcVP','tenantCode'];a65_0xdfd4=function(){return _0x415695;};return a65_0xdfd4();}export function buildDynamicCommandDefinition(_0x1beaef,_0x584aee){const _0x48d126=a65_0x307e;return{'service':_0x1beaef[_0x48d126(0x117)][_0x48d126(0x12e)],'command':dynamicCommandName(_0x584aee),'description':_0x584aee[_0x48d126(0x17b)]||_0x48d126(0x13f)+_0x584aee[_0x48d126(0x14a)],'risk':_0x584aee[_0x48d126(0x131)],..._0x584aee[_0x48d126(0x131)]===_0x48d126(0x15f)?{}:{'confirmationDescription':buildDynamicConfirmationDescription(_0x584aee)},'requiresAuth':!![],'requiresAppCode':!![],'args':_0x584aee[_0x48d126(0x15e)][_0x48d126(0x127)](_0x2d3e35=>({'name':_0x2d3e35[_0x48d126(0x16b)],'description':_0x2d3e35['description']||_0x2d3e35[_0x48d126(0x16b)],'required':_0x2d3e35[_0x48d126(0x174)]})),'flags':_0x584aee[_0x48d126(0x173)][_0x48d126(0x127)](flagToCommandFlag),'helpExtra':()=>renderDynamicCommandHelp(_0x584aee),async 'dryRun'(_0x6735a){const _0x5966cb=_0x48d126,_0x428627=await compilePlan(_0x1beaef,_0x584aee,_0x6735a);return{'method':_0x5966cb(0x161),'url':_0x584aee['cliPath'],'body':{'target':targetPreview(_0x428627),'params':_0x428627['params']},'description':_0x5966cb(0x12f)+_0x584aee['cliPath']};},async 'execute'(_0x520ee6){const _0x596f58=_0x48d126,_0x335852=await compilePlan(_0x1beaef,_0x584aee,_0x520ee6),_0x4ac50e=Date[_0x596f58(0x14e)](),_0x501c1f=await executePlan(_0x335852,_0x584aee,_0x520ee6),_0x77a34=Date['now']()-_0x4ac50e;return{'ok':!![],'data':{'service':_0x1beaef[_0x596f58(0x117)],'command':_0x584aee[_0x596f58(0x14a)],'target':targetPreview(_0x335852),'result':_0x501c1f,'elapsed':_0x77a34},'message':_0x596f58(0x148)+_0x584aee[_0x596f58(0x14a)]+_0x596f58(0x133)+_0x77a34+'ms'};}};}function buildDynamicConfirmationDescription(_0x2c0708){const _0x370c5a=a65_0x307e,_0x5156d0=_0x2c0708['description']||_0x2c0708[_0x370c5a(0x14a)],_0x139112=_0x2c0708[_0x370c5a(0x131)]===_0x370c5a(0x150)?_0x370c5a(0x152):_0x370c5a(0x16a);return _0x370c5a(0x118)+_0x5156d0+'\x22.\x20'+_0x139112;}function dynamicCommandName(_0x433753){const _0x91079c=a65_0x307e;return _0x433753[_0x91079c(0x132)]['slice'](0x1)[_0x91079c(0x153)]('\x20');}function riskTag(_0x19b96d){const _0x304d0e=a65_0x307e;return _0x19b96d===_0x304d0e(0x15f)?'':_0x304d0e(0x141)+_0x19b96d+']';}function flagToCommandFlag(_0x528eb3){const _0x4a5264=a65_0x307e;return{'name':_0x528eb3[_0x4a5264(0x171)],'type':_0x528eb3[_0x4a5264(0x15a)]===_0x4a5264(0x140)?_0x4a5264(0x130):_0x528eb3[_0x4a5264(0x15a)],'description':_0x528eb3['description']||_0x528eb3[_0x4a5264(0x16b)],'required':_0x528eb3[_0x4a5264(0x174)],'default':isPrimitiveFlagDefault(_0x528eb3[_0x4a5264(0x11b)])?_0x528eb3[_0x4a5264(0x11b)]:undefined,'enum':_0x528eb3[_0x4a5264(0x128)]};}async function compilePlan(_0x4c3c56,_0x4edb38,_0x324bdb){const _0x10537e=a65_0x307e,_0x2deaf3=_0x4edb38[_0x10537e(0x13d)]['appRef']?_0x4c3c56['appBindings'][_0x4edb38[_0x10537e(0x13d)]['appRef']]:undefined;if(_0x2deaf3?.['env']){const _0x2ebbd2=isDev(_0x2deaf3[_0x10537e(0x15c)])?_0x10537e(0x146):normalizeEnv(_0x2deaf3[_0x10537e(0x15c)]);if(_0x2ebbd2!==_0x324bdb[_0x10537e(0x123)])throw CliErrors[_0x10537e(0x119)](_0x10537e(0x148)+_0x4edb38[_0x10537e(0x14a)]+_0x10537e(0x175)+_0x2ebbd2+_0x10537e(0x176)+_0x324bdb['envName']+'\x22.',_0x10537e(0x162));}return compileServiceTreeCommand(_0x4edb38,{'flags':_0x324bdb['rawFlags'],'args':_0x324bdb[_0x10537e(0x15e)],'context':await buildServiceContext(_0x4edb38,_0x324bdb)});}async function buildServiceContext(_0x5d5df2,_0x51b65d){const _0x5b3516=a65_0x307e,_0x4fa4b9={'appCode':_0x51b65d[_0x5b3516(0x125)],'env':_0x51b65d[_0x5b3516(0x123)],'envName':_0x51b65d['envName']};if(!usesRuntimeContext(_0x5d5df2))return _0x4fa4b9;const _0x383239=await getLoginUserInfo(),_0x54933b=pickFirst(_0x383239[_0x5b3516(0x149)],_0x383239['id']);return{..._0x4fa4b9,'user':_0x383239,'userId':_0x54933b,'id':_0x383239['id'],'username':pickFirst(_0x383239[_0x5b3516(0x12d)],_0x383239[_0x5b3516(0x124)],_0x383239[_0x5b3516(0x15d)]),'userName':_0x383239['userName'],'nickname':pickFirst(_0x383239['nickname'],_0x383239[_0x5b3516(0x151)]),'nickName':_0x383239['nickName'],'tenantCode':_0x383239[_0x5b3516(0x110)],'employeeId':_0x383239[_0x5b3516(0x144)]};}function usesRuntimeContext(_0x182675){const _0x1532b6=a65_0x307e;return _0x182675[_0x1532b6(0x13c)][_0x1532b6(0x12a)](_0x970bfd=>typeof _0x970bfd[_0x1532b6(0x136)]===_0x1532b6(0x130)&&(_0x970bfd[_0x1532b6(0x136)]['startsWith'](_0x1532b6(0x134))||_0x970bfd[_0x1532b6(0x136)]['startsWith'](_0x1532b6(0x120))));}function pickFirst(..._0x11cc99){const _0xb31374=a65_0x307e;return _0x11cc99[_0xb31374(0x11c)](_0x8b4e63=>_0x8b4e63!==undefined&&_0x8b4e63!==null);}async function executePlan(_0x3a9f3f,_0x5cd7d2,_0x4f7613){const _0x391c67=a65_0x307e;if(_0x3a9f3f['kind']===_0x391c67(0x164)){const _0xbc6b5e=await resolveDatasetCode(_0x3a9f3f,_0x5cd7d2,_0x4f7613);return executeData(_0xbc6b5e,_0x3a9f3f[_0x391c67(0x113)],_0x3a9f3f['params']);}if(_0x3a9f3f[_0x391c67(0x154)]===_0x391c67(0x158)){if(!_0x3a9f3f[_0x391c67(0x121)])throw CliErrors[_0x391c67(0x119)](_0x391c67(0x148)+_0x5cd7d2['cliPath']+_0x391c67(0x167));return executeSdkSql(_0x3a9f3f['sqlCode'],normalizeScalarParams(_0x3a9f3f[_0x391c67(0x114)]));}if(_0x3a9f3f[_0x391c67(0x154)]==='bff'){const _0x341a79=_0x3a9f3f[_0x391c67(0x13b)]||_0x3a9f3f[_0x391c67(0x13a)]||(_0x3a9f3f[_0x391c67(0x143)]==null?'':String(_0x3a9f3f[_0x391c67(0x143)]));if(!_0x341a79)throw CliErrors[_0x391c67(0x119)](_0x391c67(0x148)+_0x5cd7d2[_0x391c67(0x14a)]+_0x391c67(0x15b));return executeSdkBff(_0x341a79,_0x3a9f3f[_0x391c67(0x114)]);}throw CliErrors[_0x391c67(0x119)](_0x391c67(0x147)+_0x3a9f3f[_0x391c67(0x154)]);}async function resolveDatasetCode(_0x329101,_0x2e4a83,_0x2943ae){const _0x56b2f4=a65_0x307e;if(_0x329101['datasetCode'])return _0x329101[_0x56b2f4(0x166)];if(!_0x329101['datatable'])throw CliErrors[_0x56b2f4(0x119)](_0x56b2f4(0x148)+_0x2e4a83[_0x56b2f4(0x14a)]+_0x56b2f4(0x11e));const _0x5d920b=await listDatasets(_0x2943ae[_0x56b2f4(0x125)]),_0x41f2e8=_0x5d920b[_0x56b2f4(0x11c)](_0x322fb4=>_0x322fb4['dbtableConfig']?.[_0x56b2f4(0x13e)]===_0x329101[_0x56b2f4(0x178)]);if(!_0x41f2e8?.[_0x56b2f4(0x12e)])throw CliErrors[_0x56b2f4(0x119)](_0x56b2f4(0x145)+_0x329101['datatable']+'\x22\x20to\x20a\x20datasetCode\x20in\x20app\x20'+_0x2943ae[_0x56b2f4(0x125)]+'.','Use\x20lovrabet\x20dataset\x20list\x20to\x20confirm\x20the\x20physical\x20table\x20name\x20or\x20add\x20target.datasetCode\x20to\x20the\x20manifest.');return _0x41f2e8[_0x56b2f4(0x12e)];}function applyAppBinding(_0x2686b3,_0x19fbd4,_0x3a0e01){const _0x3426d3=a65_0x307e,_0x59ae90=_0x19fbd4['target']['appRef'];if(!_0x59ae90)return;const _0x1d1a46=_0x2686b3[_0x3426d3(0x14b)][_0x59ae90];if(!_0x1d1a46)throw CliErrors['validation'](_0x3426d3(0x16d)+_0x59ae90+_0x3426d3(0x163)+_0x19fbd4[_0x3426d3(0x14a)]+'.','Define\x20the\x20appRef\x20under\x20appBindings\x20or\x20remove\x20target.appRef.');const _0x8b19f1=_0x1d1a46['appcode']||_0x1d1a46[_0x3426d3(0x125)];_0x8b19f1&&!hasText(_0x3a0e01[_0x3426d3(0x16f)])&&!hasText(_0x3a0e01['app'])&&(_0x3a0e01['appcode']=_0x8b19f1),_0x1d1a46[_0x3426d3(0x17a)]&&!hasText(_0x3a0e01[_0x3426d3(0x17a)])&&!hasText(_0x3a0e01[_0x3426d3(0x16f)])&&(_0x3a0e01[_0x3426d3(0x17a)]=_0x1d1a46['app']);}function renderDynamicCommandHelp(_0x29bbbd){const _0x47c564=a65_0x307e,_0x1604ee=['\x20\x20SERVICE\x20TREE\x20TARGET',_0x47c564(0x14d)+_0x29bbbd[_0x47c564(0x13d)][_0x47c564(0x154)],_0x47c564(0x10d)+_0x29bbbd[_0x47c564(0x13d)][_0x47c564(0x113)]];if(_0x29bbbd[_0x47c564(0x13d)]['datasetCode'])_0x1604ee[_0x47c564(0x122)]('\x20\x20\x20\x20datasetCode:\x20'+_0x29bbbd[_0x47c564(0x13d)][_0x47c564(0x166)]);if(_0x29bbbd[_0x47c564(0x13d)][_0x47c564(0x178)])_0x1604ee[_0x47c564(0x122)](_0x47c564(0x138)+_0x29bbbd[_0x47c564(0x13d)][_0x47c564(0x178)]);if(_0x29bbbd[_0x47c564(0x13d)]['sqlCode'])_0x1604ee['push'](_0x47c564(0x169)+_0x29bbbd[_0x47c564(0x13d)]['sqlCode']);if(_0x29bbbd[_0x47c564(0x13d)][_0x47c564(0x13b)])_0x1604ee[_0x47c564(0x122)](_0x47c564(0x11a)+_0x29bbbd[_0x47c564(0x13d)][_0x47c564(0x13b)]);if(_0x29bbbd[_0x47c564(0x13c)]['length']>0x0){_0x1604ee['push']('',_0x47c564(0x115));for(const _0x57770f of _0x29bbbd['mapTo']){_0x1604ee['push'](_0x47c564(0x139)+(_0x57770f[_0x47c564(0x136)]||_0x47c564(0x170))+_0x47c564(0x135)+_0x57770f[_0x47c564(0x13d)]+(_0x57770f['operator']?'.'+_0x57770f[_0x47c564(0x10e)]:''));}}return _0x1604ee[_0x47c564(0x153)]('\x0a');}function targetPreview(_0x4cf108){const _0x3395bb=a65_0x307e;return{'kind':_0x4cf108['kind'],'command':_0x4cf108[_0x3395bb(0x113)],'appRef':_0x4cf108['appRef'],'datasetCode':_0x4cf108[_0x3395bb(0x166)],'datatable':_0x4cf108[_0x3395bb(0x178)],'sqlCode':_0x4cf108['sqlCode'],'bffCode':_0x4cf108[_0x3395bb(0x13a)],'bffId':_0x4cf108[_0x3395bb(0x143)],'functionName':_0x4cf108[_0x3395bb(0x13b)]};}function normalizeScalarParams(_0x771946){const _0xf5a2b1=a65_0x307e;return Object['fromEntries'](Object[_0xf5a2b1(0x112)](_0x771946)[_0xf5a2b1(0x116)](([,_0x537ccf])=>typeof _0x537ccf==='string'||typeof _0x537ccf===_0xf5a2b1(0x137)));}function a65_0x307e(_0x1127d6,_0x16da41){_0x1127d6=_0x1127d6-0x10d;const _0xdfd4b1=a65_0xdfd4();let _0x307e80=_0xdfd4b1[_0x1127d6];return _0x307e80;}function hasText(_0x2f8cad){const _0x2e7150=a65_0x307e;return typeof _0x2f8cad===_0x2e7150(0x130)&&_0x2f8cad['trim']()[_0x2e7150(0x14f)]>0x0;}function isPrimitiveFlagDefault(_0x63a88){const _0x134ca7=a65_0x307e;return _0x63a88===undefined||typeof _0x63a88==='string'||typeof _0x63a88===_0x134ca7(0x137)||typeof _0x63a88===_0x134ca7(0x16e);}
|
|
1
|
+
(function(_0x3ade68,_0x35dcc2){const _0x3925ad=a65_0x3551,_0x5bdef0=_0x3ade68();while(!![]){try{const _0x453aed=parseInt(_0x3925ad(0x144))/0x1*(-parseInt(_0x3925ad(0x15f))/0x2)+-parseInt(_0x3925ad(0x12b))/0x3+parseInt(_0x3925ad(0x11d))/0x4*(parseInt(_0x3925ad(0x13b))/0x5)+-parseInt(_0x3925ad(0x146))/0x6+parseInt(_0x3925ad(0x11c))/0x7+parseInt(_0x3925ad(0x150))/0x8+parseInt(_0x3925ad(0x141))/0x9;if(_0x453aed===_0x35dcc2)break;else _0x5bdef0['push'](_0x5bdef0['shift']());}catch(_0x39db0d){_0x5bdef0['push'](_0x5bdef0['shift']());}}}(a65_0x3805,0x4a4f3));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';function a65_0x3805(){const _0x4bb8f1=['11080qghtQg','json','entries','operator','validation','The\x20manifest\x20marks\x20this\x20command\x20as\x20a\x20high-risk\x20write.\x20It\x20may\x20make\x20business\x20changes\x20that\x20are\x20hard\x20to\x20reverse.','6087825lEjVBt','datatable','remainingArgs','4MYHUhx','datasetCode','3635898PtmcQz','mapTo','Cannot\x20resolve\x20datatable\x20\x22','appCode','\x20\x20\x20\x20command:\x20','nickName','employeeId','bffId','\x20requires\x20environment\x20\x22','\x22,\x20but\x20the\x20current\x20environment\x20is\x20\x22','1133960mAeFRT','length','\x20\x20\x20\x20sqlCode:\x20','\x20\x20\x20\x20','required','startsWith','sqlCode','const','tree','slice','string','\x20<command>\x20[flags]','high-risk-write','fromEntries','tableName','190906KvBdtg','\x20\x20\x20\x20datasetCode:\x20','appRef','\x20requires\x20target.functionName.','risk','cliPath','ctx.','enum','now','Unsupported\x20service\x20target\x20kind:\x20','loginName','default','commands','\x22\x20in\x20service\x20command\x20','Preview\x20dynamic\x20service\x20command:\x20','\x20\x20\x20\x20kind:\x20\x20\x20\x20','description','map','name','number','find','filter','\x20completed\x20in\x20','app','\x20\x20[','appBindings','Check\x20the\x20service\x20binding\x20and\x20current\x20connection.\x20Do\x20not\x20switch\x20environments\x20or\x20credentials\x20automatically.','tenantCode','bffCode','3641855qTInAS','96xhdElb','Use\x20lovrabet\x20dataset\x20list\x20to\x20confirm\x20the\x20physical\x20table\x20name\x20or\x20add\x20target.datasetCode\x20to\x20the\x20manifest.','kind','params','source','Service\x20command\x20','`\x20to\x20inspect\x20the\x20manifest.','push','Unknown\x20appRef\x20\x22','fullPath','target','\x20->\x20','command','env','298359DbVsnh','join','rawFlags','cliName','appcode','\x20\x20\x20\x20functionName:\x20','args','read','code','scriptName','padEnd','type','data','userId','\x22.\x20','service'];a65_0x3805=function(){return _0x4bb8f1;};return a65_0x3805();}import{isDev,normalizeEnv}from'../../constant/env.js';export function resolveDynamicServiceCommand(_0x5e9b2b,_0x394927){const _0x3e16b7=a65_0x3551,_0x23e05e=listLocalServiceTrees();let _0x17bc06;for(const _0x10c3ea of _0x23e05e){const _0x29f735=matchServiceTreeCommand(_0x10c3ea,_0x5e9b2b);if(!_0x29f735)continue;(!_0x17bc06||_0x29f735[_0x3e16b7(0x129)][_0x3e16b7(0x126)][_0x3e16b7(0x151)]>_0x17bc06[_0x3e16b7(0x129)]['fullPath'][_0x3e16b7(0x151)])&&(_0x17bc06={'tree':_0x10c3ea,'command':_0x29f735[_0x3e16b7(0x129)],'remainingArgs':_0x29f735[_0x3e16b7(0x143)]});}if(!_0x17bc06)return undefined;const _0x13d9b6={..._0x394927};return applyAppBinding(_0x17bc06['tree'],_0x17bc06[_0x3e16b7(0x129)],_0x13d9b6),{'definition':buildDynamicCommandDefinition(_0x17bc06[_0x3e16b7(0x158)],_0x17bc06[_0x3e16b7(0x129)]),'args':_0x17bc06[_0x3e16b7(0x143)],'flags':_0x13d9b6,'tree':_0x17bc06['tree'],'command':_0x17bc06[_0x3e16b7(0x129)]};}export function generateDynamicServiceHelp(_0x43f5f9){const _0x2a261b=a65_0x3551,_0x3b12e9=listLocalServiceTrees()[_0x2a261b(0x113)](_0x414aea=>_0x414aea[_0x2a261b(0x13a)][_0x2a261b(0x133)]===_0x43f5f9);if(!_0x3b12e9)return undefined;const _0x221a70=[CLI_BIN_NAME+'\x20'+_0x43f5f9+_0x2a261b(0x15b),'',_0x3b12e9[_0x2a261b(0x13a)][_0x2a261b(0x111)]||_0x43f5f9,_0x3b12e9['service'][_0x2a261b(0x10f)]?'\x20\x20'+_0x3b12e9[_0x2a261b(0x13a)][_0x2a261b(0x10f)]:'','','Commands:',..._0x3b12e9['commands'][_0x2a261b(0x110)](_0x26528f=>{const _0x3b5123=_0x2a261b,_0x504c32=_0x26528f[_0x3b5123(0x126)]['slice'](0x1)[_0x3b5123(0x12c)]('\x20'),_0x4930f7=_0x26528f[_0x3b5123(0x163)]==='read'?'':'\x20['+_0x26528f[_0x3b5123(0x163)]+']';return'\x20\x20'+_0x504c32[_0x3b5123(0x135)](0x18)+'\x20'+(_0x26528f[_0x3b5123(0x10f)]||'')+_0x4930f7;}),'','Use\x20`'+CLI_BIN_NAME+'\x20service\x20detail\x20--service\x20'+_0x43f5f9+_0x2a261b(0x123)][_0x2a261b(0x114)](Boolean);return _0x221a70[_0x2a261b(0x12c)]('\x0a');}export function listDynamicServiceEntries(){const _0x132724=a65_0x3551;return listLocalServices()[_0x132724(0x110)](_0x1af5ae=>{const _0x577006=_0x132724,_0x41c5b5=_0x1af5ae['normalizedManifest'];return{'service':_0x41c5b5[_0x577006(0x13a)][_0x577006(0x133)],'label':_0x41c5b5[_0x577006(0x13a)][_0x577006(0x111)]||_0x41c5b5[_0x577006(0x13a)][_0x577006(0x133)],'commands':_0x41c5b5[_0x577006(0x10b)]['map'](_0x131784=>({'command':dynamicCommandName(_0x131784),'description':_0x131784[_0x577006(0x10f)]||'Run\x20service\x20command\x20'+_0x131784[_0x577006(0x104)],'tag':riskTag(_0x131784[_0x577006(0x163)])}))};});}export function getDynamicServiceEntry(_0x4d4119){const _0x599af9=a65_0x3551;return listDynamicServiceEntries()[_0x599af9(0x113)](_0xa3b257=>_0xa3b257['service']===_0x4d4119);}export function listDynamicServiceDefinitions(_0x13d6c1){const _0x1dbc8b=a65_0x3551;return listLocalServiceTrees()[_0x1dbc8b(0x114)](_0x354461=>!_0x13d6c1||_0x354461[_0x1dbc8b(0x13a)]['code']===_0x13d6c1)['flatMap'](_0xdfc949=>_0xdfc949['commands'][_0x1dbc8b(0x110)](_0x2365a1=>buildDynamicCommandDefinition(_0xdfc949,_0x2365a1)));}export function getDynamicServiceDefinitions(_0x4bee06){const _0x4b7cd1=listDynamicServiceDefinitions(_0x4bee06);return _0x4b7cd1['length']>0x0?_0x4b7cd1:undefined;}export function findDynamicServiceDefinition(_0x49696a,_0x189914){const _0x1cef5b=a65_0x3551;return listDynamicServiceDefinitions(_0x49696a)[_0x1cef5b(0x113)](_0x52c5e9=>_0x52c5e9['command']===_0x189914);}export function buildDynamicCommandDefinition(_0x1f00dc,_0x5c32d4){const _0x205732=a65_0x3551;return{'service':_0x1f00dc[_0x205732(0x13a)][_0x205732(0x133)],'command':dynamicCommandName(_0x5c32d4),'description':_0x5c32d4['description']||'Run\x20service\x20command\x20'+_0x5c32d4[_0x205732(0x104)],'risk':_0x5c32d4[_0x205732(0x163)],..._0x5c32d4[_0x205732(0x163)]==='read'?{}:{'confirmationDescription':buildDynamicConfirmationDescription(_0x5c32d4)},'requiresAuth':!![],'requiresAppCode':!![],'args':_0x5c32d4[_0x205732(0x131)][_0x205732(0x110)](_0x345e40=>({'name':_0x345e40[_0x205732(0x111)],'description':_0x345e40[_0x205732(0x10f)]||_0x345e40[_0x205732(0x111)],'required':_0x345e40[_0x205732(0x154)]})),'flags':_0x5c32d4['flags'][_0x205732(0x110)](flagToCommandFlag),'helpExtra':()=>renderDynamicCommandHelp(_0x5c32d4),async 'dryRun'(_0x1b5d2c){const _0x3b3e9b=_0x205732,_0x3e8021=await compilePlan(_0x1f00dc,_0x5c32d4,_0x1b5d2c);return{'method':'SERVICE_TREE','url':_0x5c32d4[_0x3b3e9b(0x104)],'body':{'target':targetPreview(_0x3e8021),'params':_0x3e8021[_0x3b3e9b(0x120)]},'description':_0x3b3e9b(0x10d)+_0x5c32d4[_0x3b3e9b(0x104)]};},async 'execute'(_0x4c315c){const _0xa0c4a1=_0x205732,_0x114ffc=await compilePlan(_0x1f00dc,_0x5c32d4,_0x4c315c),_0x5032eb=Date['now'](),_0x43b1bb=await executePlan(_0x114ffc,_0x5c32d4,_0x4c315c),_0x409625=Date[_0xa0c4a1(0x107)]()-_0x5032eb;return{'ok':!![],'data':{'service':_0x1f00dc[_0xa0c4a1(0x13a)],'command':_0x5c32d4[_0xa0c4a1(0x104)],'target':targetPreview(_0x114ffc),'result':_0x43b1bb,'elapsed':_0x409625},'message':_0xa0c4a1(0x122)+_0x5c32d4[_0xa0c4a1(0x104)]+_0xa0c4a1(0x115)+_0x409625+'ms'};}};}function buildDynamicConfirmationDescription(_0x559f2f){const _0x42b439=a65_0x3551,_0x22e607=_0x559f2f['description']||_0x559f2f[_0x42b439(0x104)],_0x286a39=_0x559f2f['risk']===_0x42b439(0x15c)?_0x42b439(0x140):'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'+_0x22e607+_0x42b439(0x139)+_0x286a39;}function dynamicCommandName(_0x16d6ac){const _0x29964d=a65_0x3551;return _0x16d6ac[_0x29964d(0x126)][_0x29964d(0x159)](0x1)[_0x29964d(0x12c)]('\x20');}function riskTag(_0x236414){const _0x378b64=a65_0x3551;return _0x236414===_0x378b64(0x132)?'':_0x378b64(0x117)+_0x236414+']';}function flagToCommandFlag(_0x2a73a6){const _0x199443=a65_0x3551;return{'name':_0x2a73a6[_0x199443(0x12e)],'type':_0x2a73a6['type']===_0x199443(0x13c)?_0x199443(0x15a):_0x2a73a6[_0x199443(0x136)],'description':_0x2a73a6['description']||_0x2a73a6[_0x199443(0x111)],'required':_0x2a73a6[_0x199443(0x154)],'default':isPrimitiveFlagDefault(_0x2a73a6[_0x199443(0x10a)])?_0x2a73a6[_0x199443(0x10a)]:undefined,'enum':_0x2a73a6[_0x199443(0x106)]};}async function compilePlan(_0x410857,_0x885b93,_0x191571){const _0x2df110=a65_0x3551,_0x20f226=_0x885b93[_0x2df110(0x127)][_0x2df110(0x161)]?_0x410857[_0x2df110(0x118)][_0x885b93[_0x2df110(0x127)]['appRef']]:undefined;if(_0x20f226?.[_0x2df110(0x12a)]){const _0x280252=isDev(_0x20f226['env'])?'development':normalizeEnv(_0x20f226[_0x2df110(0x12a)]);if(_0x280252!==_0x191571['envName'])throw CliErrors[_0x2df110(0x13f)]('Service\x20command\x20'+_0x885b93['cliPath']+_0x2df110(0x14e)+_0x280252+_0x2df110(0x14f)+_0x191571['envName']+'\x22.',_0x2df110(0x119));}return compileServiceTreeCommand(_0x885b93,{'flags':_0x191571[_0x2df110(0x12d)],'args':_0x191571[_0x2df110(0x131)],'context':await buildServiceContext(_0x885b93,_0x191571)});}async function buildServiceContext(_0x52329c,_0x47cae1){const _0x2ade13=a65_0x3551,_0x9df205={'appCode':_0x47cae1[_0x2ade13(0x149)],'env':_0x47cae1['envName'],'envName':_0x47cae1['envName']};if(!usesRuntimeContext(_0x52329c))return _0x9df205;const _0x1e05bd=await getLoginUserInfo(),_0x13382e=pickFirst(_0x1e05bd[_0x2ade13(0x138)],_0x1e05bd['id']);return{..._0x9df205,'user':_0x1e05bd,'userId':_0x13382e,'id':_0x1e05bd['id'],'username':pickFirst(_0x1e05bd['username'],_0x1e05bd['userName'],_0x1e05bd[_0x2ade13(0x109)]),'userName':_0x1e05bd['userName'],'nickname':pickFirst(_0x1e05bd['nickname'],_0x1e05bd[_0x2ade13(0x14b)]),'nickName':_0x1e05bd[_0x2ade13(0x14b)],'tenantCode':_0x1e05bd[_0x2ade13(0x11a)],'employeeId':_0x1e05bd[_0x2ade13(0x14c)]};}function a65_0x3551(_0x2cc30d,_0x43d34f){_0x2cc30d=_0x2cc30d-0x104;const _0x3805e5=a65_0x3805();let _0x355124=_0x3805e5[_0x2cc30d];return _0x355124;}function usesRuntimeContext(_0x2051fd){const _0x376617=a65_0x3551;return _0x2051fd[_0x376617(0x147)]['some'](_0x10b359=>typeof _0x10b359['source']==='string'&&(_0x10b359[_0x376617(0x121)]['startsWith']('context.')||_0x10b359[_0x376617(0x121)][_0x376617(0x155)](_0x376617(0x105))));}function pickFirst(..._0x1bab94){const _0x49e9e=a65_0x3551;return _0x1bab94[_0x49e9e(0x113)](_0x120ffd=>_0x120ffd!==undefined&&_0x120ffd!==null);}async function executePlan(_0x335966,_0x151a08,_0x5bbc67){const _0x55e693=a65_0x3551;if(_0x335966[_0x55e693(0x11f)]===_0x55e693(0x137)){const _0x4080a6=await resolveDatasetCode(_0x335966,_0x151a08,_0x5bbc67);return executeData(_0x4080a6,_0x335966[_0x55e693(0x129)],_0x335966[_0x55e693(0x120)]);}if(_0x335966[_0x55e693(0x11f)]==='sql'){if(!_0x335966[_0x55e693(0x156)])throw CliErrors[_0x55e693(0x13f)](_0x55e693(0x122)+_0x151a08[_0x55e693(0x104)]+'\x20requires\x20target.sqlCode.');return executeSdkSql(_0x335966['sqlCode'],normalizeScalarParams(_0x335966[_0x55e693(0x120)]));}if(_0x335966[_0x55e693(0x11f)]==='bff'){const _0xc30b9=_0x335966['scriptName']||_0x335966['bffCode']||(_0x335966[_0x55e693(0x14d)]==null?'':String(_0x335966[_0x55e693(0x14d)]));if(!_0xc30b9)throw CliErrors['validation']('Service\x20command\x20'+_0x151a08['cliPath']+_0x55e693(0x162));return executeSdkBff(_0xc30b9,_0x335966[_0x55e693(0x120)]);}throw CliErrors[_0x55e693(0x13f)](_0x55e693(0x108)+_0x335966['kind']);}async function resolveDatasetCode(_0x3ad654,_0xaccc02,_0x3c5ccd){const _0x496041=a65_0x3551;if(_0x3ad654['datasetCode'])return _0x3ad654[_0x496041(0x145)];if(!_0x3ad654[_0x496041(0x142)])throw CliErrors[_0x496041(0x13f)](_0x496041(0x122)+_0xaccc02['cliPath']+'\x20requires\x20target.datasetCode\x20or\x20target.datatable.');const _0x5c6d6c=await listDatasets(_0x3c5ccd[_0x496041(0x149)]),_0x21c149=_0x5c6d6c[_0x496041(0x113)](_0x1c0854=>_0x1c0854['dbtableConfig']?.[_0x496041(0x15e)]===_0x3ad654[_0x496041(0x142)]);if(!_0x21c149?.['code'])throw CliErrors[_0x496041(0x13f)](_0x496041(0x148)+_0x3ad654[_0x496041(0x142)]+'\x22\x20to\x20a\x20datasetCode\x20in\x20app\x20'+_0x3c5ccd[_0x496041(0x149)]+'.',_0x496041(0x11e));return _0x21c149[_0x496041(0x133)];}function applyAppBinding(_0x4f18d7,_0x12351c,_0x4978d7){const _0x69f766=a65_0x3551,_0x228215=_0x12351c[_0x69f766(0x127)][_0x69f766(0x161)];if(!_0x228215)return;const _0x11d07c=_0x4f18d7[_0x69f766(0x118)][_0x228215];if(!_0x11d07c)throw CliErrors[_0x69f766(0x13f)](_0x69f766(0x125)+_0x228215+_0x69f766(0x10c)+_0x12351c[_0x69f766(0x104)]+'.','Define\x20the\x20appRef\x20under\x20appBindings\x20or\x20remove\x20target.appRef.');const _0x5d8afd=_0x11d07c[_0x69f766(0x12f)]||_0x11d07c[_0x69f766(0x149)];_0x5d8afd&&!hasText(_0x4978d7[_0x69f766(0x12f)])&&!hasText(_0x4978d7['app'])&&(_0x4978d7[_0x69f766(0x12f)]=_0x5d8afd),_0x11d07c[_0x69f766(0x116)]&&!hasText(_0x4978d7[_0x69f766(0x116)])&&!hasText(_0x4978d7[_0x69f766(0x12f)])&&(_0x4978d7['app']=_0x11d07c[_0x69f766(0x116)]);}function renderDynamicCommandHelp(_0x1e600d){const _0x24c4f8=a65_0x3551,_0x14e7e3=['\x20\x20SERVICE\x20TREE\x20TARGET',_0x24c4f8(0x10e)+_0x1e600d[_0x24c4f8(0x127)]['kind'],_0x24c4f8(0x14a)+_0x1e600d[_0x24c4f8(0x127)][_0x24c4f8(0x129)]];if(_0x1e600d[_0x24c4f8(0x127)][_0x24c4f8(0x145)])_0x14e7e3[_0x24c4f8(0x124)](_0x24c4f8(0x160)+_0x1e600d[_0x24c4f8(0x127)][_0x24c4f8(0x145)]);if(_0x1e600d['target'][_0x24c4f8(0x142)])_0x14e7e3[_0x24c4f8(0x124)]('\x20\x20\x20\x20datatable:\x20'+_0x1e600d['target']['datatable']);if(_0x1e600d[_0x24c4f8(0x127)][_0x24c4f8(0x156)])_0x14e7e3['push'](_0x24c4f8(0x152)+_0x1e600d[_0x24c4f8(0x127)][_0x24c4f8(0x156)]);if(_0x1e600d['target'][_0x24c4f8(0x134)])_0x14e7e3[_0x24c4f8(0x124)](_0x24c4f8(0x130)+_0x1e600d[_0x24c4f8(0x127)][_0x24c4f8(0x134)]);if(_0x1e600d[_0x24c4f8(0x147)][_0x24c4f8(0x151)]>0x0){_0x14e7e3['push']('','\x20\x20MAP\x20TO');for(const _0x32aa43 of _0x1e600d[_0x24c4f8(0x147)]){_0x14e7e3[_0x24c4f8(0x124)](_0x24c4f8(0x153)+(_0x32aa43[_0x24c4f8(0x121)]||_0x24c4f8(0x157))+_0x24c4f8(0x128)+_0x32aa43['target']+(_0x32aa43[_0x24c4f8(0x13e)]?'.'+_0x32aa43['operator']:''));}}return _0x14e7e3[_0x24c4f8(0x12c)]('\x0a');}function targetPreview(_0x376822){const _0x48b49d=a65_0x3551;return{'kind':_0x376822['kind'],'command':_0x376822[_0x48b49d(0x129)],'appRef':_0x376822[_0x48b49d(0x161)],'datasetCode':_0x376822[_0x48b49d(0x145)],'datatable':_0x376822[_0x48b49d(0x142)],'sqlCode':_0x376822[_0x48b49d(0x156)],'bffCode':_0x376822[_0x48b49d(0x11b)],'bffId':_0x376822['bffId'],'functionName':_0x376822[_0x48b49d(0x134)]};}function normalizeScalarParams(_0x55745f){const _0x4aad82=a65_0x3551;return Object[_0x4aad82(0x15d)](Object[_0x4aad82(0x13d)](_0x55745f)['filter'](([,_0x247c85])=>typeof _0x247c85===_0x4aad82(0x15a)||typeof _0x247c85===_0x4aad82(0x112)));}function hasText(_0x1d6f4e){const _0x50727a=a65_0x3551;return typeof _0x1d6f4e===_0x50727a(0x15a)&&_0x1d6f4e['trim']()[_0x50727a(0x151)]>0x0;}function isPrimitiveFlagDefault(_0x1e3fdb){const _0x67f29d=a65_0x3551;return _0x1e3fdb===undefined||typeof _0x1e3fdb==='string'||typeof _0x1e3fdb===_0x67f29d(0x112)||typeof _0x1e3fdb==='boolean';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a66_0x2ef1(){const _0x8ecf92=['hasOwnProperty','.resources','bff','functionName','$.commands[','.actions.','68732DqjPnw','3ScVCfd','298295wdiENx','1556208QNafoj','call','.scriptName','string','2819327XijKhl','5921703eAbPhF','Use\x20functionName;\x20scriptName\x20is\x20not\x20part\x20of\x20the\x20runtime\x20Service\x20Tree\x20contract.','error','action','].target','kind','forEach','entries','bff.exec','functionName\x20must\x20be\x20a\x20non-empty\x20string.','scriptName','commands','2794SrsxFF','.functionName','target','trim','resources','isArray','$.resources','1202706znbOCF','343GGkHGJ','map','.target','actions','push','prototype'];a66_0x2ef1=function(){return _0x8ecf92;};return a66_0x2ef1();}(function(_0x4966a1,_0x1b7168){const _0x1edf3a=a66_0x39b3,_0x19f46c=_0x4966a1();while(!![]){try{const _0x213a66=parseInt(_0x1edf3a(0x136))/0x1*(-parseInt(_0x1edf3a(0x12e))/0x2)+parseInt(_0x1edf3a(0x143))/0x3*(parseInt(_0x1edf3a(0x142))/0x4)+parseInt(_0x1edf3a(0x144))/0x5+parseInt(_0x1edf3a(0x135))/0x6+-parseInt(_0x1edf3a(0x149))/0x7+parseInt(_0x1edf3a(0x145))/0x8+parseInt(_0x1edf3a(0x14a))/0x9;if(_0x213a66===_0x1b7168)break;else _0x19f46c['push'](_0x19f46c['shift']());}catch(_0x14e24c){_0x19f46c['push'](_0x19f46c['shift']());}}}(a66_0x2ef1,0x3c82e));export function adaptServiceTreeManifestForLegacyFramework(_0x53084a){const _0x26a03e=a66_0x39b3,_0x60f745=cloneJsonValue(_0x53084a),_0x447b5a=[];if(!isObjectRecord(_0x60f745))return{'manifest':_0x60f745,'errors':_0x447b5a};return Array['isArray'](_0x60f745[_0x26a03e(0x12d)])&&_0x60f745['commands'][_0x26a03e(0x150)]((_0x13d71b,_0x20b4d5)=>{const _0xa03710=_0x26a03e;if(!isObjectRecord(_0x13d71b))return;adaptBffTarget(_0x13d71b['target'],_0xa03710(0x140)+_0x20b4d5+_0xa03710(0x14e),_0x447b5a);}),adaptResources(_0x60f745[_0x26a03e(0x132)],_0x26a03e(0x134),_0x447b5a),{'manifest':_0x60f745,'errors':_0x447b5a};}export function toPublicServiceTreeTarget(_0x120b8c){const _0x4a9dfe=a66_0x39b3,{scriptName:_0x5e9f86,..._0x16c3b0}=_0x120b8c;return typeof _0x5e9f86==='string'&&_0x5e9f86[_0x4a9dfe(0x131)]()&&(_0x16c3b0[_0x4a9dfe(0x13f)]=_0x5e9f86),_0x16c3b0;}function a66_0x39b3(_0x55311d,_0x4fc549){_0x55311d=_0x55311d-0x12c;const _0x2ef1b4=a66_0x2ef1();let _0x39b3c0=_0x2ef1b4[_0x55311d];return _0x39b3c0;}export function toPublicNormalizedServiceTree(_0x1ca62b){const _0x518139=a66_0x39b3;return{..._0x1ca62b,'commands':_0x1ca62b['commands']['map'](_0x1a4acf=>({..._0x1a4acf,'target':toPublicServiceTreeTarget(_0x1a4acf[_0x518139(0x130)])}))};}function adaptResources(_0x30d4bc,_0x441226,_0x3b517b){const _0x266129=a66_0x39b3;if(!isObjectRecord(_0x30d4bc))return;for(const [_0x108b5b,_0x23f88e]of Object[_0x266129(0x151)](_0x30d4bc)){if(!isObjectRecord(_0x23f88e))continue;const _0x3dfddf=_0x441226+'.'+_0x108b5b;if(isObjectRecord(_0x23f88e[_0x266129(0x139)]))for(const [_0xd79e55,_0x363107]of Object['entries'](_0x23f88e[_0x266129(0x139)])){if(!isObjectRecord(_0x363107))continue;const _0x35be39=_0x3dfddf+_0x266129(0x141)+_0xd79e55,_0x153f7b=isObjectRecord(_0x363107[_0x266129(0x130)])&&_0x363107[_0x266129(0x130)]['kind']===_0x266129(0x13e);adaptBffTarget(_0x363107[_0x266129(0x130)],_0x35be39+_0x266129(0x138),_0x3b517b),(_0x153f7b||isBffAction(_0x363107))&&adaptFunctionNameField(_0x363107,_0x35be39,_0x3b517b);}adaptResources(_0x23f88e['resources'],_0x3dfddf+_0x266129(0x13d),_0x3b517b);}}function adaptBffTarget(_0x1bc648,_0x1cabbd,_0x4f2d2a){const _0x140466=a66_0x39b3;if(!isObjectRecord(_0x1bc648)||_0x1bc648[_0x140466(0x14f)]!=='bff')return;adaptFunctionNameField(_0x1bc648,_0x1cabbd,_0x4f2d2a);}function adaptFunctionNameField(_0x379738,_0x11b0bd,_0x2f615d){const _0xdefe6b=a66_0x39b3;Object[_0xdefe6b(0x13b)][_0xdefe6b(0x13c)][_0xdefe6b(0x146)](_0x379738,_0xdefe6b(0x12c))&&_0x2f615d[_0xdefe6b(0x13a)]({'level':_0xdefe6b(0x14c),'path':_0x11b0bd+_0xdefe6b(0x147),'message':_0xdefe6b(0x14b)});if(Object['prototype'][_0xdefe6b(0x13c)][_0xdefe6b(0x146)](_0x379738,'functionName')){if(typeof _0x379738['functionName']!==_0xdefe6b(0x148)||!_0x379738[_0xdefe6b(0x13f)][_0xdefe6b(0x131)]()){_0x2f615d[_0xdefe6b(0x13a)]({'level':_0xdefe6b(0x14c),'path':_0x11b0bd+_0xdefe6b(0x12f),'message':_0xdefe6b(0x153)}),delete _0x379738[_0xdefe6b(0x13f)];return;}_0x379738[_0xdefe6b(0x12c)]=_0x379738[_0xdefe6b(0x13f)],delete _0x379738['functionName'];}}function isBffAction(_0x2226db){const _0x93b4fd=a66_0x39b3;return _0x2226db['kind']===_0x93b4fd(0x13e)||_0x2226db[_0x93b4fd(0x14d)]===_0x93b4fd(0x152)||_0x2226db[_0x93b4fd(0x130)]===_0x93b4fd(0x152);}function cloneJsonValue(_0x570bae){const _0x131856=a66_0x39b3;if(Array[_0x131856(0x133)](_0x570bae))return _0x570bae['map'](_0x153206=>cloneJsonValue(_0x153206));if(isObjectRecord(_0x570bae))return Object['fromEntries'](Object[_0x131856(0x151)](_0x570bae)[_0x131856(0x137)](([_0x4f1da8,_0xfaca1f])=>[_0x4f1da8,cloneJsonValue(_0xfaca1f)]));return _0x570bae;}function isObjectRecord(_0x4f0140){const _0x51a04b=a66_0x39b3;return Boolean(_0x4f0140)&&typeof _0x4f0140==='object'&&!Array[_0x51a04b(0x133)](_0x4f0140);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a67_0x5b9f9b=a67_0x3734;function a67_0x3734(_0x4c50ff,_0x14cdd5){_0x4c50ff=_0x4c50ff-0x19a;const _0x2f899e=a67_0x2f89();let _0x3734cd=_0x2f899e[_0x4c50ff];return _0x3734cd;}(function(_0x343847,_0x2d5ec6){const _0x8974f2=a67_0x3734,_0x80b25c=_0x343847();while(!![]){try{const _0x3b23d4=-parseInt(_0x8974f2(0x1d6))/0x1*(parseInt(_0x8974f2(0x19e))/0x2)+parseInt(_0x8974f2(0x1a5))/0x3+-parseInt(_0x8974f2(0x1bc))/0x4*(-parseInt(_0x8974f2(0x1c9))/0x5)+-parseInt(_0x8974f2(0x1bb))/0x6*(parseInt(_0x8974f2(0x1a1))/0x7)+-parseInt(_0x8974f2(0x1d1))/0x8*(-parseInt(_0x8974f2(0x1b0))/0x9)+-parseInt(_0x8974f2(0x1db))/0xa+-parseInt(_0x8974f2(0x1ac))/0xb*(-parseInt(_0x8974f2(0x1b6))/0xc);if(_0x3b23d4===_0x2d5ec6)break;else _0x80b25c['push'](_0x80b25c['shift']());}catch(_0x391641){_0x80b25c['push'](_0x80b25c['shift']());}}}(a67_0x2f89,0x4bd40));import{exportServiceManifest,formatValidationFailure,getLocalServiceEntry,getServiceRegistryPath,importServiceManifest,listLocalServices,loadServiceManifestFromFile,removeServiceManifest}from'../../commands/service/registry.js';function a67_0x2f89(){const _0x5d8d2a=['list','Service\x20registry\x20validation\x20passed.','serviceCount','report','imported','820GdFOHB','Local\x20service\x20code,\x20for\x20example\x20crm','validate','read','length','lower\x20kebab-case\x20service\x20code','description','Removed\x20service\x20','1725392OrOShD','Updated','Preview\x20Service\x20Tree\x20removal\x20from\x20~/.lovrabet/service.json','manifest','str','599912uzuaVo','Imported','reduce','errors','Reads\x20the\x20given\x20manifest\x20into\x20the\x20local\x20Service\x20Tree\x20registry.\x20An\x20existing\x20manifest\x20with\x20the\x20same\x20service\x20code\x20is\x20updated.\x20The\x20confirmation\x20UI\x20does\x20not\x20show\x20local\x20file\x20paths.','5046150VqRpFG','target','filePath','Validate\x20a\x20Service\x20Tree\x20JSON\x20manifest','service','Local\x20service\x20not\x20found:\x20','Writes\x20the\x20local\x20Service\x20Tree\x20manifest\x20for\x20the\x20given\x20service\x20to\x20a\x20JSON\x20file.\x20An\x20existing\x20file\x20at\x20the\x20target\x20may\x20be\x20overwritten.\x20The\x20confirmation\x20UI\x20does\x20not\x20show\x20local\x20file\x20paths.','entries','registryPath','registryIndex','serviceCode','commands','registryServiceCode','Import\x20a\x20Service\x20Tree\x20manifest\x20into\x20the\x20local\x20runtime\x20registry','Exported\x20service\x20','2nmoBkf','source','hash','6979GqjNol','normalizedManifest','Service\x20Tree\x20manifest\x20file\x20path','detail','1360869VyGTAt','WRITE','Preview\x20Service\x20Tree\x20import\x20into\x20~/.lovrabet/service.json','Export\x20the\x20local\x20Service\x20Tree\x20manifest\x20to\x20a\x20JSON\x20file','Remove\x20a\x20Service\x20Tree\x20manifest\x20from\x20the\x20local\x20runtime\x20registry','manifests','string','11TOLMbU','List\x20locally\x20imported\x20Service\x20Tree\x20manifests','name','risk','9GjqYgK','write','updated','Service\x20manifest\x20validation\x20passed.','Removes\x20the\x20given\x20service\x20manifest\x20from\x20the\x20local\x20Service\x20Tree\x20registry.\x20Dynamic\x20commands\x20from\x20that\x20manifest\x20will\x20no\x20longer\x20be\x20available.','entry','7267668JprMQy','registry','kind','flags','replaced','1758xbyXpH','10544vOPmIw','cliPath','Preview\x20Service\x20Tree\x20export\x20from\x20~/.lovrabet/service.json','file','type','warnings','map','version'];a67_0x2f89=function(){return _0x5d8d2a;};return a67_0x2f89();}import{toPublicNormalizedServiceTree,toPublicServiceTreeTarget}from'../../commands/service/function-name-adapter.js';const FILE_FLAG={'name':'file','type':a67_0x5b9f9b(0x1ab),'required':!![],'description':a67_0x5b9f9b(0x1a3)},SERVICE_FLAG={'name':a67_0x5b9f9b(0x1df),'type':'string','required':!![],'description':a67_0x5b9f9b(0x1ca),'pattern':{'regex':/^[a-z][a-z0-9-]*$/,'description':a67_0x5b9f9b(0x1ce)}};function summarizeService(_0x10ee66){const _0x413f89=a67_0x5b9f9b;return{'serviceCode':_0x10ee66['serviceCode'],'name':_0x10ee66[_0x413f89(0x1a2)][_0x413f89(0x1df)]['name'],'version':_0x10ee66[_0x413f89(0x1c3)],'importedAt':_0x10ee66['importedAt'],'source':_0x10ee66[_0x413f89(0x19f)],'commandCount':_0x10ee66[_0x413f89(0x1a2)][_0x413f89(0x19a)][_0x413f89(0x1cd)],'commands':_0x10ee66[_0x413f89(0x1a2)][_0x413f89(0x19a)][_0x413f89(0x1c2)](_0x1f7a35=>({'path':_0x1f7a35[_0x413f89(0x1bd)],'description':_0x1f7a35[_0x413f89(0x1cf)],'risk':_0x1f7a35['risk'],'target':toPublicServiceTreeTarget(_0x1f7a35['target']),'flags':_0x1f7a35[_0x413f89(0x1b9)]['map'](_0x33e652=>({'name':_0x33e652[_0x413f89(0x1ae)],'cliName':_0x33e652['cliName'],'type':_0x33e652[_0x413f89(0x1c0)],'required':_0x33e652['required']===!![]}))}))};}function summarizeLoadedManifest(_0xc1bfe2){const _0x43db0a=a67_0x5b9f9b;return{'service':_0xc1bfe2[_0x43db0a(0x1a2)]?.[_0x43db0a(0x1df)],'version':_0xc1bfe2[_0x43db0a(0x1a2)]?.['version'],'commandCount':_0xc1bfe2[_0x43db0a(0x1a2)]?.[_0x43db0a(0x19a)][_0x43db0a(0x1cd)]??0x0,'commands':_0xc1bfe2[_0x43db0a(0x1a2)]?.['commands']['map'](_0x1e1dff=>({'path':_0x1e1dff[_0x43db0a(0x1bd)],'risk':_0x1e1dff[_0x43db0a(0x1af)],'target':toPublicServiceTreeTarget(_0x1e1dff[_0x43db0a(0x1dc)])}))??[],'registryIndex':_0xc1bfe2[_0x43db0a(0x1e4)],'registryServiceCode':_0xc1bfe2[_0x43db0a(0x19b)],'errors':_0xc1bfe2['report'][_0x43db0a(0x1d9)],'warnings':_0xc1bfe2[_0x43db0a(0x1c7)][_0x43db0a(0x1c1)]};}export const serviceDefinitions=[{'service':a67_0x5b9f9b(0x1df),'command':a67_0x5b9f9b(0x1cb),'description':a67_0x5b9f9b(0x1de),'risk':a67_0x5b9f9b(0x1cc),'requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'execute'(_0x408d74){const _0x10d2af=a67_0x5b9f9b,_0x4ce8e5=loadServiceManifestFromFile(_0x408d74[_0x10d2af(0x1d5)]('file'));if(!_0x4ce8e5[_0x10d2af(0x1c7)]['ok'])return{'ok':![],'data':{'file':_0x4ce8e5[_0x10d2af(0x1dd)],'hash':_0x4ce8e5['hash'],'kind':_0x4ce8e5[_0x10d2af(0x1b8)],'serviceCount':_0x4ce8e5[_0x10d2af(0x1aa)][_0x10d2af(0x1cd)],'services':_0x4ce8e5[_0x10d2af(0x1aa)][_0x10d2af(0x1c2)](summarizeLoadedManifest),'errors':_0x4ce8e5[_0x10d2af(0x1c7)][_0x10d2af(0x1d9)],'warnings':_0x4ce8e5[_0x10d2af(0x1c7)]['warnings']},'message':formatValidationFailure(_0x4ce8e5['report'])};if(_0x4ce8e5['kind']===_0x10d2af(0x1b7)||_0x4ce8e5[_0x10d2af(0x1aa)][_0x10d2af(0x1cd)]!==0x1)return{'ok':!![],'data':{'file':_0x4ce8e5[_0x10d2af(0x1dd)],'hash':_0x4ce8e5['hash'],'kind':_0x4ce8e5[_0x10d2af(0x1b8)],'serviceCount':_0x4ce8e5[_0x10d2af(0x1aa)][_0x10d2af(0x1cd)],'commandCount':_0x4ce8e5['manifests'][_0x10d2af(0x1d8)]((_0x3905b2,_0x193dc4)=>_0x3905b2+(_0x193dc4[_0x10d2af(0x1a2)]?.['commands'][_0x10d2af(0x1cd)]??0x0),0x0),'services':_0x4ce8e5[_0x10d2af(0x1aa)][_0x10d2af(0x1c2)](summarizeLoadedManifest),'warnings':_0x4ce8e5[_0x10d2af(0x1c7)][_0x10d2af(0x1c1)]},'message':_0x10d2af(0x1c5)};return{'ok':!![],'data':{'file':_0x4ce8e5['filePath'],'hash':_0x4ce8e5[_0x10d2af(0x1a0)],'kind':_0x4ce8e5['kind'],'service':_0x4ce8e5[_0x10d2af(0x1a2)]?.[_0x10d2af(0x1df)],'version':_0x4ce8e5[_0x10d2af(0x1a2)]?.[_0x10d2af(0x1c3)],'commandCount':_0x4ce8e5[_0x10d2af(0x1a2)]?.[_0x10d2af(0x19a)]['length']??0x0,'commands':_0x4ce8e5[_0x10d2af(0x1a2)]?.[_0x10d2af(0x19a)]['map'](_0x26234a=>({'path':_0x26234a[_0x10d2af(0x1bd)],'risk':_0x26234a[_0x10d2af(0x1af)],'target':toPublicServiceTreeTarget(_0x26234a['target'])})),'warnings':_0x4ce8e5[_0x10d2af(0x1c7)]['warnings']},'message':_0x10d2af(0x1b3)};}},{'service':a67_0x5b9f9b(0x1df),'command':'import','description':a67_0x5b9f9b(0x19c),'risk':a67_0x5b9f9b(0x1b1),'confirmationDescription':a67_0x5b9f9b(0x1da),'requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'dryRun'(_0x3663c5){const _0x5c61e9=a67_0x5b9f9b,_0x2591a8=loadServiceManifestFromFile(_0x3663c5[_0x5c61e9(0x1d5)]('file'));return{'method':_0x5c61e9(0x1a6),'url':getServiceRegistryPath(),'body':{'file':_0x2591a8['filePath'],'hash':_0x2591a8[_0x5c61e9(0x1a0)],'kind':_0x2591a8['kind'],'ok':_0x2591a8[_0x5c61e9(0x1c7)]['ok'],'service':_0x2591a8[_0x5c61e9(0x1a2)]?.['service'],'version':_0x2591a8[_0x5c61e9(0x1a2)]?.[_0x5c61e9(0x1c3)],'serviceCount':_0x2591a8[_0x5c61e9(0x1aa)]['length'],'services':_0x2591a8[_0x5c61e9(0x1aa)][_0x5c61e9(0x1c2)](_0x32dc2a=>({'service':_0x32dc2a[_0x5c61e9(0x1a2)]?.['service'],'version':_0x32dc2a['normalizedManifest']?.[_0x5c61e9(0x1c3)],'commandCount':_0x32dc2a['normalizedManifest']?.['commands'][_0x5c61e9(0x1cd)]??0x0,'errors':_0x32dc2a[_0x5c61e9(0x1c7)][_0x5c61e9(0x1d9)]})),'errors':_0x2591a8['report'][_0x5c61e9(0x1d9)],'commandCount':_0x2591a8['normalizedManifest']?.[_0x5c61e9(0x19a)][_0x5c61e9(0x1cd)]??0x0},'description':_0x5c61e9(0x1a7)};},async 'execute'(_0x23faea){const _0x1ae31a=a67_0x5b9f9b,_0x4a966a=importServiceManifest(_0x23faea[_0x1ae31a(0x1d5)](_0x1ae31a(0x1bf)));if(_0x4a966a[_0x1ae31a(0x1e2)][_0x1ae31a(0x1cd)]!==0x1)return{'ok':!![],'data':{'registryPath':_0x4a966a['registryPath'],'imported':_0x4a966a[_0x1ae31a(0x1c8)],'updated':_0x4a966a[_0x1ae31a(0x1b2)],'serviceCount':_0x4a966a[_0x1ae31a(0x1c6)],'services':_0x4a966a['entries'][_0x1ae31a(0x1c2)](summarizeService)},'message':'Imported\x20'+_0x4a966a['imported']+'\x20service(s),\x20updated\x20'+_0x4a966a[_0x1ae31a(0x1b2)]+'\x20service(s).'};return{'ok':!![],'data':{'registryPath':_0x4a966a[_0x1ae31a(0x1e3)],'replaced':_0x4a966a[_0x1ae31a(0x1ba)],'imported':_0x4a966a['imported'],'updated':_0x4a966a[_0x1ae31a(0x1b2)],'serviceCount':_0x4a966a[_0x1ae31a(0x1c6)],'service':summarizeService(_0x4a966a[_0x1ae31a(0x1b5)])},'message':(_0x4a966a['replaced']?_0x1ae31a(0x1d2):_0x1ae31a(0x1d7))+'\x20service\x20'+_0x4a966a[_0x1ae31a(0x1b5)][_0x1ae31a(0x1e5)]+'.'};}},{'service':a67_0x5b9f9b(0x1df),'command':'export','description':a67_0x5b9f9b(0x1a8),'risk':a67_0x5b9f9b(0x1b1),'confirmationDescription':a67_0x5b9f9b(0x1e1),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG,FILE_FLAG],async 'dryRun'(_0x305284){const _0x3646fc=a67_0x5b9f9b,_0x446a64=getLocalServiceEntry(_0x305284['str'](_0x3646fc(0x1df)));return{'method':_0x3646fc(0x1a6),'url':_0x305284['str']('file'),'body':{'service':_0x305284['str'](_0x3646fc(0x1df)),'found':Boolean(_0x446a64),'version':_0x446a64?.[_0x3646fc(0x1c3)],'source':_0x446a64?.[_0x3646fc(0x19f)]},'description':_0x3646fc(0x1be)};},async 'execute'(_0x12a5f0){const _0x1e2592=a67_0x5b9f9b,_0x4499dd=exportServiceManifest(_0x12a5f0['str'](_0x1e2592(0x1df)),_0x12a5f0[_0x1e2592(0x1d5)]('file'));return{'ok':!![],'data':{'registryPath':_0x4499dd[_0x1e2592(0x1e3)],'file':_0x4499dd[_0x1e2592(0x1dd)],'service':summarizeService(_0x4499dd[_0x1e2592(0x1b5)])},'message':_0x1e2592(0x19d)+_0x4499dd[_0x1e2592(0x1b5)][_0x1e2592(0x1e5)]+'.'};}},{'service':a67_0x5b9f9b(0x1df),'command':a67_0x5b9f9b(0x1c4),'description':a67_0x5b9f9b(0x1ad),'risk':a67_0x5b9f9b(0x1cc),'requiresAuth':![],'requiresAppCode':![],'flags':[],async 'execute'(){const _0x5c4dba=listLocalServices();return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'total':_0x5c4dba['length'],'services':_0x5c4dba['map'](summarizeService)}};}},{'service':a67_0x5b9f9b(0x1df),'command':'remove','description':a67_0x5b9f9b(0x1a9),'risk':'write','confirmationDescription':a67_0x5b9f9b(0x1b4),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'dryRun'(_0x4ecb3d){const _0x16f069=a67_0x5b9f9b,_0x10ce77=getLocalServiceEntry(_0x4ecb3d[_0x16f069(0x1d5)](_0x16f069(0x1df)));return{'method':_0x16f069(0x1a6),'url':getServiceRegistryPath(),'body':{'service':_0x4ecb3d['str'](_0x16f069(0x1df)),'found':Boolean(_0x10ce77),'version':_0x10ce77?.['version'],'source':_0x10ce77?.[_0x16f069(0x19f)]},'description':_0x16f069(0x1d3)};},async 'execute'(_0x2494a1){const _0x5c45e8=a67_0x5b9f9b,_0x3d69dc=removeServiceManifest(_0x2494a1[_0x5c45e8(0x1d5)]('service'));return{'ok':!![],'data':{'registryPath':_0x3d69dc['registryPath'],'serviceCount':_0x3d69dc[_0x5c45e8(0x1c6)],'service':summarizeService(_0x3d69dc[_0x5c45e8(0x1b5)])},'message':_0x5c45e8(0x1d0)+_0x3d69dc[_0x5c45e8(0x1b5)]['serviceCode']+'.'};}},{'service':a67_0x5b9f9b(0x1df),'command':a67_0x5b9f9b(0x1a4),'description':'Show\x20a\x20locally\x20imported\x20Service\x20Tree\x20manifest','risk':a67_0x5b9f9b(0x1cc),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'execute'(_0x3d2716){const _0x157d00=a67_0x5b9f9b,_0x255355=getLocalServiceEntry(_0x3d2716[_0x157d00(0x1d5)](_0x157d00(0x1df)));if(!_0x255355)return{'ok':![],'data':{'registryPath':getServiceRegistryPath(),'service':_0x3d2716[_0x157d00(0x1d5)](_0x157d00(0x1df))},'message':_0x157d00(0x1e0)+_0x3d2716[_0x157d00(0x1d5)](_0x157d00(0x1df))};return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'service':summarizeService(_0x255355),'manifest':_0x255355[_0x157d00(0x1d4)],'normalizedManifest':toPublicNormalizedServiceTree(_0x255355[_0x157d00(0x1a2)])}};}}];
|
|
1
|
+
function a67_0x3c41(){const _0x1a321a=['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.','name','updated','WRITE','11244996ihbDyd','import','1gMsRKs','5892804WPFsBI','2508586cgIECj','Removed\x20service\x20','serviceCode','Validate\x20a\x20Service\x20Tree\x20JSON\x20manifest','filePath','manifest','export','Local\x20service\x20not\x20found:\x20','reduce','hash','Import\x20a\x20Service\x20Tree\x20manifest\x20into\x20the\x20local\x20runtime\x20registry','version','Service\x20manifest\x20validation\x20passed.','Remove\x20a\x20Service\x20Tree\x20manifest\x20from\x20the\x20local\x20runtime\x20registry','registry','file','replaced','cliPath','importedAt','risk','kind','Imported\x20','type','write','Service\x20registry\x20validation\x20passed.','manifests','registryPath','entry','cliName','3452wosOgz','Preview\x20Service\x20Tree\x20export\x20from\x20~/.lovrabet/service.json','list','27779643DzaObw','6756648OlJTMH','Service\x20Tree\x20manifest\x20file\x20path','serviceCount','lower\x20kebab-case\x20service\x20code','normalizedManifest','detail','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.','Imported','7825ElnUjR','source','str','Export\x20the\x20local\x20Service\x20Tree\x20manifest\x20to\x20a\x20JSON\x20file','service','remove','registryIndex','Show\x20a\x20locally\x20imported\x20Service\x20Tree\x20manifest','entries','validate','description','imported','flags','errors','report','Preview\x20Service\x20Tree\x20import\x20into\x20~/.lovrabet/service.json','target','Removes\x20the\x20given\x20service\x20manifest\x20from\x20the\x20local\x20Service\x20Tree\x20registry.\x20Dynamic\x20commands\x20from\x20that\x20manifest\x20will\x20no\x20longer\x20be\x20available.','warnings','map','string','\x20service\x20','read','length','4341864yxDkMV','Preview\x20Service\x20Tree\x20removal\x20from\x20~/.lovrabet/service.json','commands'];a67_0x3c41=function(){return _0x1a321a;};return a67_0x3c41();}const a67_0x460f25=a67_0x5255;(function(_0x1b5743,_0x1e3b87){const _0x3921ed=a67_0x5255,_0x363249=_0x1b5743();while(!![]){try{const _0x39d840=parseInt(_0x3921ed(0xeb))/0x1*(parseInt(_0x3921ed(0xed))/0x2)+-parseInt(_0x3921ed(0xe2))/0x3+-parseInt(_0x3921ed(0xbe))/0x4*(-parseInt(_0x3921ed(0xca))/0x5)+-parseInt(_0x3921ed(0xec))/0x6+-parseInt(_0x3921ed(0xe9))/0x7+-parseInt(_0x3921ed(0xc2))/0x8+parseInt(_0x3921ed(0xc1))/0x9;if(_0x39d840===_0x1e3b87)break;else _0x363249['push'](_0x363249['shift']());}catch(_0x125d09){_0x363249['push'](_0x363249['shift']());}}}(a67_0x3c41,0xc604c));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_0x460f25(0xb0),'type':a67_0x460f25(0xde),'required':!![],'description':a67_0x460f25(0xc3)},SERVICE_FLAG={'name':a67_0x460f25(0xce),'type':a67_0x460f25(0xde),'required':!![],'description':'Local\x20service\x20code,\x20for\x20example\x20crm','pattern':{'regex':/^[a-z][a-z0-9-]*$/,'description':a67_0x460f25(0xc5)}};function summarizeService(_0x29568f){const _0x555b26=a67_0x460f25;return{'serviceCode':_0x29568f[_0x555b26(0xef)],'name':_0x29568f[_0x555b26(0xc6)][_0x555b26(0xce)][_0x555b26(0xe6)],'version':_0x29568f['version'],'importedAt':_0x29568f[_0x555b26(0xb3)],'source':_0x29568f[_0x555b26(0xcb)],'commandCount':_0x29568f[_0x555b26(0xc6)]['commands'][_0x555b26(0xe1)],'commands':_0x29568f['normalizedManifest']['commands'][_0x555b26(0xdd)](_0x1b2ea8=>({'path':_0x1b2ea8[_0x555b26(0xb2)],'description':_0x1b2ea8[_0x555b26(0xd4)],'risk':_0x1b2ea8['risk'],'target':toPublicServiceTreeTarget(_0x1b2ea8['target']),'flags':_0x1b2ea8[_0x555b26(0xd6)]['map'](_0x5090e8=>({'name':_0x5090e8['name'],'cliName':_0x5090e8[_0x555b26(0xbd)],'type':_0x5090e8[_0x555b26(0xb7)],'required':_0x5090e8['required']===!![]}))}))};}function summarizeLoadedManifest(_0x41f909){const _0x5500ed=a67_0x460f25;return{'service':_0x41f909[_0x5500ed(0xc6)]?.[_0x5500ed(0xce)],'version':_0x41f909[_0x5500ed(0xc6)]?.[_0x5500ed(0xac)],'commandCount':_0x41f909['normalizedManifest']?.['commands'][_0x5500ed(0xe1)]??0x0,'commands':_0x41f909[_0x5500ed(0xc6)]?.[_0x5500ed(0xe4)][_0x5500ed(0xdd)](_0x2f9cba=>({'path':_0x2f9cba[_0x5500ed(0xb2)],'risk':_0x2f9cba[_0x5500ed(0xb4)],'target':toPublicServiceTreeTarget(_0x2f9cba[_0x5500ed(0xda)])}))??[],'registryIndex':_0x41f909[_0x5500ed(0xd0)],'registryServiceCode':_0x41f909['registryServiceCode'],'errors':_0x41f909[_0x5500ed(0xd8)][_0x5500ed(0xd7)],'warnings':_0x41f909['report']['warnings']};}function a67_0x5255(_0x322ce3,_0x42c2f6){_0x322ce3=_0x322ce3-0xa9;const _0x3c41e2=a67_0x3c41();let _0x525510=_0x3c41e2[_0x322ce3];return _0x525510;}export const serviceDefinitions=[{'service':a67_0x460f25(0xce),'command':a67_0x460f25(0xd3),'description':a67_0x460f25(0xf0),'risk':a67_0x460f25(0xe0),'requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'execute'(_0x2279d0){const _0x5719f8=a67_0x460f25,_0x12c9af=loadServiceManifestFromFile(_0x2279d0[_0x5719f8(0xcc)](_0x5719f8(0xb0)));if(!_0x12c9af['report']['ok'])return{'ok':![],'data':{'file':_0x12c9af[_0x5719f8(0xf1)],'hash':_0x12c9af[_0x5719f8(0xaa)],'kind':_0x12c9af['kind'],'serviceCount':_0x12c9af[_0x5719f8(0xba)][_0x5719f8(0xe1)],'services':_0x12c9af[_0x5719f8(0xba)][_0x5719f8(0xdd)](summarizeLoadedManifest),'errors':_0x12c9af[_0x5719f8(0xd8)][_0x5719f8(0xd7)],'warnings':_0x12c9af[_0x5719f8(0xd8)]['warnings']},'message':formatValidationFailure(_0x12c9af[_0x5719f8(0xd8)])};if(_0x12c9af['kind']===_0x5719f8(0xaf)||_0x12c9af['manifests']['length']!==0x1)return{'ok':!![],'data':{'file':_0x12c9af[_0x5719f8(0xf1)],'hash':_0x12c9af[_0x5719f8(0xaa)],'kind':_0x12c9af[_0x5719f8(0xb5)],'serviceCount':_0x12c9af[_0x5719f8(0xba)][_0x5719f8(0xe1)],'commandCount':_0x12c9af[_0x5719f8(0xba)][_0x5719f8(0xa9)]((_0x4eaf8e,_0x3b170d)=>_0x4eaf8e+(_0x3b170d[_0x5719f8(0xc6)]?.[_0x5719f8(0xe4)][_0x5719f8(0xe1)]??0x0),0x0),'services':_0x12c9af[_0x5719f8(0xba)]['map'](summarizeLoadedManifest),'warnings':_0x12c9af[_0x5719f8(0xd8)]['warnings']},'message':_0x5719f8(0xb9)};return{'ok':!![],'data':{'file':_0x12c9af[_0x5719f8(0xf1)],'hash':_0x12c9af[_0x5719f8(0xaa)],'kind':_0x12c9af[_0x5719f8(0xb5)],'service':_0x12c9af[_0x5719f8(0xc6)]?.['service'],'version':_0x12c9af[_0x5719f8(0xc6)]?.['version'],'commandCount':_0x12c9af[_0x5719f8(0xc6)]?.[_0x5719f8(0xe4)][_0x5719f8(0xe1)]??0x0,'commands':_0x12c9af[_0x5719f8(0xc6)]?.['commands']['map'](_0x16c7a0=>({'path':_0x16c7a0[_0x5719f8(0xb2)],'risk':_0x16c7a0[_0x5719f8(0xb4)],'target':toPublicServiceTreeTarget(_0x16c7a0[_0x5719f8(0xda)])})),'warnings':_0x12c9af['report'][_0x5719f8(0xdc)]},'message':_0x5719f8(0xad)};}},{'service':'service','command':a67_0x460f25(0xea),'description':a67_0x460f25(0xab),'risk':a67_0x460f25(0xb8),'confirmationDescription':a67_0x460f25(0xe5),'requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'dryRun'(_0x4c5340){const _0x2f4e96=a67_0x460f25,_0x3523a9=loadServiceManifestFromFile(_0x4c5340[_0x2f4e96(0xcc)](_0x2f4e96(0xb0)));return{'method':_0x2f4e96(0xe8),'url':getServiceRegistryPath(),'body':{'file':_0x3523a9[_0x2f4e96(0xf1)],'hash':_0x3523a9['hash'],'kind':_0x3523a9[_0x2f4e96(0xb5)],'ok':_0x3523a9[_0x2f4e96(0xd8)]['ok'],'service':_0x3523a9[_0x2f4e96(0xc6)]?.['service'],'version':_0x3523a9[_0x2f4e96(0xc6)]?.[_0x2f4e96(0xac)],'serviceCount':_0x3523a9[_0x2f4e96(0xba)]['length'],'services':_0x3523a9[_0x2f4e96(0xba)][_0x2f4e96(0xdd)](_0x383ef3=>({'service':_0x383ef3[_0x2f4e96(0xc6)]?.[_0x2f4e96(0xce)],'version':_0x383ef3['normalizedManifest']?.['version'],'commandCount':_0x383ef3[_0x2f4e96(0xc6)]?.[_0x2f4e96(0xe4)][_0x2f4e96(0xe1)]??0x0,'errors':_0x383ef3[_0x2f4e96(0xd8)][_0x2f4e96(0xd7)]})),'errors':_0x3523a9[_0x2f4e96(0xd8)]['errors'],'commandCount':_0x3523a9[_0x2f4e96(0xc6)]?.['commands'][_0x2f4e96(0xe1)]??0x0},'description':_0x2f4e96(0xd9)};},async 'execute'(_0x4edbdb){const _0x83535a=a67_0x460f25,_0x191a05=importServiceManifest(_0x4edbdb[_0x83535a(0xcc)](_0x83535a(0xb0)));if(_0x191a05[_0x83535a(0xd2)]['length']!==0x1)return{'ok':!![],'data':{'registryPath':_0x191a05[_0x83535a(0xbb)],'imported':_0x191a05['imported'],'updated':_0x191a05[_0x83535a(0xe7)],'serviceCount':_0x191a05[_0x83535a(0xc4)],'services':_0x191a05[_0x83535a(0xd2)][_0x83535a(0xdd)](summarizeService)},'message':_0x83535a(0xb6)+_0x191a05['imported']+'\x20service(s),\x20updated\x20'+_0x191a05[_0x83535a(0xe7)]+'\x20service(s).'};return{'ok':!![],'data':{'registryPath':_0x191a05['registryPath'],'replaced':_0x191a05[_0x83535a(0xb1)],'imported':_0x191a05[_0x83535a(0xd5)],'updated':_0x191a05[_0x83535a(0xe7)],'serviceCount':_0x191a05['serviceCount'],'service':summarizeService(_0x191a05[_0x83535a(0xbc)])},'message':(_0x191a05[_0x83535a(0xb1)]?'Updated':_0x83535a(0xc9))+_0x83535a(0xdf)+_0x191a05[_0x83535a(0xbc)][_0x83535a(0xef)]+'.'};}},{'service':a67_0x460f25(0xce),'command':a67_0x460f25(0xf3),'description':a67_0x460f25(0xcd),'risk':a67_0x460f25(0xb8),'confirmationDescription':a67_0x460f25(0xc8),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG,FILE_FLAG],async 'dryRun'(_0x58ac4f){const _0x20bd69=a67_0x460f25,_0x1859e5=getLocalServiceEntry(_0x58ac4f[_0x20bd69(0xcc)]('service'));return{'method':_0x20bd69(0xe8),'url':_0x58ac4f[_0x20bd69(0xcc)](_0x20bd69(0xb0)),'body':{'service':_0x58ac4f[_0x20bd69(0xcc)](_0x20bd69(0xce)),'found':Boolean(_0x1859e5),'version':_0x1859e5?.[_0x20bd69(0xac)],'source':_0x1859e5?.['source']},'description':_0x20bd69(0xbf)};},async 'execute'(_0x1b2916){const _0xf48e27=a67_0x460f25,_0x3ba46a=exportServiceManifest(_0x1b2916['str']('service'),_0x1b2916[_0xf48e27(0xcc)](_0xf48e27(0xb0)));return{'ok':!![],'data':{'registryPath':_0x3ba46a[_0xf48e27(0xbb)],'file':_0x3ba46a[_0xf48e27(0xf1)],'service':summarizeService(_0x3ba46a[_0xf48e27(0xbc)])},'message':'Exported\x20service\x20'+_0x3ba46a[_0xf48e27(0xbc)]['serviceCode']+'.'};}},{'service':'service','command':a67_0x460f25(0xc0),'description':'List\x20locally\x20imported\x20Service\x20Tree\x20manifests','risk':a67_0x460f25(0xe0),'requiresAuth':![],'requiresAppCode':![],'flags':[],async 'execute'(){const _0x17f38b=a67_0x460f25,_0x5c51ad=listLocalServices();return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'total':_0x5c51ad[_0x17f38b(0xe1)],'services':_0x5c51ad['map'](summarizeService)}};}},{'service':'service','command':a67_0x460f25(0xcf),'description':a67_0x460f25(0xae),'risk':a67_0x460f25(0xb8),'confirmationDescription':a67_0x460f25(0xdb),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'dryRun'(_0x339164){const _0x122e14=a67_0x460f25,_0x557988=getLocalServiceEntry(_0x339164[_0x122e14(0xcc)]('service'));return{'method':_0x122e14(0xe8),'url':getServiceRegistryPath(),'body':{'service':_0x339164[_0x122e14(0xcc)](_0x122e14(0xce)),'found':Boolean(_0x557988),'version':_0x557988?.['version'],'source':_0x557988?.['source']},'description':_0x122e14(0xe3)};},async 'execute'(_0x1714cb){const _0x738e12=a67_0x460f25,_0x51b161=removeServiceManifest(_0x1714cb[_0x738e12(0xcc)](_0x738e12(0xce)));return{'ok':!![],'data':{'registryPath':_0x51b161[_0x738e12(0xbb)],'serviceCount':_0x51b161[_0x738e12(0xc4)],'service':summarizeService(_0x51b161['entry'])},'message':_0x738e12(0xee)+_0x51b161[_0x738e12(0xbc)]['serviceCode']+'.'};}},{'service':'service','command':a67_0x460f25(0xc7),'description':a67_0x460f25(0xd1),'risk':a67_0x460f25(0xe0),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'execute'(_0xa9607c){const _0x4a6261=a67_0x460f25,_0x3f4c77=getLocalServiceEntry(_0xa9607c[_0x4a6261(0xcc)](_0x4a6261(0xce)));if(!_0x3f4c77)return{'ok':![],'data':{'registryPath':getServiceRegistryPath(),'service':_0xa9607c[_0x4a6261(0xcc)]('service')},'message':_0x4a6261(0xf4)+_0xa9607c[_0x4a6261(0xcc)](_0x4a6261(0xce))};return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'service':summarizeService(_0x3f4c77),'manifest':_0x3f4c77[_0x4a6261(0xf2)],'normalizedManifest':toPublicNormalizedServiceTree(_0x3f4c77[_0x4a6261(0xc6)])}};}}];
|