@lovrabet/lovrabet-cli 2.3.0-beta.4 → 2.3.0-beta.6
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/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/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/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.d.ts +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.d.ts +2 -0
- 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/sdk-client.js +1 -1
- package/lib/errors.d.ts +1 -0
- package/lib/errors.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.d.ts +9 -7
- 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/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/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/platform.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
|
-
|
|
1
|
+
const a114_0x2f6460=a114_0x2981;(function(_0x210d51,_0x40db49){const _0x412f6e=a114_0x2981,_0x59abef=_0x210d51();while(!![]){try{const _0x3ca2c8=-parseInt(_0x412f6e(0x1b3))/0x1+parseInt(_0x412f6e(0x1a1))/0x2+parseInt(_0x412f6e(0x1b7))/0x3+parseInt(_0x412f6e(0x19e))/0x4+-parseInt(_0x412f6e(0x1a7))/0x5*(parseInt(_0x412f6e(0x1a9))/0x6)+-parseInt(_0x412f6e(0x19d))/0x7+parseInt(_0x412f6e(0x1a8))/0x8;if(_0x3ca2c8===_0x40db49)break;else _0x59abef['push'](_0x59abef['shift']());}catch(_0x2b64c3){_0x59abef['push'](_0x59abef['shift']());}}}(a114_0xd61c,0xcf56e));import{CliErrors}from'../errors.js';function a114_0xd61c(){const _0x214d65=['test','2582356sxCypv','retry-after','status','Retry-After','function','message','319760YPmQEO','10794208IQCMku','54vStxWR','Retry\x20after\x20a\x20short\x20delay.','Request\x20rate\x20limit\x20exceeded.','MAX_QPS_LIMIT','get','toLowerCase','call','object','toUpperCase','isArray','1182581pAzZzM','Retry\x20after\x20','EXCEED_MAX_QPS_LIMIT','retryAfterSeconds','2671365XLoeDe','Wait\x20','errorCode','rateLimited','number','\x20Retry\x20only\x20the\x20failed\x20item;\x20keep\x20requests\x20serial\x20and\x20preserve\x20completed\x20checkpoints.','9810815VPmxhi','1912188UPkVcD','entries'];a114_0xd61c=function(){return _0x214d65;};return a114_0xd61c();}const RATE_LIMIT_ERROR_CODES=new Set([a114_0x2f6460(0x1b5),a114_0x2f6460(0x1ac),'IP_RATE_LIMIT_EXCEEDED']);function nonEmptyString(_0x599c73){if(typeof _0x599c73!=='string')return undefined;const _0x304484=_0x599c73['trim']();return _0x304484||undefined;}function buildRetryHint(_0x40d96f){const _0x52e7fa=a114_0x2f6460,_0x6ec395=nonEmptyString(_0x40d96f),_0x447948=_0x6ec395?/^\d+$/[_0x52e7fa(0x1a0)](_0x6ec395)?_0x52e7fa(0x1b8)+_0x6ec395+'\x20seconds\x20before\x20retrying.':_0x52e7fa(0x1b4)+_0x6ec395+'.':_0x52e7fa(0x1aa);return _0x447948+_0x52e7fa(0x19c);}export function createRateLimitError(_0x4fcb31){const _0x11802d=a114_0x2f6460,_0x195c04=nonEmptyString(_0x4fcb31[_0x11802d(0x1b9)])?.[_0x11802d(0x1b1)](),_0x124cf3=Number(_0x4fcb31[_0x11802d(0x1a3)])===0x1ad||_0x195c04!==undefined&&RATE_LIMIT_ERROR_CODES['has'](_0x195c04);if(!_0x124cf3)return undefined;return CliErrors[_0x11802d(0x1ba)](nonEmptyString(_0x4fcb31[_0x11802d(0x1a6)])??_0x11802d(0x1ab),buildRetryHint(_0x4fcb31['retryAfter']));}function a114_0x2981(_0x37a5a1,_0x4df039){_0x37a5a1=_0x37a5a1-0x19c;const _0xd61cac=a114_0xd61c();let _0x2981ae=_0xd61cac[_0x37a5a1];return _0x2981ae;}export function readRetryAfter(_0x236537){const _0x16a296=a114_0x2f6460;if(!_0x236537||typeof _0x236537!==_0x16a296(0x1b0))return undefined;const _0xa5c6cf=_0x236537[_0x16a296(0x1ad)];if(typeof _0xa5c6cf===_0x16a296(0x1a5)){const _0xa1665a=_0xa5c6cf['call'](_0x236537,_0x16a296(0x1a4))??_0xa5c6cf[_0x16a296(0x1af)](_0x236537,_0x16a296(0x1a2));return nonEmptyString(_0xa1665a);}for(const [_0x9079c4,_0x1bdd49]of Object[_0x16a296(0x19f)](_0x236537)){if(_0x9079c4[_0x16a296(0x1ae)]()===_0x16a296(0x1a2))return nonEmptyString(_0x1bdd49)??(typeof _0x1bdd49==='number'?String(_0x1bdd49):undefined);}return undefined;}export function readRetryAfterSeconds(_0x13781a){const _0x1d48b9=a114_0x2f6460;if(!_0x13781a||typeof _0x13781a!==_0x1d48b9(0x1b0)||Array[_0x1d48b9(0x1b2)](_0x13781a))return undefined;const _0x3a8ee1=_0x13781a[_0x1d48b9(0x1b6)];if(typeof _0x3a8ee1===_0x1d48b9(0x1bb))return Number['isInteger'](_0x3a8ee1)&&_0x3a8ee1>=0x0?String(_0x3a8ee1):undefined;const _0x4a4afb=nonEmptyString(_0x3a8ee1);return _0x4a4afb&&/^\d+$/[_0x1d48b9(0x1a0)](_0x4a4afb)?_0x4a4afb:undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a115_0x1f0727=a115_0x1c27;function a115_0x1c27(_0x37a11f,_0x5bd766){_0x37a11f=_0x37a11f-0x10f;const _0x10377d=a115_0x1037();let _0x1c271e=_0x10377d[_0x37a11f];return _0x1c271e;}function a115_0x1037(){const _0x2f80d0=['service','orderby','3790836CBUvmo','\x20data\x20filter`.','version','\x20--help`\x20to\x20see\x20accepted\x20flags.','filter','data','page','meowKey','121968fKyBrT','flags','Put\x20where,\x20select,\x20orderBy,\x20currentPage,\x20and\x20pageSize\x20inside\x20one\x20--params\x20JSON\x20object.\x20','\x20for\x20`','pagesize','8ypqgVu','649940oaxheO','order-by','asc','12Sftjoq','select','Example:\x20','27ixYzqX','no-','\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20','7680589sjZpXo','has','entries','add','8548XCYTan','command','1647054xoNLZV','page-size','\x20is\x20not\x20a\x20CLI\x20flag\x20for\x20`','2504970alFqvj'];a115_0x1037=function(){return _0x2f80d0;};return a115_0x1037();}(function(_0x5807fe,_0x206938){const _0x3ea8e9=a115_0x1c27,_0x38cef8=_0x5807fe();while(!![]){try{const _0x5aa64a=-parseInt(_0x3ea8e9(0x10f))/0x1+parseInt(_0x3ea8e9(0x122))/0x2*(-parseInt(_0x3ea8e9(0x118))/0x3)+-parseInt(_0x3ea8e9(0x12a))/0x4+parseInt(_0x3ea8e9(0x115))/0x5+-parseInt(_0x3ea8e9(0x124))/0x6+-parseInt(_0x3ea8e9(0x11e))/0x7*(-parseInt(_0x3ea8e9(0x114))/0x8)+-parseInt(_0x3ea8e9(0x11b))/0x9*(-parseInt(_0x3ea8e9(0x127))/0xa);if(_0x5aa64a===_0x206938)break;else _0x38cef8['push'](_0x38cef8['shift']());}catch(_0x29bfd6){_0x38cef8['push'](_0x38cef8['shift']());}}}(a115_0x1037,0x96bd0));import{CliErrors}from'../errors.js';import{CLI_BIN_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{toKebab}from'../framework/preparse.js';const FILTER_BODY_FIELDS=new Set(['where',a115_0x1f0727(0x119),a115_0x1f0727(0x116),a115_0x1f0727(0x129),'current-page','currentpage',a115_0x1f0727(0x130),a115_0x1f0727(0x125),a115_0x1f0727(0x113)]);export function assertKnownCommandFlags(_0x89c794,_0x49c07c){const _0xd5080d=a115_0x1f0727,_0x50cff8=new Set([_0xd5080d(0x12c)]);for(const _0x39b312 of GLOBAL_FLAGS){_0x50cff8['add'](_0x39b312['name']),_0x50cff8[_0xd5080d(0x121)](toKebab(_0x39b312[_0xd5080d(0x131)]));}for(const _0x5af293 of _0x89c794[_0xd5080d(0x110)]??[]){_0x50cff8[_0xd5080d(0x121)](_0x5af293['name']);}for(const [_0x3ba8f6,_0x13f412]of Object[_0xd5080d(0x120)](_0x49c07c)){const _0x19223d=toKebab(_0x3ba8f6);if(_0x50cff8[_0xd5080d(0x11f)](_0x19223d))continue;if(_0x13f412===![]&&_0x50cff8['has'](_0xd5080d(0x11c)+_0x19223d))continue;if(_0x89c794[_0xd5080d(0x128)]===_0xd5080d(0x12f)&&_0x89c794['command']===_0xd5080d(0x12e)&&FILTER_BODY_FIELDS[_0xd5080d(0x11f)](_0x19223d))throw CliErrors['validation']('--'+_0x19223d+_0xd5080d(0x126)+CLI_BIN_NAME+_0xd5080d(0x12b),_0xd5080d(0x111)+(_0xd5080d(0x11a)+CLI_BIN_NAME+_0xd5080d(0x11d))+('\x27'+JSON['stringify']({'where':{'status':{'$eq':'active'}},'orderBy':[{'id':_0xd5080d(0x117)}],'currentPage':0x1,'pageSize':0x14})+'\x27'));throw CliErrors['validation']('Unknown\x20flag\x20--'+_0x19223d+_0xd5080d(0x112)+CLI_BIN_NAME+'\x20'+_0x89c794[_0xd5080d(0x128)]+'\x20'+_0x89c794[_0xd5080d(0x123)]+'`.','Run\x20`'+CLI_BIN_NAME+'\x20'+_0x89c794[_0xd5080d(0x128)]+'\x20'+_0x89c794[_0xd5080d(0x123)]+_0xd5080d(0x12d));}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5aac98,_0x442b25){var _0x2f93fd=a116_0x41a7,_0x2564d3=_0x5aac98();while(!![]){try{var _0x15f2ca=-parseInt(_0x2f93fd(0xd7))/0x1*(parseInt(_0x2f93fd(0xd8))/0x2)+parseInt(_0x2f93fd(0xdc))/0x3*(parseInt(_0x2f93fd(0xd9))/0x4)+parseInt(_0x2f93fd(0xe1))/0x5+-parseInt(_0x2f93fd(0xde))/0x6*(parseInt(_0x2f93fd(0xdf))/0x7)+-parseInt(_0x2f93fd(0xdd))/0x8+parseInt(_0x2f93fd(0xda))/0x9*(-parseInt(_0x2f93fd(0xe0))/0xa)+-parseInt(_0x2f93fd(0xdb))/0xb*(-parseInt(_0x2f93fd(0xe2))/0xc);if(_0x15f2ca===_0x442b25)break;else _0x2564d3['push'](_0x2564d3['shift']());}catch(_0x7b67d2){_0x2564d3['push'](_0x2564d3['shift']());}}}(a116_0x1ff8,0x8d038));function a116_0x41a7(_0x267daa,_0xe86e24){_0x267daa=_0x267daa-0xd7;var _0x1ff85e=a116_0x1ff8();var _0x41a78f=_0x1ff85e[_0x267daa];return _0x41a78f;}export{extractList,extractPaging}from'@lovrabet/cli-framework';function a116_0x1ff8(){var _0x5ec84f=['8396040JBPykT','1005570UPiLTN','35Wkocfz','7200CnLfIU','1165850TJTNYg','26028gltzAv','7UFktFc','131416Bvikrl','8oGEHEG','2493UHXVPH','11946VvNNSr','803646ffdPMK'];a116_0x1ff8=function(){return _0x5ec84f;};return a116_0x1ff8();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a117_0x492b(_0x3576e9,_0x37d169){_0x3576e9=_0x3576e9-0x9a;const _0x43f357=a117_0x43f3();let _0x492b55=_0x43f357[_0x3576e9];return _0x492b55;}(function(_0x73e497,_0x2415a6){const _0x332aed=a117_0x492b,_0x468d44=_0x73e497();while(!![]){try{const _0x6823fe=parseInt(_0x332aed(0xa3))/0x1+parseInt(_0x332aed(0xb3))/0x2+-parseInt(_0x332aed(0xb0))/0x3*(-parseInt(_0x332aed(0xa7))/0x4)+-parseInt(_0x332aed(0xa8))/0x5*(-parseInt(_0x332aed(0xba))/0x6)+parseInt(_0x332aed(0xa0))/0x7+-parseInt(_0x332aed(0xac))/0x8*(-parseInt(_0x332aed(0xa1))/0x9)+-parseInt(_0x332aed(0xa2))/0xa;if(_0x6823fe===_0x2415a6)break;else _0x468d44['push'](_0x468d44['shift']());}catch(_0x4cf84c){_0x468d44['push'](_0x468d44['shift']());}}}(a117_0x43f3,0xded12));function a117_0x43f3(){const _0x50eaa7=['name','scheduled-at','stringify','title=','channel','id=','cron','--yes','\x20\x20\x20Continue?\x20[y/N]\x20','push','commandLabel','9633071tBYwYm','11927781fszoZM','53144690RhQUGi','917370Lpbnss','code=','affectedRecords','service','6895556RgGUzd','10CseDas','cron=','\x20\x20\x20','length','8QQLmGj','kind','⚠\x20\x20High-risk\x20operation:\x20','code','3XZoBAx','params','schedule-id=','434264TkfZbG','params=','name=','scheduled-at=','join','description','title','2001822HLFOFh'];a117_0x43f3=function(){return _0x50eaa7;};return a117_0x43f3();}import{CLI_BIN_NAME}from'../constant/cli.js';export function buildConfirmationLines(_0x4bfecc,_0x571c06,_0x447164){const _0xc943ee=a117_0x492b,_0x500430=buildConfirmationContext(_0x4bfecc,_0x571c06,_0x447164),_0x233066=[_0xc943ee(0xae)+_0x500430[_0xc943ee(0x9f)]];return _0x500430[_0xc943ee(0xb8)]&&_0x233066[_0xc943ee(0x9e)](_0xc943ee(0xaa)+_0x500430[_0xc943ee(0xb8)]),_0x500430[_0xc943ee(0xa5)]&&_0x233066[_0xc943ee(0x9e)]('\x20\x20\x20Affected:\x20'+_0x500430[_0xc943ee(0xa5)]),_0x233066['push'](_0xc943ee(0x9d)),_0x233066;}export function reconstructCommandArgv(_0x5950b6,_0x2a64d0){const _0x4e3b94=a117_0x492b,_0x18bb8b=[CLI_BIN_NAME,_0x5950b6[_0x4e3b94(0xa6)],_0x5950b6['command']];for(const [_0x4645fb,_0x516e56]of Object['entries'](_0x2a64d0)){if(_0x516e56===!![])_0x18bb8b[_0x4e3b94(0x9e)]('--'+_0x4645fb);else _0x516e56!==![]&&_0x516e56!==undefined&&_0x516e56!==''&&_0x18bb8b['push']('--'+_0x4645fb+'\x20'+JSON[_0x4e3b94(0xbd)](_0x516e56));}return _0x18bb8b[_0x4e3b94(0x9e)](_0x4e3b94(0x9c)),_0x18bb8b[_0x4e3b94(0xb7)]('\x20');}function buildConfirmationContext(_0x18fea2,_0x2838a4,_0x379937){const _0x2be5f7=a117_0x492b,_0x337ac4=extractAffectedRecords(_0x379937);return{'commandLabel':_0x2838a4,'description':_0x18fea2[_0x2be5f7(0xb8)],'affectedRecords':_0x337ac4};}function extractAffectedRecords(_0xe265c){const _0x34e487=a117_0x492b,_0x1c5a2e=[];if(_0xe265c['code'])_0x1c5a2e[_0x34e487(0x9e)](_0x34e487(0xa4)+_0xe265c[_0x34e487(0xaf)]);if(_0xe265c['id'])_0x1c5a2e['push'](_0x34e487(0x9a)+_0xe265c['id']);if(_0xe265c['schedule-id'])_0x1c5a2e['push'](_0x34e487(0xb2)+_0xe265c['schedule-id']);if(_0xe265c[_0x34e487(0xbb)])_0x1c5a2e['push'](_0x34e487(0xb5)+_0xe265c[_0x34e487(0xbb)]);if(_0xe265c[_0x34e487(0xb9)])_0x1c5a2e[_0x34e487(0x9e)](_0x34e487(0xbe)+_0xe265c[_0x34e487(0xb9)]);if(_0xe265c[_0x34e487(0xad)])_0x1c5a2e[_0x34e487(0x9e)]('kind='+_0xe265c[_0x34e487(0xad)]);if(_0xe265c[_0x34e487(0x9b)])_0x1c5a2e[_0x34e487(0x9e)](_0x34e487(0xa9)+_0xe265c[_0x34e487(0x9b)]);if(_0xe265c[_0x34e487(0xbc)])_0x1c5a2e[_0x34e487(0x9e)](_0x34e487(0xb6)+_0xe265c[_0x34e487(0xbc)]);if(_0xe265c['channel'])_0x1c5a2e['push']('channel='+_0xe265c[_0x34e487(0xbf)]);if(_0xe265c['params'])_0x1c5a2e[_0x34e487(0x9e)](_0x34e487(0xb4)+_0xe265c[_0x34e487(0xb1)]);return _0x1c5a2e[_0x34e487(0xab)]>0x0?_0x1c5a2e[_0x34e487(0xb7)](',\x20'):undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x51243e,_0x445e62){const _0x965b73=a118_0x5a07,_0x2dfbfc=_0x51243e();while(!![]){try{const _0x3dcb27=-parseInt(_0x965b73(0xa8))/0x1+-parseInt(_0x965b73(0xa3))/0x2*(parseInt(_0x965b73(0x95))/0x3)+parseInt(_0x965b73(0x9d))/0x4+-parseInt(_0x965b73(0xa6))/0x5*(-parseInt(_0x965b73(0x96))/0x6)+parseInt(_0x965b73(0xa5))/0x7*(parseInt(_0x965b73(0x99))/0x8)+parseInt(_0x965b73(0x98))/0x9+-parseInt(_0x965b73(0xa2))/0xa*(-parseInt(_0x965b73(0xa1))/0xb);if(_0x3dcb27===_0x445e62)break;else _0x2dfbfc['push'](_0x2dfbfc['shift']());}catch(_0x3e41ee){_0x2dfbfc['push'](_0x2dfbfc['shift']());}}}(a118_0x415e,0x9fa07));import{LovrabetError}from'@lovrabet/sdk';function a118_0x5a07(_0x5e997c,_0x197a48){_0x5e997c=_0x5e997c-0x95;const _0x415ebe=a118_0x415e();let _0x5a07a9=_0x415ebe[_0x5e997c];return _0x5a07a9;}function a118_0x415e(){const _0x4d582a=['10jKiVyT','259058AQcZcF','description','18851Hajxog','15xduAKT','code','1206711XufuCa','stringify','18dXXNzl','624294KBwHQA','trim','2232477MTFLlP','1216dWWPWt','validation','message','string','4599388gVuQXb','status','response','headers','5701663vBVKVu'];a118_0x415e=function(){return _0x4d582a;};return a118_0x415e();}import{CliErrors}from'../errors.js';import{createRateLimitError,readRetryAfter,readRetryAfterSeconds}from'../framework/rate-limit.js';export function mapUserFacingExecuteError(_0x197924){const _0x463138=a118_0x5a07;if(_0x197924 instanceof LovrabetError){const _0x2c5bf2=userFacingLovrabetMessage(_0x197924),_0xf5cff1=_0x197924,_0x4b9ff2=createRateLimitError({'status':_0xf5cff1[_0x463138(0x9e)],'errorCode':_0xf5cff1[_0x463138(0xa7)],'message':_0x2c5bf2,'retryAfter':readRetryAfter(_0xf5cff1[_0x463138(0x9f)]?.[_0x463138(0xa0)])??readRetryAfterSeconds(_0xf5cff1[_0x463138(0x9f)])});return _0x4b9ff2??CliErrors[_0x463138(0x9a)](_0x2c5bf2);}return _0x197924;}function userFacingLovrabetMessage(_0x4cb0cf){const _0x205af3=a118_0x5a07,_0x4661be=_0x4cb0cf[_0x205af3(0xa4)];if(_0x4661be!==undefined&&_0x4661be!==null){if(typeof _0x4661be===_0x205af3(0x9c)&&_0x4661be[_0x205af3(0x97)]())return _0x4661be[_0x205af3(0x97)]();try{return JSON[_0x205af3(0xa9)](_0x4661be);}catch{}}return _0x4cb0cf[_0x205af3(0x9b)];}
|
|
@@ -11,15 +11,15 @@
|
|
|
11
11
|
* This file implements the `RunnerAdapter` interface with Lovrabet Runtime-specific logic:
|
|
12
12
|
* - `prepare`: resolves AccessKey auth, initializes the SDK client
|
|
13
13
|
* - `confirmHighRisk`: interactive or non-interactive confirmation
|
|
14
|
-
* - `riskPolicy`: logs violations and
|
|
15
|
-
*
|
|
14
|
+
* - `riskPolicy`: logs ordinary violations and, in native-tool hosts, returns a
|
|
15
|
+
* hard routing error for shell writes instead of suggesting risk escalation
|
|
16
16
|
* - `finalize`: clears the SDK client and active AccessKey from module state
|
|
17
17
|
*
|
|
18
|
-
* Why
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
18
|
+
* Why ordinary risk violations remain `cancelled`: outside a native-tool host,
|
|
19
|
+
* the configured ceiling is user policy and a blocked command is an expected
|
|
20
|
+
* cancellation. A host that explicitly advertises the native tool is different:
|
|
21
|
+
* shell writes are a routing error, so the CLI exits non-zero and tells the caller
|
|
22
|
+
* to use the permission-aware native tool without changing the risk ceiling.
|
|
23
23
|
*
|
|
24
24
|
* Design decision: `accessKey` is stored in a module-level variable in `api-client.ts`
|
|
25
25
|
* rather than threaded through the context. This simplifies the adapter's `prepare`
|
|
@@ -62,6 +62,8 @@ export interface PipelineEnv {
|
|
|
62
62
|
defaultVerbose?: boolean;
|
|
63
63
|
/** User-configured risk ceiling from the config file. */
|
|
64
64
|
riskLevel?: Risk;
|
|
65
|
+
/** Machine-managed capability flag for permission-aware native routing. */
|
|
66
|
+
nativeToolAvailable?: boolean;
|
|
65
67
|
/** AccessKey resolved from config (may be undefined for public commands). */
|
|
66
68
|
accessKey?: string;
|
|
67
69
|
/** Normalized environment name. */
|
package/lib/framework/runner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x2203c7,_0x581603){const _0x2b72a7=a119_0x2388,_0x5294c9=_0x2203c7();while(!![]){try{const _0x4475c9=-parseInt(_0x2b72a7(0x9d))/0x1*(-parseInt(_0x2b72a7(0x90))/0x2)+-parseInt(_0x2b72a7(0x8c))/0x3+parseInt(_0x2b72a7(0x85))/0x4+parseInt(_0x2b72a7(0xab))/0x5*(-parseInt(_0x2b72a7(0x9b))/0x6)+parseInt(_0x2b72a7(0xb9))/0x7+-parseInt(_0x2b72a7(0x98))/0x8+-parseInt(_0x2b72a7(0xa4))/0x9*(-parseInt(_0x2b72a7(0xa3))/0xa);if(_0x4475c9===_0x581603)break;else _0x5294c9['push'](_0x5294c9['shift']());}catch(_0x3376d4){_0x5294c9['push'](_0x5294c9['shift']());}}}(a119_0x5d5d,0x29f46));import{runCommandWithAdapter,requireConfirmationPrompt}from'@lovrabet/cli-framework';import{formatOutput}from'../framework/output.js';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME,GLOBAL_FLAGS,PIPELINE_FLAG_NAMES}from'../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../constant/product.js';import{isNonInteractiveMode,readAppCodeFromConfig}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{getApiDomain,getRuntimeDomain}from'../constant/domain.js';import{buildConfirmationLines,reconstructCommandArgv}from'../framework/runner-confirmation.js';import{mapUserFacingExecuteError}from'../framework/runner-error.js';import{assertKnownCommandFlags}from'../framework/raw-flags.js';import{resolveLatestUpdateNotice}from'../utils/update-notice.js';import{assertCliVersionSupported,checkCliVersion}from'../utils/cli-version-check.js';import{findAppByCode,findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../commands/app/eligibility.js';export function resolveAuthMode(_0x13147b){const _0x4bb170=a119_0x2388;return void _0x13147b,AUTH_MODE[_0x4bb170(0xb5)];}let sdkClientInitialized=![];export function createPipelineEnv(_0xd9c85b,_0xd1ed24){const _0x56dba1=a119_0x2388,_0x388a7f=typeof _0xd1ed24[_0x56dba1(0x84)]===_0x56dba1(0x8d)&&_0xd1ed24[_0x56dba1(0x84)][_0x56dba1(0x81)]();return{'rawFlags':_0xd1ed24,'appCode':_0xd9c85b[_0x56dba1(0xa7)]||productEnv(_0x56dba1(0x86))||(_0x388a7f?undefined:readAppCodeFromConfig()),'appCodeSource':_0xd9c85b['appCodeSource'],'apiDomain':getApiDomain(),'runtimeDomain':getRuntimeDomain(),'isNonInteractive':isNonInteractiveMode(_0xd1ed24),'defaultFormat':_0xd9c85b[_0x56dba1(0xb8)],'defaultPageSize':_0xd9c85b['pageSize'],'defaultVerbose':_0xd9c85b[_0x56dba1(0x8f)],'riskLevel':_0xd9c85b[_0x56dba1(0x7f)],'accessKey':_0xd9c85b[_0x56dba1(0xac)],'env':_0xd9c85b[_0x56dba1(0x8e)],'mergedCli':{'defaultApp':_0xd9c85b[_0x56dba1(0x9c)],'currentApp':_0xd9c85b[_0x56dba1(0xbc)],'appCode':_0xd9c85b[_0x56dba1(0xa7)]}};}function a119_0x2388(_0x3b1192,_0x75d69d){_0x3b1192=_0x3b1192-0x7d;const _0x5d5d37=a119_0x5d5d();let _0x238897=_0x5d5d37[_0x3b1192];return _0x238897;}export function createLovrabetRunnerAdapter(_0x4de3ad={}){const _0x46a260=a119_0x2388,_0x441a5d={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[_0x46a260(0x8b)](_0x4d2911=>PIPELINE_FLAG_NAMES[_0x46a260(0x7d)](_0x4d2911[_0x46a260(0x80)]))['map'](({name:_0x118866,type:_0x3d9ca2,description:_0x3af14e})=>({'name':_0x118866,'type':_0x3d9ca2,'description':_0x3af14e})),'formatOutput':_0x4de3ad[_0x46a260(0xaa)]??formatOutput,'getCommandLabel'(_0x35a886){const _0x5ef8cd=_0x46a260;return CLI_BIN_NAME+'\x20'+_0x35a886['service']+'\x20'+_0x35a886[_0x5ef8cd(0x99)];},'riskPolicy':{'onViolation'(_0x471f63){console['error'](_0x471f63);},'createError'(_0x14317e){const _0x2ec1d9=_0x46a260;return CliErrors[_0x2ec1d9(0x82)](_0x14317e);}},async 'prepare'(_0x2d5882,_0x5863a5){const _0x2667d3=_0x46a260,_0x37087c=resolveAuthMode(_0x5863a5);if(_0x2d5882[_0x2667d3(0xa1)]!==![]){if(!_0x5863a5[_0x2667d3(0xac)])throw CliErrors[_0x2667d3(0xa9)]('Set\x20accessKey\x20in\x20'+PRODUCT_CONFIG['newConfigFileName']+_0x2667d3(0xb7)+productEnvName(_0x2667d3(0x93))+'.');const {setActiveAK:_0x524850}=await import(_0x2667d3(0xb3));_0x524850(_0x5863a5['accessKey']);}let _0x573263='';if(_0x2d5882[_0x2667d3(0x97)]!==![]){_0x573263=_0x5863a5['appCode']??'',_0x573263=await resolveExplicitAppName(_0x2d5882,_0x5863a5,_0x573263);if(!_0x573263){await assertSelectedAppNameIsRuntimeAccessible(_0x2d5882,_0x5863a5);throw CliErrors[_0x2667d3(0xbd)](_0x2667d3(0xbb)+PRODUCT_CONFIG['newConfigFileName']+'.');}await assertAppCodeIsRuntimeAccessible(_0x2d5882,_0x5863a5,_0x573263);}if(_0x573263){const {initSdkClient:_0xf152a9}=await import('../core/sdk-client.js');_0xf152a9({'appCode':_0x573263,'env':_0x5863a5[_0x2667d3(0x8e)]??'production','runtimeDomain':_0x5863a5[_0x2667d3(0xb6)],'accessKey':_0x5863a5[_0x2667d3(0xac)],'authMode':_0x37087c}),sdkClientInitialized=!![];}return{'defaults':{'booleans':{'verbose':_0x5863a5[_0x2667d3(0xaf)]},'numbers':{'pagesize':_0x5863a5[_0x2667d3(0x8a)]}},'extras':{'appCode':_0x573263,'cookie':'','apiDomain':_0x5863a5[_0x2667d3(0xb2)],'apiDir':'','accessKey':_0x5863a5[_0x2667d3(0xac)],'envName':_0x5863a5[_0x2667d3(0x8e)],'mergedCli':_0x5863a5[_0x2667d3(0xb4)]}};},'confirmHighRisk':_0x4de3ad[_0x46a260(0x92)]??(async({def:_0x535b0b,env:_0x493924,flags:_0x42f485,commandLabel:_0x4a6500})=>{const _0x4dffab=_0x46a260;if(_0x493924[_0x4dffab(0xbf)]){const _0x5dfc7a=reconstructCommandArgv(_0x535b0b,_0x42f485);throw CliErrors[_0x4dffab(0x9f)]('High-risk\x20operation\x20`'+_0x4a6500+'`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a'+(_0x4dffab(0xb1)+_0x5dfc7a));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x535b0b,_0x4a6500,_0x42f485),'createCancelledError':_0x2af315=>CliErrors['cancelled'](_0x2af315)});}),'mapDryRunError'(_0x1e225e){return mapUserFacingExecuteError(_0x1e225e);},'mapExecuteError'(_0x14fc2d){return mapUserFacingExecuteError(_0x14fc2d);},async 'finalize'(){await finalizeLovrabetRuntimeState();}};return _0x441a5d;}const terminalRunnerAdapter=createLovrabetRunnerAdapter();export async function finalizeLovrabetRuntimeState(){const _0x7e8ddb=a119_0x2388;try{if(sdkClientInitialized){const {clearSdkClient:_0x2fb209}=await import(_0x7e8ddb(0x87));_0x2fb209();}}finally{sdkClientInitialized=![];const {clearActiveAK:_0x5e0a06}=await import(_0x7e8ddb(0xb3));_0x5e0a06();}}async function resolveExplicitAppName(_0x220d19,_0x22c96d,_0x167be1){const _0x4a77f8=a119_0x2388;if(_0x220d19[_0x4a77f8(0x97)]===![])return _0x167be1;const _0x34c35e=typeof _0x22c96d['rawFlags'][_0x4a77f8(0x84)]==='string'?_0x22c96d[_0x4a77f8(0xa0)]['app'][_0x4a77f8(0x81)]():'';if(!_0x34c35e)return _0x167be1;const _0x5a5642=typeof _0x22c96d['rawFlags'][_0x4a77f8(0x94)]===_0x4a77f8(0x8d)&&_0x22c96d[_0x4a77f8(0xa0)][_0x4a77f8(0x94)][_0x4a77f8(0x81)]()||productEnv(_0x4a77f8(0x86));if(_0x5a5642||_0x22c96d[_0x4a77f8(0xbe)]==='local-alias')return _0x167be1;const {getRemoteAppList:_0x31541b}=await import('../commands/app/remote-source.js'),_0x1734f3=await _0x31541b({'env':_0x22c96d[_0x4a77f8(0x8e)]??_0x4a77f8(0xa8),'accessKey':_0x22c96d[_0x4a77f8(0xac)]}),_0x1a0f69=findAppByName(_0x1734f3['items'],_0x34c35e);if(_0x1a0f69&&!isRuntimeAccessibleApp(_0x1a0f69))throw runtimeInaccessibleAppError(_0x1a0f69,'\x22'+_0x34c35e+'\x22');const _0x40f3e8=_0x1a0f69?.[_0x4a77f8(0xa7)]?.[_0x4a77f8(0x81)]();if(_0x40f3e8)return _0x40f3e8;throw CliErrors[_0x4a77f8(0x9f)](_0x4a77f8(0x96)+_0x34c35e,_0x4a77f8(0xa6)+CLI_BIN_NAME+'\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.'+_0x34c35e+'.appcode\x20to\x20'+PRODUCT_CONFIG['newConfigFileName']+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0x3f92d6,_0x4c45ea){const _0x2aafce=a119_0x2388;if(_0x3f92d6[_0x2aafce(0x97)]===![]||!_0x4c45ea[_0x2aafce(0xac)])return;const _0x57a8f5=(typeof _0x4c45ea['rawFlags']['app']===_0x2aafce(0x8d)&&_0x4c45ea[_0x2aafce(0xa0)][_0x2aafce(0x84)][_0x2aafce(0x81)]()?_0x4c45ea[_0x2aafce(0xa0)][_0x2aafce(0x84)]:_0x4c45ea['mergedCli']?.[_0x2aafce(0xbc)]??_0x4c45ea[_0x2aafce(0xb4)]?.[_0x2aafce(0x9c)])?.[_0x2aafce(0x81)]();if(!_0x57a8f5)return;const {getRemoteAppList:_0xff8024}=await import(_0x2aafce(0x9e)),_0x1d562a=await _0xff8024({'env':_0x4c45ea[_0x2aafce(0x8e)]??_0x2aafce(0xa8),'accessKey':_0x4c45ea[_0x2aafce(0xac)]}),_0x36bcbd=findAppByName(_0x1d562a['items'],_0x57a8f5);if(_0x36bcbd&&!isRuntimeAccessibleApp(_0x36bcbd))throw runtimeInaccessibleAppError(_0x36bcbd,'\x22'+_0x57a8f5+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0x15a2a9,_0x114c79,_0x1d476e){const _0x21c65a=a119_0x2388;if(_0x15a2a9[_0x21c65a(0x97)]===![]||!_0x114c79['accessKey'])return;const {getRemoteAppList:_0x2bb792}=await import(_0x21c65a(0x9e)),_0x21835a=await _0x2bb792({'env':_0x114c79[_0x21c65a(0x8e)]??_0x21c65a(0xa8),'accessKey':_0x114c79[_0x21c65a(0xac)]}),_0x36e795=findAppByCode(_0x21835a[_0x21c65a(0xa2)],_0x1d476e);if(_0x36e795&&!isRuntimeAccessibleApp(_0x36e795))throw runtimeInaccessibleAppError(_0x36e795,_0x21c65a(0x91)+_0x1d476e+'\x22');}export async function runCommand(_0x159b08,_0x58e2f0,_0x29950c=terminalRunnerAdapter){assertKnownCommandFlags(_0x159b08,_0x58e2f0['rawFlags']),await runCommandWithAdapter(shouldApplyVersionPolicy(_0x159b08)?withVersionPolicy(_0x159b08):_0x159b08,_0x58e2f0,_0x29950c);}function shouldApplyVersionPolicy(_0x5c2b11){const _0x14280a=a119_0x2388;if([_0x14280a(0x9a),_0x14280a(0x89),'doctor'][_0x14280a(0xa5)](_0x5c2b11[_0x14280a(0xba)]))return![];return!(_0x5c2b11[_0x14280a(0xba)]===_0x14280a(0xb0)&&_0x5c2b11[_0x14280a(0x99)]===_0x14280a(0x83));}function withVersionPolicy(_0x2390c3){return{..._0x2390c3,async 'execute'(_0x3a8b8f){const _0x33d6a1=a119_0x2388,_0x4d1e51=await checkCliVersion();assertCliVersionSupported(_0x4d1e51);const _0x27ca54=shouldResolveUpdateNotice(_0x3a8b8f)?resolveLatestUpdateNotice(_0x4d1e51)[_0x33d6a1(0xae)](()=>null):Promise[_0x33d6a1(0x7e)](null),_0x4ba8b7=await _0x2390c3[_0x33d6a1(0x88)](_0x3a8b8f);return attachUpdateNotice(_0x4ba8b7,await _0x27ca54);}};}function shouldResolveUpdateNotice(_0x358e7b){const _0x2da322=a119_0x2388;return _0x358e7b[_0x2da322(0xb8)]==='pretty'&&!_0x358e7b['nonInteractive'];}function a119_0x5d5d(){const _0x162dd2=['cli-skill','\x20\x20To\x20proceed:\x20','apiDomain','../core/api-client.js','mergedCli','ClientAk','runtimeDomain','\x20or\x20pass\x20','format','1412271ETBvxy','service','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20','currentApp','configMissing','appCodeSource','isNonInteractive','has','resolve','riskLevel','name','trim','cancelled','install','app','419648VDIsTw','APPCODE','../core/sdk-client.js','execute','schema','defaultPageSize','filter','184101stotNb','string','env','verbose','52yvzuNK','appcode\x20\x22','confirmHighRisk','ACCESS_KEY','appcode','_notice','Unknown\x20app:\x20','requiresAppCode','1817744zqmEhQ','command','update','960lORPim','defaultApp','8338YdqatV','../commands/app/remote-source.js','validation','rawFlags','requiresAuth','items','32590fyZGYF','198Kszowe','includes','Run\x20`','appCode','production','authRequired','formatOutput','4210YrijnX','accessKey','object','catch','defaultVerbose'];a119_0x5d5d=function(){return _0x162dd2;};return a119_0x5d5d();}function attachUpdateNotice(_0x47492f,_0x33a7f4){const _0x1dc4e7=a119_0x2388;if(!_0x33a7f4||!_0x47492f||typeof _0x47492f!==_0x1dc4e7(0xad))return _0x47492f;const _0x691a60=_0x47492f,_0x433499=typeof _0x691a60[_0x1dc4e7(0x95)]===_0x1dc4e7(0xad)&&_0x691a60[_0x1dc4e7(0x95)]!==null?_0x691a60[_0x1dc4e7(0x95)]:{};return{..._0x691a60,'_notice':{..._0x433499,'update':_0x33a7f4}};}
|
|
1
|
+
(function(_0x4195d8,_0x2913c8){const _0x56f62e=a119_0x1cc2,_0x2012e9=_0x4195d8();while(!![]){try{const _0x60b74e=-parseInt(_0x56f62e(0x136))/0x1*(parseInt(_0x56f62e(0xf6))/0x2)+parseInt(_0x56f62e(0x103))/0x3+-parseInt(_0x56f62e(0x100))/0x4+parseInt(_0x56f62e(0x10b))/0x5+parseInt(_0x56f62e(0x132))/0x6*(parseInt(_0x56f62e(0x129))/0x7)+-parseInt(_0x56f62e(0x102))/0x8+parseInt(_0x56f62e(0x10e))/0x9;if(_0x60b74e===_0x2913c8)break;else _0x2012e9['push'](_0x2012e9['shift']());}catch(_0x565a64){_0x2012e9['push'](_0x2012e9['shift']());}}}(a119_0x18a4,0xdea07));import{runCommandWithAdapter,requireConfirmationPrompt}from'@lovrabet/cli-framework';import{formatOutput}from'../framework/output.js';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME,GLOBAL_FLAGS,PIPELINE_FLAG_NAMES}from'../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../constant/product.js';import{isNonInteractiveMode,readAppCodeFromConfig}from'../context.js';function a119_0x1cc2(_0x2f2772,_0x5e5132){_0x2f2772=_0x2f2772-0xf3;const _0x18a41a=a119_0x18a4();let _0x1cc243=_0x18a41a[_0x2f2772];return _0x1cc243;}import{AUTH_MODE}from'../constant/auth-mode.js';import{getApiDomain,getRuntimeDomain}from'../constant/domain.js';import{buildConfirmationLines,reconstructCommandArgv}from'../framework/runner-confirmation.js';import{mapUserFacingExecuteError}from'../framework/runner-error.js';import{assertKnownCommandFlags}from'../framework/raw-flags.js';import{resolveLatestUpdateNotice}from'../utils/update-notice.js';import{assertCliVersionSupported,checkCliVersion}from'../utils/cli-version-check.js';import{findAppByCode,findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../commands/app/eligibility.js';export function resolveAuthMode(_0x4e85e4){const _0x57b6fc=a119_0x1cc2;return void _0x4e85e4,AUTH_MODE[_0x57b6fc(0x128)];}let sdkClientInitialized=![];export function createPipelineEnv(_0x39e079,_0x431491){const _0x2ae3d1=a119_0x1cc2,_0x19bcf2=typeof _0x431491[_0x2ae3d1(0x119)]===_0x2ae3d1(0x10c)&&_0x431491[_0x2ae3d1(0x119)][_0x2ae3d1(0xfd)]();return{'rawFlags':_0x431491,'appCode':_0x39e079[_0x2ae3d1(0x101)]||productEnv('APPCODE')||(_0x19bcf2?undefined:readAppCodeFromConfig()),'appCodeSource':_0x39e079[_0x2ae3d1(0xf8)],'apiDomain':getApiDomain(),'runtimeDomain':getRuntimeDomain(),'isNonInteractive':isNonInteractiveMode(_0x431491),'defaultFormat':_0x39e079[_0x2ae3d1(0x104)],'defaultPageSize':_0x39e079['pageSize'],'defaultVerbose':_0x39e079[_0x2ae3d1(0x11a)],'riskLevel':_0x39e079[_0x2ae3d1(0x137)],'nativeToolAvailable':_0x39e079[_0x2ae3d1(0x139)],'accessKey':_0x39e079[_0x2ae3d1(0x10f)],'env':_0x39e079[_0x2ae3d1(0x12d)],'mergedCli':{'defaultApp':_0x39e079[_0x2ae3d1(0xff)],'currentApp':_0x39e079[_0x2ae3d1(0xfa)],'appCode':_0x39e079[_0x2ae3d1(0x101)]}};}export function createLovrabetRunnerAdapter(_0x352780={}){const _0x3b87b2=a119_0x1cc2,_0x2491cd={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[_0x3b87b2(0x10d)](_0x4c1ea8=>PIPELINE_FLAG_NAMES[_0x3b87b2(0xfb)](_0x4c1ea8[_0x3b87b2(0x134)]))[_0x3b87b2(0x113)](({name:_0x4f1aeb,type:_0x449773,description:_0x12025f})=>({'name':_0x4f1aeb,'type':_0x449773,'description':_0x12025f})),'formatOutput':_0x352780[_0x3b87b2(0x11d)]??formatOutput,'getCommandLabel'(_0x46ca3e){const _0x2f7d7c=_0x3b87b2;return CLI_BIN_NAME+'\x20'+_0x46ca3e[_0x2f7d7c(0x127)]+'\x20'+_0x46ca3e['command'];},'riskPolicy':{'onViolation'(_0x58dff4,{def:_0x16b7dd,env:_0x40cedf}){const _0x4743b1=_0x3b87b2;if(shouldRouteWriteToNativeTool(_0x16b7dd,_0x40cedf))return;console[_0x4743b1(0x105)](_0x58dff4);},'createError'(_0x2c1297,{def:_0x675ce7,env:_0x6fdefc}){const _0x26e05f=_0x3b87b2;if(shouldRouteWriteToNativeTool(_0x675ce7,_0x6fdefc))return CliErrors[_0x26e05f(0x117)](CLI_BIN_NAME+'\x20'+_0x675ce7[_0x26e05f(0x127)]+'\x20'+_0x675ce7[_0x26e05f(0xf7)]);return CliErrors[_0x26e05f(0x120)](_0x2c1297);}},async 'prepare'(_0x2dbb58,_0x4f9686){const _0x274384=_0x3b87b2,_0x306bc7=resolveAuthMode(_0x4f9686);if(_0x2dbb58[_0x274384(0x112)]!==![]){if(!_0x4f9686[_0x274384(0x10f)])throw CliErrors[_0x274384(0x122)]('Set\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x274384(0x12e)]+_0x274384(0x118)+productEnvName(_0x274384(0x110))+'.');const {setActiveAK:_0x3fa88b}=await import(_0x274384(0x108));_0x3fa88b(_0x4f9686['accessKey']);}let _0x1349a0='';if(_0x2dbb58['requiresAppCode']!==![]){_0x1349a0=_0x4f9686['appCode']??'',_0x1349a0=await resolveExplicitAppName(_0x2dbb58,_0x4f9686,_0x1349a0);if(!_0x1349a0){await assertSelectedAppNameIsRuntimeAccessible(_0x2dbb58,_0x4f9686);throw CliErrors[_0x274384(0x11b)](_0x274384(0xfe)+PRODUCT_CONFIG[_0x274384(0x12e)]+'.');}await assertAppCodeIsRuntimeAccessible(_0x2dbb58,_0x4f9686,_0x1349a0);}if(_0x1349a0){const {initSdkClient:_0x3f1295}=await import('../core/sdk-client.js');_0x3f1295({'appCode':_0x1349a0,'env':_0x4f9686[_0x274384(0x12d)]??_0x274384(0x11f),'runtimeDomain':_0x4f9686[_0x274384(0x111)],'accessKey':_0x4f9686[_0x274384(0x10f)],'authMode':_0x306bc7}),sdkClientInitialized=!![];}return{'defaults':{'booleans':{'verbose':_0x4f9686['defaultVerbose']},'numbers':{'pagesize':_0x4f9686[_0x274384(0xf9)]}},'extras':{'appCode':_0x1349a0,'cookie':'','apiDomain':_0x4f9686[_0x274384(0x13a)],'apiDir':'','accessKey':_0x4f9686[_0x274384(0x10f)],'envName':_0x4f9686[_0x274384(0x12d)],'mergedCli':_0x4f9686['mergedCli']}};},'confirmHighRisk':_0x352780[_0x3b87b2(0x123)]??(async({def:_0xe0814a,env:_0x2337f8,flags:_0x5a48ce,commandLabel:_0x40ff35})=>{const _0x16c4fa=_0x3b87b2;if(_0x2337f8['isNonInteractive']){const _0x25b280=reconstructCommandArgv(_0xe0814a,_0x5a48ce);throw CliErrors['validation'](_0x16c4fa(0x115)+_0x40ff35+_0x16c4fa(0x12a)+(_0x16c4fa(0xf5)+_0x25b280));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0xe0814a,_0x40ff35,_0x5a48ce),'createCancelledError':_0x37dcb3=>CliErrors['cancelled'](_0x37dcb3)});}),'mapDryRunError'(_0x74229f){return mapUserFacingExecuteError(_0x74229f);},'mapExecuteError'(_0x16764f){return mapUserFacingExecuteError(_0x16764f);},async 'finalize'(){await finalizeLovrabetRuntimeState();}};return _0x2491cd;}function shouldRouteWriteToNativeTool(_0x4a1c45,_0x3d2c25){const _0x185ed9=a119_0x1cc2;return _0x3d2c25[_0x185ed9(0x139)]===!![]&&(_0x4a1c45[_0x185ed9(0x12c)]==='write'||_0x4a1c45['risk']==='high-risk-write');}const terminalRunnerAdapter=createLovrabetRunnerAdapter();export async function finalizeLovrabetRuntimeState(){const _0x4ae8a4=a119_0x1cc2;try{if(sdkClientInitialized){const {clearSdkClient:_0x4dab87}=await import(_0x4ae8a4(0x13b));_0x4dab87();}}finally{sdkClientInitialized=![];const {clearActiveAK:_0x270386}=await import('../core/api-client.js');_0x270386();}}async function resolveExplicitAppName(_0x1a16b3,_0x2457c5,_0x326b9b){const _0x33c77b=a119_0x1cc2;if(_0x1a16b3[_0x33c77b(0x116)]===![])return _0x326b9b;const _0x5dc935=typeof _0x2457c5[_0x33c77b(0x107)][_0x33c77b(0x119)]===_0x33c77b(0x10c)?_0x2457c5[_0x33c77b(0x107)][_0x33c77b(0x119)]['trim']():'';if(!_0x5dc935)return _0x326b9b;const _0x3e9273=typeof _0x2457c5[_0x33c77b(0x107)][_0x33c77b(0x130)]===_0x33c77b(0x10c)&&_0x2457c5[_0x33c77b(0x107)][_0x33c77b(0x130)]['trim']()||productEnv(_0x33c77b(0xfc));if(_0x3e9273||_0x2457c5[_0x33c77b(0xf8)]===_0x33c77b(0x133))return _0x326b9b;const {getRemoteAppList:_0x275611}=await import(_0x33c77b(0x109)),_0x2e887f=await _0x275611({'env':_0x2457c5['env']??_0x33c77b(0x11f),'accessKey':_0x2457c5[_0x33c77b(0x10f)]}),_0x5a3e7d=findAppByName(_0x2e887f[_0x33c77b(0x106)],_0x5dc935);if(_0x5a3e7d&&!isRuntimeAccessibleApp(_0x5a3e7d))throw runtimeInaccessibleAppError(_0x5a3e7d,'\x22'+_0x5dc935+'\x22');const _0x18c4c7=_0x5a3e7d?.[_0x33c77b(0x101)]?.[_0x33c77b(0xfd)]();if(_0x18c4c7)return _0x18c4c7;throw CliErrors[_0x33c77b(0x124)](_0x33c77b(0x125)+_0x5dc935,_0x33c77b(0x126)+CLI_BIN_NAME+'\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.'+_0x5dc935+_0x33c77b(0x131)+PRODUCT_CONFIG['newConfigFileName']+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0xc16b33,_0x19aa47){const _0x44c893=a119_0x1cc2;if(_0xc16b33['requiresAppCode']===![]||!_0x19aa47[_0x44c893(0x10f)])return;const _0x22a262=(typeof _0x19aa47['rawFlags']['app']===_0x44c893(0x10c)&&_0x19aa47[_0x44c893(0x107)][_0x44c893(0x119)][_0x44c893(0xfd)]()?_0x19aa47[_0x44c893(0x107)]['app']:_0x19aa47['mergedCli']?.[_0x44c893(0xfa)]??_0x19aa47[_0x44c893(0x114)]?.[_0x44c893(0xff)])?.[_0x44c893(0xfd)]();if(!_0x22a262)return;const {getRemoteAppList:_0xe380ae}=await import(_0x44c893(0x109)),_0x5cc0da=await _0xe380ae({'env':_0x19aa47['env']??_0x44c893(0x11f),'accessKey':_0x19aa47[_0x44c893(0x10f)]}),_0x54a1bf=findAppByName(_0x5cc0da['items'],_0x22a262);if(_0x54a1bf&&!isRuntimeAccessibleApp(_0x54a1bf))throw runtimeInaccessibleAppError(_0x54a1bf,'\x22'+_0x22a262+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0x608362,_0x4361ec,_0x532c7b){const _0x4cf0a6=a119_0x1cc2;if(_0x608362[_0x4cf0a6(0x116)]===![]||!_0x4361ec['accessKey'])return;const {getRemoteAppList:_0x566dbf}=await import(_0x4cf0a6(0x109)),_0xbbd736=await _0x566dbf({'env':_0x4361ec[_0x4cf0a6(0x12d)]??_0x4cf0a6(0x11f),'accessKey':_0x4361ec[_0x4cf0a6(0x10f)]}),_0x4df01b=findAppByCode(_0xbbd736[_0x4cf0a6(0x106)],_0x532c7b);if(_0x4df01b&&!isRuntimeAccessibleApp(_0x4df01b))throw runtimeInaccessibleAppError(_0x4df01b,_0x4cf0a6(0xf4)+_0x532c7b+'\x22');}export async function runCommand(_0x29b1e0,_0x2e111a,_0x5d3e4c=terminalRunnerAdapter){const _0x7e076c=a119_0x1cc2;assertKnownCommandFlags(_0x29b1e0,_0x2e111a[_0x7e076c(0x107)]),await runCommandWithAdapter(shouldApplyVersionPolicy(_0x29b1e0)?withVersionPolicy(_0x29b1e0):_0x29b1e0,_0x2e111a,_0x5d3e4c);}function shouldApplyVersionPolicy(_0x31020b){const _0x201c35=a119_0x1cc2;if([_0x201c35(0x13d),_0x201c35(0x12f),_0x201c35(0x121)][_0x201c35(0x13c)](_0x31020b[_0x201c35(0x127)]))return![];return!(_0x31020b['service']===_0x201c35(0xf3)&&_0x31020b[_0x201c35(0xf7)]===_0x201c35(0x11e));}function a119_0x18a4(){const _0xbb0334=['.appcode\x20to\x20','2270994lkIecr','local-alias','name','_notice','8093cBaFoO','riskLevel','resolve','nativeToolAvailable','apiDomain','../core/sdk-client.js','includes','update','nonInteractive','cli-skill','appcode\x20\x22','\x20\x20To\x20proceed:\x20','94IHELwz','command','appCodeSource','defaultPageSize','currentApp','has','APPCODE','trim','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20','defaultApp','6001640SpsXqF','appCode','10551584ILaGSy','1900404rDQSPM','format','error','items','rawFlags','../core/api-client.js','../commands/app/remote-source.js','catch','6263425mHPilc','string','filter','16622604hmhcYK','accessKey','ACCESS_KEY','runtimeDomain','requiresAuth','map','mergedCli','High-risk\x20operation\x20`','requiresAppCode','nativeToolRequired','\x20or\x20pass\x20','app','verbose','configMissing','pretty','formatOutput','install','production','cancelled','doctor','authRequired','confirmHighRisk','validation','Unknown\x20app:\x20','Run\x20`','service','ClientAk','7sAdwPu','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a','object','risk','env','newConfigFileName','schema','appcode'];a119_0x18a4=function(){return _0xbb0334;};return a119_0x18a4();}function withVersionPolicy(_0x4b5fd0){return{..._0x4b5fd0,async 'execute'(_0xcbce24){const _0x50a4d6=a119_0x1cc2,_0x48bba9=await checkCliVersion();assertCliVersionSupported(_0x48bba9);const _0x143895=shouldResolveUpdateNotice(_0xcbce24)?resolveLatestUpdateNotice(_0x48bba9)[_0x50a4d6(0x10a)](()=>null):Promise[_0x50a4d6(0x138)](null),_0x4b8ccb=await _0x4b5fd0['execute'](_0xcbce24);return attachUpdateNotice(_0x4b8ccb,await _0x143895);}};}function shouldResolveUpdateNotice(_0x2a5f5c){const _0x48cc54=a119_0x1cc2;return _0x2a5f5c[_0x48cc54(0x104)]===_0x48cc54(0x11c)&&!_0x2a5f5c[_0x48cc54(0x13e)];}function attachUpdateNotice(_0x1a10e0,_0x2041e9){const _0xb44de=a119_0x1cc2;if(!_0x2041e9||!_0x1a10e0||typeof _0x1a10e0!=='object')return _0x1a10e0;const _0x4eeb43=_0x1a10e0,_0x46bebc=typeof _0x4eeb43['_notice']===_0xb44de(0x12b)&&_0x4eeb43[_0xb44de(0x135)]!==null?_0x4eeb43[_0xb44de(0x135)]:{};return{..._0x4eeb43,'_notice':{..._0x46bebc,'update':_0x2041e9}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x14aced,_0x24710e){const _0x5c05a7=a120_0x16a3,_0x4d6b3a=_0x14aced();while(!![]){try{const _0x3ce285=parseInt(_0x5c05a7(0x10e))/0x1*(parseInt(_0x5c05a7(0xff))/0x2)+-parseInt(_0x5c05a7(0x100))/0x3+parseInt(_0x5c05a7(0x107))/0x4*(parseInt(_0x5c05a7(0x102))/0x5)+-parseInt(_0x5c05a7(0xfe))/0x6+-parseInt(_0x5c05a7(0xfd))/0x7+parseInt(_0x5c05a7(0x10b))/0x8*(-parseInt(_0x5c05a7(0x10a))/0x9)+-parseInt(_0x5c05a7(0x101))/0xa*(-parseInt(_0x5c05a7(0x10c))/0xb);if(_0x3ce285===_0x24710e)break;else _0x4d6b3a['push'](_0x4d6b3a['shift']());}catch(_0x45d84f){_0x4d6b3a['push'](_0x4d6b3a['shift']());}}}(a120_0x4bf4,0xbadef));import{buildSchemaPayload as a120_0x223343}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{findDynamicServiceDefinition,listDynamicServiceEntries}from'../commands/service/dynamic.js';import{insertDynamicServicesAfterServiceTree}from'../framework/service-order.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';function a120_0x4bf4(){const _0x1ed6cb=['14294cZEdHs','1079640sqzBgb','910HaQKHI','1943550MtVPVh','filter','commands','../commands/registry.js','requiresAuth','12KbDFRe','has','service','9dJkPKb','5139416RUmvho','219329JHotnI','services','42kVnsAu','required','map','1560888qRhUbq','7740234xiDAwB'];a120_0x4bf4=function(){return _0x1ed6cb;};return a120_0x4bf4();}function a120_0x16a3(_0x1ca0cd,_0x48d61f){_0x1ca0cd=_0x1ca0cd-0xfd;const _0x4bf4e5=a120_0x4bf4();let _0x16a3ff=_0x4bf4e5[_0x1ca0cd];return _0x16a3ff;}import{getCliGitCommit,getCliVersion}from'../utils/version.js';export async function buildSchemaPayload(){const _0x2a5f13=a120_0x16a3,{serviceRegistry:_0x388f00,findDefinition:_0x233f3c}=await import(_0x2a5f13(0x105)),_0x4e6834=new Set(_0x388f00[_0x2a5f13(0x110)](_0x5890b9=>_0x5890b9[_0x2a5f13(0x109)])),_0x580e77=listDynamicServiceEntries()[_0x2a5f13(0x103)](_0x53b7b7=>!_0x4e6834[_0x2a5f13(0x108)](_0x53b7b7['service'])),_0x213372=a120_0x223343({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':getCliGitCommit(),'globalFlags':GLOBAL_FLAGS,'serviceRegistry':insertDynamicServicesAfterServiceTree(_0x388f00,_0x580e77),'buildAllFlags':buildAllFlags,'findDefinition':(_0x1587be,_0x168834)=>_0x233f3c(_0x1587be,_0x168834)??findDynamicServiceDefinition(_0x1587be,_0x168834)});return normalizeSchemaPayload(_0x213372);}function normalizeSchemaPayload(_0x3dc2e){const _0x5541e6=a120_0x16a3;return{..._0x3dc2e,'schemaVersion':0x2,'services':_0x3dc2e[_0x5541e6(0x10d)]['map'](_0x55692d=>({..._0x55692d,'commands':_0x55692d[_0x5541e6(0x104)]['map'](normalizeSchemaCommand)}))};}function normalizeSchemaCommand(_0x42e699){const _0x29e94e=a120_0x16a3,_0xff770=_0x42e699;return{..._0x42e699,'auth':_0xff770['auth']??(_0x42e699[_0x29e94e(0x106)]?_0x29e94e(0x10f):'none')};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4a173a,_0x310ab5){const _0x3f4c12=a121_0x2837,_0x392cf0=_0x4a173a();while(!![]){try{const _0x5cf2c6=-parseInt(_0x3f4c12(0x183))/0x1*(parseInt(_0x3f4c12(0x182))/0x2)+parseInt(_0x3f4c12(0x180))/0x3*(parseInt(_0x3f4c12(0x17e))/0x4)+-parseInt(_0x3f4c12(0x184))/0x5*(parseInt(_0x3f4c12(0x17c))/0x6)+-parseInt(_0x3f4c12(0x17f))/0x7+parseInt(_0x3f4c12(0x185))/0x8+-parseInt(_0x3f4c12(0x186))/0x9+parseInt(_0x3f4c12(0x181))/0xa;if(_0x5cf2c6===_0x310ab5)break;else _0x392cf0['push'](_0x392cf0['shift']());}catch(_0x14cc8e){_0x392cf0['push'](_0x392cf0['shift']());}}}(a121_0x153b,0x25f0e));function a121_0x153b(){const _0x276124=['findIndex','276702SbocuO','slice','8012mTJmoF','955724fDVilo','237lfXRhX','8174870dlVLic','300yqRFqz','1707EnhPFc','25dHBKFt','308552tTmeJF','2121480BTgEeY'];a121_0x153b=function(){return _0x276124;};return a121_0x153b();}function a121_0x2837(_0x296774,_0x8ccc14){_0x296774=_0x296774-0x17b;const _0x153bfc=a121_0x153b();let _0x2837c1=_0x153bfc[_0x296774];return _0x2837c1;}export function insertDynamicServicesAfterServiceTree(_0x442877,_0x5d894d){const _0x544410=a121_0x2837;if(_0x5d894d['length']===0x0)return[..._0x442877];const _0x4c3f4c=_0x442877[_0x544410(0x17b)](_0x5800b8=>_0x5800b8['service']==='service');if(_0x4c3f4c<0x0)return[..._0x442877,..._0x5d894d];return[..._0x442877[_0x544410(0x17d)](0x0,_0x4c3f4c+0x1),..._0x5d894d,..._0x442877['slice'](_0x4c3f4c+0x1)];}
|
package/lib/framework/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a122_0x1d9a(_0x318155,_0x5c8c39){_0x318155=_0x318155-0x135;var _0x1269a1=a122_0x1269();var _0x1d9a72=_0x1269a1[_0x318155];return _0x1d9a72;}function a122_0x1269(){var _0x31bb09=['13024776oonSOl','15922179Kqfvtp','5mMATLh','4557shVsxY','9AjaczT','3869452hGsBnH','13926neMTZE','37139800fZbWVV','5507361IhFsQk','294262jmplUQ'];a122_0x1269=function(){return _0x31bb09;};return a122_0x1269();}(function(_0x373c1e,_0x1ad22e){var _0x42d251=a122_0x1d9a,_0x4ba24e=_0x373c1e();while(!![]){try{var _0x4b0e97=-parseInt(_0x42d251(0x13d))/0x1*(parseInt(_0x42d251(0x138))/0x2)+-parseInt(_0x42d251(0x137))/0x3+-parseInt(_0x42d251(0x13e))/0x4*(parseInt(_0x42d251(0x13b))/0x5)+parseInt(_0x42d251(0x135))/0x6*(parseInt(_0x42d251(0x13c))/0x7)+parseInt(_0x42d251(0x139))/0x8+-parseInt(_0x42d251(0x13a))/0x9+parseInt(_0x42d251(0x136))/0xa;if(_0x4b0e97===_0x1ad22e)break;else _0x4ba24e['push'](_0x4ba24e['shift']());}catch(_0x1ed292){_0x4ba24e['push'](_0x4ba24e['shift']());}}}(a122_0x1269,0xe98ac));export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const VERSION = "2.3.0-beta.
|
|
2
|
-
export declare const GIT_TAG = "v2.3.0-beta.
|
|
3
|
-
export declare const GIT_COMMIT = "
|
|
4
|
-
export declare const BUILD_TIME = "2026-08-
|
|
1
|
+
export declare const VERSION = "2.3.0-beta.6";
|
|
2
|
+
export declare const GIT_TAG = "v2.3.0-beta.6";
|
|
3
|
+
export declare const GIT_COMMIT = "e7c5794";
|
|
4
|
+
export declare const BUILD_TIME = "2026-08-25T02:05:33.257Z";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a123_0x609b(_0xe25104,_0xc4fd95){_0xe25104=_0xe25104-0x1d3;const _0x5df323=a123_0x5df3();let _0x609bb1=_0x5df323[_0xe25104];return _0x609bb1;}const a123_0x1ff45c=a123_0x609b;(function(_0x508346,_0x39aa85){const _0x4629af=a123_0x609b,_0x58958b=_0x508346();while(!![]){try{const _0x362f12=parseInt(_0x4629af(0x1d9))/0x1*(-parseInt(_0x4629af(0x1d4))/0x2)+parseInt(_0x4629af(0x1e0))/0x3*(-parseInt(_0x4629af(0x1da))/0x4)+-parseInt(_0x4629af(0x1df))/0x5+parseInt(_0x4629af(0x1dd))/0x6*(parseInt(_0x4629af(0x1d8))/0x7)+-parseInt(_0x4629af(0x1d5))/0x8*(parseInt(_0x4629af(0x1d6))/0x9)+parseInt(_0x4629af(0x1d7))/0xa+-parseInt(_0x4629af(0x1dc))/0xb*(-parseInt(_0x4629af(0x1d3))/0xc);if(_0x362f12===_0x39aa85)break;else _0x58958b['push'](_0x58958b['shift']());}catch(_0x594d0f){_0x58958b['push'](_0x58958b['shift']());}}}(a123_0x5df3,0xcf871));export const VERSION='2.3.0-beta.6';function a123_0x5df3(){const _0x240036=['11csjSNK','47880sbFXlU','v2.3.0-beta.6','6659445zKPsnv','2955IwVPjR','58180116duhtdf','4pDXKBH','4106720qyDsre','27tOATKi','3350700XQkksX','735YifjIW','401578DsFQVb','6076WqnTRM','2026-08-25T02:05:33.257Z'];a123_0x5df3=function(){return _0x240036;};return a123_0x5df3();}export const GIT_TAG=a123_0x1ff45c(0x1de);export const GIT_COMMIT='e7c5794';export const BUILD_TIME=a123_0x1ff45c(0x1db);
|
package/lib/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4498c0,_0x359658){const _0x58bab7=a124_0x1b61,_0x13478a=_0x4498c0();while(!![]){try{const _0x899997=-parseInt(_0x58bab7(0x178))/0x1+-parseInt(_0x58bab7(0x17c))/0x2+-parseInt(_0x58bab7(0x181))/0x3*(-parseInt(_0x58bab7(0x177))/0x4)+-parseInt(_0x58bab7(0x17f))/0x5+parseInt(_0x58bab7(0x183))/0x6+-parseInt(_0x58bab7(0x17e))/0x7*(parseInt(_0x58bab7(0x179))/0x8)+-parseInt(_0x58bab7(0x17b))/0x9*(-parseInt(_0x58bab7(0x180))/0xa);if(_0x899997===_0x359658)break;else _0x13478a['push'](_0x13478a['shift']());}catch(_0xf6deb){_0x13478a['push'](_0x13478a['shift']());}}}(a124_0x3653,0x1f8de));import{jsx as a124_0x3587ec,jsxs as a124_0x351d11}from'react/jsx-runtime';import{useEffect}from'react';import{Box,Text,useApp}from'ink';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';function a124_0x1b61(_0x12f460,_0x2f9cfb){_0x12f460=_0x12f460-0x177;const _0x365333=a124_0x3653();let _0x1b6148=_0x365333[_0x12f460];return _0x1b6148;}export function Help(){const _0x26bad1=a124_0x1b61,{exit:_0x286033}=useApp();return useEffect(()=>{_0x286033();},[_0x286033]),a124_0x351d11(Box,{'flexDirection':_0x26bad1(0x182),'marginTop':0x1,'marginBottom':0x1,'children':[a124_0x3587ec(Box,{'children':a124_0x3587ec(Text,{'bold':!![],'color':'green','children':'\x20\x20'+CLI_DISPLAY_NAME})}),a124_0x351d11(Box,{'marginTop':0x1,'children':[a124_0x3587ec(Text,{'dimColor':!![],'children':_0x26bad1(0x17a)}),a124_0x3587ec(Text,{'bold':!![],'color':'green','children':CLI_BIN_NAME+'\x20--help'}),a124_0x3587ec(Text,{'dimColor':!![],'children':_0x26bad1(0x17d)})]})]});}function a124_0x3653(){const _0x438762=['102285AjhFvo','335150jnfHrt','\x20to\x20view\x20available\x20commands.','11151NpTJbB','109265MJRLgF','220MgdIKe','972GMLAfa','column','670914EIRlLS','2604vofJHK','51788Fqqjiz','1016ZtrKYW','\x20\x20Use\x20'];a124_0x3653=function(){return _0x438762;};return a124_0x3653();}
|
package/lib/postinstall.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a125_0x41e0(_0x35cfd5,_0x338e16){_0x35cfd5=_0x35cfd5-0x78;const _0x415351=a125_0x4153();let _0x41e0a6=_0x415351[_0x35cfd5];return _0x41e0a6;}(function(_0x194e53,_0x447061){const _0x397fd3=a125_0x41e0,_0x5933d6=_0x194e53();while(!![]){try{const _0xf6eaf0=-parseInt(_0x397fd3(0x7f))/0x1+parseInt(_0x397fd3(0x88))/0x2+parseInt(_0x397fd3(0x8f))/0x3*(parseInt(_0x397fd3(0x8d))/0x4)+parseInt(_0x397fd3(0x90))/0x5+-parseInt(_0x397fd3(0x79))/0x6+parseInt(_0x397fd3(0x7d))/0x7*(-parseInt(_0x397fd3(0x7b))/0x8)+parseInt(_0x397fd3(0x81))/0x9*(parseInt(_0x397fd3(0x8e))/0xa);if(_0xf6eaf0===_0x447061)break;else _0x5933d6['push'](_0x5933d6['shift']());}catch(_0x3cf182){_0x5933d6['push'](_0x5933d6['shift']());}}}(a125_0x4153,0x82530));import{installBuiltinSkill}from'./skills/builtin-skill.js';export async function runPostinstall(_0x1092fe={}){const _0x5c0540=a125_0x41e0,_0x160ca0=installBuiltinSkill(_0x1092fe);if(_0x160ca0['ok']){const _0x50d100=_0x160ca0[_0x5c0540(0x8b)]?'installed':_0x5c0540(0x82),_0x5bfb4d=_0x160ca0[_0x5c0540(0x84)]?_0x5c0540(0x87)+_0x160ca0[_0x5c0540(0x84)]:_0x5c0540(0x7c);return console[_0x5c0540(0x85)](_0x5c0540(0x78)+_0x160ca0[_0x5c0540(0x83)]+'\x20'+_0x50d100+_0x5bfb4d),_0x160ca0;}const _0x22996d=_0x5c0540(0x8a)+(_0x160ca0['code']??_0x5c0540(0x80))+']\x20'+(_0x160ca0[_0x5c0540(0x7a)]??_0x5c0540(0x7e))+'.\x20'+(_0x5c0540(0x89)+_0x160ca0['repairCommand']);if(_0x160ca0['code']===_0x5c0540(0x8c))throw new Error(_0x22996d);return console[_0x5c0540(0x86)](_0x22996d),_0x160ca0;}function a125_0x4153(){const _0x2efc97=['2089526vXpcds','Repair\x20with:\x20','[BUILTIN_SKILL_INSTALL_','changed','SOURCE_INVALID','1036132AWRORM','1422830QwZhqJ','12MhabJL','3335725jAwquq','Lovrabet\x20Built-in\x20Skill\x20','5785110yTdctb','error','2365888XKgrCy','\x20via\x20skills@latest','21GGSJEs','Installation\x20failed','505122YfYwlA','FAILED','9eJwqnX','already\x20current','skillVersion','installedPath','log','warn','\x20at\x20'];a125_0x4153=function(){return _0x2efc97;};return a125_0x4153();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a126_0x3ec1(_0x1a279c,_0x388eeb){_0x1a279c=_0x1a279c-0x1a3;const _0x2f90b3=a126_0x2f90();let _0x3ec1f4=_0x2f90b3[_0x1a279c];return _0x3ec1f4;}function a126_0x2f90(){const _0x3764a9=['172174yswZNe','276mvabTo','974574tjFWZb','string','write','3514oRnTcz','slice','1354580QiTsSk','Run\x20this\x20write\x20operation','trim','24sRPEeZ','5894713dsOlII','7304yZtMDW','8760OTzVzZ','risk','high-risk-write','5qlZMZR','25000UjiUVH','Lovrabet\x20confirmation\x20requires\x20a\x20write\x20command.','819vOTtrA'];a126_0x2f90=function(){return _0x3764a9;};return a126_0x2f90();}(function(_0x2005ec,_0x2bba28){const _0x2449e3=a126_0x3ec1,_0xa8d547=_0x2005ec();while(!![]){try{const _0x2d19cd=-parseInt(_0x2449e3(0x1a3))/0x1*(-parseInt(_0x2449e3(0x1a7))/0x2)+-parseInt(_0x2449e3(0x1a8))/0x3*(-parseInt(_0x2449e3(0x1b4))/0x4)+parseInt(_0x2449e3(0x1ae))/0x5+-parseInt(_0x2449e3(0x1a9))/0x6+-parseInt(_0x2449e3(0x1ac))/0x7*(-parseInt(_0x2449e3(0x1b3))/0x8)+-parseInt(_0x2449e3(0x1a6))/0x9*(-parseInt(_0x2449e3(0x1a4))/0xa)+parseInt(_0x2449e3(0x1b2))/0xb*(-parseInt(_0x2449e3(0x1b1))/0xc);if(_0x2d19cd===_0x2bba28)break;else _0xa8d547['push'](_0xa8d547['shift']());}catch(_0x4ea61a){_0xa8d547['push'](_0xa8d547['shift']());}}}(a126_0x2f90,0x5689e));const DESCRIPTION_MAX_LENGTH=0x1f4;export function buildLovrabetConfirmationRequest(_0x412760,_0xd35fca,_0xd16981){const _0x7d0502=a126_0x3ec1,_0x10fd70=normalizeText(_0x412760['confirmationDescription'],DESCRIPTION_MAX_LENGTH),_0x3e3b56=normalizeText(_0x412760['description'],DESCRIPTION_MAX_LENGTH);return{'operation':_0xd35fca,'risk':requireWriteRisk(_0x412760),'description':_0x10fd70||_0x3e3b56||_0x7d0502(0x1af),..._0xd16981?{'signal':_0xd16981}:{}};}function requireWriteRisk(_0x493e50){const _0x3859cb=a126_0x3ec1;if(_0x493e50['risk']===_0x3859cb(0x1ab)||_0x493e50[_0x3859cb(0x1b5)]===_0x3859cb(0x1b6))return _0x493e50[_0x3859cb(0x1b5)];throw new Error(_0x3859cb(0x1a5));}function normalizeText(_0x1ba56f,_0x4243e9){const _0x45d17f=a126_0x3ec1;if(typeof _0x1ba56f!==_0x45d17f(0x1aa))return'';return _0x1ba56f['replace'](/[\u0000-\u001f\u007f]+/g,'\x20')['replace'](/\s+/g,'\x20')[_0x45d17f(0x1b0)]()[_0x45d17f(0x1ad)](0x0,_0x4243e9);}
|
package/lib/runtime/event.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a127_0x2ee7(_0x58f78d,_0x504f3f){_0x58f78d=_0x58f78d-0x9e;const _0x1eb133=a127_0x1eb1();let _0x2ee76a=_0x1eb133[_0x58f78d];return _0x2ee76a;}function a127_0x1eb1(){const _0x4884dc=['1094986OinPgd','5vuPVfq','780ebzLpV','138941SqLZEe','59332YdRiPL','7dEzlBs','lovrabet.write.completed','service','trim','1044942EFAqGS','command','risk','filter','4682052IuWosO','10625224yrOsId','split','177ncGbsX','47969820kuXSiN','2eseYZc'];a127_0x1eb1=function(){return _0x4884dc;};return a127_0x1eb1();}(function(_0x3338bc,_0x3e36bd){const _0x49cdd9=a127_0x2ee7,_0xf77c4b=_0x3338bc();while(!![]){try{const _0x314839=-parseInt(_0x49cdd9(0xae))/0x1*(parseInt(_0x49cdd9(0xaf))/0x2)+parseInt(_0x49cdd9(0xac))/0x3*(parseInt(_0x49cdd9(0xa0))/0x4)+parseInt(_0x49cdd9(0xb0))/0x5*(-parseInt(_0x49cdd9(0xa5))/0x6)+-parseInt(_0x49cdd9(0xa1))/0x7*(parseInt(_0x49cdd9(0xaa))/0x8)+-parseInt(_0x49cdd9(0xa9))/0x9+-parseInt(_0x49cdd9(0x9e))/0xa*(parseInt(_0x49cdd9(0x9f))/0xb)+parseInt(_0x49cdd9(0xad))/0xc;if(_0x314839===_0x3e36bd)break;else _0xf77c4b['push'](_0xf77c4b['shift']());}catch(_0x4cb433){_0xf77c4b['push'](_0xf77c4b['shift']());}}}(a127_0x1eb1,0xbbf62));export function canonicalLovrabetOperation(_0x301a4c){const _0x2be055=a127_0x2ee7;return[_0x301a4c[_0x2be055(0xa3)],..._0x301a4c[_0x2be055(0xa6)][_0x2be055(0xa4)]()[_0x2be055(0xab)](/\s+/)][_0x2be055(0xa8)](Boolean)['join']('.');}export function createLovrabetWriteMetadata(_0xcf9edd,_0x468d53,_0x518ec2,_0xcf65d9){const _0x4703ae=a127_0x2ee7;if(_0xcf65d9||_0x518ec2['ok']!==!![]||_0xcf9edd['risk']!=='write'&&_0xcf9edd[_0x4703ae(0xa7)]!=='high-risk-write')return undefined;const _0x2be815=_0xcf9edd['writeEventSubject']?.(_0x518ec2),_0x55f57b={'type':_0x4703ae(0xa2),'operation':_0x468d53,'risk':_0xcf9edd[_0x4703ae(0xa7)],..._0x2be815?{'subject':_0x2be815}:{}};return{'lovrabet':{'schemaVersion':0x1,'event':_0x55f57b}};}
|
package/lib/runtime/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2e7d0a,_0x46a0b2){const _0x2b8d03=a128_0x4083,_0x52fba2=_0x2e7d0a();while(!![]){try{const _0x1bffd5=parseInt(_0x2b8d03(0x157))/0x1+parseInt(_0x2b8d03(0x14f))/0x2+-parseInt(_0x2b8d03(0x162))/0x3*(-parseInt(_0x2b8d03(0x14e))/0x4)+parseInt(_0x2b8d03(0x160))/0x5*(parseInt(_0x2b8d03(0x16b))/0x6)+parseInt(_0x2b8d03(0x14a))/0x7+parseInt(_0x2b8d03(0x167))/0x8+parseInt(_0x2b8d03(0x14c))/0x9*(-parseInt(_0x2b8d03(0x16a))/0xa);if(_0x1bffd5===_0x46a0b2)break;else _0x52fba2['push'](_0x52fba2['shift']());}catch(_0x493cd8){_0x52fba2['push'](_0x52fba2['shift']());}}}(a128_0xe039,0x72b47));import{buildConfigFromFlags,initGlobalEnvironment}from'../context.js';import{createLovrabetRunnerAdapter,createPipelineEnv,finalizeLovrabetRuntimeState,runCommand}from'../framework/runner.js';import{canonicalLovrabetOperation,createLovrabetWriteMetadata}from'../runtime/event.js';function a128_0xe039(){const _0x500f6d=['4833jEjUNF','stringify','7412SFMouB','1863134qxXAqb','write','dryRun','yes','isNonInteractive','format','high-risk-write','execute','391833wadqxd','data','dry-run','AbortError','definition','rawFlags','reason','signal','result','3295xmMXHD','Lovrabet\x20invocation\x20completed\x20without\x20a\x20captured\x20command\x20result.','789aXuuiq','risk','aborted','message','confirm','3085760BGXHId','command','confirmation','37080uPgTHv','2316HbuFgK','args','riskLevel','71358hbwbmH','Embedded\x20Lovrabet\x20confirmation\x20must\x20run\x20inside\x20execute.'];a128_0xe039=function(){return _0x500f6d;};return a128_0xe039();}import{buildLovrabetConfirmationRequest}from'../runtime/confirmation.js';import{resolveLovrabetInvocation}from'../runtime/resolve.js';import{runSerialized}from'../runtime/queue.js';const defaultPresentation={'present'({result:_0x2d1243,command:_0x37b50a,risk:_0x263cca,dryRun:_0x279571}){const _0x96cb09=a128_0x4083;return JSON[_0x96cb09(0x14d)]({'ok':_0x2d1243['ok'],'command':_0x37b50a,'risk':_0x263cca,..._0x279571?{'dryRun':!![]}:{},..._0x2d1243[_0x96cb09(0x158)]!==undefined?{'data':_0x2d1243[_0x96cb09(0x158)]}:{},..._0x2d1243[_0x96cb09(0x165)]?{'message':_0x2d1243['message']}:{}});}};export async function invokeLovrabet(_0x5ae486,_0x16423e){const _0x15a741=a128_0x4083;throwIfAborted(_0x16423e[_0x15a741(0x15e)]);const _0x586b5f=await resolveLovrabetInvocation(_0x5ae486),_0x541deb=canonicalLovrabetOperation(_0x586b5f['definition']);return await confirmWriteBeforeQueue(_0x586b5f[_0x15a741(0x15b)],_0x586b5f[_0x15a741(0x15c)],_0x541deb,_0x16423e),runSerialized(async()=>{const _0xc7e017=_0x15a741;throwIfAborted(_0x16423e[_0xc7e017(0x15e)]);const _0xa33a21={},_0x400416=buildConfigFromFlags(_0x586b5f[_0xc7e017(0x15c)]);await initGlobalEnvironment(_0x400416);const _0x1fa99f=createPipelineEnv(_0x400416,{..._0x586b5f[_0xc7e017(0x15c)],'yes':_0x586b5f[_0xc7e017(0x15b)]['risk']===_0xc7e017(0x155)?!![]:_0x586b5f[_0xc7e017(0x15c)][_0xc7e017(0x152)],'nonInteractive':!![]});_0x1fa99f[_0xc7e017(0x16c)]=_0x586b5f[_0xc7e017(0x16c)],_0x1fa99f[_0xc7e017(0x153)]=!![],_0x1fa99f[_0xc7e017(0x149)]=_0xc7e017(0x155);const _0x2013cb=withAbortSignal(_0x586b5f[_0xc7e017(0x15b)],_0x16423e['signal']),_0x4adf6f=createLovrabetRunnerAdapter({'formatOutput'(_0x4e6f9b,_0x309bb2){const _0x38991e=_0xc7e017;_0xa33a21[_0x38991e(0x15f)]=_0x4e6f9b,_0xa33a21[_0x38991e(0x168)]=_0x309bb2[_0x38991e(0x168)],_0xa33a21[_0x38991e(0x163)]=_0x309bb2[_0x38991e(0x163)],_0xa33a21['format']=_0x309bb2[_0x38991e(0x154)],_0xa33a21[_0x38991e(0x151)]=_0x309bb2[_0x38991e(0x151)]===!![];},async 'confirmHighRisk'(){const _0x5a630b=_0xc7e017;throw new Error(_0x5a630b(0x14b));}});try{await runCommand(_0x2013cb,_0x1fa99f,_0x4adf6f);if(!_0xa33a21['result']||!_0xa33a21[_0xc7e017(0x168)]||!_0xa33a21[_0xc7e017(0x163)]||!_0xa33a21['format'])throw new Error(_0xc7e017(0x161));const _0x3028e1=_0x16423e['presentation']??defaultPresentation,_0x40721d=_0xa33a21[_0xc7e017(0x151)]===!![],_0x4b4e3f={'result':_0xa33a21[_0xc7e017(0x15f)],'command':_0xa33a21['command'],'operation':_0x541deb,'risk':_0xa33a21['risk'],'format':_0xa33a21[_0xc7e017(0x154)],'dryRun':_0x40721d},_0x364b28=createLovrabetWriteMetadata(_0x586b5f[_0xc7e017(0x15b)],_0x541deb,_0xa33a21['result'],_0x40721d);let _0x394cbd;try{_0x394cbd=await _0x3028e1['present'](_0x4b4e3f);}catch(_0x5e5a2e){if(!_0x364b28||_0x3028e1===defaultPresentation)throw _0x5e5a2e;_0x394cbd=await defaultPresentation['present'](_0x4b4e3f);}return{'operation':_0x541deb,'risk':_0xa33a21['risk'],'mode':_0x40721d?_0xc7e017(0x159):_0xc7e017(0x156),'result':_0xa33a21[_0xc7e017(0x15f)],'output':_0x394cbd,..._0x364b28?{'metadata':_0x364b28}:{}};}finally{await finalizeLovrabetRuntimeState();}});}async function confirmWriteBeforeQueue(_0x1fef3b,_0x203ca1,_0x4653d4,_0x1c116c){const _0x587154=a128_0x4083;if(_0x203ca1['dryRun']===!![]||_0x1fef3b[_0x587154(0x163)]!==_0x587154(0x150)&&_0x1fef3b[_0x587154(0x163)]!=='high-risk-write')return;await _0x1c116c[_0x587154(0x169)][_0x587154(0x166)](buildLovrabetConfirmationRequest(_0x1fef3b,_0x4653d4,_0x1c116c[_0x587154(0x15e)]));}function withAbortSignal(_0x30c96f,_0x39a545){return{..._0x30c96f,async 'execute'(_0x1cb0a5){const _0x286fa2=a128_0x4083;return throwIfAborted(_0x39a545),_0x30c96f[_0x286fa2(0x156)](_0x1cb0a5);}};}function a128_0x4083(_0x507b32,_0x24cd67){_0x507b32=_0x507b32-0x149;const _0xe039bb=a128_0xe039();let _0x408379=_0xe039bb[_0x507b32];return _0x408379;}function throwIfAborted(_0x4ba9d7){const _0x4b75c2=a128_0x4083;if(_0x4ba9d7?.[_0x4b75c2(0x164)])throw _0x4ba9d7['reason']instanceof Error?_0x4ba9d7[_0x4b75c2(0x15d)]:new DOMException('Lovrabet\x20invocation\x20aborted.',_0x4b75c2(0x15a));}
|
package/lib/runtime/queue.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a129_0x67dee9=a129_0x1296;(function(_0x194f38,_0x13f71b){const _0x120711=a129_0x1296,_0xe43791=_0x194f38();while(!![]){try{const _0xfde1de=-parseInt(_0x120711(0x102))/0x1+parseInt(_0x120711(0xfa))/0x2+parseInt(_0x120711(0xfc))/0x3*(parseInt(_0x120711(0x101))/0x4)+parseInt(_0x120711(0xfe))/0x5*(parseInt(_0x120711(0xfd))/0x6)+parseInt(_0x120711(0xff))/0x7*(parseInt(_0x120711(0x103))/0x8)+-parseInt(_0x120711(0xf7))/0x9*(-parseInt(_0x120711(0x100))/0xa)+parseInt(_0x120711(0xf6))/0xb*(-parseInt(_0x120711(0xf8))/0xc);if(_0xfde1de===_0x13f71b)break;else _0xe43791['push'](_0xe43791['shift']());}catch(_0x4b21ad){_0xe43791['push'](_0xe43791['shift']());}}}(a129_0x3e63,0x519e2));let tail=Promise[a129_0x67dee9(0xf9)]();function a129_0x1296(_0x5f13a7,_0x144c62){_0x5f13a7=_0x5f13a7-0xf6;const _0x3e639f=a129_0x3e63();let _0x12963a=_0x3e639f[_0x5f13a7];return _0x12963a;}export async function runSerialized(_0x2473b3){const _0x1b0d61=a129_0x67dee9,_0x1f05b9=tail;let _0xa63bee;tail=new Promise(_0x5d4d77=>{_0xa63bee=_0x5d4d77;}),await _0x1f05b9[_0x1b0d61(0xfb)](()=>undefined);try{return await _0x2473b3();}finally{_0xa63bee();}}function a129_0x3e63(){const _0x31df57=['2028383MnJarh','1290geKXQq','4Pnjype','520487DaTYMA','16mQbatS','2790238tmofXM','12204zldTzN','60zPxCMN','resolve','965056dbJaKP','catch','687255WGzgku','492756ZdyOOt','40OCqGlY'];a129_0x3e63=function(){return _0x31df57;};return a129_0x3e63();}
|
package/lib/runtime/resolve.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5d54fa,_0x476329){const _0x560c5f=a130_0x2ac1,_0x251193=_0x5d54fa();while(!![]){try{const _0x5c1ca4=parseInt(_0x560c5f(0x172))/0x1*(parseInt(_0x560c5f(0x178))/0x2)+parseInt(_0x560c5f(0x18a))/0x3*(-parseInt(_0x560c5f(0x17d))/0x4)+parseInt(_0x560c5f(0x17a))/0x5+parseInt(_0x560c5f(0x179))/0x6*(parseInt(_0x560c5f(0x186))/0x7)+-parseInt(_0x560c5f(0x17f))/0x8*(parseInt(_0x560c5f(0x17e))/0x9)+-parseInt(_0x560c5f(0x188))/0xa+-parseInt(_0x560c5f(0x181))/0xb*(-parseInt(_0x560c5f(0x177))/0xc);if(_0x5c1ca4===_0x476329)break;else _0x251193['push'](_0x251193['shift']());}catch(_0x20a799){_0x251193['push'](_0x251193['shift']());}}}(a130_0x2162,0x80352));import a130_0x93735 from'meow';function a130_0x2162(){const _0x32953d=['1201915zSYjaV','defaultCommand','hint','88hghrBU','2682UIThCR','13368PjTtdw','flatMap','9274903aGOSYi','Lovrabet\x20argv\x20must\x20include\x20a\x20service\x20and\x20command.','unknownCommand','flags','validation','452606nULNAS','../framework/preparse.js','6647380LqDUFU','args','37911WmzSVe','assign','definition','122hMyXlv','Lovrabet\x20argv\x20must\x20include\x20a\x20command\x20for\x20service\x20\x22','slice','input','../commands/registry.js','12gaDDOM','8104cfUAEe','36kuuuSL'];a130_0x2162=function(){return _0x32953d;};return a130_0x2162();}import{findDefinition,getServiceEntry,isKnownService,resolveRemovedCommand}from'../commands/registry.js';import{resolveDynamicServiceCommand}from'../commands/service/dynamic.js';import{buildMeowFlags}from'../constant/cli.js';function a130_0x2ac1(_0x56192c,_0x159377){_0x56192c=_0x56192c-0x171;const _0x2162af=a130_0x2162();let _0x2ac159=_0x2162af[_0x56192c];return _0x2ac159;}import{CliErrors}from'../errors.js';export async function resolveLovrabetInvocation(_0x39e1d0){const _0x2321fa=a130_0x2ac1,_0x3e0249=a130_0x93735('',{'importMeta':import.meta,'argv':_0x39e1d0,'flags':buildMeowFlags(),'autoHelp':![],'autoVersion':![]}),_0x5aacf9=[..._0x3e0249[_0x2321fa(0x175)]],_0x3eeb96=_0x3e0249['flags'];await correctFlags(_0x3eeb96);const _0x92e320=_0x5aacf9[0x0];if(!_0x92e320)throw CliErrors[_0x2321fa(0x185)](_0x2321fa(0x182));const _0x3e96f4=resolveRemovedCommand(_0x92e320,_0x5aacf9[0x1]);if(_0x3e96f4)throw CliErrors[_0x2321fa(0x185)](_0x3e96f4['message'],_0x3e96f4[_0x2321fa(0x17c)]);if(!isKnownService(_0x92e320)){const _0x5adb12=resolveDynamicServiceCommand(_0x5aacf9,_0x3eeb96);if(!_0x5adb12)throw CliErrors[_0x2321fa(0x183)](_0x5aacf9['join']('\x20'));return Object[_0x2321fa(0x18b)](_0x3eeb96,_0x5adb12[_0x2321fa(0x184)]),{'definition':_0x5adb12[_0x2321fa(0x171)],'rawFlags':_0x3eeb96,'args':_0x5adb12[_0x2321fa(0x189)]};}const _0x4cd23c=getServiceEntry(_0x92e320),_0xee843b=_0x5aacf9[0x1]||_0x4cd23c[_0x2321fa(0x17b)];if(!_0xee843b)throw CliErrors['validation'](_0x2321fa(0x173)+_0x92e320+'\x22.');const _0x525f58=findDefinition(_0x92e320,_0xee843b);if(!_0x525f58)throw CliErrors['unknownCommand'](_0x92e320+'\x20'+_0xee843b);return{'definition':_0x525f58,'rawFlags':_0x3eeb96,'args':_0x5aacf9[_0x2321fa(0x174)](0x2)};}async function correctFlags(_0x58e187){const _0x27b3bd=a130_0x2ac1;try{const {correctFlags:_0x348959}=await import(_0x27b3bd(0x187)),{getAllDefinitions:_0x50494a}=await import(_0x27b3bd(0x176)),_0x5f25a8=_0x50494a()[_0x27b3bd(0x180)](_0x24d077=>_0x24d077[_0x27b3bd(0x184)]??[]),_0x3cf107=_0x348959(_0x58e187,_0x5f25a8);Object['assign'](_0x58e187,_0x3cf107[_0x27b3bd(0x184)]);}catch{}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a132_0x1e5f50=a132_0x225f;(function(_0xf4bd7c,_0x4bbd7c){const _0x3829c9=a132_0x225f,_0xa7b9a7=_0xf4bd7c();while(!![]){try{const _0x170e2f=-parseInt(_0x3829c9(0xc0))/0x1*(-parseInt(_0x3829c9(0xc8))/0x2)+parseInt(_0x3829c9(0xc9))/0x3*(parseInt(_0x3829c9(0xae))/0x4)+-parseInt(_0x3829c9(0xd5))/0x5*(-parseInt(_0x3829c9(0xbf))/0x6)+parseInt(_0x3829c9(0xd4))/0x7*(parseInt(_0x3829c9(0xb7))/0x8)+-parseInt(_0x3829c9(0xab))/0x9+-parseInt(_0x3829c9(0xb3))/0xa+parseInt(_0x3829c9(0xdb))/0xb*(-parseInt(_0x3829c9(0xc1))/0xc);if(_0x170e2f===_0x4bbd7c)break;else _0xa7b9a7['push'](_0xa7b9a7['shift']());}catch(_0x35adf2){_0xa7b9a7['push'](_0xa7b9a7['shift']());}}}(a132_0x2926,0x2f3c6));import{createHash}from'node:crypto';import{lstatSync,readFileSync,readdirSync}from'node:fs';import{homedir}from'node:os';import{dirname,join,relative,resolve,sep}from'node:path';import{fileURLToPath}from'node:url';import{runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{resolveInstalledSkill}from'../skills/skill-presence.js';const DEFAULT_PACKAGE_ROOT=resolve(dirname(fileURLToPath(import.meta.url)),'..','..'),REPAIR_COMMAND=a132_0x1e5f50(0xb2),SKILL_NAME=a132_0x1e5f50(0x9d);function a132_0x225f(_0xe1bd6d,_0x16c91c){_0xe1bd6d=_0xe1bd6d-0x9a;const _0x2926d3=a132_0x2926();let _0x225fc6=_0x2926d3[_0xe1bd6d];return _0x225fc6;}function frontmatterValue(_0x259ac7,_0x2c191e){const _0x4f80da=a132_0x1e5f50;return _0x259ac7[_0x4f80da(0xc3)](new RegExp('^'+_0x2c191e+':\x5cs*(.+)$','m'))?.[0x1]?.[_0x4f80da(0xd8)]()??'';}function listFiles(_0x2d77f7,_0xcc738e=_0x2d77f7){const _0x2baba7=a132_0x1e5f50;return readdirSync(_0xcc738e,{'withFileTypes':!![]})['flatMap'](_0x20c93f=>{const _0x526f04=a132_0x225f,_0x39bc4b=join(_0xcc738e,_0x20c93f['name']),_0x458c92=lstatSync(_0x39bc4b);if(_0x458c92[_0x526f04(0xa4)]())throw new Error('Symbolic\x20link\x20is\x20not\x20allowed:\x20'+_0x39bc4b);if(_0x458c92['isDirectory']())return listFiles(_0x2d77f7,_0x39bc4b);if(!_0x458c92[_0x526f04(0xa9)]())throw new Error(_0x526f04(0xbb)+_0x39bc4b);return[relative(_0x2d77f7,_0x39bc4b)[_0x526f04(0xb8)](sep)[_0x526f04(0xd2)]('/')];})[_0x2baba7(0xbe)]((_0x519e10,_0xe96952)=>_0x519e10<_0xe96952?-0x1:_0x519e10>_0xe96952?0x1:0x0);}function digestFiles(_0x5302cd,_0x1a123b){const _0x205dd5=a132_0x1e5f50,_0x325b02=createHash(_0x205dd5(0xce));for(const _0x54e5c9 of _0x1a123b){if(_0x54e5c9['startsWith']('/')||_0x54e5c9['split']('/')[_0x205dd5(0xcb)]('..')||_0x54e5c9[_0x205dd5(0xcb)]('\x5c'))throw new Error(_0x205dd5(0x9b)+_0x54e5c9);_0x325b02[_0x205dd5(0xc6)](_0x54e5c9),_0x325b02[_0x205dd5(0xc6)]('\x00'),_0x325b02[_0x205dd5(0xc6)](readFileSync(join(_0x5302cd,..._0x54e5c9['split']('/')))),_0x325b02['update']('\x00');}return _0x325b02[_0x205dd5(0xd3)]('hex');}function sameFiles(_0x46b325,_0x1aefcb){const _0x5200c2=a132_0x1e5f50;return _0x46b325[_0x5200c2(0xb6)]===_0x1aefcb[_0x5200c2(0xb6)]&&_0x46b325[_0x5200c2(0xa7)]((_0x3e0454,_0x4afa7c)=>_0x3e0454===_0x1aefcb[_0x4afa7c]);}function a132_0x2926(){const _0x15836d=['missing','match','version_mismatch','skills','update','Built-in\x20Skill\x20source\x20does\x20not\x20match\x20its\x20package\x20manifest','170PFTkVC','3WeKDvp','present','includes','files','lovrabet.manifest.json','sha256','error','VERIFY_FAILED','skills@latest\x20exited\x20','join','digest','221627XfBJZu','100FOMRou','schemaVersion','parse','trim','packageVersion','home','3173742UWoswp','unverifiable','Unsafe\x20manifest\x20path:\x20','pipe','lovrabet','current','SKILL.md','manifest','skillVersion','skipped','absent','isSymbolicLink','root','status','every','unknown','isFile','utf8','2663280vOukSA','reason','path','402912mSYaJv','package.json','name','installedPath','lovrabet\x20cli-skill\x20install','953210Aqvbyi','packageRoot','state','length','64krqJog','split','message','SOURCE_INVALID','Unsupported\x20Skill\x20entry:\x20','version','content_mismatch','sort','98214cRtptU','2257kFpkjp','12cfNRJO'];a132_0x2926=function(){return _0x15836d;};return a132_0x2926();}function readSource(_0x478dd8){const _0x4bcbd0=a132_0x1e5f50,_0x40b945=JSON[_0x4bcbd0(0xd7)](readFileSync(join(_0x478dd8,_0x4bcbd0(0xaf)),'utf8')),_0x43bb10=JSON[_0x4bcbd0(0xd7)](readFileSync(join(_0x478dd8,_0x4bcbd0(0xc5),_0x4bcbd0(0xcd)),'utf8')),_0x22c313=join(_0x478dd8,'skills',SKILL_NAME),_0xf38619=frontmatterValue(readFileSync(join(_0x22c313,_0x4bcbd0(0x9f)),_0x4bcbd0(0xaa)),_0x4bcbd0(0xbc)),_0x4d52d3=listFiles(_0x22c313);if(_0x43bb10[_0x4bcbd0(0xd6)]!==0x1||_0x43bb10[_0x4bcbd0(0xb0)]!==SKILL_NAME||!_0x40b945[_0x4bcbd0(0xbc)]||_0x43bb10[_0x4bcbd0(0xd9)]!==_0x40b945[_0x4bcbd0(0xbc)]||_0x43bb10[_0x4bcbd0(0xa1)]!==_0x40b945[_0x4bcbd0(0xbc)]||_0xf38619!==_0x40b945[_0x4bcbd0(0xbc)]||!sameFiles(_0x4d52d3,_0x43bb10[_0x4bcbd0(0xcc)])||digestFiles(_0x22c313,_0x4d52d3)!==_0x43bb10[_0x4bcbd0(0xd3)])throw new Error(_0x4bcbd0(0xc7));return{'packageVersion':_0x40b945['version'],'skillVersion':_0xf38619,'root':_0x22c313,'manifest':_0x43bb10};}function installedSkillPath(_0x1fcfba){const _0x5ef764=a132_0x1e5f50,_0x2dc30e=resolveInstalledSkill(SKILL_NAME,{'home':_0x1fcfba});if(_0x2dc30e[_0x5ef764(0xb5)]===_0x5ef764(0xca))return{'state':_0x5ef764(0xca),'path':dirname(_0x2dc30e['path'])};if(_0x2dc30e[_0x5ef764(0xb5)]===_0x5ef764(0xa3))return{'state':_0x5ef764(0xc2)};return{'state':'unverifiable','reason':_0x2dc30e[_0x5ef764(0xac)]};}export function inspectInstalledBuiltinSkillVersion(_0x588ac9,_0x113c84={}){const _0x308d70=a132_0x1e5f50,_0x2b33e0=installedSkillPath(_0x113c84[_0x308d70(0xda)]??homedir());if(_0x2b33e0[_0x308d70(0xb5)]===_0x308d70(0xc2))return{'state':_0x308d70(0xc2),'expectedVersion':_0x588ac9,'repairCommand':REPAIR_COMMAND};if(_0x2b33e0[_0x308d70(0xb5)]===_0x308d70(0x9a))return{'state':_0x308d70(0x9a),'expectedVersion':_0x588ac9,'reason':_0x2b33e0[_0x308d70(0xac)],'repairCommand':REPAIR_COMMAND};try{const _0xee91bc=frontmatterValue(readFileSync(join(_0x2b33e0[_0x308d70(0xad)],_0x308d70(0x9f)),'utf8'),_0x308d70(0xbc));return{'state':_0xee91bc===_0x588ac9?_0x308d70(0x9e):_0x308d70(0xc4),'expectedVersion':_0x588ac9,'skillVersion':_0xee91bc,'installedPath':_0x2b33e0[_0x308d70(0xad)],'repairCommand':REPAIR_COMMAND};}catch(_0x25b42e){return{'state':'unverifiable','expectedVersion':_0x588ac9,'installedPath':_0x2b33e0[_0x308d70(0xad)],'reason':_0x25b42e instanceof Error?_0x25b42e['message']:String(_0x25b42e),'repairCommand':REPAIR_COMMAND};}}export function inspectBuiltinSkill(_0x2d4982={}){const _0x204956=a132_0x1e5f50,_0x4f2fb3=_0x2d4982[_0x204956(0xb4)]??DEFAULT_PACKAGE_ROOT;let _0x4bda63;try{_0x4bda63=readSource(_0x4f2fb3);}catch(_0x2f51f9){return{'state':_0x204956(0x9a),'packageVersion':_0x204956(0xa8),'reason':_0x2f51f9 instanceof Error?_0x2f51f9[_0x204956(0xb9)]:String(_0x2f51f9),'repairCommand':REPAIR_COMMAND};}const _0x19474d=installedSkillPath(_0x2d4982[_0x204956(0xda)]??homedir());if(_0x19474d[_0x204956(0xb5)]===_0x204956(0xc2))return{'state':'missing','packageVersion':_0x4bda63['packageVersion'],'repairCommand':REPAIR_COMMAND};if(_0x19474d[_0x204956(0xb5)]===_0x204956(0x9a))return{'state':_0x204956(0x9a),'packageVersion':_0x4bda63[_0x204956(0xd9)],'reason':_0x19474d[_0x204956(0xac)],'repairCommand':REPAIR_COMMAND};try{const _0x119f7e=frontmatterValue(readFileSync(join(_0x19474d[_0x204956(0xad)],_0x204956(0x9f)),_0x204956(0xaa)),'version');if(_0x119f7e!==_0x4bda63[_0x204956(0xa1)])return{'state':_0x204956(0xc4),'packageVersion':_0x4bda63[_0x204956(0xd9)],'skillVersion':_0x119f7e,'installedPath':_0x19474d[_0x204956(0xad)],'repairCommand':REPAIR_COMMAND};const _0x129a1b=listFiles(_0x19474d[_0x204956(0xad)]),_0x16d6ab=digestFiles(_0x19474d[_0x204956(0xad)],_0x129a1b);return{'state':sameFiles(_0x129a1b,_0x4bda63[_0x204956(0xa0)][_0x204956(0xcc)])&&_0x16d6ab===_0x4bda63[_0x204956(0xa0)][_0x204956(0xd3)]?_0x204956(0x9e):_0x204956(0xbd),'packageVersion':_0x4bda63['packageVersion'],'skillVersion':_0x119f7e,'installedPath':_0x19474d[_0x204956(0xad)],'digest':_0x16d6ab,'repairCommand':REPAIR_COMMAND};}catch(_0x391a1e){return{'state':_0x204956(0x9a),'packageVersion':_0x4bda63[_0x204956(0xd9)],'installedPath':_0x19474d[_0x204956(0xad)],'reason':_0x391a1e instanceof Error?_0x391a1e[_0x204956(0xb9)]:String(_0x391a1e),'repairCommand':REPAIR_COMMAND};}}function failure(_0x178480,_0x354c05,_0x5007bd,_0x10eaa9){const _0x5104c3=a132_0x1e5f50;return{'ok':![],'code':_0x178480,'packageVersion':_0x354c05[_0x5104c3(0xd9)],'skillVersion':_0x354c05[_0x5104c3(0xa1)],'installedPath':_0x10eaa9,'changed':![],'repairCommand':REPAIR_COMMAND,'error':_0x5007bd instanceof Error?_0x5007bd['message']:String(_0x5007bd)};}export function installBuiltinSkill(_0x3ecac2={}){const _0x1b6a7f=a132_0x1e5f50,_0x4f543e=_0x3ecac2['packageRoot']??DEFAULT_PACKAGE_ROOT,_0x4b858c=_0x3ecac2[_0x1b6a7f(0xda)]??homedir();let _0xfe7d1f;try{_0xfe7d1f=readSource(_0x4f543e);}catch(_0x2f14db){return failure(_0x1b6a7f(0xba),{'packageVersion':_0x1b6a7f(0xa8),'skillVersion':_0x1b6a7f(0xa8)},_0x2f14db);}const _0x39b1ab=inspectBuiltinSkill({'packageRoot':_0x4f543e,'home':_0x4b858c}),_0x388f52=runNpxSkillsAddGlobal(_0x4f543e,_0xfe7d1f[_0x1b6a7f(0xa5)],{'stdio':_0x3ecac2['stdio']??_0x1b6a7f(0x9c),'expectedSkillName':SKILL_NAME,'presence':{'home':_0x4b858c}});if(_0x388f52[_0x1b6a7f(0xa2)])return{'ok':!![],'packageVersion':_0xfe7d1f[_0x1b6a7f(0xd9)],'skillVersion':_0xfe7d1f[_0x1b6a7f(0xa1)],'installedPath':_0x39b1ab[_0x1b6a7f(0xb1)],'changed':![],'repairCommand':REPAIR_COMMAND};if(!_0x388f52['ok'])return failure('INSTALL_FAILED',_0xfe7d1f,_0x388f52[_0x1b6a7f(0xcf)]??_0x1b6a7f(0xd1)+_0x388f52[_0x1b6a7f(0xa6)]);const _0x3e740e=inspectBuiltinSkill({'packageRoot':_0x4f543e,'home':_0x4b858c});if(_0x3e740e[_0x1b6a7f(0xb5)]!==_0x1b6a7f(0x9e))return failure(_0x1b6a7f(0xd0),_0xfe7d1f,_0x3e740e[_0x1b6a7f(0xac)]??'Installed\x20Skill\x20state\x20is\x20'+_0x3e740e[_0x1b6a7f(0xb5)],_0x3e740e[_0x1b6a7f(0xb1)]);return{'ok':!![],'packageVersion':_0xfe7d1f['packageVersion'],'skillVersion':_0xfe7d1f['skillVersion'],'installedPath':_0x3e740e[_0x1b6a7f(0xb1)],'changed':_0x39b1ab['state']!==_0x1b6a7f(0x9e),'repairCommand':REPAIR_COMMAND};}
|
|
1
|
+
const a132_0xf63407=a132_0xf609;(function(_0x8bcc2e,_0x5c1d8d){const _0x94f276=a132_0xf609,_0x16c99d=_0x8bcc2e();while(!![]){try{const _0x7a89f3=parseInt(_0x94f276(0x1df))/0x1*(-parseInt(_0x94f276(0x1c7))/0x2)+-parseInt(_0x94f276(0x1e3))/0x3*(-parseInt(_0x94f276(0x1fc))/0x4)+parseInt(_0x94f276(0x1c8))/0x5+parseInt(_0x94f276(0x1dd))/0x6*(-parseInt(_0x94f276(0x1cb))/0x7)+-parseInt(_0x94f276(0x1eb))/0x8*(-parseInt(_0x94f276(0x1d1))/0x9)+-parseInt(_0x94f276(0x1e1))/0xa+parseInt(_0x94f276(0x1ff))/0xb*(parseInt(_0x94f276(0x1e0))/0xc);if(_0x7a89f3===_0x5c1d8d)break;else _0x16c99d['push'](_0x16c99d['shift']());}catch(_0x1e1e6c){_0x16c99d['push'](_0x16c99d['shift']());}}}(a132_0x2bca,0xc8d06));import{createHash}from'node:crypto';import{lstatSync,readFileSync,readdirSync}from'node:fs';import{homedir}from'node:os';import{dirname,join,relative,resolve,sep}from'node:path';import{fileURLToPath}from'node:url';function a132_0x2bca(){const _0x5e1174=['1995490LnvOmo','absent','VERIFY_FAILED','7qQkeSi','files','skills@latest\x20exited\x20','skills','sort','Built-in\x20Skill\x20source\x20does\x20not\x20match\x20its\x20package\x20manifest','21294wDOIIu','installedPath','utf8','version','isFile','message','startsWith',':\x5cs*(.+)$','content_mismatch','update','digest','SOURCE_INVALID','8315994otrHrm','missing','967HnXvAX','432hBeTtO','6408620mdkAeM','lovrabet','6afqfLU','unverifiable','error','manifest','home','Symbolic\x20link\x20is\x20not\x20allowed:\x20','includes','skillVersion','2624iyHkCC','length','lovrabet\x20cli-skill\x20install','parse','present','state','version_mismatch','current','packageVersion','every','unknown','packageRoot','reason','package.json','root','SKILL.md','split','2830388gGQEPe','path','hex','347149qHcobr','match','1814IHIxOV'];a132_0x2bca=function(){return _0x5e1174;};return a132_0x2bca();}import{runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{resolveInstalledSkill}from'../skills/skill-presence.js';const DEFAULT_PACKAGE_ROOT=resolve(dirname(fileURLToPath(import.meta.url)),'..','..'),REPAIR_COMMAND=a132_0xf63407(0x1ed),SKILL_NAME=a132_0xf63407(0x1e2);function frontmatterValue(_0x11f311,_0x6ada04){const _0x5a37a7=a132_0xf63407;return _0x11f311[_0x5a37a7(0x200)](new RegExp('^'+_0x6ada04+_0x5a37a7(0x1d8),'m'))?.[0x1]?.['trim']()??'';}function listFiles(_0x7a97c6,_0x1f87b0=_0x7a97c6){const _0x237662=a132_0xf63407;return readdirSync(_0x1f87b0,{'withFileTypes':!![]})['flatMap'](_0x56149d=>{const _0x4feb8a=a132_0xf609,_0x587d1b=join(_0x1f87b0,_0x56149d['name']),_0x1c5216=lstatSync(_0x587d1b);if(_0x1c5216['isSymbolicLink']())throw new Error(_0x4feb8a(0x1e8)+_0x587d1b);if(_0x1c5216['isDirectory']())return listFiles(_0x7a97c6,_0x587d1b);if(!_0x1c5216[_0x4feb8a(0x1d5)]())throw new Error('Unsupported\x20Skill\x20entry:\x20'+_0x587d1b);return[relative(_0x7a97c6,_0x587d1b)[_0x4feb8a(0x1fb)](sep)['join']('/')];})[_0x237662(0x1cf)]((_0x36a7bc,_0x57455e)=>_0x36a7bc<_0x57455e?-0x1:_0x36a7bc>_0x57455e?0x1:0x0);}function digestFiles(_0x472b99,_0xc63187){const _0x528ed8=a132_0xf63407,_0x4b7d14=createHash('sha256');for(const _0x1023ff of _0xc63187){if(_0x1023ff[_0x528ed8(0x1d7)]('/')||_0x1023ff['split']('/')[_0x528ed8(0x1e9)]('..')||_0x1023ff['includes']('\x5c'))throw new Error('Unsafe\x20manifest\x20path:\x20'+_0x1023ff);_0x4b7d14[_0x528ed8(0x1da)](_0x1023ff),_0x4b7d14[_0x528ed8(0x1da)]('\x00'),_0x4b7d14['update'](readFileSync(join(_0x472b99,..._0x1023ff[_0x528ed8(0x1fb)]('/')))),_0x4b7d14[_0x528ed8(0x1da)]('\x00');}return _0x4b7d14[_0x528ed8(0x1db)](_0x528ed8(0x1fe));}function sameFiles(_0x57e215,_0x426c86){const _0x5bb4ed=a132_0xf63407;return _0x57e215[_0x5bb4ed(0x1ec)]===_0x426c86['length']&&_0x57e215[_0x5bb4ed(0x1f4)]((_0x1f6452,_0x4d4eb4)=>_0x1f6452===_0x426c86[_0x4d4eb4]);}function readSource(_0x3f551e){const _0x2be4cd=a132_0xf63407,_0x37c45b=JSON[_0x2be4cd(0x1ee)](readFileSync(join(_0x3f551e,_0x2be4cd(0x1f8)),_0x2be4cd(0x1d3))),_0x525443=JSON['parse'](readFileSync(join(_0x3f551e,_0x2be4cd(0x1ce),'lovrabet.manifest.json'),'utf8')),_0x3a5a47=join(_0x3f551e,'skills',SKILL_NAME),_0x2fe09d=frontmatterValue(readFileSync(join(_0x3a5a47,_0x2be4cd(0x1fa)),_0x2be4cd(0x1d3)),'version'),_0x2eec18=listFiles(_0x3a5a47);if(_0x525443['schemaVersion']!==0x1||_0x525443['name']!==SKILL_NAME||!_0x37c45b[_0x2be4cd(0x1d4)]||_0x525443[_0x2be4cd(0x1f3)]!==_0x37c45b['version']||_0x525443['skillVersion']!==_0x37c45b[_0x2be4cd(0x1d4)]||_0x2fe09d!==_0x37c45b[_0x2be4cd(0x1d4)]||!sameFiles(_0x2eec18,_0x525443[_0x2be4cd(0x1cc)])||digestFiles(_0x3a5a47,_0x2eec18)!==_0x525443[_0x2be4cd(0x1db)])throw new Error(_0x2be4cd(0x1d0));return{'packageVersion':_0x37c45b[_0x2be4cd(0x1d4)],'skillVersion':_0x2fe09d,'root':_0x3a5a47,'manifest':_0x525443};}function installedSkillPath(_0x2730f9){const _0x5c9d9b=a132_0xf63407,_0x26d1b0=resolveInstalledSkill(SKILL_NAME,{'home':_0x2730f9});if(_0x26d1b0[_0x5c9d9b(0x1f0)]===_0x5c9d9b(0x1ef))return{'state':'present','path':dirname(_0x26d1b0[_0x5c9d9b(0x1fd)])};if(_0x26d1b0['state']===_0x5c9d9b(0x1c9))return{'state':'missing'};return{'state':_0x5c9d9b(0x1e4),'reason':_0x26d1b0[_0x5c9d9b(0x1f7)]};}export function inspectInstalledBuiltinSkillVersion(_0x37801c,_0x128423={}){const _0x1f6187=a132_0xf63407,_0x1381cc=installedSkillPath(_0x128423['home']??homedir());if(_0x1381cc[_0x1f6187(0x1f0)]===_0x1f6187(0x1de))return{'state':_0x1f6187(0x1de),'expectedVersion':_0x37801c,'repairCommand':REPAIR_COMMAND};if(_0x1381cc[_0x1f6187(0x1f0)]===_0x1f6187(0x1e4))return{'state':_0x1f6187(0x1e4),'expectedVersion':_0x37801c,'reason':_0x1381cc[_0x1f6187(0x1f7)],'repairCommand':REPAIR_COMMAND};try{const _0x44dd48=frontmatterValue(readFileSync(join(_0x1381cc[_0x1f6187(0x1fd)],_0x1f6187(0x1fa)),_0x1f6187(0x1d3)),_0x1f6187(0x1d4));return{'state':_0x44dd48===_0x37801c?_0x1f6187(0x1f2):'version_mismatch','expectedVersion':_0x37801c,'skillVersion':_0x44dd48,'installedPath':_0x1381cc[_0x1f6187(0x1fd)],'repairCommand':REPAIR_COMMAND};}catch(_0x4059bf){return{'state':_0x1f6187(0x1e4),'expectedVersion':_0x37801c,'installedPath':_0x1381cc[_0x1f6187(0x1fd)],'reason':_0x4059bf instanceof Error?_0x4059bf[_0x1f6187(0x1d6)]:String(_0x4059bf),'repairCommand':REPAIR_COMMAND};}}export function inspectBuiltinSkill(_0x1a0731={}){const _0x400a03=a132_0xf63407,_0x40832d=_0x1a0731[_0x400a03(0x1f6)]??DEFAULT_PACKAGE_ROOT;let _0x4a1bee;try{_0x4a1bee=readSource(_0x40832d);}catch(_0x32ccad){return{'state':'unverifiable','packageVersion':_0x400a03(0x1f5),'reason':_0x32ccad instanceof Error?_0x32ccad['message']:String(_0x32ccad),'repairCommand':REPAIR_COMMAND};}const _0x33123b=installedSkillPath(_0x1a0731[_0x400a03(0x1e7)]??homedir());if(_0x33123b[_0x400a03(0x1f0)]==='missing')return{'state':'missing','packageVersion':_0x4a1bee[_0x400a03(0x1f3)],'repairCommand':REPAIR_COMMAND};if(_0x33123b['state']==='unverifiable')return{'state':_0x400a03(0x1e4),'packageVersion':_0x4a1bee[_0x400a03(0x1f3)],'reason':_0x33123b['reason'],'repairCommand':REPAIR_COMMAND};try{const _0xa6ca3b=frontmatterValue(readFileSync(join(_0x33123b[_0x400a03(0x1fd)],_0x400a03(0x1fa)),'utf8'),_0x400a03(0x1d4));if(_0xa6ca3b!==_0x4a1bee[_0x400a03(0x1ea)])return{'state':_0x400a03(0x1f1),'packageVersion':_0x4a1bee['packageVersion'],'skillVersion':_0xa6ca3b,'installedPath':_0x33123b[_0x400a03(0x1fd)],'repairCommand':REPAIR_COMMAND};const _0x4389f1=listFiles(_0x33123b[_0x400a03(0x1fd)]),_0xd8b332=digestFiles(_0x33123b[_0x400a03(0x1fd)],_0x4389f1);return{'state':sameFiles(_0x4389f1,_0x4a1bee['manifest'][_0x400a03(0x1cc)])&&_0xd8b332===_0x4a1bee[_0x400a03(0x1e6)]['digest']?_0x400a03(0x1f2):_0x400a03(0x1d9),'packageVersion':_0x4a1bee[_0x400a03(0x1f3)],'skillVersion':_0xa6ca3b,'installedPath':_0x33123b[_0x400a03(0x1fd)],'digest':_0xd8b332,'repairCommand':REPAIR_COMMAND};}catch(_0x2ee81e){return{'state':'unverifiable','packageVersion':_0x4a1bee[_0x400a03(0x1f3)],'installedPath':_0x33123b[_0x400a03(0x1fd)],'reason':_0x2ee81e instanceof Error?_0x2ee81e['message']:String(_0x2ee81e),'repairCommand':REPAIR_COMMAND};}}function failure(_0x414439,_0x4c27b3,_0x4d4e89,_0x2ca89b){const _0x3f435e=a132_0xf63407;return{'ok':![],'code':_0x414439,'packageVersion':_0x4c27b3[_0x3f435e(0x1f3)],'skillVersion':_0x4c27b3['skillVersion'],'installedPath':_0x2ca89b,'changed':![],'repairCommand':REPAIR_COMMAND,'error':_0x4d4e89 instanceof Error?_0x4d4e89['message']:String(_0x4d4e89)};}function a132_0xf609(_0x30f302,_0x369261){_0x30f302=_0x30f302-0x1c7;const _0x2bcaa9=a132_0x2bca();let _0xf60953=_0x2bcaa9[_0x30f302];return _0xf60953;}export function installBuiltinSkill(_0x1f2db3={}){const _0x96545b=a132_0xf63407,_0x26174e=_0x1f2db3['packageRoot']??DEFAULT_PACKAGE_ROOT,_0x480afb=_0x1f2db3[_0x96545b(0x1e7)]??homedir();let _0x276343;try{_0x276343=readSource(_0x26174e);}catch(_0x3eee00){return failure(_0x96545b(0x1dc),{'packageVersion':_0x96545b(0x1f5),'skillVersion':'unknown'},_0x3eee00);}const _0x5b962a=inspectBuiltinSkill({'packageRoot':_0x26174e,'home':_0x480afb}),_0x5b129a=runNpxSkillsAddGlobal(_0x26174e,_0x276343[_0x96545b(0x1f9)],{'stdio':_0x1f2db3['stdio']??'pipe','expectedSkillName':SKILL_NAME,'presence':{'home':_0x480afb}});if(_0x5b129a['skipped'])return{'ok':!![],'packageVersion':_0x276343['packageVersion'],'skillVersion':_0x276343[_0x96545b(0x1ea)],'installedPath':_0x5b962a[_0x96545b(0x1d2)],'changed':![],'repairCommand':REPAIR_COMMAND};if(!_0x5b129a['ok'])return failure('INSTALL_FAILED',_0x276343,_0x5b129a[_0x96545b(0x1e5)]??_0x96545b(0x1cd)+_0x5b129a['status']);const _0x5cc994=inspectBuiltinSkill({'packageRoot':_0x26174e,'home':_0x480afb});if(_0x5cc994['state']!==_0x96545b(0x1f2))return failure(_0x96545b(0x1ca),_0x276343,_0x5cc994[_0x96545b(0x1f7)]??'Installed\x20Skill\x20state\x20is\x20'+_0x5cc994['state'],_0x5cc994[_0x96545b(0x1d2)]);return{'ok':!![],'packageVersion':_0x276343['packageVersion'],'skillVersion':_0x276343[_0x96545b(0x1ea)],'installedPath':_0x5cc994[_0x96545b(0x1d2)],'changed':_0x5b962a[_0x96545b(0x1f0)]!=='current','repairCommand':REPAIR_COMMAND};}
|