@lovrabet/lovrabet-cli 2.1.9-beta.2 → 2.1.9-beta.3
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/NOTICE +5 -0
- package/README.md +156 -0
- 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/app-config/shared.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/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/ocr/index.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.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/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/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/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.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.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- 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/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.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/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/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.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 +18 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2c9766,_0x579b81){const _0x181e16=a86_0x2858,_0x1b931c=_0x2c9766();while(!![]){try{const _0x10e1ee=parseInt(_0x181e16(0x1f4))/0x1*(parseInt(_0x181e16(0x1fd))/0x2)+-parseInt(_0x181e16(0x1ea))/0x3*(parseInt(_0x181e16(0x1f7))/0x4)+parseInt(_0x181e16(0x1e9))/0x5+-parseInt(_0x181e16(0x1f2))/0x6*(-parseInt(_0x181e16(0x1fe))/0x7)+parseInt(_0x181e16(0x1fc))/0x8*(parseInt(_0x181e16(0x1ed))/0x9)+parseInt(_0x181e16(0x1ef))/0xa*(-parseInt(_0x181e16(0x1ff))/0xb)+-parseInt(_0x181e16(0x1ec))/0xc;if(_0x10e1ee===_0x579b81)break;else _0x1b931c['push'](_0x1b931c['shift']());}catch(_0x31eed9){_0x1b931c['push'](_0x1b931c['shift']());}}}(a86_0x4c8d,0x4e6e6));function a86_0x2858(_0x335649,_0x2fa656){_0x335649=_0x335649-0x1e4;const _0x4c8dab=a86_0x4c8d();let _0x2858ac=_0x4c8dab[_0x335649];return _0x2858ac;}import{CLI_BIN_NAME}from'../constant/cli.js';export function buildConfirmationLines(_0x15b5c3,_0x3eaad9,_0x15c1f3){const _0x4854b6=a86_0x2858,_0x2e199f=buildConfirmationContext(_0x15b5c3,_0x3eaad9,_0x15c1f3),_0xd2fb5a=[_0x4854b6(0x1eb)+_0x2e199f['commandLabel']];return _0x2e199f[_0x4854b6(0x1ee)]&&_0xd2fb5a['push'](_0x4854b6(0x1f1)+_0x2e199f['description']),_0x2e199f[_0x4854b6(0x1e5)]&&_0xd2fb5a[_0x4854b6(0x1e6)]('\x20\x20\x20Affected:\x20'+_0x2e199f[_0x4854b6(0x1e5)]),_0xd2fb5a[_0x4854b6(0x1e6)](_0x4854b6(0x1f5)),_0xd2fb5a;}export function reconstructCommandArgv(_0x276089,_0x41317b){const _0x4f9710=a86_0x2858,_0x4c79d2=[CLI_BIN_NAME,_0x276089[_0x4f9710(0x1f8)],_0x276089[_0x4f9710(0x1fb)]];for(const [_0x457f4c,_0x3e1049]of Object[_0x4f9710(0x1e7)](_0x41317b)){if(_0x3e1049===!![])_0x4c79d2[_0x4f9710(0x1e6)]('--'+_0x457f4c);else _0x3e1049!==![]&&_0x3e1049!==undefined&&_0x3e1049!==''&&_0x4c79d2[_0x4f9710(0x1e6)]('--'+_0x457f4c+'\x20'+JSON[_0x4f9710(0x1fa)](_0x3e1049));}return _0x4c79d2[_0x4f9710(0x1e6)]('--yes'),_0x4c79d2['join']('\x20');}function a86_0x4c8d(){const _0x301347=['id=','5Tdbscv','\x20\x20\x20Continue?\x20[y/N]\x20','length','4gIhPMu','service','code','stringify','command','392vVTsJZ','256134hszUaE','26887TDDuhq','2794ZvalDK','name','join','affectedRecords','push','entries','code=','634500jpHzdK','571707MbUwaS','⚠\x20\x20High-risk\x20operation:\x20','8726304ihSMkd','88569lHaCKZ','description','22640GXgOHP','params','\x20\x20\x20','882pybhxm'];a86_0x4c8d=function(){return _0x301347;};return a86_0x4c8d();}function buildConfirmationContext(_0xb2d550,_0x2d54a7,_0x4808dc){const _0x498289=extractAffectedRecords(_0x4808dc);return{'commandLabel':_0x2d54a7,'description':_0xb2d550['description'],'affectedRecords':_0x498289};}function extractAffectedRecords(_0x5c9044){const _0x1d822c=a86_0x2858,_0x4ed64b=[];if(_0x5c9044[_0x1d822c(0x1f9)])_0x4ed64b[_0x1d822c(0x1e6)](_0x1d822c(0x1e8)+_0x5c9044[_0x1d822c(0x1f9)]);if(_0x5c9044['id'])_0x4ed64b[_0x1d822c(0x1e6)](_0x1d822c(0x1f3)+_0x5c9044['id']);if(_0x5c9044[_0x1d822c(0x200)])_0x4ed64b['push']('name='+_0x5c9044['name']);if(_0x5c9044['params'])_0x4ed64b[_0x1d822c(0x1e6)]('params='+_0x5c9044[_0x1d822c(0x1f0)]);return _0x4ed64b[_0x1d822c(0x1f6)]>0x0?_0x4ed64b[_0x1d822c(0x1e4)](',\x20'):undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xaad3a,_0x554bfb){const _0x19088d=a87_0x13c9,_0x5c2e4d=_0xaad3a();while(!![]){try{const _0x166ad0=parseInt(_0x19088d(0x128))/0x1*(parseInt(_0x19088d(0x12f))/0x2)+-parseInt(_0x19088d(0x12d))/0x3*(parseInt(_0x19088d(0x12e))/0x4)+-parseInt(_0x19088d(0x12b))/0x5+-parseInt(_0x19088d(0x125))/0x6*(-parseInt(_0x19088d(0x127))/0x7)+-parseInt(_0x19088d(0x131))/0x8+parseInt(_0x19088d(0x124))/0x9+parseInt(_0x19088d(0x12c))/0xa;if(_0x166ad0===_0x554bfb)break;else _0x5c2e4d['push'](_0x5c2e4d['shift']());}catch(_0x231629){_0x5c2e4d['push'](_0x5c2e4d['shift']());}}}(a87_0x4135,0x8b639));import{LovrabetError}from'@lovrabet/sdk';import{CliErrors}from'../errors.js';export function mapUserFacingExecuteError(_0xc9fa58){const _0x3e8750=a87_0x13c9;if(_0xc9fa58 instanceof LovrabetError)return CliErrors[_0x3e8750(0x130)](userFacingLovrabetMessage(_0xc9fa58));return _0xc9fa58;}function userFacingLovrabetMessage(_0x751a08){const _0x368839=a87_0x13c9,_0x226c51=_0x751a08['description'];if(_0x226c51!==undefined&&_0x226c51!==null){if(typeof _0x226c51==='string'&&_0x226c51[_0x368839(0x129)]())return _0x226c51[_0x368839(0x129)]();try{return JSON[_0x368839(0x126)](_0x226c51);}catch{}}return _0x751a08[_0x368839(0x12a)];}function a87_0x13c9(_0x4feefa,_0x5f1217){_0x4feefa=_0x4feefa-0x124;const _0x41358c=a87_0x4135();let _0x13c906=_0x41358c[_0x4feefa];return _0x13c906;}function a87_0x4135(){const _0x1ca264=['trim','message','2378590qbfvuW','16919890AAUFrB','1662927xrUGtB','8xbyVVF','8bSLFSI','validation','7886272ojtszw','4200390DDUMFs','1384356pBWiqf','stringify','7dSiKky','187908NfSazF'];a87_0x4135=function(){return _0x1ca264;};return a87_0x4135();}
|
package/lib/framework/runner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a88_0x492026=a88_0x4c65;(function(_0x69df70,_0x14f573){const _0x4090f5=a88_0x4c65,_0x381311=_0x69df70();while(!![]){try{const _0x1f3c16=parseInt(_0x4090f5(0x13e))/0x1*(-parseInt(_0x4090f5(0x16a))/0x2)+parseInt(_0x4090f5(0x15b))/0x3*(parseInt(_0x4090f5(0x13b))/0x4)+-parseInt(_0x4090f5(0x151))/0x5+-parseInt(_0x4090f5(0x152))/0x6+-parseInt(_0x4090f5(0x131))/0x7*(parseInt(_0x4090f5(0x130))/0x8)+parseInt(_0x4090f5(0x170))/0x9+-parseInt(_0x4090f5(0x149))/0xa*(-parseInt(_0x4090f5(0x15d))/0xb);if(_0x1f3c16===_0x14f573)break;else _0x381311['push'](_0x381311['shift']());}catch(_0x4f32aa){_0x381311['push'](_0x381311['shift']());}}}(a88_0x55bc,0x5e9a0));import{runCommandWithAdapter,requireConfirmationPrompt}from'@lovrabet/cli-framework';import{formatOutput}from'../framework/output.js';import{CliErrors}from'../errors.js';function a88_0x55bc(){const _0x2ea959=['doctor','currentApp','ClientAk','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20','requiresAppCode','90365LzKWHs','564414kmhseh','error','appcode','trim','items','newConfigFileName','Set\x20accessKey\x20in\x20','format','High-risk\x20operation\x20`','3zvGJUW','string','67001gGkprT','../commands/app/remote-source.js','Unknown\x20app:\x20','schema','local-alias','../core/sdk-client.js','APPCODE','service','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.','defaultPageSize','object','.appcode\x20to\x20','nonInteractive','2PTeANj','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a','env','defaultApp','_notice','has','6965676gSiPxa','appcode\x20\x22','161464zZdBFx','119lmSXqx','name','ACCESS_KEY','app','mergedCli','production','map','requiresAuth','pageSize','../core/api-client.js','216540zAjhdH','catch','cancelled','3631uNIzbn','apiDomain','rawFlags','appCode','update','configMissing','validation','Run\x20`','accessKey','defaultVerbose','appCodeSource','30ynVfgK','\x20\x20To\x20proceed:\x20','\x20or\x20pass\x20'];a88_0x55bc=function(){return _0x2ea959;};return a88_0x55bc();}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';function a88_0x4c65(_0x55205,_0x2c87b5){_0x55205=_0x55205-0x12f;const _0x55bc10=a88_0x55bc();let _0x4c655a=_0x55bc10[_0x55205];return _0x4c655a;}import{buildConfirmationLines,reconstructCommandArgv}from'../framework/runner-confirmation.js';import{mapUserFacingExecuteError}from'../framework/runner-error.js';import{resolveLatestUpdateNotice}from'../utils/update-notice.js';import{findAppByCode,findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../commands/app/eligibility.js';export function resolveAuthMode(_0x650826){const _0x219d8b=a88_0x4c65;return void _0x650826,AUTH_MODE[_0x219d8b(0x14e)];}export function createPipelineEnv(_0x18e33e,_0x87a6bc){const _0x3805e3=a88_0x4c65,_0x43e0ed=typeof _0x87a6bc['app']==='string'&&_0x87a6bc[_0x3805e3(0x134)]['trim']();return{'rawFlags':_0x87a6bc,'appCode':_0x18e33e[_0x3805e3(0x141)]||productEnv('APPCODE')||(_0x43e0ed?undefined:readAppCodeFromConfig()),'appCodeSource':_0x18e33e[_0x3805e3(0x148)],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x87a6bc),'defaultFormat':_0x18e33e[_0x3805e3(0x159)],'defaultPageSize':_0x18e33e[_0x3805e3(0x139)],'defaultVerbose':_0x18e33e['verbose'],'riskLevel':_0x18e33e['riskLevel'],'accessKey':_0x18e33e[_0x3805e3(0x146)],'env':_0x18e33e[_0x3805e3(0x16c)],'mergedCli':{'defaultApp':_0x18e33e['defaultApp'],'currentApp':_0x18e33e[_0x3805e3(0x14d)],'appCode':_0x18e33e[_0x3805e3(0x141)]}};}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS['filter'](_0x1ef777=>PIPELINE_FLAG_NAMES[a88_0x492026(0x16f)](_0x1ef777[a88_0x492026(0x132)]))[a88_0x492026(0x137)](({name:_0x500535,type:_0x202c3a,description:_0x376bf6})=>({'name':_0x500535,'type':_0x202c3a,'description':_0x376bf6})),'formatOutput':formatOutput,'getCommandLabel'(_0x3b1f04){const _0x11aa7e=a88_0x492026;return CLI_BIN_NAME+'\x20'+_0x3b1f04[_0x11aa7e(0x164)]+'\x20'+_0x3b1f04['command'];},'riskPolicy':{'onViolation'(_0x46f2c9){const _0x5c2c4e=a88_0x492026;console[_0x5c2c4e(0x153)](_0x46f2c9);},'createError'(_0x1a5fde){const _0x4b4acc=a88_0x492026;return CliErrors[_0x4b4acc(0x13d)](_0x1a5fde);}},async 'prepare'(_0x3b493c,_0x1f2d6e){const _0x14e202=a88_0x492026,_0x336ab6=resolveAuthMode(_0x1f2d6e);if(_0x3b493c[_0x14e202(0x138)]!==![]){if(!_0x1f2d6e['accessKey'])throw CliErrors['authRequired'](_0x14e202(0x158)+PRODUCT_CONFIG[_0x14e202(0x157)]+_0x14e202(0x14b)+productEnvName(_0x14e202(0x133))+'.');const {setActiveAK:_0x4a59a6}=await import(_0x14e202(0x13a));_0x4a59a6(_0x1f2d6e[_0x14e202(0x146)]);}let _0x123dbf='';if(_0x3b493c[_0x14e202(0x150)]!==![]){_0x123dbf=_0x1f2d6e[_0x14e202(0x141)]??'',_0x123dbf=await resolveExplicitAppName(_0x3b493c,_0x1f2d6e,_0x123dbf);if(!_0x123dbf){await assertSelectedAppNameIsRuntimeAccessible(_0x3b493c,_0x1f2d6e);throw CliErrors[_0x14e202(0x143)](_0x14e202(0x14f)+PRODUCT_CONFIG[_0x14e202(0x157)]+'.');}await assertAppCodeIsRuntimeAccessible(_0x3b493c,_0x1f2d6e,_0x123dbf);}if(_0x123dbf){const {initSdkClient:_0x268fd5}=await import(_0x14e202(0x162));_0x268fd5({'appCode':_0x123dbf,'env':_0x1f2d6e['env']??_0x14e202(0x136),'accessKey':_0x1f2d6e['accessKey'],'authMode':_0x336ab6});}return{'defaults':{'booleans':{'verbose':_0x1f2d6e[_0x14e202(0x147)]},'numbers':{'pagesize':_0x1f2d6e[_0x14e202(0x166)]}},'extras':{'appCode':_0x123dbf,'cookie':'','apiDomain':_0x1f2d6e[_0x14e202(0x13f)],'apiDir':'','accessKey':_0x1f2d6e['accessKey'],'envName':_0x1f2d6e[_0x14e202(0x16c)],'mergedCli':_0x1f2d6e[_0x14e202(0x135)]}};},async 'confirmHighRisk'({def:_0x54d9f8,env:_0x2de1f1,flags:_0xf2c46e,commandLabel:_0xc7f7a1}){const _0x143e7a=a88_0x492026;if(_0x2de1f1['isNonInteractive']){const _0x4f9162=reconstructCommandArgv(_0x54d9f8,_0xf2c46e);throw CliErrors['validation'](_0x143e7a(0x15a)+_0xc7f7a1+_0x143e7a(0x16b)+(_0x143e7a(0x14a)+_0x4f9162));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x54d9f8,_0xc7f7a1,_0xf2c46e),'createCancelledError':_0x91ae82=>CliErrors['cancelled'](_0x91ae82)});},'mapDryRunError'(_0x3269f9){return mapUserFacingExecuteError(_0x3269f9);},'mapExecuteError'(_0x44d9b4){return mapUserFacingExecuteError(_0x44d9b4);},async 'finalize'(){const {clearActiveAK:_0x5b9f13}=await import('../core/api-client.js');_0x5b9f13();}};async function resolveExplicitAppName(_0x41219a,_0xe06cd,_0x575ded){const _0x4a168d=a88_0x492026;if(_0x41219a[_0x4a168d(0x150)]===![])return _0x575ded;const _0x1e180b=typeof _0xe06cd[_0x4a168d(0x140)][_0x4a168d(0x134)]==='string'?_0xe06cd[_0x4a168d(0x140)][_0x4a168d(0x134)][_0x4a168d(0x155)]():'';if(!_0x1e180b)return _0x575ded;const _0x28ce6f=typeof _0xe06cd[_0x4a168d(0x140)][_0x4a168d(0x154)]===_0x4a168d(0x15c)&&_0xe06cd[_0x4a168d(0x140)]['appcode'][_0x4a168d(0x155)]()||productEnv(_0x4a168d(0x163));if(_0x28ce6f||_0xe06cd[_0x4a168d(0x148)]===_0x4a168d(0x161))return _0x575ded;const {getRemoteAppList:_0x1f0a93}=await import(_0x4a168d(0x15e)),_0x5c8fc7=await _0x1f0a93({'env':_0xe06cd['env']??'production','accessKey':_0xe06cd['accessKey']}),_0x359ebc=findAppByName(_0x5c8fc7['items'],_0x1e180b);if(_0x359ebc&&!isRuntimeAccessibleApp(_0x359ebc))throw runtimeInaccessibleAppError(_0x359ebc,'\x22'+_0x1e180b+'\x22');const _0x2a1efd=_0x359ebc?.[_0x4a168d(0x141)]?.[_0x4a168d(0x155)]();if(_0x2a1efd)return _0x2a1efd;throw CliErrors[_0x4a168d(0x144)](_0x4a168d(0x15f)+_0x1e180b,_0x4a168d(0x145)+CLI_BIN_NAME+_0x4a168d(0x165)+_0x1e180b+_0x4a168d(0x168)+PRODUCT_CONFIG[_0x4a168d(0x157)]+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0xc8dd1f,_0x38cebe){const _0x558c12=a88_0x492026;if(_0xc8dd1f[_0x558c12(0x150)]===![]||!_0x38cebe['accessKey'])return;const _0x4a27e1=(typeof _0x38cebe['rawFlags']['app']===_0x558c12(0x15c)&&_0x38cebe[_0x558c12(0x140)][_0x558c12(0x134)][_0x558c12(0x155)]()?_0x38cebe[_0x558c12(0x140)][_0x558c12(0x134)]:_0x38cebe[_0x558c12(0x135)]?.[_0x558c12(0x14d)]??_0x38cebe[_0x558c12(0x135)]?.[_0x558c12(0x16d)])?.['trim']();if(!_0x4a27e1)return;const {getRemoteAppList:_0x4ec1ca}=await import(_0x558c12(0x15e)),_0x42c8b7=await _0x4ec1ca({'env':_0x38cebe[_0x558c12(0x16c)]??'production','accessKey':_0x38cebe[_0x558c12(0x146)]}),_0x45fc52=findAppByName(_0x42c8b7[_0x558c12(0x156)],_0x4a27e1);if(_0x45fc52&&!isRuntimeAccessibleApp(_0x45fc52))throw runtimeInaccessibleAppError(_0x45fc52,'\x22'+_0x4a27e1+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0x11bc04,_0x3bc1a0,_0x75a17){const _0x5387a1=a88_0x492026;if(_0x11bc04[_0x5387a1(0x150)]===![]||!_0x3bc1a0[_0x5387a1(0x146)])return;const {getRemoteAppList:_0x4f8282}=await import(_0x5387a1(0x15e)),_0x459f3e=await _0x4f8282({'env':_0x3bc1a0[_0x5387a1(0x16c)]??_0x5387a1(0x136),'accessKey':_0x3bc1a0[_0x5387a1(0x146)]}),_0x122c1b=findAppByCode(_0x459f3e['items'],_0x75a17);if(_0x122c1b&&!isRuntimeAccessibleApp(_0x122c1b))throw runtimeInaccessibleAppError(_0x122c1b,_0x5387a1(0x12f)+_0x75a17+'\x22');}export async function runCommand(_0x21466f,_0x693ad7){await runCommandWithAdapter(shouldAttachUpdateNotice(_0x21466f)?withUpdateNotice(_0x21466f):_0x21466f,_0x693ad7,runnerAdapter);}function shouldAttachUpdateNotice(_0x309504){const _0x33e237=a88_0x492026;return![_0x33e237(0x142),_0x33e237(0x160),_0x33e237(0x14c)]['includes'](_0x309504[_0x33e237(0x164)]);}function withUpdateNotice(_0x417dc6){return{..._0x417dc6,async 'execute'(_0x21bd0a){const _0x3e8d1a=a88_0x4c65,_0x41fafb=shouldResolveUpdateNotice(_0x21bd0a)?resolveLatestUpdateNotice()[_0x3e8d1a(0x13c)](()=>null):Promise['resolve'](null),_0x16ab77=await _0x417dc6['execute'](_0x21bd0a);return attachUpdateNotice(_0x16ab77,await _0x41fafb);}};}function shouldResolveUpdateNotice(_0x27cf9d){const _0x38d0f9=a88_0x492026;return _0x27cf9d[_0x38d0f9(0x159)]==='pretty'&&!_0x27cf9d[_0x38d0f9(0x169)];}function attachUpdateNotice(_0x3a3d3a,_0x16b490){const _0x210201=a88_0x492026;if(!_0x16b490||!_0x3a3d3a||typeof _0x3a3d3a!=='object')return _0x3a3d3a;const _0x303fc0=_0x3a3d3a,_0x3552b1=typeof _0x303fc0[_0x210201(0x16e)]===_0x210201(0x167)&&_0x303fc0['_notice']!==null?_0x303fc0[_0x210201(0x16e)]:{};return{..._0x303fc0,'_notice':{..._0x3552b1,'update':_0x16b490}};}
|
|
1
|
+
const a88_0x2865a2=a88_0x5921;(function(_0x12fb7b,_0x512217){const _0x2f0fb0=a88_0x5921,_0x48a677=_0x12fb7b();while(!![]){try{const _0x529344=-parseInt(_0x2f0fb0(0xc4))/0x1+parseInt(_0x2f0fb0(0x87))/0x2*(-parseInt(_0x2f0fb0(0x89))/0x3)+parseInt(_0x2f0fb0(0xa2))/0x4*(parseInt(_0x2f0fb0(0x9d))/0x5)+-parseInt(_0x2f0fb0(0xaf))/0x6+-parseInt(_0x2f0fb0(0x97))/0x7+parseInt(_0x2f0fb0(0x88))/0x8+-parseInt(_0x2f0fb0(0xc1))/0x9*(-parseInt(_0x2f0fb0(0xc0))/0xa);if(_0x529344===_0x512217)break;else _0x48a677['push'](_0x48a677['shift']());}catch(_0x179a3c){_0x48a677['push'](_0x48a677['shift']());}}}(a88_0x2c41,0x2d552));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';function a88_0x5921(_0x3fc31f,_0x56c11d){_0x3fc31f=_0x3fc31f-0x82;const _0x2c418f=a88_0x2c41();let _0x5921f2=_0x2c418f[_0x3fc31f];return _0x5921f2;}import{PRODUCT_CONFIG,productEnv,productEnvName}from'../constant/product.js';import{isNonInteractiveMode,readAppCodeFromConfig}from'../context.js';function a88_0x2c41(){const _0x1e06ab=['update','local-alias','.appcode\x20to\x20','pretty','items','name','accessKey','1945454sKsIOi','production','trim','service','High-risk\x20operation\x20`','app','5bvwLhv','object','apiDomain','env','mergedCli','751616LCqQnR','validation','\x20or\x20pass\x20','ACCESS_KEY','riskLevel','appCodeSource','filter','Unknown\x20app:\x20','has','catch','requiresAuth','map','verbose','1931190SpDITG','\x20\x20To\x20proceed:\x20','currentApp','newConfigFileName','../core/api-client.js','../commands/app/remote-source.js','includes','resolve','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20','_notice','appCode','appcode\x20\x22','ClientAk','execute','string','Set\x20accessKey\x20in\x20','150EISbYo','293463wbemxE','authRequired','Run\x20`','7927teguLp','appcode','rawFlags','defaultVerbose','format','APPCODE','cancelled','24252rGzrZv','2483224VJHbZN','48tvdBNX','pageSize','doctor','defaultPageSize','command','../core/sdk-client.js','requiresAppCode'];a88_0x2c41=function(){return _0x1e06ab;};return a88_0x2c41();}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{resolveLatestUpdateNotice}from'../utils/update-notice.js';import{findAppByCode,findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../commands/app/eligibility.js';export function resolveAuthMode(_0x433770){const _0x10f7b3=a88_0x5921;return void _0x433770,AUTH_MODE[_0x10f7b3(0xbc)];}export function createPipelineEnv(_0xdad50a,_0x5b3663){const _0x37ceb8=a88_0x5921,_0x4e7621=typeof _0x5b3663[_0x37ceb8(0x9c)]===_0x37ceb8(0xbe)&&_0x5b3663[_0x37ceb8(0x9c)]['trim']();return{'rawFlags':_0x5b3663,'appCode':_0xdad50a[_0x37ceb8(0xba)]||productEnv(_0x37ceb8(0x85))||(_0x4e7621?undefined:readAppCodeFromConfig()),'appCodeSource':_0xdad50a[_0x37ceb8(0xa7)],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x5b3663),'defaultFormat':_0xdad50a[_0x37ceb8(0x84)],'defaultPageSize':_0xdad50a[_0x37ceb8(0x8a)],'defaultVerbose':_0xdad50a[_0x37ceb8(0xae)],'riskLevel':_0xdad50a[_0x37ceb8(0xa6)],'accessKey':_0xdad50a[_0x37ceb8(0x96)],'env':_0xdad50a[_0x37ceb8(0xa0)],'mergedCli':{'defaultApp':_0xdad50a['defaultApp'],'currentApp':_0xdad50a[_0x37ceb8(0xb1)],'appCode':_0xdad50a[_0x37ceb8(0xba)]}};}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[a88_0x2865a2(0xa8)](_0x2eb9f8=>PIPELINE_FLAG_NAMES[a88_0x2865a2(0xaa)](_0x2eb9f8[a88_0x2865a2(0x95)]))[a88_0x2865a2(0xad)](({name:_0x443c12,type:_0xed44c3,description:_0x32ea49})=>({'name':_0x443c12,'type':_0xed44c3,'description':_0x32ea49})),'formatOutput':formatOutput,'getCommandLabel'(_0x2bd8ae){const _0xb77cc0=a88_0x2865a2;return CLI_BIN_NAME+'\x20'+_0x2bd8ae[_0xb77cc0(0x9a)]+'\x20'+_0x2bd8ae[_0xb77cc0(0x8d)];},'riskPolicy':{'onViolation'(_0x4fc0f8){console['error'](_0x4fc0f8);},'createError'(_0x476cd4){const _0x1c0706=a88_0x2865a2;return CliErrors[_0x1c0706(0x86)](_0x476cd4);}},async 'prepare'(_0x3f0d5f,_0x1cc66e){const _0x24b156=a88_0x2865a2,_0x58c47d=resolveAuthMode(_0x1cc66e);if(_0x3f0d5f[_0x24b156(0xac)]!==![]){if(!_0x1cc66e[_0x24b156(0x96)])throw CliErrors[_0x24b156(0xc2)](_0x24b156(0xbf)+PRODUCT_CONFIG[_0x24b156(0xb2)]+_0x24b156(0xa4)+productEnvName(_0x24b156(0xa5))+'.');const {setActiveAK:_0x115347}=await import(_0x24b156(0xb3));_0x115347(_0x1cc66e[_0x24b156(0x96)]);}let _0x14fde6='';if(_0x3f0d5f['requiresAppCode']!==![]){_0x14fde6=_0x1cc66e[_0x24b156(0xba)]??'',_0x14fde6=await resolveExplicitAppName(_0x3f0d5f,_0x1cc66e,_0x14fde6);if(!_0x14fde6){await assertSelectedAppNameIsRuntimeAccessible(_0x3f0d5f,_0x1cc66e);throw CliErrors['configMissing'](_0x24b156(0xb8)+PRODUCT_CONFIG[_0x24b156(0xb2)]+'.');}await assertAppCodeIsRuntimeAccessible(_0x3f0d5f,_0x1cc66e,_0x14fde6);}if(_0x14fde6){const {initSdkClient:_0x3afadf}=await import(_0x24b156(0x8e));_0x3afadf({'appCode':_0x14fde6,'env':_0x1cc66e[_0x24b156(0xa0)]??'production','accessKey':_0x1cc66e[_0x24b156(0x96)],'authMode':_0x58c47d});}return{'defaults':{'booleans':{'verbose':_0x1cc66e[_0x24b156(0x83)]},'numbers':{'pagesize':_0x1cc66e[_0x24b156(0x8c)]}},'extras':{'appCode':_0x14fde6,'cookie':'','apiDomain':_0x1cc66e[_0x24b156(0x9f)],'apiDir':'','accessKey':_0x1cc66e[_0x24b156(0x96)],'envName':_0x1cc66e['env'],'mergedCli':_0x1cc66e[_0x24b156(0xa1)]}};},async 'confirmHighRisk'({def:_0x11afe1,env:_0x3ad868,flags:_0x4ceee0,commandLabel:_0x2175cc}){const _0x1bea87=a88_0x2865a2;if(_0x3ad868['isNonInteractive']){const _0x457635=reconstructCommandArgv(_0x11afe1,_0x4ceee0);throw CliErrors['validation'](_0x1bea87(0x9b)+_0x2175cc+'`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a'+(_0x1bea87(0xb0)+_0x457635));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x11afe1,_0x2175cc,_0x4ceee0),'createCancelledError':_0x51502b=>CliErrors[_0x1bea87(0x86)](_0x51502b)});},'mapDryRunError'(_0x18d286){return mapUserFacingExecuteError(_0x18d286);},'mapExecuteError'(_0x4f2200){return mapUserFacingExecuteError(_0x4f2200);},async 'finalize'(){const _0x52016e=a88_0x2865a2,{clearActiveAK:_0x5d5b8a}=await import(_0x52016e(0xb3));_0x5d5b8a();}};async function resolveExplicitAppName(_0x42716d,_0x1c8e7d,_0x2efef2){const _0x201bf0=a88_0x2865a2;if(_0x42716d[_0x201bf0(0x8f)]===![])return _0x2efef2;const _0x107ab7=typeof _0x1c8e7d[_0x201bf0(0x82)][_0x201bf0(0x9c)]==='string'?_0x1c8e7d['rawFlags']['app'][_0x201bf0(0x99)]():'';if(!_0x107ab7)return _0x2efef2;const _0x3c609f=typeof _0x1c8e7d['rawFlags'][_0x201bf0(0xc5)]===_0x201bf0(0xbe)&&_0x1c8e7d[_0x201bf0(0x82)][_0x201bf0(0xc5)][_0x201bf0(0x99)]()||productEnv('APPCODE');if(_0x3c609f||_0x1c8e7d[_0x201bf0(0xa7)]===_0x201bf0(0x91))return _0x2efef2;const {getRemoteAppList:_0x11d79d}=await import('../commands/app/remote-source.js'),_0x304f65=await _0x11d79d({'env':_0x1c8e7d[_0x201bf0(0xa0)]??_0x201bf0(0x98),'accessKey':_0x1c8e7d[_0x201bf0(0x96)]}),_0x4b1dde=findAppByName(_0x304f65[_0x201bf0(0x94)],_0x107ab7);if(_0x4b1dde&&!isRuntimeAccessibleApp(_0x4b1dde))throw runtimeInaccessibleAppError(_0x4b1dde,'\x22'+_0x107ab7+'\x22');const _0x1ad2cb=_0x4b1dde?.[_0x201bf0(0xba)]?.[_0x201bf0(0x99)]();if(_0x1ad2cb)return _0x1ad2cb;throw CliErrors[_0x201bf0(0xa3)](_0x201bf0(0xa9)+_0x107ab7,_0x201bf0(0xc3)+CLI_BIN_NAME+_0x201bf0(0xb7)+_0x107ab7+_0x201bf0(0x92)+PRODUCT_CONFIG[_0x201bf0(0xb2)]+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0x80dd84,_0x3a1d1c){const _0x2e77df=a88_0x2865a2;if(_0x80dd84[_0x2e77df(0x8f)]===![]||!_0x3a1d1c['accessKey'])return;const _0x3c62b6=(typeof _0x3a1d1c[_0x2e77df(0x82)][_0x2e77df(0x9c)]==='string'&&_0x3a1d1c[_0x2e77df(0x82)][_0x2e77df(0x9c)]['trim']()?_0x3a1d1c['rawFlags']['app']:_0x3a1d1c[_0x2e77df(0xa1)]?.[_0x2e77df(0xb1)]??_0x3a1d1c[_0x2e77df(0xa1)]?.['defaultApp'])?.['trim']();if(!_0x3c62b6)return;const {getRemoteAppList:_0x16dbb5}=await import(_0x2e77df(0xb4)),_0x30933b=await _0x16dbb5({'env':_0x3a1d1c[_0x2e77df(0xa0)]??_0x2e77df(0x98),'accessKey':_0x3a1d1c[_0x2e77df(0x96)]}),_0x697d51=findAppByName(_0x30933b[_0x2e77df(0x94)],_0x3c62b6);if(_0x697d51&&!isRuntimeAccessibleApp(_0x697d51))throw runtimeInaccessibleAppError(_0x697d51,'\x22'+_0x3c62b6+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0x71de0b,_0x173e33,_0x254f8b){const _0xe94f51=a88_0x2865a2;if(_0x71de0b[_0xe94f51(0x8f)]===![]||!_0x173e33[_0xe94f51(0x96)])return;const {getRemoteAppList:_0xac09b7}=await import(_0xe94f51(0xb4)),_0x1575a2=await _0xac09b7({'env':_0x173e33[_0xe94f51(0xa0)]??_0xe94f51(0x98),'accessKey':_0x173e33['accessKey']}),_0x4aa1b3=findAppByCode(_0x1575a2[_0xe94f51(0x94)],_0x254f8b);if(_0x4aa1b3&&!isRuntimeAccessibleApp(_0x4aa1b3))throw runtimeInaccessibleAppError(_0x4aa1b3,_0xe94f51(0xbb)+_0x254f8b+'\x22');}export async function runCommand(_0x388827,_0x2f6cdc){await runCommandWithAdapter(shouldAttachUpdateNotice(_0x388827)?withUpdateNotice(_0x388827):_0x388827,_0x2f6cdc,runnerAdapter);}function shouldAttachUpdateNotice(_0x3fa7cc){const _0x3249b1=a88_0x2865a2;return![_0x3249b1(0x90),'schema',_0x3249b1(0x8b)][_0x3249b1(0xb5)](_0x3fa7cc['service']);}function withUpdateNotice(_0x3aae9d){return{..._0x3aae9d,async 'execute'(_0x541ac3){const _0x52fab0=a88_0x5921,_0x54e6b2=shouldResolveUpdateNotice(_0x541ac3)?resolveLatestUpdateNotice()[_0x52fab0(0xab)](()=>null):Promise[_0x52fab0(0xb6)](null),_0x462ef5=await _0x3aae9d[_0x52fab0(0xbd)](_0x541ac3);return attachUpdateNotice(_0x462ef5,await _0x54e6b2);}};}function shouldResolveUpdateNotice(_0x41f77d){const _0x55e9d6=a88_0x2865a2;return _0x41f77d[_0x55e9d6(0x84)]===_0x55e9d6(0x93)&&!_0x41f77d['nonInteractive'];}function attachUpdateNotice(_0x3c9f05,_0x5012c1){const _0x40820e=a88_0x2865a2;if(!_0x5012c1||!_0x3c9f05||typeof _0x3c9f05!==_0x40820e(0x9e))return _0x3c9f05;const _0x15f8bd=_0x3c9f05,_0x68540c=typeof _0x15f8bd[_0x40820e(0xb9)]===_0x40820e(0x9e)&&_0x15f8bd[_0x40820e(0xb9)]!==null?_0x15f8bd['_notice']:{};return{..._0x15f8bd,'_notice':{..._0x68540c,'update':_0x5012c1}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3080bb,_0x1166d5){const _0x444479=a89_0x5563,_0x393adf=_0x3080bb();while(!![]){try{const _0x3ac6cd=-parseInt(_0x444479(0x188))/0x1*(-parseInt(_0x444479(0x18b))/0x2)+-parseInt(_0x444479(0x17f))/0x3+-parseInt(_0x444479(0x18a))/0x4+parseInt(_0x444479(0x17e))/0x5+-parseInt(_0x444479(0x18d))/0x6+-parseInt(_0x444479(0x183))/0x7+parseInt(_0x444479(0x182))/0x8;if(_0x3ac6cd===_0x1166d5)break;else _0x393adf['push'](_0x393adf['shift']());}catch(_0x116976){_0x393adf['push'](_0x393adf['shift']());}}}(a89_0x5bc5,0x39980));import{buildSchemaPayload as a89_0xfff44}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';function a89_0x5bc5(){const _0x32a05c=['has','map','../commands/registry.js','2571ajGYMG','filter','219484zgceHT','2kjfRyj','services','1555680EHwlgL','service','829790xruYie','506799MIGLVI','none','commands','7395904ClloYf','2618203iqxJcW','auth'];a89_0x5bc5=function(){return _0x32a05c;};return a89_0x5bc5();}import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{getCliGitCommit,getCliVersion}from'../utils/version.js';function a89_0x5563(_0x332022,_0x53d97e){_0x332022=_0x332022-0x17e;const _0x5bc57a=a89_0x5bc5();let _0x556395=_0x5bc57a[_0x332022];return _0x556395;}export async function buildSchemaPayload(){const _0xe27a4d=a89_0x5563,{serviceRegistry:_0x508e19,findDefinition:_0x2203bf}=await import(_0xe27a4d(0x187)),_0x174d29=new Set(_0x508e19[_0xe27a4d(0x186)](_0x2e5f1e=>_0x2e5f1e[_0xe27a4d(0x18e)])),_0x143a88=listDynamicServiceEntries()[_0xe27a4d(0x189)](_0x2e3450=>!_0x174d29[_0xe27a4d(0x185)](_0x2e3450['service'])),_0xfc7db5=a89_0xfff44({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':getCliGitCommit(),'globalFlags':GLOBAL_FLAGS,'serviceRegistry':insertDynamicServicesAfterServiceTree(_0x508e19,_0x143a88),'buildAllFlags':buildAllFlags,'findDefinition':(_0x447228,_0xcf4083)=>_0x2203bf(_0x447228,_0xcf4083)??findDynamicServiceDefinition(_0x447228,_0xcf4083)});return normalizeSchemaPayload(_0xfc7db5);}function normalizeSchemaPayload(_0x224f3c){const _0x3ede58=a89_0x5563;return{..._0x224f3c,'schemaVersion':0x2,'services':_0x224f3c[_0x3ede58(0x18c)][_0x3ede58(0x186)](_0xf8d6b7=>({..._0xf8d6b7,'commands':_0xf8d6b7[_0x3ede58(0x181)]['map'](normalizeSchemaCommand)}))};}function normalizeSchemaCommand(_0x4dd5dc){const _0x4131d0=a89_0x5563,_0x213a8f=_0x4dd5dc;return{..._0x4dd5dc,'auth':_0x213a8f[_0x4131d0(0x184)]??(_0x4dd5dc['requiresAuth']?'required':_0x4131d0(0x180))};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a90_0x50d5(_0x32816f,_0x45cbcf){_0x32816f=_0x32816f-0x15d;const _0x16bcd6=a90_0x16bc();let _0x50d511=_0x16bcd6[_0x32816f];return _0x50d511;}(function(_0x720036,_0xe1e7f4){const _0x10f39b=a90_0x50d5,_0x511ecb=_0x720036();while(!![]){try{const _0x10dbee=-parseInt(_0x10f39b(0x164))/0x1+parseInt(_0x10f39b(0x15d))/0x2+parseInt(_0x10f39b(0x160))/0x3*(parseInt(_0x10f39b(0x165))/0x4)+-parseInt(_0x10f39b(0x161))/0x5+-parseInt(_0x10f39b(0x15f))/0x6*(parseInt(_0x10f39b(0x166))/0x7)+parseInt(_0x10f39b(0x15e))/0x8+parseInt(_0x10f39b(0x163))/0x9*(parseInt(_0x10f39b(0x162))/0xa);if(_0x10dbee===_0xe1e7f4)break;else _0x511ecb['push'](_0x511ecb['shift']());}catch(_0x50bbe9){_0x511ecb['push'](_0x511ecb['shift']());}}}(a90_0x16bc,0x26f7d));function a90_0x16bc(){const _0x28fb19=['19430OdbUUQ','393630gtqSEq','108IvrBMA','240431bhqYvp','16788aOwKea','5075XvkaNb','slice','length','44912HQloZN','502336kbsClp','2418exKHSo','99WIxKzY'];a90_0x16bc=function(){return _0x28fb19;};return a90_0x16bc();}export function insertDynamicServicesAfterServiceTree(_0x26a3b8,_0x4c532e){const _0x20b834=a90_0x50d5;if(_0x4c532e[_0x20b834(0x168)]===0x0)return[..._0x26a3b8];const _0xb8246b=_0x26a3b8['findIndex'](_0x20a377=>_0x20a377['service']==='service');if(_0xb8246b<0x0)return[..._0x26a3b8,..._0x4c532e];return[..._0x26a3b8[_0x20b834(0x167)](0x0,_0xb8246b+0x1),..._0x4c532e,..._0x26a3b8[_0x20b834(0x167)](_0xb8246b+0x1)];}
|
package/lib/framework/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a91_0x4a40(_0x8dfc5f,_0x3dd356){_0x8dfc5f=_0x8dfc5f-0xb6;var _0x124819=a91_0x1248();var _0x4a40fb=_0x124819[_0x8dfc5f];return _0x4a40fb;}(function(_0x2dca7f,_0x3ac79d){var _0x1ac3e1=a91_0x4a40,_0x2618e3=_0x2dca7f();while(!![]){try{var _0x5dd2d1=-parseInt(_0x1ac3e1(0xbe))/0x1*(parseInt(_0x1ac3e1(0xbd))/0x2)+parseInt(_0x1ac3e1(0xb9))/0x3*(-parseInt(_0x1ac3e1(0xc2))/0x4)+parseInt(_0x1ac3e1(0xb7))/0x5*(-parseInt(_0x1ac3e1(0xb6))/0x6)+-parseInt(_0x1ac3e1(0xba))/0x7*(parseInt(_0x1ac3e1(0xbf))/0x8)+parseInt(_0x1ac3e1(0xb8))/0x9+-parseInt(_0x1ac3e1(0xc1))/0xa*(-parseInt(_0x1ac3e1(0xbb))/0xb)+-parseInt(_0x1ac3e1(0xc0))/0xc*(-parseInt(_0x1ac3e1(0xbc))/0xd);if(_0x5dd2d1===_0x3ac79d)break;else _0x2618e3['push'](_0x2618e3['shift']());}catch(_0x31f596){_0x2618e3['push'](_0x2618e3['shift']());}}}(a91_0x1248,0x82668));export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';function a91_0x1248(){var _0x23afc7=['13CeQxeN','25136HFzLYU','66mzioZh','55464eiBegI','24933228uGSHzW','36230qvcjxU','32lbtRxH','1792452ePPljw','15DVkLeA','5827338UaaHtc','142473onHXSC','924gLFWVE','2519womRQb'];a91_0x1248=function(){return _0x23afc7;};return a91_0x1248();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a92_0x2821(_0x39f105,_0x5dbbbc){_0x39f105=_0x39f105-0xfa;const _0x302674=a92_0x3026();let _0x282184=_0x302674[_0x39f105];return _0x282184;}const a92_0x44e97c=a92_0x2821;(function(_0x445f15,_0x11eef4){const _0x4ae306=a92_0x2821,_0x2250e4=_0x445f15();while(!![]){try{const _0x849faa=parseInt(_0x4ae306(0xfe))/0x1+parseInt(_0x4ae306(0x100))/0x2*(parseInt(_0x4ae306(0xfb))/0x3)+parseInt(_0x4ae306(0xff))/0x4+-parseInt(_0x4ae306(0x102))/0x5+-parseInt(_0x4ae306(0xfa))/0x6+parseInt(_0x4ae306(0xfc))/0x7+-parseInt(_0x4ae306(0x104))/0x8*(parseInt(_0x4ae306(0x101))/0x9);if(_0x849faa===_0x11eef4)break;else _0x2250e4['push'](_0x2250e4['shift']());}catch(_0x19a2f0){_0x2250e4['push'](_0x2250e4['shift']());}}}(a92_0x3026,0x1acaf));export const VERSION=a92_0x44e97c(0x103);export const GIT_TAG=a92_0x44e97c(0x105);export const GIT_COMMIT=a92_0x44e97c(0xfd);function a92_0x3026(){const _0x6f3396=['v2.1.9-beta.3','873186srUEfH','642216KdpGEQ','595679bOWDjx','195d260','129535SnGKmh','97380HPJjlz','2jxRpuI','64917ijagAk','808550dqmDco','2.1.9-beta.3','40iXfsqd'];a92_0x3026=function(){return _0x6f3396;};return a92_0x3026();}export const BUILD_TIME='2026-07-08T14:53:24.942Z';
|
package/lib/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3c3afa,_0x5485b7){const _0x4fbbe1=a93_0x4900,_0x65b02d=_0x3c3afa();while(!![]){try{const _0x143cc2=-parseInt(_0x4fbbe1(0xe2))/0x1+-parseInt(_0x4fbbe1(0xe3))/0x2+-parseInt(_0x4fbbe1(0xe1))/0x3*(-parseInt(_0x4fbbe1(0xdf))/0x4)+parseInt(_0x4fbbe1(0xe8))/0x5*(parseInt(_0x4fbbe1(0xe6))/0x6)+parseInt(_0x4fbbe1(0xe7))/0x7+parseInt(_0x4fbbe1(0xe4))/0x8+-parseInt(_0x4fbbe1(0xe9))/0x9;if(_0x143cc2===_0x5485b7)break;else _0x65b02d['push'](_0x65b02d['shift']());}catch(_0xefdb67){_0x65b02d['push'](_0x65b02d['shift']());}}}(a93_0x96ae,0x67532));import{jsx as a93_0x4b7c61,jsxs as a93_0x427ea1}from'react/jsx-runtime';import{useEffect}from'react';import{Box,Text,useApp}from'ink';function a93_0x4900(_0x2ca859,_0x339d31){_0x2ca859=_0x2ca859-0xdd;const _0x96ae9e=a93_0x96ae();let _0x490055=_0x96ae9e[_0x2ca859];return _0x490055;}import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function Help(){const _0x503bff=a93_0x4900,{exit:_0x4c2ad4}=useApp();return useEffect(()=>{_0x4c2ad4();},[_0x4c2ad4]),a93_0x427ea1(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a93_0x4b7c61(Box,{'children':a93_0x4b7c61(Text,{'bold':!![],'color':_0x503bff(0xe5),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a93_0x427ea1(Box,{'marginTop':0x1,'children':[a93_0x4b7c61(Text,{'dimColor':!![],'children':_0x503bff(0xde)}),a93_0x4b7c61(Text,{'bold':!![],'color':'green','children':CLI_BIN_NAME+_0x503bff(0xdd)}),a93_0x4b7c61(Text,{'dimColor':!![],'children':_0x503bff(0xe0)})]})]});}function a93_0x96ae(){const _0x4349cd=['green','778074FrzJNu','1986691hTBrjo','5hFNdkL','1157895VPxTSY','\x20--help','\x20\x20Use\x20','169144arAJNQ','\x20to\x20view\x20available\x20commands.','48qBiNNa','517151gVQgHC','64390GqENnP','89208YMfwxh'];a93_0x96ae=function(){return _0x4349cd;};return a93_0x96ae();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a94_0x57ca12=a94_0x4643;(function(_0x594971,_0x5ea182){const _0x2ebeea=a94_0x4643,_0x18b0f8=_0x594971();while(!![]){try{const _0x34c4c9=parseInt(_0x2ebeea(0x170))/0x1+parseInt(_0x2ebeea(0x165))/0x2+-parseInt(_0x2ebeea(0x172))/0x3+parseInt(_0x2ebeea(0x160))/0x4*(-parseInt(_0x2ebeea(0x168))/0x5)+parseInt(_0x2ebeea(0x173))/0x6*(parseInt(_0x2ebeea(0x16e))/0x7)+-parseInt(_0x2ebeea(0x16d))/0x8*(-parseInt(_0x2ebeea(0x163))/0x9)+-parseInt(_0x2ebeea(0x16f))/0xa;if(_0x34c4c9===_0x5ea182)break;else _0x18b0f8['push'](_0x18b0f8['shift']());}catch(_0x24dd08){_0x18b0f8['push'](_0x18b0f8['shift']());}}}(a94_0x27a7,0x71695));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';import{LOVRABET_SKILL_SOURCE as a94_0x5705a6}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';function a94_0x27a7(){const _0x3c8fe6=['1001702rJeUeX','stdout','skills','2797790VQvnwM','npx','skipNpxSkillsEnvSuffix','toString','inherit','14776zlCkju','61278tifTnv','10475780sUOklX','181126mUSecT','stdio','613785dsKOpE','618TxcmJJ','pipe','add','stderr','unknown','4QTtUwQ','join','status','3375qMyfmo','log'];a94_0x27a7=function(){return _0x3c8fe6;};return a94_0x27a7();}export const LOVRABET_SKILL_SOURCE=a94_0x5705a6;export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG[a94_0x57ca12(0x16a)]);export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}function a94_0x4643(_0x1be532,_0x5147ce){_0x1be532=_0x1be532-0x15e;const _0x27a7dc=a94_0x27a7();let _0x46438d=_0x27a7dc[_0x1be532];return _0x46438d;}export function runNpxSkillsAddGlobal(_0x4fdce3,_0x4945aa=LOVRABET_SKILL_SOURCE,_0x22eb92){const _0x51a1ed=a94_0x57ca12;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x30015a=_0x22eb92?.[_0x51a1ed(0x171)]??_0x51a1ed(0x16c),_0x2f9506=resolveNpmBin(_0x51a1ed(0x169)),_0x2a9a11=[_0x51a1ed(0x167),_0x51a1ed(0x175),_0x4945aa,'-g','-y'],_0x333961=[_0x2f9506,..._0x2a9a11][_0x51a1ed(0x161)]('\x20');console[_0x51a1ed(0x164)]('*\x20'+_0x333961);const _0x4142ce=spawnSync(_0x2f9506,_0x2a9a11,{'cwd':_0x4fdce3,'stdio':_0x30015a,'env':process.env,'shell':![]});if(_0x4142ce[_0x51a1ed(0x162)]===0x0)return{'ok':!![],'status':0x0};let _0x1275c6='exit\x20'+(_0x4142ce[_0x51a1ed(0x162)]??_0x51a1ed(0x15f));if(_0x30015a===_0x51a1ed(0x174)){const _0x5b526c=_0x4142ce[_0x51a1ed(0x15e)]?_0x4142ce['stderr'][_0x51a1ed(0x16b)]()['trim']():'',_0x5536c5=_0x4142ce['stdout']?_0x4142ce[_0x51a1ed(0x166)]['toString']()['trim']():'';if(_0x5b526c)_0x1275c6=_0x5b526c;else{if(_0x5536c5)_0x1275c6=_0x5536c5;}}return{'ok':![],'status':_0x4142ce[_0x51a1ed(0x162)]??null,'error':_0x1275c6};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a95_0x27defb=a95_0x27ba;function a95_0x27ba(_0x152880,_0x568f2a){_0x152880=_0x152880-0xaa;const _0x2ab7b0=a95_0x2ab7();let _0x27bad5=_0x2ab7b0[_0x152880];return _0x27bad5;}(function(_0x14bffa,_0x28b08e){const _0x430ad2=a95_0x27ba,_0x4a5725=_0x14bffa();while(!![]){try{const _0x9b88db=parseInt(_0x430ad2(0xb6))/0x1+parseInt(_0x430ad2(0xbd))/0x2*(parseInt(_0x430ad2(0xbc))/0x3)+-parseInt(_0x430ad2(0xad))/0x4*(parseInt(_0x430ad2(0xbb))/0x5)+parseInt(_0x430ad2(0xb9))/0x6+parseInt(_0x430ad2(0xaf))/0x7*(-parseInt(_0x430ad2(0xb5))/0x8)+parseInt(_0x430ad2(0xb2))/0x9+parseInt(_0x430ad2(0xac))/0xa*(-parseInt(_0x430ad2(0xaa))/0xb);if(_0x9b88db===_0x28b08e)break;else _0x4a5725['push'](_0x4a5725['shift']());}catch(_0x35635b){_0x4a5725['push'](_0x4a5725['shift']());}}}(a95_0x2ab7,0x8776f));export const METADATA_FILE=a95_0x27defb(0xba);export const SKILL_FILE=a95_0x27defb(0xb8);export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,'.DS_Store']);export const IGNORED_DIR_NAMES=new Set(['.git',a95_0x27defb(0xae),a95_0x27defb(0xb4),a95_0x27defb(0xb7),a95_0x27defb(0xb0),a95_0x27defb(0xab),'build',a95_0x27defb(0xb3),'.turbo',a95_0x27defb(0xb1)]);function a95_0x2ab7(){const _0x1186fc=['lovrabet.skill.json','5FopSkg','33294MLTtMg','174cJVXTQ','46409nCrBWe','dist','3310hxCGvm','673760gAdOlN','.hg','28AEdRTi','.next','.cache','4744485bIOpAp','coverage','.svn','348256HlkzUo','488946OhTVpy','node_modules','SKILL.md','1873698CBIWRe'];a95_0x2ab7=function(){return _0x1186fc;};return a95_0x2ab7();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xcb11a,_0x39dfce){const _0x250bb9=a96_0x1e41,_0x55d788=_0xcb11a();while(!![]){try{const _0x2b37ba=-parseInt(_0x250bb9(0xbf))/0x1*(parseInt(_0x250bb9(0xba))/0x2)+-parseInt(_0x250bb9(0xab))/0x3+parseInt(_0x250bb9(0xae))/0x4*(-parseInt(_0x250bb9(0xbd))/0x5)+parseInt(_0x250bb9(0xb7))/0x6*(-parseInt(_0x250bb9(0xb9))/0x7)+parseInt(_0x250bb9(0xaf))/0x8+parseInt(_0x250bb9(0xb3))/0x9+parseInt(_0x250bb9(0xb8))/0xa;if(_0x2b37ba===_0x39dfce)break;else _0x55d788['push'](_0x55d788['shift']());}catch(_0x1a240d){_0x55d788['push'](_0x55d788['shift']());}}}(a96_0x5767,0x738ba));import{lstatSync,readlinkSync,realpathSync,renameSync,rmSync,writeFileSync}from'node:fs';import{dirname,isAbsolute,resolve,sep}from'node:path';import{CliErrors}from'../../errors.js';function a96_0x5767(){const _0x3d9714=['endsWith','from','2929914XpLdEx','split','startsWith','.tmp','180IjryfU','16251900COnOft','40082IPgtFp','149062vygOHX','Unsafe\x20Skill\x20file\x20path:\x20','validation','235VDSpnT','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','9hFNaFx','2750499ilTBLJ','utf8','isSymbolicLink','14180REpwSA','3588360zpzQgb','stringify'];a96_0x5767=function(){return _0x3d9714;};return a96_0x5767();}import{normalizeSkillRelativePath}from'./local-files.js';function a96_0x1e41(_0x11dc8c,_0x16d02f){_0x11dc8c=_0x11dc8c-0xab;const _0x57676b=a96_0x5767();let _0x1e4145=_0x57676b[_0x11dc8c];return _0x1e4145;}export function resolveManagedFilePath(_0x436b92,_0x45e27e){const _0x316a03=a96_0x1e41,_0x2b5af2=normalizeSkillRelativePath(_0x45e27e),_0x372238=realOrResolved(_0x436b92),_0xd6d6eb=resolve(_0x372238,..._0x2b5af2[_0x316a03(0xb4)]('/'));if(!isPathInside(_0xd6d6eb,_0x372238))throw CliErrors[_0x316a03(0xbc)](_0x316a03(0xbb)+_0x45e27e);return ensureNoSymlinkInManagedPath(_0x372238,_0x2b5af2),_0xd6d6eb;}export function ensureNoSymlinkInManagedPath(_0x1a3e36,_0xb35d4e){const _0x3a2fba=a96_0x1e41;let _0x44a965=_0x1a3e36;for(const _0x26d7bb of _0xb35d4e[_0x3a2fba(0xb4)]('/')){_0x44a965=resolve(_0x44a965,_0x26d7bb);const _0x46ac83=lstatIfPresent(_0x44a965);if(_0x46ac83?.[_0x3a2fba(0xad)]())throw CliErrors[_0x3a2fba(0xbc)](_0x3a2fba(0xbe)+_0xb35d4e);}}export function isDanglingSymlink(_0x332071){const _0x4d66b8=a96_0x1e41;try{return lstatSync(_0x332071)[_0x4d66b8(0xad)]();}catch{return![];}}export function resolveSymlinkTarget(_0x2c6e85){const _0x4e03a8=readlinkSync(_0x2c6e85);return isAbsolute(_0x4e03a8)?_0x4e03a8:resolve(dirname(_0x2c6e85),_0x4e03a8);}export function isPathInside(_0x408683,_0x1c90c4){const _0x4bec14=a96_0x1e41,_0x385685=_0x408683[_0x4bec14(0xb1)](sep)?_0x408683:''+_0x408683+sep,_0x370bdb=_0x1c90c4['endsWith'](sep)?_0x1c90c4:''+_0x1c90c4+sep;return _0x408683===_0x1c90c4||_0x385685[_0x4bec14(0xb5)](_0x370bdb);}export function realOrResolved(_0x3b970e){try{return realpathSync(_0x3b970e);}catch{return resolve(_0x3b970e);}}export function lstatIfPresent(_0x25c989){try{return lstatSync(_0x25c989);}catch{return undefined;}}export function writeTextAtomic(_0x26cb00,_0x150108,_0x13d830){const _0x363169=a96_0x1e41;writeBytesAtomic(_0x26cb00,Buffer[_0x363169(0xb2)](_0x150108,_0x363169(0xac)),_0x13d830);}export function writeBytesAtomic(_0x145773,_0x22b9d6,_0x585b3e){const _0x489b35=a96_0x1e41,_0x61249e=_0x145773+_0x489b35(0xb6);try{writeFileSync(_0x61249e,_0x22b9d6,{'mode':_0x585b3e}),renameSync(_0x61249e,_0x145773);}catch(_0x48ce8b){try{rmSync(_0x61249e,{'force':!![]});}catch{}throw _0x48ce8b;}}export function writeJsonAtomic(_0x530bd9,_0x23de41){const _0x32d1ae=a96_0x1e41;writeTextAtomic(_0x530bd9,JSON[_0x32d1ae(0xb0)](_0x23de41,null,0x2)+'\x0a',0x180);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x10b4ab,_0x19c08c){const _0x2e1750=a97_0x38c6,_0x3a3aaf=_0x10b4ab();while(!![]){try{const _0xaabe52=-parseInt(_0x2e1750(0x135))/0x1+-parseInt(_0x2e1750(0x134))/0x2+-parseInt(_0x2e1750(0x132))/0x3+-parseInt(_0x2e1750(0x12e))/0x4+-parseInt(_0x2e1750(0x13a))/0x5+parseInt(_0x2e1750(0x136))/0x6+-parseInt(_0x2e1750(0x139))/0x7*(-parseInt(_0x2e1750(0x12d))/0x8);if(_0xaabe52===_0x19c08c)break;else _0x3a3aaf['push'](_0x3a3aaf['shift']());}catch(_0x327de6){_0x3a3aaf['push'](_0x3a3aaf['shift']());}}}(a97_0x49ed,0x336d5));import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0x36f79a){const _0x150928=a97_0x38c6;return createHash(_0x150928(0x130))['update'](_0x36f79a)['digest'](_0x150928(0x133));}function a97_0x38c6(_0x296edc,_0x15c378){_0x296edc=_0x296edc-0x12d;const _0x49ed5c=a97_0x49ed();let _0x38c686=_0x49ed5c[_0x296edc];return _0x38c686;}export function fileHash(_0x305f19){return bufferSha256(fileContent(_0x305f19));}function a97_0x49ed(){const _0x16a343=['349482lZQLPA','path','digest','7509089SMsEBq','534130DcRLUz','8qNojYg','1296384uXFqiW','size','sha256','update','257298wZENza','hex','328170ZXEvvJ','239556SHjrsj'];a97_0x49ed=function(){return _0x16a343;};return a97_0x49ed();}export function bufferSha256(_0x24d26c){const _0x5da2dd=a97_0x38c6;return createHash(_0x5da2dd(0x130))[_0x5da2dd(0x131)](_0x24d26c)[_0x5da2dd(0x138)]('hex');}export function fileTreeHash(_0xb3df91){const _0x47007=a97_0x38c6,_0x2579b5=createHash(_0x47007(0x130));for(const _0x231a3f of normalizeManifestFiles(_0xb3df91)){_0x2579b5[_0x47007(0x131)](_0x231a3f[_0x47007(0x137)]),_0x2579b5['update']('\x00'),_0x2579b5['update'](_0x231a3f[_0x47007(0x130)]),_0x2579b5['update']('\x00'),_0x2579b5['update'](String(_0x231a3f[_0x47007(0x12f)])),_0x2579b5['update']('\x00');}return _0x2579b5['digest']('hex');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x37db6b,_0x57e0ed){const _0xec7cef=a98_0x2e6b,_0x8a0df3=_0x37db6b();while(!![]){try{const _0x4cdc5a=-parseInt(_0xec7cef(0x1f0))/0x1*(-parseInt(_0xec7cef(0x1ee))/0x2)+-parseInt(_0xec7cef(0x1e0))/0x3+parseInt(_0xec7cef(0x1f7))/0x4*(parseInt(_0xec7cef(0x206))/0x5)+-parseInt(_0xec7cef(0x1ec))/0x6*(-parseInt(_0xec7cef(0x1f9))/0x7)+parseInt(_0xec7cef(0x1e6))/0x8+-parseInt(_0xec7cef(0x1f4))/0x9+-parseInt(_0xec7cef(0x1ed))/0xa;if(_0x4cdc5a===_0x57e0ed)break;else _0x8a0df3['push'](_0x8a0df3['shift']());}catch(_0x130235){_0x8a0df3['push'](_0x8a0df3['shift']());}}}(a98_0x512a,0x9e866));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';function a98_0x512a(){const _0x59676b=['external-symlink','isSymbolicLink','env','4991310SgzfPa','trim','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','4HitplZ','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','1211fZKyyn','skipped','slice','has','map','managedRoot','personal','scope','length','removed','pruneSkillCodes','skill','set','4705555jvHWnH','created','contentHash','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','skillCode','validation','filter','updated','2591916SESzll','push','dir','startsWith','not-managed-symlink','name','3767680MTnOTz','company','get','scopes','isDirectory','unchanged','8034lrIWHN','3478690ZKaGHb','1544062yLKkBQ','appCode','1BfVtmZ'];a98_0x512a=function(){return _0x59676b;};return a98_0x512a();}import{basename,dirname,resolve}from'node:path';import a98_0x3e65ef from'fs-extra';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';function a98_0x2e6b(_0x434384,_0x52e4d1){_0x434384=_0x434384-0x1dd;const _0x512a97=a98_0x512a();let _0x2e6b9e=_0x512a97[_0x434384];return _0x2e6b9e;}import{isDanglingSymlink,isPathInside,lstatIfPresent,realOrResolved,resolveSymlinkTarget}from'./fs-utils.js';import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a98_0x3e65ef;export function linkEffectiveRuntimeSkills(_0x138778,_0x4e08e7,_0x2b7d6c={}){const _0x5ea9ef=a98_0x2e6b,_0x1a86b4=new Map();for(const _0x3cbae5 of _0x138778){const _0x9dee4e=_0x3cbae5[_0x5ea9ef(0x204)][_0x5ea9ef(0x20a)];if(!_0x9dee4e)continue;const _0x2d5237=_0x1a86b4[_0x5ea9ef(0x1e8)](_0x9dee4e);(!_0x2d5237||_0x3cbae5['scope']===_0x5ea9ef(0x1ff))&&_0x1a86b4[_0x5ea9ef(0x205)](_0x9dee4e,_0x3cbae5);}const _0x59f5f5=[],_0x5885cf=resolveSkillSyncPaths(_0x2b7d6c);for(const _0x1136a1 of _0x1a86b4['values']()){const _0x1d5cd4=requireSkillCode(_0x1136a1[_0x5ea9ef(0x204)]),_0x557b68=_0x4e08e7+'--'+_0x1d5cd4;for(const _0x5356ee of runtimeAgentSkillRoots(_0x5885cf)){_0x59f5f5[_0x5ea9ef(0x1e1)](ensureManagedSymlink(resolve(_0x5356ee,_0x557b68),_0x1136a1[_0x5ea9ef(0x1e2)],_0x5885cf[_0x5ea9ef(0x1fe)]));}}return _0x59f5f5;}export function pruneStaleRuntimeSkillLinks(_0x30fa07,_0x2c3d79,_0x450a45={},_0x4744f5){const _0x5b8652=a98_0x2e6b,_0x4083e5=resolveSkillSyncPaths(_0x450a45),_0xc9b6e3=new Set([..._0x2c3d79][_0x5b8652(0x1fd)](_0x151f37=>_0x151f37[_0x5b8652(0x1f5)]())[_0x5b8652(0x1de)](Boolean)),_0x14496d=_0x4744f5?new Set([..._0x4744f5]['map'](_0x4f7dc6=>_0x4f7dc6[_0x5b8652(0x1f5)]())[_0x5b8652(0x1de)](Boolean)):undefined,_0x339d3c=[];for(const _0x559def of runtimeAgentSkillRoots(_0x4083e5)){for(const _0x5a6b61 of managedAppSkillLinkPaths(_0x559def,_0x30fa07)){const _0x193f01=basename(_0x5a6b61)[_0x5b8652(0x1fb)]((_0x30fa07+'--')[_0x5b8652(0x201)]);if(_0x14496d&&!_0x14496d[_0x5b8652(0x1fc)](_0x193f01))continue;if(_0xc9b6e3[_0x5b8652(0x1fc)](_0x193f01))continue;_0x339d3c['push'](removeManagedSkillLink(_0x5a6b61,_0x4083e5[_0x5b8652(0x1fe)]));}}return _0x339d3c;}export function pruneStaleRuntimeSkillCache(_0x2a320d,_0x31caa5={}){const _0x21085c=a98_0x2e6b,_0x2c51bf=new Set([..._0x2a320d['activeSkillCodes']][_0x21085c(0x1fd)](_0x45af21=>_0x45af21[_0x21085c(0x1f5)]())[_0x21085c(0x1de)](Boolean)),_0x3304ba=_0x2a320d[_0x21085c(0x203)]?new Set([..._0x2a320d[_0x21085c(0x203)]][_0x21085c(0x1fd)](_0x50dcbf=>_0x50dcbf[_0x21085c(0x1f5)]())[_0x21085c(0x1de)](Boolean)):undefined,_0x8a142e=_0x2a320d[_0x21085c(0x1e9)]??[_0x21085c(0x1ff),_0x21085c(0x1e7)],_0x160373=resolve(getRuntimeSkillCacheRoot(_0x2a320d[_0x21085c(0x1f3)],_0x2a320d['accessKey'],_0x31caa5),safePathSegment(_0x2a320d[_0x21085c(0x1ef)],_0x21085c(0x1ef))),_0x35c2a3=[];for(const _0x3ef34e of _0x8a142e){const _0xb41694=resolve(_0x160373,_0x3ef34e);if(!existsSync(_0xb41694))continue;for(const _0x549dd2 of readdirSync(_0xb41694,{'withFileTypes':!![]})){if(!_0x549dd2[_0x21085c(0x1ea)]())continue;const _0x4d0e01=_0x549dd2['name'];if(_0x3304ba&&!_0x3304ba['has'](_0x4d0e01))continue;if(_0x2c51bf['has'](_0x4d0e01))continue;const _0x43dc73=resolve(_0xb41694,_0x4d0e01),_0x3e3252=readMetadataIfPresent(resolve(_0x43dc73,METADATA_FILE));if(_0x3e3252?.[_0x21085c(0x1ef)]!==_0x2a320d[_0x21085c(0x1ef)]||_0x3e3252[_0x21085c(0x200)]!==_0x3ef34e||_0x3e3252[_0x21085c(0x20a)]!==_0x4d0e01){_0x35c2a3[_0x21085c(0x1e1)]({'path':_0x43dc73,'action':_0x21085c(0x1fa),'reason':'metadata-mismatch'});continue;}removeSync(_0x43dc73),_0x35c2a3['push']({'path':_0x43dc73,'action':_0x21085c(0x202)});}}return _0x35c2a3;}export function linkGlobalRuntimeSkills(_0x12c5dc,_0x13326b={}){const _0x103cb5=a98_0x2e6b,_0x104878=resolveSkillSyncPaths(_0x13326b),_0x28302f=[];for(const _0x3a6cb4 of _0x12c5dc){if(_0x3a6cb4[_0x103cb5(0x200)]!=='builtin')throw CliErrors[_0x103cb5(0x1dd)]('Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20'+_0x3a6cb4[_0x103cb5(0x200)]);const _0x1e9d0f=requireSkillCode(_0x3a6cb4[_0x103cb5(0x204)]),_0x379a62=copyManagedSkillDirectory(_0x3a6cb4[_0x103cb5(0x1e2)],resolve(_0x104878['agentsSkillsDir'],_0x1e9d0f));_0x28302f['push']({..._0x379a62,'contentHash':_0x3a6cb4[_0x103cb5(0x208)]});}return _0x28302f;}function ensureManagedSymlink(_0xaeabb1,_0x255c6a,_0x6a2105){const _0x45181e=a98_0x2e6b;mkdirSync(dirname(_0xaeabb1),{'recursive':!![],'mode':0x1c0});if(existsSync(_0xaeabb1)||isDanglingSymlink(_0xaeabb1)){const _0x3ba224=lstatSync(_0xaeabb1);if(!_0x3ba224['isSymbolicLink']())throw CliErrors[_0x45181e(0x1dd)](_0x45181e(0x1f6)+_0xaeabb1);const _0x5ed71a=resolveSymlinkTarget(_0xaeabb1);if(!isPathInside(realOrResolved(_0x5ed71a),realOrResolved(_0x6a2105)))throw CliErrors[_0x45181e(0x1dd)]('Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20'+_0xaeabb1);if(realOrResolved(_0x5ed71a)===realOrResolved(_0x255c6a))return{'path':_0xaeabb1,'target':_0x255c6a,'action':_0x45181e(0x1eb)};return unlinkSync(_0xaeabb1),symlinkSync(_0x255c6a,_0xaeabb1,'dir'),{'path':_0xaeabb1,'target':_0x255c6a,'action':_0x45181e(0x1df)};}return symlinkSync(_0x255c6a,_0xaeabb1,_0x45181e(0x1e2)),{'path':_0xaeabb1,'target':_0x255c6a,'action':_0x45181e(0x207)};}function managedAppSkillLinkPaths(_0x28788a,_0x28a124){const _0x4fca0f=a98_0x2e6b;if(!existsSync(_0x28788a))return[];const _0x439788=_0x28a124+'--';return readdirSync(_0x28788a,{'withFileTypes':!![]})[_0x4fca0f(0x1de)](_0x1e09d9=>_0x1e09d9[_0x4fca0f(0x1e5)][_0x4fca0f(0x1e3)](_0x439788))[_0x4fca0f(0x1fd)](_0x11f171=>resolve(_0x28788a,_0x11f171[_0x4fca0f(0x1e5)]));}function removeManagedSkillLink(_0xba8051,_0x5b4bf2){const _0x3d17a6=a98_0x2e6b,_0x2b11fd=lstatIfPresent(_0xba8051);if(!_0x2b11fd?.['isSymbolicLink']())return{'path':_0xba8051,'action':_0x3d17a6(0x1fa),'reason':_0x3d17a6(0x1e4)};const _0x552481=resolveSymlinkTarget(_0xba8051);if(!isPathInside(realOrResolved(_0x552481),realOrResolved(_0x5b4bf2)))return{'path':_0xba8051,'action':_0x3d17a6(0x1fa),'reason':_0x3d17a6(0x1f1)};return unlinkSync(_0xba8051),{'path':_0xba8051,'action':_0x3d17a6(0x202)};}export function copyManagedSkillDirectory(_0x3a17a5,_0x56c871){const _0x415434=a98_0x2e6b,_0x52da29=resolve(_0x56c871,METADATA_FILE),_0x115449=existsSync(_0x56c871);if(_0x115449){const _0x319821=lstatSync(_0x56c871);if(_0x319821[_0x415434(0x1f2)]())throw CliErrors[_0x415434(0x1dd)](_0x415434(0x1f8)+_0x56c871);if(!_0x319821[_0x415434(0x1ea)]())throw CliErrors[_0x415434(0x1dd)]('Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20'+_0x56c871);const _0x17b9f5=readMetadataIfPresent(_0x52da29);if(_0x17b9f5?.[_0x415434(0x200)]!=='builtin')throw CliErrors[_0x415434(0x1dd)](_0x415434(0x209)+_0x56c871);}ensureDirSync(dirname(_0x56c871));const _0x20f713=_0x115449?readMetadataIfPresent(_0x52da29)?.[_0x415434(0x208)]:undefined,_0x4186cb=readMetadataIfPresent(resolve(_0x3a17a5,METADATA_FILE))?.['contentHash'];return _0x115449&&removeSync(_0x56c871),copySkillDirectory(_0x3a17a5,_0x56c871),{'path':_0x56c871,'target':_0x3a17a5,'action':!_0x115449?_0x415434(0x207):_0x20f713===_0x4186cb?_0x415434(0x1eb):_0x415434(0x1df)};}function copySkillDirectory(_0xbba6f,_0xcf575d){copySync(_0xbba6f,_0xcf575d,{'dereference':![],'overwrite':!![],'filter'(_0x3353d7){const _0x2a73f3=a98_0x2e6b;if(lstatSync(_0x3353d7)[_0x2a73f3(0x1f2)]())throw CliErrors[_0x2a73f3(0x1dd)]('Refusing\x20to\x20copy\x20Skill\x20symlink:\x20'+_0x3353d7);return!![];}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xe8de08,_0x296f35){const _0x421a2b=a99_0x5b07,_0x50ecc6=_0xe8de08();while(!![]){try{const _0x3963ee=-parseInt(_0x421a2b(0x177))/0x1+-parseInt(_0x421a2b(0x171))/0x2+-parseInt(_0x421a2b(0x174))/0x3*(-parseInt(_0x421a2b(0x16a))/0x4)+parseInt(_0x421a2b(0x16e))/0x5*(parseInt(_0x421a2b(0x16b))/0x6)+parseInt(_0x421a2b(0x178))/0x7+-parseInt(_0x421a2b(0x184))/0x8+parseInt(_0x421a2b(0x175))/0x9;if(_0x3963ee===_0x296f35)break;else _0x50ecc6['push'](_0x50ecc6['shift']());}catch(_0x28c106){_0x50ecc6['push'](_0x50ecc6['shift']());}}}(a99_0xb6e6,0xb9856));import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{readMetadataIfPresent}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0x524c3b,_0x531438={}){const _0x5eb2fc=a99_0x5b07,_0x50da4b=safePathSegment(_0x524c3b[_0x5eb2fc(0x188)],_0x5eb2fc(0x188)),_0x5e5d93=normalizeRuntimeSkillScopes(_0x524c3b[_0x5eb2fc(0x18a)]),_0x481842=new Set(_0x5e5d93),_0x356453=_0x524c3b[_0x5eb2fc(0x170)]?.['trim'](),_0x1d9823=new Map(),_0x58b419=resolve(getRuntimeSkillCacheRoot(_0x524c3b[_0x5eb2fc(0x180)],_0x524c3b['accessKey'],_0x531438),_0x50da4b);for(const _0x5932e4 of _0x5e5d93){for(const _0x16e865 of localSkillEntryDirs(resolve(_0x58b419,_0x5932e4))){collectLocalRuntimeSkill(_0x1d9823,_0x16e865,{'appCode':_0x50da4b,'scopes':_0x481842,'code':_0x356453,'source':_0x5eb2fc(0x167)});}}const _0x454671=resolveSkillSyncPaths(_0x531438);for(const _0x55af58 of runtimeAgentSkillRoots(_0x454671)){for(const _0x40a6d6 of localSkillLinkCandidates(_0x55af58,_0x50da4b,_0x481842)){collectLocalRuntimeSkill(_0x1d9823,_0x40a6d6,{'appCode':_0x50da4b,'scopes':_0x481842,'code':_0x356453,'source':_0x5eb2fc(0x18c),'linkedPath':_0x40a6d6});}}return Array[_0x5eb2fc(0x189)](_0x1d9823[_0x5eb2fc(0x17b)]())[_0x5eb2fc(0x18e)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x54cc9){const _0x35fbf9=a99_0x5b07;if(!existsSync(_0x54cc9))return[];return readdirSync(_0x54cc9,{'withFileTypes':!![]})[_0x35fbf9(0x186)](_0x9ec2ca=>_0x9ec2ca['isDirectory']()||_0x9ec2ca[_0x35fbf9(0x185)]())[_0x35fbf9(0x179)](_0x4450a4=>resolve(_0x54cc9,_0x4450a4[_0x35fbf9(0x181)]));}function localSkillLinkCandidates(_0x4fb756,_0x283e28,_0x332658){const _0x4b3f4d=a99_0x5b07;if(!existsSync(_0x4fb756))return[];const _0x5365bd=_0x283e28+'--';return readdirSync(_0x4fb756,{'withFileTypes':!![]})['filter'](_0x16d765=>_0x16d765[_0x4b3f4d(0x18d)]()||_0x16d765[_0x4b3f4d(0x185)]())['filter'](_0x26e541=>_0x26e541[_0x4b3f4d(0x181)]['startsWith'](_0x5365bd)||_0x332658[_0x4b3f4d(0x168)](_0x4b3f4d(0x187)))['map'](_0x4c728e=>resolve(_0x4fb756,_0x4c728e['name']));}function a99_0x5b07(_0x4094b3,_0x9d2696){_0x4094b3=_0x4094b3-0x166;const _0xb6e68=a99_0xb6e6();let _0x5b07a5=_0xb6e68[_0x4094b3];return _0x5b07a5;}function collectLocalRuntimeSkill(_0x170a7b,_0x1a5efd,_0x59cd05){const _0xbc60b8=a99_0x5b07,_0x5d6407=resolve(_0x1a5efd,METADATA_FILE),_0x40c774=readMetadataIfPresent(_0x5d6407);if(!_0x40c774)return;if(_0x40c774['appCode']!==_0x59cd05[_0xbc60b8(0x188)])return;if(!isRuntimeSkillScope(_0x40c774['scope'])||!_0x59cd05[_0xbc60b8(0x18a)][_0xbc60b8(0x168)](_0x40c774[_0xbc60b8(0x17a)]))return;const _0x3c1754=_0x40c774[_0xbc60b8(0x166)]?.['trim']();if(!_0x3c1754)return;if(_0x59cd05[_0xbc60b8(0x170)]&&_0x3c1754!==_0x59cd05[_0xbc60b8(0x170)])return;const _0x3c00aa=_0x40c774['scope']+':'+_0x3c1754,_0x5c3d26=_0x59cd05['linkedPath']?[_0x59cd05[_0xbc60b8(0x16d)]]:[],_0x52f158=_0x170a7b[_0xbc60b8(0x182)](_0x3c00aa);if(_0x52f158){_0x59cd05[_0xbc60b8(0x17c)]==='cache'&&(_0x52f158[_0xbc60b8(0x18b)]=_0x1a5efd,_0x52f158[_0xbc60b8(0x183)]=_0x1a5efd,_0x52f158[_0xbc60b8(0x17f)]=resolve(_0x1a5efd,SKILL_FILE),_0x52f158[_0xbc60b8(0x172)]=_0x5d6407);for(const _0x4e6201 of _0x5c3d26){!_0x52f158[_0xbc60b8(0x16f)][_0xbc60b8(0x17e)](_0x4e6201)&&_0x52f158['linkedPaths']['push'](_0x4e6201);}_0x52f158['linkedPaths'][_0xbc60b8(0x18e)]();return;}_0x170a7b[_0xbc60b8(0x16c)](_0x3c00aa,{..._0x40c774,'tags':Array[_0xbc60b8(0x176)](_0x40c774[_0xbc60b8(0x17d)])?_0x40c774[_0xbc60b8(0x17d)]:[],'scope':_0x40c774[_0xbc60b8(0x17a)],'source':_0xbc60b8(0x173),'dir':_0x1a5efd,'cacheDir':_0x59cd05[_0xbc60b8(0x17c)]===_0xbc60b8(0x167)?_0x1a5efd:undefined,'skillMdPath':resolve(_0x1a5efd,SKILL_FILE),'metadataPath':_0x5d6407,'linkedPaths':_0x5c3d26});}function compareLocalRuntimeSkills(_0x3bc73a,_0x1d8562){const _0x57f42c=a99_0x5b07,_0x2af3bb={'personal':0x0,'company':0x1,'builtin':0x2};return _0x2af3bb[_0x3bc73a[_0x57f42c(0x17a)]]-_0x2af3bb[_0x1d8562['scope']]||_0x3bc73a[_0x57f42c(0x166)][_0x57f42c(0x169)](_0x1d8562[_0x57f42c(0x166)])||_0x3bc73a[_0x57f42c(0x18b)][_0x57f42c(0x169)](_0x1d8562['dir']);}function a99_0xb6e6(){const _0x37d655=['local','2010117XjgNOh','6375888QuoZhy','isArray','182940smujSI','5067972LsbyZq','map','scope','values','source','tags','includes','skillMdPath','env','name','get','cacheDir','6445544Ckxejq','isSymbolicLink','filter','builtin','appCode','from','scopes','dir','link','isDirectory','sort','skillCode','cache','has','localeCompare','8EcJdGY','30tFDDYp','set','linkedPath','217395LJByyU','linkedPaths','code','2482748NIFkzq','metadataPath'];a99_0xb6e6=function(){return _0x37d655;};return a99_0xb6e6();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x25cc53,_0x3bac47){const _0x2c2a09=a100_0x270d,_0x589e3b=_0x25cc53();while(!![]){try{const _0x3b3f80=parseInt(_0x2c2a09(0x174))/0x1*(-parseInt(_0x2c2a09(0x181))/0x2)+parseInt(_0x2c2a09(0x186))/0x3+parseInt(_0x2c2a09(0x17d))/0x4*(parseInt(_0x2c2a09(0x17b))/0x5)+parseInt(_0x2c2a09(0x18c))/0x6+-parseInt(_0x2c2a09(0x190))/0x7*(-parseInt(_0x2c2a09(0x173))/0x8)+-parseInt(_0x2c2a09(0x16e))/0x9+-parseInt(_0x2c2a09(0x17a))/0xa;if(_0x3b3f80===_0x3bac47)break;else _0x589e3b['push'](_0x589e3b['shift']());}catch(_0x39e827){_0x589e3b['push'](_0x589e3b['shift']());}}}(a100_0x17fe,0xa75dc));function a100_0x17fe(){const _0x30ebbf=['Duplicate\x20Skill\x20file\x20path:\x20','localeCompare','size','length','11487930ZUCSEO','3175000Aglqla','Unsafe\x20Skill\x20file\x20path:\x20','8xODNID','content','isSafeInteger','sha256','6ngvNuO','name','split','Skill\x20file\x20size\x20is\x20invalid:\x20','isDirectory','2495520ezimzK','Skill\x20file\x20sha256\x20is\x20invalid:\x20','path','push','includes','sort','4881516zonfuO','isBuffer','test','Skill\x20file\x20path\x20must\x20be\x20text.','21DRUMWj','bytes','validation','utf8','values','object','toLowerCase','has','compare','replace','11116629waGxeX','trim','set','from','string','2520776diZUJc','263737OUajrM','isArray'];a100_0x17fe=function(){return _0x30ebbf;};return a100_0x17fe();}import{readFileSync,readdirSync,realpathSync}from'node:fs';import{relative,resolve}from'node:path';import{CliErrors}from'../../errors.js';function a100_0x270d(_0x4701c0,_0x28cafe){_0x4701c0=_0x4701c0-0x168;const _0x17fee5=a100_0x17fe();let _0x270d20=_0x17fee5[_0x4701c0];return _0x270d20;}import{IGNORED_DIR_NAMES,IGNORED_FILE_NAMES,SKILL_FILE}from'./constants.js';export function fileContent(_0x275a75){const _0x4e4474=a100_0x270d;return _0x275a75[_0x4e4474(0x191)]??Buffer['from'](_0x275a75[_0x4e4474(0x17e)]??'','utf8');}export function fileText(_0x532ed3){const _0x45ffc4=a100_0x270d;return fileContent(_0x532ed3)['toString'](_0x45ffc4(0x193));}export function normalizeLocalFiles(_0x56cd46){const _0x20bc22=a100_0x270d;if(!Array['isArray'](_0x56cd46)||_0x56cd46['length']===0x0)return[];const _0x5e48d8=new Map();for(const _0x5e3010 of _0x56cd46){if(!_0x5e3010||typeof _0x5e3010!=='object'||typeof _0x5e3010['path']!==_0x20bc22(0x172))throw CliErrors[_0x20bc22(0x192)](_0x20bc22(0x18f));const _0x45e197=normalizeSkillRelativePath(_0x5e3010[_0x20bc22(0x188)]);if(_0x5e48d8[_0x20bc22(0x16b)](_0x45e197))throw CliErrors[_0x20bc22(0x192)](_0x20bc22(0x176)+_0x45e197);if(_0x5e3010[_0x20bc22(0x191)]!==undefined&&!Buffer[_0x20bc22(0x18d)](_0x5e3010[_0x20bc22(0x191)]))throw CliErrors[_0x20bc22(0x192)]('Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20'+_0x45e197);if(_0x5e3010['bytes']===undefined&&typeof _0x5e3010[_0x20bc22(0x17e)]!==_0x20bc22(0x172))throw CliErrors[_0x20bc22(0x192)]('Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20'+_0x45e197);const _0x8a33e3=fileContent(_0x5e3010);_0x5e48d8[_0x20bc22(0x170)](_0x45e197,{'path':_0x45e197,'bytes':_0x8a33e3});}return Array[_0x20bc22(0x171)](_0x5e48d8[_0x20bc22(0x168)]())[_0x20bc22(0x18b)](compareSkillFiles);}export function normalizeManifestFiles(_0x4047b7){const _0x1607d1=a100_0x270d;if(!Array[_0x1607d1(0x175)](_0x4047b7)||_0x4047b7[_0x1607d1(0x179)]===0x0)return[];const _0x3a434e=new Map();for(const _0x24c6bc of _0x4047b7){if(!_0x24c6bc||typeof _0x24c6bc!==_0x1607d1(0x169)||typeof _0x24c6bc[_0x1607d1(0x188)]!==_0x1607d1(0x172))throw CliErrors['validation'](_0x1607d1(0x18f));const _0x19a8ee=normalizeSkillRelativePath(_0x24c6bc[_0x1607d1(0x188)]);if(_0x3a434e[_0x1607d1(0x16b)](_0x19a8ee))throw CliErrors[_0x1607d1(0x192)](_0x1607d1(0x176)+_0x19a8ee);if(!isSha256Hex(_0x24c6bc[_0x1607d1(0x180)]))throw CliErrors[_0x1607d1(0x192)](_0x1607d1(0x187)+_0x19a8ee);if(!Number[_0x1607d1(0x17f)](_0x24c6bc['size'])||_0x24c6bc[_0x1607d1(0x178)]<0x0)throw CliErrors['validation'](_0x1607d1(0x184)+_0x19a8ee);_0x3a434e[_0x1607d1(0x170)](_0x19a8ee,{'path':_0x19a8ee,'sha256':_0x24c6bc[_0x1607d1(0x180)][_0x1607d1(0x16a)](),'size':_0x24c6bc[_0x1607d1(0x178)]});}return Array[_0x1607d1(0x171)](_0x3a434e[_0x1607d1(0x168)]())[_0x1607d1(0x18b)](compareSkillFiles);}export function scanSkillDirectory(_0x4e9029){const _0x423b12=realpathSync(_0x4e9029),_0x242ef1=[];function _0x132d00(_0x1d38cc){const _0x4bf93e=a100_0x270d,_0x5f2372=readdirSync(_0x1d38cc,{'withFileTypes':!![]})[_0x4bf93e(0x18b)]((_0x3535d8,_0x5d5682)=>_0x3535d8['name'][_0x4bf93e(0x177)](_0x5d5682[_0x4bf93e(0x182)]));for(const _0x5d4080 of _0x5f2372){if(_0x5d4080[_0x4bf93e(0x185)]()&&IGNORED_DIR_NAMES[_0x4bf93e(0x16b)](_0x5d4080['name']))continue;if(IGNORED_FILE_NAMES[_0x4bf93e(0x16b)](_0x5d4080[_0x4bf93e(0x182)]))continue;const _0x2d636d=resolve(_0x1d38cc,_0x5d4080['name']);if(_0x5d4080['isSymbolicLink']())throw CliErrors[_0x4bf93e(0x192)]('Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20'+_0x2d636d);const _0x152401=toPosixPath(relative(_0x423b12,_0x2d636d));if(_0x5d4080['isDirectory']()){_0x132d00(_0x2d636d);continue;}if(!_0x5d4080['isFile']())continue;validateSkillRelativePath(_0x152401);const _0x41f707=readFileSync(_0x2d636d);_0x242ef1[_0x4bf93e(0x189)]({'path':_0x152401,'bytes':_0x41f707});}}return _0x132d00(_0x423b12),normalizeLocalFiles(_0x242ef1);}export function compareSkillFiles(_0x3c3662,_0x4b7888){const _0x4f55b2=a100_0x270d;if(_0x3c3662[_0x4f55b2(0x188)]===SKILL_FILE)return _0x4b7888[_0x4f55b2(0x188)]===SKILL_FILE?0x0:-0x1;if(_0x4b7888['path']===SKILL_FILE)return 0x1;return Buffer[_0x4f55b2(0x16c)](Buffer[_0x4f55b2(0x171)](_0x3c3662[_0x4f55b2(0x188)],_0x4f55b2(0x193)),Buffer[_0x4f55b2(0x171)](_0x4b7888[_0x4f55b2(0x188)],_0x4f55b2(0x193)));}export function normalizeSkillRelativePath(_0x4c6294){const _0x4e9b38=a100_0x270d,_0x5dbd11=toPosixPath(_0x4c6294[_0x4e9b38(0x16f)]());return validateSkillRelativePath(_0x5dbd11),_0x5dbd11;}export function validateSkillRelativePath(_0x431961){const _0x2242b3=a100_0x270d;if(!_0x431961||_0x431961['startsWith']('/')||_0x431961[_0x2242b3(0x18a)]('//'))throw CliErrors[_0x2242b3(0x192)](_0x2242b3(0x17c)+_0x431961);for(const _0x287ed7 of _0x431961[_0x2242b3(0x183)]('/')){if(!_0x287ed7||_0x287ed7==='.'||_0x287ed7==='..')throw CliErrors[_0x2242b3(0x192)](_0x2242b3(0x17c)+_0x431961);}}export function toPosixPath(_0x39b063){const _0x5510cc=a100_0x270d;return _0x39b063[_0x5510cc(0x16d)](/\\/g,'/');}export function isSha256Hex(_0x4bcd66){const _0x325e12=a100_0x270d;return typeof _0x4bcd66===_0x325e12(0x172)&&/^[a-fA-F0-9]{64}$/[_0x325e12(0x18e)](_0x4bcd66);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x35394a,_0x1df660){const _0x29021b=a101_0x5461,_0x2d3b5f=_0x35394a();while(!![]){try{const _0x2c1b31=parseInt(_0x29021b(0xdd))/0x1+-parseInt(_0x29021b(0xe8))/0x2+parseInt(_0x29021b(0xfc))/0x3+-parseInt(_0x29021b(0x10a))/0x4*(parseInt(_0x29021b(0xf0))/0x5)+-parseInt(_0x29021b(0x10c))/0x6*(-parseInt(_0x29021b(0xe5))/0x7)+-parseInt(_0x29021b(0xf5))/0x8+parseInt(_0x29021b(0xe3))/0x9;if(_0x2c1b31===_0x1df660)break;else _0x2d3b5f['push'](_0x2d3b5f['shift']());}catch(_0x15679a){_0x2d3b5f['push'](_0x2d3b5f['shift']());}}}(a101_0xa4ea,0x4e3dc));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{isCollection,isMap,isNode,parseDocument,visit}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';import{bufferSha256,contentHash,fileHash}from'./hashing.js';import{fileContent,fileText,normalizeLocalFiles}from'./local-files.js';import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0x4d42d0,_0x43faf9,_0x52b2fc){const _0x55cb06=a101_0x5461,_0x4df7fb=requireSkillCode(_0x4d42d0),_0x4bbe5f=requirePackageBytes(_0x4df7fb,_0x52b2fc[_0x55cb06(0xee)]),_0xf3df22=extractDownloadedPackage(_0x4bbe5f),_0x13e3df=_0xf3df22[_0x55cb06(0x100)](_0x5ae08f=>_0x5ae08f[_0x55cb06(0x102)]===SKILL_FILE);if(!_0x13e3df)throw CliErrors[_0x55cb06(0xf6)](_0x55cb06(0xf2)+SKILL_FILE+':\x20'+_0x4df7fb);const _0x2dcf56=withMaterializedSkillFrontmatter(_0xf3df22,_0x4d42d0,_0x4df7fb),_0x157a60=_0x2dcf56[_0x55cb06(0x100)](_0x10de23=>_0x10de23[_0x55cb06(0x102)]===SKILL_FILE),_0x324cb1=fileText(_0x157a60),_0x5145bf=getRuntimeSkillDir(_0x52b2fc[_0x55cb06(0xf7)],_0x52b2fc[_0x55cb06(0xef)],_0x52b2fc[_0x55cb06(0xf8)],_0x43faf9,_0x4df7fb,_0x52b2fc['paths']),_0x2a7f48=resolve(_0x5145bf,SKILL_FILE),_0x1b831a=resolve(_0x5145bf,METADATA_FILE),_0x4e50d6=contentHash(_0x324cb1),_0x2ce560=readMetadataIfPresent(_0x1b831a)?.[_0x55cb06(0xe0)];ensurePulledFilesCanBeOverwritten(_0x5145bf,_0x1b831a,_0x2dcf56,_0x52b2fc['force']===!![]),mkdirSync(_0x5145bf,{'recursive':!![],'mode':0x1c0});const _0x5871e0=existsSync(_0x2a7f48)?readFileSync(_0x2a7f48,'utf8'):undefined;return materializeFiles(_0x5145bf,_0x2dcf56),removeStaleManagedFiles(_0x5145bf,_0x2ce560,_0x2dcf56),writeJsonAtomic(_0x1b831a,buildMetadata(_0x4d42d0,_0x43faf9,_0x52b2fc[_0x55cb06(0xf8)],_0x4e50d6,_0x52b2fc['pulledAt'],_0x2dcf56,_0x4bbe5f)),{'skill':_0x4d42d0,'scope':_0x43faf9,'dir':_0x5145bf,'skillMdPath':_0x2a7f48,'metadataPath':_0x1b831a,'contentHash':_0x4e50d6,'changed':_0x5871e0!==_0x324cb1};}function withMaterializedSkillFrontmatter(_0x4a0d51,_0x181153,_0x235086){const _0x203dcf=a101_0x5461,_0x5cb34d=skillDisplayName(_0x181153,_0x235086),_0x4ede13=_0x181153[_0x203dcf(0xdf)]?.['trim']()||_0x5cb34d||_0x235086;return normalizeLocalFiles(_0x4a0d51)[_0x203dcf(0x110)](_0x1937dc=>{const _0xf49b20=_0x203dcf,_0x3c1a75=fileText(_0x1937dc);if(_0x1937dc['path']!==SKILL_FILE)return _0x1937dc;if(hasYamlFrontmatter(_0x3c1a75))return{'path':_0x1937dc['path'],'content':withSyncedDisplayName(_0x3c1a75,_0x5cb34d)};return{'path':_0x1937dc[_0xf49b20(0x102)],'content':prependSkillFrontmatter(_0x3c1a75,{'name':_0x235086,'displayName':_0x5cb34d,'description':_0x4ede13})};});}function hasYamlFrontmatter(_0x1a62f6){return/^\uFEFF?---\s*\r?\n/['test'](_0x1a62f6);}function prependSkillFrontmatter(_0x41dc9b,_0x37cd4a){const _0x6643bb=a101_0x5461,_0x48754b=_0x41dc9b[_0x6643bb(0xfb)](/^\uFEFF/,'');return['---','name:\x20'+yamlString(_0x37cd4a[_0x6643bb(0x104)]),_0x37cd4a[_0x6643bb(0xfd)]?'displayName:\x20'+yamlString(_0x37cd4a[_0x6643bb(0xfd)]):undefined,'description:\x20'+yamlString(_0x37cd4a[_0x6643bb(0xdf)]),_0x6643bb(0xec),'',_0x48754b][_0x6643bb(0x10d)](_0x4b5a2f=>_0x4b5a2f!==undefined)[_0x6643bb(0xe7)]('\x0a');}function yamlString(_0x591c7d){const _0x2af12e=a101_0x5461;return JSON['stringify'](_0x591c7d[_0x2af12e(0xfb)](/\r/g,'')[_0x2af12e(0x101)]());}function skillDisplayName(_0x226da9,_0x186654){const _0x2210bb=a101_0x5461,_0x3391bb=_0x226da9[_0x2210bb(0xfe)]?.[_0x2210bb(0x101)]();return _0x3391bb||_0x186654;}function a101_0xa4ea(){const _0x7cf4bc=['214332owBnni','filter','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','match','map','276317dKKJRz','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','description','fileHashes','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','utf8','2284830Uuqeez','entries','105ZJHUvz','---\x0a','join','267902aBTIbI','contentHash','contents','isFile','---','.\x20Changed\x20file:\x20','packageBytes','accessKey','145705dcyPfC','toString','Runtime\x20Skill\x20package\x20is\x20missing\x20','errors','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','4974112nHLteW','validation','env','appCode','length','delete','replace','992175asKkSp','displayName','skillName','has','find','trim','path','keys','name','slice','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','set','flow','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','44zhYeTh','Managed\x20file\x20was\x20removed\x20locally:\x20'];a101_0xa4ea=function(){return _0x7cf4bc;};return a101_0xa4ea();}function withSyncedDisplayName(_0x178881,_0x5106b1){const _0x10bf8a=a101_0x5461,_0x7b6edc=_0x178881[_0x10bf8a(0x10f)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x7b6edc)return _0x178881;const _0x4456da=_0x7b6edc[0x1]??'',_0x5e0854=_0x7b6edc[0x2]??'',_0x5e6fc7=parseDocument(_0x5e0854);if(_0x5e6fc7[_0x10bf8a(0xf3)][_0x10bf8a(0xf9)]>0x0||!isMap(_0x5e6fc7[_0x10bf8a(0xea)]))return _0x178881;if(_0x5106b1)_0x5e6fc7[_0x10bf8a(0x107)]('displayName',_0x5106b1);else{if(_0x5e6fc7[_0x10bf8a(0xff)](_0x10bf8a(0xfd)))_0x5e6fc7[_0x10bf8a(0xfa)](_0x10bf8a(0xfd));else return _0x178881;}forceBlockCollections(_0x5e6fc7['contents']);const _0x36a365=_0x5e6fc7[_0x10bf8a(0xf1)]({'lineWidth':0x0})['trimEnd'](),_0x63de61=_0x178881[_0x10bf8a(0x105)](_0x7b6edc[0x0][_0x10bf8a(0xf9)])[_0x10bf8a(0xfb)](/^\r?\n/,'');return _0x4456da+_0x10bf8a(0xe6)+_0x36a365+'\x0a---\x0a\x0a'+_0x63de61;}function forceBlockCollections(_0xbd1b28){if(!isNode(_0xbd1b28))return;visit(_0xbd1b28,(_0x580841,_0x1df83b)=>{const _0x5221f5=a101_0x5461;isCollection(_0x1df83b)&&(_0x1df83b[_0x5221f5(0x108)]=![]);});}function a101_0x5461(_0x35a1ef,_0x36cd76){_0x35a1ef=_0x35a1ef-0xdd;const _0xa4ea22=a101_0xa4ea();let _0x546155=_0xa4ea22[_0x35a1ef];return _0x546155;}function ensurePulledFilesCanBeOverwritten(_0x2bfde8,_0x473b48,_0x1caf12,_0x4e0ec8){const _0x51b015=a101_0x5461;if(_0x4e0ec8||!existsSync(_0x473b48))return;const _0x31e361=readMetadataIfPresent(_0x473b48);if(!_0x31e361)return;const _0x9e78af=_0x31e361[_0x51b015(0xe0)]&&Object[_0x51b015(0x103)](_0x31e361[_0x51b015(0xe0)])['length']>0x0?_0x31e361[_0x51b015(0xe0)]:undefined;if(_0x9e78af)for(const [_0x2db06b,_0x1126b3]of Object[_0x51b015(0xe4)](_0x9e78af)){const _0x28d7e2=resolveManagedFilePath(_0x2bfde8,_0x2db06b);if(!existsSync(_0x28d7e2))throw CliErrors[_0x51b015(0xf6)](_0x51b015(0x106)+_0x2bfde8,_0x51b015(0x10b)+_0x2db06b);const _0x27624f=lstatSync(_0x28d7e2);if(!_0x27624f[_0x51b015(0xeb)]())throw CliErrors[_0x51b015(0xf6)](_0x51b015(0x106)+_0x2bfde8,_0x51b015(0xde)+_0x2db06b);const _0x4a281c=bufferSha256(readFileSync(_0x28d7e2));if(_0x4a281c!==_0x1126b3)throw CliErrors[_0x51b015(0xf6)](_0x51b015(0x106)+_0x2bfde8+_0x51b015(0xed)+_0x2db06b,_0x51b015(0x109)+_0x2db06b);}else{const _0x123832=resolve(_0x2bfde8,SKILL_FILE);if(existsSync(_0x123832)&&_0x31e361[_0x51b015(0xe9)]){const _0x3d648b=contentHash(readFileSync(_0x123832,_0x51b015(0xe2)));if(_0x3d648b!==_0x31e361[_0x51b015(0xe9)])throw CliErrors[_0x51b015(0xf6)](_0x51b015(0x10e)+_0x123832,_0x51b015(0xe1));}}for(const _0x3cdc77 of normalizeLocalFiles(_0x1caf12)){if(_0x9e78af?.[_0x3cdc77[_0x51b015(0x102)]])continue;if(!_0x9e78af&&_0x3cdc77['path']===SKILL_FILE)continue;const _0x52c5e3=resolveManagedFilePath(_0x2bfde8,_0x3cdc77['path']);if(!existsSync(_0x52c5e3))continue;const _0x5dc0a0=lstatSync(_0x52c5e3);if(!_0x5dc0a0[_0x51b015(0xeb)]())throw CliErrors[_0x51b015(0xf6)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x2bfde8,_0x51b015(0xf4)+_0x3cdc77[_0x51b015(0x102)]);const _0x5f00d7=bufferSha256(readFileSync(_0x52c5e3));if(_0x5f00d7!==fileHash(_0x3cdc77))throw CliErrors['validation'](_0x51b015(0x106)+_0x2bfde8,'Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20'+_0x3cdc77[_0x51b015(0x102)]);}}function materializeFiles(_0x48b7f5,_0x3ba0e3){for(const _0x15504f of normalizeLocalFiles(_0x3ba0e3)){const _0x2d823e=resolveManagedFilePath(_0x48b7f5,_0x15504f['path']);mkdirSync(dirname(_0x2d823e),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x2d823e,fileContent(_0x15504f),0x180);}}function removeStaleManagedFiles(_0x39bef4,_0x426944,_0x4422f6){const _0x2925b1=a101_0x5461;if(!_0x426944)return;const _0x108064=new Set(normalizeLocalFiles(_0x4422f6)[_0x2925b1(0x110)](_0x2b44c9=>_0x2b44c9['path']));for(const _0x3056c5 of Object['keys'](_0x426944)){if(_0x108064['has'](_0x3056c5))continue;const _0x275c68=resolveManagedFilePath(_0x39bef4,_0x3056c5);existsSync(_0x275c68)&&lstatSync(_0x275c68)[_0x2925b1(0xeb)]()&&rmSync(_0x275c68,{'force':!![]});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5f2e67,_0x3d5188){const _0x17c9fa=a102_0x5a59,_0x3c3a50=_0x5f2e67();while(!![]){try{const _0x357a43=parseInt(_0x17c9fa(0xb2))/0x1*(-parseInt(_0x17c9fa(0xce))/0x2)+-parseInt(_0x17c9fa(0xcd))/0x3*(parseInt(_0x17c9fa(0xc4))/0x4)+parseInt(_0x17c9fa(0xd1))/0x5*(parseInt(_0x17c9fa(0xd7))/0x6)+parseInt(_0x17c9fa(0xc6))/0x7+parseInt(_0x17c9fa(0xbb))/0x8*(-parseInt(_0x17c9fa(0xc0))/0x9)+-parseInt(_0x17c9fa(0xd6))/0xa*(parseInt(_0x17c9fa(0xbe))/0xb)+-parseInt(_0x17c9fa(0xb3))/0xc*(-parseInt(_0x17c9fa(0xbf))/0xd);if(_0x357a43===_0x3d5188)break;else _0x3c3a50['push'](_0x3c3a50['shift']());}catch(_0x1c6ad9){_0x3c3a50['push'](_0x3c3a50['shift']());}}}(a102_0x1b46,0xb2a76));import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x21e725,_0x480828,_0xa2bd5f,_0x150cbf,_0x301fd9,_0x4d9095,_0xc1e662){const _0x200088=a102_0x5a59,_0x311fef=_0x4d9095?normalizeLocalFiles(_0x4d9095):[],_0x94106d=!_0xc1e662&&_0x311fef[_0x200088(0xaf)]>0x0?buildSkillPackage(_0x311fef):undefined,_0x54093d=_0xc1e662?bufferSha256(_0xc1e662):_0x94106d?.['manifest'][_0x200088(0xc3)],_0x49d8ad=_0xc1e662?.[_0x200088(0xaf)]??_0x94106d?.[_0x200088(0xae)][_0x200088(0xb8)],_0x2a2c2b=_0x311fef['length']>0x0?Object[_0x200088(0xb1)](_0x311fef['map'](_0x4c9706=>[_0x4c9706[_0x200088(0xc2)],fileHash(_0x4c9706)])):undefined;return{'schemaVersion':_0x311fef[_0x200088(0xaf)]>0x0?0x2:0x1,'id':_0x21e725['id'],'appCode':_0xa2bd5f,'skillCode':requireSkillCode(_0x21e725),'skillName':_0x21e725[_0x200088(0xb0)],'description':_0x21e725[_0x200088(0xd5)],'scope':_0x480828,'readonly':_0x480828!==_0x200088(0xc1)||_0x21e725[_0x200088(0xc9)]===!![],'tenantCode':_0x21e725[_0x200088(0xac)],'userId':_0x21e725[_0x200088(0xad)],'version':_0x21e725[_0x200088(0xb4)],'status':_0x21e725[_0x200088(0xcc)],'tags':Array[_0x200088(0xd3)](_0x21e725[_0x200088(0xbc)])?_0x21e725['tags']:[],'hasUpstreamUpdate':_0x21e725[_0x200088(0xb9)],'forkedFromSkillId':_0x21e725['forkedFromSkillId'],'forkedFromVersion':_0x21e725[_0x200088(0xd2)],'sourceSessionId':_0x21e725[_0x200088(0xcf)],'contentHash':_0x150cbf,'fileHashes':_0x2a2c2b,'treeHash':_0x311fef[_0x200088(0xaf)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x311fef)):undefined,'ossPath':remoteManifestOssPath(_0x21e725[_0x200088(0xb7)]),'zipSha256':_0x54093d,'zipSize':_0x49d8ad,'files':_0x311fef[_0x200088(0xaf)]>0x0?_0x311fef[_0x200088(0xb6)](_0x34cd2e=>({'path':_0x34cd2e['path'],'hash':fileHash(_0x34cd2e),'size':fileContent(_0x34cd2e)[_0x200088(0xaf)]})):undefined,'pulledAt':_0x301fd9??new Date()[_0x200088(0xbd)]()};}export function requireSkillCode(_0x18c96c){const _0x434cec=a102_0x5a59,_0x2e9478=_0x18c96c[_0x434cec(0xca)]?.[_0x434cec(0xc5)]();if(!_0x2e9478)throw CliErrors[_0x434cec(0xc8)](_0x434cec(0xc7));return _0x2e9478;}function a102_0x5a59(_0x1d6463,_0x2d5fb1){_0x1d6463=_0x1d6463-0xac;const _0x1b46eb=a102_0x1b46();let _0x5a596d=_0x1b46eb[_0x1d6463];return _0x5a596d;}function a102_0x1b46(){const _0x5c5514=['821691TWyIFV','4102155hIpGMl','personal','path','zipSha256','58100ZmVUPu','trim','616490nCkFfX','Runtime\x20Skill\x20is\x20missing\x20skillCode.','validation','readonly','skillCode','utf8','status','21huUIWZ','862uurWRT','sourceSessionId','parse','235XfJhlH','forkedFromVersion','isArray','string','description','10iziaSI','9354lPCSfh','tenantCode','userId','manifest','length','skillName','fromEntries','2717rigwte','708kicdCZ','version','ossPath','map','files','zipSize','hasUpstreamUpdate','Invalid\x20','8YzoJWQ','tags','toISOString','15733223kHWIGe'];a102_0x1b46=function(){return _0x5c5514;};return a102_0x1b46();}export function readMetadataIfPresent(_0x3494e8){const _0x521fe3=a102_0x5a59;if(!existsSync(_0x3494e8))return undefined;try{const _0x1d3493=JSON[_0x521fe3(0xd0)](readFileSync(_0x3494e8,_0x521fe3(0xcb)));return _0x1d3493;}catch{throw CliErrors[_0x521fe3(0xc8)](_0x521fe3(0xba)+METADATA_FILE+':\x20'+_0x3494e8);}}function remoteManifestOssPath(_0x8ed8e5){const _0x2c67e9=a102_0x5a59;if(!_0x8ed8e5||typeof _0x8ed8e5!=='object'||Array[_0x2c67e9(0xd3)](_0x8ed8e5))return undefined;const _0x28aeeb=_0x8ed8e5[_0x2c67e9(0xb5)];return typeof _0x28aeeb===_0x2c67e9(0xd4)&&_0x28aeeb[_0x2c67e9(0xc5)]()?_0x28aeeb[_0x2c67e9(0xc5)]():undefined;}
|