@lovrabet/lovrabet-cli 2.2.5 → 2.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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(_0x311cd2,_0x25cbdb){const _0x3ad3bb=a114_0x5f21,_0x2e43df=_0x311cd2();while(!![]){try{const _0x7607a=-parseInt(_0x3ad3bb(0x1e5))/0x1+parseInt(_0x3ad3bb(0x1fd))/0x2*(parseInt(_0x3ad3bb(0x1e2))/0x3)+-parseInt(_0x3ad3bb(0x1e0))/0x4*(parseInt(_0x3ad3bb(0x1f6))/0x5)+parseInt(_0x3ad3bb(0x1fc))/0x6+-parseInt(_0x3ad3bb(0x1e4))/0x7+-parseInt(_0x3ad3bb(0x1ea))/0x8+-parseInt(_0x3ad3bb(0x1e6))/0x9*(-parseInt(_0x3ad3bb(0x1ef))/0xa);if(_0x7607a===_0x25cbdb)break;else _0x2e43df['push'](_0x2e43df['shift']());}catch(_0x338005){_0x2e43df['push'](_0x2e43df['shift']());}}}(a114_0x364f,0xa33e8));function a114_0x364f(){const _0x310d91=['1904121IigUXp','description','code=','service','10093216tBIRLq','params=','length','\x20\x20\x20Continue?\x20[y/N]\x20','scheduled-at','140ofhoMy','title','push','kind','command','title=','name=','1093385dmRAGX','\x20\x20\x20','--yes','kind=','affectedRecords','stringify','6378096EGmmBr','90918CQkkWc','channel','schedule-id=','join','code','channel=','schedule-id','commandLabel','24YinEil','\x20\x20\x20Affected:\x20','27cuqKSH','id=','898079tYzGPT','1063454mBbvvV'];a114_0x364f=function(){return _0x310d91;};return a114_0x364f();}import{CLI_BIN_NAME}from'../constant/cli.js';export function buildConfirmationLines(_0xb9b8ff,_0xee3805,_0x2b1604){const _0x1de220=a114_0x5f21,_0x59e941=buildConfirmationContext(_0xb9b8ff,_0xee3805,_0x2b1604),_0x3bf9c0=['⚠\x20\x20High-risk\x20operation:\x20'+_0x59e941[_0x1de220(0x1df)]];return _0x59e941['description']&&_0x3bf9c0[_0x1de220(0x1f1)](_0x1de220(0x1f7)+_0x59e941[_0x1de220(0x1e7)]),_0x59e941[_0x1de220(0x1fa)]&&_0x3bf9c0[_0x1de220(0x1f1)](_0x1de220(0x1e1)+_0x59e941['affectedRecords']),_0x3bf9c0[_0x1de220(0x1f1)](_0x1de220(0x1ed)),_0x3bf9c0;}export function reconstructCommandArgv(_0xb73877,_0x4b3a85){const _0x5e7e6c=a114_0x5f21,_0x3e9c05=[CLI_BIN_NAME,_0xb73877[_0x5e7e6c(0x1e9)],_0xb73877[_0x5e7e6c(0x1f3)]];for(const [_0x33fecd,_0x4232e6]of Object['entries'](_0x4b3a85)){if(_0x4232e6===!![])_0x3e9c05[_0x5e7e6c(0x1f1)]('--'+_0x33fecd);else _0x4232e6!==![]&&_0x4232e6!==undefined&&_0x4232e6!==''&&_0x3e9c05[_0x5e7e6c(0x1f1)]('--'+_0x33fecd+'\x20'+JSON[_0x5e7e6c(0x1fb)](_0x4232e6));}return _0x3e9c05[_0x5e7e6c(0x1f1)](_0x5e7e6c(0x1f8)),_0x3e9c05[_0x5e7e6c(0x200)]('\x20');}function a114_0x5f21(_0x22cf02,_0x435770){_0x22cf02=_0x22cf02-0x1df;const _0x364fb3=a114_0x364f();let _0x5f2196=_0x364fb3[_0x22cf02];return _0x5f2196;}function buildConfirmationContext(_0xfa2076,_0x1128bd,_0x5220d3){const _0x7f5750=a114_0x5f21,_0x29c748=extractAffectedRecords(_0x5220d3);return{'commandLabel':_0x1128bd,'description':_0xfa2076[_0x7f5750(0x1e7)],'affectedRecords':_0x29c748};}function extractAffectedRecords(_0x26a2b0){const _0x58c518=a114_0x5f21,_0x10c7cd=[];if(_0x26a2b0[_0x58c518(0x201)])_0x10c7cd[_0x58c518(0x1f1)](_0x58c518(0x1e8)+_0x26a2b0[_0x58c518(0x201)]);if(_0x26a2b0['id'])_0x10c7cd[_0x58c518(0x1f1)](_0x58c518(0x1e3)+_0x26a2b0['id']);if(_0x26a2b0[_0x58c518(0x203)])_0x10c7cd[_0x58c518(0x1f1)](_0x58c518(0x1ff)+_0x26a2b0[_0x58c518(0x203)]);if(_0x26a2b0['name'])_0x10c7cd[_0x58c518(0x1f1)](_0x58c518(0x1f5)+_0x26a2b0['name']);if(_0x26a2b0['title'])_0x10c7cd[_0x58c518(0x1f1)](_0x58c518(0x1f4)+_0x26a2b0[_0x58c518(0x1f0)]);if(_0x26a2b0[_0x58c518(0x1f2)])_0x10c7cd[_0x58c518(0x1f1)](_0x58c518(0x1f9)+_0x26a2b0[_0x58c518(0x1f2)]);if(_0x26a2b0['cron'])_0x10c7cd[_0x58c518(0x1f1)]('cron='+_0x26a2b0['cron']);if(_0x26a2b0[_0x58c518(0x1ee)])_0x10c7cd[_0x58c518(0x1f1)]('scheduled-at='+_0x26a2b0[_0x58c518(0x1ee)]);if(_0x26a2b0[_0x58c518(0x1fe)])_0x10c7cd['push'](_0x58c518(0x202)+_0x26a2b0[_0x58c518(0x1fe)]);if(_0x26a2b0['params'])_0x10c7cd[_0x58c518(0x1f1)](_0x58c518(0x1eb)+_0x26a2b0['params']);return _0x10c7cd[_0x58c518(0x1ec)]>0x0?_0x10c7cd['join'](',\x20'):undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x29fb2f,_0x1352d7){const _0x4421cb=a115_0x4454,_0x4c78fa=_0x29fb2f();while(!![]){try{const _0x4544c1=-parseInt(_0x4421cb(0xca))/0x1*(-parseInt(_0x4421cb(0xc3))/0x2)+parseInt(_0x4421cb(0xce))/0x3*(-parseInt(_0x4421cb(0xbf))/0x4)+parseInt(_0x4421cb(0xc1))/0x5+parseInt(_0x4421cb(0xc7))/0x6+-parseInt(_0x4421cb(0xc2))/0x7*(parseInt(_0x4421cb(0xcc))/0x8)+parseInt(_0x4421cb(0xc5))/0x9+-parseInt(_0x4421cb(0xcd))/0xa;if(_0x4544c1===_0x1352d7)break;else _0x4c78fa['push'](_0x4c78fa['shift']());}catch(_0x161d06){_0x4c78fa['push'](_0x4c78fa['shift']());}}}(a115_0x319d,0x9345a));import{LovrabetError}from'@lovrabet/sdk';function a115_0x4454(_0x213df6,_0x25602f){_0x213df6=_0x213df6-0xbe;const _0x319d79=a115_0x319d();let _0x445462=_0x319d79[_0x213df6];return _0x445462;}import{CliErrors}from'../errors.js';import{createRateLimitError,readRetryAfter,readRetryAfterSeconds}from'../framework/rate-limit.js';export function mapUserFacingExecuteError(_0x5097bb){const _0x15afd5=a115_0x4454;if(_0x5097bb instanceof LovrabetError){const _0x4bb609=userFacingLovrabetMessage(_0x5097bb),_0x21d055=_0x5097bb,_0x4509de=createRateLimitError({'status':_0x21d055[_0x15afd5(0xc8)],'errorCode':_0x21d055[_0x15afd5(0xc9)],'message':_0x4bb609,'retryAfter':readRetryAfter(_0x21d055['response']?.['headers'])??readRetryAfterSeconds(_0x21d055[_0x15afd5(0xcb)])});return _0x4509de??CliErrors[_0x15afd5(0xc4)](_0x4bb609);}return _0x5097bb;}function a115_0x319d(){const _0x48ae67=['5464134cdyACq','status','code','395891EygWbI','response','24qVOMzF','4662180MGBOwr','12UFitJv','message','562412NqacDX','trim','481550ssiUjm','2641037szmxVk','4asPjfC','validation','8684532cwQoKF','stringify'];a115_0x319d=function(){return _0x48ae67;};return a115_0x319d();}function userFacingLovrabetMessage(_0x171009){const _0x5eca11=a115_0x4454,_0x55a2ff=_0x171009['description'];if(_0x55a2ff!==undefined&&_0x55a2ff!==null){if(typeof _0x55a2ff==='string'&&_0x55a2ff['trim']())return _0x55a2ff[_0x5eca11(0xc0)]();try{return JSON[_0x5eca11(0xc6)](_0x55a2ff);}catch{}}return _0x171009[_0x5eca11(0xbe)];}
|
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(_0x2dd51a,_0x5601c1){const _0x537ce7=a116_0x2f30,_0x1d0f0d=_0x2dd51a();while(!![]){try{const _0x50afac=parseInt(_0x537ce7(0x109))/0x1*(-parseInt(_0x537ce7(0x113))/0x2)+-parseInt(_0x537ce7(0x119))/0x3+parseInt(_0x537ce7(0x11a))/0x4+-parseInt(_0x537ce7(0x12e))/0x5+-parseInt(_0x537ce7(0xfa))/0x6+-parseInt(_0x537ce7(0x128))/0x7*(parseInt(_0x537ce7(0x10f))/0x8)+parseInt(_0x537ce7(0xf7))/0x9*(parseInt(_0x537ce7(0x11d))/0xa);if(_0x50afac===_0x5601c1)break;else _0x1d0f0d['push'](_0x1d0f0d['shift']());}catch(_0x59ccdc){_0x1d0f0d['push'](_0x1d0f0d['shift']());}}}(a116_0x5802,0x7f800));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_0x5802(){const _0x11cb81=['\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.','../core/api-client.js','trim','requiresAuth','appcode\x20\x22','isNonInteractive','update','newConfigFileName','cancelled','2421siLFog','Set\x20accessKey\x20in\x20','APPCODE','defaultApp','env','map','4835704sKPuhN','includes','riskLevel','pageSize','678BozyAs','rawFlags','catch','format','\x20\x20To\x20proceed:\x20','appCode','805440CVMYxG','1004076mWjIlU','object','defaultPageSize','32400460DUvpGS','../commands/app/remote-source.js','command','requiresAppCode','has','../core/sdk-client.js','schema','Unknown\x20app:\x20','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20','_notice','validation','7fUwzEO','pretty','verbose','service','app','resolve','2949200yjYFSe','High-risk\x20operation\x20`','\x20or\x20pass\x20','currentApp','ACCESS_KEY','production','name','defaultVerbose','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a','string','Run\x20`','appcode','mergedCli','9xFdtoQ','accessKey','apiDomain','4111938VouVXb','ClientAk','local-alias','doctor','appCodeSource','items'];a116_0x5802=function(){return _0x11cb81;};return a116_0x5802();}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(_0x1fc0d8){const _0x2065bf=a116_0x2f30;return void _0x1fc0d8,AUTH_MODE[_0x2065bf(0xfb)];}let sdkClientInitialized=![];export function createPipelineEnv(_0x4efc22,_0x248912){const _0x573d10=a116_0x2f30,_0x5ee131=typeof _0x248912['app']==='string'&&_0x248912[_0x573d10(0x12c)][_0x573d10(0x102)]();return{'rawFlags':_0x248912,'appCode':_0x4efc22[_0x573d10(0x118)]||productEnv(_0x573d10(0x10b))||(_0x5ee131?undefined:readAppCodeFromConfig()),'appCodeSource':_0x4efc22['appCodeSource'],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x248912),'defaultFormat':_0x4efc22[_0x573d10(0x116)],'defaultPageSize':_0x4efc22[_0x573d10(0x112)],'defaultVerbose':_0x4efc22[_0x573d10(0x12a)],'riskLevel':_0x4efc22[_0x573d10(0x111)],'accessKey':_0x4efc22['accessKey'],'env':_0x4efc22[_0x573d10(0x10d)],'mergedCli':{'defaultApp':_0x4efc22['defaultApp'],'currentApp':_0x4efc22['currentApp'],'appCode':_0x4efc22[_0x573d10(0x118)]}};}export function createLovrabetRunnerAdapter(_0x3493a2={}){const _0x1aac45=a116_0x2f30,_0x48f35a={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS['filter'](_0x4b9403=>PIPELINE_FLAG_NAMES[_0x1aac45(0x121)](_0x4b9403[_0x1aac45(0x134)]))[_0x1aac45(0x10e)](({name:_0x430058,type:_0x59d959,description:_0x1ee3b6})=>({'name':_0x430058,'type':_0x59d959,'description':_0x1ee3b6})),'formatOutput':_0x3493a2['formatOutput']??formatOutput,'getCommandLabel'(_0xa5be00){const _0x54e07e=_0x1aac45;return CLI_BIN_NAME+'\x20'+_0xa5be00[_0x54e07e(0x12b)]+'\x20'+_0xa5be00[_0x54e07e(0x11f)];},'riskPolicy':{'onViolation'(_0x31b8d2){console['error'](_0x31b8d2);},'createError'(_0x25e906){const _0x152e80=_0x1aac45;return CliErrors[_0x152e80(0x108)](_0x25e906);}},async 'prepare'(_0x33ad0c,_0x2b9325){const _0x37ad2a=_0x1aac45,_0x379df1=resolveAuthMode(_0x2b9325);if(_0x33ad0c[_0x37ad2a(0x103)]!==![]){if(!_0x2b9325[_0x37ad2a(0xf8)])throw CliErrors['authRequired'](_0x37ad2a(0x10a)+PRODUCT_CONFIG[_0x37ad2a(0x107)]+_0x37ad2a(0x130)+productEnvName(_0x37ad2a(0x132))+'.');const {setActiveAK:_0x373b7c}=await import(_0x37ad2a(0x101));_0x373b7c(_0x2b9325[_0x37ad2a(0xf8)]);}let _0x35f98a='';if(_0x33ad0c[_0x37ad2a(0x120)]!==![]){_0x35f98a=_0x2b9325[_0x37ad2a(0x118)]??'',_0x35f98a=await resolveExplicitAppName(_0x33ad0c,_0x2b9325,_0x35f98a);if(!_0x35f98a){await assertSelectedAppNameIsRuntimeAccessible(_0x33ad0c,_0x2b9325);throw CliErrors['configMissing'](_0x37ad2a(0x125)+PRODUCT_CONFIG[_0x37ad2a(0x107)]+'.');}await assertAppCodeIsRuntimeAccessible(_0x33ad0c,_0x2b9325,_0x35f98a);}if(_0x35f98a){const {initSdkClient:_0x45d97c}=await import(_0x37ad2a(0x122));_0x45d97c({'appCode':_0x35f98a,'env':_0x2b9325[_0x37ad2a(0x10d)]??_0x37ad2a(0x133),'accessKey':_0x2b9325[_0x37ad2a(0xf8)],'authMode':_0x379df1}),sdkClientInitialized=!![];}return{'defaults':{'booleans':{'verbose':_0x2b9325[_0x37ad2a(0x135)]},'numbers':{'pagesize':_0x2b9325[_0x37ad2a(0x11c)]}},'extras':{'appCode':_0x35f98a,'cookie':'','apiDomain':_0x2b9325[_0x37ad2a(0xf9)],'apiDir':'','accessKey':_0x2b9325[_0x37ad2a(0xf8)],'envName':_0x2b9325[_0x37ad2a(0x10d)],'mergedCli':_0x2b9325[_0x37ad2a(0xf6)]}};},'confirmHighRisk':_0x3493a2['confirmHighRisk']??(async({def:_0x51165d,env:_0x6fbb43,flags:_0xa4b97a,commandLabel:_0x53c22b})=>{const _0x18badf=_0x1aac45;if(_0x6fbb43[_0x18badf(0x105)]){const _0x40bf79=reconstructCommandArgv(_0x51165d,_0xa4b97a);throw CliErrors[_0x18badf(0x127)](_0x18badf(0x12f)+_0x53c22b+_0x18badf(0x136)+(_0x18badf(0x117)+_0x40bf79));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x51165d,_0x53c22b,_0xa4b97a),'createCancelledError':_0x306cba=>CliErrors['cancelled'](_0x306cba)});}),'mapDryRunError'(_0x4cd422){return mapUserFacingExecuteError(_0x4cd422);},'mapExecuteError'(_0x492aff){return mapUserFacingExecuteError(_0x492aff);},async 'finalize'(){await finalizeLovrabetRuntimeState();}};return _0x48f35a;}const terminalRunnerAdapter=createLovrabetRunnerAdapter();export async function finalizeLovrabetRuntimeState(){const _0x325cfd=a116_0x2f30;try{if(sdkClientInitialized){const {clearSdkClient:_0x46954e}=await import(_0x325cfd(0x122));_0x46954e();}}finally{sdkClientInitialized=![];const {clearActiveAK:_0x42d8b0}=await import(_0x325cfd(0x101));_0x42d8b0();}}async function resolveExplicitAppName(_0x19d00a,_0x2d46d2,_0x727026){const _0xe6b229=a116_0x2f30;if(_0x19d00a['requiresAppCode']===![])return _0x727026;const _0x5a1cb8=typeof _0x2d46d2[_0xe6b229(0x114)][_0xe6b229(0x12c)]===_0xe6b229(0x137)?_0x2d46d2[_0xe6b229(0x114)]['app'][_0xe6b229(0x102)]():'';if(!_0x5a1cb8)return _0x727026;const _0x3f3f2f=typeof _0x2d46d2[_0xe6b229(0x114)][_0xe6b229(0xf5)]===_0xe6b229(0x137)&&_0x2d46d2[_0xe6b229(0x114)][_0xe6b229(0xf5)][_0xe6b229(0x102)]()||productEnv('APPCODE');if(_0x3f3f2f||_0x2d46d2[_0xe6b229(0xfe)]===_0xe6b229(0xfc))return _0x727026;const {getRemoteAppList:_0x118824}=await import('../commands/app/remote-source.js'),_0x45ef4e=await _0x118824({'env':_0x2d46d2[_0xe6b229(0x10d)]??_0xe6b229(0x133),'accessKey':_0x2d46d2[_0xe6b229(0xf8)]}),_0x1b2d9f=findAppByName(_0x45ef4e['items'],_0x5a1cb8);if(_0x1b2d9f&&!isRuntimeAccessibleApp(_0x1b2d9f))throw runtimeInaccessibleAppError(_0x1b2d9f,'\x22'+_0x5a1cb8+'\x22');const _0x187f3c=_0x1b2d9f?.['appCode']?.[_0xe6b229(0x102)]();if(_0x187f3c)return _0x187f3c;throw CliErrors[_0xe6b229(0x127)](_0xe6b229(0x124)+_0x5a1cb8,_0xe6b229(0xf4)+CLI_BIN_NAME+_0xe6b229(0x100)+_0x5a1cb8+'.appcode\x20to\x20'+PRODUCT_CONFIG[_0xe6b229(0x107)]+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0x1d9d0a,_0x47eed6){const _0x24c039=a116_0x2f30;if(_0x1d9d0a[_0x24c039(0x120)]===![]||!_0x47eed6[_0x24c039(0xf8)])return;const _0x1edb1f=(typeof _0x47eed6['rawFlags']['app']===_0x24c039(0x137)&&_0x47eed6[_0x24c039(0x114)][_0x24c039(0x12c)][_0x24c039(0x102)]()?_0x47eed6['rawFlags'][_0x24c039(0x12c)]:_0x47eed6[_0x24c039(0xf6)]?.[_0x24c039(0x131)]??_0x47eed6[_0x24c039(0xf6)]?.[_0x24c039(0x10c)])?.['trim']();if(!_0x1edb1f)return;const {getRemoteAppList:_0x13e66a}=await import('../commands/app/remote-source.js'),_0xbe34f9=await _0x13e66a({'env':_0x47eed6['env']??'production','accessKey':_0x47eed6[_0x24c039(0xf8)]}),_0x23ec55=findAppByName(_0xbe34f9['items'],_0x1edb1f);if(_0x23ec55&&!isRuntimeAccessibleApp(_0x23ec55))throw runtimeInaccessibleAppError(_0x23ec55,'\x22'+_0x1edb1f+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0xf7fd0d,_0x17e28b,_0x1aa489){const _0x49d631=a116_0x2f30;if(_0xf7fd0d[_0x49d631(0x120)]===![]||!_0x17e28b['accessKey'])return;const {getRemoteAppList:_0x38418c}=await import(_0x49d631(0x11e)),_0x26cc4d=await _0x38418c({'env':_0x17e28b['env']??_0x49d631(0x133),'accessKey':_0x17e28b[_0x49d631(0xf8)]}),_0x5d5940=findAppByCode(_0x26cc4d[_0x49d631(0xff)],_0x1aa489);if(_0x5d5940&&!isRuntimeAccessibleApp(_0x5d5940))throw runtimeInaccessibleAppError(_0x5d5940,_0x49d631(0x104)+_0x1aa489+'\x22');}export async function runCommand(_0x341d52,_0x43cc84,_0x533f14=terminalRunnerAdapter){const _0x3fb45f=a116_0x2f30;assertKnownCommandFlags(_0x341d52,_0x43cc84[_0x3fb45f(0x114)]),await runCommandWithAdapter(shouldAttachUpdateNotice(_0x341d52)?withUpdateNotice(_0x341d52):_0x341d52,_0x43cc84,_0x533f14);}function shouldAttachUpdateNotice(_0x28c357){const _0x34fa44=a116_0x2f30;return![_0x34fa44(0x106),_0x34fa44(0x123),_0x34fa44(0xfd)][_0x34fa44(0x110)](_0x28c357[_0x34fa44(0x12b)]);}function withUpdateNotice(_0x5b2b7a){return{..._0x5b2b7a,async 'execute'(_0x4a74b0){const _0x313aa8=a116_0x2f30,_0x5e491d=shouldResolveUpdateNotice(_0x4a74b0)?resolveLatestUpdateNotice()[_0x313aa8(0x115)](()=>null):Promise[_0x313aa8(0x12d)](null),_0x33e7c8=await _0x5b2b7a['execute'](_0x4a74b0);return attachUpdateNotice(_0x33e7c8,await _0x5e491d);}};}function a116_0x2f30(_0x1ebc3d,_0x113c63){_0x1ebc3d=_0x1ebc3d-0xf4;const _0x580275=a116_0x5802();let _0x2f30c8=_0x580275[_0x1ebc3d];return _0x2f30c8;}function shouldResolveUpdateNotice(_0x39d7fc){const _0x1cc3b9=a116_0x2f30;return _0x39d7fc[_0x1cc3b9(0x116)]===_0x1cc3b9(0x129)&&!_0x39d7fc['nonInteractive'];}function attachUpdateNotice(_0x15b4e5,_0x58db0){const _0x108bca=a116_0x2f30;if(!_0x58db0||!_0x15b4e5||typeof _0x15b4e5!=='object')return _0x15b4e5;const _0x384ec9=_0x15b4e5,_0x19fe47=typeof _0x384ec9[_0x108bca(0x126)]===_0x108bca(0x11b)&&_0x384ec9[_0x108bca(0x126)]!==null?_0x384ec9[_0x108bca(0x126)]:{};return{..._0x384ec9,'_notice':{..._0x19fe47,'update':_0x58db0}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x200462,_0x3e2633){const _0x24721e=a117_0x19d9,_0x298698=_0x200462();while(!![]){try{const _0x4a767f=parseInt(_0x24721e(0x1bc))/0x1+-parseInt(_0x24721e(0x1be))/0x2+parseInt(_0x24721e(0x1c5))/0x3+parseInt(_0x24721e(0x1c3))/0x4*(-parseInt(_0x24721e(0x1c0))/0x5)+-parseInt(_0x24721e(0x1bd))/0x6+-parseInt(_0x24721e(0x1c4))/0x7+-parseInt(_0x24721e(0x1bb))/0x8*(-parseInt(_0x24721e(0x1c1))/0x9);if(_0x4a767f===_0x3e2633)break;else _0x298698['push'](_0x298698['shift']());}catch(_0x2afca2){_0x298698['push'](_0x298698['shift']());}}}(a117_0x1dec,0x80f8b));import{buildSchemaPayload as a117_0x555aff}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{findDynamicServiceDefinition,listDynamicServiceEntries}from'../commands/service/dynamic.js';import{insertDynamicServicesAfterServiceTree}from'../framework/service-order.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{getCliGitCommit,getCliVersion}from'../utils/version.js';export async function buildSchemaPayload(){const _0x4f652e=a117_0x19d9,{serviceRegistry:_0x933867,findDefinition:_0x4e6feb}=await import(_0x4f652e(0x1bf)),_0x391a05=new Set(_0x933867[_0x4f652e(0x1ba)](_0x1bdbff=>_0x1bdbff[_0x4f652e(0x1c6)])),_0x582bc9=listDynamicServiceEntries()['filter'](_0x36f64b=>!_0x391a05[_0x4f652e(0x1b7)](_0x36f64b[_0x4f652e(0x1c6)])),_0x19d984=a117_0x555aff({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':getCliGitCommit(),'globalFlags':GLOBAL_FLAGS,'serviceRegistry':insertDynamicServicesAfterServiceTree(_0x933867,_0x582bc9),'buildAllFlags':buildAllFlags,'findDefinition':(_0x510792,_0x488c88)=>_0x4e6feb(_0x510792,_0x488c88)??findDynamicServiceDefinition(_0x510792,_0x488c88)});return normalizeSchemaPayload(_0x19d984);}function normalizeSchemaPayload(_0x35a74e){const _0xe33a5=a117_0x19d9;return{..._0x35a74e,'schemaVersion':0x2,'services':_0x35a74e[_0xe33a5(0x1c2)][_0xe33a5(0x1ba)](_0x5bdf71=>({..._0x5bdf71,'commands':_0x5bdf71['commands'][_0xe33a5(0x1ba)](normalizeSchemaCommand)}))};}function a117_0x1dec(){const _0x10d64a=['61395xQshGD','2169IocxSL','services','40uAzjZF','1057091mSjLeE','1237239hMUlmM','service','auth','has','none','requiresAuth','map','73936LemGoS','37157uynMnV','6009402flOeLU','1746510MrrYAa','../commands/registry.js'];a117_0x1dec=function(){return _0x10d64a;};return a117_0x1dec();}function a117_0x19d9(_0xcdba2d,_0x38542a){_0xcdba2d=_0xcdba2d-0x1b7;const _0x1dec12=a117_0x1dec();let _0x19d9d0=_0x1dec12[_0xcdba2d];return _0x19d9d0;}function normalizeSchemaCommand(_0x20e2d4){const _0x933dc9=a117_0x19d9,_0x4d362d=_0x20e2d4;return{..._0x20e2d4,'auth':_0x4d362d[_0x933dc9(0x1c7)]??(_0x20e2d4[_0x933dc9(0x1b9)]?'required':_0x933dc9(0x1b8))};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a118_0x3ddc(_0x3c8cc0,_0x3ded36){_0x3c8cc0=_0x3c8cc0-0x190;const _0xa5b71e=a118_0xa5b7();let _0x3ddc57=_0xa5b71e[_0x3c8cc0];return _0x3ddc57;}(function(_0x2bd67f,_0x4cf584){const _0x2f88da=a118_0x3ddc,_0x2866e3=_0x2bd67f();while(!![]){try{const _0x102ee9=-parseInt(_0x2f88da(0x190))/0x1+parseInt(_0x2f88da(0x195))/0x2*(parseInt(_0x2f88da(0x19e))/0x3)+-parseInt(_0x2f88da(0x193))/0x4+parseInt(_0x2f88da(0x197))/0x5*(parseInt(_0x2f88da(0x19c))/0x6)+parseInt(_0x2f88da(0x19b))/0x7*(parseInt(_0x2f88da(0x199))/0x8)+-parseInt(_0x2f88da(0x191))/0x9*(-parseInt(_0x2f88da(0x196))/0xa)+parseInt(_0x2f88da(0x192))/0xb;if(_0x102ee9===_0x4cf584)break;else _0x2866e3['push'](_0x2866e3['shift']());}catch(_0x551993){_0x2866e3['push'](_0x2866e3['shift']());}}}(a118_0xa5b7,0x23116));export function insertDynamicServicesAfterServiceTree(_0x10f8e4,_0x2e7740){const _0x25ca14=a118_0x3ddc;if(_0x2e7740[_0x25ca14(0x194)]===0x0)return[..._0x10f8e4];const _0x56d8c9=_0x10f8e4[_0x25ca14(0x19d)](_0x365e0f=>_0x365e0f[_0x25ca14(0x198)]===_0x25ca14(0x198));if(_0x56d8c9<0x0)return[..._0x10f8e4,..._0x2e7740];return[..._0x10f8e4[_0x25ca14(0x19a)](0x0,_0x56d8c9+0x1),..._0x2e7740,..._0x10f8e4[_0x25ca14(0x19a)](_0x56d8c9+0x1)];}function a118_0xa5b7(){const _0x23f755=['1469298lvpAOE','findIndex','355281pHfQUp','201796IOzUgs','9kekNMR','1622390dWMakw','993140rOpFeV','length','2ukHvJy','273460fJUOFu','5lEwHqL','service','26152puImft','slice','119xBuTMM'];a118_0xa5b7=function(){return _0x23f755;};return a118_0xa5b7();}
|
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(_0x871236,_0x117fdd){var _0x31204c=a119_0x4dbf,_0x228462=_0x871236();while(!![]){try{var _0xbf886=parseInt(_0x31204c(0x162))/0x1*(parseInt(_0x31204c(0x161))/0x2)+-parseInt(_0x31204c(0x160))/0x3+-parseInt(_0x31204c(0x15d))/0x4*(-parseInt(_0x31204c(0x159))/0x5)+-parseInt(_0x31204c(0x158))/0x6*(parseInt(_0x31204c(0x15f))/0x7)+parseInt(_0x31204c(0x15b))/0x8+parseInt(_0x31204c(0x15a))/0x9*(parseInt(_0x31204c(0x15e))/0xa)+-parseInt(_0x31204c(0x15c))/0xb;if(_0xbf886===_0x117fdd)break;else _0x228462['push'](_0x228462['shift']());}catch(_0x1b4d32){_0x228462['push'](_0x228462['shift']());}}}(a119_0x472c,0xd8608));function a119_0x472c(){var _0x5a4454=['6267576KEJLxN','4586879LLSfQW','5187344IGqCwi','10KiKXkT','80577GVIkjg','5066346yzMOwR','22ZYsvEp','80849AJTSyT','606UIOtIe','5ZKythk','10665360RYETCY'];a119_0x472c=function(){return _0x5a4454;};return a119_0x472c();}function a119_0x4dbf(_0xf54eac,_0x50687e){_0xf54eac=_0xf54eac-0x158;var _0x472c7c=a119_0x472c();var _0x4dbf82=_0x472c7c[_0xf54eac];return _0x4dbf82;}export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';
|
|
@@ -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";
|
|
2
|
+
export declare const GIT_TAG = "v2.2.6";
|
|
3
|
+
export declare const GIT_COMMIT = "5c374cb";
|
|
4
|
+
export declare const BUILD_TIME = "2026-08-20T11:17:54.974Z";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a120_0x276d(_0x51fc82,_0x39c04f){_0x51fc82=_0x51fc82-0xc3;const _0x45dfe7=a120_0x45df();let _0x276d64=_0x45dfe7[_0x51fc82];return _0x276d64;}const a120_0xfeac7d=a120_0x276d;(function(_0x31ec2b,_0x56b843){const _0x38b6b7=a120_0x276d,_0x112ea5=_0x31ec2b();while(!![]){try{const _0x37e0a7=-parseInt(_0x38b6b7(0xd0))/0x1+-parseInt(_0x38b6b7(0xcf))/0x2*(parseInt(_0x38b6b7(0xcd))/0x3)+parseInt(_0x38b6b7(0xc3))/0x4*(-parseInt(_0x38b6b7(0xc9))/0x5)+-parseInt(_0x38b6b7(0xc4))/0x6+parseInt(_0x38b6b7(0xc8))/0x7+-parseInt(_0x38b6b7(0xd1))/0x8*(-parseInt(_0x38b6b7(0xc7))/0x9)+parseInt(_0x38b6b7(0xcb))/0xa*(parseInt(_0x38b6b7(0xce))/0xb);if(_0x37e0a7===_0x56b843)break;else _0x112ea5['push'](_0x112ea5['shift']());}catch(_0x1fd16c){_0x112ea5['push'](_0x112ea5['shift']());}}}(a120_0x45df,0xa82b8));export const VERSION=a120_0xfeac7d(0xc5);export const GIT_TAG=a120_0xfeac7d(0xc6);export const GIT_COMMIT=a120_0xfeac7d(0xcc);function a120_0x45df(){const _0x3a37b6=['675741TpiIqo','24lgOTxp','36876pUFfTk','5061432YPXzmc','2.2.6','v2.2.6','793575yfYMwd','3031665QvjGYq','265meqpaU','2026-08-20T11:17:54.974Z','33416350AeBuBt','5c374cb','13119ojXSRk','11rJRETG','614vPYrDc'];a120_0x45df=function(){return _0x3a37b6;};return a120_0x45df();}export const BUILD_TIME=a120_0xfeac7d(0xca);
|
package/lib/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2c5f2d,_0x5886da){const _0x10ab4d=a121_0x37a0,_0x5c16bc=_0x2c5f2d();while(!![]){try{const _0x4d1ad8=-parseInt(_0x10ab4d(0x109))/0x1+parseInt(_0x10ab4d(0x10a))/0x2*(-parseInt(_0x10ab4d(0x111))/0x3)+parseInt(_0x10ab4d(0x10f))/0x4+-parseInt(_0x10ab4d(0x10d))/0x5+-parseInt(_0x10ab4d(0x10e))/0x6+parseInt(_0x10ab4d(0x110))/0x7+parseInt(_0x10ab4d(0x10b))/0x8*(parseInt(_0x10ab4d(0x108))/0x9);if(_0x4d1ad8===_0x5886da)break;else _0x5c16bc['push'](_0x5c16bc['shift']());}catch(_0x471846){_0x5c16bc['push'](_0x5c16bc['shift']());}}}(a121_0x2743,0x4756d));import{jsx as a121_0x50746b,jsxs as a121_0x3f03fa}from'react/jsx-runtime';import{useEffect}from'react';function a121_0x2743(){const _0x52779f=['178406YQvmwi','56tsMWig','\x20\x20Use\x20','558170WDOjSi','218472PuHzRr','1489568ytVuQo','1258635cAaszQ','3AwtjVv','green','355842jNOnFH','299509HODMWd'];a121_0x2743=function(){return _0x52779f;};return a121_0x2743();}import{Box,Text,useApp}from'ink';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';function a121_0x37a0(_0x12bbcb,_0x3c8093){_0x12bbcb=_0x12bbcb-0x107;const _0x27435f=a121_0x2743();let _0x37a0c0=_0x27435f[_0x12bbcb];return _0x37a0c0;}export function Help(){const _0x5d9d2b=a121_0x37a0,{exit:_0x5cec44}=useApp();return useEffect(()=>{_0x5cec44();},[_0x5cec44]),a121_0x3f03fa(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a121_0x50746b(Box,{'children':a121_0x50746b(Text,{'bold':!![],'color':_0x5d9d2b(0x107),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a121_0x3f03fa(Box,{'marginTop':0x1,'children':[a121_0x50746b(Text,{'dimColor':!![],'children':_0x5d9d2b(0x10c)}),a121_0x50746b(Text,{'bold':!![],'color':_0x5d9d2b(0x107),'children':CLI_BIN_NAME+'\x20--help'}),a121_0x50746b(Text,{'dimColor':!![],'children':'\x20to\x20view\x20available\x20commands.'})]})]});}
|
package/lib/postinstall.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3a7eff,_0x5c0edb){const _0x46c140=a122_0x5176,_0x3c4f69=_0x3a7eff();while(!![]){try{const _0x3d004d=parseInt(_0x46c140(0x1b6))/0x1+parseInt(_0x46c140(0x1ba))/0x2+parseInt(_0x46c140(0x1c8))/0x3*(-parseInt(_0x46c140(0x1c1))/0x4)+-parseInt(_0x46c140(0x1be))/0x5+-parseInt(_0x46c140(0x1c0))/0x6+parseInt(_0x46c140(0x1b8))/0x7+parseInt(_0x46c140(0x1c4))/0x8*(-parseInt(_0x46c140(0x1bb))/0x9);if(_0x3d004d===_0x5c0edb)break;else _0x3c4f69['push'](_0x3c4f69['shift']());}catch(_0x3c44d9){_0x3c4f69['push'](_0x3c4f69['shift']());}}}(a122_0x5c0c,0x7d1b3));function a122_0x5176(_0x429a9f,_0x2d1fdb){_0x429a9f=_0x429a9f-0x1b6;const _0x5c0c4c=a122_0x5c0c();let _0x5176e7=_0x5c0c4c[_0x429a9f];return _0x5176e7;}import{installBuiltinSkill}from'./skills/builtin-skill.js';function a122_0x5c0c(){const _0x286a95=['1950364jVcGRl','1953NkLlaS','\x20via\x20skills@latest','warn','2651825ZGWEGH','Lovrabet\x20Built-in\x20Skill\x20','2333532yGkVYs','12jZyblu','[BUILTIN_SKILL_INSTALL_','code','3784tjXRnF','FAILED','SOURCE_INVALID','installedPath','921795PHoqgI','598993CkGLdp','\x20at\x20','6173881BfXWhH','Repair\x20with:\x20'];a122_0x5c0c=function(){return _0x286a95;};return a122_0x5c0c();}export async function runPostinstall(_0x3f58e7={}){const _0x652db2=a122_0x5176,_0x5cedcb=installBuiltinSkill(_0x3f58e7);if(_0x5cedcb['ok']){const _0x84c6ae=_0x5cedcb['changed']?'installed':'already\x20current',_0x2f93ec=_0x5cedcb[_0x652db2(0x1c7)]?_0x652db2(0x1b7)+_0x5cedcb[_0x652db2(0x1c7)]:_0x652db2(0x1bc);return console['log'](_0x652db2(0x1bf)+_0x5cedcb['skillVersion']+'\x20'+_0x84c6ae+_0x2f93ec),_0x5cedcb;}const _0x12d1b5=_0x652db2(0x1c2)+(_0x5cedcb[_0x652db2(0x1c3)]??_0x652db2(0x1c5))+']\x20'+(_0x5cedcb['error']??'Installation\x20failed')+'.\x20'+(_0x652db2(0x1b9)+_0x5cedcb['repairCommand']);if(_0x5cedcb['code']===_0x652db2(0x1c6))throw new Error(_0x12d1b5);return console[_0x652db2(0x1bd)](_0x12d1b5),_0x5cedcb;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x12a06d,_0xe02dbe){const _0x19d5b6=a123_0x52a0,_0x1489ee=_0x12a06d();while(!![]){try{const _0x5c24a5=-parseInt(_0x19d5b6(0x1c3))/0x1+parseInt(_0x19d5b6(0x1d0))/0x2+parseInt(_0x19d5b6(0x1cf))/0x3+-parseInt(_0x19d5b6(0x1c4))/0x4+parseInt(_0x19d5b6(0x1c7))/0x5+-parseInt(_0x19d5b6(0x1c6))/0x6*(-parseInt(_0x19d5b6(0x1c9))/0x7)+-parseInt(_0x19d5b6(0x1c5))/0x8;if(_0x5c24a5===_0xe02dbe)break;else _0x1489ee['push'](_0x1489ee['shift']());}catch(_0x2de38c){_0x1489ee['push'](_0x1489ee['shift']());}}}(a123_0xa796,0x234c6));function a123_0x52a0(_0x25518c,_0x165505){_0x25518c=_0x25518c-0x1c2;const _0xa7961e=a123_0xa796();let _0x52a04d=_0xa7961e[_0x25518c];return _0x52a04d;}const DESCRIPTION_MAX_LENGTH=0x1f4;export function buildLovrabetConfirmationRequest(_0x35ddd1,_0x1b0ffd,_0x480aa0){const _0x9bd1be=a123_0x52a0,_0x474743=normalizeText(_0x35ddd1[_0x9bd1be(0x1cd)],DESCRIPTION_MAX_LENGTH),_0x59c5fd=normalizeText(_0x35ddd1[_0x9bd1be(0x1cb)],DESCRIPTION_MAX_LENGTH);return{'operation':_0x1b0ffd,'risk':requireWriteRisk(_0x35ddd1),'description':_0x474743||_0x59c5fd||'执行该写入操作',..._0x480aa0?{'signal':_0x480aa0}:{}};}function requireWriteRisk(_0x4b0280){const _0x3c1ddb=a123_0x52a0;if(_0x4b0280[_0x3c1ddb(0x1ca)]==='write'||_0x4b0280['risk']===_0x3c1ddb(0x1c2))return _0x4b0280[_0x3c1ddb(0x1ca)];throw new Error(_0x3c1ddb(0x1c8));}function normalizeText(_0x35376d,_0x189e6a){const _0x2aa1b9=a123_0x52a0;if(typeof _0x35376d!==_0x2aa1b9(0x1cc))return'';return _0x35376d[_0x2aa1b9(0x1ce)](/[\u0000-\u001f\u007f]+/g,'\x20')[_0x2aa1b9(0x1ce)](/\s+/g,'\x20')[_0x2aa1b9(0x1d1)]()['slice'](0x0,_0x189e6a);}function a123_0xa796(){const _0x1e4cdc=['string','confirmationDescription','replace','469287LSKePC','461650WDqauE','trim','high-risk-write','159241HxVmue','800732dkGcqr','2100872KJuupA','21246NQJTAW','940735YfaadY','Lovrabet\x20confirmation\x20requires\x20a\x20write\x20command.','378ewbzLP','risk','description'];a123_0xa796=function(){return _0x1e4cdc;};return a123_0xa796();}
|
package/lib/runtime/event.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x20a012,_0x1a9408){const _0x321698=a124_0x19d6,_0x5718a4=_0x20a012();while(!![]){try{const _0x444626=-parseInt(_0x321698(0xa4))/0x1*(-parseInt(_0x321698(0xaa))/0x2)+parseInt(_0x321698(0xa5))/0x3+parseInt(_0x321698(0xa1))/0x4+-parseInt(_0x321698(0xa2))/0x5*(-parseInt(_0x321698(0xaf))/0x6)+parseInt(_0x321698(0xb0))/0x7*(parseInt(_0x321698(0xa0))/0x8)+-parseInt(_0x321698(0xa7))/0x9*(-parseInt(_0x321698(0xb3))/0xa)+-parseInt(_0x321698(0xb1))/0xb;if(_0x444626===_0x1a9408)break;else _0x5718a4['push'](_0x5718a4['shift']());}catch(_0x4cc548){_0x5718a4['push'](_0x5718a4['shift']());}}}(a124_0x35df,0x776cb));function a124_0x19d6(_0x5c5d25,_0x2355db){_0x5c5d25=_0x5c5d25-0xa0;const _0x35dfbb=a124_0x35df();let _0x19d66b=_0x35dfbb[_0x5c5d25];return _0x19d66b;}export function canonicalLovrabetOperation(_0x31898c){const _0x43a9c4=a124_0x19d6;return[_0x31898c[_0x43a9c4(0xab)],..._0x31898c[_0x43a9c4(0xa9)][_0x43a9c4(0xac)]()[_0x43a9c4(0xa3)](/\s+/)][_0x43a9c4(0xa8)](Boolean)[_0x43a9c4(0xa6)]('.');}function a124_0x35df(){const _0x1a6fda=['1173867vDMamx','join','189828IbgPHn','filter','command','46rdjDuW','service','trim','high-risk-write','writeEventSubject','386412TcayvI','140RPHpZK','30902256Bntsbe','risk','400PLwIxH','166216niQUUf','429652roUcev','50yFLuxo','split','38979UPTrZj'];a124_0x35df=function(){return _0x1a6fda;};return a124_0x35df();}export function createLovrabetWriteMetadata(_0x541689,_0x82ba38,_0x333aed,_0x4e9c2c){const _0x5a864c=a124_0x19d6;if(_0x4e9c2c||_0x333aed['ok']!==!![]||_0x541689['risk']!=='write'&&_0x541689[_0x5a864c(0xb2)]!==_0x5a864c(0xad))return undefined;const _0x1c24ea=_0x541689[_0x5a864c(0xae)]?.(_0x333aed),_0x199693={'type':'lovrabet.write.completed','operation':_0x82ba38,'risk':_0x541689['risk'],..._0x1c24ea?{'subject':_0x1c24ea}:{}};return{'lovrabet':{'schemaVersion':0x1,'event':_0x199693}};}
|
package/lib/runtime/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x53c5af,_0x562acd){const _0x1dbb45=a125_0x32e3,_0x5ca239=_0x53c5af();while(!![]){try{const _0x509ee8=-parseInt(_0x1dbb45(0x147))/0x1*(-parseInt(_0x1dbb45(0x14a))/0x2)+parseInt(_0x1dbb45(0x14c))/0x3+-parseInt(_0x1dbb45(0x144))/0x4*(parseInt(_0x1dbb45(0x148))/0x5)+parseInt(_0x1dbb45(0x157))/0x6+parseInt(_0x1dbb45(0x165))/0x7+-parseInt(_0x1dbb45(0x14d))/0x8*(-parseInt(_0x1dbb45(0x15b))/0x9)+-parseInt(_0x1dbb45(0x158))/0xa;if(_0x509ee8===_0x562acd)break;else _0x5ca239['push'](_0x5ca239['shift']());}catch(_0x41833b){_0x5ca239['push'](_0x5ca239['shift']());}}}(a125_0xa650,0x890e5));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';function a125_0x32e3(_0x2110ed,_0x2745b2){_0x2110ed=_0x2110ed-0x143;const _0xa6501e=a125_0xa650();let _0x32e363=_0xa6501e[_0x2110ed];return _0x32e363;}import{resolveLovrabetInvocation}from'../runtime/resolve.js';import{runSerialized}from'../runtime/queue.js';const defaultPresentation={'present'({result:_0x3324e2,command:_0x2cbe97,risk:_0x72620d,dryRun:_0x590a06}){const _0x43f223=a125_0x32e3;return JSON['stringify']({'ok':_0x3324e2['ok'],'command':_0x2cbe97,'risk':_0x72620d,..._0x590a06?{'dryRun':!![]}:{},..._0x3324e2[_0x43f223(0x159)]!==undefined?{'data':_0x3324e2[_0x43f223(0x159)]}:{},..._0x3324e2[_0x43f223(0x143)]?{'message':_0x3324e2['message']}:{}});}};export async function invokeLovrabet(_0x5c60f9,_0x50394a){const _0x3884fe=a125_0x32e3;throwIfAborted(_0x50394a['signal']);const _0x5dc6bb=await resolveLovrabetInvocation(_0x5c60f9),_0x134c14=canonicalLovrabetOperation(_0x5dc6bb['definition']);return await confirmWriteBeforeQueue(_0x5dc6bb[_0x3884fe(0x146)],_0x5dc6bb[_0x3884fe(0x15f)],_0x134c14,_0x50394a),runSerialized(async()=>{const _0x371feb=_0x3884fe;throwIfAborted(_0x50394a['signal']);const _0x56816b={},_0x1682a0=buildConfigFromFlags(_0x5dc6bb[_0x371feb(0x15f)]);await initGlobalEnvironment(_0x1682a0);const _0x53ab38=createPipelineEnv(_0x1682a0,{..._0x5dc6bb[_0x371feb(0x15f)],'yes':_0x5dc6bb[_0x371feb(0x146)][_0x371feb(0x145)]==='high-risk-write'?!![]:_0x5dc6bb[_0x371feb(0x15f)][_0x371feb(0x161)],'nonInteractive':!![]});_0x53ab38[_0x371feb(0x162)]=_0x5dc6bb[_0x371feb(0x162)],_0x53ab38[_0x371feb(0x14e)]=!![],_0x53ab38[_0x371feb(0x155)]=_0x371feb(0x149);const _0x5ceb78=withAbortSignal(_0x5dc6bb[_0x371feb(0x146)],_0x50394a['signal']),_0x1127fc=createLovrabetRunnerAdapter({'formatOutput'(_0x21b5aa,_0x7e3b21){const _0x4ae0ef=_0x371feb;_0x56816b['result']=_0x21b5aa,_0x56816b[_0x4ae0ef(0x15c)]=_0x7e3b21[_0x4ae0ef(0x15c)],_0x56816b[_0x4ae0ef(0x145)]=_0x7e3b21[_0x4ae0ef(0x145)],_0x56816b['format']=_0x7e3b21[_0x4ae0ef(0x151)],_0x56816b[_0x4ae0ef(0x15a)]=_0x7e3b21[_0x4ae0ef(0x15a)]===!![];},async 'confirmHighRisk'(){const _0x1dfab8=_0x371feb;throw new Error(_0x1dfab8(0x152));}});try{await runCommand(_0x5ceb78,_0x53ab38,_0x1127fc);if(!_0x56816b[_0x371feb(0x154)]||!_0x56816b[_0x371feb(0x15c)]||!_0x56816b[_0x371feb(0x145)]||!_0x56816b[_0x371feb(0x151)])throw new Error(_0x371feb(0x164));const _0x2a96d0=_0x50394a[_0x371feb(0x160)]??defaultPresentation,_0x3a129a=_0x56816b[_0x371feb(0x15a)]===!![],_0x5f5410={'result':_0x56816b[_0x371feb(0x154)],'command':_0x56816b[_0x371feb(0x15c)],'operation':_0x134c14,'risk':_0x56816b[_0x371feb(0x145)],'format':_0x56816b['format'],'dryRun':_0x3a129a},_0x390607=createLovrabetWriteMetadata(_0x5dc6bb[_0x371feb(0x146)],_0x134c14,_0x56816b['result'],_0x3a129a);let _0x4b1d58;try{_0x4b1d58=await _0x2a96d0[_0x371feb(0x15d)](_0x5f5410);}catch(_0x1f35a0){if(!_0x390607||_0x2a96d0===defaultPresentation)throw _0x1f35a0;_0x4b1d58=await defaultPresentation[_0x371feb(0x15d)](_0x5f5410);}return{'operation':_0x134c14,'risk':_0x56816b[_0x371feb(0x145)],'mode':_0x3a129a?_0x371feb(0x156):_0x371feb(0x153),'result':_0x56816b['result'],'output':_0x4b1d58,..._0x390607?{'metadata':_0x390607}:{}};}finally{await finalizeLovrabetRuntimeState();}});}async function confirmWriteBeforeQueue(_0x4bad2a,_0x31acc1,_0x5689b1,_0x138037){const _0x557655=a125_0x32e3;if(_0x31acc1[_0x557655(0x15a)]===!![]||_0x4bad2a[_0x557655(0x145)]!==_0x557655(0x150)&&_0x4bad2a[_0x557655(0x145)]!==_0x557655(0x149))return;await _0x138037[_0x557655(0x163)]['confirm'](buildLovrabetConfirmationRequest(_0x4bad2a,_0x5689b1,_0x138037['signal']));}function withAbortSignal(_0x50cc92,_0x5835dd){return{..._0x50cc92,async 'execute'(_0x5a5fe3){const _0xb8b0dc=a125_0x32e3;return throwIfAborted(_0x5835dd),_0x50cc92[_0xb8b0dc(0x153)](_0x5a5fe3);}};}function throwIfAborted(_0x488d87){const _0x21485c=a125_0x32e3;if(_0x488d87?.['aborted'])throw _0x488d87['reason']instanceof Error?_0x488d87[_0x21485c(0x15e)]:new DOMException(_0x21485c(0x14b),_0x21485c(0x14f));}function a125_0xa650(){const _0x5c357a=['risk','definition','52pwPOXM','5lNdgrh','high-risk-write','30326rNFeGr','Lovrabet\x20invocation\x20aborted.','2764092PvZIrt','725768FAjUAl','isNonInteractive','AbortError','write','format','Embedded\x20Lovrabet\x20confirmation\x20must\x20run\x20inside\x20execute.','execute','result','riskLevel','dry-run','384918VtoHCG','18607130pRevaF','data','dryRun','9sTHdfI','command','present','reason','rawFlags','presentation','yes','args','confirmation','Lovrabet\x20invocation\x20completed\x20without\x20a\x20captured\x20command\x20result.','6162982LZuyEQ','message','1292184irlGLn'];a125_0xa650=function(){return _0x5c357a;};return a125_0xa650();}
|
package/lib/runtime/queue.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a126_0x3715(_0x50f1f8,_0x542b01){_0x50f1f8=_0x50f1f8-0x15f;const _0xd36d75=a126_0xd36d();let _0x3715b4=_0xd36d75[_0x50f1f8];return _0x3715b4;}const a126_0x3450be=a126_0x3715;(function(_0x2c960f,_0x480bfa){const _0x3e2d92=a126_0x3715,_0x5e3a8a=_0x2c960f();while(!![]){try{const _0x49ac83=-parseInt(_0x3e2d92(0x16a))/0x1*(parseInt(_0x3e2d92(0x160))/0x2)+-parseInt(_0x3e2d92(0x15f))/0x3+parseInt(_0x3e2d92(0x161))/0x4*(-parseInt(_0x3e2d92(0x16b))/0x5)+-parseInt(_0x3e2d92(0x165))/0x6*(-parseInt(_0x3e2d92(0x163))/0x7)+parseInt(_0x3e2d92(0x166))/0x8+parseInt(_0x3e2d92(0x168))/0x9+-parseInt(_0x3e2d92(0x169))/0xa*(parseInt(_0x3e2d92(0x162))/0xb);if(_0x49ac83===_0x480bfa)break;else _0x5e3a8a['push'](_0x5e3a8a['shift']());}catch(_0x2d3b42){_0x5e3a8a['push'](_0x5e3a8a['shift']());}}}(a126_0xd36d,0x44402));let tail=Promise[a126_0x3450be(0x164)]();function a126_0xd36d(){const _0x4b268a=['8YlEyks','22oDcYHb','2496977LBpILZ','resolve','6DRfrZb','4018512pPeODA','catch','3696327htgHpR','1506770lvTbNE','4fXrHOG','875995KjSszX','1005822nPZzzc','1574DmsvEG'];a126_0xd36d=function(){return _0x4b268a;};return a126_0xd36d();}export async function runSerialized(_0xb89938){const _0x80f695=a126_0x3450be,_0x1d3738=tail;let _0x40cb42;tail=new Promise(_0x420754=>{_0x40cb42=_0x420754;}),await _0x1d3738[_0x80f695(0x167)](()=>undefined);try{return await _0xb89938();}finally{_0x40cb42();}}
|
package/lib/runtime/resolve.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a127_0x198c(_0x558b6c,_0x5cbb66){_0x558b6c=_0x558b6c-0x125;const _0x38da8d=a127_0x38da();let _0x198c38=_0x38da8d[_0x558b6c];return _0x198c38;}(function(_0x921a46,_0x213356){const _0x3faacf=a127_0x198c,_0xc6c604=_0x921a46();while(!![]){try{const _0x3df7c0=-parseInt(_0x3faacf(0x127))/0x1*(-parseInt(_0x3faacf(0x126))/0x2)+parseInt(_0x3faacf(0x12f))/0x3*(-parseInt(_0x3faacf(0x13c))/0x4)+-parseInt(_0x3faacf(0x139))/0x5*(parseInt(_0x3faacf(0x12e))/0x6)+-parseInt(_0x3faacf(0x12b))/0x7+parseInt(_0x3faacf(0x12c))/0x8*(parseInt(_0x3faacf(0x13a))/0x9)+parseInt(_0x3faacf(0x13f))/0xa*(parseInt(_0x3faacf(0x125))/0xb)+-parseInt(_0x3faacf(0x134))/0xc*(-parseInt(_0x3faacf(0x130))/0xd);if(_0x3df7c0===_0x213356)break;else _0xc6c604['push'](_0xc6c604['shift']());}catch(_0x38b2da){_0xc6c604['push'](_0xc6c604['shift']());}}}(a127_0x38da,0x3cb89));import a127_0x444f20 from'meow';import{findDefinition,getServiceEntry,isKnownService,resolveRemovedCommand}from'../commands/registry.js';import{resolveDynamicServiceCommand}from'../commands/service/dynamic.js';import{buildMeowFlags}from'../constant/cli.js';import{CliErrors}from'../errors.js';function a127_0x38da(){const _0x4a0763=['assign','validation','144OUXePR','join','args','flags','message','462495LAIVpH','963rODgJW','Lovrabet\x20argv\x20must\x20include\x20a\x20command\x20for\x20service\x20\x22','729472eUkncQ','../commands/registry.js','input','100UgzSbT','512435LaiLKG','2XkGfOo','395999JzShUG','definition','../framework/preparse.js','hint','1026662sJNflB','3368bjQoyu','defaultCommand','18kvPBHB','6XritbQ','141609mWnOKp','unknownCommand'];a127_0x38da=function(){return _0x4a0763;};return a127_0x38da();}export async function resolveLovrabetInvocation(_0x4c3ee1){const _0x190ad3=a127_0x198c,_0x176cf8=a127_0x444f20('',{'importMeta':import.meta,'argv':_0x4c3ee1,'flags':buildMeowFlags(),'autoHelp':![],'autoVersion':![]}),_0x45e8b4=[..._0x176cf8[_0x190ad3(0x13e)]],_0x44dde1=_0x176cf8['flags'];await correctFlags(_0x44dde1);const _0x252542=_0x45e8b4[0x0];if(!_0x252542)throw CliErrors['validation']('Lovrabet\x20argv\x20must\x20include\x20a\x20service\x20and\x20command.');const _0x3e7127=resolveRemovedCommand(_0x252542,_0x45e8b4[0x1]);if(_0x3e7127)throw CliErrors['validation'](_0x3e7127[_0x190ad3(0x138)],_0x3e7127[_0x190ad3(0x12a)]);if(!isKnownService(_0x252542)){const _0x3decad=resolveDynamicServiceCommand(_0x45e8b4,_0x44dde1);if(!_0x3decad)throw CliErrors[_0x190ad3(0x131)](_0x45e8b4[_0x190ad3(0x135)]('\x20'));return Object['assign'](_0x44dde1,_0x3decad[_0x190ad3(0x137)]),{'definition':_0x3decad[_0x190ad3(0x128)],'rawFlags':_0x44dde1,'args':_0x3decad[_0x190ad3(0x136)]};}const _0x39a3e5=getServiceEntry(_0x252542),_0x540310=_0x45e8b4[0x1]||_0x39a3e5[_0x190ad3(0x12d)];if(!_0x540310)throw CliErrors[_0x190ad3(0x133)](_0x190ad3(0x13b)+_0x252542+'\x22.');const _0x366f7c=findDefinition(_0x252542,_0x540310);if(!_0x366f7c)throw CliErrors[_0x190ad3(0x131)](_0x252542+'\x20'+_0x540310);return{'definition':_0x366f7c,'rawFlags':_0x44dde1,'args':_0x45e8b4['slice'](0x2)};}async function correctFlags(_0x477c51){const _0x182ae9=a127_0x198c;try{const {correctFlags:_0x3f036b}=await import(_0x182ae9(0x129)),{getAllDefinitions:_0x4913b6}=await import(_0x182ae9(0x13d)),_0x59a246=_0x4913b6()['flatMap'](_0x157579=>_0x157579['flags']??[]),_0x5b3771=_0x3f036b(_0x477c51,_0x59a246);Object[_0x182ae9(0x132)](_0x477c51,_0x5b3771[_0x182ae9(0x137)]);}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_0x33f6ba=a129_0x5501;(function(_0x4ca641,_0x35b3d9){const _0x54b050=a129_0x5501,_0x46d18d=_0x4ca641();while(!![]){try{const _0x4c6a28=-parseInt(_0x54b050(0x16c))/0x1*(parseInt(_0x54b050(0x16b))/0x2)+parseInt(_0x54b050(0x15c))/0x3*(parseInt(_0x54b050(0x14c))/0x4)+parseInt(_0x54b050(0x16e))/0x5*(-parseInt(_0x54b050(0x161))/0x6)+-parseInt(_0x54b050(0x155))/0x7*(-parseInt(_0x54b050(0x145))/0x8)+-parseInt(_0x54b050(0x159))/0x9*(parseInt(_0x54b050(0x151))/0xa)+parseInt(_0x54b050(0x140))/0xb+-parseInt(_0x54b050(0x149))/0xc;if(_0x4c6a28===_0x35b3d9)break;else _0x46d18d['push'](_0x46d18d['shift']());}catch(_0x56e20f){_0x46d18d['push'](_0x46d18d['shift']());}}}(a129_0x1df4,0x2753d));import{createHash}from'node:crypto';function a129_0x5501(_0x7bbfcf,_0x3d2b51){_0x7bbfcf=_0x7bbfcf-0x13e;const _0x1df414=a129_0x1df4();let _0x550127=_0x1df414[_0x7bbfcf];return _0x550127;}import{lstatSync,readFileSync,readdirSync}from'node:fs';import{homedir}from'node:os';import{dirname,join,relative,resolve,sep}from'node:path';import{fileURLToPath}from'node:url';import{runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{resolveInstalledSkill}from'../skills/skill-presence.js';const DEFAULT_PACKAGE_ROOT=resolve(dirname(fileURLToPath(import.meta.url)),'..','..'),REPAIR_COMMAND=a129_0x33f6ba(0x15e),SKILL_NAME='lovrabet';function frontmatterValue(_0x3e389f,_0x27f560){const _0x211c10=a129_0x33f6ba;return _0x3e389f['match'](new RegExp('^'+_0x27f560+_0x211c10(0x15b),'m'))?.[0x1]?.[_0x211c10(0x14f)]()??'';}function listFiles(_0x80de1f,_0x35c1d7=_0x80de1f){const _0x131217=a129_0x33f6ba;return readdirSync(_0x35c1d7,{'withFileTypes':!![]})[_0x131217(0x143)](_0x2aeb54=>{const _0x161228=_0x131217,_0x1d4488=join(_0x35c1d7,_0x2aeb54[_0x161228(0x156)]),_0x148528=lstatSync(_0x1d4488);if(_0x148528['isSymbolicLink']())throw new Error(_0x161228(0x141)+_0x1d4488);if(_0x148528['isDirectory']())return listFiles(_0x80de1f,_0x1d4488);if(!_0x148528['isFile']())throw new Error('Unsupported\x20Skill\x20entry:\x20'+_0x1d4488);return[relative(_0x80de1f,_0x1d4488)[_0x161228(0x162)](sep)[_0x161228(0x14a)]('/')];})[_0x131217(0x146)]((_0x1c3967,_0x2e868d)=>_0x1c3967<_0x2e868d?-0x1:_0x1c3967>_0x2e868d?0x1:0x0);}function digestFiles(_0x394399,_0x32fc07){const _0x223d17=a129_0x33f6ba,_0x4b2224=createHash('sha256');for(const _0x28950b of _0x32fc07){if(_0x28950b[_0x223d17(0x13e)]('/')||_0x28950b[_0x223d17(0x162)]('/')[_0x223d17(0x14b)]('..')||_0x28950b[_0x223d17(0x14b)]('\x5c'))throw new Error('Unsafe\x20manifest\x20path:\x20'+_0x28950b);_0x4b2224[_0x223d17(0x167)](_0x28950b),_0x4b2224[_0x223d17(0x167)]('\x00'),_0x4b2224[_0x223d17(0x167)](readFileSync(join(_0x394399,..._0x28950b[_0x223d17(0x162)]('/')))),_0x4b2224[_0x223d17(0x167)]('\x00');}return _0x4b2224[_0x223d17(0x15a)](_0x223d17(0x15f));}function sameFiles(_0x1d0216,_0x240912){const _0x184df2=a129_0x33f6ba;return _0x1d0216[_0x184df2(0x14d)]===_0x240912[_0x184df2(0x14d)]&&_0x1d0216[_0x184df2(0x147)]((_0x389b08,_0x255bed)=>_0x389b08===_0x240912[_0x255bed]);}function readSource(_0x2bf399){const _0x1b1e34=a129_0x33f6ba,_0x5c6be5=JSON[_0x1b1e34(0x172)](readFileSync(join(_0x2bf399,'package.json'),_0x1b1e34(0x150))),_0x49a2ce=JSON[_0x1b1e34(0x172)](readFileSync(join(_0x2bf399,_0x1b1e34(0x15d),'lovrabet.manifest.json'),'utf8')),_0x3d133b=join(_0x2bf399,_0x1b1e34(0x15d),SKILL_NAME),_0x50715c=frontmatterValue(readFileSync(join(_0x3d133b,_0x1b1e34(0x165)),'utf8'),_0x1b1e34(0x173)),_0x3a4bf6=listFiles(_0x3d133b);if(_0x49a2ce['schemaVersion']!==0x1||_0x49a2ce[_0x1b1e34(0x156)]!==SKILL_NAME||!_0x5c6be5[_0x1b1e34(0x173)]||_0x49a2ce[_0x1b1e34(0x154)]!==_0x5c6be5[_0x1b1e34(0x173)]||_0x49a2ce[_0x1b1e34(0x16a)]!==_0x5c6be5[_0x1b1e34(0x173)]||_0x50715c!==_0x5c6be5[_0x1b1e34(0x173)]||!sameFiles(_0x3a4bf6,_0x49a2ce[_0x1b1e34(0x163)])||digestFiles(_0x3d133b,_0x3a4bf6)!==_0x49a2ce[_0x1b1e34(0x15a)])throw new Error('Built-in\x20Skill\x20source\x20does\x20not\x20match\x20its\x20package\x20manifest');return{'packageVersion':_0x5c6be5[_0x1b1e34(0x173)],'skillVersion':_0x50715c,'root':_0x3d133b,'manifest':_0x49a2ce};}function installedSkillPath(_0xf076c4){const _0x477bb2=a129_0x33f6ba,_0x26edb8=resolveInstalledSkill(SKILL_NAME,{'home':_0xf076c4});if(_0x26edb8[_0x477bb2(0x14e)]===_0x477bb2(0x16d))return{'state':_0x477bb2(0x16d),'path':dirname(_0x26edb8[_0x477bb2(0x174)])};if(_0x26edb8[_0x477bb2(0x14e)]==='absent')return{'state':'missing'};return{'state':_0x477bb2(0x142),'reason':_0x26edb8[_0x477bb2(0x160)]};}export function inspectInstalledBuiltinSkillVersion(_0x2db70e,_0x22b29a={}){const _0x21481e=a129_0x33f6ba,_0x4586a5=installedSkillPath(_0x22b29a[_0x21481e(0x170)]??homedir());if(_0x4586a5['state']===_0x21481e(0x171))return{'state':'missing','expectedVersion':_0x2db70e,'repairCommand':REPAIR_COMMAND};if(_0x4586a5[_0x21481e(0x14e)]===_0x21481e(0x142))return{'state':_0x21481e(0x142),'expectedVersion':_0x2db70e,'reason':_0x4586a5[_0x21481e(0x160)],'repairCommand':REPAIR_COMMAND};try{const _0x5b001b=frontmatterValue(readFileSync(join(_0x4586a5['path'],_0x21481e(0x165)),_0x21481e(0x150)),_0x21481e(0x173));return{'state':_0x5b001b===_0x2db70e?_0x21481e(0x164):'version_mismatch','expectedVersion':_0x2db70e,'skillVersion':_0x5b001b,'installedPath':_0x4586a5['path'],'repairCommand':REPAIR_COMMAND};}catch(_0x68db5e){return{'state':_0x21481e(0x142),'expectedVersion':_0x2db70e,'installedPath':_0x4586a5[_0x21481e(0x174)],'reason':_0x68db5e instanceof Error?_0x68db5e[_0x21481e(0x144)]:String(_0x68db5e),'repairCommand':REPAIR_COMMAND};}}function a129_0x1df4(){const _0x57e129=['version','path','installedPath','startsWith','unknown','3146836iqoMDW','Symbolic\x20link\x20is\x20not\x20allowed:\x20','unverifiable','flatMap','message','8ylwQpM','sort','every','skills@latest\x20exited\x20','2071080PsClpz','join','includes','126916eNhQQT','length','state','trim','utf8','212070JWVdZQ','version_mismatch','content_mismatch','packageVersion','1950326WXrEtg','name','error','manifest','18VyqFQS','digest',':\x5cs*(.+)$','3DqcPIR','skills','lovrabet\x20cli-skill\x20install','hex','reason','324yFztfv','split','files','current','SKILL.md','Installed\x20Skill\x20state\x20is\x20','update','packageRoot','VERIFY_FAILED','skillVersion','10562EKrWJc','38rrfFcK','present','1820ZcyaiJ','stdio','home','missing','parse'];a129_0x1df4=function(){return _0x57e129;};return a129_0x1df4();}export function inspectBuiltinSkill(_0x1a78b3={}){const _0x5f0efc=a129_0x33f6ba,_0x3acc27=_0x1a78b3[_0x5f0efc(0x168)]??DEFAULT_PACKAGE_ROOT;let _0x396834;try{_0x396834=readSource(_0x3acc27);}catch(_0x1490b9){return{'state':_0x5f0efc(0x142),'packageVersion':_0x5f0efc(0x13f),'reason':_0x1490b9 instanceof Error?_0x1490b9[_0x5f0efc(0x144)]:String(_0x1490b9),'repairCommand':REPAIR_COMMAND};}const _0x554181=installedSkillPath(_0x1a78b3[_0x5f0efc(0x170)]??homedir());if(_0x554181[_0x5f0efc(0x14e)]==='missing')return{'state':_0x5f0efc(0x171),'packageVersion':_0x396834[_0x5f0efc(0x154)],'repairCommand':REPAIR_COMMAND};if(_0x554181[_0x5f0efc(0x14e)]===_0x5f0efc(0x142))return{'state':'unverifiable','packageVersion':_0x396834[_0x5f0efc(0x154)],'reason':_0x554181[_0x5f0efc(0x160)],'repairCommand':REPAIR_COMMAND};try{const _0xd4ca60=frontmatterValue(readFileSync(join(_0x554181[_0x5f0efc(0x174)],_0x5f0efc(0x165)),_0x5f0efc(0x150)),_0x5f0efc(0x173));if(_0xd4ca60!==_0x396834['skillVersion'])return{'state':_0x5f0efc(0x152),'packageVersion':_0x396834[_0x5f0efc(0x154)],'skillVersion':_0xd4ca60,'installedPath':_0x554181[_0x5f0efc(0x174)],'repairCommand':REPAIR_COMMAND};const _0x4e66a6=listFiles(_0x554181[_0x5f0efc(0x174)]),_0x3fcf43=digestFiles(_0x554181[_0x5f0efc(0x174)],_0x4e66a6);return{'state':sameFiles(_0x4e66a6,_0x396834[_0x5f0efc(0x158)][_0x5f0efc(0x163)])&&_0x3fcf43===_0x396834[_0x5f0efc(0x158)]['digest']?'current':_0x5f0efc(0x153),'packageVersion':_0x396834[_0x5f0efc(0x154)],'skillVersion':_0xd4ca60,'installedPath':_0x554181[_0x5f0efc(0x174)],'digest':_0x3fcf43,'repairCommand':REPAIR_COMMAND};}catch(_0xd14d58){return{'state':_0x5f0efc(0x142),'packageVersion':_0x396834[_0x5f0efc(0x154)],'installedPath':_0x554181[_0x5f0efc(0x174)],'reason':_0xd14d58 instanceof Error?_0xd14d58[_0x5f0efc(0x144)]:String(_0xd14d58),'repairCommand':REPAIR_COMMAND};}}function failure(_0x38b6f1,_0x4e487a,_0x1177ff,_0x5ea716){const _0x50e096=a129_0x33f6ba;return{'ok':![],'code':_0x38b6f1,'packageVersion':_0x4e487a[_0x50e096(0x154)],'skillVersion':_0x4e487a[_0x50e096(0x16a)],'installedPath':_0x5ea716,'changed':![],'repairCommand':REPAIR_COMMAND,'error':_0x1177ff instanceof Error?_0x1177ff[_0x50e096(0x144)]:String(_0x1177ff)};}export function installBuiltinSkill(_0x15c10c={}){const _0x49bf5c=a129_0x33f6ba,_0x328996=_0x15c10c[_0x49bf5c(0x168)]??DEFAULT_PACKAGE_ROOT,_0xb01935=_0x15c10c[_0x49bf5c(0x170)]??homedir();let _0x509840;try{_0x509840=readSource(_0x328996);}catch(_0xb9107b){return failure('SOURCE_INVALID',{'packageVersion':'unknown','skillVersion':_0x49bf5c(0x13f)},_0xb9107b);}const _0x10afbe=inspectBuiltinSkill({'packageRoot':_0x328996,'home':_0xb01935}),_0x3f6117=runNpxSkillsAddGlobal(_0x328996,_0x509840['root'],{'stdio':_0x15c10c[_0x49bf5c(0x16f)]??'pipe','expectedSkillName':SKILL_NAME,'presence':{'home':_0xb01935}});if(_0x3f6117['skipped'])return{'ok':!![],'packageVersion':_0x509840[_0x49bf5c(0x154)],'skillVersion':_0x509840[_0x49bf5c(0x16a)],'installedPath':_0x10afbe[_0x49bf5c(0x175)],'changed':![],'repairCommand':REPAIR_COMMAND};if(!_0x3f6117['ok'])return failure('INSTALL_FAILED',_0x509840,_0x3f6117[_0x49bf5c(0x157)]??_0x49bf5c(0x148)+_0x3f6117['status']);const _0x55aaf8=inspectBuiltinSkill({'packageRoot':_0x328996,'home':_0xb01935});if(_0x55aaf8[_0x49bf5c(0x14e)]!==_0x49bf5c(0x164))return failure(_0x49bf5c(0x169),_0x509840,_0x55aaf8[_0x49bf5c(0x160)]??_0x49bf5c(0x166)+_0x55aaf8['state'],_0x55aaf8['installedPath']);return{'ok':!![],'packageVersion':_0x509840[_0x49bf5c(0x154)],'skillVersion':_0x509840[_0x49bf5c(0x16a)],'installedPath':_0x55aaf8[_0x49bf5c(0x175)],'changed':_0x10afbe[_0x49bf5c(0x14e)]!=='current','repairCommand':REPAIR_COMMAND};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a130_0x5ce258=a130_0x5d24;(function(_0x281530,_0x4f6d7c){const _0x1c5058=a130_0x5d24,_0x3e41d8=_0x281530();while(!![]){try{const _0x2603af=parseInt(_0x1c5058(0x154))/0x1+-parseInt(_0x1c5058(0x178))/0x2*(-parseInt(_0x1c5058(0x167))/0x3)+-parseInt(_0x1c5058(0x16b))/0x4*(parseInt(_0x1c5058(0x15c))/0x5)+-parseInt(_0x1c5058(0x16e))/0x6+-parseInt(_0x1c5058(0x16a))/0x7+parseInt(_0x1c5058(0x158))/0x8*(parseInt(_0x1c5058(0x159))/0x9)+parseInt(_0x1c5058(0x15e))/0xa*(parseInt(_0x1c5058(0x182))/0xb);if(_0x2603af===_0x4f6d7c)break;else _0x3e41d8['push'](_0x3e41d8['shift']());}catch(_0x5c24a5){_0x3e41d8['push'](_0x3e41d8['shift']());}}}(a130_0x111d,0x24533));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';import{LOVRABET_SKILL_SOURCE as a130_0x500e3c}from'../constant/distribution.js';function a130_0x111d(){const _0x43b3e0=['stdio','EPERM','globalSkillName','23892nfDeCf','SKILL_NOT_INSTALLED','unverifiable','checked','state','249056YEGSmh','absent','INSTALL_PARTIAL','skipNpxSkillsEnvSuffix','330304LRkCdt','45VoRwxy','Installer\x20reported\x20','signal','5UlJZxf','stdout','170hZQtEu','npm_config_global','EACCES','error','internalSkillSource','!\x20Could\x20not\x20verify\x20\x22','SPAWN_FAILED','pipe','exit\x20','845991uyYtzE','status','warn','1936214wskCwk','378052OBgXdd','PERMISSION_DENIED','join','1527090fzINay','Skill\x20\x22','log','add','message','\x22\x20not\x20found\x20after\x20install\x20(checked\x20','toString','code','unknown','CHILD_EXIT_NONZERO','2ehniHS','NPM_CONFIG_GLOBAL','match','stderr','presence','trim','npx\x20terminated\x20by\x20signal\x20'];a130_0x111d=function(){return _0x43b3e0;};return a130_0x111d();}import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';import{resolveInstalledSkill}from'../skills/skill-presence.js';export const LOVRABET_SKILL_SOURCE=a130_0x500e3c;export const LOVRABET_SKILL_GIT_SOURCE=PRODUCT_CONFIG[a130_0x5ce258(0x162)];function a130_0x5d24(_0x15141,_0x546000){_0x15141=_0x15141-0x150;const _0x111d9b=a130_0x111d();let _0x5d24a4=_0x111d9b[_0x15141];return _0x5d24a4;}export const LOVRABET_GLOBAL_SKILL_NAME=PRODUCT_CONFIG[a130_0x5ce258(0x181)];export function resolveGlobalSkillName(_0x21c9ae){const _0x30589d=a130_0x5ce258;switch(_0x21c9ae[_0x30589d(0x17d)]()){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_0x5ce258(0x157)]);const CHILD_OUTPUT_MAX_BUFFER=0x10*0x400*0x400;function failure(_0x64100b,_0x126aa9,_0x359289){return{'ok':![],'status':_0x126aa9,'code':_0x64100b,'error':'['+_0x64100b+']\x20'+_0x359289};}export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}export function runNpxSkillsAddGlobal(_0x12c199,_0x506d97=LOVRABET_SKILL_SOURCE,_0x5b9ae8){const _0x627885=a130_0x5ce258;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x1c5fec=resolveNpmBin('npx'),_0xc33473=['-y','skills@latest',_0x627885(0x171),_0x506d97,'-g','-y'],_0x164fad=[_0x1c5fec,..._0xc33473][_0x627885(0x16d)]('\x20');console[_0x627885(0x170)]('*\x20'+_0x164fad);const _0x38efe2={...process.env};delete _0x38efe2[_0x627885(0x15f)],delete _0x38efe2[_0x627885(0x179)];const _0x4be7b0=spawnSync(_0x1c5fec,_0xc33473,{'cwd':_0x12c199,'stdio':_0x627885(0x165),'env':_0x38efe2,'shell':![],'maxBuffer':CHILD_OUTPUT_MAX_BUFFER}),_0x2364b2=[_0x4be7b0[_0x627885(0x15d)]?_0x4be7b0[_0x627885(0x15d)][_0x627885(0x174)]():'',_0x4be7b0[_0x627885(0x17b)]?_0x4be7b0[_0x627885(0x17b)][_0x627885(0x174)]():'']['filter'](Boolean)[_0x627885(0x16d)]('\x0a')['trim']();_0x5b9ae8?.[_0x627885(0x17f)]!==_0x627885(0x165)&&_0x2364b2&&console[_0x627885(0x170)](_0x2364b2);if(_0x4be7b0[_0x627885(0x161)]){const _0x3651e8=_0x4be7b0['error'],_0x22df6=_0x3651e8['code']==='ENOENT'?'NPX_NOT_FOUND':_0x3651e8[_0x627885(0x175)]===_0x627885(0x180)||_0x3651e8[_0x627885(0x175)]===_0x627885(0x160)?_0x627885(0x16c):_0x627885(0x164);return failure(_0x22df6,_0x4be7b0[_0x627885(0x168)],_0x3651e8[_0x627885(0x172)]);}if(_0x4be7b0[_0x627885(0x15b)])return failure('CHILD_TERMINATED',_0x4be7b0['status'],_0x627885(0x17e)+_0x4be7b0['signal']);if(_0x4be7b0[_0x627885(0x168)]!==0x0)return failure(_0x627885(0x177),_0x4be7b0[_0x627885(0x168)],_0x2364b2||_0x627885(0x166)+(_0x4be7b0[_0x627885(0x168)]??_0x627885(0x176)));const _0x52e861=_0x2364b2[_0x627885(0x17a)](/Failed to install\s+(\d+)/i);if(_0x52e861&&Number(_0x52e861[0x1])>0x0)return failure(_0x627885(0x156),0x0,_0x627885(0x15a)+_0x52e861[0x1]+'\x20failed\x20target(s)'+(_0x2364b2?':\x0a'+_0x2364b2:''));const _0x273804=_0x5b9ae8?.['expectedSkillName']??resolveGlobalSkillName(_0x506d97);if(_0x273804){const _0x2b8053=resolveInstalledSkill(_0x273804,_0x5b9ae8?.[_0x627885(0x17c)]);if(_0x2b8053[_0x627885(0x153)]===_0x627885(0x155))return failure(_0x627885(0x150),0x0,_0x627885(0x16f)+_0x273804+_0x627885(0x173)+_0x2b8053[_0x627885(0x152)][_0x627885(0x16d)](',\x20')+')');_0x2b8053['state']===_0x627885(0x151)&&console[_0x627885(0x169)](_0x627885(0x163)+_0x273804+'\x22\x20install\x20state:\x20'+_0x2b8053['reason']);}return{'ok':!![],'status':0x0};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a131_0x26ed97=a131_0x531a;(function(_0x27fe12,_0x3fa7cf){const _0x165eb7=a131_0x531a,_0x450e2c=_0x27fe12();while(!![]){try{const _0x45b3d1=parseInt(_0x165eb7(0x10d))/0x1+parseInt(_0x165eb7(0x10b))/0x2+parseInt(_0x165eb7(0x104))/0x3*(parseInt(_0x165eb7(0x107))/0x4)+-parseInt(_0x165eb7(0x103))/0x5*(parseInt(_0x165eb7(0x105))/0x6)+-parseInt(_0x165eb7(0x10f))/0x7*(-parseInt(_0x165eb7(0x111))/0x8)+-parseInt(_0x165eb7(0x112))/0x9*(parseInt(_0x165eb7(0x110))/0xa)+-parseInt(_0x165eb7(0x10e))/0xb*(-parseInt(_0x165eb7(0x10a))/0xc);if(_0x45b3d1===_0x3fa7cf)break;else _0x450e2c['push'](_0x450e2c['shift']());}catch(_0x48e896){_0x450e2c['push'](_0x450e2c['shift']());}}}(a131_0x12c1,0xa078f));function a131_0x12c1(){const _0x35de7a=['14839NtFMLy','14ixugIL','10DWKJfd','3481864atmHgL','10756980hZujZq','coverage','SKILL.md','.svn','670YVZrVb','15537nkDKOb','48414IQWecR','dist','52xjUtqn','.DS_Store','.cache','8628mWnjYW','1432492iJIPMG','node_modules','309791dpeZas'];a131_0x12c1=function(){return _0x35de7a;};return a131_0x12c1();}export const METADATA_FILE='lovrabet.skill.json';export const SKILL_FILE=a131_0x26ed97(0x101);export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,a131_0x26ed97(0x108)]);function a131_0x531a(_0x396cfa,_0x3ea35c){_0x396cfa=_0x396cfa-0x101;const _0x12c1bc=a131_0x12c1();let _0x531a88=_0x12c1bc[_0x396cfa];return _0x531a88;}export const IGNORED_DIR_NAMES=new Set(['.git','.hg',a131_0x26ed97(0x102),a131_0x26ed97(0x10c),'.next',a131_0x26ed97(0x106),'build',a131_0x26ed97(0x113),'.turbo',a131_0x26ed97(0x109)]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x505040,_0x32e593){const _0x1410fa=a132_0x319e,_0xa30ebe=_0x505040();while(!![]){try{const _0x1fdfe2=-parseInt(_0x1410fa(0x164))/0x1*(-parseInt(_0x1410fa(0x15e))/0x2)+-parseInt(_0x1410fa(0x168))/0x3*(parseInt(_0x1410fa(0x167))/0x4)+-parseInt(_0x1410fa(0x157))/0x5*(-parseInt(_0x1410fa(0x159))/0x6)+parseInt(_0x1410fa(0x169))/0x7+-parseInt(_0x1410fa(0x15f))/0x8*(parseInt(_0x1410fa(0x158))/0x9)+parseInt(_0x1410fa(0x166))/0xa+-parseInt(_0x1410fa(0x160))/0xb;if(_0x1fdfe2===_0x32e593)break;else _0xa30ebe['push'](_0xa30ebe['shift']());}catch(_0x495b20){_0xa30ebe['push'](_0xa30ebe['shift']());}}}(a132_0x5968,0x2066d));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';function a132_0x5968(){const _0x2dc769=['Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','endsWith','isSymbolicLink','14WKemXs','9848VcvwQE','2163282tdKgZW','startsWith','.tmp','from','20597NGaSmL','split','411190LxdCvB','119660xlZGEo','9rIQLgL','1755670CQLGLG','stringify','utf8','Unsafe\x20Skill\x20file\x20path:\x20','696765PlTqKI','1143KmvGbc','6EoFfAI','validation'];a132_0x5968=function(){return _0x2dc769;};return a132_0x5968();}export function resolveManagedFilePath(_0x489e0f,_0x33119e){const _0x16ab3a=a132_0x319e,_0x34cd67=normalizeSkillRelativePath(_0x33119e),_0x40dd75=realOrResolved(_0x489e0f),_0x1176e8=resolve(_0x40dd75,..._0x34cd67['split']('/'));if(!isPathInside(_0x1176e8,_0x40dd75))throw CliErrors[_0x16ab3a(0x15a)](_0x16ab3a(0x16c)+_0x33119e);return ensureNoSymlinkInManagedPath(_0x40dd75,_0x34cd67),_0x1176e8;}export function ensureNoSymlinkInManagedPath(_0x24f5e2,_0x4b6ff5){const _0x5514f8=a132_0x319e;let _0x51c10c=_0x24f5e2;for(const _0x6b0b49 of _0x4b6ff5[_0x5514f8(0x165)]('/')){_0x51c10c=resolve(_0x51c10c,_0x6b0b49);const _0x4fea06=lstatIfPresent(_0x51c10c);if(_0x4fea06?.[_0x5514f8(0x15d)]())throw CliErrors[_0x5514f8(0x15a)](_0x5514f8(0x15b)+_0x4b6ff5);}}export function isDanglingSymlink(_0x487cea){const _0x450028=a132_0x319e;try{return lstatSync(_0x487cea)[_0x450028(0x15d)]();}catch{return![];}}export function resolveSymlinkTarget(_0x1015c3){const _0x480361=readlinkSync(_0x1015c3);return isAbsolute(_0x480361)?_0x480361:resolve(dirname(_0x1015c3),_0x480361);}export function isPathInside(_0x1f369d,_0xabc71e){const _0x56ab48=a132_0x319e,_0x3bf8a7=_0x1f369d[_0x56ab48(0x15c)](sep)?_0x1f369d:''+_0x1f369d+sep,_0x4334e9=_0xabc71e['endsWith'](sep)?_0xabc71e:''+_0xabc71e+sep;return _0x1f369d===_0xabc71e||_0x3bf8a7[_0x56ab48(0x161)](_0x4334e9);}export function realOrResolved(_0x34158a){try{return realpathSync(_0x34158a);}catch{return resolve(_0x34158a);}}function a132_0x319e(_0x44c940,_0x5d6951){_0x44c940=_0x44c940-0x157;const _0x596815=a132_0x5968();let _0x319e21=_0x596815[_0x44c940];return _0x319e21;}export function lstatIfPresent(_0x3e33b1){try{return lstatSync(_0x3e33b1);}catch{return undefined;}}export function writeTextAtomic(_0x5c7039,_0x5cbc5b,_0x54285b){const _0x97bac5=a132_0x319e;writeBytesAtomic(_0x5c7039,Buffer[_0x97bac5(0x163)](_0x5cbc5b,_0x97bac5(0x16b)),_0x54285b);}export function writeBytesAtomic(_0x3c9583,_0x465839,_0x3c8b2b){const _0x3b9f77=a132_0x319e,_0x3722d8=_0x3c9583+_0x3b9f77(0x162);try{writeFileSync(_0x3722d8,_0x465839,{'mode':_0x3c8b2b}),renameSync(_0x3722d8,_0x3c9583);}catch(_0x566924){try{rmSync(_0x3722d8,{'force':!![]});}catch{}throw _0x566924;}}export function writeJsonAtomic(_0x54684d,_0x39618f){const _0xf4ea=a132_0x319e;writeTextAtomic(_0x54684d,JSON[_0xf4ea(0x16a)](_0x39618f,null,0x2)+'\x0a',0x180);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x230a94,_0x5ec32b){const _0x5197b4=a133_0x4cd1,_0x42916c=_0x230a94();while(!![]){try{const _0x14aa69=-parseInt(_0x5197b4(0x1cb))/0x1+-parseInt(_0x5197b4(0x1d0))/0x2+-parseInt(_0x5197b4(0x1d2))/0x3*(-parseInt(_0x5197b4(0x1d4))/0x4)+-parseInt(_0x5197b4(0x1cf))/0x5*(parseInt(_0x5197b4(0x1c8))/0x6)+parseInt(_0x5197b4(0x1d7))/0x7*(-parseInt(_0x5197b4(0x1cd))/0x8)+parseInt(_0x5197b4(0x1d1))/0x9+parseInt(_0x5197b4(0x1d8))/0xa*(parseInt(_0x5197b4(0x1d3))/0xb);if(_0x14aa69===_0x5ec32b)break;else _0x42916c['push'](_0x42916c['shift']());}catch(_0x2b109e){_0x42916c['push'](_0x42916c['shift']());}}}(a133_0x5158,0x949da));import{createHash}from'node:crypto';function a133_0x4cd1(_0x3472b6,_0x4ed6de){_0x3472b6=_0x3472b6-0x1c8;const _0x5158e2=a133_0x5158();let _0x4cd1fb=_0x5158e2[_0x3472b6];return _0x4cd1fb;}import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0x3d2b8a){const _0x2b82e8=a133_0x4cd1;return createHash(_0x2b82e8(0x1d5))['update'](_0x3d2b8a)[_0x2b82e8(0x1ce)]('hex');}export function fileHash(_0x4897da){return bufferSha256(fileContent(_0x4897da));}export function bufferSha256(_0x5cac44){const _0x2304b1=a133_0x4cd1;return createHash(_0x2304b1(0x1d5))['update'](_0x5cac44)[_0x2304b1(0x1ce)](_0x2304b1(0x1ca));}function a133_0x5158(){const _0x49809d=['size','hex','60824zZifjc','update','1616JpNRaG','digest','497755NBoMFz','2013630PeuXpX','1444788pGviwz','3205464uvSSRT','595353NsbhQm','4BhJntJ','sha256','path','2583qeLhCw','170NqPkYp','24mGYkvc'];a133_0x5158=function(){return _0x49809d;};return a133_0x5158();}export function fileTreeHash(_0x41317a){const _0xae3cc7=a133_0x4cd1,_0x3896f3=createHash(_0xae3cc7(0x1d5));for(const _0x38aabf of normalizeManifestFiles(_0x41317a)){_0x3896f3[_0xae3cc7(0x1cc)](_0x38aabf[_0xae3cc7(0x1d6)]),_0x3896f3['update']('\x00'),_0x3896f3[_0xae3cc7(0x1cc)](_0x38aabf[_0xae3cc7(0x1d5)]),_0x3896f3['update']('\x00'),_0x3896f3[_0xae3cc7(0x1cc)](String(_0x38aabf[_0xae3cc7(0x1c9)])),_0x3896f3['update']('\x00');}return _0x3896f3[_0xae3cc7(0x1ce)]('hex');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a134_0x192c(_0x9287e5,_0x1f6292){_0x9287e5=_0x9287e5-0x164;const _0x4e17be=a134_0x4e17();let _0x192c5a=_0x4e17be[_0x9287e5];return _0x192c5a;}(function(_0x2ed64a,_0xff841e){const _0x53126a=a134_0x192c,_0x321bf2=_0x2ed64a();while(!![]){try{const _0x261ff4=-parseInt(_0x53126a(0x16d))/0x1+parseInt(_0x53126a(0x167))/0x2*(-parseInt(_0x53126a(0x166))/0x3)+-parseInt(_0x53126a(0x16c))/0x4*(parseInt(_0x53126a(0x16e))/0x5)+parseInt(_0x53126a(0x169))/0x6*(parseInt(_0x53126a(0x168))/0x7)+-parseInt(_0x53126a(0x16b))/0x8*(-parseInt(_0x53126a(0x170))/0x9)+-parseInt(_0x53126a(0x172))/0xa+parseInt(_0x53126a(0x164))/0xb;if(_0x261ff4===_0xff841e)break;else _0x321bf2['push'](_0x321bf2['shift']());}catch(_0x921c83){_0x321bf2['push'](_0x321bf2['shift']());}}}(a134_0x4e17,0x99a8b));import{resolve}from'node:path';import{resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';export function resolveRuntimeSkillInstallTarget(_0x32b07c,_0x2790d5='global',_0x3a5e27={}){const _0x54e9b3=a134_0x192c,_0x1f4b23=resolveSkillSyncPaths(_0x3a5e27),_0x8f138f=safePathSegment(_0x32b07c,'appCode'),_0x211767=_0x2790d5==='project'?[resolve(_0x3a5e27['cwd']??process[_0x54e9b3(0x173)](),_0x54e9b3(0x165),_0x54e9b3(0x16f))]:runtimeAgentSkillRoots(_0x1f4b23);return Object[_0x54e9b3(0x16a)]({'scope':_0x2790d5,'appCode':_0x8f138f,'skillRoots':Object['freeze'](_0x211767),'managedRoot':_0x1f4b23[_0x54e9b3(0x171)]});}function a134_0x4e17(){const _0xa2d2b2=['.agents','9993eClYWI','106rBpnTN','2755907hkRiUG','12CnqqNb','freeze','2528UyqKEo','28JszwDX','608497QOCXlv','607305vLmfKM','skills','33822KjYMfN','managedRoot','5883280LLCbgn','cwd','9658572NLwbOF'];a134_0x4e17=function(){return _0xa2d2b2;};return a134_0x4e17();}
|