@lovrabet/lovrabet-cli 2.1.6-beta.2 → 2.1.6-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/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
package/lib/framework/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2a348b,_0x3c35d3){const _0x1e406f=a74_0x4c67,_0x164c0b=_0x2a348b();while(!![]){try{const _0x32e8c3=-parseInt(_0x1e406f(0x110))/0x1*(-parseInt(_0x1e406f(0x10a))/0x2)+parseInt(_0x1e406f(0x10c))/0x3*(parseInt(_0x1e406f(0x112))/0x4)+-parseInt(_0x1e406f(0x106))/0x5*(parseInt(_0x1e406f(0x108))/0x6)+-parseInt(_0x1e406f(0x104))/0x7*(parseInt(_0x1e406f(0x111))/0x8)+-parseInt(_0x1e406f(0x10f))/0x9*(-parseInt(_0x1e406f(0x10d))/0xa)+-parseInt(_0x1e406f(0x10b))/0xb*(parseInt(_0x1e406f(0x113))/0xc)+-parseInt(_0x1e406f(0x109))/0xd*(parseInt(_0x1e406f(0x10e))/0xe);if(_0x32e8c3===_0x3c35d3)break;else _0x164c0b['push'](_0x164c0b['shift']());}catch(_0x206f93){_0x164c0b['push'](_0x164c0b['shift']());}}}(a74_0x513e,0xf3ae3));import{createFormatOutput,resolveBundledJqPaths}from'@lovrabet/cli-framework';function a74_0x4c67(_0x4e0fd,_0x35d8e4){_0x4e0fd=_0x4e0fd-0x103;const _0x513ec2=a74_0x513e();let _0x4c67be=_0x513ec2[_0x4e0fd];return _0x4c67be;}function a74_0x513e(){const _0x3753ad=['update','5brcGHM','message','2844648cJGPtt','65raOqcn','3905854AFfpJa','52646TwwNUB','66BXsizj','7880XGGzAt','7237398IzKLYc','13860bAitnx','1eIyZhM','3987128WNVQGU','277772KGEcfV','348kGzftJ','pretty','7YMuIak'];a74_0x513e=function(){return _0x3753ad;};return a74_0x513e();}import{CliErrors}from'../errors.js';const baseFormatOutput=createFormatOutput({'cliErrors':CliErrors,'jqBinaryResolverOptions':{'bundledJqPaths':resolveBundledJqPaths()}});export function formatOutput(_0x49b636,_0x1a1770){const _0x47f1f8=a74_0x4c67,_0x3f83eb=_0x49b636['_notice'],{_notice:_0x4a0ce6,..._0x38fb66}=_0x49b636;void _0x4a0ce6,baseFormatOutput(_0x38fb66,_0x1a1770),_0x1a1770['format']===_0x47f1f8(0x103)&&printPrettyNotice(_0x3f83eb);}function printPrettyNotice(_0x5bafa6){const _0x4a9896=a74_0x4c67;if(!_0x5bafa6?.['update'])return;console['error'](_0x5bafa6[_0x4a9896(0x105)][_0x4a9896(0x107)]+'\x20('+_0x5bafa6[_0x4a9896(0x105)]['url']+')');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5d4e99,_0x4404dd){const _0x28ebd4=a75_0x28d8,_0x3c2058=_0x5d4e99();while(!![]){try{const _0x555c10=parseInt(_0x28ebd4(0x111))/0x1*(parseInt(_0x28ebd4(0x133))/0x2)+parseInt(_0x28ebd4(0x11f))/0x3*(parseInt(_0x28ebd4(0x131))/0x4)+-parseInt(_0x28ebd4(0x124))/0x5*(parseInt(_0x28ebd4(0x11c))/0x6)+parseInt(_0x28ebd4(0x10f))/0x7*(-parseInt(_0x28ebd4(0x115))/0x8)+parseInt(_0x28ebd4(0x118))/0x9+-parseInt(_0x28ebd4(0x12d))/0xa+parseInt(_0x28ebd4(0x11b))/0xb;if(_0x555c10===_0x4404dd)break;else _0x3c2058['push'](_0x3c2058['shift']());}catch(_0xfd6e1a){_0x3c2058['push'](_0x3c2058['shift']());}}}(a75_0x80ef,0x1e05f));function toKebab(_0x37d9f9){const _0x55d790=a75_0x28d8;return _0x37d9f9[_0x55d790(0x120)](/_/g,'-')[_0x55d790(0x120)](/-([A-Z]+)/g,(_0xa3926e,_0x5d91f3)=>'-'+_0x5d91f3[_0x55d790(0x109)]())[_0x55d790(0x120)](/([a-z0-9])([A-Z])/g,(_0x5e1d79,_0x274f36,_0x3b4de1)=>_0x274f36+'-'+_0x3b4de1)[_0x55d790(0x109)]();}function buildKnownFlags(_0xba73){const _0x18d302=a75_0x28d8,_0x2e0a2a=new Set();for(const _0x5e3256 of _0xba73){_0x2e0a2a[_0x18d302(0x130)](_0x5e3256[_0x18d302(0x11e)]),_0x2e0a2a[_0x18d302(0x130)](toCamelCase(_0x5e3256[_0x18d302(0x11e)]));}for(const _0x51daca of[_0x18d302(0x12a),_0x18d302(0x117),_0x18d302(0x119),_0x18d302(0x127)]){_0x2e0a2a['add'](_0x51daca);}for(const _0x33a359 of[_0x18d302(0x128),_0x18d302(0x12b),_0x18d302(0x11a),_0x18d302(0x10a),'nonInteractive',_0x18d302(0x12e),'ci',_0x18d302(0x108),_0x18d302(0x121)]){_0x2e0a2a[_0x18d302(0x130)](_0x33a359);}return _0x2e0a2a;}function buildFlagTypeMap(_0x19634b){const _0x1c1546=a75_0x28d8,_0x354d7c=new Map();for(const _0x8b7902 of _0x19634b){_0x354d7c[_0x1c1546(0x12f)](_0x8b7902['name'],_0x8b7902[_0x1c1546(0x110)]),_0x354d7c[_0x1c1546(0x12f)](toCamelCase(_0x8b7902[_0x1c1546(0x11e)]),_0x8b7902['type']);}return _0x354d7c;}function toCamelCase(_0x16a428){const _0x5cb479=a75_0x28d8;return _0x16a428[_0x5cb479(0x120)](/-([a-z])/g,(_0x52f9cb,_0x2ca170)=>_0x2ca170[_0x5cb479(0x126)]());}function aliasHandler(_0x206355,_0x5a3fd9){const _0x573922=a75_0x28d8,_0x248c2a=[];for(const _0x257737 of Object[_0x573922(0x132)](_0x206355)){if(_0x5a3fd9[_0x573922(0x113)](_0x257737))continue;const _0x34f0b8=toKebab(_0x257737);_0x34f0b8!==_0x257737&&_0x5a3fd9[_0x573922(0x113)](_0x34f0b8)&&_0x248c2a[_0x573922(0x12c)]({'original':_0x257737,'corrected':_0x34f0b8,'handler':_0x573922(0x125)});}return _0x248c2a;}function a75_0x28d8(_0x382c80,_0xe0d1b3){_0x382c80=_0x382c80-0x108;const _0x80efcc=a75_0x80ef();let _0x28d840=_0x80efcc[_0x382c80];return _0x28d840;}function stickyHandler(_0x568f85,_0x4e9430,_0x5227e0){const _0x231e4d=a75_0x28d8,_0x38f415=[];for(const [_0x964fa5,_0x5dda0a]of Object[_0x231e4d(0x10c)](_0x568f85)){if(_0x5dda0a!==!![])continue;for(let _0x3a2f3a=_0x964fa5[_0x231e4d(0x11d)]-0x1;_0x3a2f3a>0x0;_0x3a2f3a--){const _0x4d3f5b=_0x964fa5[_0x231e4d(0x10d)](0x0,_0x3a2f3a),_0x28de6f=_0x964fa5[_0x231e4d(0x10d)](_0x3a2f3a),_0x8330d7=toKebab(_0x4d3f5b),_0x626d0d=toCamelCase(_0x4d3f5b),_0x2005ed=_0x4e9430[_0x231e4d(0x113)](_0x4d3f5b)?_0x4d3f5b:_0x4e9430[_0x231e4d(0x113)](_0x8330d7)?_0x8330d7:_0x4e9430['has'](_0x626d0d)?_0x626d0d:null;if(!_0x2005ed)continue;const _0x137a37=_0x5227e0[_0x231e4d(0x10e)](_0x2005ed)??'string';let _0x2910b3;if(_0x137a37===_0x231e4d(0x112)){const _0x5726f8=Number(_0x28de6f);if(isNaN(_0x5726f8)||_0x28de6f==='')continue;_0x2910b3=_0x5726f8;}else{if(_0x137a37===_0x231e4d(0x10b))continue;else{if(_0x28de6f==='')continue;_0x2910b3=_0x28de6f;}}_0x38f415[_0x231e4d(0x12c)]({'original':_0x964fa5,'corrected':_0x2005ed+'='+_0x2910b3,'handler':_0x231e4d(0x122)});break;}}return _0x38f415;}export function correctFlags(_0x55782d,_0x454af5){const _0x59a585=a75_0x28d8,_0x1b3191=buildKnownFlags(_0x454af5),_0x472115=buildFlagTypeMap(_0x454af5),_0x474eb8=aliasHandler(_0x55782d,_0x1b3191),_0x4e34a1=stickyHandler(_0x55782d,_0x1b3191,_0x472115),_0x3b1b4a=[..._0x474eb8,..._0x4e34a1];if(_0x3b1b4a[_0x59a585(0x11d)]===0x0)return{'flags':_0x55782d,'corrections':[]};const _0x4b0e94={..._0x55782d},_0x2339bf=new Set();for(const _0x24415f of _0x474eb8){_0x4b0e94[_0x24415f[_0x59a585(0x114)]]=_0x55782d[_0x24415f[_0x59a585(0x123)]],_0x2339bf['add'](_0x24415f[_0x59a585(0x123)]);}for(const _0x229886 of _0x4e34a1){const _0x40010e=_0x229886[_0x59a585(0x114)][_0x59a585(0x116)]('='),_0x135bf6=_0x229886[_0x59a585(0x114)][_0x59a585(0x10d)](0x0,_0x40010e),_0x41ce77=_0x229886[_0x59a585(0x114)][_0x59a585(0x10d)](_0x40010e+0x1),_0x2da5ee=_0x472115[_0x59a585(0x10e)](_0x135bf6)??_0x59a585(0x129);_0x2da5ee===_0x59a585(0x112)?_0x4b0e94[_0x135bf6]=Number(_0x41ce77):_0x4b0e94[_0x135bf6]=_0x41ce77,_0x2339bf['add'](_0x229886[_0x59a585(0x123)]);}for(const _0x4e10c2 of _0x2339bf){delete _0x4b0e94[_0x4e10c2];}return{'flags':_0x4b0e94,'corrections':_0x3b1b4a};}function a75_0x80ef(){const _0x7018d0=['245RFTbEn','type','1066MSRoVY','number','has','corrected','2152XRqCHv','indexOf','dryRun','1493019LHrSpI','yes','appcode','116182TKKdzY','12PigfRm','length','name','3LbxuMP','replace','version','sticky','original','552985miHdzO','alias','toUpperCase','format','help','string','dry-run','env','push','2309280FGZgnA','non-interactive','set','add','937204CxvJdp','keys','326zYfaBJ','global','toLowerCase','app','boolean','entries','slice','get'];a75_0x80ef=function(){return _0x7018d0;};return a75_0x80ef();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a76_0x1805(){var _0x3ad2e2=['6068174ammFpx','10lbbOCI','875290YRsjgV','4053702pDYaDr','4cOaVnf','7251201FoFrRu','10611271tCSeca','8DUPlbu','1116582fFxxva','5ypyTrr','3731196XjaMdX'];a76_0x1805=function(){return _0x3ad2e2;};return a76_0x1805();}(function(_0x5dff4e,_0x271588){var _0x1329b9=a76_0x5850,_0x1e3079=_0x5dff4e();while(!![]){try{var _0x855a5c=parseInt(_0x1329b9(0xb8))/0x1+parseInt(_0x1329b9(0xaf))/0x2*(-parseInt(_0x1329b9(0xb3))/0x3)+-parseInt(_0x1329b9(0xb5))/0x4+-parseInt(_0x1329b9(0xb4))/0x5*(-parseInt(_0x1329b9(0xb9))/0x6)+-parseInt(_0x1329b9(0xb6))/0x7*(-parseInt(_0x1329b9(0xb2))/0x8)+parseInt(_0x1329b9(0xb0))/0x9*(parseInt(_0x1329b9(0xb7))/0xa)+-parseInt(_0x1329b9(0xb1))/0xb;if(_0x855a5c===_0x271588)break;else _0x1e3079['push'](_0x1e3079['shift']());}catch(_0x55b34b){_0x1e3079['push'](_0x1e3079['shift']());}}}(a76_0x1805,0x8dffe));function a76_0x5850(_0x155705,_0x3fc4b2){_0x155705=_0x155705-0xaf;var _0x18053d=a76_0x1805();var _0x58508d=_0x18053d[_0x155705];return _0x58508d;}export{extractList,extractPaging}from'@lovrabet/cli-framework';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x13939f,_0x12209a){const _0x2431e3=a77_0x309c,_0x5ccd1b=_0x13939f();while(!![]){try{const _0x297b5d=-parseInt(_0x2431e3(0xd3))/0x1*(parseInt(_0x2431e3(0xca))/0x2)+parseInt(_0x2431e3(0xba))/0x3+parseInt(_0x2431e3(0xc0))/0x4+-parseInt(_0x2431e3(0xc8))/0x5+parseInt(_0x2431e3(0xd1))/0x6*(parseInt(_0x2431e3(0xc3))/0x7)+parseInt(_0x2431e3(0xc4))/0x8*(-parseInt(_0x2431e3(0xd6))/0x9)+parseInt(_0x2431e3(0xcb))/0xa*(-parseInt(_0x2431e3(0xbe))/0xb);if(_0x297b5d===_0x12209a)break;else _0x5ccd1b['push'](_0x5ccd1b['shift']());}catch(_0x3cb088){_0x5ccd1b['push'](_0x5ccd1b['shift']());}}}(a77_0x5e3f,0xd8ca9));import{CLI_BIN_NAME}from'../constant/cli.js';export function buildConfirmationLines(_0x3723fe,_0x4e9547,_0x3b4754){const _0x440e32=a77_0x309c,_0x286733=buildConfirmationContext(_0x3723fe,_0x4e9547,_0x3b4754),_0x3d7c9d=[_0x440e32(0xd5)+_0x286733[_0x440e32(0xbb)]];return _0x286733[_0x440e32(0xce)]&&_0x3d7c9d[_0x440e32(0xd0)](_0x440e32(0xb8)+_0x286733['description']),_0x286733[_0x440e32(0xc9)]&&_0x3d7c9d[_0x440e32(0xd0)]('\x20\x20\x20Affected:\x20'+_0x286733[_0x440e32(0xc9)]),_0x3d7c9d[_0x440e32(0xd0)](_0x440e32(0xcc)),_0x3d7c9d;}export function reconstructCommandArgv(_0x333661,_0x462e0d){const _0x269175=a77_0x309c,_0x14d937=[CLI_BIN_NAME,_0x333661[_0x269175(0xcf)],_0x333661[_0x269175(0xc6)]];for(const [_0x441797,_0x4467a6]of Object[_0x269175(0xc2)](_0x462e0d)){if(_0x4467a6===!![])_0x14d937['push']('--'+_0x441797);else _0x4467a6!==![]&&_0x4467a6!==undefined&&_0x4467a6!==''&&_0x14d937[_0x269175(0xd0)]('--'+_0x441797+'\x20'+JSON[_0x269175(0xc7)](_0x4467a6));}return _0x14d937[_0x269175(0xd0)](_0x269175(0xc1)),_0x14d937[_0x269175(0xb9)]('\x20');}function a77_0x5e3f(){const _0x3e6682=['2850336LvMBLe','--yes','entries','7tduqnf','24ddYWfB','length','command','stringify','131855hOHHvq','affectedRecords','4qwUHhp','14530AKySqe','\x20\x20\x20Continue?\x20[y/N]\x20','code','description','service','push','9854322aCfmVe','id=','801535vMujru','name=','⚠\x20\x20High-risk\x20operation:\x20','312426dHZgWD','\x20\x20\x20','join','2591316BYGaBQ','commandLabel','params','name','4521iLmPTs','params='];a77_0x5e3f=function(){return _0x3e6682;};return a77_0x5e3f();}function buildConfirmationContext(_0x53cb1f,_0x30dab8,_0x42cf5b){const _0x4b0880=a77_0x309c,_0x1252d0=extractAffectedRecords(_0x42cf5b);return{'commandLabel':_0x30dab8,'description':_0x53cb1f[_0x4b0880(0xce)],'affectedRecords':_0x1252d0};}function a77_0x309c(_0x373405,_0x21b597){_0x373405=_0x373405-0xb8;const _0x5e3f69=a77_0x5e3f();let _0x309cae=_0x5e3f69[_0x373405];return _0x309cae;}function extractAffectedRecords(_0x3b69b7){const _0x31b76b=a77_0x309c,_0x417ea3=[];if(_0x3b69b7[_0x31b76b(0xcd)])_0x417ea3[_0x31b76b(0xd0)]('code='+_0x3b69b7[_0x31b76b(0xcd)]);if(_0x3b69b7['id'])_0x417ea3[_0x31b76b(0xd0)](_0x31b76b(0xd2)+_0x3b69b7['id']);if(_0x3b69b7[_0x31b76b(0xbd)])_0x417ea3['push'](_0x31b76b(0xd4)+_0x3b69b7[_0x31b76b(0xbd)]);if(_0x3b69b7[_0x31b76b(0xbc)])_0x417ea3[_0x31b76b(0xd0)](_0x31b76b(0xbf)+_0x3b69b7[_0x31b76b(0xbc)]);return _0x417ea3[_0x31b76b(0xc5)]>0x0?_0x417ea3[_0x31b76b(0xb9)](',\x20'):undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x7e11ac,_0x42fde9){const _0x238e07=a78_0x2172,_0x3a6f0b=_0x7e11ac();while(!![]){try{const _0x56e95f=parseInt(_0x238e07(0xaa))/0x1+parseInt(_0x238e07(0xac))/0x2*(-parseInt(_0x238e07(0xab))/0x3)+parseInt(_0x238e07(0xb4))/0x4+parseInt(_0x238e07(0xad))/0x5*(parseInt(_0x238e07(0xa8))/0x6)+-parseInt(_0x238e07(0xb7))/0x7*(parseInt(_0x238e07(0xb6))/0x8)+parseInt(_0x238e07(0xb5))/0x9*(-parseInt(_0x238e07(0xb2))/0xa)+parseInt(_0x238e07(0xb8))/0xb;if(_0x56e95f===_0x42fde9)break;else _0x3a6f0b['push'](_0x3a6f0b['shift']());}catch(_0x216730){_0x3a6f0b['push'](_0x3a6f0b['shift']());}}}(a78_0x329c,0x855b4));function a78_0x2172(_0x1608ff,_0x3a6b04){_0x1608ff=_0x1608ff-0xa8;const _0x329c42=a78_0x329c();let _0x217272=_0x329c42[_0x1608ff];return _0x217272;}import{LovrabetError}from'@lovrabet/sdk';import{CliErrors}from'../errors.js';export function mapUserFacingExecuteError(_0x2fb9aa){const _0x1c95ac=a78_0x2172;if(_0x2fb9aa instanceof LovrabetError)return CliErrors[_0x1c95ac(0xaf)](userFacingLovrabetMessage(_0x2fb9aa));return _0x2fb9aa;}function userFacingLovrabetMessage(_0x2b6854){const _0x50a50e=a78_0x2172,_0x5ee066=_0x2b6854[_0x50a50e(0xb0)];if(_0x5ee066!==undefined&&_0x5ee066!==null){if(typeof _0x5ee066===_0x50a50e(0xae)&&_0x5ee066['trim']())return _0x5ee066[_0x50a50e(0xb3)]();try{return JSON[_0x50a50e(0xa9)](_0x5ee066);}catch{}}return _0x2b6854[_0x50a50e(0xb1)];}function a78_0x329c(){const _0x1a1964=['105656fRSBoE','511UyLNSV','8468064jvQdNE','36iGOUEQ','stringify','611761eZBjZS','54852HpQCcs','70FKOlYg','801265geszkR','string','validation','description','message','10tsBiuH','trim','767672oYfBlr','3462678rfmwsc'];a78_0x329c=function(){return _0x1a1964;};return a78_0x329c();}
|
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_0x1e38ec=a79_0x4a91;function a79_0x4a91(_0x347067,_0x129ada){_0x347067=_0x347067-0x1f1;const _0x28869a=a79_0x2886();let _0x4a91be=_0x28869a[_0x347067];return _0x4a91be;}(function(_0x1a2c6a,_0x1e90c7){const _0x45547f=a79_0x4a91,_0x570151=_0x1a2c6a();while(!![]){try{const _0x53d53f=-parseInt(_0x45547f(0x206))/0x1+-parseInt(_0x45547f(0x1f6))/0x2+-parseInt(_0x45547f(0x21e))/0x3*(-parseInt(_0x45547f(0x21b))/0x4)+parseInt(_0x45547f(0x21d))/0x5+parseInt(_0x45547f(0x1f4))/0x6+parseInt(_0x45547f(0x218))/0x7+parseInt(_0x45547f(0x20c))/0x8;if(_0x53d53f===_0x1e90c7)break;else _0x570151['push'](_0x570151['shift']());}catch(_0x176a8a){_0x570151['push'](_0x570151['shift']());}}}(a79_0x2886,0x4625a));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';function a79_0x2886(){const _0x2cec67=['APPCODE','../core/sdk-client.js','local-alias','defaultPageSize','requiresAuth','1463904EVmUpb','currentApp','754992Mhsaqq','.appcode\x20to\x20','pretty','error','env','../core/api-client.js','app','production','doctor','mergedCli','../commands/app/remote-source.js','cancelled','catch','string','command','appCode','478211XiYpNB','execute','trim','filter','_notice','rawFlags','2631360qNDUlo','High-risk\x20operation\x20`','has','map','ClientAk','accessKey','nonInteractive','requiresAppCode','\x20or\x20pass\x20','isNonInteractive','configMissing','service','878528EXaTgJ','\x20\x20To\x20proceed:\x20','verbose','1691188ueGvvx','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20','109120SNBNyN','3AKqXQN','items','format','defaultApp','newConfigFileName','Run\x20`','appCodeSource','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.','Unknown\x20app:\x20'];a79_0x2886=function(){return _0x2cec67;};return a79_0x2886();}import{findAppByCode,findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../commands/app/eligibility.js';export function resolveAuthMode(_0x366c3f){const _0x131379=a79_0x4a91;return void _0x366c3f,AUTH_MODE[_0x131379(0x210)];}export function createPipelineEnv(_0x25dd4a,_0x25b45b){const _0x283c7f=a79_0x4a91,_0x476978=typeof _0x25b45b[_0x283c7f(0x1fc)]===_0x283c7f(0x203)&&_0x25b45b[_0x283c7f(0x1fc)][_0x283c7f(0x208)]();return{'rawFlags':_0x25b45b,'appCode':_0x25dd4a['appCode']||productEnv(_0x283c7f(0x227))||(_0x476978?undefined:readAppCodeFromConfig()),'appCodeSource':_0x25dd4a[_0x283c7f(0x224)],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x25b45b),'defaultFormat':_0x25dd4a[_0x283c7f(0x220)],'defaultPageSize':_0x25dd4a['pageSize'],'defaultVerbose':_0x25dd4a[_0x283c7f(0x21a)],'riskLevel':_0x25dd4a['riskLevel'],'accessKey':_0x25dd4a[_0x283c7f(0x211)],'env':_0x25dd4a[_0x283c7f(0x1fa)],'mergedCli':{'defaultApp':_0x25dd4a[_0x283c7f(0x221)],'currentApp':_0x25dd4a[_0x283c7f(0x1f5)],'appCode':_0x25dd4a['appCode']}};}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[a79_0x1e38ec(0x209)](_0x1012dc=>PIPELINE_FLAG_NAMES[a79_0x1e38ec(0x20e)](_0x1012dc['name']))[a79_0x1e38ec(0x20f)](({name:_0x20432d,type:_0x8efcec,description:_0x48b5f3})=>({'name':_0x20432d,'type':_0x8efcec,'description':_0x48b5f3})),'formatOutput':formatOutput,'getCommandLabel'(_0x1524e3){const _0x5476a6=a79_0x1e38ec;return CLI_BIN_NAME+'\x20'+_0x1524e3['service']+'\x20'+_0x1524e3[_0x5476a6(0x204)];},'riskPolicy':{'onViolation'(_0x2cd12c){const _0x369fd8=a79_0x1e38ec;console[_0x369fd8(0x1f9)](_0x2cd12c);},'createError'(_0x87c304){const _0x341984=a79_0x1e38ec;return CliErrors[_0x341984(0x201)](_0x87c304);}},async 'prepare'(_0x13f6b5,_0x494ed7){const _0x28312b=a79_0x1e38ec,_0x256505=resolveAuthMode(_0x494ed7);if(_0x13f6b5[_0x28312b(0x1f3)]!==![]){if(!_0x494ed7['accessKey'])throw CliErrors['authRequired']('Set\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x28312b(0x222)]+_0x28312b(0x214)+productEnvName('ACCESS_KEY')+'.');const {setActiveAK:_0x2dcbcd}=await import('../core/api-client.js');_0x2dcbcd(_0x494ed7[_0x28312b(0x211)]);}let _0x32f31f='';if(_0x13f6b5['requiresAppCode']!==![]){_0x32f31f=_0x494ed7['appCode']??'',_0x32f31f=await resolveExplicitAppName(_0x13f6b5,_0x494ed7,_0x32f31f);if(!_0x32f31f){await assertSelectedAppNameIsRuntimeAccessible(_0x13f6b5,_0x494ed7);throw CliErrors[_0x28312b(0x216)](_0x28312b(0x21c)+PRODUCT_CONFIG['newConfigFileName']+'.');}await assertAppCodeIsRuntimeAccessible(_0x13f6b5,_0x494ed7,_0x32f31f);}if(_0x32f31f){const {initSdkClient:_0x270aa3}=await import(_0x28312b(0x228));_0x270aa3({'appCode':_0x32f31f,'env':_0x494ed7[_0x28312b(0x1fa)]??'production','accessKey':_0x494ed7[_0x28312b(0x211)],'authMode':_0x256505});}return{'defaults':{'booleans':{'verbose':_0x494ed7['defaultVerbose']},'numbers':{'pagesize':_0x494ed7[_0x28312b(0x1f2)]}},'extras':{'appCode':_0x32f31f,'cookie':'','apiDomain':_0x494ed7['apiDomain'],'apiDir':'','accessKey':_0x494ed7['accessKey'],'envName':_0x494ed7[_0x28312b(0x1fa)],'mergedCli':_0x494ed7['mergedCli']}};},async 'confirmHighRisk'({def:_0x165d29,env:_0x47867f,flags:_0x2e8f9e,commandLabel:_0x148da9}){const _0x13b531=a79_0x1e38ec;if(_0x47867f[_0x13b531(0x215)]){const _0xb7d533=reconstructCommandArgv(_0x165d29,_0x2e8f9e);throw CliErrors['validation'](_0x13b531(0x20d)+_0x148da9+'`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a'+(_0x13b531(0x219)+_0xb7d533));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x165d29,_0x148da9,_0x2e8f9e),'createCancelledError':_0x5eff17=>CliErrors[_0x13b531(0x201)](_0x5eff17)});},'mapDryRunError'(_0x43ed29){return mapUserFacingExecuteError(_0x43ed29);},'mapExecuteError'(_0x51cac0){return mapUserFacingExecuteError(_0x51cac0);},async 'finalize'(){const _0x2879a2=a79_0x1e38ec,{clearActiveAK:_0x4a12d4}=await import(_0x2879a2(0x1fb));_0x4a12d4();}};async function resolveExplicitAppName(_0x2effd8,_0x28831f,_0x475d10){const _0x3fc05c=a79_0x1e38ec;if(_0x2effd8[_0x3fc05c(0x213)]===![])return _0x475d10;const _0x534e86=typeof _0x28831f[_0x3fc05c(0x20b)][_0x3fc05c(0x1fc)]==='string'?_0x28831f['rawFlags'][_0x3fc05c(0x1fc)]['trim']():'';if(!_0x534e86)return _0x475d10;const _0x40d5f7=typeof _0x28831f['rawFlags']['appcode']==='string'&&_0x28831f[_0x3fc05c(0x20b)]['appcode'][_0x3fc05c(0x208)]()||productEnv(_0x3fc05c(0x227));if(_0x40d5f7||_0x28831f[_0x3fc05c(0x224)]===_0x3fc05c(0x1f1))return _0x475d10;const {getRemoteAppList:_0x21081b}=await import(_0x3fc05c(0x200)),_0x5d00ae=await _0x21081b({'env':_0x28831f[_0x3fc05c(0x1fa)]??_0x3fc05c(0x1fd),'accessKey':_0x28831f[_0x3fc05c(0x211)]}),_0x4d92d3=findAppByName(_0x5d00ae[_0x3fc05c(0x21f)],_0x534e86);if(_0x4d92d3&&!isRuntimeAccessibleApp(_0x4d92d3))throw runtimeInaccessibleAppError(_0x4d92d3,'\x22'+_0x534e86+'\x22');const _0x5b6ecc=_0x4d92d3?.[_0x3fc05c(0x205)]?.[_0x3fc05c(0x208)]();if(_0x5b6ecc)return _0x5b6ecc;throw CliErrors['validation'](_0x3fc05c(0x226)+_0x534e86,_0x3fc05c(0x223)+CLI_BIN_NAME+_0x3fc05c(0x225)+_0x534e86+_0x3fc05c(0x1f7)+PRODUCT_CONFIG['newConfigFileName']+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0x1485b8,_0x27b7c5){const _0x11a61a=a79_0x1e38ec;if(_0x1485b8[_0x11a61a(0x213)]===![]||!_0x27b7c5[_0x11a61a(0x211)])return;const _0x5bafac=(typeof _0x27b7c5['rawFlags']['app']===_0x11a61a(0x203)&&_0x27b7c5[_0x11a61a(0x20b)][_0x11a61a(0x1fc)][_0x11a61a(0x208)]()?_0x27b7c5[_0x11a61a(0x20b)][_0x11a61a(0x1fc)]:_0x27b7c5[_0x11a61a(0x1ff)]?.[_0x11a61a(0x1f5)]??_0x27b7c5['mergedCli']?.[_0x11a61a(0x221)])?.[_0x11a61a(0x208)]();if(!_0x5bafac)return;const {getRemoteAppList:_0x431bf5}=await import(_0x11a61a(0x200)),_0x3dba5c=await _0x431bf5({'env':_0x27b7c5[_0x11a61a(0x1fa)]??_0x11a61a(0x1fd),'accessKey':_0x27b7c5[_0x11a61a(0x211)]}),_0x2be6b7=findAppByName(_0x3dba5c[_0x11a61a(0x21f)],_0x5bafac);if(_0x2be6b7&&!isRuntimeAccessibleApp(_0x2be6b7))throw runtimeInaccessibleAppError(_0x2be6b7,'\x22'+_0x5bafac+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0x33e0b9,_0x7632f1,_0x4ac62f){const _0x45ea3e=a79_0x1e38ec;if(_0x33e0b9[_0x45ea3e(0x213)]===![]||!_0x7632f1[_0x45ea3e(0x211)])return;const {getRemoteAppList:_0x37c336}=await import('../commands/app/remote-source.js'),_0x1f8298=await _0x37c336({'env':_0x7632f1[_0x45ea3e(0x1fa)]??_0x45ea3e(0x1fd),'accessKey':_0x7632f1[_0x45ea3e(0x211)]}),_0x1e4c57=findAppByCode(_0x1f8298[_0x45ea3e(0x21f)],_0x4ac62f);if(_0x1e4c57&&!isRuntimeAccessibleApp(_0x1e4c57))throw runtimeInaccessibleAppError(_0x1e4c57,'appcode\x20\x22'+_0x4ac62f+'\x22');}export async function runCommand(_0x17d338,_0x51418c){await runCommandWithAdapter(shouldAttachUpdateNotice(_0x17d338)?withUpdateNotice(_0x17d338):_0x17d338,_0x51418c,runnerAdapter);}function shouldAttachUpdateNotice(_0x5dd10a){const _0x33466c=a79_0x1e38ec;return!['update','schema',_0x33466c(0x1fe)]['includes'](_0x5dd10a[_0x33466c(0x217)]);}function withUpdateNotice(_0x16aed1){return{..._0x16aed1,async 'execute'(_0x3089e9){const _0x156c5d=a79_0x4a91,_0xa63f23=shouldResolveUpdateNotice(_0x3089e9)?resolveLatestUpdateNotice()[_0x156c5d(0x202)](()=>null):Promise['resolve'](null),_0x3b2518=await _0x16aed1[_0x156c5d(0x207)](_0x3089e9);return attachUpdateNotice(_0x3b2518,await _0xa63f23);}};}function shouldResolveUpdateNotice(_0x793ebb){const _0x46f884=a79_0x1e38ec;return _0x793ebb[_0x46f884(0x220)]===_0x46f884(0x1f8)&&!_0x793ebb[_0x46f884(0x212)];}function attachUpdateNotice(_0x574dbe,_0xc0f5e3){const _0x4f25fa=a79_0x1e38ec;if(!_0xc0f5e3||!_0x574dbe||typeof _0x574dbe!=='object')return _0x574dbe;const _0x5516d0=_0x574dbe,_0x4b8301=typeof _0x5516d0[_0x4f25fa(0x20a)]==='object'&&_0x5516d0['_notice']!==null?_0x5516d0['_notice']:{};return{..._0x5516d0,'_notice':{..._0x4b8301,'update':_0xc0f5e3}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2d7ff0,_0xcda7f2){const _0x364b1d=a80_0x35a3,_0x3e9302=_0x2d7ff0();while(!![]){try{const _0x50a826=-parseInt(_0x364b1d(0xad))/0x1+-parseInt(_0x364b1d(0xb1))/0x2+parseInt(_0x364b1d(0xb2))/0x3+parseInt(_0x364b1d(0xab))/0x4*(parseInt(_0x364b1d(0xae))/0x5)+parseInt(_0x364b1d(0xaa))/0x6*(parseInt(_0x364b1d(0xa7))/0x7)+parseInt(_0x364b1d(0xac))/0x8+parseInt(_0x364b1d(0xb6))/0x9*(-parseInt(_0x364b1d(0xb4))/0xa);if(_0x50a826===_0xcda7f2)break;else _0x3e9302['push'](_0x3e9302['shift']());}catch(_0x218049){_0x3e9302['push'](_0x3e9302['shift']());}}}(a80_0x58dc,0x22a1b));import{buildSchemaPayload as a80_0x56f4ad}from'@lovrabet/cli-framework';function a80_0x35a3(_0x3cd816,_0x27e3dd){_0x3cd816=_0x3cd816-0xa6;const _0x58dc80=a80_0x58dc();let _0x35a318=_0x58dc80[_0x3cd816];return _0x35a318;}import{buildAllFlags}from'../framework/build-all-flags.js';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 _0x52930a=a80_0x35a3,{serviceRegistry:_0x17c677,findDefinition:_0x1e141d}=await import(_0x52930a(0xb5)),_0x51765c=new Set(_0x17c677[_0x52930a(0xb0)](_0x18c42f=>_0x18c42f[_0x52930a(0xaf)])),_0x3e4562=listDynamicServiceEntries()[_0x52930a(0xb3)](_0x3f3ca5=>!_0x51765c[_0x52930a(0xa6)](_0x3f3ca5[_0x52930a(0xaf)])),_0x4b29cc=a80_0x56f4ad({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':getCliGitCommit(),'globalFlags':GLOBAL_FLAGS,'serviceRegistry':[..._0x17c677,..._0x3e4562],'buildAllFlags':buildAllFlags,'findDefinition':(_0xf3b0bc,_0x5cabc6)=>_0x1e141d(_0xf3b0bc,_0x5cabc6)??findDynamicServiceDefinition(_0xf3b0bc,_0x5cabc6)});return normalizeSchemaPayload(_0x4b29cc);}function normalizeSchemaPayload(_0x1e8e96){const _0x4abb30=a80_0x35a3;return{..._0x1e8e96,'schemaVersion':0x2,'services':_0x1e8e96['services']['map'](_0x368019=>({..._0x368019,'commands':_0x368019['commands'][_0x4abb30(0xb0)](normalizeSchemaCommand)}))};}function normalizeSchemaCommand(_0x3f64c9){const _0x4388d5=a80_0x35a3,_0x3ba9f6=_0x3f64c9;return{..._0x3f64c9,'auth':_0x3ba9f6[_0x4388d5(0xb7)]??(_0x3f64c9[_0x4388d5(0xa9)]?'required':_0x4388d5(0xa8))};}function a80_0x58dc(){const _0x5754a4=['1919200jkPwQQ','229712UdEiVZ','119705vTiyIn','service','map','120842cETEYi','605406XvThtn','filter','80110eqKNHz','../commands/registry.js','423cOGvRD','auth','has','7ziGkkt','none','requiresAuth','1051626qGBBxn','32unsDcR'];a80_0x58dc=function(){return _0x5754a4;};return a80_0x58dc();}
|
package/lib/framework/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a81_0x2749(_0x3cfc5d,_0x405bcd){_0x3cfc5d=_0x3cfc5d-0x106;var _0x2b73f5=a81_0x2b73();var _0x2749e5=_0x2b73f5[_0x3cfc5d];return _0x2749e5;}(function(_0x4f10ab,_0x297314){var _0x3c83da=a81_0x2749,_0x3d1c2c=_0x4f10ab();while(!![]){try{var _0x4bc1d0=parseInt(_0x3c83da(0x10a))/0x1+-parseInt(_0x3c83da(0x108))/0x2+parseInt(_0x3c83da(0x109))/0x3+-parseInt(_0x3c83da(0x107))/0x4+-parseInt(_0x3c83da(0x10c))/0x5+parseInt(_0x3c83da(0x10b))/0x6+parseInt(_0x3c83da(0x106))/0x7;if(_0x4bc1d0===_0x297314)break;else _0x3d1c2c['push'](_0x3d1c2c['shift']());}catch(_0x459a06){_0x3d1c2c['push'](_0x3d1c2c['shift']());}}}(a81_0x2b73,0x85ae5));function a81_0x2b73(){var _0x18b344=['645354mxaArY','307129hRMwvJ','5040372KZOIPP','3598250lmVMbK','6313706XOOXfC','525224oICvOg','1731508aUToqi'];a81_0x2b73=function(){return _0x18b344;};return a81_0x2b73();}export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a82_0x33287e=a82_0x2b78;(function(_0x59d780,_0x479166){const _0x473c42=a82_0x2b78,_0x423b84=_0x59d780();while(!![]){try{const _0x536bb6=parseInt(_0x473c42(0xe5))/0x1*(-parseInt(_0x473c42(0xe2))/0x2)+-parseInt(_0x473c42(0xdf))/0x3+-parseInt(_0x473c42(0xea))/0x4*(parseInt(_0x473c42(0xe4))/0x5)+parseInt(_0x473c42(0xe1))/0x6+parseInt(_0x473c42(0xe9))/0x7+-parseInt(_0x473c42(0xe0))/0x8*(parseInt(_0x473c42(0xe7))/0x9)+parseInt(_0x473c42(0xe3))/0xa;if(_0x536bb6===_0x479166)break;else _0x423b84['push'](_0x423b84['shift']());}catch(_0x7d07f1){_0x423b84['push'](_0x423b84['shift']());}}}(a82_0x443c,0x548a4));export const VERSION=a82_0x33287e(0xeb);export const GIT_TAG=a82_0x33287e(0xde);function a82_0x2b78(_0x5b6eaa,_0x4fc6e6){_0x5b6eaa=_0x5b6eaa-0xde;const _0x443c37=a82_0x443c();let _0x2b78f4=_0x443c37[_0x5b6eaa];return _0x2b78f4;}export const GIT_COMMIT=a82_0x33287e(0xe8);export const BUILD_TIME=a82_0x33287e(0xe6);function a82_0x443c(){const _0x14322e=['10513780FLGXqx','5JnfipL','2Scpgge','2026-07-06T02:11:01.457Z','394209hpQetp','318c9e0','2918062AzrjKj','2405716iBgMwH','2.1.6-beta.3','v2.1.6-beta.3','243306WZaqgh','8zaxsyV','35412MULFHP','401538cPyMsf'];a82_0x443c=function(){return _0x14322e;};return a82_0x443c();}
|
package/lib/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x156609,_0x54018b){const _0x97485e=a83_0xa089,_0x24f310=_0x156609();while(!![]){try{const _0x3a7a83=-parseInt(_0x97485e(0xc3))/0x1+-parseInt(_0x97485e(0xc8))/0x2+parseInt(_0x97485e(0xc5))/0x3*(parseInt(_0x97485e(0xc7))/0x4)+-parseInt(_0x97485e(0xcb))/0x5+-parseInt(_0x97485e(0xce))/0x6+parseInt(_0x97485e(0xc6))/0x7*(-parseInt(_0x97485e(0xca))/0x8)+parseInt(_0x97485e(0xc9))/0x9;if(_0x3a7a83===_0x54018b)break;else _0x24f310['push'](_0x24f310['shift']());}catch(_0x4feca6){_0x24f310['push'](_0x24f310['shift']());}}}(a83_0xc6cb,0xa7d2b));function a83_0xc6cb(){const _0x2983c6=['green','20883nfTNZN','983514tIqMUQ','620yllELd','1975178uxdaEz','25714557uvedTT','48tyzAvH','1436500WZzwuy','\x20to\x20view\x20available\x20commands.','\x20--help','882240sXKvvD','983784OTEUWf'];a83_0xc6cb=function(){return _0x2983c6;};return a83_0xc6cb();}import{jsx as a83_0x856dd6,jsxs as a83_0x2626ef}from'react/jsx-runtime';import{useEffect}from'react';import{Box,Text,useApp}from'ink';function a83_0xa089(_0x35fce8,_0x32d618){_0x35fce8=_0x35fce8-0xc3;const _0xc6cb07=a83_0xc6cb();let _0xa089a5=_0xc6cb07[_0x35fce8];return _0xa089a5;}import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function Help(){const _0x356d3c=a83_0xa089,{exit:_0x2a44de}=useApp();return useEffect(()=>{_0x2a44de();},[_0x2a44de]),a83_0x2626ef(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a83_0x856dd6(Box,{'children':a83_0x856dd6(Text,{'bold':!![],'color':_0x356d3c(0xc4),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a83_0x2626ef(Box,{'marginTop':0x1,'children':[a83_0x856dd6(Text,{'dimColor':!![],'children':'\x20\x20Use\x20'}),a83_0x856dd6(Text,{'bold':!![],'color':_0x356d3c(0xc4),'children':CLI_BIN_NAME+_0x356d3c(0xcd)}),a83_0x856dd6(Text,{'dimColor':!![],'children':_0x356d3c(0xcc)})]})]});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a84_0x3bf3f4=a84_0x5d2b;function a84_0x5d2b(_0x59697b,_0x144cc4){_0x59697b=_0x59697b-0xd9;const _0x372e87=a84_0x372e();let _0x5d2b9=_0x372e87[_0x59697b];return _0x5d2b9;}(function(_0x4b1c34,_0x44d0e6){const _0x25006d=a84_0x5d2b,_0x4ab922=_0x4b1c34();while(!![]){try{const _0x4dcf63=-parseInt(_0x25006d(0xe2))/0x1*(-parseInt(_0x25006d(0xea))/0x2)+parseInt(_0x25006d(0xe0))/0x3*(-parseInt(_0x25006d(0xd9))/0x4)+parseInt(_0x25006d(0xf1))/0x5+parseInt(_0x25006d(0xdb))/0x6*(parseInt(_0x25006d(0xed))/0x7)+parseInt(_0x25006d(0xe5))/0x8*(parseInt(_0x25006d(0xee))/0x9)+-parseInt(_0x25006d(0xe4))/0xa+-parseInt(_0x25006d(0xe8))/0xb*(parseInt(_0x25006d(0xdd))/0xc);if(_0x4dcf63===_0x44d0e6)break;else _0x4ab922['push'](_0x4ab922['shift']());}catch(_0x49e201){_0x4ab922['push'](_0x4ab922['shift']());}}}(a84_0x372e,0x65b8e));function a84_0x372e(){const _0x5758a9=['toString','2828145MqiwLP','4RUqPoL','pipe','6PQDLya','skipNpxSkillsEnvSuffix','3913488JSimMq','log','stderr','1186881PWULHN','npx','667061NWtslS','add','7715640UHlWsy','1306112ypbYke','stdio','stdout','11WQzuZS','join','2Qgjucw','trim','status','1312409mRdpyV','27WNByiC','unknown'];a84_0x372e=function(){return _0x5758a9;};return a84_0x372e();}import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';import{LOVRABET_SKILL_SOURCE as a84_0x19bea5}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';export const LOVRABET_SKILL_SOURCE=a84_0x19bea5;export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG[a84_0x3bf3f4(0xdc)]);export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}export function runNpxSkillsAddGlobal(_0x4d92ea,_0x12fd9b=LOVRABET_SKILL_SOURCE,_0xca257){const _0x5d89e5=a84_0x3bf3f4;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x474220=_0xca257?.[_0x5d89e5(0xe6)]??'inherit',_0xdeb2b4=resolveNpmBin(_0x5d89e5(0xe1)),_0x19e361=['skills',_0x5d89e5(0xe3),_0x12fd9b,'-g','-y'],_0x11fd65=[_0xdeb2b4,..._0x19e361][_0x5d89e5(0xe9)]('\x20');console[_0x5d89e5(0xde)]('*\x20'+_0x11fd65);const _0x3a1315=spawnSync(_0xdeb2b4,_0x19e361,{'cwd':_0x4d92ea,'stdio':_0x474220,'env':process.env,'shell':![]});if(_0x3a1315['status']===0x0)return{'ok':!![],'status':0x0};let _0x83b02e='exit\x20'+(_0x3a1315[_0x5d89e5(0xec)]??_0x5d89e5(0xef));if(_0x474220===_0x5d89e5(0xda)){const _0x1f9e06=_0x3a1315[_0x5d89e5(0xdf)]?_0x3a1315[_0x5d89e5(0xdf)][_0x5d89e5(0xf0)]()['trim']():'',_0x21c56a=_0x3a1315['stdout']?_0x3a1315[_0x5d89e5(0xe7)][_0x5d89e5(0xf0)]()[_0x5d89e5(0xeb)]():'';if(_0x1f9e06)_0x83b02e=_0x1f9e06;else{if(_0x21c56a)_0x83b02e=_0x21c56a;}}return{'ok':![],'status':_0x3a1315[_0x5d89e5(0xec)]??null,'error':_0x83b02e};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a85_0xb1afcb=a85_0x5020;(function(_0x5544ae,_0x34dcf9){const _0x5789ab=a85_0x5020,_0x6660b9=_0x5544ae();while(!![]){try{const _0xa9a7e6=-parseInt(_0x5789ab(0x9e))/0x1+parseInt(_0x5789ab(0x9a))/0x2+-parseInt(_0x5789ab(0xa5))/0x3+parseInt(_0x5789ab(0x9c))/0x4+-parseInt(_0x5789ab(0x9d))/0x5+parseInt(_0x5789ab(0xa0))/0x6+parseInt(_0x5789ab(0x9f))/0x7;if(_0xa9a7e6===_0x34dcf9)break;else _0x6660b9['push'](_0x6660b9['shift']());}catch(_0x5da309){_0x6660b9['push'](_0x6660b9['shift']());}}}(a85_0x17a2,0x48db8));export const METADATA_FILE=a85_0xb1afcb(0xa3);function a85_0x17a2(){const _0x31c3c5=['.next','lovrabet.skill.json','coverage','16671mDGscJ','dist','SKILL.md','.hg','.git','1139748ttDUjC','.turbo','842392oIhEow','2537200YjFTIZ','469565BaJSaZ','1783607KlBHdm','1474278wvaKEA','.svn'];a85_0x17a2=function(){return _0x31c3c5;};return a85_0x17a2();}export const SKILL_FILE=a85_0xb1afcb(0x97);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,'.DS_Store']);function a85_0x5020(_0x335e6b,_0x324edb){_0x335e6b=_0x335e6b-0x97;const _0x17a2c3=a85_0x17a2();let _0x5020f5=_0x17a2c3[_0x335e6b];return _0x5020f5;}export const IGNORED_DIR_NAMES=new Set([a85_0xb1afcb(0x99),a85_0xb1afcb(0x98),a85_0xb1afcb(0xa1),'node_modules',a85_0xb1afcb(0xa2),a85_0xb1afcb(0xa6),'build',a85_0xb1afcb(0xa4),a85_0xb1afcb(0x9b),'.cache']);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x23ef50,_0xa9bf2d){const _0x3abf89=a86_0x4333,_0x248d4b=_0x23ef50();while(!![]){try{const _0x24ad70=-parseInt(_0x3abf89(0x1a4))/0x1+parseInt(_0x3abf89(0x1a2))/0x2*(-parseInt(_0x3abf89(0x1a8))/0x3)+-parseInt(_0x3abf89(0x1a7))/0x4+parseInt(_0x3abf89(0x19c))/0x5+parseInt(_0x3abf89(0x19f))/0x6+parseInt(_0x3abf89(0x19b))/0x7+parseInt(_0x3abf89(0x198))/0x8*(-parseInt(_0x3abf89(0x1a0))/0x9);if(_0x24ad70===_0xa9bf2d)break;else _0x248d4b['push'](_0x248d4b['shift']());}catch(_0x5b946a){_0x248d4b['push'](_0x248d4b['shift']());}}}(a86_0x4336,0xd8f64));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_0x4336(){const _0x3b1470=['6314964srnUzo','21pvWzjx','validation','5136iaRgGY','Unsafe\x20Skill\x20file\x20path:\x20','stringify','9576224uBfRwk','4394355nVzuCC','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','split','7910496HKBQOI','10314iZHfNS','.tmp','20258ieQGBu','isSymbolicLink','291267AdQgrW','startsWith','from'];a86_0x4336=function(){return _0x3b1470;};return a86_0x4336();}export function resolveManagedFilePath(_0x3059f2,_0x3a7d79){const _0x37e06f=a86_0x4333,_0x5dc807=normalizeSkillRelativePath(_0x3a7d79),_0x3bacba=realOrResolved(_0x3059f2),_0xac9fa9=resolve(_0x3bacba,..._0x5dc807[_0x37e06f(0x19e)]('/'));if(!isPathInside(_0xac9fa9,_0x3bacba))throw CliErrors[_0x37e06f(0x197)](_0x37e06f(0x199)+_0x3a7d79);return ensureNoSymlinkInManagedPath(_0x3bacba,_0x5dc807),_0xac9fa9;}export function ensureNoSymlinkInManagedPath(_0x17cdd0,_0x5095ae){const _0x44e1bf=a86_0x4333;let _0x5cc07f=_0x17cdd0;for(const _0x41f5b2 of _0x5095ae[_0x44e1bf(0x19e)]('/')){_0x5cc07f=resolve(_0x5cc07f,_0x41f5b2);const _0x413d61=lstatIfPresent(_0x5cc07f);if(_0x413d61?.[_0x44e1bf(0x1a3)]())throw CliErrors['validation'](_0x44e1bf(0x19d)+_0x5095ae);}}export function isDanglingSymlink(_0x3d2e82){const _0x237801=a86_0x4333;try{return lstatSync(_0x3d2e82)[_0x237801(0x1a3)]();}catch{return![];}}export function resolveSymlinkTarget(_0x2fe57b){const _0x40c809=readlinkSync(_0x2fe57b);return isAbsolute(_0x40c809)?_0x40c809:resolve(dirname(_0x2fe57b),_0x40c809);}export function isPathInside(_0x4846b3,_0x1f7efa){const _0x15ae7e=a86_0x4333,_0x3986cf=_0x4846b3['endsWith'](sep)?_0x4846b3:''+_0x4846b3+sep,_0x23cb95=_0x1f7efa['endsWith'](sep)?_0x1f7efa:''+_0x1f7efa+sep;return _0x4846b3===_0x1f7efa||_0x3986cf[_0x15ae7e(0x1a5)](_0x23cb95);}export function realOrResolved(_0x5e78f6){try{return realpathSync(_0x5e78f6);}catch{return resolve(_0x5e78f6);}}function a86_0x4333(_0x2d006f,_0x268e5b){_0x2d006f=_0x2d006f-0x197;const _0x433643=a86_0x4336();let _0x4333b5=_0x433643[_0x2d006f];return _0x4333b5;}export function lstatIfPresent(_0x24aeff){try{return lstatSync(_0x24aeff);}catch{return undefined;}}export function writeTextAtomic(_0x37daf2,_0x2d6a41,_0x3845cf){const _0x3c2d31=a86_0x4333;writeBytesAtomic(_0x37daf2,Buffer[_0x3c2d31(0x1a6)](_0x2d6a41,'utf8'),_0x3845cf);}export function writeBytesAtomic(_0x992187,_0x4ea64a,_0x4288f9){const _0x141787=a86_0x4333,_0x44ca58=_0x992187+_0x141787(0x1a1);try{writeFileSync(_0x44ca58,_0x4ea64a,{'mode':_0x4288f9}),renameSync(_0x44ca58,_0x992187);}catch(_0x40d296){try{rmSync(_0x44ca58,{'force':!![]});}catch{}throw _0x40d296;}}export function writeJsonAtomic(_0x34c003,_0x486f10){const _0x6f2f52=a86_0x4333;writeTextAtomic(_0x34c003,JSON[_0x6f2f52(0x19a)](_0x486f10,null,0x2)+'\x0a',0x180);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2f4c5e,_0x35fff7){const _0x15a609=a87_0x34ea,_0x3499e7=_0x2f4c5e();while(!![]){try{const _0x1a89f4=-parseInt(_0x15a609(0xfd))/0x1+parseInt(_0x15a609(0x100))/0x2+parseInt(_0x15a609(0xfa))/0x3*(parseInt(_0x15a609(0x102))/0x4)+parseInt(_0x15a609(0xfc))/0x5*(-parseInt(_0x15a609(0x103))/0x6)+-parseInt(_0x15a609(0x105))/0x7*(parseInt(_0x15a609(0xfb))/0x8)+parseInt(_0x15a609(0xf6))/0x9+parseInt(_0x15a609(0xff))/0xa*(parseInt(_0x15a609(0xf5))/0xb);if(_0x1a89f4===_0x35fff7)break;else _0x3499e7['push'](_0x3499e7['shift']());}catch(_0x601a4d){_0x3499e7['push'](_0x3499e7['shift']());}}}(a87_0x2888,0x2e700));import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';function a87_0x34ea(_0x57665d,_0x3a44be){_0x57665d=_0x57665d-0xf5;const _0x2888a4=a87_0x2888();let _0x34ea60=_0x2888a4[_0x57665d];return _0x34ea60;}function a87_0x2888(){const _0x4f3ebc=['109140aLwwcJ','size','44fyWhvw','19974NLrgun','hex','7gGsWpx','2820059elzNbI','2901771ZwChoc','sha256','path','update','49503FPlkvE','120496KNxYQv','435aznwgf','319976yAZLJd','digest','10jpvoNl'];a87_0x2888=function(){return _0x4f3ebc;};return a87_0x2888();}export function contentHash(_0xbd2500){const _0x1baba0=a87_0x34ea;return createHash(_0x1baba0(0xf7))['update'](_0xbd2500)[_0x1baba0(0xfe)](_0x1baba0(0x104));}export function fileHash(_0x2ddd2a){return bufferSha256(fileContent(_0x2ddd2a));}export function bufferSha256(_0x31b250){const _0x1ba2e9=a87_0x34ea;return createHash(_0x1ba2e9(0xf7))[_0x1ba2e9(0xf9)](_0x31b250)[_0x1ba2e9(0xfe)](_0x1ba2e9(0x104));}export function fileTreeHash(_0x3a4463){const _0x91fbde=a87_0x34ea,_0x2dfcc0=createHash(_0x91fbde(0xf7));for(const _0x190c09 of normalizeManifestFiles(_0x3a4463)){_0x2dfcc0[_0x91fbde(0xf9)](_0x190c09[_0x91fbde(0xf8)]),_0x2dfcc0[_0x91fbde(0xf9)]('\x00'),_0x2dfcc0[_0x91fbde(0xf9)](_0x190c09[_0x91fbde(0xf7)]),_0x2dfcc0[_0x91fbde(0xf9)]('\x00'),_0x2dfcc0[_0x91fbde(0xf9)](String(_0x190c09[_0x91fbde(0x101)])),_0x2dfcc0['update']('\x00');}return _0x2dfcc0['digest'](_0x91fbde(0x104));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x49b156,_0x308ad6){const _0xa2428e=a88_0x1ee5,_0x365ad0=_0x49b156();while(!![]){try{const _0x4a0e0b=parseInt(_0xa2428e(0x1f0))/0x1+-parseInt(_0xa2428e(0x1f4))/0x2*(-parseInt(_0xa2428e(0x1f3))/0x3)+parseInt(_0xa2428e(0x219))/0x4*(-parseInt(_0xa2428e(0x1fa))/0x5)+-parseInt(_0xa2428e(0x1e7))/0x6*(parseInt(_0xa2428e(0x1ff))/0x7)+-parseInt(_0xa2428e(0x215))/0x8*(parseInt(_0xa2428e(0x1f1))/0x9)+-parseInt(_0xa2428e(0x1ef))/0xa*(parseInt(_0xa2428e(0x207))/0xb)+parseInt(_0xa2428e(0x1fc))/0xc*(parseInt(_0xa2428e(0x208))/0xd);if(_0x4a0e0b===_0x308ad6)break;else _0x365ad0['push'](_0x365ad0['shift']());}catch(_0x1e7fc0){_0x365ad0['push'](_0x365ad0['shift']());}}}(a88_0x3fae,0xab3a4));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a88_0x40492b from'fs-extra';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';function a88_0x1ee5(_0x125394,_0x2d2230){_0x125394=_0x125394-0x1e7;const _0x3fae85=a88_0x3fae();let _0x1ee583=_0x3fae85[_0x125394];return _0x1ee583;}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_0x40492b;export function linkEffectiveRuntimeSkills(_0xb2fc0e,_0x331e3e,_0x47cc14={}){const _0x271135=a88_0x1ee5,_0x1664d6=new Map();for(const _0x45605d of _0xb2fc0e){const _0x4557f8=_0x45605d['skill'][_0x271135(0x1fe)];if(!_0x4557f8)continue;const _0x3907c8=_0x1664d6[_0x271135(0x1e8)](_0x4557f8);(!_0x3907c8||_0x45605d[_0x271135(0x21d)]===_0x271135(0x1fd))&&_0x1664d6[_0x271135(0x1f2)](_0x4557f8,_0x45605d);}const _0x2b9893=[],_0x4a59a=resolveSkillSyncPaths(_0x47cc14);for(const _0x1f946e of _0x1664d6[_0x271135(0x21e)]()){const _0x638db8=requireSkillCode(_0x1f946e[_0x271135(0x210)]),_0x4b758b=_0x331e3e+'--'+_0x638db8;for(const _0x341faf of[_0x4a59a[_0x271135(0x20b)],_0x4a59a[_0x271135(0x20f)]]){_0x2b9893['push'](ensureManagedSymlink(resolve(_0x341faf,_0x4b758b),_0x1f946e[_0x271135(0x217)],_0x4a59a[_0x271135(0x21a)]));}}return _0x2b9893;}export function pruneStaleRuntimeSkillLinks(_0xfaa04c,_0x477ec4,_0x44a5ee={},_0x3b5016){const _0x4d6c8b=a88_0x1ee5,_0x300279=resolveSkillSyncPaths(_0x44a5ee),_0x2f564d=new Set([..._0x477ec4][_0x4d6c8b(0x20c)](_0xb9ec5c=>_0xb9ec5c[_0x4d6c8b(0x1ea)]())[_0x4d6c8b(0x205)](Boolean)),_0x299f8d=_0x3b5016?new Set([..._0x3b5016][_0x4d6c8b(0x20c)](_0x109386=>_0x109386['trim']())[_0x4d6c8b(0x205)](Boolean)):undefined,_0x4327d9=[];for(const _0x4757b3 of[_0x300279[_0x4d6c8b(0x20b)],_0x300279[_0x4d6c8b(0x20f)]]){for(const _0x450b5b of managedAppSkillLinkPaths(_0x4757b3,_0xfaa04c)){const _0x20f9a9=basename(_0x450b5b)[_0x4d6c8b(0x214)]((_0xfaa04c+'--')[_0x4d6c8b(0x1eb)]);if(_0x299f8d&&!_0x299f8d[_0x4d6c8b(0x20a)](_0x20f9a9))continue;if(_0x2f564d[_0x4d6c8b(0x20a)](_0x20f9a9))continue;_0x4327d9[_0x4d6c8b(0x203)](removeManagedSkillLink(_0x450b5b,_0x300279['managedRoot']));}}return _0x4327d9;}export function pruneStaleRuntimeSkillCache(_0x3acdb7,_0x52140a={}){const _0x3b1586=a88_0x1ee5,_0x4f5fd4=new Set([..._0x3acdb7[_0x3b1586(0x211)]]['map'](_0x4abc9e=>_0x4abc9e[_0x3b1586(0x1ea)]())[_0x3b1586(0x205)](Boolean)),_0x5592ed=_0x3acdb7['pruneSkillCodes']?new Set([..._0x3acdb7[_0x3b1586(0x1ee)]][_0x3b1586(0x20c)](_0x176b1b=>_0x176b1b['trim']())[_0x3b1586(0x205)](Boolean)):undefined,_0x58d516=_0x3acdb7[_0x3b1586(0x1f9)]??[_0x3b1586(0x1fd),_0x3b1586(0x1ed)],_0x35b171=resolve(getRuntimeSkillCacheRoot(_0x3acdb7[_0x3b1586(0x1f5)],_0x3acdb7[_0x3b1586(0x1f7)],_0x52140a),safePathSegment(_0x3acdb7[_0x3b1586(0x212)],'appCode')),_0x380c39=[];for(const _0x5f343a of _0x58d516){const _0x58bd48=resolve(_0x35b171,_0x5f343a);if(!existsSync(_0x58bd48))continue;for(const _0x3df9b4 of readdirSync(_0x58bd48,{'withFileTypes':!![]})){if(!_0x3df9b4['isDirectory']())continue;const _0x298a17=_0x3df9b4['name'];if(_0x5592ed&&!_0x5592ed[_0x3b1586(0x20a)](_0x298a17))continue;if(_0x4f5fd4[_0x3b1586(0x20a)](_0x298a17))continue;const _0x323232=resolve(_0x58bd48,_0x298a17),_0x2d62ba=readMetadataIfPresent(resolve(_0x323232,METADATA_FILE));if(_0x2d62ba?.[_0x3b1586(0x212)]!==_0x3acdb7[_0x3b1586(0x212)]||_0x2d62ba[_0x3b1586(0x21d)]!==_0x5f343a||_0x2d62ba['skillCode']!==_0x298a17){_0x380c39[_0x3b1586(0x203)]({'path':_0x323232,'action':_0x3b1586(0x216),'reason':_0x3b1586(0x1ec)});continue;}removeSync(_0x323232),_0x380c39['push']({'path':_0x323232,'action':_0x3b1586(0x1f6)});}}return _0x380c39;}export function linkGlobalRuntimeSkills(_0x33e22c,_0x4813f0={}){const _0x41337d=a88_0x1ee5,_0xffeba5=resolveSkillSyncPaths(_0x4813f0),_0x59a62e=[];for(const _0x567139 of _0x33e22c){if(_0x567139['scope']!=='builtin')throw CliErrors[_0x41337d(0x21b)](_0x41337d(0x209)+_0x567139['scope']);const _0x4befb9=requireSkillCode(_0x567139[_0x41337d(0x210)]),_0x1f56ad=copyManagedSkillDirectory(_0x567139[_0x41337d(0x217)],resolve(_0xffeba5[_0x41337d(0x20b)],_0x4befb9));_0x59a62e[_0x41337d(0x203)]({..._0x1f56ad,'contentHash':_0x567139[_0x41337d(0x20d)]});}return _0x59a62e;}function a88_0x3fae(){const _0x37b8af=['90222mrAhTq','env','removed','accessKey','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','scopes','630ecKkbZ','builtin','13494684ZZkhrz','personal','skillCode','21AmYVen','isDirectory','updated','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','push','external-symlink','filter','isSymbolicLink','99gIcrVC','13yJjpGg','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','has','agentsSkillsDir','map','contentHash','created','claudeSkillsDir','skill','activeSkillCodes','appCode','not-managed-symlink','slice','88AOHZmr','skipped','dir','unchanged','33516QyRZNQ','managedRoot','validation','name','scope','values','713568wBJrkm','get','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','trim','length','metadata-mismatch','company','pruneSkillCodes','567330LPRlid','803340nHnqCs','278973JKDWvY','set','69Tccuud'];a88_0x3fae=function(){return _0x37b8af;};return a88_0x3fae();}function ensureManagedSymlink(_0x5ecf2e,_0x3cd810,_0x1d91d0){const _0x2cde57=a88_0x1ee5;mkdirSync(dirname(_0x5ecf2e),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x5ecf2e)||isDanglingSymlink(_0x5ecf2e)){const _0x4c593a=lstatSync(_0x5ecf2e);if(!_0x4c593a[_0x2cde57(0x206)]())throw CliErrors['validation']('Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20'+_0x5ecf2e);const _0x3ec144=resolveSymlinkTarget(_0x5ecf2e);if(!isPathInside(realOrResolved(_0x3ec144),realOrResolved(_0x1d91d0)))throw CliErrors[_0x2cde57(0x21b)]('Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20'+_0x5ecf2e);if(realOrResolved(_0x3ec144)===realOrResolved(_0x3cd810))return{'path':_0x5ecf2e,'target':_0x3cd810,'action':_0x2cde57(0x218)};return unlinkSync(_0x5ecf2e),symlinkSync(_0x3cd810,_0x5ecf2e,'dir'),{'path':_0x5ecf2e,'target':_0x3cd810,'action':_0x2cde57(0x201)};}return symlinkSync(_0x3cd810,_0x5ecf2e,'dir'),{'path':_0x5ecf2e,'target':_0x3cd810,'action':_0x2cde57(0x20e)};}function managedAppSkillLinkPaths(_0x452628,_0x3a9106){const _0x39ab97=a88_0x1ee5;if(!existsSync(_0x452628))return[];const _0x3b9a96=_0x3a9106+'--';return readdirSync(_0x452628,{'withFileTypes':!![]})[_0x39ab97(0x205)](_0x27eac8=>_0x27eac8[_0x39ab97(0x21c)]['startsWith'](_0x3b9a96))[_0x39ab97(0x20c)](_0x59745b=>resolve(_0x452628,_0x59745b[_0x39ab97(0x21c)]));}function removeManagedSkillLink(_0xd9a671,_0x4109a6){const _0x514c29=a88_0x1ee5,_0xda0617=lstatIfPresent(_0xd9a671);if(!_0xda0617?.[_0x514c29(0x206)]())return{'path':_0xd9a671,'action':_0x514c29(0x216),'reason':_0x514c29(0x213)};const _0x2c9ba8=resolveSymlinkTarget(_0xd9a671);if(!isPathInside(realOrResolved(_0x2c9ba8),realOrResolved(_0x4109a6)))return{'path':_0xd9a671,'action':_0x514c29(0x216),'reason':_0x514c29(0x204)};return unlinkSync(_0xd9a671),{'path':_0xd9a671,'action':_0x514c29(0x1f6)};}export function copyManagedSkillDirectory(_0x4d054c,_0x15a361){const _0x16c158=a88_0x1ee5,_0x96e50a=resolve(_0x15a361,METADATA_FILE),_0x2cd446=existsSync(_0x15a361);if(_0x2cd446){const _0x362b74=lstatSync(_0x15a361);if(_0x362b74['isSymbolicLink']())throw CliErrors[_0x16c158(0x21b)](_0x16c158(0x1e9)+_0x15a361);if(!_0x362b74[_0x16c158(0x200)]())throw CliErrors[_0x16c158(0x21b)](_0x16c158(0x1f8)+_0x15a361);const _0x3686da=readMetadataIfPresent(_0x96e50a);if(_0x3686da?.[_0x16c158(0x21d)]!==_0x16c158(0x1fb))throw CliErrors[_0x16c158(0x21b)](_0x16c158(0x202)+_0x15a361);}ensureDirSync(dirname(_0x15a361));const _0x3e7c88=_0x2cd446?readMetadataIfPresent(_0x96e50a)?.[_0x16c158(0x20d)]:undefined,_0x1574b2=readMetadataIfPresent(resolve(_0x4d054c,METADATA_FILE))?.[_0x16c158(0x20d)];return _0x2cd446&&removeSync(_0x15a361),copySkillDirectory(_0x4d054c,_0x15a361),{'path':_0x15a361,'target':_0x4d054c,'action':!_0x2cd446?_0x16c158(0x20e):_0x3e7c88===_0x1574b2?_0x16c158(0x218):_0x16c158(0x201)};}function copySkillDirectory(_0x512366,_0x191caa){copySync(_0x512366,_0x191caa,{'dereference':![],'overwrite':!![],'filter'(_0x38c664){const _0xdbb12d=a88_0x1ee5;if(lstatSync(_0x38c664)['isSymbolicLink']())throw CliErrors[_0xdbb12d(0x21b)]('Refusing\x20to\x20copy\x20Skill\x20symlink:\x20'+_0x38c664);return!![];}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x250e26,_0x43c0dc){const _0x2a1b7c=a89_0x36b3,_0x930b95=_0x250e26();while(!![]){try{const _0x4d97b3=parseInt(_0x2a1b7c(0xbe))/0x1*(parseInt(_0x2a1b7c(0xcc))/0x2)+parseInt(_0x2a1b7c(0xb8))/0x3+parseInt(_0x2a1b7c(0xae))/0x4*(-parseInt(_0x2a1b7c(0xab))/0x5)+-parseInt(_0x2a1b7c(0xd3))/0x6*(parseInt(_0x2a1b7c(0xbb))/0x7)+parseInt(_0x2a1b7c(0xaf))/0x8*(-parseInt(_0x2a1b7c(0xb9))/0x9)+-parseInt(_0x2a1b7c(0xad))/0xa*(-parseInt(_0x2a1b7c(0xb6))/0xb)+parseInt(_0x2a1b7c(0xbd))/0xc*(-parseInt(_0x2a1b7c(0xb0))/0xd);if(_0x4d97b3===_0x43c0dc)break;else _0x930b95['push'](_0x930b95['shift']());}catch(_0x3c8911){_0x930b95['push'](_0x930b95['shift']());}}}(a89_0xb294,0x3e812));import{existsSync,readdirSync}from'node:fs';function a89_0xb294(){const _0xabb6cd=['13zBAJty','source','from','isDirectory','get','isSymbolicLink','11ADHGUK','scope','1087611XQFhKx','28206PRjohU','appCode','7hoieyX','linkedPath','4041588zVnqJE','34693sLgWDk','builtin','local','filter','set','dir','localeCompare','link','values','name','map','includes','push','trim','26QtKqCR','skillMdPath','linkedPaths','cache','code','tags','skillCode','1574358tBpYFQ','has','startsWith','cacheDir','env','scopes','sort','1533815EJSMQc','metadataPath','4800550hSRVPR','4woefNE','336GviVJO'];a89_0xb294=function(){return _0xabb6cd;};return a89_0xb294();}import{resolve}from'node:path';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_0x36b3(_0x401f6d,_0x25503f){_0x401f6d=_0x401f6d-0xa6;const _0xb29486=a89_0xb294();let _0x36b3e8=_0xb29486[_0x401f6d];return _0x36b3e8;}export function listLocalRuntimeSkills(_0x2c29de,_0x3a6e3f={}){const _0x441689=a89_0x36b3,_0x42d588=safePathSegment(_0x2c29de[_0x441689(0xba)],'appCode'),_0x15bdd8=normalizeRuntimeSkillScopes(_0x2c29de['scopes']),_0xe07f4e=new Set(_0x15bdd8),_0x54a82c=_0x2c29de[_0x441689(0xd0)]?.[_0x441689(0xcb)](),_0x55351d=new Map(),_0x5ab23b=resolve(getRuntimeSkillCacheRoot(_0x2c29de[_0x441689(0xa8)],_0x2c29de['accessKey'],_0x3a6e3f),_0x42d588);for(const _0x38e364 of _0x15bdd8){for(const _0x26a316 of localSkillEntryDirs(resolve(_0x5ab23b,_0x38e364))){collectLocalRuntimeSkill(_0x55351d,_0x26a316,{'appCode':_0x42d588,'scopes':_0xe07f4e,'code':_0x54a82c,'source':_0x441689(0xcf)});}}const _0x4860bd=resolveSkillSyncPaths(_0x3a6e3f);for(const _0x239074 of[_0x4860bd['agentsSkillsDir'],_0x4860bd['claudeSkillsDir']]){for(const _0x10ee44 of localSkillLinkCandidates(_0x239074,_0x42d588,_0xe07f4e)){collectLocalRuntimeSkill(_0x55351d,_0x10ee44,{'appCode':_0x42d588,'scopes':_0xe07f4e,'code':_0x54a82c,'source':_0x441689(0xc5),'linkedPath':_0x10ee44});}}return Array[_0x441689(0xb2)](_0x55351d[_0x441689(0xc6)]())['sort'](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x51df96){const _0x4fb751=a89_0x36b3;if(!existsSync(_0x51df96))return[];return readdirSync(_0x51df96,{'withFileTypes':!![]})[_0x4fb751(0xc1)](_0x121bb5=>_0x121bb5[_0x4fb751(0xb3)]()||_0x121bb5[_0x4fb751(0xb5)]())[_0x4fb751(0xc8)](_0x4a4957=>resolve(_0x51df96,_0x4a4957[_0x4fb751(0xc7)]));}function localSkillLinkCandidates(_0x53c08f,_0x3c288e,_0x3efe56){const _0x4a6aab=a89_0x36b3;if(!existsSync(_0x53c08f))return[];const _0x22c1ef=_0x3c288e+'--';return readdirSync(_0x53c08f,{'withFileTypes':!![]})[_0x4a6aab(0xc1)](_0x44ff5e=>_0x44ff5e[_0x4a6aab(0xb3)]()||_0x44ff5e[_0x4a6aab(0xb5)]())[_0x4a6aab(0xc1)](_0x54b6fe=>_0x54b6fe[_0x4a6aab(0xc7)][_0x4a6aab(0xa6)](_0x22c1ef)||_0x3efe56[_0x4a6aab(0xd4)](_0x4a6aab(0xbf)))[_0x4a6aab(0xc8)](_0x374707=>resolve(_0x53c08f,_0x374707[_0x4a6aab(0xc7)]));}function collectLocalRuntimeSkill(_0x58e4d8,_0x3dc4d4,_0x131397){const _0x411172=a89_0x36b3,_0x5ee653=resolve(_0x3dc4d4,METADATA_FILE),_0x2c61c3=readMetadataIfPresent(_0x5ee653);if(!_0x2c61c3)return;if(_0x2c61c3['appCode']!==_0x131397['appCode'])return;if(!isRuntimeSkillScope(_0x2c61c3[_0x411172(0xb7)])||!_0x131397[_0x411172(0xa9)][_0x411172(0xd4)](_0x2c61c3['scope']))return;const _0x43e50c=_0x2c61c3[_0x411172(0xd2)]?.[_0x411172(0xcb)]();if(!_0x43e50c)return;if(_0x131397['code']&&_0x43e50c!==_0x131397[_0x411172(0xd0)])return;const _0x2684d8=_0x2c61c3[_0x411172(0xb7)]+':'+_0x43e50c,_0xbcdc4e=_0x131397[_0x411172(0xbc)]?[_0x131397[_0x411172(0xbc)]]:[],_0xa0e059=_0x58e4d8[_0x411172(0xb4)](_0x2684d8);if(_0xa0e059){_0x131397['source']==='cache'&&(_0xa0e059[_0x411172(0xc3)]=_0x3dc4d4,_0xa0e059[_0x411172(0xa7)]=_0x3dc4d4,_0xa0e059[_0x411172(0xcd)]=resolve(_0x3dc4d4,SKILL_FILE),_0xa0e059[_0x411172(0xac)]=_0x5ee653);for(const _0x38f544 of _0xbcdc4e){!_0xa0e059[_0x411172(0xce)][_0x411172(0xc9)](_0x38f544)&&_0xa0e059['linkedPaths'][_0x411172(0xca)](_0x38f544);}_0xa0e059['linkedPaths'][_0x411172(0xaa)]();return;}_0x58e4d8[_0x411172(0xc2)](_0x2684d8,{..._0x2c61c3,'tags':Array['isArray'](_0x2c61c3[_0x411172(0xd1)])?_0x2c61c3[_0x411172(0xd1)]:[],'scope':_0x2c61c3[_0x411172(0xb7)],'source':_0x411172(0xc0),'dir':_0x3dc4d4,'cacheDir':_0x131397[_0x411172(0xb1)]===_0x411172(0xcf)?_0x3dc4d4:undefined,'skillMdPath':resolve(_0x3dc4d4,SKILL_FILE),'metadataPath':_0x5ee653,'linkedPaths':_0xbcdc4e});}function compareLocalRuntimeSkills(_0x20aa0f,_0x25d36d){const _0x20cce5=a89_0x36b3,_0x11ba0c={'personal':0x0,'company':0x1,'builtin':0x2};return _0x11ba0c[_0x20aa0f[_0x20cce5(0xb7)]]-_0x11ba0c[_0x25d36d['scope']]||_0x20aa0f[_0x20cce5(0xd2)][_0x20cce5(0xc4)](_0x25d36d['skillCode'])||_0x20aa0f[_0x20cce5(0xc3)][_0x20cce5(0xc4)](_0x25d36d[_0x20cce5(0xc3)]);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x467703,_0x776563){const _0x222c11=a90_0xadfd,_0x5850aa=_0x467703();while(!![]){try{const _0x4da995=-parseInt(_0x222c11(0x1a5))/0x1+-parseInt(_0x222c11(0x1c1))/0x2+parseInt(_0x222c11(0x1bc))/0x3+-parseInt(_0x222c11(0x1a3))/0x4+parseInt(_0x222c11(0x1b2))/0x5*(parseInt(_0x222c11(0x1cb))/0x6)+-parseInt(_0x222c11(0x1cd))/0x7+parseInt(_0x222c11(0x1a6))/0x8;if(_0x4da995===_0x776563)break;else _0x5850aa['push'](_0x5850aa['shift']());}catch(_0x1e9424){_0x5850aa['push'](_0x5850aa['shift']());}}}(a90_0x459b,0x5a125));import{readFileSync,readdirSync,realpathSync}from'node:fs';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';export function fileContent(_0x1c5de5){const _0x3cd660=a90_0xadfd;return _0x1c5de5[_0x3cd660(0x1b3)]??Buffer['from'](_0x1c5de5[_0x3cd660(0x1b0)]??'','utf8');}function a90_0x459b(){const _0xfbefcf=['3960066DjIhWo','isSymbolicLink','4482149NtRkVv','length','isDirectory','validation','2628996tRiEQX','name','502106cYZLLe','13979568mMtcZt','isBuffer','includes','split','set','toString','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','Skill\x20directory\x20exceeds\x20total\x20file\x20size\x20limit.','toLowerCase','isSafeInteger','content','Skill\x20file\x20size\x20is\x20invalid:\x20','5WDQHTS','bytes','Skill\x20file\x20sha256\x20is\x20invalid:\x20','size','path','Skill\x20file\x20path\x20must\x20be\x20text.','string','isArray','sha256','startsWith','1133859JxeRTV','sort','values','Skill\x20directory\x20exceeds\x20file\x20count\x20limit.','test','1233630hXmjGw','trim','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','isFile','has','Skill\x20file\x20exceeds\x20size\x20limit:\x20','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','object','Unsafe\x20Skill\x20file\x20path:\x20','utf8'];a90_0x459b=function(){return _0xfbefcf;};return a90_0x459b();}export function fileText(_0x13d196){const _0x46e016=a90_0xadfd;return fileContent(_0x13d196)[_0x46e016(0x1ab)]('utf8');}export function normalizeLocalFiles(_0x166452){const _0x1471e1=a90_0xadfd;if(!Array[_0x1471e1(0x1b9)](_0x166452)||_0x166452[_0x1471e1(0x1ce)]===0x0)return[];if(_0x166452['length']>MAX_SKILL_FILE_COUNT)throw CliErrors['validation'](_0x1471e1(0x1bf));const _0x5b1bd1=new Map();let _0x489919=0x0;for(const _0x48cbe7 of _0x166452){if(!_0x48cbe7||typeof _0x48cbe7!==_0x1471e1(0x1c8)||typeof _0x48cbe7[_0x1471e1(0x1b6)]!==_0x1471e1(0x1b8))throw CliErrors[_0x1471e1(0x1a2)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x36946c=normalizeSkillRelativePath(_0x48cbe7[_0x1471e1(0x1b6)]);if(_0x5b1bd1[_0x1471e1(0x1c5)](_0x36946c))throw CliErrors[_0x1471e1(0x1a2)]('Duplicate\x20Skill\x20file\x20path:\x20'+_0x36946c);if(_0x48cbe7[_0x1471e1(0x1b3)]!==undefined&&!Buffer[_0x1471e1(0x1a7)](_0x48cbe7[_0x1471e1(0x1b3)]))throw CliErrors[_0x1471e1(0x1a2)](_0x1471e1(0x1ac)+_0x36946c);if(_0x48cbe7['bytes']===undefined&&typeof _0x48cbe7['content']!==_0x1471e1(0x1b8))throw CliErrors['validation'](_0x1471e1(0x1c7)+_0x36946c);const _0x5186a6=fileContent(_0x48cbe7),_0x1bc281=_0x5186a6[_0x1471e1(0x1ce)];if(_0x1bc281>MAX_SKILL_FILE_BYTES)throw CliErrors[_0x1471e1(0x1a2)](_0x1471e1(0x1c6)+_0x36946c);_0x489919+=_0x1bc281;if(_0x489919>MAX_SKILL_TOTAL_BYTES)throw CliErrors[_0x1471e1(0x1a2)]('Skill\x20directory\x20exceeds\x20total\x20file\x20size\x20limit.');_0x5b1bd1[_0x1471e1(0x1aa)](_0x36946c,{'path':_0x36946c,'bytes':_0x5186a6});}return Array['from'](_0x5b1bd1[_0x1471e1(0x1be)]())[_0x1471e1(0x1bd)](compareSkillFiles);}export function normalizeManifestFiles(_0x1e4e6b){const _0x5da73c=a90_0xadfd;if(!Array[_0x5da73c(0x1b9)](_0x1e4e6b)||_0x1e4e6b['length']===0x0)return[];if(_0x1e4e6b[_0x5da73c(0x1ce)]>MAX_SKILL_FILE_COUNT)throw CliErrors[_0x5da73c(0x1a2)](_0x5da73c(0x1bf));const _0x460c6b=new Map();let _0x2165cd=0x0;for(const _0x421e4c of _0x1e4e6b){if(!_0x421e4c||typeof _0x421e4c!==_0x5da73c(0x1c8)||typeof _0x421e4c[_0x5da73c(0x1b6)]!==_0x5da73c(0x1b8))throw CliErrors[_0x5da73c(0x1a2)](_0x5da73c(0x1b7));const _0x12119a=normalizeSkillRelativePath(_0x421e4c[_0x5da73c(0x1b6)]);if(_0x460c6b[_0x5da73c(0x1c5)](_0x12119a))throw CliErrors['validation']('Duplicate\x20Skill\x20file\x20path:\x20'+_0x12119a);if(!isSha256Hex(_0x421e4c[_0x5da73c(0x1ba)]))throw CliErrors[_0x5da73c(0x1a2)](_0x5da73c(0x1b4)+_0x12119a);if(!Number[_0x5da73c(0x1af)](_0x421e4c[_0x5da73c(0x1b5)])||_0x421e4c[_0x5da73c(0x1b5)]<0x0)throw CliErrors['validation'](_0x5da73c(0x1b1)+_0x12119a);if(_0x421e4c[_0x5da73c(0x1b5)]>MAX_SKILL_FILE_BYTES)throw CliErrors[_0x5da73c(0x1a2)](_0x5da73c(0x1c6)+_0x12119a);_0x2165cd+=_0x421e4c[_0x5da73c(0x1b5)];if(_0x2165cd>MAX_SKILL_TOTAL_BYTES)throw CliErrors['validation']('Skill\x20directory\x20exceeds\x20total\x20file\x20size\x20limit.');_0x460c6b['set'](_0x12119a,{'path':_0x12119a,'sha256':_0x421e4c[_0x5da73c(0x1ba)][_0x5da73c(0x1ae)](),'size':_0x421e4c[_0x5da73c(0x1b5)]});}return Array['from'](_0x460c6b['values']())[_0x5da73c(0x1bd)](compareSkillFiles);}export function scanSkillDirectory(_0x3770bb){const _0x5b0ccb=realpathSync(_0x3770bb),_0x2069ea=[];let _0x5dc8a1=0x0;function _0x620dc2(_0x1eb570){const _0xae762e=a90_0xadfd,_0x52ef7b=readdirSync(_0x1eb570,{'withFileTypes':!![]})[_0xae762e(0x1bd)]((_0x27148d,_0x749ecc)=>_0x27148d[_0xae762e(0x1a4)]['localeCompare'](_0x749ecc['name']));for(const _0x36c47e of _0x52ef7b){if(_0x36c47e[_0xae762e(0x1cf)]()&&IGNORED_DIR_NAMES['has'](_0x36c47e[_0xae762e(0x1a4)]))continue;if(IGNORED_FILE_NAMES[_0xae762e(0x1c5)](_0x36c47e[_0xae762e(0x1a4)]))continue;const _0x358694=resolve(_0x1eb570,_0x36c47e['name']);if(_0x36c47e[_0xae762e(0x1cc)]())throw CliErrors[_0xae762e(0x1a2)](_0xae762e(0x1c3)+_0x358694);const _0x1816eb=toPosixPath(relative(_0x5b0ccb,_0x358694));if(_0x36c47e[_0xae762e(0x1cf)]()){_0x620dc2(_0x358694);continue;}if(!_0x36c47e[_0xae762e(0x1c4)]())continue;validateSkillRelativePath(_0x1816eb);const _0x5b5a9c=readFileSync(_0x358694);if(_0x5b5a9c['length']>MAX_SKILL_FILE_BYTES)throw CliErrors[_0xae762e(0x1a2)]('Skill\x20file\x20exceeds\x20size\x20limit:\x20'+_0x1816eb);_0x5dc8a1+=_0x5b5a9c[_0xae762e(0x1ce)];if(_0x5dc8a1>MAX_SKILL_TOTAL_BYTES)throw CliErrors['validation'](_0xae762e(0x1ad));_0x2069ea['push']({'path':_0x1816eb,'bytes':_0x5b5a9c});if(_0x2069ea[_0xae762e(0x1ce)]>MAX_SKILL_FILE_COUNT)throw CliErrors[_0xae762e(0x1a2)](_0xae762e(0x1bf));}}return _0x620dc2(_0x5b0ccb),normalizeLocalFiles(_0x2069ea);}export function compareSkillFiles(_0x526101,_0x6930b5){const _0x44a5ae=a90_0xadfd;if(_0x526101[_0x44a5ae(0x1b6)]===SKILL_FILE)return _0x6930b5[_0x44a5ae(0x1b6)]===SKILL_FILE?0x0:-0x1;if(_0x6930b5[_0x44a5ae(0x1b6)]===SKILL_FILE)return 0x1;return Buffer['compare'](Buffer['from'](_0x526101[_0x44a5ae(0x1b6)],_0x44a5ae(0x1ca)),Buffer['from'](_0x6930b5[_0x44a5ae(0x1b6)],_0x44a5ae(0x1ca)));}export function normalizeSkillRelativePath(_0x1170fd){const _0x3f8610=a90_0xadfd,_0xf6d623=toPosixPath(_0x1170fd[_0x3f8610(0x1c2)]());return validateSkillRelativePath(_0xf6d623),_0xf6d623;}export function validateSkillRelativePath(_0x352377){const _0x1865b9=a90_0xadfd;if(!_0x352377||_0x352377[_0x1865b9(0x1bb)]('/')||_0x352377[_0x1865b9(0x1a8)]('//'))throw CliErrors['validation'](_0x1865b9(0x1c9)+_0x352377);for(const _0x4dc727 of _0x352377[_0x1865b9(0x1a9)]('/')){if(!_0x4dc727||_0x4dc727==='.'||_0x4dc727==='..')throw CliErrors[_0x1865b9(0x1a2)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x352377);}}function a90_0xadfd(_0x5ec56a,_0xfcd2c0){_0x5ec56a=_0x5ec56a-0x1a2;const _0x459b46=a90_0x459b();let _0xadfd96=_0x459b46[_0x5ec56a];return _0xadfd96;}export function toPosixPath(_0x68b530){return _0x68b530['replace'](/\\/g,'/');}export function isSha256Hex(_0x5d370c){const _0x10ad19=a90_0xadfd;return typeof _0x5d370c===_0x10ad19(0x1b8)&&/^[a-fA-F0-9]{64}$/[_0x10ad19(0x1c0)](_0x5d370c);}
|