@lovrabet/lovrabet-cli 2.2.5 → 2.2.6-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- 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.d.ts +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.d.ts +2 -2
- 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.d.ts +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/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/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.d.ts +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/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.d.ts +3 -3
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.d.ts +3 -3
- package/lib/core/sdk-client.js +1 -1
- 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.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.d.ts +3 -3
- 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/apply-jq-filter.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 +2 -2
- package/skills/lovrabet/SKILL.md +16 -15
- package/skills/lovrabet/guides/dataset-and-data-workflow.md +2 -2
- package/skills/lovrabet/guides/sql-and-bff-workflow.md +7 -5
- package/skills/lovrabet/references/dataset-discovery-workflow.md +2 -2
- package/skills/lovrabet/references/lovrabet-app-config.md +1 -1
- package/skills/lovrabet/references/lovrabet-bff-workflow.md +1 -1
- package/skills/lovrabet/references/lovrabet-file-workflow.md +1 -1
- package/skills/lovrabet/references/lovrabet-personal-bff-workflow.md +35 -7
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x24f085,_0x20066d){const _0x2e81d0=a114_0x3781,_0x1655bf=_0x24f085();while(!![]){try{const _0x393d85=-parseInt(_0x2e81d0(0x108))/0x1+parseInt(_0x2e81d0(0x109))/0x2+parseInt(_0x2e81d0(0x11f))/0x3+parseInt(_0x2e81d0(0x120))/0x4+parseInt(_0x2e81d0(0x114))/0x5+parseInt(_0x2e81d0(0x119))/0x6*(-parseInt(_0x2e81d0(0x117))/0x7)+-parseInt(_0x2e81d0(0x11a))/0x8;if(_0x393d85===_0x20066d)break;else _0x1655bf['push'](_0x1655bf['shift']());}catch(_0x156642){_0x1655bf['push'](_0x1655bf['shift']());}}}(a114_0x558a,0x9795f));import{CLI_BIN_NAME}from'../constant/cli.js';export function buildConfirmationLines(_0xd922c6,_0x1c1f5d,_0x5c661a){const _0x92be8f=a114_0x3781,_0x501e0d=buildConfirmationContext(_0xd922c6,_0x1c1f5d,_0x5c661a),_0x18ee7e=['⚠\x20\x20High-risk\x20operation:\x20'+_0x501e0d[_0x92be8f(0x107)]];return _0x501e0d['description']&&_0x18ee7e['push']('\x20\x20\x20'+_0x501e0d['description']),_0x501e0d['affectedRecords']&&_0x18ee7e[_0x92be8f(0x122)](_0x92be8f(0x112)+_0x501e0d[_0x92be8f(0x115)]),_0x18ee7e[_0x92be8f(0x122)](_0x92be8f(0x111)),_0x18ee7e;}function a114_0x558a(){const _0x4964b4=['name=','command','cron','id=','title=','schedule-id=','code=','\x20\x20\x20Continue?\x20[y/N]\x20','\x20\x20\x20Affected:\x20','scheduled-at','3804565mpkUjP','affectedRecords','schedule-id','527009awgvWQ','service','6qpiWZh','10120568GIxCIn','cron=','code','scheduled-at=','title','2198337yPlsjl','186780nzWaAX','length','push','kind','name','join','params','params=','--yes','description','commandLabel','187784VUUSLV','1217300xMTVTj'];a114_0x558a=function(){return _0x4964b4;};return a114_0x558a();}export function reconstructCommandArgv(_0x212eca,_0x2e75c5){const _0x12e9d8=a114_0x3781,_0x279e84=[CLI_BIN_NAME,_0x212eca[_0x12e9d8(0x118)],_0x212eca[_0x12e9d8(0x10b)]];for(const [_0x1e8622,_0x566d3c]of Object['entries'](_0x2e75c5)){if(_0x566d3c===!![])_0x279e84[_0x12e9d8(0x122)]('--'+_0x1e8622);else _0x566d3c!==![]&&_0x566d3c!==undefined&&_0x566d3c!==''&&_0x279e84[_0x12e9d8(0x122)]('--'+_0x1e8622+'\x20'+JSON['stringify'](_0x566d3c));}return _0x279e84[_0x12e9d8(0x122)](_0x12e9d8(0x105)),_0x279e84[_0x12e9d8(0x125)]('\x20');}function buildConfirmationContext(_0x35e5dd,_0xc40bb4,_0x346d7f){const _0x496907=a114_0x3781,_0xf51381=extractAffectedRecords(_0x346d7f);return{'commandLabel':_0xc40bb4,'description':_0x35e5dd[_0x496907(0x106)],'affectedRecords':_0xf51381};}function a114_0x3781(_0x452af4,_0x3a6ee1){_0x452af4=_0x452af4-0x104;const _0x558a1e=a114_0x558a();let _0x37819b=_0x558a1e[_0x452af4];return _0x37819b;}function extractAffectedRecords(_0x254c15){const _0x4996e0=a114_0x3781,_0x642490=[];if(_0x254c15[_0x4996e0(0x11c)])_0x642490[_0x4996e0(0x122)](_0x4996e0(0x110)+_0x254c15[_0x4996e0(0x11c)]);if(_0x254c15['id'])_0x642490['push'](_0x4996e0(0x10d)+_0x254c15['id']);if(_0x254c15[_0x4996e0(0x116)])_0x642490[_0x4996e0(0x122)](_0x4996e0(0x10f)+_0x254c15[_0x4996e0(0x116)]);if(_0x254c15[_0x4996e0(0x124)])_0x642490[_0x4996e0(0x122)](_0x4996e0(0x10a)+_0x254c15[_0x4996e0(0x124)]);if(_0x254c15[_0x4996e0(0x11e)])_0x642490['push'](_0x4996e0(0x10e)+_0x254c15['title']);if(_0x254c15[_0x4996e0(0x123)])_0x642490[_0x4996e0(0x122)]('kind='+_0x254c15[_0x4996e0(0x123)]);if(_0x254c15[_0x4996e0(0x10c)])_0x642490['push'](_0x4996e0(0x11b)+_0x254c15['cron']);if(_0x254c15[_0x4996e0(0x113)])_0x642490[_0x4996e0(0x122)](_0x4996e0(0x11d)+_0x254c15['scheduled-at']);if(_0x254c15['channel'])_0x642490[_0x4996e0(0x122)]('channel='+_0x254c15['channel']);if(_0x254c15[_0x4996e0(0x126)])_0x642490[_0x4996e0(0x122)](_0x4996e0(0x104)+_0x254c15[_0x4996e0(0x126)]);return _0x642490[_0x4996e0(0x121)]>0x0?_0x642490['join'](',\x20'):undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a115_0x31ce(){const _0x56b670=['11919830NLdhCE','851872BSNGXo','message','trim','151821tNtpyQ','730815AMqPjY','562UDQtvE','validation','string','1041VXlETT','11SXlwff','1995936vnKdyZ','status','12JdlZxp','2613024uFXPmo','168tHjjRS','response','headers'];a115_0x31ce=function(){return _0x56b670;};return a115_0x31ce();}(function(_0x153de4,_0x5bfad7){const _0x37fe00=a115_0x57c1,_0x1b6665=_0x153de4();while(!![]){try{const _0x3715c2=parseInt(_0x37fe00(0x12f))/0x1*(-parseInt(_0x37fe00(0x13e))/0x2)+parseInt(_0x37fe00(0x131))/0x3+parseInt(_0x37fe00(0x134))/0x4+parseInt(_0x37fe00(0x13d))/0x5*(parseInt(_0x37fe00(0x133))/0x6)+-parseInt(_0x37fe00(0x139))/0x7+-parseInt(_0x37fe00(0x135))/0x8*(-parseInt(_0x37fe00(0x13c))/0x9)+-parseInt(_0x37fe00(0x138))/0xa*(parseInt(_0x37fe00(0x130))/0xb);if(_0x3715c2===_0x5bfad7)break;else _0x1b6665['push'](_0x1b6665['shift']());}catch(_0xfff05c){_0x1b6665['push'](_0x1b6665['shift']());}}}(a115_0x31ce,0x57a1f));function a115_0x57c1(_0x460e3c,_0x3a3126){_0x460e3c=_0x460e3c-0x12f;const _0x31cea2=a115_0x31ce();let _0x57c163=_0x31cea2[_0x460e3c];return _0x57c163;}import{LovrabetError}from'@lovrabet/sdk';import{CliErrors}from'../errors.js';import{createRateLimitError,readRetryAfter,readRetryAfterSeconds}from'../framework/rate-limit.js';export function mapUserFacingExecuteError(_0x350b8d){const _0x25cedf=a115_0x57c1;if(_0x350b8d instanceof LovrabetError){const _0x316931=userFacingLovrabetMessage(_0x350b8d),_0x491d1f=_0x350b8d,_0x51fa6b=createRateLimitError({'status':_0x491d1f[_0x25cedf(0x132)],'errorCode':_0x491d1f['code'],'message':_0x316931,'retryAfter':readRetryAfter(_0x491d1f[_0x25cedf(0x136)]?.[_0x25cedf(0x137)])??readRetryAfterSeconds(_0x491d1f[_0x25cedf(0x136)])});return _0x51fa6b??CliErrors[_0x25cedf(0x13f)](_0x316931);}return _0x350b8d;}function userFacingLovrabetMessage(_0x5154ca){const _0x44d4c6=a115_0x57c1,_0x171946=_0x5154ca['description'];if(_0x171946!==undefined&&_0x171946!==null){if(typeof _0x171946===_0x44d4c6(0x140)&&_0x171946[_0x44d4c6(0x13b)]())return _0x171946[_0x44d4c6(0x13b)]();try{return JSON['stringify'](_0x171946);}catch{}}return _0x5154ca[_0x44d4c6(0x13a)];}
|
package/lib/framework/runner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x279f5e,_0x31517f){const _0x999271=a116_0x4209,_0x5991cc=_0x279f5e();while(!![]){try{const _0x20f419=parseInt(_0x999271(0xa7))/0x1*(parseInt(_0x999271(0x82))/0x2)+parseInt(_0x999271(0x9e))/0x3*(-parseInt(_0x999271(0xa5))/0x4)+parseInt(_0x999271(0xb4))/0x5*(-parseInt(_0x999271(0x9f))/0x6)+parseInt(_0x999271(0xa6))/0x7+parseInt(_0x999271(0x86))/0x8*(parseInt(_0x999271(0x90))/0x9)+parseInt(_0x999271(0xaf))/0xa*(-parseInt(_0x999271(0xc2))/0xb)+parseInt(_0x999271(0xb5))/0xc*(parseInt(_0x999271(0xb3))/0xd);if(_0x20f419===_0x31517f)break;else _0x5991cc['push'](_0x5991cc['shift']());}catch(_0x383e89){_0x5991cc['push'](_0x5991cc['shift']());}}}(a116_0x4bf4,0xad886));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}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{findAppByCode,findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../commands/app/eligibility.js';export function resolveAuthMode(_0x5d02e5){const _0x5560a7=a116_0x4209;return void _0x5d02e5,AUTH_MODE[_0x5560a7(0xbe)];}let sdkClientInitialized=![];export function createPipelineEnv(_0x56d326,_0x55df71){const _0x19dc93=a116_0x4209,_0x3b7e94=typeof _0x55df71['app']==='string'&&_0x55df71[_0x19dc93(0xbb)][_0x19dc93(0x92)]();return{'rawFlags':_0x55df71,'appCode':_0x56d326[_0x19dc93(0xb7)]||productEnv(_0x19dc93(0xb2))||(_0x3b7e94?undefined:readAppCodeFromConfig()),'appCodeSource':_0x56d326[_0x19dc93(0x94)],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x55df71),'defaultFormat':_0x56d326[_0x19dc93(0x9d)],'defaultPageSize':_0x56d326[_0x19dc93(0xc4)],'defaultVerbose':_0x56d326[_0x19dc93(0xc0)],'riskLevel':_0x56d326[_0x19dc93(0x96)],'accessKey':_0x56d326[_0x19dc93(0xa3)],'env':_0x56d326[_0x19dc93(0xa0)],'mergedCli':{'defaultApp':_0x56d326[_0x19dc93(0x80)],'currentApp':_0x56d326[_0x19dc93(0x97)],'appCode':_0x56d326[_0x19dc93(0xb7)]}};}export function createLovrabetRunnerAdapter(_0x22aae5={}){const _0x58bf3e=a116_0x4209,_0x5c0f36={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[_0x58bf3e(0x7d)](_0x33d3e3=>PIPELINE_FLAG_NAMES['has'](_0x33d3e3[_0x58bf3e(0x89)]))[_0x58bf3e(0x84)](({name:_0x3974d9,type:_0x4ee350,description:_0x1b3501})=>({'name':_0x3974d9,'type':_0x4ee350,'description':_0x1b3501})),'formatOutput':_0x22aae5[_0x58bf3e(0x91)]??formatOutput,'getCommandLabel'(_0x433044){const _0x18033b=_0x58bf3e;return CLI_BIN_NAME+'\x20'+_0x433044['service']+'\x20'+_0x433044[_0x18033b(0xa1)];},'riskPolicy':{'onViolation'(_0x1be38e){const _0xf269ea=_0x58bf3e;console[_0xf269ea(0xb6)](_0x1be38e);},'createError'(_0x448051){return CliErrors['cancelled'](_0x448051);}},async 'prepare'(_0x581f1b,_0x11612a){const _0x1022c3=_0x58bf3e,_0x3b6898=resolveAuthMode(_0x11612a);if(_0x581f1b[_0x1022c3(0xbd)]!==![]){if(!_0x11612a[_0x1022c3(0xa3)])throw CliErrors[_0x1022c3(0x98)](_0x1022c3(0x9c)+PRODUCT_CONFIG['newConfigFileName']+_0x1022c3(0xa8)+productEnvName('ACCESS_KEY')+'.');const {setActiveAK:_0x130233}=await import(_0x1022c3(0xc1));_0x130233(_0x11612a['accessKey']);}let _0x3b096c='';if(_0x581f1b[_0x1022c3(0xb1)]!==![]){_0x3b096c=_0x11612a[_0x1022c3(0xb7)]??'',_0x3b096c=await resolveExplicitAppName(_0x581f1b,_0x11612a,_0x3b096c);if(!_0x3b096c){await assertSelectedAppNameIsRuntimeAccessible(_0x581f1b,_0x11612a);throw CliErrors['configMissing'](_0x1022c3(0x88)+PRODUCT_CONFIG[_0x1022c3(0x87)]+'.');}await assertAppCodeIsRuntimeAccessible(_0x581f1b,_0x11612a,_0x3b096c);}if(_0x3b096c){const {initSdkClient:_0x5d9745}=await import(_0x1022c3(0x81));_0x5d9745({'appCode':_0x3b096c,'env':_0x11612a[_0x1022c3(0xa0)]??_0x1022c3(0xb8),'accessKey':_0x11612a[_0x1022c3(0xa3)],'authMode':_0x3b6898}),sdkClientInitialized=!![];}return{'defaults':{'booleans':{'verbose':_0x11612a[_0x1022c3(0x9a)]},'numbers':{'pagesize':_0x11612a[_0x1022c3(0xc5)]}},'extras':{'appCode':_0x3b096c,'cookie':'','apiDomain':_0x11612a[_0x1022c3(0xac)],'apiDir':'','accessKey':_0x11612a[_0x1022c3(0xa3)],'envName':_0x11612a[_0x1022c3(0xa0)],'mergedCli':_0x11612a['mergedCli']}};},'confirmHighRisk':_0x22aae5[_0x58bf3e(0x7f)]??(async({def:_0x15b99c,env:_0x49fb30,flags:_0x5808b4,commandLabel:_0x116544})=>{const _0x2ef717=_0x58bf3e;if(_0x49fb30[_0x2ef717(0xc3)]){const _0x96d6b3=reconstructCommandArgv(_0x15b99c,_0x5808b4);throw CliErrors[_0x2ef717(0xae)](_0x2ef717(0xa9)+_0x116544+_0x2ef717(0x85)+(_0x2ef717(0xb0)+_0x96d6b3));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x15b99c,_0x116544,_0x5808b4),'createCancelledError':_0x168f9a=>CliErrors[_0x2ef717(0x8c)](_0x168f9a)});}),'mapDryRunError'(_0x36adac){return mapUserFacingExecuteError(_0x36adac);},'mapExecuteError'(_0x2d4dc1){return mapUserFacingExecuteError(_0x2d4dc1);},async 'finalize'(){await finalizeLovrabetRuntimeState();}};return _0x5c0f36;}function a116_0x4bf4(){const _0x41f884=['8cVnjsG','newConfigFileName','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20','name','object','mergedCli','cancelled','resolve','catch','schema','3667113wWadVv','formatOutput','trim','_notice','appCodeSource','doctor','riskLevel','currentApp','authRequired','local-alias','defaultVerbose','.appcode\x20to\x20','Set\x20accessKey\x20in\x20','format','6HOKVjd','24mAzyuI','env','command','rawFlags','accessKey','items','954836jEMSYq','3185700afWNVh','2043KiBgLa','\x20or\x20pass\x20','High-risk\x20operation\x20`','Run\x20`','../commands/app/remote-source.js','apiDomain','execute','validation','11560dBKUEi','\x20\x20To\x20proceed:\x20','requiresAppCode','APPCODE','2076451rYZyKA','469330DxRwsn','84ANRynZ','error','appCode','production','includes','Unknown\x20app:\x20','app','service','requiresAuth','ClientAk','string','verbose','../core/api-client.js','4862yQKsNy','isNonInteractive','pageSize','defaultPageSize','nonInteractive','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.','filter','appcode','confirmHighRisk','defaultApp','../core/sdk-client.js','92ESurrq','update','map','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a'];a116_0x4bf4=function(){return _0x41f884;};return a116_0x4bf4();}const terminalRunnerAdapter=createLovrabetRunnerAdapter();export async function finalizeLovrabetRuntimeState(){const _0x4bbd1a=a116_0x4209;try{if(sdkClientInitialized){const {clearSdkClient:_0x507d4b}=await import(_0x4bbd1a(0x81));_0x507d4b();}}finally{sdkClientInitialized=![];const {clearActiveAK:_0x4f39d9}=await import('../core/api-client.js');_0x4f39d9();}}function a116_0x4209(_0x36c543,_0x386403){_0x36c543=_0x36c543-0x7b;const _0x4bf444=a116_0x4bf4();let _0x42091d=_0x4bf444[_0x36c543];return _0x42091d;}async function resolveExplicitAppName(_0x3f96ec,_0x2d8a8f,_0x45d875){const _0x3d98e6=a116_0x4209;if(_0x3f96ec[_0x3d98e6(0xb1)]===![])return _0x45d875;const _0x5543e6=typeof _0x2d8a8f[_0x3d98e6(0xa2)][_0x3d98e6(0xbb)]==='string'?_0x2d8a8f[_0x3d98e6(0xa2)][_0x3d98e6(0xbb)]['trim']():'';if(!_0x5543e6)return _0x45d875;const _0x40fa70=typeof _0x2d8a8f['rawFlags']['appcode']===_0x3d98e6(0xbf)&&_0x2d8a8f[_0x3d98e6(0xa2)][_0x3d98e6(0x7e)][_0x3d98e6(0x92)]()||productEnv(_0x3d98e6(0xb2));if(_0x40fa70||_0x2d8a8f['appCodeSource']===_0x3d98e6(0x99))return _0x45d875;const {getRemoteAppList:_0x4adfe5}=await import(_0x3d98e6(0xab)),_0x28aa37=await _0x4adfe5({'env':_0x2d8a8f[_0x3d98e6(0xa0)]??_0x3d98e6(0xb8),'accessKey':_0x2d8a8f[_0x3d98e6(0xa3)]}),_0x514e45=findAppByName(_0x28aa37[_0x3d98e6(0xa4)],_0x5543e6);if(_0x514e45&&!isRuntimeAccessibleApp(_0x514e45))throw runtimeInaccessibleAppError(_0x514e45,'\x22'+_0x5543e6+'\x22');const _0x41c85d=_0x514e45?.['appCode']?.[_0x3d98e6(0x92)]();if(_0x41c85d)return _0x41c85d;throw CliErrors[_0x3d98e6(0xae)](_0x3d98e6(0xba)+_0x5543e6,_0x3d98e6(0xaa)+CLI_BIN_NAME+_0x3d98e6(0x7c)+_0x5543e6+_0x3d98e6(0x9b)+PRODUCT_CONFIG['newConfigFileName']+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0x5716b6,_0x3a5207){const _0x17fab1=a116_0x4209;if(_0x5716b6['requiresAppCode']===![]||!_0x3a5207[_0x17fab1(0xa3)])return;const _0x478baa=(typeof _0x3a5207[_0x17fab1(0xa2)][_0x17fab1(0xbb)]===_0x17fab1(0xbf)&&_0x3a5207[_0x17fab1(0xa2)][_0x17fab1(0xbb)][_0x17fab1(0x92)]()?_0x3a5207[_0x17fab1(0xa2)][_0x17fab1(0xbb)]:_0x3a5207[_0x17fab1(0x8b)]?.['currentApp']??_0x3a5207['mergedCli']?.[_0x17fab1(0x80)])?.[_0x17fab1(0x92)]();if(!_0x478baa)return;const {getRemoteAppList:_0x3c2137}=await import(_0x17fab1(0xab)),_0x4bae9=await _0x3c2137({'env':_0x3a5207[_0x17fab1(0xa0)]??_0x17fab1(0xb8),'accessKey':_0x3a5207[_0x17fab1(0xa3)]}),_0x47aa52=findAppByName(_0x4bae9[_0x17fab1(0xa4)],_0x478baa);if(_0x47aa52&&!isRuntimeAccessibleApp(_0x47aa52))throw runtimeInaccessibleAppError(_0x47aa52,'\x22'+_0x478baa+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0x5c44d7,_0x2fe199,_0x60ee52){const _0x31a743=a116_0x4209;if(_0x5c44d7[_0x31a743(0xb1)]===![]||!_0x2fe199['accessKey'])return;const {getRemoteAppList:_0x5a8dc6}=await import(_0x31a743(0xab)),_0x5b6302=await _0x5a8dc6({'env':_0x2fe199[_0x31a743(0xa0)]??'production','accessKey':_0x2fe199[_0x31a743(0xa3)]}),_0x2c1964=findAppByCode(_0x5b6302['items'],_0x60ee52);if(_0x2c1964&&!isRuntimeAccessibleApp(_0x2c1964))throw runtimeInaccessibleAppError(_0x2c1964,'appcode\x20\x22'+_0x60ee52+'\x22');}export async function runCommand(_0x2d3ad0,_0x351b78,_0x2956eb=terminalRunnerAdapter){assertKnownCommandFlags(_0x2d3ad0,_0x351b78['rawFlags']),await runCommandWithAdapter(shouldAttachUpdateNotice(_0x2d3ad0)?withUpdateNotice(_0x2d3ad0):_0x2d3ad0,_0x351b78,_0x2956eb);}function shouldAttachUpdateNotice(_0x5dc491){const _0x2c3359=a116_0x4209;return![_0x2c3359(0x83),_0x2c3359(0x8f),_0x2c3359(0x95)][_0x2c3359(0xb9)](_0x5dc491[_0x2c3359(0xbc)]);}function withUpdateNotice(_0x2ee645){return{..._0x2ee645,async 'execute'(_0x198233){const _0x5d2fae=a116_0x4209,_0x40e8f7=shouldResolveUpdateNotice(_0x198233)?resolveLatestUpdateNotice()[_0x5d2fae(0x8e)](()=>null):Promise[_0x5d2fae(0x8d)](null),_0x4bb5b3=await _0x2ee645[_0x5d2fae(0xad)](_0x198233);return attachUpdateNotice(_0x4bb5b3,await _0x40e8f7);}};}function shouldResolveUpdateNotice(_0x387674){const _0x5026b7=a116_0x4209;return _0x387674['format']==='pretty'&&!_0x387674[_0x5026b7(0x7b)];}function attachUpdateNotice(_0x54bb23,_0x161cc3){const _0x10db40=a116_0x4209;if(!_0x161cc3||!_0x54bb23||typeof _0x54bb23!==_0x10db40(0x8a))return _0x54bb23;const _0x27c80d=_0x54bb23,_0x525fd3=typeof _0x27c80d[_0x10db40(0x93)]===_0x10db40(0x8a)&&_0x27c80d['_notice']!==null?_0x27c80d['_notice']:{};return{..._0x27c80d,'_notice':{..._0x525fd3,'update':_0x161cc3}};}
|
|
1
|
+
(function(_0x4549a5,_0x358620){const _0x4bf108=a116_0x5481,_0xf6ee70=_0x4549a5();while(!![]){try{const _0x383b66=parseInt(_0x4bf108(0x143))/0x1+-parseInt(_0x4bf108(0x108))/0x2*(parseInt(_0x4bf108(0x140))/0x3)+parseInt(_0x4bf108(0x117))/0x4*(parseInt(_0x4bf108(0x113))/0x5)+parseInt(_0x4bf108(0x137))/0x6*(parseInt(_0x4bf108(0x11d))/0x7)+-parseInt(_0x4bf108(0x105))/0x8*(-parseInt(_0x4bf108(0x104))/0x9)+parseInt(_0x4bf108(0x123))/0xa*(parseInt(_0x4bf108(0x135))/0xb)+parseInt(_0x4bf108(0x103))/0xc*(-parseInt(_0x4bf108(0x125))/0xd);if(_0x383b66===_0x358620)break;else _0xf6ee70['push'](_0xf6ee70['shift']());}catch(_0xcd18ab){_0xf6ee70['push'](_0xf6ee70['shift']());}}}(a116_0x3bfc,0x200d4));function a116_0x3bfc(){const _0x37cada=['production','verbose','filter','newConfigFileName','2338OrjjPe','string','APPCODE','High-risk\x20operation\x20`','rawFlags','.appcode\x20to\x20','1830NSCqwx','currentApp','13YkbBQv','catch','object','schema','confirmHighRisk','formatOutput','command','requiresAppCode','ClientAk','configMissing','has','resolve','../core/api-client.js','service','requiresAuth','Unknown\x20app:\x20','1078khrPtm','../core/sdk-client.js','1614XAuHAD','validation','defaultVerbose','nonInteractive','ACCESS_KEY','appCodeSource','app','includes','\x20or\x20pass\x20','518382hOtIkB','isNonInteractive','map','230626OHffzq','cancelled','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a','update','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.','apiDomain','2816076tKrxzW','144ndVhzT','83992vgwsPZ','mergedCli','env','2UKxcec','items','_notice','trim','defaultApp','pretty','Run\x20`','doctor','accessKey','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20','pageSize','161805rjTOjF','defaultPageSize','format','appCode','4jZRLnt','execute'];a116_0x3bfc=function(){return _0x37cada;};return a116_0x3bfc();}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}from'../constant/domain.js';import{buildConfirmationLines,reconstructCommandArgv}from'../framework/runner-confirmation.js';function a116_0x5481(_0x4d1c90,_0x5715ef){_0x4d1c90=_0x4d1c90-0x102;const _0x3bfc3f=a116_0x3bfc();let _0x548131=_0x3bfc3f[_0x4d1c90];return _0x548131;}import{mapUserFacingExecuteError}from'../framework/runner-error.js';import{assertKnownCommandFlags}from'../framework/raw-flags.js';import{resolveLatestUpdateNotice}from'../utils/update-notice.js';import{findAppByCode,findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../commands/app/eligibility.js';export function resolveAuthMode(_0x4758d7){const _0x13a5a3=a116_0x5481;return void _0x4758d7,AUTH_MODE[_0x13a5a3(0x12d)];}let sdkClientInitialized=![];export function createPipelineEnv(_0x3ac0f7,_0x467af8){const _0x73ae61=a116_0x5481,_0x57d74f=typeof _0x467af8[_0x73ae61(0x13d)]==='string'&&_0x467af8[_0x73ae61(0x13d)][_0x73ae61(0x10b)]();return{'rawFlags':_0x467af8,'appCode':_0x3ac0f7[_0x73ae61(0x116)]||productEnv(_0x73ae61(0x11f))||(_0x57d74f?undefined:readAppCodeFromConfig()),'appCodeSource':_0x3ac0f7[_0x73ae61(0x13c)],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x467af8),'defaultFormat':_0x3ac0f7['format'],'defaultPageSize':_0x3ac0f7[_0x73ae61(0x112)],'defaultVerbose':_0x3ac0f7[_0x73ae61(0x11a)],'riskLevel':_0x3ac0f7['riskLevel'],'accessKey':_0x3ac0f7[_0x73ae61(0x110)],'env':_0x3ac0f7['env'],'mergedCli':{'defaultApp':_0x3ac0f7[_0x73ae61(0x10c)],'currentApp':_0x3ac0f7[_0x73ae61(0x124)],'appCode':_0x3ac0f7[_0x73ae61(0x116)]}};}export function createLovrabetRunnerAdapter(_0x4989ac={}){const _0x11dbae=a116_0x5481,_0x354d7a={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[_0x11dbae(0x11b)](_0x241991=>PIPELINE_FLAG_NAMES[_0x11dbae(0x12f)](_0x241991['name']))[_0x11dbae(0x142)](({name:_0xcdfd3c,type:_0x7ad335,description:_0x3134eb})=>({'name':_0xcdfd3c,'type':_0x7ad335,'description':_0x3134eb})),'formatOutput':_0x4989ac[_0x11dbae(0x12a)]??formatOutput,'getCommandLabel'(_0x4b0a0e){const _0x4ade05=_0x11dbae;return CLI_BIN_NAME+'\x20'+_0x4b0a0e[_0x4ade05(0x132)]+'\x20'+_0x4b0a0e[_0x4ade05(0x12b)];},'riskPolicy':{'onViolation'(_0x4569eb){console['error'](_0x4569eb);},'createError'(_0x2c1a4d){const _0x5ae8cd=_0x11dbae;return CliErrors[_0x5ae8cd(0x144)](_0x2c1a4d);}},async 'prepare'(_0x189de6,_0x2f2020){const _0x5133a6=_0x11dbae,_0x5aefe1=resolveAuthMode(_0x2f2020);if(_0x189de6[_0x5133a6(0x133)]!==![]){if(!_0x2f2020[_0x5133a6(0x110)])throw CliErrors['authRequired']('Set\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x5133a6(0x11c)]+_0x5133a6(0x13f)+productEnvName(_0x5133a6(0x13b))+'.');const {setActiveAK:_0xcae86}=await import(_0x5133a6(0x131));_0xcae86(_0x2f2020[_0x5133a6(0x110)]);}let _0x15d690='';if(_0x189de6[_0x5133a6(0x12c)]!==![]){_0x15d690=_0x2f2020[_0x5133a6(0x116)]??'',_0x15d690=await resolveExplicitAppName(_0x189de6,_0x2f2020,_0x15d690);if(!_0x15d690){await assertSelectedAppNameIsRuntimeAccessible(_0x189de6,_0x2f2020);throw CliErrors[_0x5133a6(0x12e)](_0x5133a6(0x111)+PRODUCT_CONFIG[_0x5133a6(0x11c)]+'.');}await assertAppCodeIsRuntimeAccessible(_0x189de6,_0x2f2020,_0x15d690);}if(_0x15d690){const {initSdkClient:_0x3c566e}=await import(_0x5133a6(0x136));_0x3c566e({'appCode':_0x15d690,'env':_0x2f2020[_0x5133a6(0x107)]??_0x5133a6(0x119),'accessKey':_0x2f2020['accessKey'],'authMode':_0x5aefe1}),sdkClientInitialized=!![];}return{'defaults':{'booleans':{'verbose':_0x2f2020[_0x5133a6(0x139)]},'numbers':{'pagesize':_0x2f2020[_0x5133a6(0x114)]}},'extras':{'appCode':_0x15d690,'cookie':'','apiDomain':_0x2f2020[_0x5133a6(0x102)],'apiDir':'','accessKey':_0x2f2020['accessKey'],'envName':_0x2f2020['env'],'mergedCli':_0x2f2020['mergedCli']}};},'confirmHighRisk':_0x4989ac[_0x11dbae(0x129)]??(async({def:_0x1a5677,env:_0x4f4cca,flags:_0x5cd1a2,commandLabel:_0x3c8ae7})=>{const _0x355aa=_0x11dbae;if(_0x4f4cca[_0x355aa(0x141)]){const _0x5d4e2f=reconstructCommandArgv(_0x1a5677,_0x5cd1a2);throw CliErrors[_0x355aa(0x138)](_0x355aa(0x120)+_0x3c8ae7+_0x355aa(0x145)+('\x20\x20To\x20proceed:\x20'+_0x5d4e2f));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x1a5677,_0x3c8ae7,_0x5cd1a2),'createCancelledError':_0x3d0f4=>CliErrors[_0x355aa(0x144)](_0x3d0f4)});}),'mapDryRunError'(_0x16bd8b){return mapUserFacingExecuteError(_0x16bd8b);},'mapExecuteError'(_0x32bcac){return mapUserFacingExecuteError(_0x32bcac);},async 'finalize'(){await finalizeLovrabetRuntimeState();}};return _0x354d7a;}const terminalRunnerAdapter=createLovrabetRunnerAdapter();export async function finalizeLovrabetRuntimeState(){const _0x51c23d=a116_0x5481;try{if(sdkClientInitialized){const {clearSdkClient:_0x21b9e7}=await import('../core/sdk-client.js');_0x21b9e7();}}finally{sdkClientInitialized=![];const {clearActiveAK:_0x29c8a7}=await import(_0x51c23d(0x131));_0x29c8a7();}}async function resolveExplicitAppName(_0x17ef3b,_0x5822ae,_0x45cdc4){const _0x117f72=a116_0x5481;if(_0x17ef3b[_0x117f72(0x12c)]===![])return _0x45cdc4;const _0x1e4a8c=typeof _0x5822ae[_0x117f72(0x121)][_0x117f72(0x13d)]==='string'?_0x5822ae[_0x117f72(0x121)][_0x117f72(0x13d)][_0x117f72(0x10b)]():'';if(!_0x1e4a8c)return _0x45cdc4;const _0x236a3e=typeof _0x5822ae[_0x117f72(0x121)]['appcode']===_0x117f72(0x11e)&&_0x5822ae[_0x117f72(0x121)]['appcode']['trim']()||productEnv(_0x117f72(0x11f));if(_0x236a3e||_0x5822ae[_0x117f72(0x13c)]==='local-alias')return _0x45cdc4;const {getRemoteAppList:_0x510c78}=await import('../commands/app/remote-source.js'),_0x297997=await _0x510c78({'env':_0x5822ae[_0x117f72(0x107)]??'production','accessKey':_0x5822ae[_0x117f72(0x110)]}),_0x4c0af8=findAppByName(_0x297997[_0x117f72(0x109)],_0x1e4a8c);if(_0x4c0af8&&!isRuntimeAccessibleApp(_0x4c0af8))throw runtimeInaccessibleAppError(_0x4c0af8,'\x22'+_0x1e4a8c+'\x22');const _0x45060e=_0x4c0af8?.[_0x117f72(0x116)]?.['trim']();if(_0x45060e)return _0x45060e;throw CliErrors[_0x117f72(0x138)](_0x117f72(0x134)+_0x1e4a8c,_0x117f72(0x10e)+CLI_BIN_NAME+_0x117f72(0x147)+_0x1e4a8c+_0x117f72(0x122)+PRODUCT_CONFIG[_0x117f72(0x11c)]+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0x56c4bc,_0x590486){const _0x45505e=a116_0x5481;if(_0x56c4bc[_0x45505e(0x12c)]===![]||!_0x590486[_0x45505e(0x110)])return;const _0x59c1be=(typeof _0x590486['rawFlags'][_0x45505e(0x13d)]===_0x45505e(0x11e)&&_0x590486[_0x45505e(0x121)]['app'][_0x45505e(0x10b)]()?_0x590486[_0x45505e(0x121)]['app']:_0x590486[_0x45505e(0x106)]?.[_0x45505e(0x124)]??_0x590486[_0x45505e(0x106)]?.['defaultApp'])?.[_0x45505e(0x10b)]();if(!_0x59c1be)return;const {getRemoteAppList:_0x60f424}=await import('../commands/app/remote-source.js'),_0x1d1740=await _0x60f424({'env':_0x590486['env']??_0x45505e(0x119),'accessKey':_0x590486[_0x45505e(0x110)]}),_0x1aa8f0=findAppByName(_0x1d1740[_0x45505e(0x109)],_0x59c1be);if(_0x1aa8f0&&!isRuntimeAccessibleApp(_0x1aa8f0))throw runtimeInaccessibleAppError(_0x1aa8f0,'\x22'+_0x59c1be+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0x46c3f3,_0x5cad24,_0x222635){const _0xc67cdd=a116_0x5481;if(_0x46c3f3[_0xc67cdd(0x12c)]===![]||!_0x5cad24['accessKey'])return;const {getRemoteAppList:_0x579b4d}=await import('../commands/app/remote-source.js'),_0x253149=await _0x579b4d({'env':_0x5cad24[_0xc67cdd(0x107)]??_0xc67cdd(0x119),'accessKey':_0x5cad24[_0xc67cdd(0x110)]}),_0xa8eab6=findAppByCode(_0x253149[_0xc67cdd(0x109)],_0x222635);if(_0xa8eab6&&!isRuntimeAccessibleApp(_0xa8eab6))throw runtimeInaccessibleAppError(_0xa8eab6,'appcode\x20\x22'+_0x222635+'\x22');}export async function runCommand(_0x4adbca,_0x4727bf,_0x194736=terminalRunnerAdapter){const _0x1f8a76=a116_0x5481;assertKnownCommandFlags(_0x4adbca,_0x4727bf[_0x1f8a76(0x121)]),await runCommandWithAdapter(shouldAttachUpdateNotice(_0x4adbca)?withUpdateNotice(_0x4adbca):_0x4adbca,_0x4727bf,_0x194736);}function shouldAttachUpdateNotice(_0x3272d7){const _0x14b773=a116_0x5481;return![_0x14b773(0x146),_0x14b773(0x128),_0x14b773(0x10f)][_0x14b773(0x13e)](_0x3272d7['service']);}function withUpdateNotice(_0x302875){return{..._0x302875,async 'execute'(_0x2f6548){const _0x339a9d=a116_0x5481,_0x4a4c4f=shouldResolveUpdateNotice(_0x2f6548)?resolveLatestUpdateNotice()[_0x339a9d(0x126)](()=>null):Promise[_0x339a9d(0x130)](null),_0x278ba4=await _0x302875[_0x339a9d(0x118)](_0x2f6548);return attachUpdateNotice(_0x278ba4,await _0x4a4c4f);}};}function shouldResolveUpdateNotice(_0x2bd04a){const _0x2889ea=a116_0x5481;return _0x2bd04a[_0x2889ea(0x115)]===_0x2889ea(0x10d)&&!_0x2bd04a[_0x2889ea(0x13a)];}function attachUpdateNotice(_0x2802c1,_0x424063){const _0x5f3f05=a116_0x5481;if(!_0x424063||!_0x2802c1||typeof _0x2802c1!=='object')return _0x2802c1;const _0xbda4e8=_0x2802c1,_0x195a34=typeof _0xbda4e8[_0x5f3f05(0x10a)]===_0x5f3f05(0x127)&&_0xbda4e8['_notice']!==null?_0xbda4e8[_0x5f3f05(0x10a)]:{};return{..._0xbda4e8,'_notice':{..._0x195a34,'update':_0x424063}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5a15f4,_0x22f0b0){const _0x336078=a117_0x3fd8,_0xf9a804=_0x5a15f4();while(!![]){try{const _0x3ef1a6=parseInt(_0x336078(0xa5))/0x1+parseInt(_0x336078(0xa2))/0x2*(-parseInt(_0x336078(0xac))/0x3)+parseInt(_0x336078(0xa3))/0x4*(-parseInt(_0x336078(0xaf))/0x5)+parseInt(_0x336078(0xaa))/0x6+parseInt(_0x336078(0xa6))/0x7+-parseInt(_0x336078(0xa7))/0x8+-parseInt(_0x336078(0xab))/0x9;if(_0x3ef1a6===_0x22f0b0)break;else _0xf9a804['push'](_0xf9a804['shift']());}catch(_0x3f7e19){_0xf9a804['push'](_0xf9a804['shift']());}}}(a117_0x4281,0xabcab));import{buildSchemaPayload as a117_0x685ec7}from'@lovrabet/cli-framework';function a117_0x4281(){const _0x4212a3=['services','commands','4PziZRT','65236pZlATG','has','649942GDFktX','9621374goBzus','3175128nAgtcf','filter','auth','4699980fwIAxy','13162113SAqorU','293730lamVQF','requiresAuth','../commands/registry.js','15HeeRTC','map'];a117_0x4281=function(){return _0x4212a3;};return a117_0x4281();}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';import{getCliGitCommit,getCliVersion}from'../utils/version.js';function a117_0x3fd8(_0x56ffd0,_0x132579){_0x56ffd0=_0x56ffd0-0xa2;const _0x42810d=a117_0x4281();let _0x3fd836=_0x42810d[_0x56ffd0];return _0x3fd836;}export async function buildSchemaPayload(){const _0x1c38e6=a117_0x3fd8,{serviceRegistry:_0x13747d,findDefinition:_0x366109}=await import(_0x1c38e6(0xae)),_0x43cb15=new Set(_0x13747d[_0x1c38e6(0xb0)](_0x20c7cf=>_0x20c7cf['service'])),_0x326a4d=listDynamicServiceEntries()[_0x1c38e6(0xa8)](_0xd13ce4=>!_0x43cb15[_0x1c38e6(0xa4)](_0xd13ce4['service'])),_0xdacea3=a117_0x685ec7({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':getCliGitCommit(),'globalFlags':GLOBAL_FLAGS,'serviceRegistry':insertDynamicServicesAfterServiceTree(_0x13747d,_0x326a4d),'buildAllFlags':buildAllFlags,'findDefinition':(_0x1b5eda,_0x2fdbdd)=>_0x366109(_0x1b5eda,_0x2fdbdd)??findDynamicServiceDefinition(_0x1b5eda,_0x2fdbdd)});return normalizeSchemaPayload(_0xdacea3);}function normalizeSchemaPayload(_0xb996d5){const _0x1ac3b4=a117_0x3fd8;return{..._0xb996d5,'schemaVersion':0x2,'services':_0xb996d5[_0x1ac3b4(0xb1)][_0x1ac3b4(0xb0)](_0x3a88f0=>({..._0x3a88f0,'commands':_0x3a88f0[_0x1ac3b4(0xb2)][_0x1ac3b4(0xb0)](normalizeSchemaCommand)}))};}function normalizeSchemaCommand(_0x214695){const _0x576248=a117_0x3fd8,_0x149f84=_0x214695;return{..._0x214695,'auth':_0x149f84[_0x576248(0xa9)]??(_0x214695[_0x576248(0xad)]?'required':'none')};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2ddf6b,_0x2e1ebc){const _0x581d45=a118_0x4500,_0xf89f0=_0x2ddf6b();while(!![]){try{const _0x2e9580=-parseInt(_0x581d45(0xf4))/0x1+-parseInt(_0x581d45(0xec))/0x2+-parseInt(_0x581d45(0xf7))/0x3+-parseInt(_0x581d45(0xf5))/0x4*(-parseInt(_0x581d45(0xf1))/0x5)+parseInt(_0x581d45(0xee))/0x6+-parseInt(_0x581d45(0xed))/0x7+parseInt(_0x581d45(0xef))/0x8*(parseInt(_0x581d45(0xf0))/0x9);if(_0x2e9580===_0x2e1ebc)break;else _0xf89f0['push'](_0xf89f0['shift']());}catch(_0x149698){_0xf89f0['push'](_0xf89f0['shift']());}}}(a118_0x35a6,0xb2937));function a118_0x35a6(){const _0x33f41e=['48BAKxEc','4518747gaCFcL','8070vUACyc','slice','service','663747FGJzCy','452NANEge','findIndex','1833195kbHAhh','length','1731634RpdfJe','9921807LAeyyl','6567582JuTgRZ'];a118_0x35a6=function(){return _0x33f41e;};return a118_0x35a6();}function a118_0x4500(_0x5ad22a,_0x557063){_0x5ad22a=_0x5ad22a-0xeb;const _0x35a60b=a118_0x35a6();let _0x450009=_0x35a60b[_0x5ad22a];return _0x450009;}export function insertDynamicServicesAfterServiceTree(_0x59cea4,_0x1c45fe){const _0x56d6c8=a118_0x4500;if(_0x1c45fe[_0x56d6c8(0xeb)]===0x0)return[..._0x59cea4];const _0x209989=_0x59cea4[_0x56d6c8(0xf6)](_0x5de68c=>_0x5de68c[_0x56d6c8(0xf3)]===_0x56d6c8(0xf3));if(_0x209989<0x0)return[..._0x59cea4,..._0x1c45fe];return[..._0x59cea4[_0x56d6c8(0xf2)](0x0,_0x209989+0x1),..._0x1c45fe,..._0x59cea4[_0x56d6c8(0xf2)](_0x209989+0x1)];}
|
package/lib/framework/types.d.ts
CHANGED
|
@@ -41,8 +41,8 @@ export interface MergedCliSnapshot {
|
|
|
41
41
|
* requiring each command to look them up independently.
|
|
42
42
|
*
|
|
43
43
|
* Why `apiDir` is always `""`: apiDir is a研发态 (rabetbase-cli) concept for
|
|
44
|
-
* the
|
|
45
|
-
* and does not route through a
|
|
44
|
+
* the Backend Function API directory path. The runtime CLI talks directly to the runtime engine
|
|
45
|
+
* and does not route through a Backend Function, so this field is always empty.
|
|
46
46
|
*
|
|
47
47
|
* Why `accessKey` is optional: some commands may not require auth and can run
|
|
48
48
|
* without it. Making it optional avoids null-checks everywhere.
|
|
@@ -59,7 +59,7 @@ export interface RuntimeContextExtras {
|
|
|
59
59
|
apiDomain: string;
|
|
60
60
|
/**
|
|
61
61
|
* Always empty string in runtime CLI. Present for interface compatibility
|
|
62
|
-
* with rabetbase-cli, which uses
|
|
62
|
+
* with rabetbase-cli, which uses Backend Function API directories.
|
|
63
63
|
*/
|
|
64
64
|
apiDir: string;
|
|
65
65
|
/**
|
package/lib/framework/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2b47c0,_0x20224f){var _0x32d5af=a119_0x5890,_0x2868c2=_0x2b47c0();while(!![]){try{var _0x3df377=-parseInt(_0x32d5af(0x118))/0x1*(-parseInt(_0x32d5af(0x11e))/0x2)+-parseInt(_0x32d5af(0x119))/0x3*(-parseInt(_0x32d5af(0x120))/0x4)+-parseInt(_0x32d5af(0x11c))/0x5+-parseInt(_0x32d5af(0x11d))/0x6+-parseInt(_0x32d5af(0x11b))/0x7*(parseInt(_0x32d5af(0x11a))/0x8)+-parseInt(_0x32d5af(0x121))/0x9+-parseInt(_0x32d5af(0x117))/0xa*(-parseInt(_0x32d5af(0x11f))/0xb);if(_0x3df377===_0x20224f)break;else _0x2868c2['push'](_0x2868c2['shift']());}catch(_0x49ad82){_0x2868c2['push'](_0x2868c2['shift']());}}}(a119_0x26f9,0xc0f25));function a119_0x5890(_0x5a1bf7,_0x436817){_0x5a1bf7=_0x5a1bf7-0x117;var _0x26f998=a119_0x26f9();var _0x5890e5=_0x26f998[_0x5a1bf7];return _0x5890e5;}export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';function a119_0x26f9(){var _0x2b223b=['6219700xyhfiH','2127246NPXSir','254FiMITT','39047723wzfqNj','273676KGIuRs','6977367qKbhpx','10HUDKOb','1579aOUAmY','15cnlStl','384TFUHMl','135387ALIiXf'];a119_0x26f9=function(){return _0x2b223b;};return a119_0x26f9();}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const VERSION = "2.2.
|
|
2
|
-
export declare const GIT_TAG = "v2.2.
|
|
3
|
-
export declare const GIT_COMMIT = "
|
|
4
|
-
export declare const BUILD_TIME = "2026-08-
|
|
1
|
+
export declare const VERSION = "2.2.6-beta.1";
|
|
2
|
+
export declare const GIT_TAG = "v2.2.6-beta.1";
|
|
3
|
+
export declare const GIT_COMMIT = "3542351";
|
|
4
|
+
export declare const BUILD_TIME = "2026-08-20T11:12:28.959Z";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a120_0x3c5adc=a120_0x2291;(function(_0x2d5e4f,_0x3a5355){const _0x5344fd=a120_0x2291,_0xd6ed1=_0x2d5e4f();while(!![]){try{const _0x1b5f4b=-parseInt(_0x5344fd(0xb5))/0x1*(parseInt(_0x5344fd(0xbf))/0x2)+-parseInt(_0x5344fd(0xb9))/0x3*(parseInt(_0x5344fd(0xb8))/0x4)+-parseInt(_0x5344fd(0xbe))/0x5*(-parseInt(_0x5344fd(0xb7))/0x6)+parseInt(_0x5344fd(0xb4))/0x7+parseInt(_0x5344fd(0xb6))/0x8*(parseInt(_0x5344fd(0xc2))/0x9)+parseInt(_0x5344fd(0xb3))/0xa*(parseInt(_0x5344fd(0xc3))/0xb)+parseInt(_0x5344fd(0xc0))/0xc*(parseInt(_0x5344fd(0xbc))/0xd);if(_0x1b5f4b===_0x3a5355)break;else _0xd6ed1['push'](_0xd6ed1['shift']());}catch(_0x3a7881){_0xd6ed1['push'](_0xd6ed1['shift']());}}}(a120_0x443a,0x9f1ea));function a120_0x443a(){const _0x198532=['188GSRAqw','12nxFAMn','2.2.6-beta.1','621099fuDarT','33qbzHVP','889570SZkHoO','3452316hDDcAx','9194qfMPak','136OaLGYA','202542tZTXBl','4uXbnXr','3467697LPIQZs','3542351','2026-08-20T11:12:28.959Z','8285836DaLhlU','v2.2.6-beta.1','15TTeuLB'];a120_0x443a=function(){return _0x198532;};return a120_0x443a();}export const VERSION=a120_0x3c5adc(0xc1);function a120_0x2291(_0x295edf,_0xe68ec0){_0x295edf=_0x295edf-0xb3;const _0x443a2e=a120_0x443a();let _0x22911d=_0x443a2e[_0x295edf];return _0x22911d;}export const GIT_TAG=a120_0x3c5adc(0xbd);export const GIT_COMMIT=a120_0x3c5adc(0xba);export const BUILD_TIME=a120_0x3c5adc(0xbb);
|
package/lib/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xac66bd,_0x9e31b6){const _0x3be1b4=a121_0x2ea2,_0x3747d2=_0xac66bd();while(!![]){try{const _0x1b818a=parseInt(_0x3be1b4(0x1b4))/0x1*(-parseInt(_0x3be1b4(0x1a9))/0x2)+-parseInt(_0x3be1b4(0x1b5))/0x3+-parseInt(_0x3be1b4(0x1a8))/0x4+parseInt(_0x3be1b4(0x1ae))/0x5+-parseInt(_0x3be1b4(0x1af))/0x6+-parseInt(_0x3be1b4(0x1ac))/0x7*(-parseInt(_0x3be1b4(0x1b0))/0x8)+parseInt(_0x3be1b4(0x1b3))/0x9*(parseInt(_0x3be1b4(0x1b1))/0xa);if(_0x1b818a===_0x9e31b6)break;else _0x3747d2['push'](_0x3747d2['shift']());}catch(_0x19b4fb){_0x3747d2['push'](_0x3747d2['shift']());}}}(a121_0x2d6b,0xb73ca));import{jsx as a121_0x27c2da,jsxs as a121_0x4fbe51}from'react/jsx-runtime';import{useEffect}from'react';function a121_0x2d6b(){const _0x5774c6=['16149UFgSrQ','5610736wuBQvz','304226TLELip','\x20to\x20view\x20available\x20commands.','green','2338KZWGHY','column','1576770iRzRZR','5729256ISCpdK','4760AiRrOf','33599620fGxqVj','\x20--help','9HBKScz','5nUHyyv'];a121_0x2d6b=function(){return _0x5774c6;};return a121_0x2d6b();}function a121_0x2ea2(_0x298454,_0x1cad82){_0x298454=_0x298454-0x1a8;const _0x2d6bc8=a121_0x2d6b();let _0x2ea29f=_0x2d6bc8[_0x298454];return _0x2ea29f;}import{Box,Text,useApp}from'ink';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function Help(){const _0x387b38=a121_0x2ea2,{exit:_0x3a7fab}=useApp();return useEffect(()=>{_0x3a7fab();},[_0x3a7fab]),a121_0x4fbe51(Box,{'flexDirection':_0x387b38(0x1ad),'marginTop':0x1,'marginBottom':0x1,'children':[a121_0x27c2da(Box,{'children':a121_0x27c2da(Text,{'bold':!![],'color':_0x387b38(0x1ab),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a121_0x4fbe51(Box,{'marginTop':0x1,'children':[a121_0x27c2da(Text,{'dimColor':!![],'children':'\x20\x20Use\x20'}),a121_0x27c2da(Text,{'bold':!![],'color':_0x387b38(0x1ab),'children':CLI_BIN_NAME+_0x387b38(0x1b2)}),a121_0x27c2da(Text,{'dimColor':!![],'children':_0x387b38(0x1aa)})]})]});}
|
package/lib/postinstall.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1ead31,_0x1e2c28){const _0x168884=a122_0x1599,_0x34c1ad=_0x1ead31();while(!![]){try{const _0x432de1=parseInt(_0x168884(0xde))/0x1*(parseInt(_0x168884(0xe1))/0x2)+-parseInt(_0x168884(0xdd))/0x3+parseInt(_0x168884(0xda))/0x4*(-parseInt(_0x168884(0xd0))/0x5)+-parseInt(_0x168884(0xd4))/0x6*(parseInt(_0x168884(0xcf))/0x7)+parseInt(_0x168884(0xdf))/0x8*(-parseInt(_0x168884(0xe0))/0x9)+parseInt(_0x168884(0xce))/0xa*(-parseInt(_0x168884(0xd7))/0xb)+parseInt(_0x168884(0xdb))/0xc;if(_0x432de1===_0x1e2c28)break;else _0x34c1ad['push'](_0x34c1ad['shift']());}catch(_0xf83ee4){_0x34c1ad['push'](_0x34c1ad['shift']());}}}(a122_0x561f,0xa11fb));import{installBuiltinSkill}from'./skills/builtin-skill.js';function a122_0x1599(_0x4c9681,_0x35bbfc){_0x4c9681=_0x4c9681-0xce;const _0x561fd4=a122_0x561f();let _0x1599ff=_0x561fd4[_0x4c9681];return _0x1599ff;}export async function runPostinstall(_0x3baad5={}){const _0x3c3fba=a122_0x1599,_0x2cdba5=installBuiltinSkill(_0x3baad5);if(_0x2cdba5['ok']){const _0xfbdb33=_0x2cdba5[_0x3c3fba(0xd1)]?_0x3c3fba(0xdc):_0x3c3fba(0xd8),_0x936f37=_0x2cdba5[_0x3c3fba(0xe3)]?'\x20at\x20'+_0x2cdba5[_0x3c3fba(0xe3)]:_0x3c3fba(0xd6);return console[_0x3c3fba(0xd9)]('Lovrabet\x20Built-in\x20Skill\x20'+_0x2cdba5[_0x3c3fba(0xd5)]+'\x20'+_0xfbdb33+_0x936f37),_0x2cdba5;}const _0x341313='[BUILTIN_SKILL_INSTALL_'+(_0x2cdba5[_0x3c3fba(0xe2)]??'FAILED')+']\x20'+(_0x2cdba5[_0x3c3fba(0xe5)]??'Installation\x20failed')+'.\x20'+(_0x3c3fba(0xd2)+_0x2cdba5['repairCommand']);if(_0x2cdba5[_0x3c3fba(0xe2)]===_0x3c3fba(0xe4))throw new Error(_0x341313);return console[_0x3c3fba(0xd3)](_0x341313),_0x2cdba5;}function a122_0x561f(){const _0x18668f=['warn','6RsWQYP','skillVersion','\x20via\x20skills@latest','11AXBDsn','already\x20current','log','2487592RGNoCb','56834844WjKwlc','installed','3390771nkILYl','1qiyaey','2587048OwzJdE','36JDygDC','1502198DNcZDv','code','installedPath','SOURCE_INVALID','error','11522230ZRnGTR','53011qGrtpP','10HIOPdx','changed','Repair\x20with:\x20'];a122_0x561f=function(){return _0x18668f;};return a122_0x561f();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a123_0x3546(){const _0x5b0201=['1008300ReHXKn','3927231eUqcmg','389677eUWyez','执行该写入操作','high-risk-write','description','risk','confirmationDescription','49848rANnZN','write','39752AtYJyg','5zwwYcw','replace','1486692BRyXdY','72WntZka','Lovrabet\x20confirmation\x20requires\x20a\x20write\x20command.','slice','362996vBRGYy'];a123_0x3546=function(){return _0x5b0201;};return a123_0x3546();}(function(_0x9a1050,_0xe757c5){const _0xacc9f0=a123_0xfde3,_0x10332c=_0x9a1050();while(!![]){try{const _0x1e164c=parseInt(_0xacc9f0(0x100))/0x1+-parseInt(_0xacc9f0(0x108))/0x2+parseInt(_0xacc9f0(0x10b))/0x3+-parseInt(_0xacc9f0(0xfd))/0x4*(parseInt(_0xacc9f0(0x109))/0x5)+parseInt(_0xacc9f0(0xfe))/0x6+-parseInt(_0xacc9f0(0xff))/0x7+parseInt(_0xacc9f0(0x106))/0x8*(parseInt(_0xacc9f0(0xfa))/0x9);if(_0x1e164c===_0xe757c5)break;else _0x10332c['push'](_0x10332c['shift']());}catch(_0x25c4ae){_0x10332c['push'](_0x10332c['shift']());}}}(a123_0x3546,0x69579));const DESCRIPTION_MAX_LENGTH=0x1f4;export function buildLovrabetConfirmationRequest(_0xadc8f,_0x1b7a75,_0x3aff8f){const _0x4f3487=a123_0xfde3,_0x126f02=normalizeText(_0xadc8f[_0x4f3487(0x105)],DESCRIPTION_MAX_LENGTH),_0x280a8e=normalizeText(_0xadc8f[_0x4f3487(0x103)],DESCRIPTION_MAX_LENGTH);return{'operation':_0x1b7a75,'risk':requireWriteRisk(_0xadc8f),'description':_0x126f02||_0x280a8e||_0x4f3487(0x101),..._0x3aff8f?{'signal':_0x3aff8f}:{}};}function a123_0xfde3(_0x5f5b49,_0x51792c){_0x5f5b49=_0x5f5b49-0xfa;const _0x354694=a123_0x3546();let _0xfde3f6=_0x354694[_0x5f5b49];return _0xfde3f6;}function requireWriteRisk(_0x701af6){const _0x188e7b=a123_0xfde3;if(_0x701af6['risk']===_0x188e7b(0x107)||_0x701af6[_0x188e7b(0x104)]===_0x188e7b(0x102))return _0x701af6[_0x188e7b(0x104)];throw new Error(_0x188e7b(0xfb));}function normalizeText(_0x3fc237,_0x20d200){const _0x13befc=a123_0xfde3;if(typeof _0x3fc237!=='string')return'';return _0x3fc237[_0x13befc(0x10a)](/[\u0000-\u001f\u007f]+/g,'\x20')['replace'](/\s+/g,'\x20')['trim']()[_0x13befc(0xfc)](0x0,_0x20d200);}
|
package/lib/runtime/event.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4c16f9,_0x302baf){const _0x37bd43=a124_0x5af6,_0x2e6dfd=_0x4c16f9();while(!![]){try{const _0x495ba0=parseInt(_0x37bd43(0x163))/0x1*(-parseInt(_0x37bd43(0x159))/0x2)+parseInt(_0x37bd43(0x15c))/0x3+parseInt(_0x37bd43(0x16a))/0x4*(-parseInt(_0x37bd43(0x167))/0x5)+parseInt(_0x37bd43(0x160))/0x6*(parseInt(_0x37bd43(0x156))/0x7)+-parseInt(_0x37bd43(0x15f))/0x8+parseInt(_0x37bd43(0x16b))/0x9+-parseInt(_0x37bd43(0x157))/0xa*(-parseInt(_0x37bd43(0x15b))/0xb);if(_0x495ba0===_0x302baf)break;else _0x2e6dfd['push'](_0x2e6dfd['shift']());}catch(_0x1602f6){_0x2e6dfd['push'](_0x2e6dfd['shift']());}}}(a124_0x103a,0x1d275));function a124_0x103a(){const _0x476a7b=['1323081ssvtWR','8659nBrRZO','370CHlOYS','join','1050bhNHIj','lovrabet.write.completed','48004uNXAfk','105561XHToOf','writeEventSubject','trim','412584JJnxVp','774RxtRPf','service','high-risk-write','403RuZWFr','write','split','risk','301690VDhrJm','command','filter','8Kkqmex'];a124_0x103a=function(){return _0x476a7b;};return a124_0x103a();}export function canonicalLovrabetOperation(_0x50368a){const _0x4cd282=a124_0x5af6;return[_0x50368a[_0x4cd282(0x161)],..._0x50368a[_0x4cd282(0x168)][_0x4cd282(0x15e)]()[_0x4cd282(0x165)](/\s+/)][_0x4cd282(0x169)](Boolean)[_0x4cd282(0x158)]('.');}function a124_0x5af6(_0x3b16fe,_0x323cc9){_0x3b16fe=_0x3b16fe-0x156;const _0x103ac5=a124_0x103a();let _0x5af601=_0x103ac5[_0x3b16fe];return _0x5af601;}export function createLovrabetWriteMetadata(_0x4c14f5,_0x34479d,_0x13f38c,_0x1fef1f){const _0x3fafe8=a124_0x5af6;if(_0x1fef1f||_0x13f38c['ok']!==!![]||_0x4c14f5[_0x3fafe8(0x166)]!==_0x3fafe8(0x164)&&_0x4c14f5[_0x3fafe8(0x166)]!==_0x3fafe8(0x162))return undefined;const _0x486e3a=_0x4c14f5[_0x3fafe8(0x15d)]?.(_0x13f38c),_0x59d821={'type':_0x3fafe8(0x15a),'operation':_0x34479d,'risk':_0x4c14f5[_0x3fafe8(0x166)],..._0x486e3a?{'subject':_0x486e3a}:{}};return{'lovrabet':{'schemaVersion':0x1,'event':_0x59d821}};}
|
package/lib/runtime/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x13d157,_0x4b0c85){const _0x406eda=a125_0x19f2,_0x21ea12=_0x13d157();while(!![]){try{const _0x1687a4=parseInt(_0x406eda(0x16b))/0x1*(parseInt(_0x406eda(0x16d))/0x2)+parseInt(_0x406eda(0x179))/0x3+-parseInt(_0x406eda(0x178))/0x4*(-parseInt(_0x406eda(0x15c))/0x5)+parseInt(_0x406eda(0x163))/0x6+parseInt(_0x406eda(0x165))/0x7+parseInt(_0x406eda(0x15d))/0x8*(parseInt(_0x406eda(0x164))/0x9)+-parseInt(_0x406eda(0x175))/0xa;if(_0x1687a4===_0x4b0c85)break;else _0x21ea12['push'](_0x21ea12['shift']());}catch(_0x201de9){_0x21ea12['push'](_0x21ea12['shift']());}}}(a125_0x3d65,0x721f9));function a125_0x3d65(){const _0x103276=['stringify','isNonInteractive','20240360cXIiqE','result','message','457996qLibzn','2303574lhbdjk','Embedded\x20Lovrabet\x20confirmation\x20must\x20run\x20inside\x20execute.','confirm','reason','aborted','riskLevel','confirmation','10vHYjoR','8jRiaAY','command','Lovrabet\x20invocation\x20completed\x20without\x20a\x20captured\x20command\x20result.','signal','write','high-risk-write','3015624gTJfQh','3952629wouJoa','1528128ChGdvI','data','format','Lovrabet\x20invocation\x20aborted.','risk','definition','20uUFWek','dryRun','33454xaGvip','present','args','execute','rawFlags','presentation'];a125_0x3d65=function(){return _0x103276;};return a125_0x3d65();}import{buildConfigFromFlags,initGlobalEnvironment}from'../context.js';import{createLovrabetRunnerAdapter,createPipelineEnv,finalizeLovrabetRuntimeState,runCommand}from'../framework/runner.js';import{canonicalLovrabetOperation,createLovrabetWriteMetadata}from'../runtime/event.js';import{buildLovrabetConfirmationRequest}from'../runtime/confirmation.js';import{resolveLovrabetInvocation}from'../runtime/resolve.js';import{runSerialized}from'../runtime/queue.js';const defaultPresentation={'present'({result:_0x5bce57,command:_0xd42851,risk:_0x365006,dryRun:_0x1afcd8}){const _0x232a3f=a125_0x19f2;return JSON[_0x232a3f(0x173)]({'ok':_0x5bce57['ok'],'command':_0xd42851,'risk':_0x365006,..._0x1afcd8?{'dryRun':!![]}:{},..._0x5bce57[_0x232a3f(0x166)]!==undefined?{'data':_0x5bce57[_0x232a3f(0x166)]}:{},..._0x5bce57['message']?{'message':_0x5bce57[_0x232a3f(0x177)]}:{}});}};export async function invokeLovrabet(_0x2c8d9c,_0x43d725){const _0x518de1=a125_0x19f2;throwIfAborted(_0x43d725[_0x518de1(0x160)]);const _0x49b5fa=await resolveLovrabetInvocation(_0x2c8d9c),_0x1c2f34=canonicalLovrabetOperation(_0x49b5fa[_0x518de1(0x16a)]);return await confirmWriteBeforeQueue(_0x49b5fa[_0x518de1(0x16a)],_0x49b5fa[_0x518de1(0x171)],_0x1c2f34,_0x43d725),runSerialized(async()=>{const _0x4078c1=_0x518de1;throwIfAborted(_0x43d725[_0x4078c1(0x160)]);const _0xac0783={},_0x54c28a=buildConfigFromFlags(_0x49b5fa[_0x4078c1(0x171)]);await initGlobalEnvironment(_0x54c28a);const _0x37db3f=createPipelineEnv(_0x54c28a,{..._0x49b5fa[_0x4078c1(0x171)],'yes':_0x49b5fa[_0x4078c1(0x16a)][_0x4078c1(0x169)]===_0x4078c1(0x162)?!![]:_0x49b5fa[_0x4078c1(0x171)]['yes'],'nonInteractive':!![]});_0x37db3f[_0x4078c1(0x16f)]=_0x49b5fa[_0x4078c1(0x16f)],_0x37db3f[_0x4078c1(0x174)]=!![],_0x37db3f[_0x4078c1(0x17e)]=_0x4078c1(0x162);const _0x1cb345=withAbortSignal(_0x49b5fa[_0x4078c1(0x16a)],_0x43d725[_0x4078c1(0x160)]),_0x23825b=createLovrabetRunnerAdapter({'formatOutput'(_0x42eb82,_0x5771be){const _0x54c3b1=_0x4078c1;_0xac0783[_0x54c3b1(0x176)]=_0x42eb82,_0xac0783['command']=_0x5771be['command'],_0xac0783[_0x54c3b1(0x169)]=_0x5771be[_0x54c3b1(0x169)],_0xac0783[_0x54c3b1(0x167)]=_0x5771be[_0x54c3b1(0x167)],_0xac0783[_0x54c3b1(0x16c)]=_0x5771be[_0x54c3b1(0x16c)]===!![];},async 'confirmHighRisk'(){const _0x57b70c=_0x4078c1;throw new Error(_0x57b70c(0x17a));}});try{await runCommand(_0x1cb345,_0x37db3f,_0x23825b);if(!_0xac0783[_0x4078c1(0x176)]||!_0xac0783[_0x4078c1(0x15e)]||!_0xac0783[_0x4078c1(0x169)]||!_0xac0783[_0x4078c1(0x167)])throw new Error(_0x4078c1(0x15f));const _0x34d0bf=_0x43d725[_0x4078c1(0x172)]??defaultPresentation,_0x1f0795=_0xac0783['dryRun']===!![],_0x19fdda={'result':_0xac0783['result'],'command':_0xac0783[_0x4078c1(0x15e)],'operation':_0x1c2f34,'risk':_0xac0783[_0x4078c1(0x169)],'format':_0xac0783[_0x4078c1(0x167)],'dryRun':_0x1f0795},_0x5b9898=createLovrabetWriteMetadata(_0x49b5fa[_0x4078c1(0x16a)],_0x1c2f34,_0xac0783[_0x4078c1(0x176)],_0x1f0795);let _0x36831b;try{_0x36831b=await _0x34d0bf['present'](_0x19fdda);}catch(_0x3ac80e){if(!_0x5b9898||_0x34d0bf===defaultPresentation)throw _0x3ac80e;_0x36831b=await defaultPresentation[_0x4078c1(0x16e)](_0x19fdda);}return{'operation':_0x1c2f34,'risk':_0xac0783[_0x4078c1(0x169)],'mode':_0x1f0795?'dry-run':_0x4078c1(0x170),'result':_0xac0783[_0x4078c1(0x176)],'output':_0x36831b,..._0x5b9898?{'metadata':_0x5b9898}:{}};}finally{await finalizeLovrabetRuntimeState();}});}function a125_0x19f2(_0xe063c9,_0x228c47){_0xe063c9=_0xe063c9-0x15c;const _0x3d65f3=a125_0x3d65();let _0x19f2ae=_0x3d65f3[_0xe063c9];return _0x19f2ae;}async function confirmWriteBeforeQueue(_0x4d4e02,_0x5c23e1,_0x4ae0a0,_0x5a761e){const _0x360d84=a125_0x19f2;if(_0x5c23e1[_0x360d84(0x16c)]===!![]||_0x4d4e02[_0x360d84(0x169)]!==_0x360d84(0x161)&&_0x4d4e02[_0x360d84(0x169)]!==_0x360d84(0x162))return;await _0x5a761e[_0x360d84(0x17f)][_0x360d84(0x17b)](buildLovrabetConfirmationRequest(_0x4d4e02,_0x4ae0a0,_0x5a761e[_0x360d84(0x160)]));}function withAbortSignal(_0x381314,_0x5f3908){return{..._0x381314,async 'execute'(_0x46a197){return throwIfAborted(_0x5f3908),_0x381314['execute'](_0x46a197);}};}function throwIfAborted(_0x262730){const _0x54bbac=a125_0x19f2;if(_0x262730?.[_0x54bbac(0x17d)])throw _0x262730[_0x54bbac(0x17c)]instanceof Error?_0x262730['reason']:new DOMException(_0x54bbac(0x168),'AbortError');}
|
package/lib/runtime/queue.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a126_0x59b1(_0x116c33,_0x4c4eb3){_0x116c33=_0x116c33-0x1e6;const _0x417ffa=a126_0x417f();let _0x59b14a=_0x417ffa[_0x116c33];return _0x59b14a;}const a126_0x2a1965=a126_0x59b1;(function(_0x48b158,_0x2361fa){const _0x348505=a126_0x59b1,_0x5aef37=_0x48b158();while(!![]){try{const _0x327866=parseInt(_0x348505(0x1ed))/0x1*(-parseInt(_0x348505(0x1e7))/0x2)+-parseInt(_0x348505(0x1e8))/0x3+parseInt(_0x348505(0x1f1))/0x4+parseInt(_0x348505(0x1f0))/0x5+parseInt(_0x348505(0x1ea))/0x6+parseInt(_0x348505(0x1e9))/0x7*(-parseInt(_0x348505(0x1e6))/0x8)+-parseInt(_0x348505(0x1ec))/0x9*(-parseInt(_0x348505(0x1ee))/0xa);if(_0x327866===_0x2361fa)break;else _0x5aef37['push'](_0x5aef37['shift']());}catch(_0xe9658){_0x5aef37['push'](_0x5aef37['shift']());}}}(a126_0x417f,0x1e76f));function a126_0x417f(){const _0x4c00e3=['741630iPnOBn','catch','8388jfdPpd','1mBXrjh','3500EUwASP','resolve','67105YaEoPs','134816GzmKyw','24jQRPvH','43564VksPCa','469596VNdBEJ','452277dTapmI'];a126_0x417f=function(){return _0x4c00e3;};return a126_0x417f();}let tail=Promise[a126_0x2a1965(0x1ef)]();export async function runSerialized(_0x323365){const _0x5e3cf2=a126_0x2a1965,_0x4e3632=tail;let _0x1eb1ea;tail=new Promise(_0x16256e=>{_0x1eb1ea=_0x16256e;}),await _0x4e3632[_0x5e3cf2(0x1eb)](()=>undefined);try{return await _0x323365();}finally{_0x1eb1ea();}}
|
package/lib/runtime/resolve.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2ceb4b,_0x252f46){const _0x14c8dd=a127_0x152d,_0x285fab=_0x2ceb4b();while(!![]){try{const _0x2d1410=parseInt(_0x14c8dd(0xa5))/0x1*(-parseInt(_0x14c8dd(0xb7))/0x2)+-parseInt(_0x14c8dd(0xb6))/0x3*(parseInt(_0x14c8dd(0xba))/0x4)+parseInt(_0x14c8dd(0xae))/0x5*(-parseInt(_0x14c8dd(0xb0))/0x6)+parseInt(_0x14c8dd(0xbb))/0x7+-parseInt(_0x14c8dd(0xaa))/0x8+-parseInt(_0x14c8dd(0xa3))/0x9+-parseInt(_0x14c8dd(0xb3))/0xa*(-parseInt(_0x14c8dd(0xa8))/0xb);if(_0x2d1410===_0x252f46)break;else _0x285fab['push'](_0x285fab['shift']());}catch(_0x110804){_0x285fab['push'](_0x285fab['shift']());}}}(a127_0x4577,0x192e4));import a127_0x2e5e38 from'meow';import{findDefinition,getServiceEntry,isKnownService,resolveRemovedCommand}from'../commands/registry.js';import{resolveDynamicServiceCommand}from'../commands/service/dynamic.js';function a127_0x152d(_0x17fa6a,_0x13e5bd){_0x17fa6a=_0x17fa6a-0xa2;const _0x457781=a127_0x4577();let _0x152dfe=_0x457781[_0x17fa6a];return _0x152dfe;}import{buildMeowFlags}from'../constant/cli.js';import{CliErrors}from'../errors.js';function a127_0x4577(){const _0x52b600=['input','6742318lxyJUU','args','1076264RAHKos','../commands/registry.js','definition','flatMap','35bRXGev','flags','169206AvbYwQ','validation','message','10mJtlJq','Lovrabet\x20argv\x20must\x20include\x20a\x20command\x20for\x20service\x20\x22','assign','117861KNwKsb','46nnBdgF','defaultCommand','join','8CkQDnh','195566Rcgntj','../framework/preparse.js','1005066mWNMjx','slice','676DYSEaP','Lovrabet\x20argv\x20must\x20include\x20a\x20service\x20and\x20command.'];a127_0x4577=function(){return _0x52b600;};return a127_0x4577();}export async function resolveLovrabetInvocation(_0x3e4b30){const _0x251c5a=a127_0x152d,_0x2e7c0e=a127_0x2e5e38('',{'importMeta':import.meta,'argv':_0x3e4b30,'flags':buildMeowFlags(),'autoHelp':![],'autoVersion':![]}),_0x5db260=[..._0x2e7c0e[_0x251c5a(0xa7)]],_0x16eaa8=_0x2e7c0e[_0x251c5a(0xaf)];await correctFlags(_0x16eaa8);const _0xe3d2d7=_0x5db260[0x0];if(!_0xe3d2d7)throw CliErrors[_0x251c5a(0xb1)](_0x251c5a(0xa6));const _0x158066=resolveRemovedCommand(_0xe3d2d7,_0x5db260[0x1]);if(_0x158066)throw CliErrors[_0x251c5a(0xb1)](_0x158066[_0x251c5a(0xb2)],_0x158066['hint']);if(!isKnownService(_0xe3d2d7)){const _0x3a1abf=resolveDynamicServiceCommand(_0x5db260,_0x16eaa8);if(!_0x3a1abf)throw CliErrors['unknownCommand'](_0x5db260[_0x251c5a(0xb9)]('\x20'));return Object[_0x251c5a(0xb5)](_0x16eaa8,_0x3a1abf[_0x251c5a(0xaf)]),{'definition':_0x3a1abf[_0x251c5a(0xac)],'rawFlags':_0x16eaa8,'args':_0x3a1abf[_0x251c5a(0xa9)]};}const _0x555cc9=getServiceEntry(_0xe3d2d7),_0x28ec42=_0x5db260[0x1]||_0x555cc9[_0x251c5a(0xb8)];if(!_0x28ec42)throw CliErrors[_0x251c5a(0xb1)](_0x251c5a(0xb4)+_0xe3d2d7+'\x22.');const _0x4cd660=findDefinition(_0xe3d2d7,_0x28ec42);if(!_0x4cd660)throw CliErrors['unknownCommand'](_0xe3d2d7+'\x20'+_0x28ec42);return{'definition':_0x4cd660,'rawFlags':_0x16eaa8,'args':_0x5db260[_0x251c5a(0xa4)](0x2)};}async function correctFlags(_0x1d3ecd){const _0x1c8b87=a127_0x152d;try{const {correctFlags:_0xfdcfbc}=await import(_0x1c8b87(0xa2)),{getAllDefinitions:_0xb7355a}=await import(_0x1c8b87(0xab)),_0x1837bc=_0xb7355a()[_0x1c8b87(0xad)](_0x4b1c1b=>_0x4b1c1b['flags']??[]),_0x5e94c2=_0xfdcfbc(_0x1d3ecd,_0x1837bc);Object[_0x1c8b87(0xb5)](_0x1d3ecd,_0x5e94c2['flags']);}catch{}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a129_0x32fc81=a129_0x3c47;(function(_0x5613bb,_0x12a07c){const _0x3f7091=a129_0x3c47,_0x530d85=_0x5613bb();while(!![]){try{const _0x3ce919=parseInt(_0x3f7091(0x1eb))/0x1*(-parseInt(_0x3f7091(0x1ba))/0x2)+-parseInt(_0x3f7091(0x1c9))/0x3*(-parseInt(_0x3f7091(0x1d9))/0x4)+-parseInt(_0x3f7091(0x1b3))/0x5*(-parseInt(_0x3f7091(0x1df))/0x6)+parseInt(_0x3f7091(0x1b7))/0x7*(-parseInt(_0x3f7091(0x1b8))/0x8)+-parseInt(_0x3f7091(0x1ca))/0x9*(-parseInt(_0x3f7091(0x1c8))/0xa)+parseInt(_0x3f7091(0x1cd))/0xb*(parseInt(_0x3f7091(0x1b2))/0xc)+-parseInt(_0x3f7091(0x1b1))/0xd*(parseInt(_0x3f7091(0x1cf))/0xe);if(_0x3ce919===_0x12a07c)break;else _0x530d85['push'](_0x530d85['shift']());}catch(_0x447a52){_0x530d85['push'](_0x530d85['shift']());}}}(a129_0x4fc3,0x5d1db));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';function a129_0x4fc3(){const _0x102d24=['every','join','manifest','lovrabet.manifest.json','unverifiable','version','reason','name','files','path','137678Vzmwrl','flatMap','sha256','present','skipped','version_mismatch','missing','installedPath','trim','37544KiaBkj','4320GFXhBx','3710725jtLGPA','Installed\x20Skill\x20state\x20is\x20','Unsafe\x20manifest\x20path:\x20','package.json','7QHBXZo','26008WtfFUy','isDirectory','2dRhOyx','isSymbolicLink','lovrabet\x20cli-skill\x20install','state','root','includes','SKILL.md','content_mismatch','length','skills@latest\x20exited\x20','lovrabet','sort','split','skillVersion','10qWgvAH','689097OxsSZT','6528834urgmFo','unknown','current','16863oDAGTz','isFile','10598SZYURR','pipe','home','Symbolic\x20link\x20is\x20not\x20allowed:\x20','message','match','utf8','parse','Unsupported\x20Skill\x20entry:\x20','skills','12XFIXNo','packageRoot','absent',':\x5cs*(.+)$','packageVersion','VERIFY_FAILED','6REqQXr','update'];a129_0x4fc3=function(){return _0x102d24;};return a129_0x4fc3();}import{resolveInstalledSkill}from'../skills/skill-presence.js';const DEFAULT_PACKAGE_ROOT=resolve(dirname(fileURLToPath(import.meta.url)),'..','..'),REPAIR_COMMAND=a129_0x32fc81(0x1bc),SKILL_NAME=a129_0x32fc81(0x1c4);function frontmatterValue(_0xc3e58e,_0x58ea1e){const _0x2ad647=a129_0x32fc81;return _0xc3e58e[_0x2ad647(0x1d4)](new RegExp('^'+_0x58ea1e+_0x2ad647(0x1dc),'m'))?.[0x1]?.[_0x2ad647(0x1b0)]()??'';}function listFiles(_0x53337e,_0x1a682b=_0x53337e){const _0x81e7e6=a129_0x32fc81;return readdirSync(_0x1a682b,{'withFileTypes':!![]})[_0x81e7e6(0x1ec)](_0x5a621b=>{const _0xe50cb2=_0x81e7e6,_0x34b86a=join(_0x1a682b,_0x5a621b[_0xe50cb2(0x1e8)]),_0x116add=lstatSync(_0x34b86a);if(_0x116add[_0xe50cb2(0x1bb)]())throw new Error(_0xe50cb2(0x1d2)+_0x34b86a);if(_0x116add[_0xe50cb2(0x1b9)]())return listFiles(_0x53337e,_0x34b86a);if(!_0x116add[_0xe50cb2(0x1ce)]())throw new Error(_0xe50cb2(0x1d7)+_0x34b86a);return[relative(_0x53337e,_0x34b86a)[_0xe50cb2(0x1c6)](sep)[_0xe50cb2(0x1e2)]('/')];})[_0x81e7e6(0x1c5)]((_0x238810,_0x45b53f)=>_0x238810<_0x45b53f?-0x1:_0x238810>_0x45b53f?0x1:0x0);}function digestFiles(_0x3a15b0,_0x27c3a0){const _0x1c1e6d=a129_0x32fc81,_0xd41ad5=createHash(_0x1c1e6d(0x1ed));for(const _0x4645f7 of _0x27c3a0){if(_0x4645f7['startsWith']('/')||_0x4645f7[_0x1c1e6d(0x1c6)]('/')[_0x1c1e6d(0x1bf)]('..')||_0x4645f7[_0x1c1e6d(0x1bf)]('\x5c'))throw new Error(_0x1c1e6d(0x1b5)+_0x4645f7);_0xd41ad5['update'](_0x4645f7),_0xd41ad5[_0x1c1e6d(0x1e0)]('\x00'),_0xd41ad5['update'](readFileSync(join(_0x3a15b0,..._0x4645f7[_0x1c1e6d(0x1c6)]('/')))),_0xd41ad5[_0x1c1e6d(0x1e0)]('\x00');}return _0xd41ad5['digest']('hex');}function sameFiles(_0xd3d3a9,_0xfff14){const _0x3b3cb=a129_0x32fc81;return _0xd3d3a9[_0x3b3cb(0x1c2)]===_0xfff14['length']&&_0xd3d3a9[_0x3b3cb(0x1e1)]((_0x3f846c,_0x36bf58)=>_0x3f846c===_0xfff14[_0x36bf58]);}function readSource(_0x2f3a9e){const _0x36a95c=a129_0x32fc81,_0x32bc8d=JSON[_0x36a95c(0x1d6)](readFileSync(join(_0x2f3a9e,_0x36a95c(0x1b6)),_0x36a95c(0x1d5))),_0x6f37ef=JSON['parse'](readFileSync(join(_0x2f3a9e,_0x36a95c(0x1d8),_0x36a95c(0x1e4)),'utf8')),_0x283e94=join(_0x2f3a9e,_0x36a95c(0x1d8),SKILL_NAME),_0x4e8742=frontmatterValue(readFileSync(join(_0x283e94,_0x36a95c(0x1c0)),'utf8'),'version'),_0x209b84=listFiles(_0x283e94);if(_0x6f37ef['schemaVersion']!==0x1||_0x6f37ef[_0x36a95c(0x1e8)]!==SKILL_NAME||!_0x32bc8d[_0x36a95c(0x1e6)]||_0x6f37ef[_0x36a95c(0x1dd)]!==_0x32bc8d['version']||_0x6f37ef['skillVersion']!==_0x32bc8d['version']||_0x4e8742!==_0x32bc8d[_0x36a95c(0x1e6)]||!sameFiles(_0x209b84,_0x6f37ef[_0x36a95c(0x1e9)])||digestFiles(_0x283e94,_0x209b84)!==_0x6f37ef['digest'])throw new Error('Built-in\x20Skill\x20source\x20does\x20not\x20match\x20its\x20package\x20manifest');return{'packageVersion':_0x32bc8d[_0x36a95c(0x1e6)],'skillVersion':_0x4e8742,'root':_0x283e94,'manifest':_0x6f37ef};}function installedSkillPath(_0x2777b8){const _0x81561c=a129_0x32fc81,_0x5c4216=resolveInstalledSkill(SKILL_NAME,{'home':_0x2777b8});if(_0x5c4216['state']===_0x81561c(0x1ab))return{'state':_0x81561c(0x1ab),'path':dirname(_0x5c4216['path'])};if(_0x5c4216['state']===_0x81561c(0x1db))return{'state':_0x81561c(0x1ae)};return{'state':_0x81561c(0x1e5),'reason':_0x5c4216[_0x81561c(0x1e7)]};}function a129_0x3c47(_0x348bc1,_0x5baa50){_0x348bc1=_0x348bc1-0x1ab;const _0x4fc397=a129_0x4fc3();let _0x3c477f=_0x4fc397[_0x348bc1];return _0x3c477f;}export function inspectInstalledBuiltinSkillVersion(_0xe93726,_0xe70556={}){const _0x102dbf=a129_0x32fc81,_0x579e2a=installedSkillPath(_0xe70556[_0x102dbf(0x1d1)]??homedir());if(_0x579e2a[_0x102dbf(0x1bd)]===_0x102dbf(0x1ae))return{'state':_0x102dbf(0x1ae),'expectedVersion':_0xe93726,'repairCommand':REPAIR_COMMAND};if(_0x579e2a['state']===_0x102dbf(0x1e5))return{'state':_0x102dbf(0x1e5),'expectedVersion':_0xe93726,'reason':_0x579e2a[_0x102dbf(0x1e7)],'repairCommand':REPAIR_COMMAND};try{const _0x7ee633=frontmatterValue(readFileSync(join(_0x579e2a['path'],_0x102dbf(0x1c0)),_0x102dbf(0x1d5)),_0x102dbf(0x1e6));return{'state':_0x7ee633===_0xe93726?_0x102dbf(0x1cc):_0x102dbf(0x1ad),'expectedVersion':_0xe93726,'skillVersion':_0x7ee633,'installedPath':_0x579e2a[_0x102dbf(0x1ea)],'repairCommand':REPAIR_COMMAND};}catch(_0x2ade54){return{'state':_0x102dbf(0x1e5),'expectedVersion':_0xe93726,'installedPath':_0x579e2a[_0x102dbf(0x1ea)],'reason':_0x2ade54 instanceof Error?_0x2ade54[_0x102dbf(0x1d3)]:String(_0x2ade54),'repairCommand':REPAIR_COMMAND};}}export function inspectBuiltinSkill(_0x3dead7={}){const _0x4d4e1b=a129_0x32fc81,_0x7ff7a9=_0x3dead7[_0x4d4e1b(0x1da)]??DEFAULT_PACKAGE_ROOT;let _0x1e53cd;try{_0x1e53cd=readSource(_0x7ff7a9);}catch(_0x4d5df0){return{'state':_0x4d4e1b(0x1e5),'packageVersion':_0x4d4e1b(0x1cb),'reason':_0x4d5df0 instanceof Error?_0x4d5df0['message']:String(_0x4d5df0),'repairCommand':REPAIR_COMMAND};}const _0xa26ccf=installedSkillPath(_0x3dead7[_0x4d4e1b(0x1d1)]??homedir());if(_0xa26ccf[_0x4d4e1b(0x1bd)]==='missing')return{'state':_0x4d4e1b(0x1ae),'packageVersion':_0x1e53cd[_0x4d4e1b(0x1dd)],'repairCommand':REPAIR_COMMAND};if(_0xa26ccf[_0x4d4e1b(0x1bd)]==='unverifiable')return{'state':_0x4d4e1b(0x1e5),'packageVersion':_0x1e53cd[_0x4d4e1b(0x1dd)],'reason':_0xa26ccf[_0x4d4e1b(0x1e7)],'repairCommand':REPAIR_COMMAND};try{const _0x1299fa=frontmatterValue(readFileSync(join(_0xa26ccf[_0x4d4e1b(0x1ea)],_0x4d4e1b(0x1c0)),_0x4d4e1b(0x1d5)),_0x4d4e1b(0x1e6));if(_0x1299fa!==_0x1e53cd[_0x4d4e1b(0x1c7)])return{'state':_0x4d4e1b(0x1ad),'packageVersion':_0x1e53cd[_0x4d4e1b(0x1dd)],'skillVersion':_0x1299fa,'installedPath':_0xa26ccf['path'],'repairCommand':REPAIR_COMMAND};const _0x32541e=listFiles(_0xa26ccf[_0x4d4e1b(0x1ea)]),_0x2057c9=digestFiles(_0xa26ccf['path'],_0x32541e);return{'state':sameFiles(_0x32541e,_0x1e53cd[_0x4d4e1b(0x1e3)][_0x4d4e1b(0x1e9)])&&_0x2057c9===_0x1e53cd[_0x4d4e1b(0x1e3)]['digest']?_0x4d4e1b(0x1cc):_0x4d4e1b(0x1c1),'packageVersion':_0x1e53cd[_0x4d4e1b(0x1dd)],'skillVersion':_0x1299fa,'installedPath':_0xa26ccf[_0x4d4e1b(0x1ea)],'digest':_0x2057c9,'repairCommand':REPAIR_COMMAND};}catch(_0x46ba8b){return{'state':_0x4d4e1b(0x1e5),'packageVersion':_0x1e53cd[_0x4d4e1b(0x1dd)],'installedPath':_0xa26ccf[_0x4d4e1b(0x1ea)],'reason':_0x46ba8b instanceof Error?_0x46ba8b['message']:String(_0x46ba8b),'repairCommand':REPAIR_COMMAND};}}function failure(_0x5ace29,_0x241316,_0x181443,_0x35caca){const _0x1639ea=a129_0x32fc81;return{'ok':![],'code':_0x5ace29,'packageVersion':_0x241316[_0x1639ea(0x1dd)],'skillVersion':_0x241316['skillVersion'],'installedPath':_0x35caca,'changed':![],'repairCommand':REPAIR_COMMAND,'error':_0x181443 instanceof Error?_0x181443[_0x1639ea(0x1d3)]:String(_0x181443)};}export function installBuiltinSkill(_0x1e6f00={}){const _0x202a2b=a129_0x32fc81,_0x469b7d=_0x1e6f00[_0x202a2b(0x1da)]??DEFAULT_PACKAGE_ROOT,_0x54aa9e=_0x1e6f00[_0x202a2b(0x1d1)]??homedir();let _0xd12665;try{_0xd12665=readSource(_0x469b7d);}catch(_0x1df2bd){return failure('SOURCE_INVALID',{'packageVersion':_0x202a2b(0x1cb),'skillVersion':_0x202a2b(0x1cb)},_0x1df2bd);}const _0xd3c1f0=inspectBuiltinSkill({'packageRoot':_0x469b7d,'home':_0x54aa9e}),_0x58ba44=runNpxSkillsAddGlobal(_0x469b7d,_0xd12665[_0x202a2b(0x1be)],{'stdio':_0x1e6f00['stdio']??_0x202a2b(0x1d0),'expectedSkillName':SKILL_NAME,'presence':{'home':_0x54aa9e}});if(_0x58ba44[_0x202a2b(0x1ac)])return{'ok':!![],'packageVersion':_0xd12665['packageVersion'],'skillVersion':_0xd12665[_0x202a2b(0x1c7)],'installedPath':_0xd3c1f0[_0x202a2b(0x1af)],'changed':![],'repairCommand':REPAIR_COMMAND};if(!_0x58ba44['ok'])return failure('INSTALL_FAILED',_0xd12665,_0x58ba44['error']??_0x202a2b(0x1c3)+_0x58ba44['status']);const _0x5b790b=inspectBuiltinSkill({'packageRoot':_0x469b7d,'home':_0x54aa9e});if(_0x5b790b['state']!=='current')return failure(_0x202a2b(0x1de),_0xd12665,_0x5b790b[_0x202a2b(0x1e7)]??_0x202a2b(0x1b4)+_0x5b790b[_0x202a2b(0x1bd)],_0x5b790b['installedPath']);return{'ok':!![],'packageVersion':_0xd12665[_0x202a2b(0x1dd)],'skillVersion':_0xd12665[_0x202a2b(0x1c7)],'installedPath':_0x5b790b[_0x202a2b(0x1af)],'changed':_0xd3c1f0[_0x202a2b(0x1bd)]!==_0x202a2b(0x1cc),'repairCommand':REPAIR_COMMAND};}
|
|
1
|
+
const a129_0x584833=a129_0x5764;(function(_0x33b9c5,_0x5354fd){const _0x555f96=a129_0x5764,_0x2c3f2a=_0x33b9c5();while(!![]){try{const _0xe93d07=-parseInt(_0x555f96(0x76))/0x1+-parseInt(_0x555f96(0x92))/0x2+parseInt(_0x555f96(0x9a))/0x3+-parseInt(_0x555f96(0x71))/0x4*(parseInt(_0x555f96(0x98))/0x5)+-parseInt(_0x555f96(0xa0))/0x6+parseInt(_0x555f96(0x87))/0x7*(parseInt(_0x555f96(0x9f))/0x8)+parseInt(_0x555f96(0x93))/0x9;if(_0xe93d07===_0x5354fd)break;else _0x2c3f2a['push'](_0x2c3f2a['shift']());}catch(_0xd1e145){_0x2c3f2a['push'](_0x2c3f2a['shift']());}}}(a129_0xb7b7,0x43f28));import{createHash}from'node:crypto';import{lstatSync,readFileSync,readdirSync}from'node:fs';import{homedir}from'node:os';function a129_0xb7b7(){const _0x36002c=['sort','length','join','missing','status','files','Unsupported\x20Skill\x20entry:\x20','error','1068308DvDeHI','8889777lUFchC','includes','trim','name','present','747830LBDAUs','version','1220670fvZnlk','update','every','VERIFY_FAILED','current','1800TluZoe','3248634KmJiTi','content_mismatch','split','isFile','skills','root','message','package.json','isDirectory','state','installedPath','manifest','pipe','SOURCE_INVALID','lovrabet\x20cli-skill\x20install','packageRoot','4kNoxhY','parse','Symbolic\x20link\x20is\x20not\x20allowed:\x20','schemaVersion','sha256','49122JlvGzm','home','path','packageVersion','unknown','skipped','absent','SKILL.md','skillVersion','hex','stdio','Unsafe\x20manifest\x20path:\x20','reason','skills@latest\x20exited\x20','INSTALL_FAILED','utf8',':\x5cs*(.+)$','4914WHIbTe','unverifiable','version_mismatch'];a129_0xb7b7=function(){return _0x36002c;};return a129_0xb7b7();}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=a129_0x584833(0xae),SKILL_NAME='lovrabet';function frontmatterValue(_0x3abda9,_0x146299){const _0x4d40da=a129_0x584833;return _0x3abda9['match'](new RegExp('^'+_0x146299+_0x4d40da(0x86),'m'))?.[0x1]?.[_0x4d40da(0x95)]()??'';}function listFiles(_0x1e375c,_0x1fc07f=_0x1e375c){const _0x5109f8=a129_0x584833;return readdirSync(_0x1fc07f,{'withFileTypes':!![]})['flatMap'](_0x323d56=>{const _0x5696b5=a129_0x5764,_0x238fc2=join(_0x1fc07f,_0x323d56['name']),_0x260aa6=lstatSync(_0x238fc2);if(_0x260aa6['isSymbolicLink']())throw new Error(_0x5696b5(0x73)+_0x238fc2);if(_0x260aa6[_0x5696b5(0xa8)]())return listFiles(_0x1e375c,_0x238fc2);if(!_0x260aa6[_0x5696b5(0xa3)]())throw new Error(_0x5696b5(0x90)+_0x238fc2);return[relative(_0x1e375c,_0x238fc2)[_0x5696b5(0xa2)](sep)[_0x5696b5(0x8c)]('/')];})[_0x5109f8(0x8a)]((_0x53edf1,_0x34d306)=>_0x53edf1<_0x34d306?-0x1:_0x53edf1>_0x34d306?0x1:0x0);}function a129_0x5764(_0x4e8bad,_0x170ae5){_0x4e8bad=_0x4e8bad-0x70;const _0xb7b76a=a129_0xb7b7();let _0x5764f1=_0xb7b76a[_0x4e8bad];return _0x5764f1;}function digestFiles(_0x18c9ad,_0x4cd794){const _0x5006f6=a129_0x584833,_0xa14212=createHash(_0x5006f6(0x75));for(const _0x1b27b3 of _0x4cd794){if(_0x1b27b3['startsWith']('/')||_0x1b27b3['split']('/')['includes']('..')||_0x1b27b3[_0x5006f6(0x94)]('\x5c'))throw new Error(_0x5006f6(0x81)+_0x1b27b3);_0xa14212['update'](_0x1b27b3),_0xa14212[_0x5006f6(0x9b)]('\x00'),_0xa14212[_0x5006f6(0x9b)](readFileSync(join(_0x18c9ad,..._0x1b27b3[_0x5006f6(0xa2)]('/')))),_0xa14212[_0x5006f6(0x9b)]('\x00');}return _0xa14212['digest'](_0x5006f6(0x7f));}function sameFiles(_0x25e2ad,_0xc19e7d){const _0x3851ff=a129_0x584833;return _0x25e2ad['length']===_0xc19e7d[_0x3851ff(0x8b)]&&_0x25e2ad[_0x3851ff(0x9c)]((_0x49ecb6,_0x383a4a)=>_0x49ecb6===_0xc19e7d[_0x383a4a]);}function readSource(_0x386284){const _0x41003d=a129_0x584833,_0x58db97=JSON['parse'](readFileSync(join(_0x386284,_0x41003d(0xa7)),_0x41003d(0x85))),_0x5e6a45=JSON[_0x41003d(0x72)](readFileSync(join(_0x386284,_0x41003d(0xa4),'lovrabet.manifest.json'),_0x41003d(0x85))),_0x13f765=join(_0x386284,_0x41003d(0xa4),SKILL_NAME),_0x226a0e=frontmatterValue(readFileSync(join(_0x13f765,_0x41003d(0x7d)),'utf8'),_0x41003d(0x99)),_0x4e86c6=listFiles(_0x13f765);if(_0x5e6a45[_0x41003d(0x74)]!==0x1||_0x5e6a45[_0x41003d(0x96)]!==SKILL_NAME||!_0x58db97[_0x41003d(0x99)]||_0x5e6a45[_0x41003d(0x79)]!==_0x58db97['version']||_0x5e6a45['skillVersion']!==_0x58db97['version']||_0x226a0e!==_0x58db97[_0x41003d(0x99)]||!sameFiles(_0x4e86c6,_0x5e6a45[_0x41003d(0x8f)])||digestFiles(_0x13f765,_0x4e86c6)!==_0x5e6a45['digest'])throw new Error('Built-in\x20Skill\x20source\x20does\x20not\x20match\x20its\x20package\x20manifest');return{'packageVersion':_0x58db97[_0x41003d(0x99)],'skillVersion':_0x226a0e,'root':_0x13f765,'manifest':_0x5e6a45};}function installedSkillPath(_0x1908ac){const _0x195d82=a129_0x584833,_0x4d714a=resolveInstalledSkill(SKILL_NAME,{'home':_0x1908ac});if(_0x4d714a['state']==='present')return{'state':_0x195d82(0x97),'path':dirname(_0x4d714a[_0x195d82(0x78)])};if(_0x4d714a[_0x195d82(0xa9)]===_0x195d82(0x7c))return{'state':_0x195d82(0x8d)};return{'state':_0x195d82(0x88),'reason':_0x4d714a[_0x195d82(0x82)]};}export function inspectInstalledBuiltinSkillVersion(_0x5a71a0,_0x114b6c={}){const _0x52ec57=a129_0x584833,_0x3d3a05=installedSkillPath(_0x114b6c[_0x52ec57(0x77)]??homedir());if(_0x3d3a05[_0x52ec57(0xa9)]==='missing')return{'state':_0x52ec57(0x8d),'expectedVersion':_0x5a71a0,'repairCommand':REPAIR_COMMAND};if(_0x3d3a05[_0x52ec57(0xa9)]===_0x52ec57(0x88))return{'state':_0x52ec57(0x88),'expectedVersion':_0x5a71a0,'reason':_0x3d3a05['reason'],'repairCommand':REPAIR_COMMAND};try{const _0x7b7da0=frontmatterValue(readFileSync(join(_0x3d3a05[_0x52ec57(0x78)],_0x52ec57(0x7d)),_0x52ec57(0x85)),'version');return{'state':_0x7b7da0===_0x5a71a0?_0x52ec57(0x9e):_0x52ec57(0x89),'expectedVersion':_0x5a71a0,'skillVersion':_0x7b7da0,'installedPath':_0x3d3a05[_0x52ec57(0x78)],'repairCommand':REPAIR_COMMAND};}catch(_0x103ec7){return{'state':'unverifiable','expectedVersion':_0x5a71a0,'installedPath':_0x3d3a05['path'],'reason':_0x103ec7 instanceof Error?_0x103ec7[_0x52ec57(0xa6)]:String(_0x103ec7),'repairCommand':REPAIR_COMMAND};}}export function inspectBuiltinSkill(_0x4aa75b={}){const _0x3cb656=a129_0x584833,_0x1400ec=_0x4aa75b[_0x3cb656(0x70)]??DEFAULT_PACKAGE_ROOT;let _0x5584a8;try{_0x5584a8=readSource(_0x1400ec);}catch(_0x3ba896){return{'state':'unverifiable','packageVersion':_0x3cb656(0x7a),'reason':_0x3ba896 instanceof Error?_0x3ba896[_0x3cb656(0xa6)]:String(_0x3ba896),'repairCommand':REPAIR_COMMAND};}const _0x4b3aa7=installedSkillPath(_0x4aa75b[_0x3cb656(0x77)]??homedir());if(_0x4b3aa7[_0x3cb656(0xa9)]===_0x3cb656(0x8d))return{'state':_0x3cb656(0x8d),'packageVersion':_0x5584a8[_0x3cb656(0x79)],'repairCommand':REPAIR_COMMAND};if(_0x4b3aa7[_0x3cb656(0xa9)]===_0x3cb656(0x88))return{'state':_0x3cb656(0x88),'packageVersion':_0x5584a8['packageVersion'],'reason':_0x4b3aa7[_0x3cb656(0x82)],'repairCommand':REPAIR_COMMAND};try{const _0x3e1273=frontmatterValue(readFileSync(join(_0x4b3aa7['path'],_0x3cb656(0x7d)),_0x3cb656(0x85)),_0x3cb656(0x99));if(_0x3e1273!==_0x5584a8[_0x3cb656(0x7e)])return{'state':_0x3cb656(0x89),'packageVersion':_0x5584a8[_0x3cb656(0x79)],'skillVersion':_0x3e1273,'installedPath':_0x4b3aa7[_0x3cb656(0x78)],'repairCommand':REPAIR_COMMAND};const _0x2c6a38=listFiles(_0x4b3aa7[_0x3cb656(0x78)]),_0x447149=digestFiles(_0x4b3aa7[_0x3cb656(0x78)],_0x2c6a38);return{'state':sameFiles(_0x2c6a38,_0x5584a8[_0x3cb656(0xab)][_0x3cb656(0x8f)])&&_0x447149===_0x5584a8[_0x3cb656(0xab)]['digest']?_0x3cb656(0x9e):_0x3cb656(0xa1),'packageVersion':_0x5584a8[_0x3cb656(0x79)],'skillVersion':_0x3e1273,'installedPath':_0x4b3aa7['path'],'digest':_0x447149,'repairCommand':REPAIR_COMMAND};}catch(_0x474c34){return{'state':_0x3cb656(0x88),'packageVersion':_0x5584a8['packageVersion'],'installedPath':_0x4b3aa7[_0x3cb656(0x78)],'reason':_0x474c34 instanceof Error?_0x474c34['message']:String(_0x474c34),'repairCommand':REPAIR_COMMAND};}}function failure(_0x3d5c51,_0x44b060,_0x356d4e,_0x18cb7e){const _0x20bcda=a129_0x584833;return{'ok':![],'code':_0x3d5c51,'packageVersion':_0x44b060['packageVersion'],'skillVersion':_0x44b060[_0x20bcda(0x7e)],'installedPath':_0x18cb7e,'changed':![],'repairCommand':REPAIR_COMMAND,'error':_0x356d4e instanceof Error?_0x356d4e[_0x20bcda(0xa6)]:String(_0x356d4e)};}export function installBuiltinSkill(_0x45e6b4={}){const _0x1e3508=a129_0x584833,_0x442da8=_0x45e6b4[_0x1e3508(0x70)]??DEFAULT_PACKAGE_ROOT,_0xaf381e=_0x45e6b4[_0x1e3508(0x77)]??homedir();let _0x29b2ea;try{_0x29b2ea=readSource(_0x442da8);}catch(_0x3d9441){return failure(_0x1e3508(0xad),{'packageVersion':_0x1e3508(0x7a),'skillVersion':_0x1e3508(0x7a)},_0x3d9441);}const _0x3c2d82=inspectBuiltinSkill({'packageRoot':_0x442da8,'home':_0xaf381e}),_0x4fe003=runNpxSkillsAddGlobal(_0x442da8,_0x29b2ea[_0x1e3508(0xa5)],{'stdio':_0x45e6b4[_0x1e3508(0x80)]??_0x1e3508(0xac),'expectedSkillName':SKILL_NAME,'presence':{'home':_0xaf381e}});if(_0x4fe003[_0x1e3508(0x7b)])return{'ok':!![],'packageVersion':_0x29b2ea['packageVersion'],'skillVersion':_0x29b2ea['skillVersion'],'installedPath':_0x3c2d82[_0x1e3508(0xaa)],'changed':![],'repairCommand':REPAIR_COMMAND};if(!_0x4fe003['ok'])return failure(_0x1e3508(0x84),_0x29b2ea,_0x4fe003[_0x1e3508(0x91)]??_0x1e3508(0x83)+_0x4fe003[_0x1e3508(0x8e)]);const _0x4f2a81=inspectBuiltinSkill({'packageRoot':_0x442da8,'home':_0xaf381e});if(_0x4f2a81[_0x1e3508(0xa9)]!==_0x1e3508(0x9e))return failure(_0x1e3508(0x9d),_0x29b2ea,_0x4f2a81['reason']??'Installed\x20Skill\x20state\x20is\x20'+_0x4f2a81[_0x1e3508(0xa9)],_0x4f2a81[_0x1e3508(0xaa)]);return{'ok':!![],'packageVersion':_0x29b2ea[_0x1e3508(0x79)],'skillVersion':_0x29b2ea[_0x1e3508(0x7e)],'installedPath':_0x4f2a81[_0x1e3508(0xaa)],'changed':_0x3c2d82['state']!==_0x1e3508(0x9e),'repairCommand':REPAIR_COMMAND};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a130_0x10a1a3=a130_0x2e67;(function(_0x51a16e,_0x5e6da8){const _0x1985e5=a130_0x2e67,_0x5d0f85=_0x51a16e();while(!![]){try{const _0xa30687=-parseInt(_0x1985e5(0x139))/0x1+parseInt(_0x1985e5(0x136))/0x2*(-parseInt(_0x1985e5(0x134))/0x3)+parseInt(_0x1985e5(0x13a))/0x4*(parseInt(_0x1985e5(0x135))/0x5)+parseInt(_0x1985e5(0x12e))/0x6*(parseInt(_0x1985e5(0x141))/0x7)+-parseInt(_0x1985e5(0x137))/0x8+-parseInt(_0x1985e5(0x14f))/0x9+-parseInt(_0x1985e5(0x15b))/0xa*(-parseInt(_0x1985e5(0x150))/0xb);if(_0xa30687===_0x5e6da8)break;else _0x5d0f85['push'](_0x5d0f85['shift']());}catch(_0x1110ca){_0x5d0f85['push'](_0x5d0f85['shift']());}}}(a130_0x26e9,0xc420a));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';import{LOVRABET_SKILL_SOURCE as a130_0x22ad9b}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';import{resolveInstalledSkill}from'../skills/skill-presence.js';export const LOVRABET_SKILL_SOURCE=a130_0x22ad9b;export const LOVRABET_SKILL_GIT_SOURCE=PRODUCT_CONFIG['internalSkillSource'];export const LOVRABET_GLOBAL_SKILL_NAME=PRODUCT_CONFIG[a130_0x10a1a3(0x144)];export function resolveGlobalSkillName(_0x42e677){const _0x390092=a130_0x10a1a3;switch(_0x42e677[_0x390092(0x131)]()){case LOVRABET_SKILL_SOURCE:case LOVRABET_SKILL_GIT_SOURCE:return LOVRABET_GLOBAL_SKILL_NAME;default:return undefined;}}export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG[a130_0x10a1a3(0x14c)]);function a130_0x26e9(){const _0x120fc1=['167876cFVLyV','npx','!\x20Could\x20not\x20verify\x20\x22','status','skills@latest','NPM_CONFIG_GLOBAL','unverifiable','3241NkyymP','match','\x22\x20not\x20found\x20after\x20install\x20(checked\x20','globalSkillName','\x20failed\x20target(s)','Skill\x20\x22','EPERM','CHILD_TERMINATED','pipe','stdout','filter','skipNpxSkillsEnvSuffix','toString','NPX_NOT_FOUND','10439955kORfEh','289267FQZMva','absent','signal','state','add','message','npx\x20terminated\x20by\x20signal\x20','join','stdio','unknown','error','460uuHIDc','expectedSkillName','ENOENT','log','stderr','SKILL_NOT_INSTALLED','20490AavCsL','EACCES','code','trim','\x22\x20install\x20state:\x20','exit\x20','39bDSlLr','190PyjDeW','245566gkkfsP','2451032xogABB','INSTALL_PARTIAL','519738cOEyyQ'];a130_0x26e9=function(){return _0x120fc1;};return a130_0x26e9();}function a130_0x2e67(_0x54b93f,_0x4018e7){_0x54b93f=_0x54b93f-0x12c;const _0x26e960=a130_0x26e9();let _0x2e67e4=_0x26e960[_0x54b93f];return _0x2e67e4;}const CHILD_OUTPUT_MAX_BUFFER=0x10*0x400*0x400;function failure(_0xf68050,_0x3a4423,_0x35f053){return{'ok':![],'status':_0x3a4423,'code':_0xf68050,'error':'['+_0xf68050+']\x20'+_0x35f053};}export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}export function runNpxSkillsAddGlobal(_0x2a6ab1,_0xbe4548=LOVRABET_SKILL_SOURCE,_0x82841f){const _0x1b2bbb=a130_0x10a1a3;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0xc3e1d1=resolveNpmBin(_0x1b2bbb(0x13b)),_0x45105c=['-y',_0x1b2bbb(0x13e),_0x1b2bbb(0x154),_0xbe4548,'-g','-y'],_0xcc83c1=[_0xc3e1d1,..._0x45105c]['join']('\x20');console[_0x1b2bbb(0x15e)]('*\x20'+_0xcc83c1);const _0x175ae4={...process.env};delete _0x175ae4['npm_config_global'],delete _0x175ae4[_0x1b2bbb(0x13f)];const _0x267abf=spawnSync(_0xc3e1d1,_0x45105c,{'cwd':_0x2a6ab1,'stdio':_0x1b2bbb(0x149),'env':_0x175ae4,'shell':![],'maxBuffer':CHILD_OUTPUT_MAX_BUFFER}),_0x2044e4=[_0x267abf[_0x1b2bbb(0x14a)]?_0x267abf[_0x1b2bbb(0x14a)][_0x1b2bbb(0x14d)]():'',_0x267abf[_0x1b2bbb(0x12c)]?_0x267abf[_0x1b2bbb(0x12c)][_0x1b2bbb(0x14d)]():''][_0x1b2bbb(0x14b)](Boolean)[_0x1b2bbb(0x157)]('\x0a')[_0x1b2bbb(0x131)]();_0x82841f?.[_0x1b2bbb(0x158)]!=='pipe'&&_0x2044e4&&console[_0x1b2bbb(0x15e)](_0x2044e4);if(_0x267abf[_0x1b2bbb(0x15a)]){const _0x34934b=_0x267abf[_0x1b2bbb(0x15a)],_0x3d61cd=_0x34934b[_0x1b2bbb(0x130)]===_0x1b2bbb(0x15d)?_0x1b2bbb(0x14e):_0x34934b[_0x1b2bbb(0x130)]===_0x1b2bbb(0x147)||_0x34934b[_0x1b2bbb(0x130)]===_0x1b2bbb(0x12f)?'PERMISSION_DENIED':'SPAWN_FAILED';return failure(_0x3d61cd,_0x267abf['status'],_0x34934b[_0x1b2bbb(0x155)]);}if(_0x267abf[_0x1b2bbb(0x152)])return failure(_0x1b2bbb(0x148),_0x267abf[_0x1b2bbb(0x13d)],_0x1b2bbb(0x156)+_0x267abf[_0x1b2bbb(0x152)]);if(_0x267abf['status']!==0x0)return failure('CHILD_EXIT_NONZERO',_0x267abf[_0x1b2bbb(0x13d)],_0x2044e4||_0x1b2bbb(0x133)+(_0x267abf[_0x1b2bbb(0x13d)]??_0x1b2bbb(0x159)));const _0x48c14f=_0x2044e4[_0x1b2bbb(0x142)](/Failed to install\s+(\d+)/i);if(_0x48c14f&&Number(_0x48c14f[0x1])>0x0)return failure(_0x1b2bbb(0x138),0x0,'Installer\x20reported\x20'+_0x48c14f[0x1]+_0x1b2bbb(0x145)+(_0x2044e4?':\x0a'+_0x2044e4:''));const _0x4bf108=_0x82841f?.[_0x1b2bbb(0x15c)]??resolveGlobalSkillName(_0xbe4548);if(_0x4bf108){const _0x30f2fd=resolveInstalledSkill(_0x4bf108,_0x82841f?.['presence']);if(_0x30f2fd[_0x1b2bbb(0x153)]===_0x1b2bbb(0x151))return failure(_0x1b2bbb(0x12d),0x0,_0x1b2bbb(0x146)+_0x4bf108+_0x1b2bbb(0x143)+_0x30f2fd['checked']['join'](',\x20')+')');_0x30f2fd[_0x1b2bbb(0x153)]===_0x1b2bbb(0x140)&&console['warn'](_0x1b2bbb(0x13c)+_0x4bf108+_0x1b2bbb(0x132)+_0x30f2fd['reason']);}return{'ok':!![],'status':0x0};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a131_0x348529=a131_0x4a47;(function(_0x336da6,_0x1963c1){const _0x128acd=a131_0x4a47,_0x470903=_0x336da6();while(!![]){try{const _0x10e8f4=-parseInt(_0x128acd(0x19e))/0x1+-parseInt(_0x128acd(0x19d))/0x2*(parseInt(_0x128acd(0x197))/0x3)+parseInt(_0x128acd(0x19c))/0x4*(parseInt(_0x128acd(0x1a4))/0x5)+-parseInt(_0x128acd(0x196))/0x6*(parseInt(_0x128acd(0x1a0))/0x7)+parseInt(_0x128acd(0x193))/0x8*(parseInt(_0x128acd(0x1a1))/0x9)+parseInt(_0x128acd(0x19a))/0xa+parseInt(_0x128acd(0x199))/0xb*(-parseInt(_0x128acd(0x190))/0xc);if(_0x10e8f4===_0x1963c1)break;else _0x470903['push'](_0x470903['shift']());}catch(_0x2b948a){_0x470903['push'](_0x470903['shift']());}}}(a131_0x21ab,0x6d9b4));export const METADATA_FILE='lovrabet.skill.json';function a131_0x4a47(_0x35c6d7,_0x8e45b3){_0x35c6d7=_0x35c6d7-0x190;const _0x21ab83=a131_0x21ab();let _0x4a475d=_0x21ab83[_0x35c6d7];return _0x4a475d;}export const SKILL_FILE=a131_0x348529(0x194);export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,'.DS_Store']);function a131_0x21ab(){const _0x507932=['SKILL.md','.svn','17508yCRiNi','3909VydXnu','.cache','579315muOvrA','4651490djoEas','build','22636paJJIt','754njkSKY','241835gYPlEt','.git','1071JCNZrb','22824fsVNWi','coverage','dist','650DTiErB','node_modules','84fdTGZM','.hg','.turbo','2512EtTFWf'];a131_0x21ab=function(){return _0x507932;};return a131_0x21ab();}export const IGNORED_DIR_NAMES=new Set([a131_0x348529(0x19f),a131_0x348529(0x191),a131_0x348529(0x195),a131_0x348529(0x1a5),'.next',a131_0x348529(0x1a3),a131_0x348529(0x19b),a131_0x348529(0x1a2),a131_0x348529(0x192),a131_0x348529(0x198)]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5f2863,_0x5561cd){const _0x4b5d86=a132_0xf698,_0x5c60c3=_0x5f2863();while(!![]){try{const _0x1b1dad=-parseInt(_0x4b5d86(0xd8))/0x1*(parseInt(_0x4b5d86(0xd9))/0x2)+parseInt(_0x4b5d86(0xd5))/0x3+parseInt(_0x4b5d86(0xd2))/0x4+parseInt(_0x4b5d86(0xd6))/0x5+-parseInt(_0x4b5d86(0xd0))/0x6+-parseInt(_0x4b5d86(0xd1))/0x7*(-parseInt(_0x4b5d86(0xd3))/0x8)+-parseInt(_0x4b5d86(0xdd))/0x9;if(_0x1b1dad===_0x5561cd)break;else _0x5c60c3['push'](_0x5c60c3['shift']());}catch(_0x42f165){_0x5c60c3['push'](_0x5c60c3['shift']());}}}(a132_0x219d,0xd03e8));function a132_0x219d(){const _0x3634c2=['isSymbolicLink','split','.tmp','16072479pckAyk','validation','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','endsWith','3298968CrMXYA','499429hUyglM','1764808xLQwwb','176jYJgUY','utf8','4528377NqrFSC','2779745BlequK','startsWith','1yWBOZS','1775234ubGFNH'];a132_0x219d=function(){return _0x3634c2;};return a132_0x219d();}import{lstatSync,readlinkSync,realpathSync,renameSync,rmSync,writeFileSync}from'node:fs';import{dirname,isAbsolute,resolve,sep}from'node:path';import{CliErrors}from'../../errors.js';import{normalizeSkillRelativePath}from'./local-files.js';export function resolveManagedFilePath(_0xc32dac,_0x2ca2a9){const _0x2079bd=a132_0xf698,_0x38a9b1=normalizeSkillRelativePath(_0x2ca2a9),_0xa9b198=realOrResolved(_0xc32dac),_0x26a464=resolve(_0xa9b198,..._0x38a9b1[_0x2079bd(0xdb)]('/'));if(!isPathInside(_0x26a464,_0xa9b198))throw CliErrors[_0x2079bd(0xde)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x2ca2a9);return ensureNoSymlinkInManagedPath(_0xa9b198,_0x38a9b1),_0x26a464;}export function ensureNoSymlinkInManagedPath(_0x4726bd,_0x16830a){const _0x43c79e=a132_0xf698;let _0x532d7e=_0x4726bd;for(const _0x3b26c7 of _0x16830a['split']('/')){_0x532d7e=resolve(_0x532d7e,_0x3b26c7);const _0x1f32cf=lstatIfPresent(_0x532d7e);if(_0x1f32cf?.[_0x43c79e(0xda)]())throw CliErrors[_0x43c79e(0xde)](_0x43c79e(0xdf)+_0x16830a);}}export function isDanglingSymlink(_0x116d4e){const _0x14182d=a132_0xf698;try{return lstatSync(_0x116d4e)[_0x14182d(0xda)]();}catch{return![];}}export function resolveSymlinkTarget(_0x43f2d2){const _0x39e597=readlinkSync(_0x43f2d2);return isAbsolute(_0x39e597)?_0x39e597:resolve(dirname(_0x43f2d2),_0x39e597);}export function isPathInside(_0x5417c2,_0x7e64c2){const _0x13a6f7=a132_0xf698,_0x676bb=_0x5417c2['endsWith'](sep)?_0x5417c2:''+_0x5417c2+sep,_0x3243d3=_0x7e64c2[_0x13a6f7(0xe0)](sep)?_0x7e64c2:''+_0x7e64c2+sep;return _0x5417c2===_0x7e64c2||_0x676bb[_0x13a6f7(0xd7)](_0x3243d3);}export function realOrResolved(_0x18858a){try{return realpathSync(_0x18858a);}catch{return resolve(_0x18858a);}}export function lstatIfPresent(_0x1ef471){try{return lstatSync(_0x1ef471);}catch{return undefined;}}export function writeTextAtomic(_0x13bd8c,_0x214316,_0x2e8cea){const _0x102151=a132_0xf698;writeBytesAtomic(_0x13bd8c,Buffer['from'](_0x214316,_0x102151(0xd4)),_0x2e8cea);}export function writeBytesAtomic(_0x53fefb,_0x1909d9,_0x2b5536){const _0x4a8732=a132_0xf698,_0x4cfa55=_0x53fefb+_0x4a8732(0xdc);try{writeFileSync(_0x4cfa55,_0x1909d9,{'mode':_0x2b5536}),renameSync(_0x4cfa55,_0x53fefb);}catch(_0x596e00){try{rmSync(_0x4cfa55,{'force':!![]});}catch{}throw _0x596e00;}}function a132_0xf698(_0x1a145a,_0x2176b7){_0x1a145a=_0x1a145a-0xd0;const _0x219d2f=a132_0x219d();let _0xf6988=_0x219d2f[_0x1a145a];return _0xf6988;}export function writeJsonAtomic(_0x112c7d,_0x58e2ef){writeTextAtomic(_0x112c7d,JSON['stringify'](_0x58e2ef,null,0x2)+'\x0a',0x180);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2922a6,_0x2f5e58){const _0x379ff=a133_0x362b,_0x368fad=_0x2922a6();while(!![]){try{const _0x16f9ea=-parseInt(_0x379ff(0x1e5))/0x1+parseInt(_0x379ff(0x1dc))/0x2+parseInt(_0x379ff(0x1e6))/0x3+-parseInt(_0x379ff(0x1da))/0x4+parseInt(_0x379ff(0x1e3))/0x5*(parseInt(_0x379ff(0x1d9))/0x6)+parseInt(_0x379ff(0x1e1))/0x7+-parseInt(_0x379ff(0x1e0))/0x8*(parseInt(_0x379ff(0x1dd))/0x9);if(_0x16f9ea===_0x2f5e58)break;else _0x368fad['push'](_0x368fad['shift']());}catch(_0x13dccc){_0x368fad['push'](_0x368fad['shift']());}}}(a133_0x10fc,0x39ac6));import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';function a133_0x362b(_0x5411d5,_0x62a31a){_0x5411d5=_0x5411d5-0x1d9;const _0x10fcd9=a133_0x10fc();let _0x362b2b=_0x10fcd9[_0x5411d5];return _0x362b2b;}export function contentHash(_0x27eba5){const _0x9ea746=a133_0x362b;return createHash(_0x9ea746(0x1e4))[_0x9ea746(0x1e7)](_0x27eba5)[_0x9ea746(0x1de)](_0x9ea746(0x1df));}export function fileHash(_0x47215a){return bufferSha256(fileContent(_0x47215a));}export function bufferSha256(_0x41a1ad){const _0x2ab501=a133_0x362b;return createHash(_0x2ab501(0x1e4))[_0x2ab501(0x1e7)](_0x41a1ad)['digest'](_0x2ab501(0x1df));}function a133_0x10fc(){const _0x1d59cc=['path','30745gWQIzt','sha256','278959hyPokV','725907PruvqZ','update','138HySiDf','1120312JLKFdq','size','761050RfxTba','108XwWjff','digest','hex','215552alfTpS','2482718egztFx'];a133_0x10fc=function(){return _0x1d59cc;};return a133_0x10fc();}export function fileTreeHash(_0x1f4fb7){const _0x53a485=a133_0x362b,_0x29f017=createHash(_0x53a485(0x1e4));for(const _0x2d0261 of normalizeManifestFiles(_0x1f4fb7)){_0x29f017[_0x53a485(0x1e7)](_0x2d0261[_0x53a485(0x1e2)]),_0x29f017[_0x53a485(0x1e7)]('\x00'),_0x29f017[_0x53a485(0x1e7)](_0x2d0261[_0x53a485(0x1e4)]),_0x29f017['update']('\x00'),_0x29f017[_0x53a485(0x1e7)](String(_0x2d0261[_0x53a485(0x1db)])),_0x29f017['update']('\x00');}return _0x29f017[_0x53a485(0x1de)](_0x53a485(0x1df));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x57dcc7,_0x5e077e){const _0x1b54c2=a134_0x51f9,_0x4495bb=_0x57dcc7();while(!![]){try{const _0x512a3a=parseInt(_0x1b54c2(0xc2))/0x1+-parseInt(_0x1b54c2(0xc7))/0x2+-parseInt(_0x1b54c2(0xc3))/0x3*(parseInt(_0x1b54c2(0xbf))/0x4)+parseInt(_0x1b54c2(0xbd))/0x5*(parseInt(_0x1b54c2(0xc5))/0x6)+-parseInt(_0x1b54c2(0xbc))/0x7+parseInt(_0x1b54c2(0xc9))/0x8*(-parseInt(_0x1b54c2(0xc8))/0x9)+parseInt(_0x1b54c2(0xbe))/0xa;if(_0x512a3a===_0x5e077e)break;else _0x4495bb['push'](_0x4495bb['shift']());}catch(_0x332ca7){_0x4495bb['push'](_0x4495bb['shift']());}}}(a134_0x2c57,0xa0655));import{resolve}from'node:path';function a134_0x51f9(_0x2c9354,_0xacc916){_0x2c9354=_0x2c9354-0xbb;const _0x2c5744=a134_0x2c57();let _0x51f94e=_0x2c5744[_0x2c9354];return _0x51f94e;}import{resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';export function resolveRuntimeSkillInstallTarget(_0x4f7625,_0x39052c='global',_0xb944e7={}){const _0x1fd752=a134_0x51f9,_0x15f76d=resolveSkillSyncPaths(_0xb944e7),_0xc95b78=safePathSegment(_0x4f7625,'appCode'),_0x3ce0cd=_0x39052c==='project'?[resolve(_0xb944e7[_0x1fd752(0xc1)]??process[_0x1fd752(0xc1)](),_0x1fd752(0xc6),_0x1fd752(0xc0))]:runtimeAgentSkillRoots(_0x15f76d);return Object[_0x1fd752(0xc4)]({'scope':_0x39052c,'appCode':_0xc95b78,'skillRoots':Object[_0x1fd752(0xc4)](_0x3ce0cd),'managedRoot':_0x15f76d[_0x1fd752(0xbb)]});}function a134_0x2c57(){const _0x4eb805=['managedRoot','5139834HncGIa','65NqEqBY','21716320oYguDE','152tfjWaU','skills','cwd','730933EoDeLy','86727JQkLiQ','freeze','111138TVYloi','.agents','861668eBmgdi','9MusqLs','1781960MGFGFe'];a134_0x2c57=function(){return _0x4eb805;};return a134_0x2c57();}
|