@lovrabet/lovrabet-cli 2.3.8-beta.7 → 2.3.9-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/approval/index.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/import-excel.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/issue/context.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/permit/dataset-get.js +1 -1
- package/lib/commands/permit/dataset-set.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/schedule/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/function-name-adapter.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/diagram.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/diagram.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/user-account/bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-sdk-errors.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/access-error.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/raw-flags.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-import/auto-id-runner.js +1 -1
- package/lib/services/dataset-import/excel-reader.js +1 -1
- package/lib/services/dataset-import/image-bytes.js +1 -1
- package/lib/services/dataset-import/image-ooxml.js +1 -1
- package/lib/services/dataset-import/image-runner.js +1 -1
- package/lib/services/dataset-import/metadata.js +1 -1
- package/lib/services/dataset-import/preview.js +1 -1
- package/lib/services/dataset-import/runner.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/install-target.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/utils/access-key-redaction.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/positive-safe-integer.js +1 -1
- package/lib/utils/redaction.js +1 -1
- package/lib/utils/runtime-user-id.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/lovrabet/SKILL.md +1 -1
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a54_0x1ceae6=a54_0x25a0;(function(_0x4fcbfd,_0x64265b){const _0xd6f11c=a54_0x25a0,_0xbe1a00=_0x4fcbfd();while(!![]){try{const _0x5e582a=-parseInt(_0xd6f11c(0x199))/0x1+-parseInt(_0xd6f11c(0x17e))/0x2+parseInt(_0xd6f11c(0x185))/0x3*(parseInt(_0xd6f11c(0x18b))/0x4)+-parseInt(_0xd6f11c(0x18e))/0x5+parseInt(_0xd6f11c(0x182))/0x6+-parseInt(_0xd6f11c(0x196))/0x7*(parseInt(_0xd6f11c(0x188))/0x8)+-parseInt(_0xd6f11c(0x18c))/0x9*(-parseInt(_0xd6f11c(0x187))/0xa);if(_0x5e582a===_0x64265b)break;else _0xbe1a00['push'](_0xbe1a00['shift']());}catch(_0x4a7f10){_0xbe1a00['push'](_0xbe1a00['shift']());}}}(a54_0x1410,0xcd680));import{createRuntimeAppRole}from'../../core/api-client.js';function a54_0x25a0(_0xce5f9,_0x4d11a0){_0xce5f9=_0xce5f9-0x17d;const _0x141052=a54_0x1410();let _0x25a07c=_0x141052[_0xce5f9];return _0x25a07c;}import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';function a54_0x1410(){const _0xf05e27=['7227366wNGspK','Create\x20a\x20runtime\x20CUSTOM\x20role','description','1929MNBIbK','high-risk-write','20BEiAOz','400zfAufJ','Role\x20name','str','2152VeaRaG','9070443hQHpWX','body','2116120vlJnQk','string','Preview:\x20create\x20a\x20runtime\x20CUSTOM\x20role','create','build','remark','trim','name','195916puPlgR','Creates\x20a\x20custom\x20role\x20in\x20the\x20current\x20runtime\x20app.\x20After\x20creation\x20it\x20can\x20be\x20used\x20for\x20member\x20and\x20resource\x20permissions.','role','635553PnUDcX','--name\x20must\x20not\x20be\x20blank.','533256jiNwJe','/client/permit/role/create','validation','POST'];a54_0x1410=function(){return _0xf05e27;};return a54_0x1410();}import{projectRuntimeRole,readOptionalRuntimeRoleCode,ROLE_CODE_FLAG,runtimeRoleWriteResult}from'../../commands/role/shared.js';function input(_0x3d9a4c){const _0x185fee=a54_0x25a0,_0x3e67a2=_0x3d9a4c[_0x185fee(0x18a)](_0x185fee(0x195))[_0x185fee(0x194)]();if(!_0x3e67a2)throw CliErrors[_0x185fee(0x180)](_0x185fee(0x17d));const _0x161deb=_0x3d9a4c[_0x185fee(0x18a)]('remark')[_0x185fee(0x194)](),_0x442232=readOptionalRuntimeRoleCode(_0x3d9a4c);return{'appCode':_0x3d9a4c['appCode'],'roleName':_0x3e67a2,..._0x442232?{'roleCode':_0x442232}:{},..._0x161deb?{'remark':_0x161deb}:{}};}export const roleCreate={'service':a54_0x1ceae6(0x198),'command':a54_0x1ceae6(0x191),'description':a54_0x1ceae6(0x183),'risk':a54_0x1ceae6(0x186),'confirmationDescription':a54_0x1ceae6(0x197),'flags':[{'name':a54_0x1ceae6(0x195),'type':a54_0x1ceae6(0x18f),'required':!![],'description':a54_0x1ceae6(0x189)},ROLE_CODE_FLAG,{'name':a54_0x1ceae6(0x193),'type':a54_0x1ceae6(0x18f),'description':'Optional\x20role\x20remark'}],async 'validate'(_0x1d1e1c){input(_0x1d1e1c);},async 'dryRun'(_0x41f2eb){const _0x300bb6=a54_0x1ceae6;return dryRun(_0x300bb6(0x181),'/client/permit/role/create')[_0x300bb6(0x18d)]({'roleType':'CUSTOM',...input(_0x41f2eb)})[_0x300bb6(0x184)](_0x300bb6(0x190))[_0x300bb6(0x192)]();},async 'execute'(_0x31cd87){const _0xed0f5f=a54_0x1ceae6,_0x1b67fa=await createRuntimeAppRole(input(_0x31cd87));return{'ok':!![],'data':runtimeRoleWriteResult(_0xed0f5f(0x191),{'roleId':_0x1b67fa['id']},null,projectRuntimeRole(_0x1b67fa),{'method':_0xed0f5f(0x181),'path':_0xed0f5f(0x17f)})};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a55_0x45d875=a55_0x6e7a;function a55_0x1a0c(){const _0x23fc6=['Delete\x20a\x20runtime\x20CUSTOM\x20role','105TfxrnT','Deletes\x20the\x20custom\x20role\x20in\x20the\x20current\x20runtime\x20app.\x20Membership\x20and\x20permission\x20config\x20for\x20that\x20role\x20may\x20become\x20invalid.','14968LITmfi','/client/permit/role/delete','10458UGLnmI','721683OLMqWG','110lbgzSP','body','appCode','5tbMxyZ','1088LFrAXv','3534AzSdcY','delete','7hapytx','POST','role','143ZgatJI','12754rhpAqY','Preview:\x20delete\x20a\x20runtime\x20CUSTOM\x20role','228612SSVtzB','num','51601CNKxxP'];a55_0x1a0c=function(){return _0x23fc6;};return a55_0x1a0c();}(function(_0x532e2e,_0x523117){const _0x4c05f2=a55_0x6e7a,_0x3e4d39=_0x532e2e();while(!![]){try{const _0xda812f=parseInt(_0x4c05f2(0x1c4))/0x1*(-parseInt(_0x4c05f2(0x1c8))/0x2)+-parseInt(_0x4c05f2(0x1d3))/0x3+parseInt(_0x4c05f2(0x1d0))/0x4*(-parseInt(_0x4c05f2(0x1d7))/0x5)+parseInt(_0x4c05f2(0x1c2))/0x6*(-parseInt(_0x4c05f2(0x1ce))/0x7)+-parseInt(_0x4c05f2(0x1d8))/0x8*(-parseInt(_0x4c05f2(0x1d2))/0x9)+-parseInt(_0x4c05f2(0x1d4))/0xa*(-parseInt(_0x4c05f2(0x1cc))/0xb)+parseInt(_0x4c05f2(0x1ca))/0xc*(parseInt(_0x4c05f2(0x1c7))/0xd);if(_0xda812f===_0x523117)break;else _0x3e4d39['push'](_0x3e4d39['shift']());}catch(_0x39dc86){_0x3e4d39['push'](_0x3e4d39['shift']());}}}(a55_0x1a0c,0x1da49));import{deleteRuntimeAppRole}from'../../core/api-client.js';import{dryRun}from'../../framework/dryrun.js';function a55_0x6e7a(_0xb69a58,_0x152134){_0xb69a58=_0xb69a58-0x1c2;const _0x1a0c0a=a55_0x1a0c();let _0x6e7af3=_0x1a0c0a[_0xb69a58];return _0x6e7af3;}import{assertCustomRuntimeRole,getRuntimeRoleById,projectRuntimeRole,ROLE_ID_FLAG,runtimeRoleWriteResult}from'../../commands/role/shared.js';async function prepare(_0x566366){const _0x424d76=a55_0x6e7a,_0x382fec=await getRuntimeRoleById(_0x566366[_0x424d76(0x1d6)],_0x566366[_0x424d76(0x1cb)]('id'));return assertCustomRuntimeRole(_0x382fec,'delete'),_0x382fec;}export const roleDelete={'service':a55_0x45d875(0x1c6),'command':a55_0x45d875(0x1c3),'description':a55_0x45d875(0x1cd),'risk':'high-risk-write','confirmationDescription':a55_0x45d875(0x1cf),'flags':[ROLE_ID_FLAG],async 'dryRun'(_0x18b799){const _0x15baa5=a55_0x45d875,_0x130170=await prepare(_0x18b799);return dryRun(_0x15baa5(0x1c5),_0x15baa5(0x1d1))[_0x15baa5(0x1d5)]({'id':_0x130170['id']})['description'](_0x15baa5(0x1c9))['build']();},async 'execute'(_0x20c8bb){const _0x1673b2=a55_0x45d875,_0x3355ce=await prepare(_0x20c8bb);return await deleteRuntimeAppRole(_0x3355ce['id']),{'ok':!![],'data':runtimeRoleWriteResult(_0x1673b2(0x1c3),{'roleId':_0x3355ce['id']},projectRuntimeRole(_0x3355ce),null,{'method':_0x1673b2(0x1c5),'path':_0x1673b2(0x1d1)})};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a56_0x3761(){const _0x458b23=['2440770LWPDbs','28UQXyVz','805600oCmSaw','appCode','num','role','851342BRhKkJ','read','9dSAaJk','165715edJxxN','370471CjODWp','1920970eBrpBu','11577ULaLwF','7UdoEkM','runtime'];a56_0x3761=function(){return _0x458b23;};return a56_0x3761();}function a56_0x1793(_0x8013ae,_0xbfd834){_0x8013ae=_0x8013ae-0x10d;const _0x376187=a56_0x3761();let _0x1793e5=_0x376187[_0x8013ae];return _0x1793e5;}const a56_0x5de456=a56_0x1793;(function(_0xc8a9ac,_0x2ca068){const _0x2dfa30=a56_0x1793,_0x4951a1=_0xc8a9ac();while(!![]){try{const _0x5a1ebb=parseInt(_0x2dfa30(0x115))/0x1+parseInt(_0x2dfa30(0x111))/0x2+parseInt(_0x2dfa30(0x117))/0x3*(-parseInt(_0x2dfa30(0x11b))/0x4)+-parseInt(_0x2dfa30(0x114))/0x5+-parseInt(_0x2dfa30(0x11a))/0x6*(parseInt(_0x2dfa30(0x118))/0x7)+parseInt(_0x2dfa30(0x10d))/0x8+-parseInt(_0x2dfa30(0x113))/0x9*(parseInt(_0x2dfa30(0x116))/0xa);if(_0x5a1ebb===_0x2ca068)break;else _0x4951a1['push'](_0x4951a1['shift']());}catch(_0x52e318){_0x4951a1['push'](_0x4951a1['shift']());}}}(a56_0x3761,0x3a0e2));import{getRuntimeRoleById,projectRuntimeRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';export const roleDetail={'service':a56_0x5de456(0x110),'command':'detail','description':'Show\x20one\x20runtime\x20role\x20by\x20ID','risk':a56_0x5de456(0x112),'flags':[ROLE_ID_FLAG],async 'execute'(_0x4dfd85){const _0x53d6e1=a56_0x5de456,_0x17ad19=await getRuntimeRoleById(_0x4dfd85[_0x53d6e1(0x10e)],_0x4dfd85[_0x53d6e1(0x10f)]('id'));return{'ok':!![],'data':{'scope':_0x53d6e1(0x119),'role':projectRuntimeRole(_0x17ad19)}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x204d82,_0x27163f){const _0x467096=a57_0x2c76,_0xc35d6d=_0x204d82();while(!![]){try{const _0x26091c=parseInt(_0x467096(0x119))/0x1*(-parseInt(_0x467096(0x10f))/0x2)+parseInt(_0x467096(0x116))/0x3*(-parseInt(_0x467096(0x118))/0x4)+parseInt(_0x467096(0x112))/0x5*(-parseInt(_0x467096(0x10d))/0x6)+-parseInt(_0x467096(0x113))/0x7*(-parseInt(_0x467096(0x110))/0x8)+-parseInt(_0x467096(0x117))/0x9*(-parseInt(_0x467096(0x114))/0xa)+-parseInt(_0x467096(0x10e))/0xb*(-parseInt(_0x467096(0x111))/0xc)+parseInt(_0x467096(0x115))/0xd;if(_0x26091c===_0x27163f)break;else _0xc35d6d['push'](_0xc35d6d['shift']());}catch(_0x354da9){_0xc35d6d['push'](_0xc35d6d['shift']());}}}(a57_0x4a8b,0xeee7b));import{roleList}from'../../commands/role/list.js';import{roleDetail}from'../../commands/role/detail.js';function a57_0x2c76(_0x3b4f07,_0x45ab6c){_0x3b4f07=_0x3b4f07-0x10d;const _0x4a8ba6=a57_0x4a8b();let _0x2c767e=_0x4a8ba6[_0x3b4f07];return _0x2c767e;}import{roleCreate}from'../../commands/role/create.js';function a57_0x4a8b(){const _0x4ac334=['25604865KXtvai','6zoDUxb','3375gFHmZc','3849784OYEOJc','1XZaTIM','19212DOTiwK','55nYLFoz','3309810ceEWyR','1232680ijLDnk','521292wsNlYM','545FLbZmU','77ZEJZcd','27350PaGToY'];a57_0x4a8b=function(){return _0x4ac334;};return a57_0x4a8b();}import{roleUpdate}from'../../commands/role/update.js';import{roleDelete}from'../../commands/role/delete.js';import{roleUserAdd}from'../../commands/role/user-add.js';import{roleUserRemove}from'../../commands/role/user-remove.js';export const roleDefinitions=[roleList,roleDetail,roleCreate,roleUpdate,roleDelete,roleUserAdd,roleUserRemove];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a58_0x47a3(_0x4d03c8,_0x168508){_0x4d03c8=_0x4d03c8-0x7b;const _0x7c0f4b=a58_0x7c0f();let _0x47a340=_0x7c0f4b[_0x4d03c8];return _0x47a340;}const a58_0x8cc7c5=a58_0x47a3;(function(_0x1e52a8,_0xa2912){const _0x19bfae=a58_0x47a3,_0x1279b2=_0x1e52a8();while(!![]){try{const _0x3e3832=-parseInt(_0x19bfae(0x95))/0x1*(parseInt(_0x19bfae(0xa1))/0x2)+parseInt(_0x19bfae(0x98))/0x3*(-parseInt(_0x19bfae(0x96))/0x4)+parseInt(_0x19bfae(0x9d))/0x5+-parseInt(_0x19bfae(0x9a))/0x6+parseInt(_0x19bfae(0x84))/0x7+parseInt(_0x19bfae(0x7c))/0x8*(-parseInt(_0x19bfae(0x97))/0x9)+parseInt(_0x19bfae(0x90))/0xa;if(_0x3e3832===_0xa2912)break;else _0x1279b2['push'](_0x1279b2['shift']());}catch(_0x4b9f6e){_0x1279b2['push'](_0x1279b2['shift']());}}}(a58_0x7c0f,0xc9f93));import{listRuntimeAppRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{listAllRuntimeRoles,projectRuntimeRole,RUNTIME_ROLE_TYPES}from'../../commands/role/shared.js';function a58_0x7c0f(){const _0x3b7b66=['Fuzzy\x20role-name\x20filter','num','--page\x20must\x20be\x20a\x20positive\x20integer.','filter','28971910HESdAA','--pagesize\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.','roleType','Invalid\x20runtime\x20role\x20type:\x20','List\x20runtime\x20roles\x20for\x20the\x20current\x20app','5138GMLQPH','27212kQmdut','1737LVvmcB','438uSVrSH','items','5786718DfUnEi','includes','string','6390395iHxBmw','name','str','pagesize','494kNHeJE','role','runtime','isSafeInteger','40280LJmCmJ','read','appCode','map','toUpperCase','slice','list','length','5953815WLIuDz','type','paging','validation','number','page','Page\x20number','Page\x20size\x20from\x201\x20to\x20100'];a58_0x7c0f=function(){return _0x3b7b66;};return a58_0x7c0f();}export const roleList={'service':a58_0x8cc7c5(0xa2),'command':a58_0x8cc7c5(0x82),'description':a58_0x8cc7c5(0x94),'risk':a58_0x8cc7c5(0x7d),'flags':[{'name':'type','type':a58_0x8cc7c5(0x9c),'enum':RUNTIME_ROLE_TYPES,'description':'Runtime\x20role\x20type'},{'name':a58_0x8cc7c5(0x9e),'type':a58_0x8cc7c5(0x9c),'description':a58_0x8cc7c5(0x8c)},{'name':a58_0x8cc7c5(0x89),'type':a58_0x8cc7c5(0x88),'default':0x1,'description':a58_0x8cc7c5(0x8a)},{'name':a58_0x8cc7c5(0xa0),'type':a58_0x8cc7c5(0x88),'default':0x64,'description':a58_0x8cc7c5(0x8b)}],async 'validate'(_0x4e1a60){const _0x5046f8=a58_0x8cc7c5,_0xb4c4d3=_0x4e1a60[_0x5046f8(0x9f)](_0x5046f8(0x85))[_0x5046f8(0x80)]();if(_0xb4c4d3&&!RUNTIME_ROLE_TYPES[_0x5046f8(0x9b)](_0xb4c4d3))throw CliErrors[_0x5046f8(0x87)](_0x5046f8(0x93)+_0xb4c4d3+'.');const _0x20f69e=_0x4e1a60[_0x5046f8(0x8d)]('page',0x1),_0xd04b97=_0x4e1a60[_0x5046f8(0x8d)](_0x5046f8(0xa0),0x64);if(!Number[_0x5046f8(0x7b)](_0x20f69e)||_0x20f69e<0x1)throw CliErrors[_0x5046f8(0x87)](_0x5046f8(0x8e));if(!Number[_0x5046f8(0x7b)](_0xd04b97)||_0xd04b97<0x1||_0xd04b97>0x64)throw CliErrors[_0x5046f8(0x87)](_0x5046f8(0x91));},async 'execute'(_0x5758df){const _0x3aaa36=a58_0x8cc7c5,_0x486ff9=_0x5758df[_0x3aaa36(0x9f)](_0x3aaa36(0x85))['toUpperCase'](),_0xf8e3bf=_0x5758df['str'](_0x3aaa36(0x9e))['trim'](),_0x30c54d=_0x5758df['num']('page',0x1),_0x1af07f=_0x5758df[_0x3aaa36(0x8d)](_0x3aaa36(0xa0),0x64);if(_0x486ff9){const _0x266a99=(await listAllRuntimeRoles(_0x5758df[_0x3aaa36(0x7e)],{..._0xf8e3bf?{'roleName':_0xf8e3bf}:{}}))[_0x3aaa36(0x8f)](_0x5dccc1=>_0x5dccc1[_0x3aaa36(0x92)]===_0x486ff9),_0x176b74=(_0x30c54d-0x1)*_0x1af07f;return{'ok':!![],'data':{'scope':_0x3aaa36(0xa3),'roles':_0x266a99[_0x3aaa36(0x81)](_0x176b74,_0x176b74+_0x1af07f)[_0x3aaa36(0x7f)](projectRuntimeRole),'paging':{'currentPage':_0x30c54d,'pageSize':_0x1af07f,'totalCount':_0x266a99[_0x3aaa36(0x83)]}}};}const _0x1cfc6c=await listRuntimeAppRoles(_0x5758df[_0x3aaa36(0x7e)],{..._0xf8e3bf?{'roleName':_0xf8e3bf}:{},'currentPage':_0x30c54d,'pageSize':_0x1af07f});return{'ok':!![],'data':{'scope':_0x3aaa36(0xa3),'roles':_0x1cfc6c[_0x3aaa36(0x99)][_0x3aaa36(0x7f)](projectRuntimeRole),'paging':_0x1cfc6c[_0x3aaa36(0x86)]}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a59_0x34490e=a59_0x2fed;(function(_0x32c0a4,_0x345c95){const _0x584bdb=a59_0x2fed,_0x9f1649=_0x32c0a4();while(!![]){try{const _0x4270d2=parseInt(_0x584bdb(0x194))/0x1+-parseInt(_0x584bdb(0x1a3))/0x2+parseInt(_0x584bdb(0x1a7))/0x3+parseInt(_0x584bdb(0x188))/0x4+parseInt(_0x584bdb(0x19a))/0x5*(-parseInt(_0x584bdb(0x16e))/0x6)+parseInt(_0x584bdb(0x193))/0x7+parseInt(_0x584bdb(0x162))/0x8*(-parseInt(_0x584bdb(0x16a))/0x9);if(_0x4270d2===_0x345c95)break;else _0x9f1649['push'](_0x9f1649['shift']());}catch(_0x52b620){_0x9f1649['push'](_0x9f1649['shift']());}}}(a59_0x358e,0x50a7a));import{listRuntimeAppUsers,listRuntimeAppRoles,listRuntimeRoleUsers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{normalizeRuntimeUserId}from'../../utils/runtime-user-id.js';export const RUNTIME_ROLE_TYPES=['ADMIN','USER','OWNER',a59_0x34490e(0x184)];const BUILTIN_ROLE_TYPES=[a59_0x34490e(0x16d),a59_0x34490e(0x19b),a59_0x34490e(0x1a5)];export const ROLE_ID_FLAG={'name':'id','type':a59_0x34490e(0x164),'required':!![],'description':a59_0x34490e(0x169)};export const ROLE_REF_FLAG={'name':'role','type':'string','required':!![],'description':'Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name'};export const ROLE_CODE_FLAG={'name':a59_0x34490e(0x1ad),'type':a59_0x34490e(0x1a1),'description':a59_0x34490e(0x16c)};function a59_0x2fed(_0x282e8e,_0x4a8a0f){_0x282e8e=_0x282e8e-0x162;const _0x358e9a=a59_0x358e();let _0x2fed34=_0x358e9a[_0x282e8e];return _0x2fed34;}export const USER_ID_FLAG={'name':a59_0x34490e(0x187),'type':a59_0x34490e(0x1a1),'required':!![],'description':a59_0x34490e(0x173)};function a59_0x358e(){const _0x566430=['expect-user-count','Pass\x20--role\x20<id|name>.','roleName','string','trim','250268HLpBOO','Run\x20`lovrabet\x20role\x20list`\x20or\x20pass\x20--role\x20<id>.','OWNER','filter','999633NbVPqX','map','flag','userCount','role','items','role-code','99336gmLfGA','userName','number','isSafeInteger','roleType','permitCount','Missing\x20runtime\x20role\x20reference.','Runtime\x20role\x20ID\x20returned\x20by\x20role\x20list','171XjONmg','Runtime\x20role\x20name\x20\x22','Globally\x20unique\x20roleCode\x20(maximum\x2064\x20characters)','ADMIN','24lbhTvb','Invalid\x20runtime\x20userId.','Role\x20ID\x20must\x20be\x20a\x20positive\x20integer.','paging','appCode','Runtime\x20userId\x20(string)','--role-code\x20cannot\x20exceed\x2064\x20characters.','\x20built-in\x20runtime\x20role\x20','length','Runtime\x20user\x20','roleCode','Cannot\x20','validation','\x20was\x20not\x20found\x20in\x20app\x20','Runtime\x20role\x20member\x20has\x20an\x20invalid\x20userId.','OWNER\x20runtime\x20role\x20membership\x20cannot\x20be\x20changed\x20with\x20this\x20command.','Transfer\x20or\x20manage\x20application\x20ownership\x20through\x20the\x20dedicated\x20application\x20workflow.','userList','Runtime\x20role\x20has\x20an\x20invalid\x20ID;\x20reload\x20roles\x20before\x20writing.','Runtime\x20role\x20','Use\x20a\x20userId\x20returned\x20by\x20the\x20current\x20application\x27s\x20personnel\x20list.','num','CUSTOM','Pass\x20one\x20role\x20ID:\x20','Run\x20`lovrabet\x20role\x20list`\x20and\x20use\x20a\x20role\x20from\x20the\x20current\x20app.','user','2399188WODOkE','userId','totalCount','find','user-add','Only\x20CUSTOM\x20runtime\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','str','\x22\x20is\x20ambiguous.','push','User\x20','applyUserList','992894PQmWUb','39357HiwPQL','--role-code\x20must\x20not\x20be\x20blank.','Reload\x20the\x20role\x20list\x20and\x20retry\x20after\x20the\x20server\x20state\x20is\x20consistent.','\x20is\x20not\x20in\x20runtime\x20role\x20','Reject\x20when\x20the\x20target\x20role\x20member\x20count\x20has\x20changed','includes','528485HnEmZZ','USER','Runtime\x20role\x20member\x20snapshot\x20has\x20an\x20invalid\x20role\x20ID;\x20reload\x20before\x20writing.','join'];a59_0x358e=function(){return _0x566430;};return a59_0x358e();}export const EXPECT_USER_COUNT_FLAG={'name':a59_0x34490e(0x19e),'type':a59_0x34490e(0x164),'description':a59_0x34490e(0x198)};export function isBuiltinRuntimeRole(_0x498237){const _0x301caf=a59_0x34490e;return BUILTIN_ROLE_TYPES[_0x301caf(0x199)](_0x498237);}export function assertCustomRuntimeRole(_0x2b43b7,_0x5f22bc){const _0x12594b=a59_0x34490e;if(_0x2b43b7['roleType']!==_0x12594b(0x184))throw CliErrors[_0x12594b(0x17a)](_0x12594b(0x179)+_0x5f22bc+_0x12594b(0x175)+_0x2b43b7['roleName']+'\x20('+_0x2b43b7[_0x12594b(0x166)]+').',_0x12594b(0x18d));}export function projectRuntimeRole(_0xcf236f){const _0x4fbbf2=a59_0x34490e;return{'id':_0xcf236f['id'],'roleCode':_0xcf236f[_0x4fbbf2(0x178)],'roleName':_0xcf236f[_0x4fbbf2(0x1a0)],'roleType':_0xcf236f[_0x4fbbf2(0x166)],'remark':_0xcf236f['remark'],'userCount':_0xcf236f[_0x4fbbf2(0x1aa)]??0x0,'permitCount':_0xcf236f[_0x4fbbf2(0x167)]??0x0,'builtin':isBuiltinRuntimeRole(_0xcf236f[_0x4fbbf2(0x166)])};}export function readOptionalRuntimeRoleCode(_0x21e0b3){const _0x4cfc02=a59_0x34490e,_0x9698b4=_0x21e0b3[_0x4cfc02(0x1a9)](_0x4cfc02(0x1ad));if(_0x9698b4===undefined||_0x9698b4===null)return undefined;const _0xd9ba87=String(_0x9698b4)['trim']();if(!_0xd9ba87)throw CliErrors[_0x4cfc02(0x17a)](_0x4cfc02(0x195));if(_0xd9ba87[_0x4cfc02(0x176)]>0x40)throw CliErrors['validation'](_0x4cfc02(0x174));return _0xd9ba87;}export async function getRuntimeRoleById(_0x3721bd,_0x228b98){const _0x49ba19=a59_0x34490e;if(!Number['isSafeInteger'](_0x228b98)||_0x228b98<=0x0)throw CliErrors[_0x49ba19(0x17a)](_0x49ba19(0x170));const _0xb092b4=(await listAllRuntimeRoles(_0x3721bd))[_0x49ba19(0x1a6)](_0x5d99ac=>_0x5d99ac['id']===_0x228b98&&(!_0x5d99ac['appCode']||_0x5d99ac[_0x49ba19(0x172)]===_0x3721bd));if(_0xb092b4[_0x49ba19(0x176)]!==0x1)throw CliErrors[_0x49ba19(0x17a)]('Runtime\x20role\x20id\x20'+_0x228b98+'\x20was\x20not\x20found\x20in\x20app\x20'+_0x3721bd+'.',_0x49ba19(0x186));const _0x36656a=_0xb092b4[0x0],_0x30f1dd=_0x36656a['id'];if(typeof _0x30f1dd!==_0x49ba19(0x164)||!Number[_0x49ba19(0x165)](_0x30f1dd)||_0x30f1dd<=0x0)throw CliErrors[_0x49ba19(0x17a)](_0x49ba19(0x180));return{..._0x36656a,'id':_0x30f1dd};}export async function listAllRuntimeRoles(_0x4db8bf,_0x6145e0={}){const _0x31553d=a59_0x34490e,_0x3130d9=0x64,_0x53ebf6=[];for(let _0x1f4fbe=0x1;;_0x1f4fbe+=0x1){const _0x24d6a7=await listRuntimeAppRoles(_0x4db8bf,{..._0x6145e0[_0x31553d(0x1a0)]?{'roleName':_0x6145e0['roleName']}:{},'currentPage':_0x1f4fbe,'pageSize':_0x3130d9});_0x53ebf6[_0x31553d(0x190)](..._0x24d6a7[_0x31553d(0x1ac)]);if(_0x24d6a7[_0x31553d(0x1ac)][_0x31553d(0x176)]<_0x3130d9||_0x24d6a7[_0x31553d(0x171)]&&_0x53ebf6[_0x31553d(0x176)]>=_0x24d6a7['paging'][_0x31553d(0x18a)])return _0x53ebf6;}}export async function resolveRuntimeRoleRef(_0x1ef94a,_0x572194){const _0x4107f0=a59_0x34490e,_0x195b9f=_0x572194['trim']();if(!_0x195b9f)throw CliErrors['validation'](_0x4107f0(0x168),_0x4107f0(0x19f));if(/^\d+$/['test'](_0x195b9f))return getRuntimeRoleById(_0x1ef94a,Number(_0x195b9f));const _0x31b681=(await listAllRuntimeRoles(_0x1ef94a))['filter'](_0x8a81e5=>_0x8a81e5['roleName']===_0x195b9f);if(_0x31b681['length']===0x0)throw CliErrors[_0x4107f0(0x17a)](_0x4107f0(0x16b)+_0x195b9f+'\x22\x20was\x20not\x20found\x20in\x20app\x20'+_0x1ef94a+'.',_0x4107f0(0x1a4));if(_0x31b681['length']>0x1)throw CliErrors['validation'](_0x4107f0(0x16b)+_0x195b9f+_0x4107f0(0x18f),_0x4107f0(0x185)+_0x31b681[_0x4107f0(0x1a8)](_0x546a05=>_0x546a05['id'])[_0x4107f0(0x19d)](',\x20')+'.');const _0x4db522=_0x31b681[0x0],_0x46b430=_0x4db522['id'];if(typeof _0x46b430!==_0x4107f0(0x164)||!Number[_0x4107f0(0x165)](_0x46b430)||_0x46b430<=0x0)throw CliErrors['validation'](_0x4107f0(0x180));return{..._0x4db522,'id':_0x46b430};}function parseRuntimeUserId(_0x55f6b3){const _0x4b46b1=a59_0x34490e,_0xd67f76=_0x55f6b3['trim'](),_0x1d81bf=normalizeRuntimeUserId(_0xd67f76);if(_0x1d81bf===undefined)throw CliErrors[_0x4b46b1(0x17a)](_0x4b46b1(0x16f),'Pass\x20--user\x20<userId>;\x20name\x20and\x20account\x20lookup\x20are\x20not\x20available\x20in\x20runtime\x20scope.');return _0x1d81bf;}export async function prepareRuntimeMemberMutation(_0x32e709,_0x10824a){const _0x58d311=a59_0x34490e,_0x43feec=await resolveRuntimeRoleRef(_0x32e709[_0x58d311(0x172)],_0x32e709[_0x58d311(0x18e)](_0x58d311(0x1ab)));if(_0x43feec[_0x58d311(0x166)]==='OWNER')throw CliErrors[_0x58d311(0x17a)](_0x58d311(0x17d),_0x58d311(0x17e));const _0x4c5d48=parseRuntimeUserId(_0x32e709[_0x58d311(0x18e)](_0x58d311(0x187))),_0x1bbd19=(await listRuntimeRoleUsers(_0x32e709[_0x58d311(0x172)]))[_0x58d311(0x1a8)](_0x40843b=>{const _0x4a3107=_0x58d311;if(typeof _0x40843b['id']!==_0x4a3107(0x164)||!Number['isSafeInteger'](_0x40843b['id'])||_0x40843b['id']<=0x0)throw CliErrors[_0x4a3107(0x17a)](_0x4a3107(0x19c));return{..._0x40843b,'userList':[..._0x40843b[_0x4a3107(0x17f)]??[]],'applyUserList':[..._0x40843b[_0x4a3107(0x192)]??[]]};}),_0x4d7844=_0x1bbd19[_0x58d311(0x18b)](_0x4161dc=>_0x4161dc['id']===_0x43feec['id']);if(!_0x4d7844)throw CliErrors[_0x58d311(0x17a)](_0x58d311(0x181)+_0x43feec['id']+'\x20is\x20missing\x20from\x20the\x20grouped\x20member\x20snapshot.',_0x58d311(0x196));const _0x5272fd=_0x380d73=>{const _0x3a5cd9=_0x58d311,_0x90e7e5=normalizeRuntimeUserId(_0x380d73);if(_0x90e7e5===undefined)throw CliErrors[_0x3a5cd9(0x17a)](_0x3a5cd9(0x17c));return _0x90e7e5;},_0xad39ad=_0x4d7844[_0x58d311(0x17f)][_0x58d311(0x1a8)](_0x3cd138=>_0x5272fd(_0x3cd138['userId'])),_0x52ba04=_0x32e709[_0x58d311(0x1a9)]('expect-user-count');if(_0x52ba04!==undefined&&_0x52ba04!==null&&_0x52ba04!==''){const _0x362bbe=_0x32e709[_0x58d311(0x183)](_0x58d311(0x19e));if(!Number[_0x58d311(0x165)](_0x362bbe)||_0x362bbe<0x0)throw CliErrors[_0x58d311(0x17a)]('--expect-user-count\x20must\x20be\x20a\x20non-negative\x20integer.');if(_0xad39ad[_0x58d311(0x176)]!==_0x362bbe)throw CliErrors[_0x58d311(0x17a)]('Runtime\x20role\x20member\x20count\x20changed:\x20expected\x20'+_0x362bbe+',\x20found\x20'+_0xad39ad[_0x58d311(0x176)]+'.','Read\x20the\x20current\x20members\x20and\x20retry\x20with\x20the\x20new\x20expected\x20count.');}const _0x14e634=_0xad39ad[_0x58d311(0x199)](_0x4c5d48),_0x392480=[];let _0x31ca19=!![];if(_0x10824a===_0x58d311(0x18c)){const _0x4ac3db=await listRuntimeAppUsers(_0x32e709[_0x58d311(0x172)]),_0x499c65=_0x4ac3db[_0x58d311(0x1a6)](_0x46e3e5=>normalizeRuntimeUserId(_0x46e3e5['code'])===_0x4c5d48);if(_0x499c65[_0x58d311(0x176)]!==0x1||!_0x499c65[0x0]['userName']?.[_0x58d311(0x1a2)]())throw CliErrors[_0x58d311(0x17a)](_0x58d311(0x177)+_0x4c5d48+_0x58d311(0x17b)+_0x32e709['appCode']+'.',_0x58d311(0x182));_0x14e634?(_0x31ca19=![],_0x392480[_0x58d311(0x190)]('User\x20'+_0x4c5d48+'\x20is\x20already\x20in\x20runtime\x20role\x20'+_0x43feec['id']+'.')):_0x4d7844[_0x58d311(0x17f)][_0x58d311(0x190)]({'userId':_0x4c5d48,'username':_0x499c65[0x0][_0x58d311(0x163)]});}else!_0x14e634?(_0x31ca19=![],_0x392480[_0x58d311(0x190)](_0x58d311(0x191)+_0x4c5d48+_0x58d311(0x197)+_0x43feec['id']+'.')):_0x4d7844['userList']=_0x4d7844[_0x58d311(0x17f)][_0x58d311(0x1a6)](_0x8edf09=>_0x5272fd(_0x8edf09[_0x58d311(0x189)])!==_0x4c5d48);return{'role':_0x43feec,'userId':_0x4c5d48,'roleList':_0x1bbd19,'before':{'userIds':_0xad39ad},'after':{'userIds':_0x4d7844[_0x58d311(0x17f)][_0x58d311(0x1a8)](_0x103b8f=>_0x5272fd(_0x103b8f[_0x58d311(0x189)]))},'shouldWrite':_0x31ca19,'warnings':_0x392480};}export function runtimeRoleWriteResult(_0x37fbc0,_0x4bb322,_0x50f0dd,_0x523006,_0x15b121,_0x2ba718=[]){return{'operation':_0x37fbc0,'scope':'runtime','selector':_0x4bb322,'before':_0x50f0dd,'after':_0x523006,'dryRun':![],'backend':_0x15b121,'warnings':_0x2ba718};}
|
|
1
|
+
const a59_0x53234a=a59_0x1ed1;(function(_0x58b0a,_0x270c02){const _0x2dc229=a59_0x1ed1,_0x51ec4b=_0x58b0a();while(!![]){try{const _0x1cc4a=-parseInt(_0x2dc229(0xe3))/0x1*(parseInt(_0x2dc229(0xee))/0x2)+parseInt(_0x2dc229(0xc7))/0x3*(-parseInt(_0x2dc229(0xb7))/0x4)+-parseInt(_0x2dc229(0xf3))/0x5*(parseInt(_0x2dc229(0xe7))/0x6)+-parseInt(_0x2dc229(0xbf))/0x7*(parseInt(_0x2dc229(0xd5))/0x8)+parseInt(_0x2dc229(0xb2))/0x9+-parseInt(_0x2dc229(0xd2))/0xa*(-parseInt(_0x2dc229(0xd3))/0xb)+parseInt(_0x2dc229(0xe6))/0xc;if(_0x1cc4a===_0x270c02)break;else _0x51ec4b['push'](_0x51ec4b['shift']());}catch(_0x5f2b11){_0x51ec4b['push'](_0x51ec4b['shift']());}}}(a59_0x5d6d,0x2e172));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_0x53234a(0xa6),a59_0x53234a(0xda),a59_0x53234a(0xd0),a59_0x53234a(0xbc)];const BUILTIN_ROLE_TYPES=[a59_0x53234a(0xa6),a59_0x53234a(0xda),a59_0x53234a(0xd0)];export const ROLE_ID_FLAG={'name':'id','type':a59_0x53234a(0xb6),'required':!![],'description':a59_0x53234a(0xed)};export const ROLE_REF_FLAG={'name':a59_0x53234a(0xd6),'type':a59_0x53234a(0xd9),'required':!![],'description':a59_0x53234a(0xbd)};export const ROLE_CODE_FLAG={'name':a59_0x53234a(0xba),'type':a59_0x53234a(0xd9),'description':a59_0x53234a(0xc5)};export const USER_ID_FLAG={'name':a59_0x53234a(0xc8),'type':'string','required':!![],'description':a59_0x53234a(0xb5)};export const EXPECT_USER_COUNT_FLAG={'name':a59_0x53234a(0xf1),'type':a59_0x53234a(0xb6),'description':a59_0x53234a(0xe0)};function a59_0x1ed1(_0x58431b,_0x42a206){_0x58431b=_0x58431b-0xa6;const _0x5d6d1c=a59_0x5d6d();let _0x1ed1b9=_0x5d6d1c[_0x58431b];return _0x1ed1b9;}export function isBuiltinRuntimeRole(_0x2e1f89){const _0x4298b0=a59_0x53234a;return BUILTIN_ROLE_TYPES[_0x4298b0(0xa9)](_0x2e1f89);}export function assertCustomRuntimeRole(_0x3e8a63,_0x5f0447){const _0x2529f2=a59_0x53234a;if(_0x3e8a63[_0x2529f2(0xf6)]!=='CUSTOM')throw CliErrors['validation'](_0x2529f2(0xc9)+_0x5f0447+_0x2529f2(0xce)+_0x3e8a63['roleName']+'\x20('+_0x3e8a63[_0x2529f2(0xf6)]+').',_0x2529f2(0xc2));}export function projectRuntimeRole(_0x38b3c0){const _0x2dabd9=a59_0x53234a;return{'id':_0x38b3c0['id'],'roleCode':_0x38b3c0[_0x2dabd9(0xc0)],'roleName':_0x38b3c0[_0x2dabd9(0xc6)],'roleType':_0x38b3c0[_0x2dabd9(0xf6)],'remark':_0x38b3c0[_0x2dabd9(0xe1)],'userCount':_0x38b3c0[_0x2dabd9(0xa8)]??0x0,'permitCount':_0x38b3c0[_0x2dabd9(0xf7)]??0x0,'builtin':isBuiltinRuntimeRole(_0x38b3c0[_0x2dabd9(0xf6)])};}export function readOptionalRuntimeRoleCode(_0x224380){const _0x353978=a59_0x53234a,_0x27b378=_0x224380['flag'](_0x353978(0xba));if(_0x27b378===undefined||_0x27b378===null)return undefined;const _0x998a67=String(_0x27b378)['trim']();if(!_0x998a67)throw CliErrors[_0x353978(0xb4)]('--role-code\x20must\x20not\x20be\x20blank.');if(_0x998a67[_0x353978(0xb9)]>0x40)throw CliErrors[_0x353978(0xb4)]('--role-code\x20cannot\x20exceed\x2064\x20characters.');return _0x998a67;}export async function getRuntimeRoleById(_0x47b769,_0x5dc486){const _0x27c847=a59_0x53234a;if(!Number[_0x27c847(0xf5)](_0x5dc486)||_0x5dc486<=0x0)throw CliErrors[_0x27c847(0xb4)]('Role\x20ID\x20must\x20be\x20a\x20positive\x20integer.');const _0x5afd7a=(await listAllRuntimeRoles(_0x47b769))[_0x27c847(0xb0)](_0x9a97ab=>_0x9a97ab['id']===_0x5dc486&&(!_0x9a97ab[_0x27c847(0xdd)]||_0x9a97ab[_0x27c847(0xdd)]===_0x47b769));if(_0x5afd7a[_0x27c847(0xb9)]!==0x1)throw CliErrors[_0x27c847(0xb4)](_0x27c847(0xa7)+_0x5dc486+_0x27c847(0xcc)+_0x47b769+'.',_0x27c847(0xae));const _0x4369a8=_0x5afd7a[0x0],_0x4f78ea=_0x4369a8['id'];if(typeof _0x4f78ea!==_0x27c847(0xb6)||!Number[_0x27c847(0xf5)](_0x4f78ea)||_0x4f78ea<=0x0)throw CliErrors[_0x27c847(0xb4)](_0x27c847(0xc3));return{..._0x4369a8,'id':_0x4f78ea};}function a59_0x5d6d(){const _0x400b5a=[',\x20found\x20','join','appCode','Runtime\x20role\x20member\x20count\x20changed:\x20expected\x20','Pass\x20--user\x20<userId>;\x20name\x20and\x20account\x20lookup\x20are\x20not\x20available\x20in\x20runtime\x20scope.','Reject\x20when\x20the\x20target\x20role\x20member\x20count\x20has\x20changed','remark','flag','11yiNUrN','trim','test','9040656dkoNUM','542076CJvdzg','Reload\x20the\x20role\x20list\x20and\x20retry\x20after\x20the\x20server\x20state\x20is\x20consistent.','\x20is\x20not\x20in\x20runtime\x20role\x20','Runtime\x20role\x20member\x20snapshot\x20has\x20an\x20invalid\x20role\x20ID;\x20reload\x20before\x20writing.','Transfer\x20or\x20manage\x20application\x20ownership\x20through\x20the\x20dedicated\x20application\x20workflow.','num','Runtime\x20role\x20ID\x20returned\x20by\x20role\x20list','55724GykEtB','userId','str','expect-user-count','paging','10DeSjpC','Runtime\x20role\x20name\x20\x22','isSafeInteger','roleType','permitCount','\x22\x20was\x20not\x20found\x20in\x20app\x20','ADMIN','Runtime\x20role\x20id\x20','userCount','includes','Run\x20`lovrabet\x20role\x20list`\x20or\x20pass\x20--role\x20<id>.','\x22\x20is\x20ambiguous.','map','User\x20','Run\x20`lovrabet\x20role\x20list`\x20and\x20use\x20a\x20role\x20from\x20the\x20current\x20app.','Invalid\x20runtime\x20userId.','filter','Read\x20the\x20current\x20members\x20and\x20retry\x20with\x20the\x20new\x20expected\x20count.','873468NmRGno','totalCount','validation','Runtime\x20userId\x20(string)','number','12NJRiAB','push','length','role-code','Runtime\x20role\x20','CUSTOM','Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name','userName','749077hZAauy','roleCode','items','Only\x20CUSTOM\x20runtime\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','Runtime\x20role\x20has\x20an\x20invalid\x20ID;\x20reload\x20roles\x20before\x20writing.','\x20is\x20already\x20in\x20runtime\x20role\x20','Globally\x20unique\x20roleCode\x20(maximum\x2064\x20characters)','roleName','158328fBBwPy','user','Cannot\x20','Runtime\x20role\x20member\x20has\x20an\x20invalid\x20userId.','OWNER\x20runtime\x20role\x20membership\x20cannot\x20be\x20changed\x20with\x20this\x20command.','\x20was\x20not\x20found\x20in\x20app\x20','userList','\x20built-in\x20runtime\x20role\x20','Use\x20a\x20userId\x20returned\x20by\x20the\x20current\x20application\x27s\x20personnel\x20list.','OWNER','--expect-user-count\x20must\x20be\x20a\x20non-negative\x20integer.','10JmHNtV','3353691OaqwlB','applyUserList','24PDOxWq','role','Runtime\x20user\x20','Pass\x20one\x20role\x20ID:\x20','string','USER'];a59_0x5d6d=function(){return _0x400b5a;};return a59_0x5d6d();}export async function listAllRuntimeRoles(_0x182393,_0x5da12e={}){const _0x5e8916=a59_0x53234a,_0x5d6fc5=0x64,_0x5d92d2=[];for(let _0x396571=0x1;;_0x396571+=0x1){const _0x1d9796=await listRuntimeAppRoles(_0x182393,{..._0x5da12e['roleName']?{'roleName':_0x5da12e[_0x5e8916(0xc6)]}:{},'currentPage':_0x396571,'pageSize':_0x5d6fc5});_0x5d92d2['push'](..._0x1d9796[_0x5e8916(0xc1)]);if(_0x1d9796[_0x5e8916(0xc1)][_0x5e8916(0xb9)]<_0x5d6fc5||_0x1d9796['paging']&&_0x5d92d2[_0x5e8916(0xb9)]>=_0x1d9796[_0x5e8916(0xf2)][_0x5e8916(0xb3)])return _0x5d92d2;}}export async function resolveRuntimeRoleRef(_0x26fc73,_0x485720){const _0x747ae7=a59_0x53234a,_0x37aabf=_0x485720[_0x747ae7(0xe4)]();if(!_0x37aabf)throw CliErrors[_0x747ae7(0xb4)]('Missing\x20runtime\x20role\x20reference.','Pass\x20--role\x20<id|name>.');if(/^\d+$/[_0x747ae7(0xe5)](_0x37aabf))return getRuntimeRoleById(_0x26fc73,Number(_0x37aabf));const _0x5bbfd6=(await listAllRuntimeRoles(_0x26fc73))[_0x747ae7(0xb0)](_0x3f5ff1=>_0x3f5ff1[_0x747ae7(0xc6)]===_0x37aabf);if(_0x5bbfd6[_0x747ae7(0xb9)]===0x0)throw CliErrors[_0x747ae7(0xb4)](_0x747ae7(0xf4)+_0x37aabf+_0x747ae7(0xf8)+_0x26fc73+'.',_0x747ae7(0xaa));if(_0x5bbfd6[_0x747ae7(0xb9)]>0x1)throw CliErrors[_0x747ae7(0xb4)](_0x747ae7(0xf4)+_0x37aabf+_0x747ae7(0xab),_0x747ae7(0xd8)+_0x5bbfd6[_0x747ae7(0xac)](_0x57fc47=>_0x57fc47['id'])[_0x747ae7(0xdc)](',\x20')+'.');const _0x187d95=_0x5bbfd6[0x0],_0x349dd1=_0x187d95['id'];if(typeof _0x349dd1!==_0x747ae7(0xb6)||!Number[_0x747ae7(0xf5)](_0x349dd1)||_0x349dd1<=0x0)throw CliErrors[_0x747ae7(0xb4)](_0x747ae7(0xc3));return{..._0x187d95,'id':_0x349dd1};}function parseRuntimeUserId(_0x84576a){const _0x54f742=a59_0x53234a,_0x50f197=_0x84576a[_0x54f742(0xe4)](),_0x43d712=normalizeRuntimeUserId(_0x50f197);if(_0x43d712===undefined)throw CliErrors[_0x54f742(0xb4)](_0x54f742(0xaf),_0x54f742(0xdf));return _0x43d712;}export async function prepareRuntimeMemberMutation(_0x454248,_0x4a9cee){const _0x112c21=a59_0x53234a,_0x59f479=await resolveRuntimeRoleRef(_0x454248['appCode'],_0x454248[_0x112c21(0xf0)]('role'));if(_0x59f479[_0x112c21(0xf6)]===_0x112c21(0xd0))throw CliErrors['validation'](_0x112c21(0xcb),_0x112c21(0xeb));const _0x807f4c=parseRuntimeUserId(_0x454248[_0x112c21(0xf0)]('user')),_0x2ba681=(await listRuntimeRoleUsers(_0x454248[_0x112c21(0xdd)]))[_0x112c21(0xac)](_0x5cee21=>{const _0x1c102e=_0x112c21;if(typeof _0x5cee21['id']!==_0x1c102e(0xb6)||!Number[_0x1c102e(0xf5)](_0x5cee21['id'])||_0x5cee21['id']<=0x0)throw CliErrors['validation'](_0x1c102e(0xea));return{..._0x5cee21,'userList':[..._0x5cee21[_0x1c102e(0xcd)]??[]],'applyUserList':[..._0x5cee21[_0x1c102e(0xd4)]??[]]};}),_0x5d3b71=_0x2ba681['find'](_0x4e0585=>_0x4e0585['id']===_0x59f479['id']);if(!_0x5d3b71)throw CliErrors[_0x112c21(0xb4)](_0x112c21(0xbb)+_0x59f479['id']+'\x20is\x20missing\x20from\x20the\x20grouped\x20member\x20snapshot.',_0x112c21(0xe8));const _0x5da7ee=_0x930c43=>{const _0x241fb9=_0x112c21,_0x210ab2=normalizeRuntimeUserId(_0x930c43);if(_0x210ab2===undefined)throw CliErrors[_0x241fb9(0xb4)](_0x241fb9(0xca));return _0x210ab2;},_0x9a9b5f=_0x5d3b71[_0x112c21(0xcd)][_0x112c21(0xac)](_0x55be73=>_0x5da7ee(_0x55be73[_0x112c21(0xef)])),_0x26b353=_0x454248[_0x112c21(0xe2)]('expect-user-count');if(_0x26b353!==undefined&&_0x26b353!==null&&_0x26b353!==''){const _0x550b71=_0x454248[_0x112c21(0xec)](_0x112c21(0xf1));if(!Number[_0x112c21(0xf5)](_0x550b71)||_0x550b71<0x0)throw CliErrors[_0x112c21(0xb4)](_0x112c21(0xd1));if(_0x9a9b5f[_0x112c21(0xb9)]!==_0x550b71)throw CliErrors[_0x112c21(0xb4)](_0x112c21(0xde)+_0x550b71+_0x112c21(0xdb)+_0x9a9b5f['length']+'.',_0x112c21(0xb1));}const _0x21712a=_0x9a9b5f[_0x112c21(0xa9)](_0x807f4c),_0x1d8c2d=[];let _0x7a6caf=!![];if(_0x4a9cee==='user-add'){const _0x1ae9d2=await listRuntimeAppUsers(_0x454248[_0x112c21(0xdd)]),_0x2e969f=_0x1ae9d2[_0x112c21(0xb0)](_0xdec785=>normalizeRuntimeUserId(_0xdec785['code'])===_0x807f4c);if(_0x2e969f['length']!==0x1||!_0x2e969f[0x0]['userName']?.['trim']())throw CliErrors[_0x112c21(0xb4)](_0x112c21(0xd7)+_0x807f4c+_0x112c21(0xcc)+_0x454248[_0x112c21(0xdd)]+'.',_0x112c21(0xcf));_0x21712a?(_0x7a6caf=![],_0x1d8c2d[_0x112c21(0xb8)]('User\x20'+_0x807f4c+_0x112c21(0xc4)+_0x59f479['id']+'.')):_0x5d3b71[_0x112c21(0xcd)]['push']({'userId':_0x807f4c,'username':_0x2e969f[0x0][_0x112c21(0xbe)]});}else!_0x21712a?(_0x7a6caf=![],_0x1d8c2d[_0x112c21(0xb8)](_0x112c21(0xad)+_0x807f4c+_0x112c21(0xe9)+_0x59f479['id']+'.')):_0x5d3b71[_0x112c21(0xcd)]=_0x5d3b71[_0x112c21(0xcd)][_0x112c21(0xb0)](_0x1f0c2d=>_0x5da7ee(_0x1f0c2d[_0x112c21(0xef)])!==_0x807f4c);return{'role':_0x59f479,'userId':_0x807f4c,'roleList':_0x2ba681,'before':{'userIds':_0x9a9b5f},'after':{'userIds':_0x5d3b71[_0x112c21(0xcd)]['map'](_0x4fcb9e=>_0x5da7ee(_0x4fcb9e[_0x112c21(0xef)]))},'shouldWrite':_0x7a6caf,'warnings':_0x1d8c2d};}export function runtimeRoleWriteResult(_0x577173,_0x1e0f4f,_0x3a9308,_0x2c4b8c,_0x109696,_0xed6104=[]){return{'operation':_0x577173,'scope':'runtime','selector':_0x1e0f4f,'before':_0x3a9308,'after':_0x2c4b8c,'dryRun':![],'backend':_0x109696,'warnings':_0xed6104};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a60_0x3330cd=a60_0x1c59;(function(_0x372c37,_0x19668e){const _0x826c4c=a60_0x1c59,_0x3b50ca=_0x372c37();while(!![]){try{const _0x37b526=-parseInt(_0x826c4c(0x1d7))/0x1+parseInt(_0x826c4c(0x1bc))/0x2*(parseInt(_0x826c4c(0x1cd))/0x3)+parseInt(_0x826c4c(0x1d4))/0x4*(-parseInt(_0x826c4c(0x1c9))/0x5)+-parseInt(_0x826c4c(0x1c0))/0x6+-parseInt(_0x826c4c(0x1be))/0x7+-parseInt(_0x826c4c(0x1c3))/0x8*(-parseInt(_0x826c4c(0x1b8))/0x9)+parseInt(_0x826c4c(0x1c6))/0xa;if(_0x37b526===_0x19668e)break;else _0x3b50ca['push'](_0x3b50ca['shift']());}catch(_0x18bb90){_0x3b50ca['push'](_0x3b50ca['shift']());}}}(a60_0x3989,0x2c21e));import{updateRuntimeAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';function a60_0x1c59(_0x4b947c,_0x2399b1){_0x4b947c=_0x4b947c-0x1b8;const _0x398926=a60_0x3989();let _0x1c596f=_0x398926[_0x4b947c];return _0x1c596f;}import{assertCustomRuntimeRole,getRuntimeRoleById,projectRuntimeRole,readOptionalRuntimeRoleCode,ROLE_CODE_FLAG,ROLE_ID_FLAG,runtimeRoleWriteResult}from'../../commands/role/shared.js';function a60_0x3989(){const _0x1ed608=['1908840OpKAex','trim','role-code','78488mhdhJs','name','/client/permit/role/update','3039990cXLKlU','update','str','2450yZmywf','flag','Preview:\x20update\x20a\x20runtime\x20CUSTOM\x20role','New\x20role\x20name','39xzaAvT','remark','build','POST','body','--remark\x20must\x20not\x20be\x20blank.','validation','244xVRQJC','high-risk-write','role','70588PFsOBY','Pass\x20--role-code,\x20--name,\x20or\x20--remark\x20to\x20update\x20the\x20runtime\x20role.','string','117IuvIyg','Changes\x20the\x20custom\x20role\x20code,\x20name,\x20or\x20note\x20in\x20the\x20current\x20runtime\x20app.\x20The\x20role\x20updates\x20immediately.','Update\x20a\x20runtime\x20CUSTOM\x20role\x27s\x20code,\x20name,\x20or\x20remark','num','53324CMTPLh','The\x20current\x20runtime\x20role\x20API\x20does\x20not\x20support\x20clearing\x20an\x20existing\x20remark.','1251348PTdxbF','appCode'];a60_0x3989=function(){return _0x1ed608;};return a60_0x3989();}function updateFields(_0x290c17){const _0x14adc8=a60_0x1c59,_0x393cc0=_0x290c17[_0x14adc8(0x1ca)](_0x14adc8(0x1c2))!==undefined,_0x228bea=_0x290c17[_0x14adc8(0x1ca)](_0x14adc8(0x1c4))!==undefined,_0x35c8e4=_0x290c17[_0x14adc8(0x1ca)]('remark')!==undefined;if(!_0x393cc0&&!_0x228bea&&!_0x35c8e4)throw CliErrors[_0x14adc8(0x1d3)](_0x14adc8(0x1d8));const _0x1d8da0=readOptionalRuntimeRoleCode(_0x290c17),_0x47cd6b=_0x290c17[_0x14adc8(0x1c8)](_0x14adc8(0x1c4))[_0x14adc8(0x1c1)](),_0x4f0ade=_0x290c17[_0x14adc8(0x1c8)](_0x14adc8(0x1ce))[_0x14adc8(0x1c1)]();if(_0x228bea&&!_0x47cd6b)throw CliErrors['validation']('--name\x20must\x20not\x20be\x20blank.');if(_0x35c8e4&&!_0x4f0ade)throw CliErrors[_0x14adc8(0x1d3)](_0x14adc8(0x1d2),_0x14adc8(0x1bd));return{..._0x1d8da0?{'roleCode':_0x1d8da0}:{},..._0x228bea?{'roleName':_0x47cd6b}:{},..._0x35c8e4?{'remark':_0x4f0ade}:{}};}async function prepare(_0x5e8968){const _0x5c0459=a60_0x1c59,_0x758826=await getRuntimeRoleById(_0x5e8968[_0x5c0459(0x1bf)],_0x5e8968[_0x5c0459(0x1bb)]('id'));return assertCustomRuntimeRole(_0x758826,_0x5c0459(0x1c7)),{'role':_0x758826,'body':{'id':_0x758826['id'],'appCode':_0x5e8968[_0x5c0459(0x1bf)],...updateFields(_0x5e8968)}};}export const roleUpdate={'service':a60_0x3330cd(0x1d6),'command':a60_0x3330cd(0x1c7),'description':a60_0x3330cd(0x1ba),'risk':a60_0x3330cd(0x1d5),'confirmationDescription':a60_0x3330cd(0x1b9),'flags':[ROLE_ID_FLAG,ROLE_CODE_FLAG,{'name':a60_0x3330cd(0x1c4),'type':a60_0x3330cd(0x1d9),'description':a60_0x3330cd(0x1cc)},{'name':'remark','type':'string','description':'New\x20non-empty\x20role\x20remark'}],async 'validate'(_0x2d39c3){updateFields(_0x2d39c3);},async 'dryRun'(_0x5e0ce7){const _0xb38db3=a60_0x3330cd,{body:_0x8c2205}=await prepare(_0x5e0ce7);return dryRun(_0xb38db3(0x1d0),_0xb38db3(0x1c5))[_0xb38db3(0x1d1)](_0x8c2205)['description'](_0xb38db3(0x1cb))[_0xb38db3(0x1cf)]();},async 'execute'(_0x4c3f62){const _0x31a256=a60_0x3330cd,{role:_0x299d06,body:_0x109f8d}=await prepare(_0x4c3f62),_0x401409=await updateRuntimeAppRole(_0x109f8d);return{'ok':!![],'data':runtimeRoleWriteResult(_0x31a256(0x1c7),{'roleId':_0x299d06['id']},projectRuntimeRole(_0x299d06),projectRuntimeRole(_0x401409),{'method':_0x31a256(0x1d0),'path':_0x31a256(0x1c5)})};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a61_0x3a210e=a61_0x39bf;(function(_0x130f3b,_0x186d6a){const _0x46799e=a61_0x39bf,_0x44c286=_0x130f3b();while(!![]){try{const _0x105c31=parseInt(_0x46799e(0x1e6))/0x1*(-parseInt(_0x46799e(0x1f3))/0x2)+parseInt(_0x46799e(0x1e9))/0x3*(-parseInt(_0x46799e(0x1f8))/0x4)+parseInt(_0x46799e(0x1fb))/0x5+-parseInt(_0x46799e(0x1ec))/0x6+parseInt(_0x46799e(0x1fa))/0x7*(parseInt(_0x46799e(0x1e1))/0x8)+parseInt(_0x46799e(0x1ee))/0x9*(parseInt(_0x46799e(0x1ed))/0xa)+-parseInt(_0x46799e(0x1e5))/0xb*(-parseInt(_0x46799e(0x1f9))/0xc);if(_0x105c31===_0x186d6a)break;else _0x44c286['push'](_0x44c286['shift']());}catch(_0x2f8008){_0x44c286['push'](_0x44c286['shift']());}}}(a61_0x28c5,0xe48b4));function a61_0x28c5(){const _0x33b5b4=['build','POST','4255062Szoenm','2039030CgmMsd','18rZgUBN','Adds\x20the\x20given\x20runtime\x20user\x20to\x20the\x20target\x20role.\x20The\x20user\x20receives\x20the\x20permissions\x20of\x20that\x20role.','shouldWrite','/client/permit/user-role/update-user-list','userId','555610rDYmUJ','high-risk-write','before','roleList','appCode','1412TyopOj','11264352VoPpJt','2541keaJCa','2084240UrUeGu','36296EOrkTv','body','role','warnings','11gkLHtq','2SElzdS','Add\x20a\x20userId\x20to\x20one\x20runtime\x20role','user-add','10278VsVDxK'];a61_0x28c5=function(){return _0x33b5b4;};return a61_0x28c5();}function a61_0x39bf(_0x1b4f93,_0x28f071){_0x1b4f93=_0x1b4f93-0x1e1;const _0x28c587=a61_0x28c5();let _0x39bf01=_0x28c587[_0x1b4f93];return _0x39bf01;}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_0x3a210e(0x1e3),'command':a61_0x3a210e(0x1e8),'description':a61_0x3a210e(0x1e7),'risk':a61_0x3a210e(0x1f4),'confirmationDescription':a61_0x3a210e(0x1ef),'flags':[ROLE_REF_FLAG,USER_ID_FLAG,EXPECT_USER_COUNT_FLAG],async 'dryRun'(_0x44cc01){const _0x389a61=a61_0x3a210e,_0x5c57ca=await prepareRuntimeMemberMutation(_0x44cc01,_0x389a61(0x1e8));return dryRun(_0x389a61(0x1eb),_0x389a61(0x1f1))[_0x389a61(0x1e2)]({'appCode':_0x44cc01['appCode'],'roleList':_0x5c57ca[_0x389a61(0x1f6)]})['description'](_0x5c57ca['shouldWrite']?'Preview:\x20add\x20runtime\x20role\x20member':_0x5c57ca[_0x389a61(0x1e4)][0x0])[_0x389a61(0x1ea)]();},async 'execute'(_0x6bf286){const _0x333b9e=a61_0x3a210e,_0x530870=await prepareRuntimeMemberMutation(_0x6bf286,_0x333b9e(0x1e8));return _0x530870[_0x333b9e(0x1f0)]&&await updateRuntimeRoleUsers(_0x6bf286[_0x333b9e(0x1f7)],_0x530870['roleList']),{'ok':!![],'data':runtimeRoleWriteResult('user-add',{'roleId':_0x530870[_0x333b9e(0x1e3)]['id'],'userId':_0x530870[_0x333b9e(0x1f2)]},_0x530870[_0x333b9e(0x1f5)],_0x530870['after'],{'method':_0x333b9e(0x1eb),'path':_0x333b9e(0x1f1)},_0x530870[_0x333b9e(0x1e4)])};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a62_0x13e846=a62_0x59a0;(function(_0x42c0b7,_0x17f3bf){const _0x42954d=a62_0x59a0,_0x46ac28=_0x42c0b7();while(!![]){try{const _0x2dabb9=parseInt(_0x42954d(0x94))/0x1+-parseInt(_0x42954d(0x9f))/0x2+parseInt(_0x42954d(0x9a))/0x3+-parseInt(_0x42954d(0x9e))/0x4+parseInt(_0x42954d(0xa0))/0x5+-parseInt(_0x42954d(0xa2))/0x6+parseInt(_0x42954d(0xa7))/0x7*(parseInt(_0x42954d(0xa8))/0x8);if(_0x2dabb9===_0x17f3bf)break;else _0x46ac28['push'](_0x46ac28['shift']());}catch(_0x5f3aa6){_0x46ac28['push'](_0x46ac28['shift']());}}}(a62_0x3811,0x1de0f));function a62_0x59a0(_0x9864d9,_0x595d58){_0x9864d9=_0x9864d9-0x94;const _0x38118d=a62_0x3811();let _0x59a09f=_0x38118d[_0x9864d9];return _0x59a09f;}function a62_0x3811(){const _0x2267f3=['after','812970jslfCO','body','build','warnings','user-remove','9079YhkbpK','1432UuFuGj','Preview:\x20remove\x20runtime\x20role\x20member','Removes\x20the\x20given\x20runtime\x20user\x20from\x20the\x20target\x20role.\x20The\x20user\x20loses\x20permissions\x20granted\x20only\x20by\x20that\x20role.','152225UnXbpG','description','shouldWrite','role','before','/client/permit/user-role/update-user-list','170598ipUYXO','userId','appCode','POST','279512svpbya','275388FtbhSr','120980SHTxdk'];a62_0x3811=function(){return _0x2267f3;};return a62_0x3811();}import{updateRuntimeRoleUsers}from'../../core/api-client.js';import{dryRun}from'../../framework/dryrun.js';import{EXPECT_USER_COUNT_FLAG,prepareRuntimeMemberMutation,ROLE_REF_FLAG,runtimeRoleWriteResult,USER_ID_FLAG}from'../../commands/role/shared.js';export const roleUserRemove={'service':a62_0x13e846(0x97),'command':a62_0x13e846(0xa6),'description':'Remove\x20a\x20userId\x20from\x20one\x20runtime\x20role','risk':'high-risk-write','confirmationDescription':a62_0x13e846(0xaa),'flags':[ROLE_REF_FLAG,USER_ID_FLAG,EXPECT_USER_COUNT_FLAG],async 'dryRun'(_0x43e7af){const _0x55543c=a62_0x13e846,_0x4b363a=await prepareRuntimeMemberMutation(_0x43e7af,_0x55543c(0xa6));return dryRun('POST',_0x55543c(0x99))[_0x55543c(0xa3)]({'appCode':_0x43e7af[_0x55543c(0x9c)],'roleList':_0x4b363a['roleList']})[_0x55543c(0x95)](_0x4b363a['shouldWrite']?_0x55543c(0xa9):_0x4b363a[_0x55543c(0xa5)][0x0])[_0x55543c(0xa4)]();},async 'execute'(_0x2a9c3f){const _0x2295fd=a62_0x13e846,_0x26cee8=await prepareRuntimeMemberMutation(_0x2a9c3f,_0x2295fd(0xa6));return _0x26cee8[_0x2295fd(0x96)]&&await updateRuntimeRoleUsers(_0x2a9c3f[_0x2295fd(0x9c)],_0x26cee8['roleList']),{'ok':!![],'data':runtimeRoleWriteResult(_0x2295fd(0xa6),{'roleId':_0x26cee8[_0x2295fd(0x97)]['id'],'userId':_0x26cee8[_0x2295fd(0x9b)]},_0x26cee8[_0x2295fd(0x98)],_0x26cee8[_0x2295fd(0xa1)],{'method':_0x2295fd(0x9d),'path':_0x2295fd(0x99)},_0x26cee8[_0x2295fd(0xa5)])};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a63_0x4bac27=a63_0x351d;(function(_0x9552b5,_0x2cc8fa){const _0x237ba4=a63_0x351d,_0x3afd9e=_0x9552b5();while(!![]){try{const _0x47982e=-parseInt(_0x237ba4(0x170))/0x1*(-parseInt(_0x237ba4(0x199))/0x2)+parseInt(_0x237ba4(0x190))/0x3+parseInt(_0x237ba4(0x187))/0x4*(-parseInt(_0x237ba4(0x172))/0x5)+parseInt(_0x237ba4(0x166))/0x6*(parseInt(_0x237ba4(0x14f))/0x7)+parseInt(_0x237ba4(0x152))/0x8*(parseInt(_0x237ba4(0x186))/0x9)+-parseInt(_0x237ba4(0x159))/0xa*(parseInt(_0x237ba4(0x16d))/0xb)+parseInt(_0x237ba4(0x189))/0xc*(-parseInt(_0x237ba4(0x198))/0xd);if(_0x47982e===_0x2cc8fa)break;else _0x3afd9e['push'](_0x3afd9e['shift']());}catch(_0x2fb9be){_0x3afd9e['push'](_0x3afd9e['shift']());}}}(a63_0x1ac1,0x413e2));import{createRuntimeSchedule,deleteRuntimeSchedule,getRuntimeSchedule,listRuntimeSchedules,runRuntimeSchedule,validateRuntimeSchedule}from'../../core/api-client.js';function a63_0x351d(_0x345050,_0x355985){_0x345050=_0x345050-0x148;const _0x1ac12f=a63_0x1ac1();let _0x351d87=_0x1ac12f[_0x345050];return _0x351d87;}import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const SCHEDULE_ID_PATTERN=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,KIND_FLAG={'name':a63_0x4bac27(0x178),'type':a63_0x4bac27(0x164),'required':!![],'enum':['CRON',a63_0x4bac27(0x197)],'description':a63_0x4bac27(0x184)},CRON_FLAG={'name':a63_0x4bac27(0x169),'type':a63_0x4bac27(0x164),'description':a63_0x4bac27(0x162)},SCHEDULED_AT_FLAG={'name':'scheduled-at','type':'string','description':a63_0x4bac27(0x195)},TITLE_FLAG={'name':a63_0x4bac27(0x18b),'type':a63_0x4bac27(0x164),'required':!![],'description':a63_0x4bac27(0x188)},PROMPT_FLAG={'name':a63_0x4bac27(0x181),'type':a63_0x4bac27(0x164),'required':!![],'description':a63_0x4bac27(0x148)},MODEL_FLAG={'name':'model','type':a63_0x4bac27(0x164),'enum':[a63_0x4bac27(0x15e),a63_0x4bac27(0x171),a63_0x4bac27(0x17d)],'default':'deepseek-v4-flash-0731','description':a63_0x4bac27(0x168)},SCHEDULE_ID_FLAG={'name':a63_0x4bac27(0x193),'type':'string','required':!![],'description':a63_0x4bac27(0x18c),'pattern':{'regex':SCHEDULE_ID_PATTERN,'description':a63_0x4bac27(0x157)}},LIMIT_FLAG={'name':a63_0x4bac27(0x150),'type':a63_0x4bac27(0x15a),'default':0x14,'description':a63_0x4bac27(0x19a)},CURSOR_FLAG={'name':'cursor','type':'string','description':a63_0x4bac27(0x191)},INPUT_FLAGS=[KIND_FLAG,CRON_FLAG,SCHEDULED_AT_FLAG,TITLE_FLAG,PROMPT_FLAG,MODEL_FLAG];function readScheduleInput(_0x7e6747){const _0x3ec498=a63_0x4bac27,_0x4cc8a4=_0x7e6747[_0x3ec498(0x16c)](_0x3ec498(0x178)),_0x645a31=_0x7e6747[_0x3ec498(0x16c)]('title')['trim'](),_0x2b8b37=_0x7e6747[_0x3ec498(0x16c)]('prompt')[_0x3ec498(0x154)](),_0x20c340=_0x7e6747[_0x3ec498(0x16c)](_0x3ec498(0x16b)),_0x3672aa=_0x7e6747[_0x3ec498(0x16c)](_0x3ec498(0x169)),_0x15077a=_0x7e6747[_0x3ec498(0x16c)](_0x3ec498(0x180));if(!_0x645a31)throw CliErrors[_0x3ec498(0x14a)](_0x3ec498(0x177));if(!_0x2b8b37)throw CliErrors[_0x3ec498(0x14a)](_0x3ec498(0x16e));if(_0x4cc8a4===_0x3ec498(0x182)){if(!_0x3672aa||_0x15077a)throw CliErrors[_0x3ec498(0x14a)](_0x3ec498(0x149));return{'kind':_0x4cc8a4,'timezone':_0x3ec498(0x17f),'cron':_0x3672aa,'title':_0x645a31,'prompt':_0x2b8b37,'model':_0x20c340};}if(_0x4cc8a4==='ONCE'){if(!_0x15077a||_0x3672aa)throw CliErrors[_0x3ec498(0x14a)](_0x3ec498(0x194));return{'kind':_0x4cc8a4,'timezone':_0x3ec498(0x17f),'scheduledAt':_0x15077a,'title':_0x645a31,'prompt':_0x2b8b37,'model':_0x20c340};}throw CliErrors['validation'](_0x3ec498(0x160));}function scheduleCollectionPath(_0x33a007){const _0x214ae5=a63_0x4bac27;return _0x214ae5(0x14c)+encodeURIComponent(_0x33a007)+_0x214ae5(0x15b);}function a63_0x1ac1(){const _0x389ea8=['body','UTC','scheduled-at','prompt','CRON','POST','Schedule\x20kind:\x20CRON\x20or\x20ONCE','cursor','468rxmbWG','373444kwrHAA','Schedule\x20title','2446104qHaLNw','Deleted\x20schedule\x20','title','Schedule\x20UUID','/run','build','appCode','837468dgffcF','Opaque\x20nextCursor\x20returned\x20by\x20the\x20previous\x20list\x20call','Ignores\x20the\x20original\x20trigger\x20time,\x20runs\x20the\x20schedule\x20once\x20now,\x20and\x20creates\x20a\x20new\x20Agent\x20Task.','schedule-id','ONCE\x20schedules\x20require\x20--scheduled-at\x20and\x20do\x20not\x20accept\x20--cron.','Canonical\x20UTC\x20ISO\x20datetime\x20for\x20ONCE\x20schedules','taskId','ONCE','39csZunP','2TVmxTH','Page\x20size\x20from\x201\x20to\x20100','Prompt\x20sent\x20to\x20the\x20Agent\x20when\x20the\x20schedule\x20runs','CRON\x20schedules\x20require\x20--cron\x20and\x20do\x20not\x20accept\x20--scheduled-at.','validation','length','/api/harness/apps/','high-risk-write','Created\x20','14pSPckn','limit','Show\x20one\x20schedule\x20by\x20schedule\x20ID','37432jygjSb','schedule','trim','\x20schedule\x20','description','a\x20UUID\x20returned\x20by\x20schedule\x20create/list','DELETE','1440ecLowV','number','/schedules','read','Validate\x20a\x20UTC\x20schedule\x20without\x20creating\x20it','kimi/k3','List\x20current\x20user\x27s\x20schedules\x20for\x20the\x20current\x20app','--kind\x20must\x20be\x20CRON\x20or\x20ONCE.','Create\x20a\x20recurring\x20or\x20one-shot\x20Agent\x20schedule','Five-field\x20UTC\x20cron\x20expression\x20for\x20CRON\x20schedules','validate','string','list','633234LlwIXg','Preview:\x20run\x20schedule\x20','Task\x20model\x20used\x20when\x20the\x20schedule\x20runs','cron','\x20immediately','model','str','8921iNbjrj','--prompt\x20must\x20not\x20be\x20blank.','create','355363IABLpi','deepseek-v4-flash-0731','5vWAAgm','Queued\x20Task\x20','Run\x20the\x20schedule\x20once\x20immediately\x20and\x20create\x20a\x20Task','scheduleId','Creates\x20a\x20schedule\x20in\x20the\x20current\x20app\x20that\x20can\x20auto-trigger\x20an\x20Agent.\x20At\x20the\x20scheduled\x20time\x20a\x20Task\x20is\x20created\x20and\x20run.','--title\x20must\x20not\x20be\x20blank.','kind','Permanently\x20deletes\x20the\x20schedule\x20and\x20stops\x20future\x20auto-triggers.\x20Historical\x20Tasks\x20already\x20created\x20are\x20not\x20affected.','detail','--limit\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.','num','deepseek-v4-pro-0813'];a63_0x1ac1=function(){return _0x389ea8;};return a63_0x1ac1();}function scheduleItemPath(_0x4d785b,_0xfd4a70){return scheduleCollectionPath(_0x4d785b)+'/'+encodeURIComponent(_0xfd4a70);}const scheduleValidate={'service':a63_0x4bac27(0x153),'command':a63_0x4bac27(0x163),'description':a63_0x4bac27(0x15d),'risk':a63_0x4bac27(0x15c),'flags':INPUT_FLAGS,async 'validate'(_0x537815){readScheduleInput(_0x537815);},async 'execute'(_0x4d6dac){const _0x201b6b=a63_0x4bac27,_0x1e67ff=readScheduleInput(_0x4d6dac),_0x2a151a=await validateRuntimeSchedule(_0x4d6dac[_0x201b6b(0x18f)],_0x1e67ff);return{'ok':!![],'data':_0x2a151a,'message':'Schedule\x20input\x20is\x20valid'};}},scheduleCreate={'service':a63_0x4bac27(0x153),'command':a63_0x4bac27(0x16f),'description':a63_0x4bac27(0x161),'risk':a63_0x4bac27(0x14d),'confirmationDescription':a63_0x4bac27(0x176),'flags':INPUT_FLAGS,async 'validate'(_0x3edffd){readScheduleInput(_0x3edffd);},async 'execute'(_0x321a77){const _0x189aeb=a63_0x4bac27,_0x231b33=readScheduleInput(_0x321a77),_0x477864=await validateRuntimeSchedule(_0x321a77[_0x189aeb(0x18f)],_0x231b33),_0x3ca771=await createRuntimeSchedule(_0x321a77['appCode'],_0x477864);return{'ok':!![],'data':_0x3ca771,'message':_0x189aeb(0x14e)+_0x3ca771[_0x189aeb(0x178)]+_0x189aeb(0x155)+_0x3ca771[_0x189aeb(0x175)]};},async 'dryRun'(_0x2db952){const _0xd1132b=a63_0x4bac27,_0x9e5d1b=readScheduleInput(_0x2db952);return dryRun(_0xd1132b(0x183),scheduleCollectionPath(_0x2db952[_0xd1132b(0x18f)]))[_0xd1132b(0x17e)](_0x9e5d1b)[_0xd1132b(0x156)]('Preview:\x20create\x20an\x20Agent\x20schedule')[_0xd1132b(0x18e)]();}},scheduleList={'service':'schedule','command':a63_0x4bac27(0x165),'description':a63_0x4bac27(0x15f),'risk':a63_0x4bac27(0x15c),'flags':[KIND_FLAG,LIMIT_FLAG,CURSOR_FLAG],async 'validate'(_0x52b500){const _0x355227=a63_0x4bac27,_0x2740a4=_0x52b500[_0x355227(0x17c)]('limit');if(!Number['isSafeInteger'](_0x2740a4)||_0x2740a4<0x1||_0x2740a4>0x64)throw CliErrors[_0x355227(0x14a)](_0x355227(0x17b));const _0x3991aa=_0x52b500[_0x355227(0x16c)](_0x355227(0x185));if(_0x3991aa&&(_0x3991aa[_0x355227(0x14b)]>0x400||_0x3991aa[_0x355227(0x154)]()!==_0x3991aa))throw CliErrors[_0x355227(0x14a)]('--cursor\x20must\x20be\x20the\x20unchanged\x20nextCursor\x20from\x20schedule\x20list.');},async 'execute'(_0x51f405){const _0x3f0358=a63_0x4bac27,_0x1b2e8c=_0x51f405[_0x3f0358(0x16c)](_0x3f0358(0x185)),_0x55a114=await listRuntimeSchedules(_0x51f405[_0x3f0358(0x18f)],{'kind':_0x51f405[_0x3f0358(0x16c)](_0x3f0358(0x178)),'limit':_0x51f405['num'](_0x3f0358(0x150)),..._0x1b2e8c?{'cursor':_0x1b2e8c}:{}});return{'ok':!![],'data':_0x55a114};}},scheduleDetail={'service':a63_0x4bac27(0x153),'command':a63_0x4bac27(0x17a),'description':a63_0x4bac27(0x151),'risk':a63_0x4bac27(0x15c),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x5cbd4c){const _0x3a8475=a63_0x4bac27,_0x14d6f8=await getRuntimeSchedule(_0x5cbd4c[_0x3a8475(0x18f)],_0x5cbd4c['str'](_0x3a8475(0x193)));return{'ok':!![],'data':_0x14d6f8};}},scheduleRun={'service':a63_0x4bac27(0x153),'command':'run','description':a63_0x4bac27(0x174),'risk':'high-risk-write','confirmationDescription':a63_0x4bac27(0x192),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0xcfb5b0){const _0x127998=a63_0x4bac27,_0x5d982b=_0xcfb5b0[_0x127998(0x16c)](_0x127998(0x193)),_0x35afbe=await runRuntimeSchedule(_0xcfb5b0[_0x127998(0x18f)],_0x5d982b);return{'ok':!![],'data':_0x35afbe,'message':_0x127998(0x173)+_0x35afbe[_0x127998(0x196)]+'\x20from\x20schedule\x20'+_0x5d982b};},async 'dryRun'(_0x53a8d3){const _0x27dbeb=a63_0x4bac27,_0x221b6b=_0x53a8d3[_0x27dbeb(0x16c)](_0x27dbeb(0x193));return dryRun(_0x27dbeb(0x183),scheduleItemPath(_0x53a8d3[_0x27dbeb(0x18f)],_0x221b6b)+_0x27dbeb(0x18d))[_0x27dbeb(0x156)](_0x27dbeb(0x167)+_0x221b6b+_0x27dbeb(0x16a))['build']();}},scheduleDelete={'service':a63_0x4bac27(0x153),'command':'delete','description':'Delete\x20the\x20schedule\x20and\x20stop\x20future\x20triggers','risk':'high-risk-write','confirmationDescription':a63_0x4bac27(0x179),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x5ddf38){const _0x5cc1fe=a63_0x4bac27,_0x457fa8=_0x5ddf38['str'](_0x5cc1fe(0x193)),_0x38e07a=await deleteRuntimeSchedule(_0x5ddf38[_0x5cc1fe(0x18f)],_0x457fa8);return{'ok':!![],'data':_0x38e07a,'message':_0x5cc1fe(0x18a)+_0x457fa8};},async 'dryRun'(_0x461bec){const _0x4e6a43=a63_0x4bac27,_0x52c0f6=_0x461bec[_0x4e6a43(0x16c)]('schedule-id');return dryRun(_0x4e6a43(0x158),scheduleItemPath(_0x461bec[_0x4e6a43(0x18f)],_0x52c0f6))[_0x4e6a43(0x156)]('Preview:\x20delete\x20schedule\x20'+_0x52c0f6)['build']();}};export const scheduleDefinitions=[scheduleValidate,scheduleCreate,scheduleList,scheduleDetail,scheduleRun,scheduleDelete];
|
|
1
|
+
const a63_0x225ec6=a63_0x4601;(function(_0x306ad4,_0x3a3cc9){const _0xcc6f60=a63_0x4601,_0x581c05=_0x306ad4();while(!![]){try{const _0x2e7711=-parseInt(_0xcc6f60(0x1ac))/0x1*(-parseInt(_0xcc6f60(0x1ae))/0x2)+parseInt(_0xcc6f60(0x1ad))/0x3+parseInt(_0xcc6f60(0x1ab))/0x4*(-parseInt(_0xcc6f60(0x1a8))/0x5)+parseInt(_0xcc6f60(0x176))/0x6*(-parseInt(_0xcc6f60(0x17f))/0x7)+parseInt(_0xcc6f60(0x1a1))/0x8+-parseInt(_0xcc6f60(0x1a9))/0x9+parseInt(_0xcc6f60(0x1b6))/0xa*(-parseInt(_0xcc6f60(0x18c))/0xb);if(_0x2e7711===_0x3a3cc9)break;else _0x581c05['push'](_0x581c05['shift']());}catch(_0x51892f){_0x581c05['push'](_0x581c05['shift']());}}}(a63_0x45dc,0x4be39));function a63_0x45dc(){const _0x13a63d=['Preview:\x20run\x20schedule\x20','\x20immediately','Create\x20a\x20recurring\x20or\x20one-shot\x20Agent\x20schedule','Ignores\x20the\x20original\x20trigger\x20time,\x20runs\x20the\x20schedule\x20once\x20now,\x20and\x20creates\x20a\x20new\x20Agent\x20Task.','List\x20current\x20user\x27s\x20schedules\x20for\x20the\x20current\x20app','validate','--kind\x20must\x20be\x20CRON\x20or\x20ONCE.','str','Opaque\x20nextCursor\x20returned\x20by\x20the\x20previous\x20list\x20call','UTC','create','string','3531zvJTuA','/run','Task\x20model\x20used\x20when\x20the\x20schedule\x20runs','Five-field\x20UTC\x20cron\x20expression\x20for\x20CRON\x20schedules','Creates\x20a\x20schedule\x20in\x20the\x20current\x20app\x20that\x20can\x20auto-trigger\x20an\x20Agent.\x20At\x20the\x20scheduled\x20time\x20a\x20Task\x20is\x20created\x20and\x20run.','Schedule\x20title','prompt','Validate\x20a\x20UTC\x20schedule\x20without\x20creating\x20it','limit','run','isSafeInteger','Queued\x20Task\x20','--cursor\x20must\x20be\x20the\x20unchanged\x20nextCursor\x20from\x20schedule\x20list.','ONCE','kind','\x20schedule\x20','Preview:\x20create\x20an\x20Agent\x20schedule','kimi/k3','ONCE\x20schedules\x20require\x20--scheduled-at\x20and\x20do\x20not\x20accept\x20--cron.','/api/harness/apps/','taskId','3862768pMMnKt','delete','high-risk-write','deepseek-v4-flash-0731','Preview:\x20delete\x20schedule\x20','\x20from\x20schedule\x20','schedule-id','5LjzyPx','1158300oqgIPJ','validation','2176272KoEkVC','1473NyWjSA','999252GmxNGd','646FoNqov','appCode','model','cron','description','schedule','CRON','--limit\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.','8480vIVHqP','list','/schedules','read','scheduled-at','Deleted\x20schedule\x20','cursor','trim','Schedule\x20kind:\x20CRON\x20or\x20ONCE','Permanently\x20deletes\x20the\x20schedule\x20and\x20stops\x20future\x20auto-triggers.\x20Historical\x20Tasks\x20already\x20created\x20are\x20not\x20affected.','17946QQVFqP','title','DELETE','length','--prompt\x20must\x20not\x20be\x20blank.','detail','Schedule\x20UUID','build','Created\x20','84ovlEZR'];a63_0x45dc=function(){return _0x13a63d;};return a63_0x45dc();}import{createRuntimeSchedule,deleteRuntimeSchedule,getRuntimeSchedule,listRuntimeSchedules,runRuntimeSchedule,validateRuntimeSchedule}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';function a63_0x4601(_0x39b42d,_0x35e0ba){_0x39b42d=_0x39b42d-0x16f;const _0x45dce2=a63_0x45dc();let _0x46012c=_0x45dce2[_0x39b42d];return _0x46012c;}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_0x225ec6(0x19a),'type':a63_0x225ec6(0x18b),'required':!![],'enum':[a63_0x225ec6(0x1b4),a63_0x225ec6(0x199)],'description':a63_0x225ec6(0x174)},CRON_FLAG={'name':a63_0x225ec6(0x1b1),'type':a63_0x225ec6(0x18b),'description':a63_0x225ec6(0x18f)},SCHEDULED_AT_FLAG={'name':a63_0x225ec6(0x170),'type':a63_0x225ec6(0x18b),'description':'Canonical\x20UTC\x20ISO\x20datetime\x20for\x20ONCE\x20schedules'},TITLE_FLAG={'name':'title','type':a63_0x225ec6(0x18b),'required':!![],'description':a63_0x225ec6(0x191)},PROMPT_FLAG={'name':'prompt','type':'string','required':!![],'description':'Prompt\x20sent\x20to\x20the\x20Agent\x20when\x20the\x20schedule\x20runs'},MODEL_FLAG={'name':a63_0x225ec6(0x1b0),'type':a63_0x225ec6(0x18b),'enum':[a63_0x225ec6(0x19d),a63_0x225ec6(0x1a4),'deepseek-v4-pro-0813'],'default':a63_0x225ec6(0x1a4),'description':a63_0x225ec6(0x18e)},SCHEDULE_ID_FLAG={'name':a63_0x225ec6(0x1a7),'type':a63_0x225ec6(0x18b),'required':!![],'description':a63_0x225ec6(0x17c),'pattern':{'regex':SCHEDULE_ID_PATTERN,'description':'a\x20UUID\x20returned\x20by\x20schedule\x20create/list'}},LIMIT_FLAG={'name':a63_0x225ec6(0x194),'type':'number','default':0x14,'description':'Page\x20size\x20from\x201\x20to\x20100'},CURSOR_FLAG={'name':a63_0x225ec6(0x172),'type':a63_0x225ec6(0x18b),'description':a63_0x225ec6(0x188)},INPUT_FLAGS=[KIND_FLAG,CRON_FLAG,SCHEDULED_AT_FLAG,TITLE_FLAG,PROMPT_FLAG,MODEL_FLAG];function readScheduleInput(_0x24a7c4){const _0x36604b=a63_0x225ec6,_0x1c3823=_0x24a7c4[_0x36604b(0x187)](_0x36604b(0x19a)),_0x4802ce=_0x24a7c4[_0x36604b(0x187)](_0x36604b(0x177))[_0x36604b(0x173)](),_0x2b1f7a=_0x24a7c4[_0x36604b(0x187)](_0x36604b(0x192))[_0x36604b(0x173)](),_0x3998fd=_0x24a7c4[_0x36604b(0x187)](_0x36604b(0x1b0)),_0x12221e=_0x24a7c4[_0x36604b(0x187)]('cron'),_0x4f6d02=_0x24a7c4[_0x36604b(0x187)](_0x36604b(0x170));if(!_0x4802ce)throw CliErrors[_0x36604b(0x1aa)]('--title\x20must\x20not\x20be\x20blank.');if(!_0x2b1f7a)throw CliErrors[_0x36604b(0x1aa)](_0x36604b(0x17a));if(_0x1c3823==='CRON'){if(!_0x12221e||_0x4f6d02)throw CliErrors[_0x36604b(0x1aa)]('CRON\x20schedules\x20require\x20--cron\x20and\x20do\x20not\x20accept\x20--scheduled-at.');return{'kind':_0x1c3823,'timezone':_0x36604b(0x189),'cron':_0x12221e,'title':_0x4802ce,'prompt':_0x2b1f7a,'model':_0x3998fd};}if(_0x1c3823===_0x36604b(0x199)){if(!_0x4f6d02||_0x12221e)throw CliErrors[_0x36604b(0x1aa)](_0x36604b(0x19e));return{'kind':_0x1c3823,'timezone':_0x36604b(0x189),'scheduledAt':_0x4f6d02,'title':_0x4802ce,'prompt':_0x2b1f7a,'model':_0x3998fd};}throw CliErrors[_0x36604b(0x1aa)](_0x36604b(0x186));}function scheduleCollectionPath(_0x33db7c){const _0x2c0253=a63_0x225ec6;return _0x2c0253(0x19f)+encodeURIComponent(_0x33db7c)+_0x2c0253(0x1b8);}function scheduleItemPath(_0x20d926,_0x6d0abb){return scheduleCollectionPath(_0x20d926)+'/'+encodeURIComponent(_0x6d0abb);}const scheduleValidate={'service':'schedule','command':a63_0x225ec6(0x185),'description':a63_0x225ec6(0x193),'risk':a63_0x225ec6(0x16f),'flags':INPUT_FLAGS,async 'validate'(_0x2544d5){readScheduleInput(_0x2544d5);},async 'execute'(_0x3b17d){const _0x483302=readScheduleInput(_0x3b17d),_0x6fbef6=await validateRuntimeSchedule(_0x3b17d['appCode'],_0x483302);return{'ok':!![],'data':_0x6fbef6,'message':'Schedule\x20input\x20is\x20valid'};}},scheduleCreate={'service':'schedule','command':a63_0x225ec6(0x18a),'description':a63_0x225ec6(0x182),'risk':'high-risk-write','confirmationDescription':a63_0x225ec6(0x190),'flags':INPUT_FLAGS,async 'validate'(_0x401c65){readScheduleInput(_0x401c65);},async 'execute'(_0x1476c5){const _0x158693=a63_0x225ec6,_0xe2cf80=readScheduleInput(_0x1476c5),_0x2a53cc=await validateRuntimeSchedule(_0x1476c5['appCode'],_0xe2cf80),_0x359efa=await createRuntimeSchedule(_0x1476c5[_0x158693(0x1af)],_0x2a53cc);return{'ok':!![],'data':_0x359efa,'message':_0x158693(0x17e)+_0x359efa[_0x158693(0x19a)]+_0x158693(0x19b)+_0x359efa['scheduleId']};},async 'dryRun'(_0x22e6bf){const _0x5b3ada=a63_0x225ec6,_0x16fad0=readScheduleInput(_0x22e6bf);return dryRun('POST',scheduleCollectionPath(_0x22e6bf['appCode']))['body'](_0x16fad0)[_0x5b3ada(0x1b2)](_0x5b3ada(0x19c))['build']();}},scheduleList={'service':a63_0x225ec6(0x1b3),'command':a63_0x225ec6(0x1b7),'description':a63_0x225ec6(0x184),'risk':a63_0x225ec6(0x16f),'flags':[KIND_FLAG,LIMIT_FLAG,CURSOR_FLAG],async 'validate'(_0x3f86ae){const _0x1a4d54=a63_0x225ec6,_0x63d6c=_0x3f86ae['num']('limit');if(!Number[_0x1a4d54(0x196)](_0x63d6c)||_0x63d6c<0x1||_0x63d6c>0x64)throw CliErrors[_0x1a4d54(0x1aa)](_0x1a4d54(0x1b5));const _0x1b7b8f=_0x3f86ae[_0x1a4d54(0x187)](_0x1a4d54(0x172));if(_0x1b7b8f&&(_0x1b7b8f[_0x1a4d54(0x179)]>0x400||_0x1b7b8f[_0x1a4d54(0x173)]()!==_0x1b7b8f))throw CliErrors[_0x1a4d54(0x1aa)](_0x1a4d54(0x198));},async 'execute'(_0x48bdb4){const _0x3c7394=a63_0x225ec6,_0x3b31d1=_0x48bdb4[_0x3c7394(0x187)]('cursor'),_0x247196=await listRuntimeSchedules(_0x48bdb4[_0x3c7394(0x1af)],{'kind':_0x48bdb4[_0x3c7394(0x187)]('kind'),'limit':_0x48bdb4['num'](_0x3c7394(0x194)),..._0x3b31d1?{'cursor':_0x3b31d1}:{}});return{'ok':!![],'data':_0x247196};}},scheduleDetail={'service':a63_0x225ec6(0x1b3),'command':a63_0x225ec6(0x17b),'description':'Show\x20one\x20schedule\x20by\x20schedule\x20ID','risk':a63_0x225ec6(0x16f),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x235860){const _0x5975c1=a63_0x225ec6,_0x30d602=await getRuntimeSchedule(_0x235860[_0x5975c1(0x1af)],_0x235860[_0x5975c1(0x187)](_0x5975c1(0x1a7)));return{'ok':!![],'data':_0x30d602};}},scheduleRun={'service':'schedule','command':a63_0x225ec6(0x195),'description':'Run\x20the\x20schedule\x20once\x20immediately\x20and\x20create\x20a\x20Task','risk':a63_0x225ec6(0x1a3),'confirmationDescription':a63_0x225ec6(0x183),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x42dd73){const _0x50917e=a63_0x225ec6,_0x3f9ab4=_0x42dd73[_0x50917e(0x187)](_0x50917e(0x1a7)),_0x554fe4=await runRuntimeSchedule(_0x42dd73[_0x50917e(0x1af)],_0x3f9ab4);return{'ok':!![],'data':_0x554fe4,'message':_0x50917e(0x197)+_0x554fe4[_0x50917e(0x1a0)]+_0x50917e(0x1a6)+_0x3f9ab4};},async 'dryRun'(_0x5415b0){const _0x221444=a63_0x225ec6,_0x5bf031=_0x5415b0[_0x221444(0x187)](_0x221444(0x1a7));return dryRun('POST',scheduleItemPath(_0x5415b0[_0x221444(0x1af)],_0x5bf031)+_0x221444(0x18d))[_0x221444(0x1b2)](_0x221444(0x180)+_0x5bf031+_0x221444(0x181))[_0x221444(0x17d)]();}},scheduleDelete={'service':a63_0x225ec6(0x1b3),'command':a63_0x225ec6(0x1a2),'description':'Delete\x20the\x20schedule\x20and\x20stop\x20future\x20triggers','risk':'high-risk-write','confirmationDescription':a63_0x225ec6(0x175),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x33bd43){const _0x40402b=a63_0x225ec6,_0x107d1f=_0x33bd43[_0x40402b(0x187)](_0x40402b(0x1a7)),_0x1a34c9=await deleteRuntimeSchedule(_0x33bd43[_0x40402b(0x1af)],_0x107d1f);return{'ok':!![],'data':_0x1a34c9,'message':_0x40402b(0x171)+_0x107d1f};},async 'dryRun'(_0x3e78fc){const _0x5c875b=a63_0x225ec6,_0xc70b4c=_0x3e78fc['str']('schedule-id');return dryRun(_0x5c875b(0x178),scheduleItemPath(_0x3e78fc[_0x5c875b(0x1af)],_0xc70b4c))[_0x5c875b(0x1b2)](_0x5c875b(0x1a5)+_0xc70b4c)[_0x5c875b(0x17d)]();}};export const scheduleDefinitions=[scheduleValidate,scheduleCreate,scheduleList,scheduleDetail,scheduleRun,scheduleDelete];
|
package/lib/commands/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a64_0x1948d7=a64_0x46a9;(function(_0x3f079f,_0x488ecc){const _0x48dbe8=a64_0x46a9,_0x4b3e76=_0x3f079f();while(!![]){try{const _0x4dab81=-parseInt(_0x48dbe8(0x1c4))/0x1*(-parseInt(_0x48dbe8(0x1ce))/0x2)+parseInt(_0x48dbe8(0x1cf))/0x3*(-parseInt(_0x48dbe8(0x1c7))/0x4)+-parseInt(_0x48dbe8(0x1ca))/0x5+-parseInt(_0x48dbe8(0x1d0))/0x6+-parseInt(_0x48dbe8(0x1c5))/0x7*(parseInt(_0x48dbe8(0x1c9))/0x8)+-parseInt(_0x48dbe8(0x1cb))/0x9+-parseInt(_0x48dbe8(0x1cd))/0xa*(-parseInt(_0x48dbe8(0x1c8))/0xb);if(_0x4dab81===_0x488ecc)break;else _0x4b3e76['push'](_0x4b3e76['shift']());}catch(_0x4db3f3){_0x4b3e76['push'](_0x4b3e76['shift']());}}}(a64_0x38d2,0xc8ed0));import{buildSchemaPayload}from'../framework/schema-export.js';function a64_0x38d2(){const _0x398ccc=['7232124TqISKG','469szTUqg','21BPJnhC','Export\x20machine-readable\x20command\x20schema\x20(JSON)','112084aCKeoJ','132iploOq','1384296hfCUpm','7293365eVHtHl','10678662yQFxrf','schema','3562620OqRssR','5466oxoFnG','39XsjcDC'];a64_0x38d2=function(){return _0x398ccc;};return a64_0x38d2();}async function execute(_0xbb954b){const _0x346f8c=await buildSchemaPayload();return{'ok':!![],'data':_0x346f8c};}function a64_0x46a9(_0x33e80c,_0x48a290){_0x33e80c=_0x33e80c-0x1c4;const _0x38d29a=a64_0x38d2();let _0x46a976=_0x38d29a[_0x33e80c];return _0x46a976;}export const schemaDefinition={'service':a64_0x1948d7(0x1cc),'command':'export','description':a64_0x1948d7(0x1c6),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x39964f,_0x25990b){const _0x117f28=a65_0x5b78,_0x3ab4e4=_0x39964f();while(!![]){try{const _0x1bfda9=-parseInt(_0x117f28(0x132))/0x1*(-parseInt(_0x117f28(0x122))/0x2)+-parseInt(_0x117f28(0x162))/0x3+parseInt(_0x117f28(0x133))/0x4*(parseInt(_0x117f28(0x14f))/0x5)+parseInt(_0x117f28(0x16a))/0x6+parseInt(_0x117f28(0x14d))/0x7+parseInt(_0x117f28(0x15e))/0x8+-parseInt(_0x117f28(0x12d))/0x9;if(_0x1bfda9===_0x25990b)break;else _0x3ab4e4['push'](_0x3ab4e4['shift']());}catch(_0x14db5c){_0x3ab4e4['push'](_0x3ab4e4['shift']());}}}(a65_0x1c16,0x7145d));import{compileServiceTreeCommand,matchServiceTreeCommand}from'@lovrabet/cli-framework';import{getLoginUserInfo,listDatasets}from'../../core/api-client.js';import{executeData,executeSdkBff,executeSdkSql}from'../../core/sdk-client.js';function a65_0x1c16(){const _0x4f1c10=['\x22\x20in\x20service\x20command\x20','padEnd','source','bffId','\x20\x20\x20\x20command:\x20','description','\x20\x20\x20\x20sqlCode:\x20','mapTo','3577630jjpLTT','app','693645QqFAhJ','sqlCode','startsWith','\x20\x20\x20\x20kind:\x20\x20\x20\x20','cliPath','default','env','appRef','envName','rawFlags','target','type','filter','now','map','5302440FxEeGT','enum','\x20\x20\x20\x20','const','1596147HNgsZp','Define\x20the\x20appRef\x20under\x20appBindings\x20or\x20remove\x20target.appRef.','This\x20will\x20run\x20Service\x20Tree\x20command\x20\x22','bff','entries','Preview\x20dynamic\x20service\x20command:\x20','code','context.','1178190ljhWXJ','slice','dbtableConfig','length','\x20\x20[','\x20service\x20detail\x20--service\x20','fromEntries','\x20\x20\x20\x20datasetCode:\x20','SERVICE_TREE','bffCode','string','\x22.\x20','data','datasetCode','\x20\x20MAP\x20TO','normalizedManifest','find','scriptName','some','nickName','args','\x20->\x20','Use\x20lovrabet\x20dataset\x20list\x20to\x20confirm\x20the\x20physical\x20table\x20name\x20or\x20add\x20target.datasetCode\x20to\x20the\x20manifest.','The\x20manifest\x20marks\x20this\x20command\x20as\x20a\x20write.\x20It\x20may\x20change\x20business\x20data\x20or\x20service\x20state.','\x20completed\x20in\x20','service','flags','risk','operator','\x20requires\x20target.sqlCode.','join','2PTINIR','validation','high-risk-write','params','Run\x20service\x20command\x20','Use\x20`','\x20<command>\x20[flags]','fullPath','\x20\x20\x20\x20datatable:\x20','tree','\x20\x20\x20\x20functionName:\x20','9638514YFUotL','userName','appcode','name','kind','3055zsDDTa','20NGvshb','Unsupported\x20service\x20target\x20kind:\x20','tenantCode','appBindings','\x20requires\x20target.datasetCode\x20or\x20target.datatable.','employeeId','commands','\x20requires\x20target.functionName.','Service\x20command\x20','\x20\x20SERVICE\x20TREE\x20TARGET','command','required','remainingArgs','push','appCode','tableName','datatable','read'];a65_0x1c16=function(){return _0x4f1c10;};return a65_0x1c16();}import{CliErrors}from'../../errors.js';import{listLocalServices,listLocalServiceTrees}from'../../commands/service/registry.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export function resolveDynamicServiceCommand(_0x530513,_0x4a8266){const _0x23b6fe=a65_0x5b78,_0x1f1907=listLocalServiceTrees();let _0x38406a;for(const _0x25c75e of _0x1f1907){const _0x583ebd=matchServiceTreeCommand(_0x25c75e,_0x530513);if(!_0x583ebd)continue;(!_0x38406a||_0x583ebd[_0x23b6fe(0x13d)][_0x23b6fe(0x129)][_0x23b6fe(0x16d)]>_0x38406a[_0x23b6fe(0x13d)][_0x23b6fe(0x129)][_0x23b6fe(0x16d)])&&(_0x38406a={'tree':_0x25c75e,'command':_0x583ebd[_0x23b6fe(0x13d)],'remainingArgs':_0x583ebd[_0x23b6fe(0x13f)]});}if(!_0x38406a)return undefined;const _0x69edbd={..._0x4a8266};return applyAppBinding(_0x38406a[_0x23b6fe(0x12b)],_0x38406a[_0x23b6fe(0x13d)],_0x69edbd),{'definition':buildDynamicCommandDefinition(_0x38406a[_0x23b6fe(0x12b)],_0x38406a[_0x23b6fe(0x13d)]),'args':_0x38406a[_0x23b6fe(0x13f)],'flags':_0x69edbd,'tree':_0x38406a[_0x23b6fe(0x12b)],'command':_0x38406a['command']};}export function generateDynamicServiceHelp(_0x3b8e22){const _0x296751=a65_0x5b78,_0x193a43=listLocalServiceTrees()[_0x296751(0x113)](_0xdaf977=>_0xdaf977['service'][_0x296751(0x168)]===_0x3b8e22);if(!_0x193a43)return undefined;const _0x41cd17=[CLI_BIN_NAME+'\x20'+_0x3b8e22+_0x296751(0x128),'',_0x193a43['service'][_0x296751(0x130)]||_0x3b8e22,_0x193a43[_0x296751(0x11c)]['description']?'\x20\x20'+_0x193a43[_0x296751(0x11c)]['description']:'','','Commands:',..._0x193a43[_0x296751(0x139)][_0x296751(0x15d)](_0x3e68fc=>{const _0x33650f=_0x296751,_0x53c7bd=_0x3e68fc[_0x33650f(0x129)][_0x33650f(0x16b)](0x1)['join']('\x20'),_0x223227=_0x3e68fc[_0x33650f(0x11e)]===_0x33650f(0x144)?'':'\x20['+_0x3e68fc['risk']+']';return'\x20\x20'+_0x53c7bd[_0x33650f(0x146)](0x18)+'\x20'+(_0x3e68fc[_0x33650f(0x14a)]||'')+_0x223227;}),'',_0x296751(0x127)+CLI_BIN_NAME+_0x296751(0x16f)+_0x3b8e22+'`\x20to\x20inspect\x20the\x20manifest.'][_0x296751(0x15b)](Boolean);return _0x41cd17[_0x296751(0x121)]('\x0a');}export function listDynamicServiceEntries(){const _0x5ba00e=a65_0x5b78;return listLocalServices()[_0x5ba00e(0x15d)](_0x59a7c6=>{const _0x338742=_0x5ba00e,_0x2db72c=_0x59a7c6[_0x338742(0x112)];return{'service':_0x2db72c[_0x338742(0x11c)]['code'],'label':_0x2db72c['service'][_0x338742(0x130)]||_0x2db72c[_0x338742(0x11c)][_0x338742(0x168)],'commands':_0x2db72c['commands'][_0x338742(0x15d)](_0x54f9dc=>({'command':dynamicCommandName(_0x54f9dc),'description':_0x54f9dc[_0x338742(0x14a)]||_0x338742(0x126)+_0x54f9dc['cliPath'],'tag':riskTag(_0x54f9dc[_0x338742(0x11e)])}))};});}export function getDynamicServiceEntry(_0x414e71){const _0x593131=a65_0x5b78;return listDynamicServiceEntries()[_0x593131(0x113)](_0x41d68f=>_0x41d68f[_0x593131(0x11c)]===_0x414e71);}export function listDynamicServiceDefinitions(_0x266043){const _0x545d66=a65_0x5b78;return listLocalServiceTrees()[_0x545d66(0x15b)](_0x213057=>!_0x266043||_0x213057[_0x545d66(0x11c)]['code']===_0x266043)['flatMap'](_0x76c23a=>_0x76c23a[_0x545d66(0x139)][_0x545d66(0x15d)](_0x15e728=>buildDynamicCommandDefinition(_0x76c23a,_0x15e728)));}export function getDynamicServiceDefinitions(_0x50f0a8){const _0x1a6685=a65_0x5b78,_0x3f7230=listDynamicServiceDefinitions(_0x50f0a8);return _0x3f7230[_0x1a6685(0x16d)]>0x0?_0x3f7230:undefined;}export function findDynamicServiceDefinition(_0x93b6c0,_0xc0154a){const _0x548e83=a65_0x5b78;return listDynamicServiceDefinitions(_0x93b6c0)[_0x548e83(0x113)](_0x2a7986=>_0x2a7986[_0x548e83(0x13d)]===_0xc0154a);}export function buildDynamicCommandDefinition(_0x2395b3,_0x40e304){const _0x40ba00=a65_0x5b78;return{'service':_0x2395b3['service'][_0x40ba00(0x168)],'command':dynamicCommandName(_0x40e304),'description':_0x40e304[_0x40ba00(0x14a)]||_0x40ba00(0x126)+_0x40e304['cliPath'],'risk':_0x40e304[_0x40ba00(0x11e)],..._0x40e304['risk']===_0x40ba00(0x144)?{}:{'confirmationDescription':buildDynamicConfirmationDescription(_0x40e304)},'requiresAuth':!![],'requiresAppCode':!![],'args':_0x40e304[_0x40ba00(0x117)]['map'](_0x24ae61=>({'name':_0x24ae61[_0x40ba00(0x130)],'description':_0x24ae61[_0x40ba00(0x14a)]||_0x24ae61[_0x40ba00(0x130)],'required':_0x24ae61[_0x40ba00(0x13e)]})),'flags':_0x40e304[_0x40ba00(0x11d)]['map'](flagToCommandFlag),'helpExtra':()=>renderDynamicCommandHelp(_0x40e304),async 'dryRun'(_0x1c6463){const _0x358dda=_0x40ba00,_0x5e111a=await compilePlan(_0x40e304,_0x1c6463);return{'method':_0x358dda(0x10b),'url':_0x40e304[_0x358dda(0x153)],'body':{'target':targetPreview(_0x5e111a),'params':_0x5e111a['params']},'description':_0x358dda(0x167)+_0x40e304[_0x358dda(0x153)]};},async 'execute'(_0xc8903b){const _0x4ead68=_0x40ba00,_0x53d6fd=await compilePlan(_0x40e304,_0xc8903b),_0x57f555=Date['now'](),_0xc54925=await executePlan(_0x53d6fd,_0x40e304,_0xc8903b),_0x4da8e7=Date[_0x4ead68(0x15c)]()-_0x57f555;return{'ok':!![],'data':{'service':_0x2395b3[_0x4ead68(0x11c)],'command':_0x40e304[_0x4ead68(0x153)],'target':targetPreview(_0x53d6fd),'result':_0xc54925,'elapsed':_0x4da8e7},'message':_0x4ead68(0x13b)+_0x40e304['cliPath']+_0x4ead68(0x11b)+_0x4da8e7+'ms'};}};}function buildDynamicConfirmationDescription(_0x51ba63){const _0x477cdb=a65_0x5b78,_0x2801b3=_0x51ba63[_0x477cdb(0x14a)]||_0x51ba63[_0x477cdb(0x153)],_0x433c12=_0x51ba63[_0x477cdb(0x11e)]===_0x477cdb(0x124)?'The\x20manifest\x20marks\x20this\x20command\x20as\x20a\x20high-risk\x20write.\x20It\x20may\x20make\x20business\x20changes\x20that\x20are\x20hard\x20to\x20reverse.':_0x477cdb(0x11a);return _0x477cdb(0x164)+_0x2801b3+_0x477cdb(0x10e)+_0x433c12;}function dynamicCommandName(_0x122d80){const _0x1e507e=a65_0x5b78;return _0x122d80[_0x1e507e(0x129)]['slice'](0x1)['join']('\x20');}function riskTag(_0x29cb79){const _0x21b303=a65_0x5b78;return _0x29cb79===_0x21b303(0x144)?'':_0x21b303(0x16e)+_0x29cb79+']';}function flagToCommandFlag(_0x4bda08){const _0x3274c3=a65_0x5b78;return{'name':_0x4bda08['cliName'],'type':_0x4bda08[_0x3274c3(0x15a)]==='json'?_0x3274c3(0x10d):_0x4bda08['type'],'description':_0x4bda08['description']||_0x4bda08['name'],'required':_0x4bda08['required'],'default':isPrimitiveFlagDefault(_0x4bda08[_0x3274c3(0x154)])?_0x4bda08[_0x3274c3(0x154)]:undefined,'enum':_0x4bda08[_0x3274c3(0x15f)]};}async function compilePlan(_0xacb22d,_0x2218d9){const _0x46be53=a65_0x5b78;return compileServiceTreeCommand(_0xacb22d,{'flags':_0x2218d9[_0x46be53(0x158)],'args':_0x2218d9[_0x46be53(0x117)],'context':await buildServiceContext(_0xacb22d,_0x2218d9)});}async function buildServiceContext(_0x59bcec,_0x2d2e6a){const _0x42568d=a65_0x5b78,_0x253693={'appCode':_0x2d2e6a[_0x42568d(0x141)],'env':_0x2d2e6a[_0x42568d(0x157)],'envName':_0x2d2e6a[_0x42568d(0x157)]};if(!usesRuntimeContext(_0x59bcec))return _0x253693;const _0x4bfe05=await getLoginUserInfo(),_0x54f4dd=pickFirst(_0x4bfe05['userId'],_0x4bfe05['id']);return{..._0x253693,'user':_0x4bfe05,'userId':_0x54f4dd,'id':_0x4bfe05['id'],'username':pickFirst(_0x4bfe05['username'],_0x4bfe05[_0x42568d(0x12e)],_0x4bfe05['loginName']),'userName':_0x4bfe05[_0x42568d(0x12e)],'nickname':pickFirst(_0x4bfe05['nickname'],_0x4bfe05[_0x42568d(0x116)]),'nickName':_0x4bfe05['nickName'],'tenantCode':_0x4bfe05[_0x42568d(0x135)],'employeeId':_0x4bfe05[_0x42568d(0x138)]};}function usesRuntimeContext(_0x48c896){const _0x47f77c=a65_0x5b78;return _0x48c896[_0x47f77c(0x14c)][_0x47f77c(0x115)](_0x3d78a3=>typeof _0x3d78a3[_0x47f77c(0x147)]==='string'&&(_0x3d78a3['source'][_0x47f77c(0x151)](_0x47f77c(0x169))||_0x3d78a3[_0x47f77c(0x147)]['startsWith']('ctx.')));}function pickFirst(..._0x59f566){const _0x9d3729=a65_0x5b78;return _0x59f566[_0x9d3729(0x113)](_0x37cb2b=>_0x37cb2b!==undefined&&_0x37cb2b!==null);}async function executePlan(_0x27c075,_0x7bcdff,_0x1277af){const _0x15dc50=a65_0x5b78;if(_0x27c075[_0x15dc50(0x131)]===_0x15dc50(0x10f)){const _0x4d5182=await resolveDatasetCode(_0x27c075,_0x7bcdff,_0x1277af);return executeData(_0x4d5182,_0x27c075[_0x15dc50(0x13d)],_0x27c075[_0x15dc50(0x125)]);}if(_0x27c075[_0x15dc50(0x131)]==='sql'){if(!_0x27c075['sqlCode'])throw CliErrors['validation'](_0x15dc50(0x13b)+_0x7bcdff[_0x15dc50(0x153)]+_0x15dc50(0x120));return executeSdkSql(_0x27c075[_0x15dc50(0x150)],normalizeScalarParams(_0x27c075[_0x15dc50(0x125)]));}if(_0x27c075['kind']===_0x15dc50(0x165)){const _0x1336cc=_0x27c075[_0x15dc50(0x114)]||_0x27c075[_0x15dc50(0x10c)]||(_0x27c075[_0x15dc50(0x148)]==null?'':String(_0x27c075[_0x15dc50(0x148)]));if(!_0x1336cc)throw CliErrors['validation']('Service\x20command\x20'+_0x7bcdff[_0x15dc50(0x153)]+_0x15dc50(0x13a));return executeSdkBff(_0x1336cc,_0x27c075['params']);}throw CliErrors[_0x15dc50(0x123)](_0x15dc50(0x134)+_0x27c075[_0x15dc50(0x131)]);}function a65_0x5b78(_0x44a44a,_0x59d3df){_0x44a44a=_0x44a44a-0x10b;const _0x1c166e=a65_0x1c16();let _0x5b783e=_0x1c166e[_0x44a44a];return _0x5b783e;}async function resolveDatasetCode(_0x1db582,_0xbc3865,_0x1d9fd8){const _0x41b5f1=a65_0x5b78;if(_0x1db582[_0x41b5f1(0x110)])return _0x1db582['datasetCode'];if(!_0x1db582['datatable'])throw CliErrors['validation'](_0x41b5f1(0x13b)+_0xbc3865['cliPath']+_0x41b5f1(0x137));const _0x330c71=await listDatasets(_0x1d9fd8[_0x41b5f1(0x141)]),_0x3c9711=_0x330c71[_0x41b5f1(0x113)](_0x2c4b2d=>_0x2c4b2d[_0x41b5f1(0x16c)]?.[_0x41b5f1(0x142)]===_0x1db582['datatable']);if(!_0x3c9711?.['code'])throw CliErrors[_0x41b5f1(0x123)]('Cannot\x20resolve\x20datatable\x20\x22'+_0x1db582['datatable']+'\x22\x20to\x20a\x20datasetCode\x20in\x20app\x20'+_0x1d9fd8[_0x41b5f1(0x141)]+'.',_0x41b5f1(0x119));return _0x3c9711[_0x41b5f1(0x168)];}function applyAppBinding(_0x19f2ee,_0x41811c,_0x3a61da){const _0x4bc5d2=a65_0x5b78,_0x4c92e3=_0x41811c[_0x4bc5d2(0x159)][_0x4bc5d2(0x156)];if(!_0x4c92e3)return;const _0x1fb2e7=_0x19f2ee[_0x4bc5d2(0x136)][_0x4c92e3];if(!_0x1fb2e7)throw CliErrors[_0x4bc5d2(0x123)]('Unknown\x20appRef\x20\x22'+_0x4c92e3+_0x4bc5d2(0x145)+_0x41811c[_0x4bc5d2(0x153)]+'.',_0x4bc5d2(0x163));const _0xef0768=_0x1fb2e7[_0x4bc5d2(0x12f)]||_0x1fb2e7[_0x4bc5d2(0x141)];_0xef0768&&!hasText(_0x3a61da[_0x4bc5d2(0x12f)])&&(_0x3a61da[_0x4bc5d2(0x12f)]=_0xef0768),_0x1fb2e7[_0x4bc5d2(0x14e)]&&!hasText(_0x3a61da[_0x4bc5d2(0x14e)])&&!hasText(_0x3a61da[_0x4bc5d2(0x12f)])&&(_0x3a61da['app']=_0x1fb2e7[_0x4bc5d2(0x14e)]),_0x1fb2e7[_0x4bc5d2(0x155)]&&!hasText(_0x3a61da[_0x4bc5d2(0x155)])&&(_0x3a61da['env']=_0x1fb2e7[_0x4bc5d2(0x155)]);}function renderDynamicCommandHelp(_0xf8638){const _0xe9f258=a65_0x5b78,_0x30d61b=[_0xe9f258(0x13c),_0xe9f258(0x152)+_0xf8638['target'][_0xe9f258(0x131)],_0xe9f258(0x149)+_0xf8638['target'][_0xe9f258(0x13d)]];if(_0xf8638[_0xe9f258(0x159)]['datasetCode'])_0x30d61b[_0xe9f258(0x140)](_0xe9f258(0x171)+_0xf8638[_0xe9f258(0x159)][_0xe9f258(0x110)]);if(_0xf8638[_0xe9f258(0x159)]['datatable'])_0x30d61b[_0xe9f258(0x140)](_0xe9f258(0x12a)+_0xf8638[_0xe9f258(0x159)][_0xe9f258(0x143)]);if(_0xf8638[_0xe9f258(0x159)]['sqlCode'])_0x30d61b[_0xe9f258(0x140)](_0xe9f258(0x14b)+_0xf8638['target'][_0xe9f258(0x150)]);if(_0xf8638['target']['scriptName'])_0x30d61b[_0xe9f258(0x140)](_0xe9f258(0x12c)+_0xf8638['target']['scriptName']);if(_0xf8638[_0xe9f258(0x14c)][_0xe9f258(0x16d)]>0x0){_0x30d61b[_0xe9f258(0x140)]('',_0xe9f258(0x111));for(const _0x45753d of _0xf8638['mapTo']){_0x30d61b[_0xe9f258(0x140)](_0xe9f258(0x160)+(_0x45753d['source']||_0xe9f258(0x161))+_0xe9f258(0x118)+_0x45753d['target']+(_0x45753d['operator']?'.'+_0x45753d[_0xe9f258(0x11f)]:''));}}return _0x30d61b[_0xe9f258(0x121)]('\x0a');}function targetPreview(_0x5ca2b1){const _0x5a2a27=a65_0x5b78;return{'kind':_0x5ca2b1['kind'],'command':_0x5ca2b1[_0x5a2a27(0x13d)],'appRef':_0x5ca2b1[_0x5a2a27(0x156)],'datasetCode':_0x5ca2b1[_0x5a2a27(0x110)],'datatable':_0x5ca2b1[_0x5a2a27(0x143)],'sqlCode':_0x5ca2b1[_0x5a2a27(0x150)],'bffCode':_0x5ca2b1['bffCode'],'bffId':_0x5ca2b1[_0x5a2a27(0x148)],'functionName':_0x5ca2b1[_0x5a2a27(0x114)]};}function normalizeScalarParams(_0x5a7419){const _0x4172a8=a65_0x5b78;return Object[_0x4172a8(0x170)](Object[_0x4172a8(0x166)](_0x5a7419)['filter'](([,_0x40a93c])=>typeof _0x40a93c==='string'||typeof _0x40a93c==='number'));}function hasText(_0x29e587){const _0x2bf698=a65_0x5b78;return typeof _0x29e587==='string'&&_0x29e587['trim']()[_0x2bf698(0x16d)]>0x0;}function isPrimitiveFlagDefault(_0x3390aa){return _0x3390aa===undefined||typeof _0x3390aa==='string'||typeof _0x3390aa==='number'||typeof _0x3390aa==='boolean';}
|
|
1
|
+
(function(_0x269569,_0x33dcaa){const _0x4e9c0c=a65_0x368b,_0x5092ee=_0x269569();while(!![]){try{const _0x39d912=-parseInt(_0x4e9c0c(0x123))/0x1+parseInt(_0x4e9c0c(0x12d))/0x2*(parseInt(_0x4e9c0c(0x142))/0x3)+parseInt(_0x4e9c0c(0x16e))/0x4*(-parseInt(_0x4e9c0c(0x139))/0x5)+parseInt(_0x4e9c0c(0x166))/0x6+-parseInt(_0x4e9c0c(0x15c))/0x7*(parseInt(_0x4e9c0c(0x130))/0x8)+parseInt(_0x4e9c0c(0x146))/0x9+parseInt(_0x4e9c0c(0x180))/0xa;if(_0x39d912===_0x33dcaa)break;else _0x5092ee['push'](_0x5092ee['shift']());}catch(_0x10349d){_0x5092ee['push'](_0x5092ee['shift']());}}}(a65_0x809c,0x38015));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_0x809c(){const _0x33402a=['operator','\x22\x20to\x20a\x20datasetCode\x20in\x20app\x20','3160251EFigoZ','\x20\x20\x20\x20datatable:\x20','Run\x20service\x20command\x20','remainingArgs','employeeId','const','ctx.','\x20<command>\x20[flags]','\x20\x20\x20\x20datasetCode:\x20','startsWith','bff','service','\x20\x20\x20\x20','read','kind','fullPath','userName','bffCode','\x20\x20\x20\x20command:\x20','boolean','The\x20manifest\x20marks\x20this\x20command\x20as\x20a\x20write.\x20It\x20may\x20change\x20business\x20data\x20or\x20service\x20state.','code','994MlBRzR','`\x20to\x20inspect\x20the\x20manifest.','\x20\x20MAP\x20TO','mapTo','args','risk','json','length','params','datatable','2295792eEMWsA','dbtableConfig','padEnd','map','join','cliName','tree','validation','92XQcPgi','high-risk-write','find','\x20\x20[','context.','description','appCode','\x20->\x20','\x20service\x20detail\x20--service\x20','data','app','Use\x20`','envName','target','This\x20will\x20run\x20Service\x20Tree\x20command\x20\x22','flags','bffId','flatMap','927560sSlers','push','command','The\x20manifest\x20marks\x20this\x20command\x20as\x20a\x20high-risk\x20write.\x20It\x20may\x20make\x20business\x20changes\x20that\x20are\x20hard\x20to\x20reverse.','sql','rawFlags','SERVICE_TREE','default','\x20requires\x20target.functionName.','env','appRef','Cannot\x20resolve\x20datatable\x20\x22','entries','382371DgMKWo','normalizedManifest','Unknown\x20appRef\x20\x22','name','\x22\x20in\x20service\x20command\x20','Use\x20lovrabet\x20dataset\x20list\x20to\x20confirm\x20the\x20physical\x20table\x20name\x20or\x20add\x20target.datasetCode\x20to\x20the\x20manifest.','source','tableName','appcode','Commands:','2eESWjR','nickName','userId','11048JYKYze','filter','type','string','scriptName','Define\x20the\x20appRef\x20under\x20appBindings\x20or\x20remove\x20target.appRef.','sqlCode','required','commands','57655aiaARs','number','cliPath','enum','datasetCode','now','slice','\x20requires\x20target.sqlCode.','Service\x20command\x20','739668WzxdBb','\x22.\x20'];a65_0x809c=function(){return _0x33402a;};return a65_0x809c();}export function resolveDynamicServiceCommand(_0x40068b,_0x553f8f){const _0x1fef42=a65_0x368b,_0x599f2a=listLocalServiceTrees();let _0x242da7;for(const _0x4d2872 of _0x599f2a){const _0x5d748a=matchServiceTreeCommand(_0x4d2872,_0x40068b);if(!_0x5d748a)continue;(!_0x242da7||_0x5d748a[_0x1fef42(0x182)]['fullPath']['length']>_0x242da7[_0x1fef42(0x182)][_0x1fef42(0x155)][_0x1fef42(0x163)])&&(_0x242da7={'tree':_0x4d2872,'command':_0x5d748a['command'],'remainingArgs':_0x5d748a[_0x1fef42(0x149)]});}if(!_0x242da7)return undefined;const _0x343cc3={..._0x553f8f};return applyAppBinding(_0x242da7[_0x1fef42(0x16c)],_0x242da7[_0x1fef42(0x182)],_0x343cc3),{'definition':buildDynamicCommandDefinition(_0x242da7['tree'],_0x242da7['command']),'args':_0x242da7[_0x1fef42(0x149)],'flags':_0x343cc3,'tree':_0x242da7['tree'],'command':_0x242da7[_0x1fef42(0x182)]};}export function generateDynamicServiceHelp(_0x528c79){const _0x57f773=a65_0x368b,_0x25baf2=listLocalServiceTrees()[_0x57f773(0x170)](_0x5431ac=>_0x5431ac[_0x57f773(0x151)][_0x57f773(0x15b)]===_0x528c79);if(!_0x25baf2)return undefined;const _0x1472ce=[CLI_BIN_NAME+'\x20'+_0x528c79+_0x57f773(0x14d),'',_0x25baf2[_0x57f773(0x151)][_0x57f773(0x126)]||_0x528c79,_0x25baf2[_0x57f773(0x151)][_0x57f773(0x173)]?'\x20\x20'+_0x25baf2['service'][_0x57f773(0x173)]:'','',_0x57f773(0x12c),..._0x25baf2[_0x57f773(0x138)][_0x57f773(0x169)](_0x4e9cf8=>{const _0x3999a9=_0x57f773,_0x1cc11f=_0x4e9cf8[_0x3999a9(0x155)][_0x3999a9(0x13f)](0x1)['join']('\x20'),_0x3dc5d2=_0x4e9cf8[_0x3999a9(0x161)]==='read'?'':'\x20['+_0x4e9cf8[_0x3999a9(0x161)]+']';return'\x20\x20'+_0x1cc11f[_0x3999a9(0x168)](0x18)+'\x20'+(_0x4e9cf8['description']||'')+_0x3dc5d2;}),'',_0x57f773(0x179)+CLI_BIN_NAME+_0x57f773(0x176)+_0x528c79+_0x57f773(0x15d)][_0x57f773(0x131)](Boolean);return _0x1472ce[_0x57f773(0x16a)]('\x0a');}export function listDynamicServiceEntries(){return listLocalServices()['map'](_0x3b078a=>{const _0x28d7e6=a65_0x368b,_0x4bb453=_0x3b078a[_0x28d7e6(0x124)];return{'service':_0x4bb453[_0x28d7e6(0x151)]['code'],'label':_0x4bb453['service'][_0x28d7e6(0x126)]||_0x4bb453[_0x28d7e6(0x151)][_0x28d7e6(0x15b)],'commands':_0x4bb453[_0x28d7e6(0x138)][_0x28d7e6(0x169)](_0x5a0cad=>({'command':dynamicCommandName(_0x5a0cad),'description':_0x5a0cad[_0x28d7e6(0x173)]||_0x28d7e6(0x148)+_0x5a0cad[_0x28d7e6(0x13b)],'tag':riskTag(_0x5a0cad[_0x28d7e6(0x161)])}))};});}export function getDynamicServiceEntry(_0xf77911){const _0x1755f6=a65_0x368b;return listDynamicServiceEntries()[_0x1755f6(0x170)](_0x368123=>_0x368123[_0x1755f6(0x151)]===_0xf77911);}export function listDynamicServiceDefinitions(_0x2e3ea7){const _0x32e0e2=a65_0x368b;return listLocalServiceTrees()[_0x32e0e2(0x131)](_0x3e1adc=>!_0x2e3ea7||_0x3e1adc[_0x32e0e2(0x151)]['code']===_0x2e3ea7)[_0x32e0e2(0x17f)](_0x300815=>_0x300815[_0x32e0e2(0x138)]['map'](_0x4639ff=>buildDynamicCommandDefinition(_0x300815,_0x4639ff)));}export function getDynamicServiceDefinitions(_0x1ea911){const _0x13a143=a65_0x368b,_0x2b135b=listDynamicServiceDefinitions(_0x1ea911);return _0x2b135b[_0x13a143(0x163)]>0x0?_0x2b135b:undefined;}export function findDynamicServiceDefinition(_0x35a23d,_0x2c73d6){const _0xf01fa4=a65_0x368b;return listDynamicServiceDefinitions(_0x35a23d)[_0xf01fa4(0x170)](_0x534f13=>_0x534f13[_0xf01fa4(0x182)]===_0x2c73d6);}export function buildDynamicCommandDefinition(_0x34c697,_0x4545cc){const _0x1bbb64=a65_0x368b;return{'service':_0x34c697[_0x1bbb64(0x151)][_0x1bbb64(0x15b)],'command':dynamicCommandName(_0x4545cc),'description':_0x4545cc[_0x1bbb64(0x173)]||'Run\x20service\x20command\x20'+_0x4545cc[_0x1bbb64(0x13b)],'risk':_0x4545cc[_0x1bbb64(0x161)],..._0x4545cc[_0x1bbb64(0x161)]===_0x1bbb64(0x153)?{}:{'confirmationDescription':buildDynamicConfirmationDescription(_0x4545cc)},'requiresAuth':!![],'requiresAppCode':!![],'args':_0x4545cc[_0x1bbb64(0x160)]['map'](_0x34cc04=>({'name':_0x34cc04['name'],'description':_0x34cc04['description']||_0x34cc04[_0x1bbb64(0x126)],'required':_0x34cc04[_0x1bbb64(0x137)]})),'flags':_0x4545cc[_0x1bbb64(0x17d)]['map'](flagToCommandFlag),'helpExtra':()=>renderDynamicCommandHelp(_0x4545cc),async 'dryRun'(_0x316204){const _0x1169a7=_0x1bbb64,_0x5ad02d=await compilePlan(_0x4545cc,_0x316204);return{'method':_0x1169a7(0x186),'url':_0x4545cc[_0x1169a7(0x13b)],'body':{'target':targetPreview(_0x5ad02d),'params':_0x5ad02d['params']},'description':'Preview\x20dynamic\x20service\x20command:\x20'+_0x4545cc[_0x1169a7(0x13b)]};},async 'execute'(_0x4ed75d){const _0x1f5354=_0x1bbb64,_0x51bc35=await compilePlan(_0x4545cc,_0x4ed75d),_0x321cba=Date[_0x1f5354(0x13e)](),_0x3a5b22=await executePlan(_0x51bc35,_0x4545cc,_0x4ed75d),_0x40e1e8=Date['now']()-_0x321cba;return{'ok':!![],'data':{'service':_0x34c697[_0x1f5354(0x151)],'command':_0x4545cc[_0x1f5354(0x13b)],'target':targetPreview(_0x51bc35),'result':_0x3a5b22,'elapsed':_0x40e1e8},'message':'Service\x20command\x20'+_0x4545cc[_0x1f5354(0x13b)]+'\x20completed\x20in\x20'+_0x40e1e8+'ms'};}};}function buildDynamicConfirmationDescription(_0x2771ec){const _0x34c7dc=a65_0x368b,_0x3a5a6c=_0x2771ec[_0x34c7dc(0x173)]||_0x2771ec[_0x34c7dc(0x13b)],_0x342276=_0x2771ec[_0x34c7dc(0x161)]===_0x34c7dc(0x16f)?_0x34c7dc(0x183):_0x34c7dc(0x15a);return _0x34c7dc(0x17c)+_0x3a5a6c+_0x34c7dc(0x143)+_0x342276;}function dynamicCommandName(_0x36cfd0){const _0x58aded=a65_0x368b;return _0x36cfd0[_0x58aded(0x155)][_0x58aded(0x13f)](0x1)[_0x58aded(0x16a)]('\x20');}function riskTag(_0x456726){const _0xaf3c4a=a65_0x368b;return _0x456726===_0xaf3c4a(0x153)?'':_0xaf3c4a(0x171)+_0x456726+']';}function flagToCommandFlag(_0x37c8dc){const _0x81deb2=a65_0x368b;return{'name':_0x37c8dc[_0x81deb2(0x16b)],'type':_0x37c8dc[_0x81deb2(0x132)]===_0x81deb2(0x162)?_0x81deb2(0x133):_0x37c8dc[_0x81deb2(0x132)],'description':_0x37c8dc[_0x81deb2(0x173)]||_0x37c8dc[_0x81deb2(0x126)],'required':_0x37c8dc[_0x81deb2(0x137)],'default':isPrimitiveFlagDefault(_0x37c8dc[_0x81deb2(0x187)])?_0x37c8dc[_0x81deb2(0x187)]:undefined,'enum':_0x37c8dc[_0x81deb2(0x13c)]};}async function compilePlan(_0x2b94a4,_0xff85c2){const _0x230165=a65_0x368b;return compileServiceTreeCommand(_0x2b94a4,{'flags':_0xff85c2[_0x230165(0x185)],'args':_0xff85c2[_0x230165(0x160)],'context':await buildServiceContext(_0x2b94a4,_0xff85c2)});}async function buildServiceContext(_0x5fef2d,_0x212aa8){const _0x2cc54f=a65_0x368b,_0xbe01b7={'appCode':_0x212aa8[_0x2cc54f(0x174)],'env':_0x212aa8['envName'],'envName':_0x212aa8[_0x2cc54f(0x17a)]};if(!usesRuntimeContext(_0x5fef2d))return _0xbe01b7;const _0x4040fe=await getLoginUserInfo(),_0x5e3052=pickFirst(_0x4040fe[_0x2cc54f(0x12f)],_0x4040fe['id']);return{..._0xbe01b7,'user':_0x4040fe,'userId':_0x5e3052,'id':_0x4040fe['id'],'username':pickFirst(_0x4040fe['username'],_0x4040fe[_0x2cc54f(0x156)],_0x4040fe['loginName']),'userName':_0x4040fe[_0x2cc54f(0x156)],'nickname':pickFirst(_0x4040fe['nickname'],_0x4040fe[_0x2cc54f(0x12e)]),'nickName':_0x4040fe[_0x2cc54f(0x12e)],'tenantCode':_0x4040fe['tenantCode'],'employeeId':_0x4040fe[_0x2cc54f(0x14a)]};}function usesRuntimeContext(_0x29dfbe){const _0x37d7a4=a65_0x368b;return _0x29dfbe[_0x37d7a4(0x15f)]['some'](_0x326ab5=>typeof _0x326ab5[_0x37d7a4(0x129)]===_0x37d7a4(0x133)&&(_0x326ab5[_0x37d7a4(0x129)][_0x37d7a4(0x14f)](_0x37d7a4(0x172))||_0x326ab5[_0x37d7a4(0x129)][_0x37d7a4(0x14f)](_0x37d7a4(0x14c))));}function pickFirst(..._0x3379e7){return _0x3379e7['find'](_0x3615fc=>_0x3615fc!==undefined&&_0x3615fc!==null);}async function executePlan(_0x3e0fcf,_0xbcd00,_0x2ba436){const _0x9a8ad2=a65_0x368b;if(_0x3e0fcf[_0x9a8ad2(0x154)]===_0x9a8ad2(0x177)){const _0x5162bf=await resolveDatasetCode(_0x3e0fcf,_0xbcd00,_0x2ba436);return executeData(_0x5162bf,_0x3e0fcf[_0x9a8ad2(0x182)],_0x3e0fcf['params']);}if(_0x3e0fcf['kind']===_0x9a8ad2(0x184)){if(!_0x3e0fcf[_0x9a8ad2(0x136)])throw CliErrors[_0x9a8ad2(0x16d)](_0x9a8ad2(0x141)+_0xbcd00['cliPath']+_0x9a8ad2(0x140));return executeSdkSql(_0x3e0fcf[_0x9a8ad2(0x136)],normalizeScalarParams(_0x3e0fcf[_0x9a8ad2(0x164)]));}if(_0x3e0fcf[_0x9a8ad2(0x154)]===_0x9a8ad2(0x150)){const _0x83bc2=_0x3e0fcf[_0x9a8ad2(0x134)]||_0x3e0fcf['bffCode']||(_0x3e0fcf[_0x9a8ad2(0x17e)]==null?'':String(_0x3e0fcf[_0x9a8ad2(0x17e)]));if(!_0x83bc2)throw CliErrors[_0x9a8ad2(0x16d)](_0x9a8ad2(0x141)+_0xbcd00[_0x9a8ad2(0x13b)]+_0x9a8ad2(0x11e));return executeSdkBff(_0x83bc2,_0x3e0fcf[_0x9a8ad2(0x164)]);}throw CliErrors['validation']('Unsupported\x20service\x20target\x20kind:\x20'+_0x3e0fcf['kind']);}async function resolveDatasetCode(_0x210698,_0x437be0,_0x56e36f){const _0x4cbf07=a65_0x368b;if(_0x210698[_0x4cbf07(0x13d)])return _0x210698[_0x4cbf07(0x13d)];if(!_0x210698[_0x4cbf07(0x165)])throw CliErrors['validation'](_0x4cbf07(0x141)+_0x437be0[_0x4cbf07(0x13b)]+'\x20requires\x20target.datasetCode\x20or\x20target.datatable.');const _0x4d5953=await listDatasets(_0x56e36f[_0x4cbf07(0x174)]),_0x531263=_0x4d5953['find'](_0x4deedc=>_0x4deedc[_0x4cbf07(0x167)]?.[_0x4cbf07(0x12a)]===_0x210698[_0x4cbf07(0x165)]);if(!_0x531263?.[_0x4cbf07(0x15b)])throw CliErrors[_0x4cbf07(0x16d)](_0x4cbf07(0x121)+_0x210698[_0x4cbf07(0x165)]+_0x4cbf07(0x145)+_0x56e36f['appCode']+'.',_0x4cbf07(0x128));return _0x531263[_0x4cbf07(0x15b)];}function applyAppBinding(_0x810571,_0x30686a,_0x2268bb){const _0x36ad68=a65_0x368b,_0x554b3c=_0x30686a['target'][_0x36ad68(0x120)];if(!_0x554b3c)return;const _0x34dc4d=_0x810571['appBindings'][_0x554b3c];if(!_0x34dc4d)throw CliErrors[_0x36ad68(0x16d)](_0x36ad68(0x125)+_0x554b3c+_0x36ad68(0x127)+_0x30686a[_0x36ad68(0x13b)]+'.',_0x36ad68(0x135));const _0xde99b6=_0x34dc4d['appcode']||_0x34dc4d[_0x36ad68(0x174)];_0xde99b6&&!hasText(_0x2268bb[_0x36ad68(0x12b)])&&(_0x2268bb[_0x36ad68(0x12b)]=_0xde99b6),_0x34dc4d[_0x36ad68(0x178)]&&!hasText(_0x2268bb['app'])&&!hasText(_0x2268bb[_0x36ad68(0x12b)])&&(_0x2268bb[_0x36ad68(0x178)]=_0x34dc4d[_0x36ad68(0x178)]),_0x34dc4d[_0x36ad68(0x11f)]&&!hasText(_0x2268bb[_0x36ad68(0x11f)])&&(_0x2268bb[_0x36ad68(0x11f)]=_0x34dc4d[_0x36ad68(0x11f)]);}function renderDynamicCommandHelp(_0x174a23){const _0x31158e=a65_0x368b,_0x43eb76=['\x20\x20SERVICE\x20TREE\x20TARGET','\x20\x20\x20\x20kind:\x20\x20\x20\x20'+_0x174a23[_0x31158e(0x17b)][_0x31158e(0x154)],_0x31158e(0x158)+_0x174a23[_0x31158e(0x17b)][_0x31158e(0x182)]];if(_0x174a23['target']['datasetCode'])_0x43eb76['push'](_0x31158e(0x14e)+_0x174a23[_0x31158e(0x17b)][_0x31158e(0x13d)]);if(_0x174a23[_0x31158e(0x17b)][_0x31158e(0x165)])_0x43eb76['push'](_0x31158e(0x147)+_0x174a23['target'][_0x31158e(0x165)]);if(_0x174a23[_0x31158e(0x17b)][_0x31158e(0x136)])_0x43eb76[_0x31158e(0x181)]('\x20\x20\x20\x20sqlCode:\x20'+_0x174a23['target'][_0x31158e(0x136)]);if(_0x174a23[_0x31158e(0x17b)][_0x31158e(0x134)])_0x43eb76['push']('\x20\x20\x20\x20functionName:\x20'+_0x174a23[_0x31158e(0x17b)]['scriptName']);if(_0x174a23[_0x31158e(0x15f)]['length']>0x0){_0x43eb76['push']('',_0x31158e(0x15e));for(const _0x1d346f of _0x174a23['mapTo']){_0x43eb76[_0x31158e(0x181)](_0x31158e(0x152)+(_0x1d346f[_0x31158e(0x129)]||_0x31158e(0x14b))+_0x31158e(0x175)+_0x1d346f['target']+(_0x1d346f[_0x31158e(0x144)]?'.'+_0x1d346f[_0x31158e(0x144)]:''));}}return _0x43eb76[_0x31158e(0x16a)]('\x0a');}function a65_0x368b(_0x3c08e5,_0x4dbfbb){_0x3c08e5=_0x3c08e5-0x11e;const _0x809c3e=a65_0x809c();let _0x368b51=_0x809c3e[_0x3c08e5];return _0x368b51;}function targetPreview(_0x514de4){const _0x40b0bd=a65_0x368b;return{'kind':_0x514de4[_0x40b0bd(0x154)],'command':_0x514de4[_0x40b0bd(0x182)],'appRef':_0x514de4[_0x40b0bd(0x120)],'datasetCode':_0x514de4[_0x40b0bd(0x13d)],'datatable':_0x514de4['datatable'],'sqlCode':_0x514de4[_0x40b0bd(0x136)],'bffCode':_0x514de4[_0x40b0bd(0x157)],'bffId':_0x514de4[_0x40b0bd(0x17e)],'functionName':_0x514de4[_0x40b0bd(0x134)]};}function normalizeScalarParams(_0x721be5){const _0x288ad7=a65_0x368b;return Object['fromEntries'](Object[_0x288ad7(0x122)](_0x721be5)[_0x288ad7(0x131)](([,_0x3964e9])=>typeof _0x3964e9===_0x288ad7(0x133)||typeof _0x3964e9==='number'));}function hasText(_0x14d6d4){const _0x2c1a55=a65_0x368b;return typeof _0x14d6d4===_0x2c1a55(0x133)&&_0x14d6d4['trim']()[_0x2c1a55(0x163)]>0x0;}function isPrimitiveFlagDefault(_0x457463){const _0x550d44=a65_0x368b;return _0x457463===undefined||typeof _0x457463==='string'||typeof _0x457463===_0x550d44(0x13a)||typeof _0x457463===_0x550d44(0x159);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x43e4b6,_0x378c91){const _0xad3e41=a66_0x56a3,_0x41eb5d=_0x43e4b6();while(!![]){try{const _0x237f51=parseInt(_0xad3e41(0x6a))/0x1+-parseInt(_0xad3e41(0x8e))/0x2*(-parseInt(_0xad3e41(0x8b))/0x3)+-parseInt(_0xad3e41(0x73))/0x4*(-parseInt(_0xad3e41(0x7c))/0x5)+-parseInt(_0xad3e41(0x8a))/0x6+-parseInt(_0xad3e41(0x7e))/0x7*(-parseInt(_0xad3e41(0x82))/0x8)+-parseInt(_0xad3e41(0x71))/0x9*(parseInt(_0xad3e41(0x6c))/0xa)+parseInt(_0xad3e41(0x91))/0xb*(parseInt(_0xad3e41(0x81))/0xc);if(_0x237f51===_0x378c91)break;else _0x41eb5d['push'](_0x41eb5d['shift']());}catch(_0x195a40){_0x41eb5d['push'](_0x41eb5d['shift']());}}}(a66_0x1e53,0x9a769));export function adaptServiceTreeManifestForLegacyFramework(_0x45a981){const _0xfc663a=a66_0x56a3,_0xe1399f=cloneJsonValue(_0x45a981),_0x5e5255=[];if(!isObjectRecord(_0xe1399f))return{'manifest':_0xe1399f,'errors':_0x5e5255};return Array['isArray'](_0xe1399f[_0xfc663a(0x7f)])&&_0xe1399f[_0xfc663a(0x7f)][_0xfc663a(0x78)]((_0xc36091,_0x5ca6e4)=>{const _0x19c002=_0xfc663a;if(!isObjectRecord(_0xc36091))return;adaptBffTarget(_0xc36091['target'],_0x19c002(0x92)+_0x5ca6e4+_0x19c002(0x83),_0x5e5255);}),adaptResources(_0xe1399f[_0xfc663a(0x84)],'$.resources',_0x5e5255),{'manifest':_0xe1399f,'errors':_0x5e5255};}export function toPublicServiceTreeTarget(_0x5b8aed){const _0x59f6fc=a66_0x56a3,{scriptName:_0x106208,..._0x11842b}=_0x5b8aed;return typeof _0x106208==='string'&&_0x106208[_0x59f6fc(0x89)]()&&(_0x11842b['functionName']=_0x106208),_0x11842b;}export function toPublicNormalizedServiceTree(_0x51db12){const _0x27bb0f=a66_0x56a3;return{..._0x51db12,'commands':_0x51db12[_0x27bb0f(0x7f)][_0x27bb0f(0x77)](_0x57b766=>({..._0x57b766,'target':toPublicServiceTreeTarget(_0x57b766[_0x27bb0f(0x85)])}))};}function adaptResources(_0x3152e1,_0x4a5f9b,_0x3ddf29){const _0x313e78=a66_0x56a3;if(!isObjectRecord(_0x3152e1))return;for(const [_0x3511e9,_0x58edca]of Object[_0x313e78(0x7a)](_0x3152e1)){if(!isObjectRecord(_0x58edca))continue;const _0x5d6d6c=_0x4a5f9b+'.'+_0x3511e9;if(isObjectRecord(_0x58edca['actions']))for(const [_0x360f4b,_0x4ab414]of Object[_0x313e78(0x7a)](_0x58edca[_0x313e78(0x79)])){if(!isObjectRecord(_0x4ab414))continue;const _0xd7f512=_0x5d6d6c+_0x313e78(0x7b)+_0x360f4b,_0x3b7224=isObjectRecord(_0x4ab414[_0x313e78(0x85)])&&_0x4ab414[_0x313e78(0x85)][_0x313e78(0x76)]===_0x313e78(0x8c);adaptBffTarget(_0x4ab414['target'],_0xd7f512+_0x313e78(0x7d),_0x3ddf29),(_0x3b7224||isBffAction(_0x4ab414))&&adaptFunctionNameField(_0x4ab414,_0xd7f512,_0x3ddf29);}adaptResources(_0x58edca[_0x313e78(0x84)],_0x5d6d6c+'.resources',_0x3ddf29);}}function adaptBffTarget(_0xd1400b,_0x3a3fdc,_0x3d72ef){if(!isObjectRecord(_0xd1400b)||_0xd1400b['kind']!=='bff')return;adaptFunctionNameField(_0xd1400b,_0x3a3fdc,_0x3d72ef);}function adaptFunctionNameField(_0x1111c7,_0x548c37,_0x239e30){const _0x4e27d8=a66_0x56a3;Object[_0x4e27d8(0x6b)]['hasOwnProperty'][_0x4e27d8(0x88)](_0x1111c7,_0x4e27d8(0x8d))&&_0x239e30['push']({'level':'error','path':_0x548c37+_0x4e27d8(0x74),'message':_0x4e27d8(0x8f)});if(Object[_0x4e27d8(0x6b)][_0x4e27d8(0x70)]['call'](_0x1111c7,_0x4e27d8(0x6f))){if(typeof _0x1111c7['functionName']!==_0x4e27d8(0x6e)||!_0x1111c7[_0x4e27d8(0x6f)][_0x4e27d8(0x89)]()){_0x239e30[_0x4e27d8(0x87)]({'level':_0x4e27d8(0x93),'path':_0x548c37+'.functionName','message':_0x4e27d8(0x90)}),delete _0x1111c7['functionName'];return;}_0x1111c7[_0x4e27d8(0x8d)]=_0x1111c7[_0x4e27d8(0x6f)],delete _0x1111c7['functionName'];}}function a66_0x1e53(){const _0x5e676b=['hasOwnProperty','15399VGSIVI','bff.exec','100DbVKRK','.scriptName','action','kind','map','forEach','actions','entries','.actions.','12235vpOpjr','.target','48832lNzVZV','commands','object','200544UYVFkL','584hOoUCR','].target','resources','target','fromEntries','push','call','trim','526542skUdyQ','3mEsyUg','bff','scriptName','671516IjjcCL','Use\x20functionName;\x20scriptName\x20is\x20not\x20part\x20of\x20the\x20runtime\x20Service\x20Tree\x20contract.','functionName\x20must\x20be\x20a\x20non-empty\x20string.','77jewOLP','$.commands[','error','116468NehMPH','prototype','2450ljHpxY','isArray','string','functionName'];a66_0x1e53=function(){return _0x5e676b;};return a66_0x1e53();}function a66_0x56a3(_0x259057,_0x311ce4){_0x259057=_0x259057-0x6a;const _0x1e538c=a66_0x1e53();let _0x56a39d=_0x1e538c[_0x259057];return _0x56a39d;}function isBffAction(_0x3a8b7d){const _0x232184=a66_0x56a3;return _0x3a8b7d[_0x232184(0x76)]==='bff'||_0x3a8b7d[_0x232184(0x75)]===_0x232184(0x72)||_0x3a8b7d[_0x232184(0x85)]===_0x232184(0x72);}function cloneJsonValue(_0x2069f9){const _0xc2911e=a66_0x56a3;if(Array[_0xc2911e(0x6d)](_0x2069f9))return _0x2069f9[_0xc2911e(0x77)](_0x236f05=>cloneJsonValue(_0x236f05));if(isObjectRecord(_0x2069f9))return Object[_0xc2911e(0x86)](Object[_0xc2911e(0x7a)](_0x2069f9)[_0xc2911e(0x77)](([_0x76e378,_0x3f9555])=>[_0x76e378,cloneJsonValue(_0x3f9555)]));return _0x2069f9;}function isObjectRecord(_0x544125){const _0x399940=a66_0x56a3;return Boolean(_0x544125)&&typeof _0x544125===_0x399940(0x80)&&!Array['isArray'](_0x544125);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a67_0x14f0(){const _0x122aae=['Service\x20Tree\x20manifest\x20file\x20path','version','serviceCode','filePath','description','registryServiceCode','Import\x20a\x20Service\x20Tree\x20manifest\x20into\x20the\x20local\x20runtime\x20registry','commands','entry','read','Validate\x20a\x20Service\x20Tree\x20JSON\x20manifest','registry','name','160912gXPVKJ','\x20service(s).','updated','lower\x20kebab-case\x20service\x20code','1187154MaQjgJ','source','imported','replaced','required','manifests','Imported','Preview\x20Service\x20Tree\x20removal\x20from\x20~/.lovrabet/service.json','206922wszFGd','importedAt','119BFAitq','List\x20locally\x20imported\x20Service\x20Tree\x20manifests','Preview\x20Service\x20Tree\x20import\x20into\x20~/.lovrabet/service.json','service','120644iBzLkR','map','length','write','Reads\x20the\x20given\x20manifest\x20into\x20the\x20local\x20Service\x20Tree\x20registry.\x20An\x20existing\x20manifest\x20with\x20the\x20same\x20service\x20code\x20is\x20updated.\x20The\x20confirmation\x20UI\x20does\x20not\x20show\x20local\x20file\x20paths.','manifest','Remove\x20a\x20Service\x20Tree\x20manifest\x20from\x20the\x20local\x20runtime\x20registry','3307158dgaEyN','type','hash','1085490qfsISV','Show\x20a\x20locally\x20imported\x20Service\x20Tree\x20manifest','kind','export','Imported\x20','536888qlZnvw','serviceCount','validate','str','target','3GAJopw','8TbHkEO','string','flags','Local\x20service\x20code,\x20for\x20example\x20crm','WRITE','errors','Export\x20the\x20local\x20Service\x20Tree\x20manifest\x20to\x20a\x20JSON\x20file','cliName','detail','entries','registryPath','normalizedManifest','file','report','10QeZGOg','warnings'];a67_0x14f0=function(){return _0x122aae;};return a67_0x14f0();}function a67_0x4c67(_0x4c9666,_0x1a7652){_0x4c9666=_0x4c9666-0x1af;const _0x14f0ec=a67_0x14f0();let _0x4c6737=_0x14f0ec[_0x4c9666];return _0x4c6737;}const a67_0x176f3c=a67_0x4c67;(function(_0x5714bf,_0x999f58){const _0x1f15f6=a67_0x4c67,_0x1031b8=_0x5714bf();while(!![]){try{const _0x27c4ca=parseInt(_0x1f15f6(0x1f1))/0x1+parseInt(_0x1f15f6(0x1b1))/0x2+-parseInt(_0x1f15f6(0x1d3))/0x3*(-parseInt(_0x1f15f6(0x1bf))/0x4)+-parseInt(_0x1f15f6(0x1c9))/0x5+parseInt(_0x1f15f6(0x1b9))/0x6*(-parseInt(_0x1f15f6(0x1bb))/0x7)+parseInt(_0x1f15f6(0x1d4))/0x8*(parseInt(_0x1f15f6(0x1c6))/0x9)+-parseInt(_0x1f15f6(0x1e2))/0xa*(parseInt(_0x1f15f6(0x1ce))/0xb);if(_0x27c4ca===_0x999f58)break;else _0x1031b8['push'](_0x1031b8['shift']());}catch(_0x1604e0){_0x1031b8['push'](_0x1031b8['shift']());}}}(a67_0x14f0,0x49397));import{exportServiceManifest,formatValidationFailure,getLocalServiceEntry,getServiceRegistryPath,importServiceManifest,listLocalServices,loadServiceManifestFromFile,removeServiceManifest}from'../../commands/service/registry.js';import{toPublicNormalizedServiceTree,toPublicServiceTreeTarget}from'../../commands/service/function-name-adapter.js';const FILE_FLAG={'name':a67_0x176f3c(0x1e0),'type':a67_0x176f3c(0x1d5),'required':!![],'description':a67_0x176f3c(0x1e4)},SERVICE_FLAG={'name':a67_0x176f3c(0x1be),'type':a67_0x176f3c(0x1d5),'required':!![],'description':a67_0x176f3c(0x1d7),'pattern':{'regex':/^[a-z][a-z0-9-]*$/,'description':a67_0x176f3c(0x1b0)}};function summarizeService(_0x2a987a){const _0xd2c140=a67_0x176f3c;return{'serviceCode':_0x2a987a[_0xd2c140(0x1e6)],'name':_0x2a987a[_0xd2c140(0x1df)][_0xd2c140(0x1be)][_0xd2c140(0x1f0)],'version':_0x2a987a[_0xd2c140(0x1e5)],'importedAt':_0x2a987a[_0xd2c140(0x1ba)],'source':_0x2a987a[_0xd2c140(0x1b2)],'commandCount':_0x2a987a[_0xd2c140(0x1df)][_0xd2c140(0x1eb)][_0xd2c140(0x1c1)],'commands':_0x2a987a[_0xd2c140(0x1df)][_0xd2c140(0x1eb)][_0xd2c140(0x1c0)](_0x368e0f=>({'path':_0x368e0f['cliPath'],'description':_0x368e0f[_0xd2c140(0x1e8)],'risk':_0x368e0f['risk'],'target':toPublicServiceTreeTarget(_0x368e0f[_0xd2c140(0x1d2)]),'flags':_0x368e0f[_0xd2c140(0x1d6)][_0xd2c140(0x1c0)](_0x2e8d16=>({'name':_0x2e8d16[_0xd2c140(0x1f0)],'cliName':_0x2e8d16[_0xd2c140(0x1db)],'type':_0x2e8d16[_0xd2c140(0x1c7)],'required':_0x2e8d16[_0xd2c140(0x1b5)]===!![]}))}))};}function summarizeLoadedManifest(_0x11210d){const _0x175529=a67_0x176f3c;return{'service':_0x11210d[_0x175529(0x1df)]?.['service'],'version':_0x11210d[_0x175529(0x1df)]?.[_0x175529(0x1e5)],'commandCount':_0x11210d[_0x175529(0x1df)]?.[_0x175529(0x1eb)][_0x175529(0x1c1)]??0x0,'commands':_0x11210d[_0x175529(0x1df)]?.[_0x175529(0x1eb)][_0x175529(0x1c0)](_0x40aaf5=>({'path':_0x40aaf5['cliPath'],'risk':_0x40aaf5['risk'],'target':toPublicServiceTreeTarget(_0x40aaf5['target'])}))??[],'registryIndex':_0x11210d['registryIndex'],'registryServiceCode':_0x11210d[_0x175529(0x1e9)],'errors':_0x11210d['report'][_0x175529(0x1d9)],'warnings':_0x11210d[_0x175529(0x1e1)]['warnings']};}export const serviceDefinitions=[{'service':'service','command':a67_0x176f3c(0x1d0),'description':a67_0x176f3c(0x1ee),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'execute'(_0x1ef0af){const _0x56054f=a67_0x176f3c,_0x5805a4=loadServiceManifestFromFile(_0x1ef0af[_0x56054f(0x1d1)](_0x56054f(0x1e0)));if(!_0x5805a4[_0x56054f(0x1e1)]['ok'])return{'ok':![],'data':{'file':_0x5805a4[_0x56054f(0x1e7)],'hash':_0x5805a4[_0x56054f(0x1c8)],'kind':_0x5805a4[_0x56054f(0x1cb)],'serviceCount':_0x5805a4[_0x56054f(0x1b6)][_0x56054f(0x1c1)],'services':_0x5805a4[_0x56054f(0x1b6)]['map'](summarizeLoadedManifest),'errors':_0x5805a4[_0x56054f(0x1e1)][_0x56054f(0x1d9)],'warnings':_0x5805a4[_0x56054f(0x1e1)][_0x56054f(0x1e3)]},'message':formatValidationFailure(_0x5805a4[_0x56054f(0x1e1)])};if(_0x5805a4['kind']===_0x56054f(0x1ef)||_0x5805a4[_0x56054f(0x1b6)]['length']!==0x1)return{'ok':!![],'data':{'file':_0x5805a4[_0x56054f(0x1e7)],'hash':_0x5805a4[_0x56054f(0x1c8)],'kind':_0x5805a4['kind'],'serviceCount':_0x5805a4[_0x56054f(0x1b6)][_0x56054f(0x1c1)],'commandCount':_0x5805a4[_0x56054f(0x1b6)]['reduce']((_0x3fd536,_0x48e531)=>_0x3fd536+(_0x48e531[_0x56054f(0x1df)]?.[_0x56054f(0x1eb)][_0x56054f(0x1c1)]??0x0),0x0),'services':_0x5805a4['manifests'][_0x56054f(0x1c0)](summarizeLoadedManifest),'warnings':_0x5805a4[_0x56054f(0x1e1)]['warnings']},'message':'Service\x20registry\x20validation\x20passed.'};return{'ok':!![],'data':{'file':_0x5805a4[_0x56054f(0x1e7)],'hash':_0x5805a4[_0x56054f(0x1c8)],'kind':_0x5805a4['kind'],'service':_0x5805a4[_0x56054f(0x1df)]?.[_0x56054f(0x1be)],'version':_0x5805a4[_0x56054f(0x1df)]?.[_0x56054f(0x1e5)],'commandCount':_0x5805a4[_0x56054f(0x1df)]?.[_0x56054f(0x1eb)][_0x56054f(0x1c1)]??0x0,'commands':_0x5805a4[_0x56054f(0x1df)]?.[_0x56054f(0x1eb)][_0x56054f(0x1c0)](_0x5e5850=>({'path':_0x5e5850['cliPath'],'risk':_0x5e5850['risk'],'target':toPublicServiceTreeTarget(_0x5e5850[_0x56054f(0x1d2)])})),'warnings':_0x5805a4['report'][_0x56054f(0x1e3)]},'message':'Service\x20manifest\x20validation\x20passed.'};}},{'service':a67_0x176f3c(0x1be),'command':'import','description':a67_0x176f3c(0x1ea),'risk':'write','confirmationDescription':a67_0x176f3c(0x1c3),'requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'dryRun'(_0x527c2e){const _0x2341a3=a67_0x176f3c,_0x11e3ad=loadServiceManifestFromFile(_0x527c2e['str'](_0x2341a3(0x1e0)));return{'method':'WRITE','url':getServiceRegistryPath(),'body':{'file':_0x11e3ad[_0x2341a3(0x1e7)],'hash':_0x11e3ad[_0x2341a3(0x1c8)],'kind':_0x11e3ad[_0x2341a3(0x1cb)],'ok':_0x11e3ad[_0x2341a3(0x1e1)]['ok'],'service':_0x11e3ad[_0x2341a3(0x1df)]?.['service'],'version':_0x11e3ad[_0x2341a3(0x1df)]?.[_0x2341a3(0x1e5)],'serviceCount':_0x11e3ad['manifests']['length'],'services':_0x11e3ad['manifests'][_0x2341a3(0x1c0)](_0x3aa5a3=>({'service':_0x3aa5a3[_0x2341a3(0x1df)]?.[_0x2341a3(0x1be)],'version':_0x3aa5a3[_0x2341a3(0x1df)]?.[_0x2341a3(0x1e5)],'commandCount':_0x3aa5a3[_0x2341a3(0x1df)]?.['commands'][_0x2341a3(0x1c1)]??0x0,'errors':_0x3aa5a3[_0x2341a3(0x1e1)]['errors']})),'errors':_0x11e3ad[_0x2341a3(0x1e1)]['errors'],'commandCount':_0x11e3ad[_0x2341a3(0x1df)]?.[_0x2341a3(0x1eb)][_0x2341a3(0x1c1)]??0x0},'description':_0x2341a3(0x1bd)};},async 'execute'(_0x3bf514){const _0x2ab257=a67_0x176f3c,_0x42a8d4=importServiceManifest(_0x3bf514[_0x2ab257(0x1d1)]('file'));if(_0x42a8d4[_0x2ab257(0x1dd)]['length']!==0x1)return{'ok':!![],'data':{'registryPath':_0x42a8d4[_0x2ab257(0x1de)],'imported':_0x42a8d4['imported'],'updated':_0x42a8d4[_0x2ab257(0x1af)],'serviceCount':_0x42a8d4[_0x2ab257(0x1cf)],'services':_0x42a8d4['entries'][_0x2ab257(0x1c0)](summarizeService)},'message':_0x2ab257(0x1cd)+_0x42a8d4[_0x2ab257(0x1b3)]+'\x20service(s),\x20updated\x20'+_0x42a8d4[_0x2ab257(0x1af)]+_0x2ab257(0x1f2)};return{'ok':!![],'data':{'registryPath':_0x42a8d4['registryPath'],'replaced':_0x42a8d4[_0x2ab257(0x1b4)],'imported':_0x42a8d4[_0x2ab257(0x1b3)],'updated':_0x42a8d4['updated'],'serviceCount':_0x42a8d4['serviceCount'],'service':summarizeService(_0x42a8d4[_0x2ab257(0x1ec)])},'message':(_0x42a8d4[_0x2ab257(0x1b4)]?'Updated':_0x2ab257(0x1b7))+'\x20service\x20'+_0x42a8d4[_0x2ab257(0x1ec)][_0x2ab257(0x1e6)]+'.'};}},{'service':a67_0x176f3c(0x1be),'command':a67_0x176f3c(0x1cc),'description':a67_0x176f3c(0x1da),'risk':a67_0x176f3c(0x1c2),'confirmationDescription':'Writes\x20the\x20local\x20Service\x20Tree\x20manifest\x20for\x20the\x20given\x20service\x20to\x20a\x20JSON\x20file.\x20An\x20existing\x20file\x20at\x20the\x20target\x20may\x20be\x20overwritten.\x20The\x20confirmation\x20UI\x20does\x20not\x20show\x20local\x20file\x20paths.','requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG,FILE_FLAG],async 'dryRun'(_0x1a2af7){const _0xc4df56=a67_0x176f3c,_0x58db6d=getLocalServiceEntry(_0x1a2af7[_0xc4df56(0x1d1)](_0xc4df56(0x1be)));return{'method':_0xc4df56(0x1d8),'url':_0x1a2af7['str'](_0xc4df56(0x1e0)),'body':{'service':_0x1a2af7['str'](_0xc4df56(0x1be)),'found':Boolean(_0x58db6d),'version':_0x58db6d?.[_0xc4df56(0x1e5)],'source':_0x58db6d?.['source']},'description':'Preview\x20Service\x20Tree\x20export\x20from\x20~/.lovrabet/service.json'};},async 'execute'(_0x491afa){const _0x2d0bad=a67_0x176f3c,_0x4d38b0=exportServiceManifest(_0x491afa[_0x2d0bad(0x1d1)](_0x2d0bad(0x1be)),_0x491afa[_0x2d0bad(0x1d1)](_0x2d0bad(0x1e0)));return{'ok':!![],'data':{'registryPath':_0x4d38b0[_0x2d0bad(0x1de)],'file':_0x4d38b0['filePath'],'service':summarizeService(_0x4d38b0[_0x2d0bad(0x1ec)])},'message':'Exported\x20service\x20'+_0x4d38b0[_0x2d0bad(0x1ec)][_0x2d0bad(0x1e6)]+'.'};}},{'service':'service','command':'list','description':a67_0x176f3c(0x1bc),'risk':a67_0x176f3c(0x1ed),'requiresAuth':![],'requiresAppCode':![],'flags':[],async 'execute'(){const _0x5873fa=a67_0x176f3c,_0x320e16=listLocalServices();return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'total':_0x320e16[_0x5873fa(0x1c1)],'services':_0x320e16[_0x5873fa(0x1c0)](summarizeService)}};}},{'service':a67_0x176f3c(0x1be),'command':'remove','description':a67_0x176f3c(0x1c5),'risk':a67_0x176f3c(0x1c2),'confirmationDescription':'Removes\x20the\x20given\x20service\x20manifest\x20from\x20the\x20local\x20Service\x20Tree\x20registry.\x20Dynamic\x20commands\x20from\x20that\x20manifest\x20will\x20no\x20longer\x20be\x20available.','requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'dryRun'(_0x3cec45){const _0x1d9c38=a67_0x176f3c,_0xf44012=getLocalServiceEntry(_0x3cec45['str'](_0x1d9c38(0x1be)));return{'method':_0x1d9c38(0x1d8),'url':getServiceRegistryPath(),'body':{'service':_0x3cec45[_0x1d9c38(0x1d1)](_0x1d9c38(0x1be)),'found':Boolean(_0xf44012),'version':_0xf44012?.[_0x1d9c38(0x1e5)],'source':_0xf44012?.['source']},'description':_0x1d9c38(0x1b8)};},async 'execute'(_0x573ce1){const _0x4c52c3=a67_0x176f3c,_0x425997=removeServiceManifest(_0x573ce1[_0x4c52c3(0x1d1)](_0x4c52c3(0x1be)));return{'ok':!![],'data':{'registryPath':_0x425997['registryPath'],'serviceCount':_0x425997[_0x4c52c3(0x1cf)],'service':summarizeService(_0x425997[_0x4c52c3(0x1ec)])},'message':'Removed\x20service\x20'+_0x425997[_0x4c52c3(0x1ec)][_0x4c52c3(0x1e6)]+'.'};}},{'service':a67_0x176f3c(0x1be),'command':a67_0x176f3c(0x1dc),'description':a67_0x176f3c(0x1ca),'risk':a67_0x176f3c(0x1ed),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'execute'(_0x16707f){const _0x16241b=a67_0x176f3c,_0x479fc5=getLocalServiceEntry(_0x16707f[_0x16241b(0x1d1)](_0x16241b(0x1be)));if(!_0x479fc5)return{'ok':![],'data':{'registryPath':getServiceRegistryPath(),'service':_0x16707f[_0x16241b(0x1d1)]('service')},'message':'Local\x20service\x20not\x20found:\x20'+_0x16707f['str']('service')};return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'service':summarizeService(_0x479fc5),'manifest':_0x479fc5[_0x16241b(0x1c4)],'normalizedManifest':toPublicNormalizedServiceTree(_0x479fc5[_0x16241b(0x1df)])}};}}];
|
|
1
|
+
function a67_0x6055(){const _0x197926=['Import\x20a\x20Service\x20Tree\x20manifest\x20into\x20the\x20local\x20runtime\x20registry','Preview\x20Service\x20Tree\x20import\x20into\x20~/.lovrabet/service.json','registryPath','name','normalizedManifest','\x20service\x20','read','service','target','Local\x20service\x20code,\x20for\x20example\x20crm','warnings','Service\x20manifest\x20validation\x20passed.','128966jEBCjX','kind','\x20service(s).','export','205YLnTKS','Imported\x20','serviceCode','report','872048nTGcGE','entries','\x20service(s),\x20updated\x20','Show\x20a\x20locally\x20imported\x20Service\x20Tree\x20manifest','1336330TCzxAW','1636482rbYAbg','import','imported','validate','Removed\x20service\x20','hash','45152LWvSgW','str','version','registryIndex','registryServiceCode','updated','entry','string','filePath','3027791jCLQlG','8VwNMso','cliName','Imported','registry','errors','Service\x20Tree\x20manifest\x20file\x20path','replaced','list','map','commands','importedAt','lower\x20kebab-case\x20service\x20code','risk','7SLKiHc','List\x20locally\x20imported\x20Service\x20Tree\x20manifests','Remove\x20a\x20Service\x20Tree\x20manifest\x20from\x20the\x20local\x20runtime\x20registry','1006221skGuuu','Export\x20the\x20local\x20Service\x20Tree\x20manifest\x20to\x20a\x20JSON\x20file','manifests','source','serviceCount','48HpEyps','22iIdyJu','Service\x20registry\x20validation\x20passed.','flags','Preview\x20Service\x20Tree\x20export\x20from\x20~/.lovrabet/service.json','36dIHzrk','WRITE','Preview\x20Service\x20Tree\x20removal\x20from\x20~/.lovrabet/service.json','write','file','cliPath','manifest','length','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.'];a67_0x6055=function(){return _0x197926;};return a67_0x6055();}const a67_0x5161c3=a67_0x21d4;(function(_0x363a78,_0x54326c){const _0x2994b4=a67_0x21d4,_0x2ef4e0=_0x363a78();while(!![]){try{const _0x4893bb=-parseInt(_0x2994b4(0x1a3))/0x1*(parseInt(_0x2994b4(0x186))/0x2)+parseInt(_0x2994b4(0x167))/0x3+-parseInt(_0x2994b4(0x199))/0x4*(parseInt(_0x2994b4(0x18a))/0x5)+parseInt(_0x2994b4(0x193))/0x6*(parseInt(_0x2994b4(0x164))/0x7)+parseInt(_0x2994b4(0x18e))/0x8*(-parseInt(_0x2994b4(0x171))/0x9)+-parseInt(_0x2994b4(0x192))/0xa*(-parseInt(_0x2994b4(0x16d))/0xb)+-parseInt(_0x2994b4(0x16c))/0xc*(-parseInt(_0x2994b4(0x1a2))/0xd);if(_0x4893bb===_0x54326c)break;else _0x2ef4e0['push'](_0x2ef4e0['shift']());}catch(_0x5c562f){_0x2ef4e0['push'](_0x2ef4e0['shift']());}}}(a67_0x6055,0x5fca0));import{exportServiceManifest,formatValidationFailure,getLocalServiceEntry,getServiceRegistryPath,importServiceManifest,listLocalServices,loadServiceManifestFromFile,removeServiceManifest}from'../../commands/service/registry.js';import{toPublicNormalizedServiceTree,toPublicServiceTreeTarget}from'../../commands/service/function-name-adapter.js';const FILE_FLAG={'name':'file','type':'string','required':!![],'description':a67_0x5161c3(0x15c)},SERVICE_FLAG={'name':'service','type':a67_0x5161c3(0x1a0),'required':!![],'description':a67_0x5161c3(0x183),'pattern':{'regex':/^[a-z][a-z0-9-]*$/,'description':a67_0x5161c3(0x162)}};function summarizeService(_0x13ed63){const _0x36a7da=a67_0x5161c3;return{'serviceCode':_0x13ed63['serviceCode'],'name':_0x13ed63[_0x36a7da(0x17e)][_0x36a7da(0x181)]['name'],'version':_0x13ed63[_0x36a7da(0x19b)],'importedAt':_0x13ed63[_0x36a7da(0x161)],'source':_0x13ed63[_0x36a7da(0x16a)],'commandCount':_0x13ed63['normalizedManifest']['commands'][_0x36a7da(0x178)],'commands':_0x13ed63[_0x36a7da(0x17e)][_0x36a7da(0x160)][_0x36a7da(0x15f)](_0x1b5be8=>({'path':_0x1b5be8[_0x36a7da(0x176)],'description':_0x1b5be8['description'],'risk':_0x1b5be8[_0x36a7da(0x163)],'target':toPublicServiceTreeTarget(_0x1b5be8[_0x36a7da(0x182)]),'flags':_0x1b5be8[_0x36a7da(0x16f)][_0x36a7da(0x15f)](_0x415c73=>({'name':_0x415c73[_0x36a7da(0x17d)],'cliName':_0x415c73[_0x36a7da(0x1a4)],'type':_0x415c73['type'],'required':_0x415c73['required']===!![]}))}))};}function summarizeLoadedManifest(_0x1b08a4){const _0x26f49a=a67_0x5161c3;return{'service':_0x1b08a4[_0x26f49a(0x17e)]?.[_0x26f49a(0x181)],'version':_0x1b08a4[_0x26f49a(0x17e)]?.['version'],'commandCount':_0x1b08a4['normalizedManifest']?.[_0x26f49a(0x160)][_0x26f49a(0x178)]??0x0,'commands':_0x1b08a4[_0x26f49a(0x17e)]?.[_0x26f49a(0x160)][_0x26f49a(0x15f)](_0x86910c=>({'path':_0x86910c[_0x26f49a(0x176)],'risk':_0x86910c[_0x26f49a(0x163)],'target':toPublicServiceTreeTarget(_0x86910c[_0x26f49a(0x182)])}))??[],'registryIndex':_0x1b08a4[_0x26f49a(0x19c)],'registryServiceCode':_0x1b08a4[_0x26f49a(0x19d)],'errors':_0x1b08a4[_0x26f49a(0x18d)][_0x26f49a(0x15b)],'warnings':_0x1b08a4['report'][_0x26f49a(0x184)]};}function a67_0x21d4(_0x5ce1f9,_0x456d14){_0x5ce1f9=_0x5ce1f9-0x15a;const _0x6055d4=a67_0x6055();let _0x21d434=_0x6055d4[_0x5ce1f9];return _0x21d434;}export const serviceDefinitions=[{'service':a67_0x5161c3(0x181),'command':a67_0x5161c3(0x196),'description':'Validate\x20a\x20Service\x20Tree\x20JSON\x20manifest','risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'execute'(_0x4cf5f0){const _0x382ccd=a67_0x5161c3,_0x104bc6=loadServiceManifestFromFile(_0x4cf5f0[_0x382ccd(0x19a)]('file'));if(!_0x104bc6['report']['ok'])return{'ok':![],'data':{'file':_0x104bc6[_0x382ccd(0x1a1)],'hash':_0x104bc6[_0x382ccd(0x198)],'kind':_0x104bc6[_0x382ccd(0x187)],'serviceCount':_0x104bc6[_0x382ccd(0x169)][_0x382ccd(0x178)],'services':_0x104bc6[_0x382ccd(0x169)][_0x382ccd(0x15f)](summarizeLoadedManifest),'errors':_0x104bc6[_0x382ccd(0x18d)][_0x382ccd(0x15b)],'warnings':_0x104bc6['report'][_0x382ccd(0x184)]},'message':formatValidationFailure(_0x104bc6['report'])};if(_0x104bc6[_0x382ccd(0x187)]===_0x382ccd(0x15a)||_0x104bc6['manifests']['length']!==0x1)return{'ok':!![],'data':{'file':_0x104bc6[_0x382ccd(0x1a1)],'hash':_0x104bc6['hash'],'kind':_0x104bc6[_0x382ccd(0x187)],'serviceCount':_0x104bc6[_0x382ccd(0x169)][_0x382ccd(0x178)],'commandCount':_0x104bc6[_0x382ccd(0x169)]['reduce']((_0x30bf9b,_0x5d04d9)=>_0x30bf9b+(_0x5d04d9['normalizedManifest']?.[_0x382ccd(0x160)][_0x382ccd(0x178)]??0x0),0x0),'services':_0x104bc6[_0x382ccd(0x169)][_0x382ccd(0x15f)](summarizeLoadedManifest),'warnings':_0x104bc6['report']['warnings']},'message':_0x382ccd(0x16e)};return{'ok':!![],'data':{'file':_0x104bc6[_0x382ccd(0x1a1)],'hash':_0x104bc6[_0x382ccd(0x198)],'kind':_0x104bc6[_0x382ccd(0x187)],'service':_0x104bc6[_0x382ccd(0x17e)]?.[_0x382ccd(0x181)],'version':_0x104bc6[_0x382ccd(0x17e)]?.[_0x382ccd(0x19b)],'commandCount':_0x104bc6['normalizedManifest']?.[_0x382ccd(0x160)][_0x382ccd(0x178)]??0x0,'commands':_0x104bc6['normalizedManifest']?.[_0x382ccd(0x160)]['map'](_0x2cf48a=>({'path':_0x2cf48a[_0x382ccd(0x176)],'risk':_0x2cf48a['risk'],'target':toPublicServiceTreeTarget(_0x2cf48a['target'])})),'warnings':_0x104bc6['report'][_0x382ccd(0x184)]},'message':_0x382ccd(0x185)};}},{'service':a67_0x5161c3(0x181),'command':a67_0x5161c3(0x194),'description':a67_0x5161c3(0x17a),'risk':a67_0x5161c3(0x174),'confirmationDescription':'Reads\x20the\x20given\x20manifest\x20into\x20the\x20local\x20Service\x20Tree\x20registry.\x20An\x20existing\x20manifest\x20with\x20the\x20same\x20service\x20code\x20is\x20updated.\x20The\x20confirmation\x20UI\x20does\x20not\x20show\x20local\x20file\x20paths.','requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'dryRun'(_0x3ea5f5){const _0x19d81c=a67_0x5161c3,_0x32527e=loadServiceManifestFromFile(_0x3ea5f5['str'](_0x19d81c(0x175)));return{'method':'WRITE','url':getServiceRegistryPath(),'body':{'file':_0x32527e[_0x19d81c(0x1a1)],'hash':_0x32527e[_0x19d81c(0x198)],'kind':_0x32527e['kind'],'ok':_0x32527e[_0x19d81c(0x18d)]['ok'],'service':_0x32527e['normalizedManifest']?.[_0x19d81c(0x181)],'version':_0x32527e[_0x19d81c(0x17e)]?.[_0x19d81c(0x19b)],'serviceCount':_0x32527e['manifests'][_0x19d81c(0x178)],'services':_0x32527e[_0x19d81c(0x169)][_0x19d81c(0x15f)](_0x36afbf=>({'service':_0x36afbf[_0x19d81c(0x17e)]?.['service'],'version':_0x36afbf[_0x19d81c(0x17e)]?.['version'],'commandCount':_0x36afbf[_0x19d81c(0x17e)]?.[_0x19d81c(0x160)][_0x19d81c(0x178)]??0x0,'errors':_0x36afbf['report'][_0x19d81c(0x15b)]})),'errors':_0x32527e['report'][_0x19d81c(0x15b)],'commandCount':_0x32527e[_0x19d81c(0x17e)]?.['commands'][_0x19d81c(0x178)]??0x0},'description':_0x19d81c(0x17b)};},async 'execute'(_0x469e24){const _0x4486ca=a67_0x5161c3,_0xce8cb6=importServiceManifest(_0x469e24[_0x4486ca(0x19a)](_0x4486ca(0x175)));if(_0xce8cb6[_0x4486ca(0x18f)][_0x4486ca(0x178)]!==0x1)return{'ok':!![],'data':{'registryPath':_0xce8cb6[_0x4486ca(0x17c)],'imported':_0xce8cb6[_0x4486ca(0x195)],'updated':_0xce8cb6[_0x4486ca(0x19e)],'serviceCount':_0xce8cb6[_0x4486ca(0x16b)],'services':_0xce8cb6[_0x4486ca(0x18f)][_0x4486ca(0x15f)](summarizeService)},'message':_0x4486ca(0x18b)+_0xce8cb6['imported']+_0x4486ca(0x190)+_0xce8cb6[_0x4486ca(0x19e)]+_0x4486ca(0x188)};return{'ok':!![],'data':{'registryPath':_0xce8cb6[_0x4486ca(0x17c)],'replaced':_0xce8cb6[_0x4486ca(0x15d)],'imported':_0xce8cb6[_0x4486ca(0x195)],'updated':_0xce8cb6['updated'],'serviceCount':_0xce8cb6[_0x4486ca(0x16b)],'service':summarizeService(_0xce8cb6[_0x4486ca(0x19f)])},'message':(_0xce8cb6[_0x4486ca(0x15d)]?'Updated':_0x4486ca(0x1a5))+_0x4486ca(0x17f)+_0xce8cb6[_0x4486ca(0x19f)][_0x4486ca(0x18c)]+'.'};}},{'service':a67_0x5161c3(0x181),'command':a67_0x5161c3(0x189),'description':a67_0x5161c3(0x168),'risk':'write','confirmationDescription':a67_0x5161c3(0x179),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG,FILE_FLAG],async 'dryRun'(_0x1e302e){const _0x44cff4=a67_0x5161c3,_0xb246d0=getLocalServiceEntry(_0x1e302e[_0x44cff4(0x19a)](_0x44cff4(0x181)));return{'method':'WRITE','url':_0x1e302e['str'](_0x44cff4(0x175)),'body':{'service':_0x1e302e['str'](_0x44cff4(0x181)),'found':Boolean(_0xb246d0),'version':_0xb246d0?.[_0x44cff4(0x19b)],'source':_0xb246d0?.[_0x44cff4(0x16a)]},'description':_0x44cff4(0x170)};},async 'execute'(_0x47e307){const _0x519d75=a67_0x5161c3,_0x50123e=exportServiceManifest(_0x47e307[_0x519d75(0x19a)](_0x519d75(0x181)),_0x47e307['str'](_0x519d75(0x175)));return{'ok':!![],'data':{'registryPath':_0x50123e[_0x519d75(0x17c)],'file':_0x50123e[_0x519d75(0x1a1)],'service':summarizeService(_0x50123e['entry'])},'message':'Exported\x20service\x20'+_0x50123e[_0x519d75(0x19f)][_0x519d75(0x18c)]+'.'};}},{'service':'service','command':a67_0x5161c3(0x15e),'description':a67_0x5161c3(0x165),'risk':a67_0x5161c3(0x180),'requiresAuth':![],'requiresAppCode':![],'flags':[],async 'execute'(){const _0x5348de=a67_0x5161c3,_0x1a9345=listLocalServices();return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'total':_0x1a9345[_0x5348de(0x178)],'services':_0x1a9345[_0x5348de(0x15f)](summarizeService)}};}},{'service':'service','command':'remove','description':a67_0x5161c3(0x166),'risk':a67_0x5161c3(0x174),'confirmationDescription':'Removes\x20the\x20given\x20service\x20manifest\x20from\x20the\x20local\x20Service\x20Tree\x20registry.\x20Dynamic\x20commands\x20from\x20that\x20manifest\x20will\x20no\x20longer\x20be\x20available.','requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'dryRun'(_0x4e887e){const _0x268d0a=a67_0x5161c3,_0x3bd773=getLocalServiceEntry(_0x4e887e[_0x268d0a(0x19a)](_0x268d0a(0x181)));return{'method':_0x268d0a(0x172),'url':getServiceRegistryPath(),'body':{'service':_0x4e887e['str']('service'),'found':Boolean(_0x3bd773),'version':_0x3bd773?.['version'],'source':_0x3bd773?.['source']},'description':_0x268d0a(0x173)};},async 'execute'(_0x2605bf){const _0x48f61e=a67_0x5161c3,_0xb038e4=removeServiceManifest(_0x2605bf['str'](_0x48f61e(0x181)));return{'ok':!![],'data':{'registryPath':_0xb038e4[_0x48f61e(0x17c)],'serviceCount':_0xb038e4[_0x48f61e(0x16b)],'service':summarizeService(_0xb038e4['entry'])},'message':_0x48f61e(0x197)+_0xb038e4[_0x48f61e(0x19f)][_0x48f61e(0x18c)]+'.'};}},{'service':a67_0x5161c3(0x181),'command':'detail','description':a67_0x5161c3(0x191),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'execute'(_0x5172b0){const _0x3a039d=a67_0x5161c3,_0x586ede=getLocalServiceEntry(_0x5172b0[_0x3a039d(0x19a)](_0x3a039d(0x181)));if(!_0x586ede)return{'ok':![],'data':{'registryPath':getServiceRegistryPath(),'service':_0x5172b0[_0x3a039d(0x19a)](_0x3a039d(0x181))},'message':'Local\x20service\x20not\x20found:\x20'+_0x5172b0[_0x3a039d(0x19a)](_0x3a039d(0x181))};return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'service':summarizeService(_0x586ede),'manifest':_0x586ede[_0x3a039d(0x177)],'normalizedManifest':toPublicNormalizedServiceTree(_0x586ede[_0x3a039d(0x17e)])}};}}];
|