@lovrabet/lovrabet-cli 2.1.6-beta.2 → 2.1.6-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/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/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/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/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/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/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 +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x378c06,_0x16950b){const _0x2be480=a75_0x240e,_0x384aad=_0x378c06();while(!![]){try{const _0xe6197e=-parseInt(_0x2be480(0x1d1))/0x1+-parseInt(_0x2be480(0x1e2))/0x2+-parseInt(_0x2be480(0x1eb))/0x3*(-parseInt(_0x2be480(0x1df))/0x4)+parseInt(_0x2be480(0x1e6))/0x5*(-parseInt(_0x2be480(0x1d6))/0x6)+-parseInt(_0x2be480(0x1d3))/0x7+-parseInt(_0x2be480(0x1e7))/0x8*(-parseInt(_0x2be480(0x1de))/0x9)+-parseInt(_0x2be480(0x1ce))/0xa*(-parseInt(_0x2be480(0x1e0))/0xb);if(_0xe6197e===_0x16950b)break;else _0x384aad['push'](_0x384aad['shift']());}catch(_0x4b3f45){_0x384aad['push'](_0x384aad['shift']());}}}(a75_0x1a79,0xd7376));function toKebab(_0x197161){const _0x25d3e6=a75_0x240e;return _0x197161['replace'](/_/g,'-')[_0x25d3e6(0x1cb)](/-([A-Z]+)/g,(_0x47d9d7,_0x14495e)=>'-'+_0x14495e['toLowerCase']())[_0x25d3e6(0x1cb)](/([a-z0-9])([A-Z])/g,(_0x3586e3,_0x44a41b,_0x12694e)=>_0x44a41b+'-'+_0x12694e)['toLowerCase']();}function buildKnownFlags(_0x3df6d3){const _0x4183f6=a75_0x240e,_0x5583ce=new Set();for(const _0x5e3b0a of _0x3df6d3){_0x5583ce[_0x4183f6(0x1e4)](_0x5e3b0a[_0x4183f6(0x1d4)]),_0x5583ce[_0x4183f6(0x1e4)](toCamelCase(_0x5e3b0a[_0x4183f6(0x1d4)]));}for(const _0x420924 of['dry-run',_0x4183f6(0x1d8),_0x4183f6(0x1e1),'format']){_0x5583ce[_0x4183f6(0x1e4)](_0x420924);}for(const _0x481102 of[_0x4183f6(0x1e8),'env','appcode',_0x4183f6(0x1da),_0x4183f6(0x1cf),_0x4183f6(0x1d2),'ci',_0x4183f6(0x1dd),_0x4183f6(0x1cc)]){_0x5583ce['add'](_0x481102);}return _0x5583ce;}function a75_0x240e(_0x3e0a8b,_0x4c97a0){_0x3e0a8b=_0x3e0a8b-0x1cb;const _0x1a7952=a75_0x1a79();let _0x240ee1=_0x1a7952[_0x3e0a8b];return _0x240ee1;}function buildFlagTypeMap(_0x54d968){const _0x7ecbf9=a75_0x240e,_0x58eaca=new Map();for(const _0x2a1dd7 of _0x54d968){_0x58eaca['set'](_0x2a1dd7[_0x7ecbf9(0x1d4)],_0x2a1dd7['type']),_0x58eaca['set'](toCamelCase(_0x2a1dd7[_0x7ecbf9(0x1d4)]),_0x2a1dd7[_0x7ecbf9(0x1d5)]);}return _0x58eaca;}function toCamelCase(_0xde0db){const _0xa6d2f=a75_0x240e;return _0xde0db[_0xa6d2f(0x1cb)](/-([a-z])/g,(_0x3bebae,_0x1522ad)=>_0x1522ad[_0xa6d2f(0x1ee)]());}function aliasHandler(_0x262b55,_0x3a071c){const _0x27d126=a75_0x240e,_0x13ebea=[];for(const _0x30420f of Object[_0x27d126(0x1ec)](_0x262b55)){if(_0x3a071c['has'](_0x30420f))continue;const _0x157f10=toKebab(_0x30420f);_0x157f10!==_0x30420f&&_0x3a071c[_0x27d126(0x1e5)](_0x157f10)&&_0x13ebea[_0x27d126(0x1d0)]({'original':_0x30420f,'corrected':_0x157f10,'handler':_0x27d126(0x1e9)});}return _0x13ebea;}function a75_0x1a79(){const _0x432dfa=['dryRun','entries','app','boolean','slice','global','804429CjdjlE','115348xGjpsS','5986189LUOEFH','yes','1114478tkbYAc','corrected','add','has','5BwfBne','56wsaAXv','help','alias','get','87xyTizx','keys','original','toUpperCase','sticky','replace','version','length','50PPXDco','nonInteractive','push','675059mHpKFn','non-interactive','10229240BCqEqs','name','type','3646746CjIKQj','number'];a75_0x1a79=function(){return _0x432dfa;};return a75_0x1a79();}function stickyHandler(_0x225a2f,_0x575f1c,_0x42dab8){const _0x307030=a75_0x240e,_0x40b384=[];for(const [_0x313137,_0x292f3c]of Object[_0x307030(0x1d9)](_0x225a2f)){if(_0x292f3c!==!![])continue;for(let _0x4f5886=_0x313137['length']-0x1;_0x4f5886>0x0;_0x4f5886--){const _0x3fa44d=_0x313137['slice'](0x0,_0x4f5886),_0x3d7d3d=_0x313137[_0x307030(0x1dc)](_0x4f5886),_0x475629=toKebab(_0x3fa44d),_0xc4503=toCamelCase(_0x3fa44d),_0x185584=_0x575f1c[_0x307030(0x1e5)](_0x3fa44d)?_0x3fa44d:_0x575f1c[_0x307030(0x1e5)](_0x475629)?_0x475629:_0x575f1c[_0x307030(0x1e5)](_0xc4503)?_0xc4503:null;if(!_0x185584)continue;const _0x2a1410=_0x42dab8[_0x307030(0x1ea)](_0x185584)??'string';let _0xd90cc2;if(_0x2a1410===_0x307030(0x1d7)){const _0x276f5f=Number(_0x3d7d3d);if(isNaN(_0x276f5f)||_0x3d7d3d==='')continue;_0xd90cc2=_0x276f5f;}else{if(_0x2a1410===_0x307030(0x1db))continue;else{if(_0x3d7d3d==='')continue;_0xd90cc2=_0x3d7d3d;}}_0x40b384[_0x307030(0x1d0)]({'original':_0x313137,'corrected':_0x185584+'='+_0xd90cc2,'handler':_0x307030(0x1ef)});break;}}return _0x40b384;}export function correctFlags(_0x17f23d,_0x2ac874){const _0x52a68c=a75_0x240e,_0x260405=buildKnownFlags(_0x2ac874),_0x48ad9a=buildFlagTypeMap(_0x2ac874),_0x43bc2d=aliasHandler(_0x17f23d,_0x260405),_0x41ae70=stickyHandler(_0x17f23d,_0x260405,_0x48ad9a),_0x1e8d0b=[..._0x43bc2d,..._0x41ae70];if(_0x1e8d0b[_0x52a68c(0x1cd)]===0x0)return{'flags':_0x17f23d,'corrections':[]};const _0x316495={..._0x17f23d},_0x5c1489=new Set();for(const _0x5bb88b of _0x43bc2d){_0x316495[_0x5bb88b[_0x52a68c(0x1e3)]]=_0x17f23d[_0x5bb88b['original']],_0x5c1489[_0x52a68c(0x1e4)](_0x5bb88b[_0x52a68c(0x1ed)]);}for(const _0x17a132 of _0x41ae70){const _0x4cdf9e=_0x17a132[_0x52a68c(0x1e3)]['indexOf']('='),_0x58d830=_0x17a132[_0x52a68c(0x1e3)][_0x52a68c(0x1dc)](0x0,_0x4cdf9e),_0x27e3a3=_0x17a132[_0x52a68c(0x1e3)][_0x52a68c(0x1dc)](_0x4cdf9e+0x1),_0x46c8cf=_0x48ad9a[_0x52a68c(0x1ea)](_0x58d830)??'string';_0x46c8cf==='number'?_0x316495[_0x58d830]=Number(_0x27e3a3):_0x316495[_0x58d830]=_0x27e3a3,_0x5c1489[_0x52a68c(0x1e4)](_0x17a132['original']);}for(const _0x4aa1f7 of _0x5c1489){delete _0x316495[_0x4aa1f7];}return{'flags':_0x316495,'corrections':_0x1e8d0b};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xbb9bb,_0x444586){var _0x3346bb=a76_0x4081,_0x37aa02=_0xbb9bb();while(!![]){try{var _0x3e089a=-parseInt(_0x3346bb(0xd2))/0x1*(-parseInt(_0x3346bb(0xd0))/0x2)+-parseInt(_0x3346bb(0xcc))/0x3*(parseInt(_0x3346bb(0xce))/0x4)+parseInt(_0x3346bb(0xca))/0x5+parseInt(_0x3346bb(0xd3))/0x6+parseInt(_0x3346bb(0xd1))/0x7+parseInt(_0x3346bb(0xcb))/0x8+parseInt(_0x3346bb(0xcd))/0x9*(-parseInt(_0x3346bb(0xcf))/0xa);if(_0x3e089a===_0x444586)break;else _0x37aa02['push'](_0x37aa02['shift']());}catch(_0x216898){_0x37aa02['push'](_0x37aa02['shift']());}}}(a76_0x44ab,0xbb6a7));export{extractList,extractPaging}from'@lovrabet/cli-framework';function a76_0x4081(_0x1ff46d,_0x1b2fcb){_0x1ff46d=_0x1ff46d-0xca;var _0x44ab09=a76_0x44ab();var _0x408186=_0x44ab09[_0x1ff46d];return _0x408186;}function a76_0x44ab(){var _0x534851=['18886160ShiCRY','1004vkXpmO','9002889rsaSZH','1169rRmhaX','9089640aubzKK','336015vGimws','115696wqbmMT','3UXQFNl','9WHhzcj','3253196IdFZVA'];a76_0x44ab=function(){return _0x534851;};return a76_0x44ab();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a77_0x42d3(){const _0x1120ac=['code','code=','length','params','service','join','5KCLwGk','name','stringify','24rVbztD','317368GrDOvb','2394762ySFyWs','15RyWPEn','--yes','command','1793554bImvgS','push','params=','commandLabel','description','887183cFuMBs','216EYcqZc','6993954nSBrGu','10xqAuMs','entries','name=','1979222btBmWT','49300iiBUdw','id=','\x20\x20\x20'];a77_0x42d3=function(){return _0x1120ac;};return a77_0x42d3();}function a77_0x3668(_0x49b321,_0x18cc92){_0x49b321=_0x49b321-0x1ab;const _0x42d3c0=a77_0x42d3();let _0x3668a2=_0x42d3c0[_0x49b321];return _0x3668a2;}(function(_0x580e92,_0x17e634){const _0xacb2f3=a77_0x3668,_0x4c8fa3=_0x580e92();while(!![]){try{const _0x185d95=parseInt(_0xacb2f3(0x1c4))/0x1+-parseInt(_0xacb2f3(0x1b8))/0x2+-parseInt(_0xacb2f3(0x1b5))/0x3*(-parseInt(_0xacb2f3(0x1b3))/0x4)+parseInt(_0xacb2f3(0x1af))/0x5*(-parseInt(_0xacb2f3(0x1b4))/0x6)+parseInt(_0xacb2f3(0x1c3))/0x7*(-parseInt(_0xacb2f3(0x1b2))/0x8)+-parseInt(_0xacb2f3(0x1bf))/0x9*(-parseInt(_0xacb2f3(0x1c0))/0xa)+parseInt(_0xacb2f3(0x1bd))/0xb*(parseInt(_0xacb2f3(0x1be))/0xc);if(_0x185d95===_0x17e634)break;else _0x4c8fa3['push'](_0x4c8fa3['shift']());}catch(_0x5ea01d){_0x4c8fa3['push'](_0x4c8fa3['shift']());}}}(a77_0x42d3,0x81928));import{CLI_BIN_NAME}from'../constant/cli.js';export function buildConfirmationLines(_0x4589e9,_0x3110a3,_0x770d04){const _0x1de85d=a77_0x3668,_0x46eed5=buildConfirmationContext(_0x4589e9,_0x3110a3,_0x770d04),_0x189ebd=['⚠\x20\x20High-risk\x20operation:\x20'+_0x46eed5[_0x1de85d(0x1bb)]];return _0x46eed5[_0x1de85d(0x1bc)]&&_0x189ebd[_0x1de85d(0x1b9)](_0x1de85d(0x1c6)+_0x46eed5['description']),_0x46eed5['affectedRecords']&&_0x189ebd['push']('\x20\x20\x20Affected:\x20'+_0x46eed5['affectedRecords']),_0x189ebd[_0x1de85d(0x1b9)]('\x20\x20\x20Continue?\x20[y/N]\x20'),_0x189ebd;}export function reconstructCommandArgv(_0x573c64,_0x545c46){const _0x1a7c06=a77_0x3668,_0x302f6f=[CLI_BIN_NAME,_0x573c64[_0x1a7c06(0x1ad)],_0x573c64[_0x1a7c06(0x1b7)]];for(const [_0x5cbaee,_0x417aa8]of Object[_0x1a7c06(0x1c1)](_0x545c46)){if(_0x417aa8===!![])_0x302f6f['push']('--'+_0x5cbaee);else _0x417aa8!==![]&&_0x417aa8!==undefined&&_0x417aa8!==''&&_0x302f6f['push']('--'+_0x5cbaee+'\x20'+JSON[_0x1a7c06(0x1b1)](_0x417aa8));}return _0x302f6f['push'](_0x1a7c06(0x1b6)),_0x302f6f[_0x1a7c06(0x1ae)]('\x20');}function buildConfirmationContext(_0x46579c,_0x5de4ec,_0xf26dbf){const _0x511df6=extractAffectedRecords(_0xf26dbf);return{'commandLabel':_0x5de4ec,'description':_0x46579c['description'],'affectedRecords':_0x511df6};}function extractAffectedRecords(_0x3b7d3c){const _0x38632e=a77_0x3668,_0x21e270=[];if(_0x3b7d3c[_0x38632e(0x1c7)])_0x21e270[_0x38632e(0x1b9)](_0x38632e(0x1c8)+_0x3b7d3c[_0x38632e(0x1c7)]);if(_0x3b7d3c['id'])_0x21e270[_0x38632e(0x1b9)](_0x38632e(0x1c5)+_0x3b7d3c['id']);if(_0x3b7d3c[_0x38632e(0x1b0)])_0x21e270['push'](_0x38632e(0x1c2)+_0x3b7d3c[_0x38632e(0x1b0)]);if(_0x3b7d3c[_0x38632e(0x1ac)])_0x21e270['push'](_0x38632e(0x1ba)+_0x3b7d3c[_0x38632e(0x1ac)]);return _0x21e270[_0x38632e(0x1ab)]>0x0?_0x21e270[_0x38632e(0x1ae)](',\x20'):undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x584d78,_0x580227){const _0x21d4bc=a78_0x4a24,_0x2b31d4=_0x584d78();while(!![]){try{const _0x5ae747=parseInt(_0x21d4bc(0x1cd))/0x1+-parseInt(_0x21d4bc(0x1d4))/0x2*(-parseInt(_0x21d4bc(0x1d5))/0x3)+-parseInt(_0x21d4bc(0x1cc))/0x4*(-parseInt(_0x21d4bc(0x1d3))/0x5)+-parseInt(_0x21d4bc(0x1ce))/0x6+-parseInt(_0x21d4bc(0x1ca))/0x7*(parseInt(_0x21d4bc(0x1d1))/0x8)+parseInt(_0x21d4bc(0x1cb))/0x9+parseInt(_0x21d4bc(0x1cf))/0xa*(-parseInt(_0x21d4bc(0x1d6))/0xb);if(_0x5ae747===_0x580227)break;else _0x2b31d4['push'](_0x2b31d4['shift']());}catch(_0x30ba70){_0x2b31d4['push'](_0x2b31d4['shift']());}}}(a78_0x19e2,0xcc5e0));import{LovrabetError}from'@lovrabet/sdk';import{CliErrors}from'../errors.js';export function mapUserFacingExecuteError(_0x3d3d5f){const _0x45d969=a78_0x4a24;if(_0x3d3d5f instanceof LovrabetError)return CliErrors[_0x45d969(0x1c9)](userFacingLovrabetMessage(_0x3d3d5f));return _0x3d3d5f;}function a78_0x4a24(_0xaba0f3,_0x1e4016){_0xaba0f3=_0xaba0f3-0x1c9;const _0x19e220=a78_0x19e2();let _0x4a249a=_0x19e220[_0xaba0f3];return _0x4a249a;}function userFacingLovrabetMessage(_0x1a2ac4){const _0x3f1ab4=a78_0x4a24,_0x2e5f0d=_0x1a2ac4['description'];if(_0x2e5f0d!==undefined&&_0x2e5f0d!==null){if(typeof _0x2e5f0d==='string'&&_0x2e5f0d['trim']())return _0x2e5f0d['trim']();try{return JSON[_0x3f1ab4(0x1d2)](_0x2e5f0d);}catch{}}return _0x1a2ac4[_0x3f1ab4(0x1d0)];}function a78_0x19e2(){const _0x2cd88e=['80ClfWoL','message','8BDmQaC','stringify','497225qeoxyT','1574iDgjWW','4449pJzYey','1247191PZOhBv','validation','8328985GBlvTT','2288700HXHoZW','40TdNlah','1176820cwqYft','3952200BSLyhs'];a78_0x19e2=function(){return _0x2cd88e;};return a78_0x19e2();}
|
package/lib/framework/runner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a79_0x1af1ae=a79_0x1039;(function(_0x12ed21,_0x1a43d4){const _0x227818=a79_0x1039,_0x327c74=_0x12ed21();while(!![]){try{const _0x132f12=parseInt(_0x227818(0x117))/0x1+-parseInt(_0x227818(0x126))/0x2+-parseInt(_0x227818(0x128))/0x3*(parseInt(_0x227818(0xfd))/0x4)+parseInt(_0x227818(0x102))/0x5+parseInt(_0x227818(0xef))/0x6*(parseInt(_0x227818(0xf7))/0x7)+-parseInt(_0x227818(0x105))/0x8*(parseInt(_0x227818(0x115))/0x9)+-parseInt(_0x227818(0xf5))/0xa*(parseInt(_0x227818(0x119))/0xb);if(_0x132f12===_0x1a43d4)break;else _0x327c74['push'](_0x327c74['shift']());}catch(_0x45e873){_0x327c74['push'](_0x327c74['shift']());}}}(a79_0x4ed3,0x2c4a6));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{resolveLatestUpdateNotice}from'../utils/update-notice.js';import{findAppByCode,findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../commands/app/eligibility.js';export function resolveAuthMode(_0x44fdcd){const _0x5b1925=a79_0x1039;return void _0x44fdcd,AUTH_MODE[_0x5b1925(0xed)];}function a79_0x1039(_0x8b824,_0x19a6d0){_0x8b824=_0x8b824-0xeb;const _0x4ed39a=a79_0x4ed3();let _0x1039d9=_0x4ed39a[_0x8b824];return _0x1039d9;}export function createPipelineEnv(_0x53e583,_0x10e2fa){const _0x4b03d9=a79_0x1039,_0x2f1f97=typeof _0x10e2fa['app']===_0x4b03d9(0x12a)&&_0x10e2fa[_0x4b03d9(0xf9)]['trim']();return{'rawFlags':_0x10e2fa,'appCode':_0x53e583['appCode']||productEnv(_0x4b03d9(0x11c))||(_0x2f1f97?undefined:readAppCodeFromConfig()),'appCodeSource':_0x53e583[_0x4b03d9(0x101)],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x10e2fa),'defaultFormat':_0x53e583[_0x4b03d9(0x12c)],'defaultPageSize':_0x53e583[_0x4b03d9(0x106)],'defaultVerbose':_0x53e583[_0x4b03d9(0xf4)],'riskLevel':_0x53e583[_0x4b03d9(0x11f)],'accessKey':_0x53e583[_0x4b03d9(0x125)],'env':_0x53e583['env'],'mergedCli':{'defaultApp':_0x53e583['defaultApp'],'currentApp':_0x53e583['currentApp'],'appCode':_0x53e583[_0x4b03d9(0xf3)]}};}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS['filter'](_0x4bc6a2=>PIPELINE_FLAG_NAMES['has'](_0x4bc6a2[a79_0x1af1ae(0x116)]))[a79_0x1af1ae(0xff)](({name:_0x9ee10f,type:_0x6da902,description:_0x29b92a})=>({'name':_0x9ee10f,'type':_0x6da902,'description':_0x29b92a})),'formatOutput':formatOutput,'getCommandLabel'(_0x369bd6){const _0x4892cf=a79_0x1af1ae;return CLI_BIN_NAME+'\x20'+_0x369bd6[_0x4892cf(0x12b)]+'\x20'+_0x369bd6[_0x4892cf(0x120)];},'riskPolicy':{'onViolation'(_0x15b6e9){const _0x4ff45e=a79_0x1af1ae;console[_0x4ff45e(0x11b)](_0x15b6e9);},'createError'(_0x1f2ab2){const _0x471129=a79_0x1af1ae;return CliErrors[_0x471129(0x11e)](_0x1f2ab2);}},async 'prepare'(_0x436e49,_0x17db4f){const _0xae6177=a79_0x1af1ae,_0x3882ef=resolveAuthMode(_0x17db4f);if(_0x436e49[_0xae6177(0xfa)]!==![]){if(!_0x17db4f[_0xae6177(0x125)])throw CliErrors['authRequired'](_0xae6177(0x109)+PRODUCT_CONFIG[_0xae6177(0x10a)]+_0xae6177(0x112)+productEnvName(_0xae6177(0xf8))+'.');const {setActiveAK:_0x2afc48}=await import(_0xae6177(0xf0));_0x2afc48(_0x17db4f[_0xae6177(0x125)]);}let _0x22d865='';if(_0x436e49[_0xae6177(0xfb)]!==![]){_0x22d865=_0x17db4f[_0xae6177(0xf3)]??'',_0x22d865=await resolveExplicitAppName(_0x436e49,_0x17db4f,_0x22d865);if(!_0x22d865){await assertSelectedAppNameIsRuntimeAccessible(_0x436e49,_0x17db4f);throw CliErrors[_0xae6177(0x118)](_0xae6177(0x124)+PRODUCT_CONFIG[_0xae6177(0x10a)]+'.');}await assertAppCodeIsRuntimeAccessible(_0x436e49,_0x17db4f,_0x22d865);}if(_0x22d865){const {initSdkClient:_0xf1fa0a}=await import(_0xae6177(0x108));_0xf1fa0a({'appCode':_0x22d865,'env':_0x17db4f[_0xae6177(0x10f)]??'production','accessKey':_0x17db4f[_0xae6177(0x125)],'authMode':_0x3882ef});}return{'defaults':{'booleans':{'verbose':_0x17db4f[_0xae6177(0xee)]},'numbers':{'pagesize':_0x17db4f['defaultPageSize']}},'extras':{'appCode':_0x22d865,'cookie':'','apiDomain':_0x17db4f[_0xae6177(0x129)],'apiDir':'','accessKey':_0x17db4f[_0xae6177(0x125)],'envName':_0x17db4f[_0xae6177(0x10f)],'mergedCli':_0x17db4f[_0xae6177(0x111)]}};},async 'confirmHighRisk'({def:_0x4ad360,env:_0xfc6a55,flags:_0x22890e,commandLabel:_0x1b3cf8}){const _0x21510d=a79_0x1af1ae;if(_0xfc6a55[_0x21510d(0xf6)]){const _0x3a0d4d=reconstructCommandArgv(_0x4ad360,_0x22890e);throw CliErrors[_0x21510d(0xec)]('High-risk\x20operation\x20`'+_0x1b3cf8+_0x21510d(0x11d)+(_0x21510d(0x113)+_0x3a0d4d));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x4ad360,_0x1b3cf8,_0x22890e),'createCancelledError':_0x191fe2=>CliErrors[_0x21510d(0x11e)](_0x191fe2)});},'mapDryRunError'(_0x374760){return mapUserFacingExecuteError(_0x374760);},'mapExecuteError'(_0x395c35){return mapUserFacingExecuteError(_0x395c35);},async 'finalize'(){const _0x4c14ff=a79_0x1af1ae,{clearActiveAK:_0x353ed2}=await import(_0x4c14ff(0xf0));_0x353ed2();}};async function resolveExplicitAppName(_0x165066,_0x119aa9,_0x3f6f09){const _0x456c2f=a79_0x1af1ae;if(_0x165066[_0x456c2f(0xfb)]===![])return _0x3f6f09;const _0x4eb856=typeof _0x119aa9[_0x456c2f(0xfe)][_0x456c2f(0xf9)]===_0x456c2f(0x12a)?_0x119aa9[_0x456c2f(0xfe)]['app']['trim']():'';if(!_0x4eb856)return _0x3f6f09;const _0x1ae235=typeof _0x119aa9['rawFlags'][_0x456c2f(0x122)]===_0x456c2f(0x12a)&&_0x119aa9[_0x456c2f(0xfe)][_0x456c2f(0x122)][_0x456c2f(0x107)]()||productEnv(_0x456c2f(0x11c));if(_0x1ae235||_0x119aa9['appCodeSource']===_0x456c2f(0x110))return _0x3f6f09;const {getRemoteAppList:_0xa45a28}=await import('../commands/app/remote-source.js'),_0x46d5c3=await _0xa45a28({'env':_0x119aa9['env']??'production','accessKey':_0x119aa9[_0x456c2f(0x125)]}),_0x401245=findAppByName(_0x46d5c3[_0x456c2f(0x100)],_0x4eb856);if(_0x401245&&!isRuntimeAccessibleApp(_0x401245))throw runtimeInaccessibleAppError(_0x401245,'\x22'+_0x4eb856+'\x22');const _0x55c360=_0x401245?.['appCode']?.['trim']();if(_0x55c360)return _0x55c360;throw CliErrors[_0x456c2f(0xec)](_0x456c2f(0x10c)+_0x4eb856,_0x456c2f(0xfc)+CLI_BIN_NAME+_0x456c2f(0x104)+_0x4eb856+_0x456c2f(0x127)+PRODUCT_CONFIG[_0x456c2f(0x10a)]+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0x1acca4,_0x1ad0fc){const _0x384639=a79_0x1af1ae;if(_0x1acca4[_0x384639(0xfb)]===![]||!_0x1ad0fc[_0x384639(0x125)])return;const _0x58514e=(typeof _0x1ad0fc[_0x384639(0xfe)][_0x384639(0xf9)]===_0x384639(0x12a)&&_0x1ad0fc[_0x384639(0xfe)]['app'][_0x384639(0x107)]()?_0x1ad0fc[_0x384639(0xfe)]['app']:_0x1ad0fc[_0x384639(0x111)]?.[_0x384639(0x114)]??_0x1ad0fc['mergedCli']?.[_0x384639(0x10e)])?.[_0x384639(0x107)]();if(!_0x58514e)return;const {getRemoteAppList:_0x1cc6ed}=await import(_0x384639(0x121)),_0x10005b=await _0x1cc6ed({'env':_0x1ad0fc['env']??_0x384639(0x123),'accessKey':_0x1ad0fc[_0x384639(0x125)]}),_0x4b134=findAppByName(_0x10005b[_0x384639(0x100)],_0x58514e);if(_0x4b134&&!isRuntimeAccessibleApp(_0x4b134))throw runtimeInaccessibleAppError(_0x4b134,'\x22'+_0x58514e+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0x11ee0e,_0x2de8eb,_0x7b8a26){const _0x3aebc5=a79_0x1af1ae;if(_0x11ee0e[_0x3aebc5(0xfb)]===![]||!_0x2de8eb[_0x3aebc5(0x125)])return;const {getRemoteAppList:_0x1873c2}=await import('../commands/app/remote-source.js'),_0x1acc9a=await _0x1873c2({'env':_0x2de8eb[_0x3aebc5(0x10f)]??_0x3aebc5(0x123),'accessKey':_0x2de8eb[_0x3aebc5(0x125)]}),_0x32d953=findAppByCode(_0x1acc9a[_0x3aebc5(0x100)],_0x7b8a26);if(_0x32d953&&!isRuntimeAccessibleApp(_0x32d953))throw runtimeInaccessibleAppError(_0x32d953,_0x3aebc5(0x11a)+_0x7b8a26+'\x22');}export async function runCommand(_0x21a1f6,_0x5a9588){await runCommandWithAdapter(shouldAttachUpdateNotice(_0x21a1f6)?withUpdateNotice(_0x21a1f6):_0x21a1f6,_0x5a9588,runnerAdapter);}function shouldAttachUpdateNotice(_0x275942){const _0x1db0a7=a79_0x1af1ae;return!['update','schema',_0x1db0a7(0x103)][_0x1db0a7(0x10b)](_0x275942['service']);}function withUpdateNotice(_0x4556d9){return{..._0x4556d9,async 'execute'(_0x21476){const _0x4032d6=a79_0x1039,_0x545156=shouldResolveUpdateNotice(_0x21476)?resolveLatestUpdateNotice()[_0x4032d6(0x10d)](()=>null):Promise[_0x4032d6(0xeb)](null),_0x1f649c=await _0x4556d9['execute'](_0x21476);return attachUpdateNotice(_0x1f649c,await _0x545156);}};}function shouldResolveUpdateNotice(_0x55ab2c){const _0x32318b=a79_0x1af1ae;return _0x55ab2c[_0x32318b(0x12c)]==='pretty'&&!_0x55ab2c['nonInteractive'];}function a79_0x4ed3(){const _0x24fc5b=['pageSize','trim','../core/sdk-client.js','Set\x20accessKey\x20in\x20','newConfigFileName','includes','Unknown\x20app:\x20','catch','defaultApp','env','local-alias','mergedCli','\x20or\x20pass\x20','\x20\x20To\x20proceed:\x20','currentApp','18EGJNsP','name','311197tgcrKi','configMissing','110Yfjbnu','appcode\x20\x22','error','APPCODE','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a','cancelled','riskLevel','command','../commands/app/remote-source.js','appcode','production','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20','accessKey','82548wzVtUJ','.appcode\x20to\x20','177NrMMdO','apiDomain','string','service','format','resolve','validation','ClientAk','defaultVerbose','310254ivDhQm','../core/api-client.js','_notice','object','appCode','verbose','344440eHZteY','isNonInteractive','49HLCezP','ACCESS_KEY','app','requiresAuth','requiresAppCode','Run\x20`','932xHynAq','rawFlags','map','items','appCodeSource','1321965folbuO','doctor','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.','1426712YgtufB'];a79_0x4ed3=function(){return _0x24fc5b;};return a79_0x4ed3();}function attachUpdateNotice(_0x4b101f,_0x3bdd52){const _0x41f921=a79_0x1af1ae;if(!_0x3bdd52||!_0x4b101f||typeof _0x4b101f!==_0x41f921(0xf2))return _0x4b101f;const _0x541ce9=_0x4b101f,_0x486ab9=typeof _0x541ce9[_0x41f921(0xf1)]===_0x41f921(0xf2)&&_0x541ce9[_0x41f921(0xf1)]!==null?_0x541ce9['_notice']:{};return{..._0x541ce9,'_notice':{..._0x486ab9,'update':_0x3bdd52}};}
|
|
1
|
+
const a79_0x489a01=a79_0x4072;(function(_0x1c0b7a,_0x24701f){const _0x1c14f4=a79_0x4072,_0xe9f169=_0x1c0b7a();while(!![]){try{const _0x517ad9=-parseInt(_0x1c14f4(0x17d))/0x1*(parseInt(_0x1c14f4(0x163))/0x2)+-parseInt(_0x1c14f4(0x173))/0x3*(-parseInt(_0x1c14f4(0x15e))/0x4)+-parseInt(_0x1c14f4(0x151))/0x5*(parseInt(_0x1c14f4(0x174))/0x6)+parseInt(_0x1c14f4(0x166))/0x7+-parseInt(_0x1c14f4(0x152))/0x8*(parseInt(_0x1c14f4(0x169))/0x9)+-parseInt(_0x1c14f4(0x157))/0xa+-parseInt(_0x1c14f4(0x150))/0xb*(-parseInt(_0x1c14f4(0x160))/0xc);if(_0x517ad9===_0x24701f)break;else _0xe9f169['push'](_0xe9f169['shift']());}catch(_0x2d7bcc){_0xe9f169['push'](_0xe9f169['shift']());}}}(a79_0x2d87,0xba5c9));import{runCommandWithAdapter,requireConfirmationPrompt}from'@lovrabet/cli-framework';import{formatOutput}from'../framework/output.js';function a79_0x4072(_0x2c3abe,_0x4c13ec){_0x2c3abe=_0x2c3abe-0x149;const _0x2d8709=a79_0x2d87();let _0x407208=_0x2d8709[_0x2c3abe];return _0x407208;}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{resolveLatestUpdateNotice}from'../utils/update-notice.js';import{findAppByCode,findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../commands/app/eligibility.js';export function resolveAuthMode(_0x9b0840){const _0x12bb31=a79_0x4072;return void _0x9b0840,AUTH_MODE[_0x12bb31(0x16f)];}function a79_0x2d87(){const _0x1a5a47=['8210888CFiNeK','defaultApp','filter','resolve','error','10596740RVZOoO','env','service','appcode','defaultPageSize','production','../core/api-client.js','17500rgRIwH','local-alias','20124996QbcrDH','../commands/app/remote-source.js','doctor','804278CiefIe','Set\x20accessKey\x20in\x20','_notice','3228484kJRmVS','items','Run\x20`','9dVfyGu','authRequired','includes','ACCESS_KEY','update','map','ClientAk','cancelled','command','app','225cMkqvk','6RWzTio','has','rawFlags','riskLevel','currentApp','format','string','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20','appCode','1jYeCll','Unknown\x20app:\x20','catch','nonInteractive','object','\x20or\x20pass\x20','appCodeSource','.appcode\x20to\x20','mergedCli','trim','apiDomain','\x20\x20To\x20proceed:\x20','name','validation','accessKey','requiresAppCode','newConfigFileName','verbose','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.','APPCODE','pretty','22VdLwdr','4459960TVdBLC'];a79_0x2d87=function(){return _0x1a5a47;};return a79_0x2d87();}export function createPipelineEnv(_0x115bf4,_0x4328b6){const _0x3bb045=a79_0x4072,_0x335486=typeof _0x4328b6[_0x3bb045(0x172)]==='string'&&_0x4328b6[_0x3bb045(0x172)][_0x3bb045(0x186)]();return{'rawFlags':_0x4328b6,'appCode':_0x115bf4[_0x3bb045(0x17c)]||productEnv('APPCODE')||(_0x335486?undefined:readAppCodeFromConfig()),'appCodeSource':_0x115bf4[_0x3bb045(0x183)],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x4328b6),'defaultFormat':_0x115bf4[_0x3bb045(0x179)],'defaultPageSize':_0x115bf4['pageSize'],'defaultVerbose':_0x115bf4[_0x3bb045(0x14c)],'riskLevel':_0x115bf4[_0x3bb045(0x177)],'accessKey':_0x115bf4[_0x3bb045(0x149)],'env':_0x115bf4[_0x3bb045(0x158)],'mergedCli':{'defaultApp':_0x115bf4['defaultApp'],'currentApp':_0x115bf4[_0x3bb045(0x178)],'appCode':_0x115bf4['appCode']}};}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[a79_0x489a01(0x154)](_0x58675c=>PIPELINE_FLAG_NAMES[a79_0x489a01(0x175)](_0x58675c[a79_0x489a01(0x189)]))[a79_0x489a01(0x16e)](({name:_0x54f12f,type:_0x77e8be,description:_0x3bab50})=>({'name':_0x54f12f,'type':_0x77e8be,'description':_0x3bab50})),'formatOutput':formatOutput,'getCommandLabel'(_0x1a5ea7){const _0x219784=a79_0x489a01;return CLI_BIN_NAME+'\x20'+_0x1a5ea7['service']+'\x20'+_0x1a5ea7[_0x219784(0x171)];},'riskPolicy':{'onViolation'(_0x147546){const _0x44bd36=a79_0x489a01;console[_0x44bd36(0x156)](_0x147546);},'createError'(_0x4fa464){const _0x4ed85a=a79_0x489a01;return CliErrors[_0x4ed85a(0x170)](_0x4fa464);}},async 'prepare'(_0x161918,_0x18145){const _0x27917c=a79_0x489a01,_0xc0333f=resolveAuthMode(_0x18145);if(_0x161918['requiresAuth']!==![]){if(!_0x18145[_0x27917c(0x149)])throw CliErrors[_0x27917c(0x16a)](_0x27917c(0x164)+PRODUCT_CONFIG[_0x27917c(0x14b)]+_0x27917c(0x182)+productEnvName(_0x27917c(0x16c))+'.');const {setActiveAK:_0x110e08}=await import(_0x27917c(0x15d));_0x110e08(_0x18145[_0x27917c(0x149)]);}let _0x58bdf4='';if(_0x161918[_0x27917c(0x14a)]!==![]){_0x58bdf4=_0x18145['appCode']??'',_0x58bdf4=await resolveExplicitAppName(_0x161918,_0x18145,_0x58bdf4);if(!_0x58bdf4){await assertSelectedAppNameIsRuntimeAccessible(_0x161918,_0x18145);throw CliErrors['configMissing'](_0x27917c(0x17b)+PRODUCT_CONFIG['newConfigFileName']+'.');}await assertAppCodeIsRuntimeAccessible(_0x161918,_0x18145,_0x58bdf4);}if(_0x58bdf4){const {initSdkClient:_0x57b81d}=await import('../core/sdk-client.js');_0x57b81d({'appCode':_0x58bdf4,'env':_0x18145[_0x27917c(0x158)]??'production','accessKey':_0x18145[_0x27917c(0x149)],'authMode':_0xc0333f});}return{'defaults':{'booleans':{'verbose':_0x18145['defaultVerbose']},'numbers':{'pagesize':_0x18145[_0x27917c(0x15b)]}},'extras':{'appCode':_0x58bdf4,'cookie':'','apiDomain':_0x18145[_0x27917c(0x187)],'apiDir':'','accessKey':_0x18145[_0x27917c(0x149)],'envName':_0x18145[_0x27917c(0x158)],'mergedCli':_0x18145['mergedCli']}};},async 'confirmHighRisk'({def:_0x51d2cc,env:_0x38ce3e,flags:_0x1b2147,commandLabel:_0x217413}){const _0x5f3f1c=a79_0x489a01;if(_0x38ce3e['isNonInteractive']){const _0x19020b=reconstructCommandArgv(_0x51d2cc,_0x1b2147);throw CliErrors[_0x5f3f1c(0x18a)]('High-risk\x20operation\x20`'+_0x217413+'`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a'+(_0x5f3f1c(0x188)+_0x19020b));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x51d2cc,_0x217413,_0x1b2147),'createCancelledError':_0x3ac2f6=>CliErrors[_0x5f3f1c(0x170)](_0x3ac2f6)});},'mapDryRunError'(_0x5a001b){return mapUserFacingExecuteError(_0x5a001b);},'mapExecuteError'(_0x4b9247){return mapUserFacingExecuteError(_0x4b9247);},async 'finalize'(){const {clearActiveAK:_0x3f6397}=await import('../core/api-client.js');_0x3f6397();}};async function resolveExplicitAppName(_0xff49ce,_0xbdea0,_0x3accba){const _0x9787ab=a79_0x489a01;if(_0xff49ce[_0x9787ab(0x14a)]===![])return _0x3accba;const _0x1f4dac=typeof _0xbdea0[_0x9787ab(0x176)][_0x9787ab(0x172)]===_0x9787ab(0x17a)?_0xbdea0[_0x9787ab(0x176)][_0x9787ab(0x172)][_0x9787ab(0x186)]():'';if(!_0x1f4dac)return _0x3accba;const _0x218770=typeof _0xbdea0[_0x9787ab(0x176)][_0x9787ab(0x15a)]==='string'&&_0xbdea0[_0x9787ab(0x176)][_0x9787ab(0x15a)][_0x9787ab(0x186)]()||productEnv(_0x9787ab(0x14e));if(_0x218770||_0xbdea0[_0x9787ab(0x183)]===_0x9787ab(0x15f))return _0x3accba;const {getRemoteAppList:_0xe11013}=await import(_0x9787ab(0x161)),_0x4ff26b=await _0xe11013({'env':_0xbdea0['env']??_0x9787ab(0x15c),'accessKey':_0xbdea0[_0x9787ab(0x149)]}),_0x3ad6ef=findAppByName(_0x4ff26b[_0x9787ab(0x167)],_0x1f4dac);if(_0x3ad6ef&&!isRuntimeAccessibleApp(_0x3ad6ef))throw runtimeInaccessibleAppError(_0x3ad6ef,'\x22'+_0x1f4dac+'\x22');const _0x541099=_0x3ad6ef?.['appCode']?.['trim']();if(_0x541099)return _0x541099;throw CliErrors['validation'](_0x9787ab(0x17e)+_0x1f4dac,_0x9787ab(0x168)+CLI_BIN_NAME+_0x9787ab(0x14d)+_0x1f4dac+_0x9787ab(0x184)+PRODUCT_CONFIG['newConfigFileName']+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0x1d6dd9,_0x35e251){const _0x2b22db=a79_0x489a01;if(_0x1d6dd9[_0x2b22db(0x14a)]===![]||!_0x35e251[_0x2b22db(0x149)])return;const _0x502e4d=(typeof _0x35e251['rawFlags']['app']===_0x2b22db(0x17a)&&_0x35e251[_0x2b22db(0x176)][_0x2b22db(0x172)][_0x2b22db(0x186)]()?_0x35e251[_0x2b22db(0x176)][_0x2b22db(0x172)]:_0x35e251[_0x2b22db(0x185)]?.[_0x2b22db(0x178)]??_0x35e251['mergedCli']?.[_0x2b22db(0x153)])?.[_0x2b22db(0x186)]();if(!_0x502e4d)return;const {getRemoteAppList:_0x1d045f}=await import(_0x2b22db(0x161)),_0xdb733d=await _0x1d045f({'env':_0x35e251[_0x2b22db(0x158)]??'production','accessKey':_0x35e251['accessKey']}),_0x1b7e8c=findAppByName(_0xdb733d[_0x2b22db(0x167)],_0x502e4d);if(_0x1b7e8c&&!isRuntimeAccessibleApp(_0x1b7e8c))throw runtimeInaccessibleAppError(_0x1b7e8c,'\x22'+_0x502e4d+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0x5c733a,_0x35f963,_0x3e66d8){const _0x1c1eec=a79_0x489a01;if(_0x5c733a[_0x1c1eec(0x14a)]===![]||!_0x35f963[_0x1c1eec(0x149)])return;const {getRemoteAppList:_0x33c618}=await import(_0x1c1eec(0x161)),_0xf0671f=await _0x33c618({'env':_0x35f963[_0x1c1eec(0x158)]??_0x1c1eec(0x15c),'accessKey':_0x35f963[_0x1c1eec(0x149)]}),_0x6342c5=findAppByCode(_0xf0671f[_0x1c1eec(0x167)],_0x3e66d8);if(_0x6342c5&&!isRuntimeAccessibleApp(_0x6342c5))throw runtimeInaccessibleAppError(_0x6342c5,'appcode\x20\x22'+_0x3e66d8+'\x22');}export async function runCommand(_0x5d4a5e,_0x444315){await runCommandWithAdapter(shouldAttachUpdateNotice(_0x5d4a5e)?withUpdateNotice(_0x5d4a5e):_0x5d4a5e,_0x444315,runnerAdapter);}function shouldAttachUpdateNotice(_0x39410b){const _0x2f4137=a79_0x489a01;return![_0x2f4137(0x16d),'schema',_0x2f4137(0x162)][_0x2f4137(0x16b)](_0x39410b[_0x2f4137(0x159)]);}function withUpdateNotice(_0x3a71be){return{..._0x3a71be,async 'execute'(_0x53d0ce){const _0x147f9d=a79_0x4072,_0x4ba88c=shouldResolveUpdateNotice(_0x53d0ce)?resolveLatestUpdateNotice()[_0x147f9d(0x17f)](()=>null):Promise[_0x147f9d(0x155)](null),_0x5e5465=await _0x3a71be['execute'](_0x53d0ce);return attachUpdateNotice(_0x5e5465,await _0x4ba88c);}};}function shouldResolveUpdateNotice(_0x1acbff){const _0x36d833=a79_0x489a01;return _0x1acbff[_0x36d833(0x179)]===_0x36d833(0x14f)&&!_0x1acbff[_0x36d833(0x180)];}function attachUpdateNotice(_0xcff509,_0x41dba9){const _0x33c32c=a79_0x489a01;if(!_0x41dba9||!_0xcff509||typeof _0xcff509!==_0x33c32c(0x181))return _0xcff509;const _0x33db37=_0xcff509,_0x2310b5=typeof _0x33db37[_0x33c32c(0x165)]==='object'&&_0x33db37[_0x33c32c(0x165)]!==null?_0x33db37[_0x33c32c(0x165)]:{};return{..._0x33db37,'_notice':{..._0x2310b5,'update':_0x41dba9}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x295b96,_0xa8b8f2){const _0x453f46=a80_0x175e,_0x2ef8ee=_0x295b96();while(!![]){try{const _0x3a9c8c=-parseInt(_0x453f46(0x102))/0x1*(parseInt(_0x453f46(0x117))/0x2)+-parseInt(_0x453f46(0x107))/0x3+parseInt(_0x453f46(0x116))/0x4+-parseInt(_0x453f46(0x111))/0x5+parseInt(_0x453f46(0x104))/0x6*(parseInt(_0x453f46(0x114))/0x7)+-parseInt(_0x453f46(0x108))/0x8*(parseInt(_0x453f46(0x105))/0x9)+-parseInt(_0x453f46(0x10a))/0xa*(-parseInt(_0x453f46(0x112))/0xb);if(_0x3a9c8c===_0xa8b8f2)break;else _0x2ef8ee['push'](_0x2ef8ee['shift']());}catch(_0x1a8e6c){_0x2ef8ee['push'](_0x2ef8ee['shift']());}}}(a80_0x29b7,0xb7f74));import{buildSchemaPayload as a80_0x5ca70d}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';function a80_0x29b7(){const _0x3d4363=['1273308zjOyVU','13262913XqfaqT','none','1252761rhaMam','8MEPpzk','services','2703770JLgcss','auth','requiresAuth','commands','has','service','../commands/registry.js','2464355NHdWZe','11GaGLpn','filter','49oPDoae','map','5596096rhFmIU','8644qJiAbu','4ZdAfUy','required'];a80_0x29b7=function(){return _0x3d4363;};return a80_0x29b7();}import{findDynamicServiceDefinition,listDynamicServiceEntries}from'../commands/service/dynamic.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 _0x41f6ee=a80_0x175e,{serviceRegistry:_0x564824,findDefinition:_0x4a2b49}=await import(_0x41f6ee(0x110)),_0x4eb035=new Set(_0x564824[_0x41f6ee(0x115)](_0x4d9f3e=>_0x4d9f3e['service'])),_0x2575fc=listDynamicServiceEntries()[_0x41f6ee(0x113)](_0xf8ddde=>!_0x4eb035[_0x41f6ee(0x10e)](_0xf8ddde[_0x41f6ee(0x10f)])),_0xb8fcb8=a80_0x5ca70d({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':getCliGitCommit(),'globalFlags':GLOBAL_FLAGS,'serviceRegistry':[..._0x564824,..._0x2575fc],'buildAllFlags':buildAllFlags,'findDefinition':(_0x19286a,_0x219297)=>_0x4a2b49(_0x19286a,_0x219297)??findDynamicServiceDefinition(_0x19286a,_0x219297)});return normalizeSchemaPayload(_0xb8fcb8);}function normalizeSchemaPayload(_0x34841b){const _0x1a735a=a80_0x175e;return{..._0x34841b,'schemaVersion':0x2,'services':_0x34841b[_0x1a735a(0x109)]['map'](_0xa32e09=>({..._0xa32e09,'commands':_0xa32e09[_0x1a735a(0x10d)][_0x1a735a(0x115)](normalizeSchemaCommand)}))};}function a80_0x175e(_0x13f9f4,_0x45577e){_0x13f9f4=_0x13f9f4-0x102;const _0x29b7e8=a80_0x29b7();let _0x175ee5=_0x29b7e8[_0x13f9f4];return _0x175ee5;}function normalizeSchemaCommand(_0x51afae){const _0x277f68=a80_0x175e,_0x3cfd1b=_0x51afae;return{..._0x51afae,'auth':_0x3cfd1b[_0x277f68(0x10b)]??(_0x51afae[_0x277f68(0x10c)]?_0x277f68(0x103):_0x277f68(0x106))};}
|
package/lib/framework/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a81_0xb424(_0x5c2629,_0xc87b6f){_0x5c2629=_0x5c2629-0xa5;var _0x1d7d8c=a81_0x1d7d();var _0xb424c2=_0x1d7d8c[_0x5c2629];return _0xb424c2;}function a81_0x1d7d(){var _0x44f6aa=['4015boTakd','831660RpDbRy','2194038FaVeVi','2386XAgWbv','2573354USzzes','99Qjgqrc','8jwGAFK','738246aMPvnv','364996PJfGDR','84EofBrT','2952bzePkS'];a81_0x1d7d=function(){return _0x44f6aa;};return a81_0x1d7d();}(function(_0x6ab646,_0x261dae){var _0x4db3fa=a81_0xb424,_0x294d0c=_0x6ab646();while(!![]){try{var _0x158d1b=-parseInt(_0x4db3fa(0xaa))/0x1*(-parseInt(_0x4db3fa(0xaf))/0x2)+-parseInt(_0x4db3fa(0xa8))/0x3+-parseInt(_0x4db3fa(0xa9))/0x4+parseInt(_0x4db3fa(0xac))/0x5*(-parseInt(_0x4db3fa(0xab))/0x6)+-parseInt(_0x4db3fa(0xa5))/0x7*(-parseInt(_0x4db3fa(0xa7))/0x8)+-parseInt(_0x4db3fa(0xae))/0x9+-parseInt(_0x4db3fa(0xad))/0xa*(-parseInt(_0x4db3fa(0xa6))/0xb);if(_0x158d1b===_0x261dae)break;else _0x294d0c['push'](_0x294d0c['shift']());}catch(_0xffc90b){_0x294d0c['push'](_0x294d0c['shift']());}}}(a81_0x1d7d,0x3aa0b));export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a82_0x580ee0=a82_0x591e;(function(_0x133527,_0x72b787){const _0xc8e662=a82_0x591e,_0x208af5=_0x133527();while(!![]){try{const _0x2a7b38=parseInt(_0xc8e662(0x1ca))/0x1+parseInt(_0xc8e662(0x1c1))/0x2+parseInt(_0xc8e662(0x1c5))/0x3*(-parseInt(_0xc8e662(0x1c7))/0x4)+parseInt(_0xc8e662(0x1be))/0x5*(-parseInt(_0xc8e662(0x1bd))/0x6)+parseInt(_0xc8e662(0x1c8))/0x7*(-parseInt(_0xc8e662(0x1c4))/0x8)+-parseInt(_0xc8e662(0x1c2))/0x9+parseInt(_0xc8e662(0x1c0))/0xa*(parseInt(_0xc8e662(0x1c9))/0xb);if(_0x2a7b38===_0x72b787)break;else _0x208af5['push'](_0x208af5['shift']());}catch(_0x2bcd37){_0x208af5['push'](_0x208af5['shift']());}}}(a82_0x1a51,0x64319));export const VERSION='2.1.6-beta.4';export const GIT_TAG=a82_0x580ee0(0x1c3);function a82_0x591e(_0x3b0da0,_0x8d752f){_0x3b0da0=_0x3b0da0-0x1bd;const _0x1a51a5=a82_0x1a51();let _0x591e84=_0x1a51a5[_0x3b0da0];return _0x591e84;}function a82_0x1a51(){const _0x1ecea9=['1157864hXjKlJ','2301588YZiWpq','v2.1.6-beta.4','1198712JVIXeH','98121RpCLjb','2026-07-06T02:53:50.471Z','96mGbaIr','35oeJRef','18604388XRORcN','537623ejKUCn','1215150UUpmKs','15XrrQMr','f49af83','10qxdQOb'];a82_0x1a51=function(){return _0x1ecea9;};return a82_0x1a51();}export const GIT_COMMIT=a82_0x580ee0(0x1bf);export const BUILD_TIME=a82_0x580ee0(0x1c6);
|
package/lib/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x160bf6,_0xd61b6f){const _0x196f0d=a83_0x3f7d,_0x21df9e=_0x160bf6();while(!![]){try{const _0x3655ec=parseInt(_0x196f0d(0x1cf))/0x1+-parseInt(_0x196f0d(0x1c8))/0x2+-parseInt(_0x196f0d(0x1d1))/0x3+parseInt(_0x196f0d(0x1cb))/0x4+parseInt(_0x196f0d(0x1d2))/0x5+parseInt(_0x196f0d(0x1c9))/0x6*(parseInt(_0x196f0d(0x1d3))/0x7)+parseInt(_0x196f0d(0x1ca))/0x8*(-parseInt(_0x196f0d(0x1c7))/0x9);if(_0x3655ec===_0xd61b6f)break;else _0x21df9e['push'](_0x21df9e['shift']());}catch(_0x25fb02){_0x21df9e['push'](_0x21df9e['shift']());}}}(a83_0x171e,0xa432a));function a83_0x3f7d(_0x8525fa,_0x426f4c){_0x8525fa=_0x8525fa-0x1c6;const _0x171eb0=a83_0x171e();let _0x3f7d99=_0x171eb0[_0x8525fa];return _0x3f7d99;}import{jsx as a83_0x32d9f9,jsxs as a83_0xa31e4d}from'react/jsx-runtime';import{useEffect}from'react';import{Box,Text,useApp}from'ink';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function Help(){const _0x28c8cd=a83_0x3f7d,{exit:_0x54eec8}=useApp();return useEffect(()=>{_0x54eec8();},[_0x54eec8]),a83_0xa31e4d(Box,{'flexDirection':_0x28c8cd(0x1ce),'marginTop':0x1,'marginBottom':0x1,'children':[a83_0x32d9f9(Box,{'children':a83_0x32d9f9(Text,{'bold':!![],'color':_0x28c8cd(0x1cc),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a83_0xa31e4d(Box,{'marginTop':0x1,'children':[a83_0x32d9f9(Text,{'dimColor':!![],'children':_0x28c8cd(0x1cd)}),a83_0x32d9f9(Text,{'bold':!![],'color':_0x28c8cd(0x1cc),'children':CLI_BIN_NAME+_0x28c8cd(0x1c6)}),a83_0x32d9f9(Text,{'dimColor':!![],'children':_0x28c8cd(0x1d0)})]})]});}function a83_0x171e(){const _0x3840a4=['220832KmNjgg','1729236PVkxlc','8fXVsPP','346064ACbkye','green','\x20\x20Use\x20','column','496114fiDYJn','\x20to\x20view\x20available\x20commands.','2259465EWqCRw','4375730NQnkAT','14aQbDzj','\x20--help','4482567gZAeuJ'];a83_0x171e=function(){return _0x3840a4;};return a83_0x171e();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a84_0x12399a=a84_0x9080;function a84_0x9080(_0x5ccc62,_0x3923c6){_0x5ccc62=_0x5ccc62-0x19b;const _0x38d523=a84_0x38d5();let _0x9080c3=_0x38d523[_0x5ccc62];return _0x9080c3;}(function(_0x195d85,_0x12465a){const _0x5b643a=a84_0x9080,_0x1c1dd8=_0x195d85();while(!![]){try{const _0x258544=-parseInt(_0x5b643a(0x19c))/0x1*(parseInt(_0x5b643a(0x1a3))/0x2)+-parseInt(_0x5b643a(0x1b1))/0x3+-parseInt(_0x5b643a(0x19b))/0x4*(parseInt(_0x5b643a(0x1a8))/0x5)+parseInt(_0x5b643a(0x19e))/0x6+parseInt(_0x5b643a(0x1a1))/0x7*(-parseInt(_0x5b643a(0x1ae))/0x8)+-parseInt(_0x5b643a(0x1ac))/0x9*(parseInt(_0x5b643a(0x1a7))/0xa)+-parseInt(_0x5b643a(0x1a6))/0xb*(-parseInt(_0x5b643a(0x1a4))/0xc);if(_0x258544===_0x12465a)break;else _0x1c1dd8['push'](_0x1c1dd8['shift']());}catch(_0x15ec19){_0x1c1dd8['push'](_0x1c1dd8['shift']());}}}(a84_0x38d5,0x9fc85));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';import{LOVRABET_SKILL_SOURCE as a84_0x30ec8d}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';export const LOVRABET_SKILL_SOURCE=a84_0x30ec8d;export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG[a84_0x12399a(0x1af)]);function a84_0x38d5(){const _0x2916a2=['trim','1000raGpDE','skipNpxSkillsEnvSuffix','toString','1689666ijsxKC','add','1420492NPyLZG','41XVThXD','stdout','4264512rlaBLA','join','inherit','67333hhUNlq','exit\x20','56456kMvNQT','9254328mFahRv','status','55EXamxL','10VXkaJU','5HPPviG','stderr','stdio','npx','5707665sUUmTf'];a84_0x38d5=function(){return _0x2916a2;};return a84_0x38d5();}export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}export function runNpxSkillsAddGlobal(_0x2c9145,_0x5f29ef=LOVRABET_SKILL_SOURCE,_0x5e4f0e){const _0x2d2b00=a84_0x12399a;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x5150fb=_0x5e4f0e?.[_0x2d2b00(0x1aa)]??_0x2d2b00(0x1a0),_0x3b71cb=resolveNpmBin(_0x2d2b00(0x1ab)),_0x4b43b4=['skills',_0x2d2b00(0x1b2),_0x5f29ef,'-g','-y'],_0x5e475a=[_0x3b71cb,..._0x4b43b4][_0x2d2b00(0x19f)]('\x20');console['log']('*\x20'+_0x5e475a);const _0x4160f9=spawnSync(_0x3b71cb,_0x4b43b4,{'cwd':_0x2c9145,'stdio':_0x5150fb,'env':process.env,'shell':![]});if(_0x4160f9['status']===0x0)return{'ok':!![],'status':0x0};let _0x5a7edb=_0x2d2b00(0x1a2)+(_0x4160f9[_0x2d2b00(0x1a5)]??'unknown');if(_0x5150fb==='pipe'){const _0x4a2ad6=_0x4160f9['stderr']?_0x4160f9[_0x2d2b00(0x1a9)][_0x2d2b00(0x1b0)]()[_0x2d2b00(0x1ad)]():'',_0x3921a4=_0x4160f9[_0x2d2b00(0x19d)]?_0x4160f9[_0x2d2b00(0x19d)][_0x2d2b00(0x1b0)]()['trim']():'';if(_0x4a2ad6)_0x5a7edb=_0x4a2ad6;else{if(_0x3921a4)_0x5a7edb=_0x3921a4;}}return{'ok':![],'status':_0x4160f9[_0x2d2b00(0x1a5)]??null,'error':_0x5a7edb};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a85_0xbbb2b1=a85_0x2b80;(function(_0x3ff6cc,_0xe3b334){const _0x4436b0=a85_0x2b80,_0x1c789c=_0x3ff6cc();while(!![]){try{const _0x207b10=-parseInt(_0x4436b0(0x7b))/0x1+parseInt(_0x4436b0(0x72))/0x2+parseInt(_0x4436b0(0x81))/0x3*(parseInt(_0x4436b0(0x73))/0x4)+-parseInt(_0x4436b0(0x76))/0x5*(-parseInt(_0x4436b0(0x78))/0x6)+-parseInt(_0x4436b0(0x77))/0x7*(-parseInt(_0x4436b0(0x79))/0x8)+-parseInt(_0x4436b0(0x7c))/0x9*(-parseInt(_0x4436b0(0x6f))/0xa)+-parseInt(_0x4436b0(0x75))/0xb;if(_0x207b10===_0xe3b334)break;else _0x1c789c['push'](_0x1c789c['shift']());}catch(_0x1aa132){_0x1c789c['push'](_0x1c789c['shift']());}}}(a85_0x2f88,0xd7d91));function a85_0x2b80(_0x50bc39,_0x3f1012){_0x50bc39=_0x50bc39-0x6e;const _0x2f8849=a85_0x2f88();let _0x2b80df=_0x2f8849[_0x50bc39];return _0x2b80df;}export const METADATA_FILE=a85_0xbbb2b1(0x71);export const SKILL_FILE='SKILL.md';export const MAX_SKILL_FILE_COUNT=0xc8;export const MAX_SKILL_FILE_BYTES=0x100*0x400;export const MAX_SKILL_TOTAL_BYTES=0x2*0x400*0x400;export const MAX_SKILL_PACKAGE_BYTES=0x4*0x400*0x400;export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,a85_0xbbb2b1(0x7e)]);function a85_0x2f88(){const _0x3e693c=['lovrabet.skill.json','1104984rAjQWi','163624pxTmdj','.svn','10441475kEhdCI','8559240lZqkbH','14WmSsqV','6qJSuwT','3865408XVFXDK','.cache','1766767Fueryy','1791ZhcyEk','coverage','.DS_Store','.turbo','build','18gmtPoF','dist','6230yVuOBD','node_modules'];a85_0x2f88=function(){return _0x3e693c;};return a85_0x2f88();}export const IGNORED_DIR_NAMES=new Set(['.git','.hg',a85_0xbbb2b1(0x74),a85_0xbbb2b1(0x70),'.next',a85_0xbbb2b1(0x6e),a85_0xbbb2b1(0x80),a85_0xbbb2b1(0x7d),a85_0xbbb2b1(0x7f),a85_0xbbb2b1(0x7a)]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x415309,_0x4cc3fa){const _0xa9711e=a86_0x34a7,_0x5a6208=_0x415309();while(!![]){try{const _0x44a207=-parseInt(_0xa9711e(0x1e4))/0x1+parseInt(_0xa9711e(0x1de))/0x2*(parseInt(_0xa9711e(0x1ea))/0x3)+parseInt(_0xa9711e(0x1e8))/0x4*(-parseInt(_0xa9711e(0x1dd))/0x5)+parseInt(_0xa9711e(0x1eb))/0x6+parseInt(_0xa9711e(0x1e7))/0x7+-parseInt(_0xa9711e(0x1e2))/0x8+parseInt(_0xa9711e(0x1ee))/0x9*(-parseInt(_0xa9711e(0x1e1))/0xa);if(_0x44a207===_0x4cc3fa)break;else _0x5a6208['push'](_0x5a6208['shift']());}catch(_0x2e90df){_0x5a6208['push'](_0x5a6208['shift']());}}}(a86_0x4a26,0x56c07));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 a86_0x4a26(){const _0x25d881=['startsWith','49089DFiJSR','2696652xftZxZ','.tmp','split','45EsCzpx','5stnzgC','62EEKJIO','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','validation','1509110QfzBJp','499664VHMwyG','Unsafe\x20Skill\x20file\x20path:\x20','142291hWQXwW','endsWith','isSymbolicLink','3300738HWuDNX','454360RcUgsj'];a86_0x4a26=function(){return _0x25d881;};return a86_0x4a26();}export function resolveManagedFilePath(_0x548754,_0x312f71){const _0x142dae=a86_0x34a7,_0x30132a=normalizeSkillRelativePath(_0x312f71),_0x44952f=realOrResolved(_0x548754),_0x1828f2=resolve(_0x44952f,..._0x30132a[_0x142dae(0x1ed)]('/'));if(!isPathInside(_0x1828f2,_0x44952f))throw CliErrors[_0x142dae(0x1e0)](_0x142dae(0x1e3)+_0x312f71);return ensureNoSymlinkInManagedPath(_0x44952f,_0x30132a),_0x1828f2;}export function ensureNoSymlinkInManagedPath(_0x47a5b4,_0x5c7817){const _0x3bad98=a86_0x34a7;let _0x50283e=_0x47a5b4;for(const _0x235b23 of _0x5c7817['split']('/')){_0x50283e=resolve(_0x50283e,_0x235b23);const _0x5309fd=lstatIfPresent(_0x50283e);if(_0x5309fd?.[_0x3bad98(0x1e6)]())throw CliErrors[_0x3bad98(0x1e0)](_0x3bad98(0x1df)+_0x5c7817);}}export function isDanglingSymlink(_0x48d5bf){const _0x41b1ce=a86_0x34a7;try{return lstatSync(_0x48d5bf)[_0x41b1ce(0x1e6)]();}catch{return![];}}export function resolveSymlinkTarget(_0xb75b51){const _0x1222dd=readlinkSync(_0xb75b51);return isAbsolute(_0x1222dd)?_0x1222dd:resolve(dirname(_0xb75b51),_0x1222dd);}export function isPathInside(_0x5dc6db,_0x3d3054){const _0x4e0a59=a86_0x34a7,_0x429a3b=_0x5dc6db[_0x4e0a59(0x1e5)](sep)?_0x5dc6db:''+_0x5dc6db+sep,_0x275933=_0x3d3054['endsWith'](sep)?_0x3d3054:''+_0x3d3054+sep;return _0x5dc6db===_0x3d3054||_0x429a3b[_0x4e0a59(0x1e9)](_0x275933);}export function realOrResolved(_0x32afd4){try{return realpathSync(_0x32afd4);}catch{return resolve(_0x32afd4);}}function a86_0x34a7(_0x5c7b05,_0x48b049){_0x5c7b05=_0x5c7b05-0x1dd;const _0x4a26b9=a86_0x4a26();let _0x34a7f7=_0x4a26b9[_0x5c7b05];return _0x34a7f7;}export function lstatIfPresent(_0x1d49d5){try{return lstatSync(_0x1d49d5);}catch{return undefined;}}export function writeTextAtomic(_0x33c6e3,_0x22ca25,_0x2dacf6){writeBytesAtomic(_0x33c6e3,Buffer['from'](_0x22ca25,'utf8'),_0x2dacf6);}export function writeBytesAtomic(_0x23c548,_0x52ae12,_0x5a0f07){const _0x5cb200=a86_0x34a7,_0x39ea32=_0x23c548+_0x5cb200(0x1ec);try{writeFileSync(_0x39ea32,_0x52ae12,{'mode':_0x5a0f07}),renameSync(_0x39ea32,_0x23c548);}catch(_0xb7d040){try{rmSync(_0x39ea32,{'force':!![]});}catch{}throw _0xb7d040;}}export function writeJsonAtomic(_0x225792,_0x3717e1){writeTextAtomic(_0x225792,JSON['stringify'](_0x3717e1,null,0x2)+'\x0a',0x180);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a87_0x1c11(){const _0x146137=['16SCafOy','sha256','690990GWlkMw','1307733Jprzwr','99240crOoep','size','3860217PIAJRd','10OPupyR','digest','hex','6oBImcp','431128VAdyWc','615376AvLHjP','87390sOrYFP','update'];a87_0x1c11=function(){return _0x146137;};return a87_0x1c11();}(function(_0x53da94,_0x71d446){const _0x233636=a87_0x9421,_0x1fa535=_0x53da94();while(!![]){try{const _0x225f5e=parseInt(_0x233636(0x160))/0x1+-parseInt(_0x233636(0x15f))/0x2+parseInt(_0x233636(0x15d))/0x3*(-parseInt(_0x233636(0x15e))/0x4)+-parseInt(_0x233636(0x157))/0x5+-parseInt(_0x233636(0x164))/0x6+-parseInt(_0x233636(0x156))/0x7*(-parseInt(_0x233636(0x162))/0x8)+-parseInt(_0x233636(0x159))/0x9*(-parseInt(_0x233636(0x15a))/0xa);if(_0x225f5e===_0x71d446)break;else _0x1fa535['push'](_0x1fa535['shift']());}catch(_0x48ae78){_0x1fa535['push'](_0x1fa535['shift']());}}}(a87_0x1c11,0x388fc));import{createHash}from'node:crypto';function a87_0x9421(_0x312aa2,_0x235572){_0x312aa2=_0x312aa2-0x156;const _0x1c11f5=a87_0x1c11();let _0x9421ea=_0x1c11f5[_0x312aa2];return _0x9421ea;}import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0x1a658c){const _0x2d411f=a87_0x9421;return createHash(_0x2d411f(0x163))[_0x2d411f(0x161)](_0x1a658c)[_0x2d411f(0x15b)](_0x2d411f(0x15c));}export function fileHash(_0x44bde7){return bufferSha256(fileContent(_0x44bde7));}export function bufferSha256(_0x14fe8f){const _0x1d90be=a87_0x9421;return createHash('sha256')['update'](_0x14fe8f)[_0x1d90be(0x15b)](_0x1d90be(0x15c));}export function fileTreeHash(_0x4ba159){const _0x14fd6d=a87_0x9421,_0xaf8701=createHash(_0x14fd6d(0x163));for(const _0x284c9f of normalizeManifestFiles(_0x4ba159)){_0xaf8701[_0x14fd6d(0x161)](_0x284c9f['path']),_0xaf8701[_0x14fd6d(0x161)]('\x00'),_0xaf8701['update'](_0x284c9f[_0x14fd6d(0x163)]),_0xaf8701[_0x14fd6d(0x161)]('\x00'),_0xaf8701['update'](String(_0x284c9f[_0x14fd6d(0x158)])),_0xaf8701['update']('\x00');}return _0xaf8701[_0x14fd6d(0x15b)]('hex');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x472bf7,_0x138682){const _0x39f257=a88_0x4951,_0x15c360=_0x472bf7();while(!![]){try{const _0x4a0ce1=-parseInt(_0x39f257(0x7d))/0x1*(-parseInt(_0x39f257(0x97))/0x2)+parseInt(_0x39f257(0x90))/0x3*(parseInt(_0x39f257(0x85))/0x4)+-parseInt(_0x39f257(0x92))/0x5*(-parseInt(_0x39f257(0x77))/0x6)+-parseInt(_0x39f257(0x7e))/0x7*(-parseInt(_0x39f257(0x7b))/0x8)+-parseInt(_0x39f257(0x76))/0x9+-parseInt(_0x39f257(0x9b))/0xa+parseInt(_0x39f257(0x72))/0xb*(parseInt(_0x39f257(0x94))/0xc);if(_0x4a0ce1===_0x138682)break;else _0x15c360['push'](_0x15c360['shift']());}catch(_0x5b1dbc){_0x15c360['push'](_0x15c360['shift']());}}}(a88_0x509a,0x87c92));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a88_0x13e20d from'fs-extra';import{CliErrors}from'../../errors.js';function a88_0x4951(_0xcb7498,_0x19b4f8){_0xcb7498=_0xcb7498-0x72;const _0x509ac4=a88_0x509a();let _0x495186=_0x509ac4[_0xcb7498];return _0x495186;}import{METADATA_FILE}from'./constants.js';import{isDanglingSymlink,isPathInside,lstatIfPresent,realOrResolved,resolveSymlinkTarget}from'./fs-utils.js';import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a88_0x13e20d;export function linkEffectiveRuntimeSkills(_0x1b3de5,_0x488903,_0x452d9c={}){const _0x397ab1=a88_0x4951,_0x6592a3=new Map();for(const _0x2a9ddd of _0x1b3de5){const _0x143c02=_0x2a9ddd[_0x397ab1(0x9d)][_0x397ab1(0x8e)];if(!_0x143c02)continue;const _0x2ec74a=_0x6592a3[_0x397ab1(0x91)](_0x143c02);(!_0x2ec74a||_0x2a9ddd[_0x397ab1(0x8f)]===_0x397ab1(0x95))&&_0x6592a3[_0x397ab1(0x8a)](_0x143c02,_0x2a9ddd);}const _0x1ce0e9=[],_0xaf47cf=resolveSkillSyncPaths(_0x452d9c);for(const _0x22d934 of _0x6592a3['values']()){const _0x4f7512=requireSkillCode(_0x22d934[_0x397ab1(0x9d)]),_0x5e8dfa=_0x488903+'--'+_0x4f7512;for(const _0x37b4a0 of[_0xaf47cf['agentsSkillsDir'],_0xaf47cf[_0x397ab1(0xa0)]]){_0x1ce0e9[_0x397ab1(0x78)](ensureManagedSymlink(resolve(_0x37b4a0,_0x5e8dfa),_0x22d934['dir'],_0xaf47cf[_0x397ab1(0xa1)]));}}return _0x1ce0e9;}export function pruneStaleRuntimeSkillLinks(_0x1ebe50,_0x56acf2,_0x5485bb={},_0x5e2ec8){const _0x4a590b=a88_0x4951,_0x47a4a5=resolveSkillSyncPaths(_0x5485bb),_0x53ab36=new Set([..._0x56acf2][_0x4a590b(0x86)](_0x3cd5b3=>_0x3cd5b3[_0x4a590b(0x93)]())['filter'](Boolean)),_0x3d6a3e=_0x5e2ec8?new Set([..._0x5e2ec8][_0x4a590b(0x86)](_0x1396ee=>_0x1396ee[_0x4a590b(0x93)]())['filter'](Boolean)):undefined,_0x53b615=[];for(const _0x21d566 of[_0x47a4a5['agentsSkillsDir'],_0x47a4a5[_0x4a590b(0xa0)]]){for(const _0x1cea07 of managedAppSkillLinkPaths(_0x21d566,_0x1ebe50)){const _0x549058=basename(_0x1cea07)[_0x4a590b(0x74)]((_0x1ebe50+'--')[_0x4a590b(0x9a)]);if(_0x3d6a3e&&!_0x3d6a3e[_0x4a590b(0x82)](_0x549058))continue;if(_0x53ab36[_0x4a590b(0x82)](_0x549058))continue;_0x53b615[_0x4a590b(0x78)](removeManagedSkillLink(_0x1cea07,_0x47a4a5[_0x4a590b(0xa1)]));}}return _0x53b615;}export function pruneStaleRuntimeSkillCache(_0x4b27c5,_0x2a8300={}){const _0x24a119=a88_0x4951,_0x43d6e8=new Set([..._0x4b27c5['activeSkillCodes']][_0x24a119(0x86)](_0x153260=>_0x153260[_0x24a119(0x93)]())[_0x24a119(0xa3)](Boolean)),_0xcdeda7=_0x4b27c5[_0x24a119(0x9f)]?new Set([..._0x4b27c5[_0x24a119(0x9f)]][_0x24a119(0x86)](_0x23a4ff=>_0x23a4ff[_0x24a119(0x93)]())[_0x24a119(0xa3)](Boolean)):undefined,_0x520443=_0x4b27c5[_0x24a119(0x8d)]??[_0x24a119(0x95),_0x24a119(0xa2)],_0x53ff63=resolve(getRuntimeSkillCacheRoot(_0x4b27c5[_0x24a119(0x88)],_0x4b27c5[_0x24a119(0x7c)],_0x2a8300),safePathSegment(_0x4b27c5['appCode'],_0x24a119(0x84))),_0x2d581c=[];for(const _0x481abd of _0x520443){const _0x2bdd71=resolve(_0x53ff63,_0x481abd);if(!existsSync(_0x2bdd71))continue;for(const _0x1279c4 of readdirSync(_0x2bdd71,{'withFileTypes':!![]})){if(!_0x1279c4[_0x24a119(0x8b)]())continue;const _0x5908a3=_0x1279c4[_0x24a119(0x96)];if(_0xcdeda7&&!_0xcdeda7['has'](_0x5908a3))continue;if(_0x43d6e8['has'](_0x5908a3))continue;const _0x3aa229=resolve(_0x2bdd71,_0x5908a3),_0x463163=readMetadataIfPresent(resolve(_0x3aa229,METADATA_FILE));if(_0x463163?.['appCode']!==_0x4b27c5[_0x24a119(0x84)]||_0x463163[_0x24a119(0x8f)]!==_0x481abd||_0x463163[_0x24a119(0x8e)]!==_0x5908a3){_0x2d581c['push']({'path':_0x3aa229,'action':'skipped','reason':_0x24a119(0x98)});continue;}removeSync(_0x3aa229),_0x2d581c[_0x24a119(0x78)]({'path':_0x3aa229,'action':_0x24a119(0x8c)});}}return _0x2d581c;}export function linkGlobalRuntimeSkills(_0x24c4e5,_0x1c2186={}){const _0xf2d0e6=a88_0x4951,_0x428e01=resolveSkillSyncPaths(_0x1c2186),_0x3017f5=[];for(const _0x5a5b8a of _0x24c4e5){if(_0x5a5b8a[_0xf2d0e6(0x8f)]!==_0xf2d0e6(0x99))throw CliErrors[_0xf2d0e6(0x80)](_0xf2d0e6(0x79)+_0x5a5b8a['scope']);const _0x250787=requireSkillCode(_0x5a5b8a[_0xf2d0e6(0x9d)]),_0x2d2e22=copyManagedSkillDirectory(_0x5a5b8a['dir'],resolve(_0x428e01['agentsSkillsDir'],_0x250787));_0x3017f5[_0xf2d0e6(0x78)]({..._0x2d2e22,'contentHash':_0x5a5b8a[_0xf2d0e6(0x9e)]});}return _0x3017f5;}function ensureManagedSymlink(_0x3adaee,_0x527ba8,_0x30218f){const _0x37aceb=a88_0x4951;mkdirSync(dirname(_0x3adaee),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x3adaee)||isDanglingSymlink(_0x3adaee)){const _0xb3b7a2=lstatSync(_0x3adaee);if(!_0xb3b7a2[_0x37aceb(0x83)]())throw CliErrors['validation'](_0x37aceb(0x7f)+_0x3adaee);const _0x2edea9=resolveSymlinkTarget(_0x3adaee);if(!isPathInside(realOrResolved(_0x2edea9),realOrResolved(_0x30218f)))throw CliErrors[_0x37aceb(0x80)](_0x37aceb(0x87)+_0x3adaee);if(realOrResolved(_0x2edea9)===realOrResolved(_0x527ba8))return{'path':_0x3adaee,'target':_0x527ba8,'action':_0x37aceb(0x73)};return unlinkSync(_0x3adaee),symlinkSync(_0x527ba8,_0x3adaee,_0x37aceb(0x7a)),{'path':_0x3adaee,'target':_0x527ba8,'action':'updated'};}return symlinkSync(_0x527ba8,_0x3adaee,_0x37aceb(0x7a)),{'path':_0x3adaee,'target':_0x527ba8,'action':_0x37aceb(0x75)};}function managedAppSkillLinkPaths(_0x2eac39,_0x5f12c2){const _0x37dcf2=a88_0x4951;if(!existsSync(_0x2eac39))return[];const _0x3d57d8=_0x5f12c2+'--';return readdirSync(_0x2eac39,{'withFileTypes':!![]})[_0x37dcf2(0xa3)](_0x2586e6=>_0x2586e6[_0x37dcf2(0x96)]['startsWith'](_0x3d57d8))[_0x37dcf2(0x86)](_0x3c68a7=>resolve(_0x2eac39,_0x3c68a7[_0x37dcf2(0x96)]));}function a88_0x509a(){const _0x34a5d3=['slice','created','3477249wQgvEG','6eRoJWr','push','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','dir','1780280NIWXHr','accessKey','2NZakof','14bnlgMw','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','validation','external-symlink','has','isSymbolicLink','appCode','4WWXXHo','map','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','env','skipped','set','isDirectory','removed','scopes','skillCode','scope','446673apXUqX','get','1081555GtuDuJ','trim','60VMZrED','personal','name','468686cyqgEG','metadata-mismatch','builtin','length','9284890AryoFo','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','skill','contentHash','pruneSkillCodes','claudeSkillsDir','managedRoot','company','filter','1302554aVEsVb','unchanged'];a88_0x509a=function(){return _0x34a5d3;};return a88_0x509a();}function removeManagedSkillLink(_0x55c9fb,_0x1ba12a){const _0x5b3210=a88_0x4951,_0x5c04fe=lstatIfPresent(_0x55c9fb);if(!_0x5c04fe?.[_0x5b3210(0x83)]())return{'path':_0x55c9fb,'action':'skipped','reason':'not-managed-symlink'};const _0x4b1ef9=resolveSymlinkTarget(_0x55c9fb);if(!isPathInside(realOrResolved(_0x4b1ef9),realOrResolved(_0x1ba12a)))return{'path':_0x55c9fb,'action':_0x5b3210(0x89),'reason':_0x5b3210(0x81)};return unlinkSync(_0x55c9fb),{'path':_0x55c9fb,'action':_0x5b3210(0x8c)};}export function copyManagedSkillDirectory(_0x3eac78,_0x57c322){const _0x2ef637=a88_0x4951,_0x3ead9e=resolve(_0x57c322,METADATA_FILE),_0x19856b=existsSync(_0x57c322);if(_0x19856b){const _0x1a96f7=lstatSync(_0x57c322);if(_0x1a96f7['isSymbolicLink']())throw CliErrors[_0x2ef637(0x80)]('Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20'+_0x57c322);if(!_0x1a96f7[_0x2ef637(0x8b)]())throw CliErrors['validation'](_0x2ef637(0x9c)+_0x57c322);const _0x213076=readMetadataIfPresent(_0x3ead9e);if(_0x213076?.[_0x2ef637(0x8f)]!==_0x2ef637(0x99))throw CliErrors['validation']('Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20'+_0x57c322);}ensureDirSync(dirname(_0x57c322));const _0x31de70=_0x19856b?readMetadataIfPresent(_0x3ead9e)?.[_0x2ef637(0x9e)]:undefined,_0x4bede5=readMetadataIfPresent(resolve(_0x3eac78,METADATA_FILE))?.[_0x2ef637(0x9e)];return _0x19856b&&removeSync(_0x57c322),copySkillDirectory(_0x3eac78,_0x57c322),{'path':_0x57c322,'target':_0x3eac78,'action':!_0x19856b?_0x2ef637(0x75):_0x31de70===_0x4bede5?_0x2ef637(0x73):'updated'};}function copySkillDirectory(_0xb8f903,_0x1ab081){copySync(_0xb8f903,_0x1ab081,{'dereference':![],'overwrite':!![],'filter'(_0x9e6546){const _0x1bb072=a88_0x4951;if(lstatSync(_0x9e6546)[_0x1bb072(0x83)]())throw CliErrors['validation']('Refusing\x20to\x20copy\x20Skill\x20symlink:\x20'+_0x9e6546);return!![];}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x48b298,_0x275f43){const _0x313fb3=a89_0x4550,_0x5d5b2b=_0x48b298();while(!![]){try{const _0x1483ce=-parseInt(_0x313fb3(0x143))/0x1*(parseInt(_0x313fb3(0x12b))/0x2)+-parseInt(_0x313fb3(0x147))/0x3+-parseInt(_0x313fb3(0x134))/0x4*(-parseInt(_0x313fb3(0x148))/0x5)+-parseInt(_0x313fb3(0x123))/0x6*(parseInt(_0x313fb3(0x12f))/0x7)+-parseInt(_0x313fb3(0x13b))/0x8*(parseInt(_0x313fb3(0x139))/0x9)+-parseInt(_0x313fb3(0x142))/0xa+parseInt(_0x313fb3(0x136))/0xb*(parseInt(_0x313fb3(0x12c))/0xc);if(_0x1483ce===_0x275f43)break;else _0x5d5b2b['push'](_0x5d5b2b['shift']());}catch(_0x135cce){_0x5d5b2b['push'](_0x5d5b2b['shift']());}}}(a89_0x1e0a,0xb8b8d));import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';function a89_0x1e0a(){const _0x6d2d46=['skillMdPath','source','7579840UsZdCV','310018miiCxX','filter','scope','isArray','80640QXfnMg','78890BPuBTP','claudeSkillsDir','from','env','code','metadataPath','16014KhjXaK','appCode','includes','cache','linkedPaths','isDirectory','trim','accessKey','4sTCizB','2676QxAptQ','agentsSkillsDir','cacheDir','2212zGcTZB','linkedPath','localeCompare','dir','name','188pTzawU','scopes','182809fkDvyd','has','link','18iPIvyj','set','5770712mILGxJ','tags','skillCode','sort','map'];a89_0x1e0a=function(){return _0x6d2d46;};return a89_0x1e0a();}import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{readMetadataIfPresent}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';function a89_0x4550(_0x3f14c9,_0xadbf5f){_0x3f14c9=_0x3f14c9-0x122;const _0x1e0ac2=a89_0x1e0a();let _0x455027=_0x1e0ac2[_0x3f14c9];return _0x455027;}export function listLocalRuntimeSkills(_0x3fbaa8,_0x3b7389={}){const _0x405c87=a89_0x4550,_0x28ed0e=safePathSegment(_0x3fbaa8['appCode'],_0x405c87(0x124)),_0x59237d=normalizeRuntimeSkillScopes(_0x3fbaa8[_0x405c87(0x135)]),_0x3ff2af=new Set(_0x59237d),_0x3e5011=_0x3fbaa8[_0x405c87(0x14c)]?.[_0x405c87(0x129)](),_0x30c33b=new Map(),_0x46733c=resolve(getRuntimeSkillCacheRoot(_0x3fbaa8[_0x405c87(0x14b)],_0x3fbaa8[_0x405c87(0x12a)],_0x3b7389),_0x28ed0e);for(const _0xa9ea7e of _0x59237d){for(const _0x3d7fa0 of localSkillEntryDirs(resolve(_0x46733c,_0xa9ea7e))){collectLocalRuntimeSkill(_0x30c33b,_0x3d7fa0,{'appCode':_0x28ed0e,'scopes':_0x3ff2af,'code':_0x3e5011,'source':_0x405c87(0x126)});}}const _0x1978a2=resolveSkillSyncPaths(_0x3b7389);for(const _0x59927b of[_0x1978a2[_0x405c87(0x12d)],_0x1978a2[_0x405c87(0x149)]]){for(const _0x4ae121 of localSkillLinkCandidates(_0x59927b,_0x28ed0e,_0x3ff2af)){collectLocalRuntimeSkill(_0x30c33b,_0x4ae121,{'appCode':_0x28ed0e,'scopes':_0x3ff2af,'code':_0x3e5011,'source':_0x405c87(0x138),'linkedPath':_0x4ae121});}}return Array[_0x405c87(0x14a)](_0x30c33b['values']())['sort'](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x28ff25){const _0x158f07=a89_0x4550;if(!existsSync(_0x28ff25))return[];return readdirSync(_0x28ff25,{'withFileTypes':!![]})[_0x158f07(0x144)](_0x4b1fad=>_0x4b1fad[_0x158f07(0x128)]()||_0x4b1fad['isSymbolicLink']())[_0x158f07(0x13f)](_0x2e8d0c=>resolve(_0x28ff25,_0x2e8d0c[_0x158f07(0x133)]));}function localSkillLinkCandidates(_0x408ce6,_0x3aacd3,_0x55bf65){const _0x158ea7=a89_0x4550;if(!existsSync(_0x408ce6))return[];const _0x6539c7=_0x3aacd3+'--';return readdirSync(_0x408ce6,{'withFileTypes':!![]})[_0x158ea7(0x144)](_0x54f0b7=>_0x54f0b7[_0x158ea7(0x128)]()||_0x54f0b7['isSymbolicLink']())[_0x158ea7(0x144)](_0x5ed938=>_0x5ed938[_0x158ea7(0x133)]['startsWith'](_0x6539c7)||_0x55bf65[_0x158ea7(0x137)]('builtin'))[_0x158ea7(0x13f)](_0x3f6a77=>resolve(_0x408ce6,_0x3f6a77[_0x158ea7(0x133)]));}function collectLocalRuntimeSkill(_0x4c844e,_0x40360a,_0x434e83){const _0x457c73=a89_0x4550,_0x1e696d=resolve(_0x40360a,METADATA_FILE),_0x4cfc23=readMetadataIfPresent(_0x1e696d);if(!_0x4cfc23)return;if(_0x4cfc23[_0x457c73(0x124)]!==_0x434e83['appCode'])return;if(!isRuntimeSkillScope(_0x4cfc23['scope'])||!_0x434e83[_0x457c73(0x135)][_0x457c73(0x137)](_0x4cfc23[_0x457c73(0x145)]))return;const _0x1f8c48=_0x4cfc23[_0x457c73(0x13d)]?.[_0x457c73(0x129)]();if(!_0x1f8c48)return;if(_0x434e83['code']&&_0x1f8c48!==_0x434e83[_0x457c73(0x14c)])return;const _0x57bd11=_0x4cfc23['scope']+':'+_0x1f8c48,_0x453ef8=_0x434e83[_0x457c73(0x130)]?[_0x434e83[_0x457c73(0x130)]]:[],_0x3e59af=_0x4c844e['get'](_0x57bd11);if(_0x3e59af){_0x434e83[_0x457c73(0x141)]==='cache'&&(_0x3e59af[_0x457c73(0x132)]=_0x40360a,_0x3e59af[_0x457c73(0x12e)]=_0x40360a,_0x3e59af[_0x457c73(0x140)]=resolve(_0x40360a,SKILL_FILE),_0x3e59af[_0x457c73(0x122)]=_0x1e696d);for(const _0x2e0041 of _0x453ef8){!_0x3e59af[_0x457c73(0x127)][_0x457c73(0x125)](_0x2e0041)&&_0x3e59af[_0x457c73(0x127)]['push'](_0x2e0041);}_0x3e59af[_0x457c73(0x127)][_0x457c73(0x13e)]();return;}_0x4c844e[_0x457c73(0x13a)](_0x57bd11,{..._0x4cfc23,'tags':Array[_0x457c73(0x146)](_0x4cfc23[_0x457c73(0x13c)])?_0x4cfc23[_0x457c73(0x13c)]:[],'scope':_0x4cfc23[_0x457c73(0x145)],'source':'local','dir':_0x40360a,'cacheDir':_0x434e83[_0x457c73(0x141)]===_0x457c73(0x126)?_0x40360a:undefined,'skillMdPath':resolve(_0x40360a,SKILL_FILE),'metadataPath':_0x1e696d,'linkedPaths':_0x453ef8});}function compareLocalRuntimeSkills(_0x11a8cf,_0x203702){const _0x170db7=a89_0x4550,_0x46d100={'personal':0x0,'company':0x1,'builtin':0x2};return _0x46d100[_0x11a8cf[_0x170db7(0x145)]]-_0x46d100[_0x203702[_0x170db7(0x145)]]||_0x11a8cf[_0x170db7(0x13d)][_0x170db7(0x131)](_0x203702[_0x170db7(0x13d)])||_0x11a8cf[_0x170db7(0x132)]['localeCompare'](_0x203702['dir']);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x24dbf9,_0x2e608c){const _0xe0dcd2=a90_0x1082,_0x7fd0b5=_0x24dbf9();while(!![]){try{const _0x226334=parseInt(_0xe0dcd2(0x96))/0x1+-parseInt(_0xe0dcd2(0x97))/0x2*(-parseInt(_0xe0dcd2(0xad))/0x3)+parseInt(_0xe0dcd2(0x8e))/0x4*(parseInt(_0xe0dcd2(0xae))/0x5)+-parseInt(_0xe0dcd2(0x83))/0x6+parseInt(_0xe0dcd2(0xa0))/0x7+parseInt(_0xe0dcd2(0x95))/0x8+-parseInt(_0xe0dcd2(0xa7))/0x9*(parseInt(_0xe0dcd2(0x9d))/0xa);if(_0x226334===_0x2e608c)break;else _0x7fd0b5['push'](_0x7fd0b5['shift']());}catch(_0x1d899f){_0x7fd0b5['push'](_0x7fd0b5['shift']());}}}(a90_0x2c28,0x78335));import{readFileSync,readdirSync,realpathSync}from'node:fs';function a90_0x1082(_0x570e2c,_0x3aff39){_0x570e2c=_0x570e2c-0x7e;const _0x2c28d9=a90_0x2c28();let _0x10820d=_0x2c28d9[_0x570e2c];return _0x10820d;}import{relative,resolve}from'node:path';import{CliErrors}from'../../errors.js';import{IGNORED_DIR_NAMES,IGNORED_FILE_NAMES,MAX_SKILL_FILE_BYTES,MAX_SKILL_FILE_COUNT,MAX_SKILL_TOTAL_BYTES,SKILL_FILE}from'./constants.js';function a90_0x2c28(){const _0x41c592=['sort','sha256','4659894uklBqt','isFile','Skill\x20file\x20path\x20must\x20be\x20text.','has','isDirectory','Skill\x20file\x20sha256\x20is\x20invalid:\x20','test','string','Skill\x20file\x20exceeds\x20size\x20limit:\x20','Skill\x20directory\x20exceeds\x20total\x20file\x20size\x20limit.','isArray','2532oBPdLM','includes','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','isBuffer','localeCompare','isSymbolicLink','toString','3832096iXLOMu','234686VhdwuQ','1823186fiJGsT','set','split','bytes','utf8','name','2802710nYItWl','Unsafe\x20Skill\x20file\x20path:\x20','Skill\x20file\x20size\x20is\x20invalid:\x20','20629EiFGwv','values','validation','length','startsWith','from','path','18xZeqcX','toLowerCase','compare','Skill\x20directory\x20exceeds\x20file\x20count\x20limit.','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','push','3oYJHzk','1590uzxrMb','object','Duplicate\x20Skill\x20file\x20path:\x20','trim','size'];a90_0x2c28=function(){return _0x41c592;};return a90_0x2c28();}export function fileContent(_0x261d11){const _0xd031cf=a90_0x1082;return _0x261d11[_0xd031cf(0x9a)]??Buffer[_0xd031cf(0xa5)](_0x261d11['content']??'',_0xd031cf(0x9b));}export function fileText(_0x4eafb8){const _0x128b5f=a90_0x1082;return fileContent(_0x4eafb8)[_0x128b5f(0x94)]('utf8');}export function normalizeLocalFiles(_0x49f490){const _0x5703aa=a90_0x1082;if(!Array[_0x5703aa(0x8d)](_0x49f490)||_0x49f490[_0x5703aa(0xa3)]===0x0)return[];if(_0x49f490['length']>MAX_SKILL_FILE_COUNT)throw CliErrors[_0x5703aa(0xa2)](_0x5703aa(0xaa));const _0x2db2de=new Map();let _0x3ba56d=0x0;for(const _0x18eb72 of _0x49f490){if(!_0x18eb72||typeof _0x18eb72!==_0x5703aa(0xaf)||typeof _0x18eb72[_0x5703aa(0xa6)]!==_0x5703aa(0x8a))throw CliErrors[_0x5703aa(0xa2)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x18eca5=normalizeSkillRelativePath(_0x18eb72[_0x5703aa(0xa6)]);if(_0x2db2de[_0x5703aa(0x86)](_0x18eca5))throw CliErrors[_0x5703aa(0xa2)](_0x5703aa(0x7e)+_0x18eca5);if(_0x18eb72[_0x5703aa(0x9a)]!==undefined&&!Buffer[_0x5703aa(0x91)](_0x18eb72[_0x5703aa(0x9a)]))throw CliErrors[_0x5703aa(0xa2)](_0x5703aa(0xab)+_0x18eca5);if(_0x18eb72['bytes']===undefined&&typeof _0x18eb72['content']!==_0x5703aa(0x8a))throw CliErrors['validation'](_0x5703aa(0x90)+_0x18eca5);const _0xe30322=fileContent(_0x18eb72),_0x33bcfe=_0xe30322[_0x5703aa(0xa3)];if(_0x33bcfe>MAX_SKILL_FILE_BYTES)throw CliErrors[_0x5703aa(0xa2)](_0x5703aa(0x8b)+_0x18eca5);_0x3ba56d+=_0x33bcfe;if(_0x3ba56d>MAX_SKILL_TOTAL_BYTES)throw CliErrors['validation'](_0x5703aa(0x8c));_0x2db2de['set'](_0x18eca5,{'path':_0x18eca5,'bytes':_0xe30322});}return Array[_0x5703aa(0xa5)](_0x2db2de[_0x5703aa(0xa1)]())[_0x5703aa(0x81)](compareSkillFiles);}export function normalizeManifestFiles(_0x5726f6){const _0x5ef2e4=a90_0x1082;if(!Array[_0x5ef2e4(0x8d)](_0x5726f6)||_0x5726f6[_0x5ef2e4(0xa3)]===0x0)return[];if(_0x5726f6[_0x5ef2e4(0xa3)]>MAX_SKILL_FILE_COUNT)throw CliErrors[_0x5ef2e4(0xa2)](_0x5ef2e4(0xaa));const _0x7091c=new Map();let _0xda7b8b=0x0;for(const _0x5a43ed of _0x5726f6){if(!_0x5a43ed||typeof _0x5a43ed!=='object'||typeof _0x5a43ed[_0x5ef2e4(0xa6)]!==_0x5ef2e4(0x8a))throw CliErrors[_0x5ef2e4(0xa2)](_0x5ef2e4(0x85));const _0x3a9827=normalizeSkillRelativePath(_0x5a43ed['path']);if(_0x7091c[_0x5ef2e4(0x86)](_0x3a9827))throw CliErrors[_0x5ef2e4(0xa2)](_0x5ef2e4(0x7e)+_0x3a9827);if(!isSha256Hex(_0x5a43ed[_0x5ef2e4(0x82)]))throw CliErrors['validation'](_0x5ef2e4(0x88)+_0x3a9827);if(!Number['isSafeInteger'](_0x5a43ed[_0x5ef2e4(0x80)])||_0x5a43ed[_0x5ef2e4(0x80)]<0x0)throw CliErrors[_0x5ef2e4(0xa2)](_0x5ef2e4(0x9f)+_0x3a9827);if(_0x5a43ed[_0x5ef2e4(0x80)]>MAX_SKILL_FILE_BYTES)throw CliErrors[_0x5ef2e4(0xa2)](_0x5ef2e4(0x8b)+_0x3a9827);_0xda7b8b+=_0x5a43ed['size'];if(_0xda7b8b>MAX_SKILL_TOTAL_BYTES)throw CliErrors[_0x5ef2e4(0xa2)]('Skill\x20directory\x20exceeds\x20total\x20file\x20size\x20limit.');_0x7091c[_0x5ef2e4(0x98)](_0x3a9827,{'path':_0x3a9827,'sha256':_0x5a43ed['sha256'][_0x5ef2e4(0xa8)](),'size':_0x5a43ed[_0x5ef2e4(0x80)]});}return Array[_0x5ef2e4(0xa5)](_0x7091c[_0x5ef2e4(0xa1)]())[_0x5ef2e4(0x81)](compareSkillFiles);}export function scanSkillDirectory(_0x567715){const _0x3fbc60=realpathSync(_0x567715),_0x3dc5b6=[];let _0x3ddb06=0x0;function _0x10b33e(_0x1453b9){const _0x387af9=a90_0x1082,_0x41e572=readdirSync(_0x1453b9,{'withFileTypes':!![]})[_0x387af9(0x81)]((_0xe72489,_0x1b6fba)=>_0xe72489[_0x387af9(0x9c)][_0x387af9(0x92)](_0x1b6fba['name']));for(const _0x27d23a of _0x41e572){if(_0x27d23a[_0x387af9(0x87)]()&&IGNORED_DIR_NAMES['has'](_0x27d23a['name']))continue;if(IGNORED_FILE_NAMES[_0x387af9(0x86)](_0x27d23a[_0x387af9(0x9c)]))continue;const _0x4d0bba=resolve(_0x1453b9,_0x27d23a[_0x387af9(0x9c)]);if(_0x27d23a[_0x387af9(0x93)]())throw CliErrors[_0x387af9(0xa2)]('Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20'+_0x4d0bba);const _0x279f4a=toPosixPath(relative(_0x3fbc60,_0x4d0bba));if(_0x27d23a[_0x387af9(0x87)]()){_0x10b33e(_0x4d0bba);continue;}if(!_0x27d23a[_0x387af9(0x84)]())continue;validateSkillRelativePath(_0x279f4a);const _0x4fc3cb=readFileSync(_0x4d0bba);if(_0x4fc3cb[_0x387af9(0xa3)]>MAX_SKILL_FILE_BYTES)throw CliErrors[_0x387af9(0xa2)](_0x387af9(0x8b)+_0x279f4a);_0x3ddb06+=_0x4fc3cb['length'];if(_0x3ddb06>MAX_SKILL_TOTAL_BYTES)throw CliErrors['validation'](_0x387af9(0x8c));_0x3dc5b6[_0x387af9(0xac)]({'path':_0x279f4a,'bytes':_0x4fc3cb});if(_0x3dc5b6[_0x387af9(0xa3)]>MAX_SKILL_FILE_COUNT)throw CliErrors['validation'](_0x387af9(0xaa));}}return _0x10b33e(_0x3fbc60),normalizeLocalFiles(_0x3dc5b6);}export function compareSkillFiles(_0x25ac0a,_0x509fcf){const _0x2baa12=a90_0x1082;if(_0x25ac0a[_0x2baa12(0xa6)]===SKILL_FILE)return _0x509fcf[_0x2baa12(0xa6)]===SKILL_FILE?0x0:-0x1;if(_0x509fcf[_0x2baa12(0xa6)]===SKILL_FILE)return 0x1;return Buffer[_0x2baa12(0xa9)](Buffer[_0x2baa12(0xa5)](_0x25ac0a[_0x2baa12(0xa6)],_0x2baa12(0x9b)),Buffer[_0x2baa12(0xa5)](_0x509fcf[_0x2baa12(0xa6)],_0x2baa12(0x9b)));}export function normalizeSkillRelativePath(_0x428c11){const _0x568065=a90_0x1082,_0x50df00=toPosixPath(_0x428c11[_0x568065(0x7f)]());return validateSkillRelativePath(_0x50df00),_0x50df00;}export function validateSkillRelativePath(_0x23d167){const _0x414354=a90_0x1082;if(!_0x23d167||_0x23d167[_0x414354(0xa4)]('/')||_0x23d167[_0x414354(0x8f)]('//'))throw CliErrors[_0x414354(0xa2)](_0x414354(0x9e)+_0x23d167);for(const _0x38b5d2 of _0x23d167[_0x414354(0x99)]('/')){if(!_0x38b5d2||_0x38b5d2==='.'||_0x38b5d2==='..')throw CliErrors[_0x414354(0xa2)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x23d167);}}export function toPosixPath(_0x1695f9){return _0x1695f9['replace'](/\\/g,'/');}export function isSha256Hex(_0x22fa4c){const _0x345fed=a90_0x1082;return typeof _0x22fa4c===_0x345fed(0x8a)&&/^[a-fA-F0-9]{64}$/[_0x345fed(0x89)](_0x22fa4c);}
|