@lovrabet/lovrabet-cli 2.1.9 → 2.1.10
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/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const a55_0x3bee35=a55_0xa8df;(function(_0x5b00d4,_0x22a181){const _0x5d2088=a55_0xa8df,_0x1ff1ea=_0x5b00d4();while(!![]){try{const _0xa14ff=parseInt(_0x5d2088(0x206))/0x1*(parseInt(_0x5d2088(0x226))/0x2)+-parseInt(_0x5d2088(0x1d4))/0x3*(-parseInt(_0x5d2088(0x201))/0x4)+parseInt(_0x5d2088(0x1e1))/0x5+parseInt(_0x5d2088(0x222))/0x6*(parseInt(_0x5d2088(0x1d7))/0x7)+-parseInt(_0x5d2088(0x1fd))/0x8+parseInt(_0x5d2088(0x205))/0x9+parseInt(_0x5d2088(0x1fc))/0xa*(-parseInt(_0x5d2088(0x20e))/0xb);if(_0xa14ff===_0x22a181)break;else _0x1ff1ea['push'](_0x1ff1ea['shift']());}catch(_0x559b27){_0x1ff1ea['push'](_0x1ff1ea['shift']());}}}(a55_0x5c91,0x86d43));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{resolve}from'node:path';import{parse as a55_0x5a1c31}from'yaml';import{CliErrors}from'../../errors.js';import{fileText,scanSkillDirectory}from'../../skills/runtime-skill-sync/local-files.js';const SKILL_FILE=a55_0x3bee35(0x209),SUPPORTED_SKILL_TYPES=new Set([a55_0x3bee35(0x1dc),a55_0x3bee35(0x1fb),a55_0x3bee35(0x228)]),TEXT_SKILL_FILE_PATTERN=/(?:^SKILL\.md$|\.(?:md|mdx|txt|json|ya?ml|js|mjs|cjs|ts|tsx|sh|sql))$/i;export function validateSkillDirectory(_0x5c5126,_0x2f35a3={}){const _0x486f77=a55_0x3bee35,_0x53f83f=resolveSkillDirectoryRoot(_0x5c5126),_0xb9516f=[],_0x229fb5=loadRequiredSkillFile(_0x53f83f,_0xb9516f),_0x324376=_0x229fb5?parseFrontmatter(_0x229fb5[_0x486f77(0x1f0)]):{'hasFrontmatter':![]};_0x229fb5&&validateFrontmatter(_0x229fb5['path'],_0x324376,_0xb9516f);validateRuntimeCliReferences(_0x53f83f,_0xb9516f);const _0x2628d7=_0xb9516f['filter'](_0x1281f1=>_0x1281f1[_0x486f77(0x21a)]===_0x486f77(0x1fe)),_0x5cacfa=_0xb9516f['filter'](_0x26b58a=>_0x26b58a[_0x486f77(0x21a)]===_0x486f77(0x21f));return{'ok':_0x2628d7[_0x486f77(0x1fa)]===0x0,'dir':_0x53f83f,'type':_0x324376[_0x486f77(0x20c)],'errors':_0x2628d7,'warnings':_0x5cacfa};}function resolveSkillDirectoryRoot(_0x421142){const _0x4a5b92=a55_0x3bee35,_0x1bf1f2=resolve(_0x421142);if(!existsSync(_0x1bf1f2))throw CliErrors['validation']('Skill\x20directory\x20not\x20found:\x20'+_0x421142);const _0x2b2cb2=lstatSync(_0x1bf1f2);if(_0x2b2cb2['isDirectory']())return _0x1bf1f2;if(_0x2b2cb2['isSymbolicLink']()){const _0x1da55c=realpathSync(_0x1bf1f2);if(lstatSync(_0x1da55c)[_0x4a5b92(0x218)]())return _0x1da55c;}throw CliErrors[_0x4a5b92(0x1ec)](_0x4a5b92(0x1d6)+_0x421142);}export function throwIfSkillValidationFailed(_0x21ca9e,_0x4633d9=![]){const _0x50ead1=a55_0x3bee35;if(_0x21ca9e['ok'])return;const _0x1da1b7=_0x21ca9e[_0x50ead1(0x1f6)]['map'](_0x4a086f=>{const _0x3a5990=_0x50ead1,_0x3d290d=_0x4a086f[_0x3a5990(0x1e5)]?'#'+_0x4a086f[_0x3a5990(0x1e5)]:'';return _0x4a086f[_0x3a5990(0x21a)][_0x3a5990(0x1de)]()+'\x20'+_0x4a086f[_0x3a5990(0x1da)]+'\x20'+_0x4a086f[_0x3a5990(0x225)]+_0x3d290d+':\x20'+_0x4a086f['message']+_0x3a5990(0x202)+_0x4a086f[_0x3a5990(0x217)];});throw CliErrors['validation'](_0x50ead1(0x21b)+_0x1da1b7[_0x50ead1(0x22a)]('\x0a'),'Fix\x20the\x20Skill\x20metadata\x20before\x20running\x20skill\x20push.');}function loadRequiredSkillFile(_0x33fea2,_0x1ed8a5){const _0x4bc943=a55_0x3bee35,_0xfb1d3f=resolve(_0x33fea2,SKILL_FILE);if(!existsSync(_0xfb1d3f))return _0x1ed8a5[_0x4bc943(0x1f5)](issue(_0x4bc943(0x1fe),_0x4bc943(0x203),SKILL_FILE,_0x4bc943(0x1f8),_0x4bc943(0x213))),undefined;const _0x196201=lstatSync(_0xfb1d3f);if(_0x196201[_0x4bc943(0x1d8)]())return _0x1ed8a5['push'](issue(_0x4bc943(0x1fe),_0x4bc943(0x203),SKILL_FILE,_0x4bc943(0x1d3),'Replace\x20the\x20symlink\x20with\x20a\x20regular\x20SKILL.md\x20file\x20inside\x20the\x20Skill\x20directory.')),undefined;if(!_0x196201[_0x4bc943(0x1d5)]())return _0x1ed8a5[_0x4bc943(0x1f5)](issue('error',_0x4bc943(0x203),SKILL_FILE,_0x4bc943(0x216),_0x4bc943(0x211))),undefined;return{'path':SKILL_FILE,'content':readFileSync(_0xfb1d3f,'utf8')};}function validateFrontmatter(_0x5c0f08,_0x104ed4,_0x37a3a1){const _0x177ed2=a55_0x3bee35;if(!_0x104ed4[_0x177ed2(0x21e)]){_0x37a3a1[_0x177ed2(0x1f5)](issue(_0x177ed2(0x1fe),_0x177ed2(0x219),_0x5c0f08,_0x177ed2(0x1df),_0x177ed2(0x1f4)));return;}!_0x104ed4[_0x177ed2(0x1e6)]?.[_0x177ed2(0x1eb)]()&&_0x37a3a1[_0x177ed2(0x1f5)](issue(_0x177ed2(0x1fe),_0x177ed2(0x219),_0x5c0f08,_0x177ed2(0x1f2),_0x177ed2(0x1e8))),!_0x104ed4['displayName']?.[_0x177ed2(0x1eb)]()&&_0x37a3a1['push'](issue(_0x177ed2(0x21f),'display-name-recommended',_0x5c0f08,'Frontmatter\x20displayName\x20is\x20missing.',_0x177ed2(0x1ed))),!_0x104ed4['description']?.[_0x177ed2(0x1eb)]()&&_0x37a3a1['push'](issue(_0x177ed2(0x1fe),_0x177ed2(0x1e0),_0x5c0f08,_0x177ed2(0x1f9),_0x177ed2(0x21d))),_0x104ed4[_0x177ed2(0x1ea)]===!![]&&_0x37a3a1['push'](issue(_0x177ed2(0x1fe),_0x177ed2(0x215),_0x5c0f08,'metadata.internal=true\x20Skills\x20cannot\x20be\x20uploaded.',_0x177ed2(0x1e4))),_0x104ed4[_0x177ed2(0x20c)]?.['trim']()&&!SUPPORTED_SKILL_TYPES['has'](_0x104ed4[_0x177ed2(0x20c)])&&_0x37a3a1[_0x177ed2(0x1f5)](issue(_0x177ed2(0x1fe),'frontmatter-required',_0x5c0f08,_0x177ed2(0x200),'Set\x20metadata.type\x20to\x20write,\x20read,\x20or\x20trainer.'));}function validateRuntimeCliReferences(_0x43e495,_0xd130d8){const _0x20e2d4=a55_0x3bee35;for(const _0x3d4280 of findRabetbaseCliInvocations(_0x43e495)){_0xd130d8['push'](issue(_0x20e2d4(0x21f),'rabetbase-cli-reference',_0x3d4280[_0x20e2d4(0x225)],_0x20e2d4(0x20b),_0x20e2d4(0x1e9),'L'+_0x3d4280[_0x20e2d4(0x1e3)]));}}function findRabetbaseCliInvocations(_0xe8975a){const _0x25c6a6=a55_0x3bee35;return scanSkillDirectory(_0xe8975a)['filter'](_0x4584df=>TEXT_SKILL_FILE_PATTERN[_0x25c6a6(0x204)](_0x4584df[_0x25c6a6(0x1ef)]))['flatMap'](_0x24c5c2=>{const _0x350351=_0x25c6a6,_0x173669=fileText(_0x24c5c2);return _0x173669['split'](/\r?\n/)[_0x350351(0x227)]((_0x437e65,_0xeff79e)=>({'file':_0x24c5c2[_0x350351(0x1ef)],'line':_0xeff79e+0x1,'text':_0x437e65}))[_0x350351(0x1f7)](({text:_0x3a175e})=>isRabetbaseCliInvocation(_0x3a175e))['map'](({file:_0x4921f0,line:_0x339889})=>({'file':_0x4921f0,'line':_0x339889}));});}const RABETBASE_SUBCOMMANDS=['dataset','sql','bff',a55_0x3bee35(0x207),a55_0x3bee35(0x1db),a55_0x3bee35(0x1ff),a55_0x3bee35(0x224),a55_0x3bee35(0x210),'artifact','kb','config','workspace',a55_0x3bee35(0x214),a55_0x3bee35(0x1ee),'logs',a55_0x3bee35(0x21c)],RABETBASE_INVOCATION=new RegExp(String[a55_0x3bee35(0x1e7)]`\brabetbase\s+(?:${RABETBASE_SUBCOMMANDS[a55_0x3bee35(0x22a)]('|')})\b`+String[a55_0x3bee35(0x1e7)]`(?:\s+[a-z][\w-]*){0,2}\s+(?:--?[a-z]|[\w.-]+=)`,'i');function isRabetbaseCliInvocation(_0x963e10){const _0x586c8f=a55_0x3bee35,_0x10f378=_0x963e10[_0x586c8f(0x212)](/\brabetbase\b/i);if(_0x10f378<0x0)return![];const _0x34c872=_0x963e10[_0x586c8f(0x1f3)](_0x10f378)[_0x586c8f(0x208)](/\blovrabet\b/i)[0x0]??'';return RABETBASE_INVOCATION['test'](_0x34c872);}function a55_0x5c91(){const _0x2c4f0e=['join','SKILL.md\x20must\x20be\x20a\x20regular\x20file.','700176lamWlC','isFile','Skill\x20directory\x20not\x20found:\x20','67025yBENRD','isSymbolicLink','description','ruleId','project','write','boolean','toUpperCase','SKILL.md\x20must\x20start\x20with\x20frontmatter.','description-required','1861330QGhCsa','object','line','Remove\x20metadata.internal\x20or\x20set\x20it\x20to\x20false\x20before\x20running\x20skill\x20push.','section','name','raw','Set\x20name\x20to\x20the\x20Skill\x20directory\x20code.','If\x20this\x20is\x20a\x20runtime\x20step,\x20replace\x20it\x20with\x20the\x20equivalent\x20lovrabet\x20command.\x20Dev-time\x20discovery\x20or\x20handoff\x20notes\x20can\x20stay.','internal','trim','validation','Set\x20displayName\x20to\x20the\x20human-readable\x20Skill\x20name\x20shown\x20in\x20SkillHub.','auth','path','content','isArray','Frontmatter\x20name\x20is\x20missing.','slice','Add\x20frontmatter\x20with\x20name\x20and\x20description.','push','errors','filter','Missing\x20SKILL.md.','Frontmatter\x20description\x20is\x20empty.','length','read','18019160GiirIP','7640024nbsyXV','error','app','metadata.type\x20must\x20be\x20one\x20of\x20write,\x20read,\x20or\x20trainer.','16HIwFPk','\x20Fix:\x20','structure-complete','test','4564224hpfPrE','3pduABl','page','split','SKILL.md','displayName','This\x20line\x20invokes\x20the\x20rabetbase\x20CLI.\x20rabetbase\x20is\x20a\x20dev-time\x20tool;\x20runtime\x20Skills\x20should\x20drive\x20runtime\x20work\x20through\x20lovrabet\x20commands.','type','match','11YcwrBY','string','service','Add\x20SKILL.md\x20as\x20a\x20regular\x20file\x20at\x20the\x20Skill\x20directory\x20root.','search','Add\x20SKILL.md\x20at\x20the\x20Skill\x20directory\x20root.','data','internal-skill','SKILL.md\x20is\x20not\x20a\x20file.','suggestion','isDirectory','frontmatter-required','level','Skill\x20validation\x20failed:\x0a','registry','填写模型触发语义:用户在什么场景应使用本\x20Skill、不要使用的边界和关键词。','hasFrontmatter','warning','true','false','414Udjpow','metadata','schema','file','557022ABMSxg','map','trainer','toLowerCase'];a55_0x5c91=function(){return _0x2c4f0e;};return a55_0x5c91();}function a55_0xa8df(_0x246e9a,_0xf7c35d){_0x246e9a=_0x246e9a-0x1d3;const _0x5c91dc=a55_0x5c91();let _0xa8df47=_0x5c91dc[_0x246e9a];return _0xa8df47;}function parseFrontmatter(_0x4b5bfc){const _0x1b9ed9=a55_0x3bee35,_0x1811da=_0x4b5bfc[_0x1b9ed9(0x20d)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x1811da)return{'hasFrontmatter':![]};const _0x42a9d1=_0x1811da[0x1]??'',_0x1412aa={'hasFrontmatter':!![]};let _0x217596;try{_0x217596=a55_0x5a1c31(_0x42a9d1);}catch{return _0x1412aa;}const _0x18f1d2=asRecord(_0x217596);if(!_0x18f1d2)return _0x1412aa;_0x1412aa[_0x1b9ed9(0x1e6)]=scalarToString(_0x18f1d2[_0x1b9ed9(0x1e6)]),_0x1412aa[_0x1b9ed9(0x20a)]=scalarToString(_0x18f1d2[_0x1b9ed9(0x20a)]),_0x1412aa['description']=scalarToString(_0x18f1d2[_0x1b9ed9(0x1d9)]);const _0x48b677=asRecord(_0x18f1d2[_0x1b9ed9(0x223)]);return _0x48b677&&(_0x1412aa[_0x1b9ed9(0x20c)]=scalarToString(_0x48b677[_0x1b9ed9(0x20c)]),_0x1412aa[_0x1b9ed9(0x1ea)]=scalarToBoolean(_0x48b677[_0x1b9ed9(0x1ea)])),_0x1412aa;}function asRecord(_0x2fb820){const _0x2a0928=a55_0x3bee35;if(_0x2fb820&&typeof _0x2fb820===_0x2a0928(0x1e2)&&!Array[_0x2a0928(0x1f1)](_0x2fb820))return _0x2fb820;return undefined;}function scalarToString(_0x25e38e){const _0xa05a14=a55_0x3bee35;if(typeof _0x25e38e===_0xa05a14(0x20f))return _0x25e38e[_0xa05a14(0x1eb)]();if(typeof _0x25e38e==='number'||typeof _0x25e38e===_0xa05a14(0x1dd))return String(_0x25e38e);return undefined;}function scalarToBoolean(_0x42f523){const _0x6cfa2c=a55_0x3bee35;if(typeof _0x42f523===_0x6cfa2c(0x1dd))return _0x42f523;if(typeof _0x42f523===_0x6cfa2c(0x20f))return cleanBoolean(_0x42f523);return undefined;}function cleanBoolean(_0x1b6009){const _0x2ccfe4=a55_0x3bee35,_0xa01e8a=_0x1b6009['trim']()[_0x2ccfe4(0x229)]();if(_0xa01e8a===_0x2ccfe4(0x220))return!![];if(_0xa01e8a===_0x2ccfe4(0x221))return![];return undefined;}function issue(_0x59e85a,_0x597575,_0x57e3bb,_0x109e3b,_0x10b247,_0x1c4a07){return{'level':_0x59e85a,'ruleId':_0x597575,'file':_0x57e3bb,'section':_0x1c4a07,'message':_0x109e3b,'suggestion':_0x10b247};}
|
|
1
|
+
const a55_0x4f7faa=a55_0x95aa;(function(_0x5db506,_0x256fa0){const _0xb6530d=a55_0x95aa,_0x15d913=_0x5db506();while(!![]){try{const _0x3401ef=-parseInt(_0xb6530d(0x187))/0x1*(parseInt(_0xb6530d(0x174))/0x2)+-parseInt(_0xb6530d(0x1a0))/0x3+-parseInt(_0xb6530d(0x188))/0x4*(parseInt(_0xb6530d(0x154))/0x5)+-parseInt(_0xb6530d(0x155))/0x6*(parseInt(_0xb6530d(0x15b))/0x7)+parseInt(_0xb6530d(0x16e))/0x8+-parseInt(_0xb6530d(0x162))/0x9+parseInt(_0xb6530d(0x19e))/0xa;if(_0x3401ef===_0x256fa0)break;else _0x15d913['push'](_0x15d913['shift']());}catch(_0x46bc3f){_0x15d913['push'](_0x15d913['shift']());}}}(a55_0x44bc,0x6a066));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{resolve}from'node:path';import{parse as a55_0x1c98ec}from'yaml';function a55_0x95aa(_0x1b55f6,_0x496ef1){_0x1b55f6=_0x1b55f6-0x14f;const _0x44bc1e=a55_0x44bc();let _0x95aad2=_0x44bc1e[_0x1b55f6];return _0x95aad2;}function a55_0x44bc(){const _0x51fb49=['level','Skill\x20validation\x20failed:\x0a','1JYJUNa','76UoyPxd','sql','This\x20line\x20invokes\x20the\x20rabetbase\x20CLI.\x20rabetbase\x20is\x20a\x20dev-time\x20tool;\x20runtime\x20Skills\x20should\x20drive\x20runtime\x20work\x20through\x20lovrabet\x20commands.','errors','Fix\x20the\x20Skill\x20metadata\x20before\x20running\x20skill\x20push.','data','SKILL.md\x20must\x20start\x20with\x20frontmatter.','description-required','name','Replace\x20the\x20symlink\x20with\x20a\x20regular\x20SKILL.md\x20file\x20inside\x20the\x20Skill\x20directory.','Add\x20SKILL.md\x20as\x20a\x20regular\x20file\x20at\x20the\x20Skill\x20directory\x20root.','validation','message','structure-complete','registry','workspace','dataset','metadata.type\x20must\x20be\x20one\x20of\x20write,\x20read,\x20or\x20trainer.','artifact','isFile','section','Add\x20frontmatter\x20with\x20name\x20and\x20description.','27736120snBhIq','type','1820070HjhAZr','ruleId','trainer','Missing\x20SKILL.md.','error','warning','Set\x20displayName\x20to\x20the\x20human-readable\x20Skill\x20name\x20shown\x20in\x20SkillHub.','object','internal','196715aRWNPO','5820YOvepl','push','match','internal-skill','string','displayName','3682UhMWkK','frontmatter-required','display-name-recommended','isSymbolicLink','If\x20this\x20is\x20a\x20runtime\x20step,\x20replace\x20it\x20with\x20the\x20equivalent\x20lovrabet\x20command.\x20Dev-time\x20discovery\x20or\x20handoff\x20notes\x20can\x20stay.','slice','true','2242611XuxeuG','SKILL.md','Frontmatter\x20displayName\x20is\x20missing.','isArray','Skill\x20directory\x20not\x20found:\x20','description','write','Add\x20SKILL.md\x20at\x20the\x20Skill\x20directory\x20root.','Frontmatter\x20name\x20is\x20missing.','number','raw','\x20Fix:\x20','2149544UeKmhR','line','join','page','SKILL.md\x20is\x20not\x20a\x20file.','suggestion','988842bRJbRE','map','Set\x20metadata.type\x20to\x20write,\x20read,\x20or\x20trainer.','search','path','trim','metadata.internal=true\x20Skills\x20cannot\x20be\x20uploaded.','flatMap','hasFrontmatter','service','filter','project','length','boolean','read','SKILL.md\x20must\x20be\x20a\x20regular\x20file.','test'];a55_0x44bc=function(){return _0x51fb49;};return a55_0x44bc();}import{CliErrors}from'../../errors.js';import{fileText,scanSkillDirectory}from'../../skills/runtime-skill-sync/local-files.js';const SKILL_FILE=a55_0x4f7faa(0x163),SUPPORTED_SKILL_TYPES=new Set([a55_0x4f7faa(0x168),a55_0x4f7faa(0x182),a55_0x4f7faa(0x1a2)]),TEXT_SKILL_FILE_PATTERN=/(?:^SKILL\.md$|\.(?:md|mdx|txt|json|ya?ml|js|mjs|cjs|ts|tsx|sh|sql))$/i;export function validateSkillDirectory(_0x5642fb,_0x553b68={}){const _0x40504f=a55_0x4f7faa,_0x61d216=resolveSkillDirectoryRoot(_0x5642fb),_0x41e530=[],_0x1e7653=loadRequiredSkillFile(_0x61d216,_0x41e530),_0x48bf9a=_0x1e7653?parseFrontmatter(_0x1e7653['content']):{'hasFrontmatter':![]};_0x1e7653&&validateFrontmatter(_0x1e7653[_0x40504f(0x178)],_0x48bf9a,_0x41e530);validateRuntimeCliReferences(_0x61d216,_0x41e530);const _0x1accc3=_0x41e530[_0x40504f(0x17e)](_0x461d94=>_0x461d94['level']===_0x40504f(0x14f)),_0xbf8275=_0x41e530['filter'](_0x276fdb=>_0x276fdb[_0x40504f(0x185)]===_0x40504f(0x150));return{'ok':_0x1accc3[_0x40504f(0x180)]===0x0,'dir':_0x61d216,'type':_0x48bf9a[_0x40504f(0x19f)],'errors':_0x1accc3,'warnings':_0xbf8275};}function resolveSkillDirectoryRoot(_0x2a6071){const _0x2a48f3=a55_0x4f7faa,_0xb23ade=resolve(_0x2a6071);if(!existsSync(_0xb23ade))throw CliErrors[_0x2a48f3(0x193)](_0x2a48f3(0x166)+_0x2a6071);const _0x4156fe=lstatSync(_0xb23ade);if(_0x4156fe['isDirectory']())return _0xb23ade;if(_0x4156fe[_0x2a48f3(0x15e)]()){const _0x42df48=realpathSync(_0xb23ade);if(lstatSync(_0x42df48)['isDirectory']())return _0x42df48;}throw CliErrors[_0x2a48f3(0x193)]('Skill\x20directory\x20not\x20found:\x20'+_0x2a6071);}export function throwIfSkillValidationFailed(_0x2335fe,_0xd91e6=![]){const _0x4622cd=a55_0x4f7faa;if(_0x2335fe['ok'])return;const _0x5a4cdf=_0x2335fe[_0x4622cd(0x18b)][_0x4622cd(0x175)](_0x461f70=>{const _0x57bee6=_0x4622cd,_0x4bb0c2=_0x461f70[_0x57bee6(0x19c)]?'#'+_0x461f70[_0x57bee6(0x19c)]:'';return _0x461f70[_0x57bee6(0x185)]['toUpperCase']()+'\x20'+_0x461f70[_0x57bee6(0x1a1)]+'\x20'+_0x461f70['file']+_0x4bb0c2+':\x20'+_0x461f70[_0x57bee6(0x194)]+_0x57bee6(0x16d)+_0x461f70[_0x57bee6(0x173)];});throw CliErrors[_0x4622cd(0x193)](_0x4622cd(0x186)+_0x5a4cdf[_0x4622cd(0x170)]('\x0a'),_0x4622cd(0x18c));}function loadRequiredSkillFile(_0x416f19,_0x43b24a){const _0x5a4c06=a55_0x4f7faa,_0x3664d4=resolve(_0x416f19,SKILL_FILE);if(!existsSync(_0x3664d4))return _0x43b24a[_0x5a4c06(0x156)](issue(_0x5a4c06(0x14f),'structure-complete',SKILL_FILE,_0x5a4c06(0x1a3),_0x5a4c06(0x169))),undefined;const _0xf0592f=lstatSync(_0x3664d4);if(_0xf0592f[_0x5a4c06(0x15e)]())return _0x43b24a['push'](issue(_0x5a4c06(0x14f),_0x5a4c06(0x195),SKILL_FILE,_0x5a4c06(0x183),_0x5a4c06(0x191))),undefined;if(!_0xf0592f[_0x5a4c06(0x19b)]())return _0x43b24a[_0x5a4c06(0x156)](issue(_0x5a4c06(0x14f),_0x5a4c06(0x195),SKILL_FILE,_0x5a4c06(0x172),_0x5a4c06(0x192))),undefined;return{'path':SKILL_FILE,'content':readFileSync(_0x3664d4,'utf8')};}function validateFrontmatter(_0x3e59e8,_0x18570b,_0x441a5d){const _0x1cc83a=a55_0x4f7faa;if(!_0x18570b[_0x1cc83a(0x17c)]){_0x441a5d[_0x1cc83a(0x156)](issue(_0x1cc83a(0x14f),_0x1cc83a(0x15c),_0x3e59e8,_0x1cc83a(0x18e),_0x1cc83a(0x19d)));return;}!_0x18570b[_0x1cc83a(0x190)]?.[_0x1cc83a(0x179)]()&&_0x441a5d[_0x1cc83a(0x156)](issue(_0x1cc83a(0x14f),_0x1cc83a(0x15c),_0x3e59e8,_0x1cc83a(0x16a),'Set\x20name\x20to\x20the\x20Skill\x20directory\x20code.')),!_0x18570b[_0x1cc83a(0x15a)]?.['trim']()&&_0x441a5d[_0x1cc83a(0x156)](issue(_0x1cc83a(0x150),_0x1cc83a(0x15d),_0x3e59e8,_0x1cc83a(0x164),_0x1cc83a(0x151))),!_0x18570b[_0x1cc83a(0x167)]?.[_0x1cc83a(0x179)]()&&_0x441a5d[_0x1cc83a(0x156)](issue(_0x1cc83a(0x14f),_0x1cc83a(0x18f),_0x3e59e8,'Frontmatter\x20description\x20is\x20empty.','填写模型触发语义:用户在什么场景应使用本\x20Skill、不要使用的边界和关键词。')),_0x18570b[_0x1cc83a(0x153)]===!![]&&_0x441a5d['push'](issue(_0x1cc83a(0x14f),_0x1cc83a(0x158),_0x3e59e8,_0x1cc83a(0x17a),'Remove\x20metadata.internal\x20or\x20set\x20it\x20to\x20false\x20before\x20running\x20skill\x20push.')),_0x18570b[_0x1cc83a(0x19f)]?.['trim']()&&!SUPPORTED_SKILL_TYPES['has'](_0x18570b[_0x1cc83a(0x19f)])&&_0x441a5d['push'](issue('error',_0x1cc83a(0x15c),_0x3e59e8,_0x1cc83a(0x199),_0x1cc83a(0x176)));}function validateRuntimeCliReferences(_0x8fe564,_0xb0796c){const _0x55a5d1=a55_0x4f7faa;for(const _0x45bb51 of findRabetbaseCliInvocations(_0x8fe564)){_0xb0796c[_0x55a5d1(0x156)](issue(_0x55a5d1(0x150),'rabetbase-cli-reference',_0x45bb51['file'],_0x55a5d1(0x18a),_0x55a5d1(0x15f),'L'+_0x45bb51[_0x55a5d1(0x16f)]));}}function findRabetbaseCliInvocations(_0xad46d3){const _0x1e7baf=a55_0x4f7faa;return scanSkillDirectory(_0xad46d3)[_0x1e7baf(0x17e)](_0x4ab0e1=>TEXT_SKILL_FILE_PATTERN[_0x1e7baf(0x184)](_0x4ab0e1['path']))[_0x1e7baf(0x17b)](_0x3bb644=>{const _0x2b93dd=_0x1e7baf,_0x3e18ad=fileText(_0x3bb644);return _0x3e18ad['split'](/\r?\n/)[_0x2b93dd(0x175)]((_0x96dbaa,_0x3e04c8)=>({'file':_0x3bb644['path'],'line':_0x3e04c8+0x1,'text':_0x96dbaa}))[_0x2b93dd(0x17e)](({text:_0x41789d})=>isRabetbaseCliInvocation(_0x41789d))[_0x2b93dd(0x175)](({file:_0x3a28fc,line:_0x13c2aa})=>({'file':_0x3a28fc,'line':_0x13c2aa}));});}const RABETBASE_SUBCOMMANDS=[a55_0x4f7faa(0x198),a55_0x4f7faa(0x189),'bff',a55_0x4f7faa(0x171),a55_0x4f7faa(0x17f),'app','schema',a55_0x4f7faa(0x17d),a55_0x4f7faa(0x19a),'kb','config',a55_0x4f7faa(0x197),a55_0x4f7faa(0x18d),'auth','logs',a55_0x4f7faa(0x196)],RABETBASE_INVOCATION=new RegExp(String[a55_0x4f7faa(0x16c)]`\brabetbase\s+(?:${RABETBASE_SUBCOMMANDS[a55_0x4f7faa(0x170)]('|')})\b`+String['raw']`(?:\s+[a-z][\w-]*){0,2}\s+(?:--?[a-z]|[\w.-]+=)`,'i');function isRabetbaseCliInvocation(_0x2c0131){const _0x34f959=a55_0x4f7faa,_0x2a7b7a=_0x2c0131[_0x34f959(0x177)](/\brabetbase\b/i);if(_0x2a7b7a<0x0)return![];const _0x2f6e41=_0x2c0131[_0x34f959(0x160)](_0x2a7b7a)['split'](/\blovrabet\b/i)[0x0]??'';return RABETBASE_INVOCATION[_0x34f959(0x184)](_0x2f6e41);}function parseFrontmatter(_0x1e000b){const _0x168d7e=a55_0x4f7faa,_0x27ef4b=_0x1e000b[_0x168d7e(0x157)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x27ef4b)return{'hasFrontmatter':![]};const _0x4bb570=_0x27ef4b[0x1]??'',_0x128737={'hasFrontmatter':!![]};let _0xc6de20;try{_0xc6de20=a55_0x1c98ec(_0x4bb570);}catch{return _0x128737;}const _0x123c80=asRecord(_0xc6de20);if(!_0x123c80)return _0x128737;_0x128737[_0x168d7e(0x190)]=scalarToString(_0x123c80[_0x168d7e(0x190)]),_0x128737[_0x168d7e(0x15a)]=scalarToString(_0x123c80[_0x168d7e(0x15a)]),_0x128737['description']=scalarToString(_0x123c80[_0x168d7e(0x167)]);const _0xe8358e=asRecord(_0x123c80['metadata']);return _0xe8358e&&(_0x128737['type']=scalarToString(_0xe8358e[_0x168d7e(0x19f)]),_0x128737[_0x168d7e(0x153)]=scalarToBoolean(_0xe8358e[_0x168d7e(0x153)])),_0x128737;}function asRecord(_0x1f9f29){const _0x6014e=a55_0x4f7faa;if(_0x1f9f29&&typeof _0x1f9f29===_0x6014e(0x152)&&!Array[_0x6014e(0x165)](_0x1f9f29))return _0x1f9f29;return undefined;}function scalarToString(_0x4bc417){const _0x1a6f9f=a55_0x4f7faa;if(typeof _0x4bc417==='string')return _0x4bc417[_0x1a6f9f(0x179)]();if(typeof _0x4bc417===_0x1a6f9f(0x16b)||typeof _0x4bc417===_0x1a6f9f(0x181))return String(_0x4bc417);return undefined;}function scalarToBoolean(_0x4aca47){const _0x466165=a55_0x4f7faa;if(typeof _0x4aca47===_0x466165(0x181))return _0x4aca47;if(typeof _0x4aca47===_0x466165(0x159))return cleanBoolean(_0x4aca47);return undefined;}function cleanBoolean(_0x3eb437){const _0x1479d5=a55_0x4f7faa,_0x5154ff=_0x3eb437[_0x1479d5(0x179)]()['toLowerCase']();if(_0x5154ff===_0x1479d5(0x161))return!![];if(_0x5154ff==='false')return![];return undefined;}function issue(_0x1cc198,_0x5ec9c9,_0x371152,_0x36e070,_0x47bb92,_0x5197b8){return{'level':_0x1cc198,'ruleId':_0x5ec9c9,'file':_0x371152,'section':_0x5197b8,'message':_0x36e070,'suggestion':_0x47bb92};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a56_0xf89e49=a56_0x59d5;(function(_0x5508fa,_0x4aa6a2){const _0x2c9659=a56_0x59d5,_0x3a3a30=_0x5508fa();while(!![]){try{const _0xa4a0e=parseInt(_0x2c9659(0x17c))/0x1+parseInt(_0x2c9659(0x187))/0x2*(-parseInt(_0x2c9659(0x183))/0x3)+-parseInt(_0x2c9659(0x184))/0x4*(parseInt(_0x2c9659(0x18e))/0x5)+-parseInt(_0x2c9659(0x18b))/0x6+-parseInt(_0x2c9659(0x17d))/0x7*(-parseInt(_0x2c9659(0x18d))/0x8)+parseInt(_0x2c9659(0x191))/0x9*(-parseInt(_0x2c9659(0x18f))/0xa)+parseInt(_0x2c9659(0x188))/0xb;if(_0xa4a0e===_0x4aa6a2)break;else _0x3a3a30['push'](_0x3a3a30['shift']());}catch(_0x4a5d36){_0x3a3a30['push'](_0x3a3a30['shift']());}}}(a56_0x80cd,0xa423e));function a56_0x80cd(){const _0x18fa64=['verbose','317052ZXejYf','461379CtKLvJ','91GPsVEs','sqlContent','sqlcode','Get\x20custom\x20SQL\x20query\x20details\x20by\x20sqlCode','description','dbId','21aHwoRk','2160ZrYToO','read','appCode','199336pqExKc','29421359VCeiRP','bool','sql','6940422hpmKuN','sqlCode','690616wxtynv','12445KkbzFU','110CtQtum'];a56_0x80cd=function(){return _0x18fa64;};return a56_0x80cd();}import{getSqlQueryInfo}from'../../core/api-client.js';function a56_0x59d5(_0x2ca362,_0x3ace2a){_0x2ca362=_0x2ca362-0x17c;const _0x80cda8=a56_0x80cd();let _0x59d540=_0x80cda8[_0x2ca362];return _0x59d540;}import{getDbName}from'../../core/db-resolver.js';import{SQLCODE_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';export const sqlDetail={'service':a56_0xf89e49(0x18a),'command':'detail','description':a56_0xf89e49(0x180),'risk':a56_0xf89e49(0x185),'flags':[SQLCODE_FLAG,VERBOSE_FLAG],async 'execute'(_0x3f9785){const _0x55e2ae=a56_0xf89e49,_0x59c31a=await getSqlQueryInfo(_0x3f9785['appCode'],_0x3f9785['str'](_0x55e2ae(0x17f))),_0x2ecbbd=_0x3f9785[_0x55e2ae(0x189)](_0x55e2ae(0x190));if(_0x2ecbbd)return{'ok':!![],'data':_0x59c31a};const _0x4c6d2b=_0x59c31a[_0x55e2ae(0x182)]?await getDbName(_0x3f9785[_0x55e2ae(0x186)],_0x59c31a[_0x55e2ae(0x182)]):undefined;return{'ok':!![],'data':{'sqlCode':_0x59c31a[_0x55e2ae(0x18c)],'sqlName':_0x59c31a['sqlName'],'db':_0x4c6d2b?_0x4c6d2b+'\x20('+_0x59c31a[_0x55e2ae(0x182)]+')':_0x59c31a[_0x55e2ae(0x182)]??'','description':_0x59c31a[_0x55e2ae(0x181)]??'','sqlContent':_0x59c31a[_0x55e2ae(0x17e)]??''}};}};
|
package/lib/commands/sql/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a57_0x554332=a57_0x4038;(function(_0x6b0f4d,_0x126b97){const _0x23c8d9=a57_0x4038,_0x3c6439=_0x6b0f4d();while(!![]){try{const _0x183775=parseInt(_0x23c8d9(0xc6))/0x1+parseInt(_0x23c8d9(0xc5))/0x2*(parseInt(_0x23c8d9(0xcd))/0x3)+-parseInt(_0x23c8d9(0xd2))/0x4*(-parseInt(_0x23c8d9(0xd3))/0x5)+parseInt(_0x23c8d9(0xd0))/0x6+-parseInt(_0x23c8d9(0xd1))/0x7+parseInt(_0x23c8d9(0xd7))/0x8*(-parseInt(_0x23c8d9(0xc8))/0x9)+-parseInt(_0x23c8d9(0xd4))/0xa*(-parseInt(_0x23c8d9(0xcf))/0xb);if(_0x183775===_0x126b97)break;else _0x3c6439['push'](_0x3c6439['shift']());}catch(_0x55db39){_0x3c6439['push'](_0x3c6439['shift']());}}}(a57_0x575f,0xe9609));function a57_0x575f(){const _0x5916a8=['10503507rNeIbR','4fDJwyc','5552615WvvyWA','1564930MFpldp','sql','str','88lojjaG','execSuccess','SQL\x20execution\x20failed','execResult','now','1964PbeoXq','1048874HoyzNw','execError','910827QHEQDp','read','length','isArray','exec','1791BAsObg','sqlcode','44HgmRJE','1188144qiSiiB'];a57_0x575f=function(){return _0x5916a8;};return a57_0x575f();}import{executeSdkSql}from'../../core/sdk-client.js';import{SQLCODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';import{parseJsonParams}from'../../utils/params.js';function a57_0x4038(_0x37afd5,_0x301879){_0x37afd5=_0x37afd5-0xc5;const _0x575f7f=a57_0x575f();let _0x403865=_0x575f7f[_0x37afd5];return _0x403865;}export const sqlExec={'service':a57_0x554332(0xd5),'command':a57_0x554332(0xcc),'description':'Execute\x20a\x20custom\x20SQL\x20query\x20by\x20sqlCode','risk':a57_0x554332(0xc9),'flags':[SQLCODE_FLAG,PARAMS_FLAG],async 'execute'(_0x28eb2e){const _0x448965=a57_0x554332,_0x263f94=parseJsonParams(_0x28eb2e[_0x448965(0xd6)]('params')),_0x293f8b=Date[_0x448965(0xdb)](),_0x8f1885=await executeSdkSql(_0x28eb2e['str'](_0x448965(0xce)),_0x263f94),_0x59a3be=Date[_0x448965(0xdb)]()-_0x293f8b,_0x264b1a=_0x8f1885?.[_0x448965(0xda)]??_0x8f1885,_0x3a3785=_0x8f1885?.[_0x448965(0xd8)]??!![];if(!_0x3a3785)return{'ok':![],'data':{'error':_0x8f1885?.[_0x448965(0xc7)]||_0x448965(0xd9),'elapsed':_0x59a3be},'message':_0x448965(0xd9)};const _0x2df99c=Array[_0x448965(0xcb)](_0x264b1a)?_0x264b1a:[];return{'ok':!![],'data':{'rows':_0x2df99c,'rowCount':_0x2df99c[_0x448965(0xca)],'elapsed':_0x59a3be},'message':'Returned\x20'+_0x2df99c[_0x448965(0xca)]+'\x20row(s)\x20in\x20'+_0x59a3be+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5d2a26,_0x59ae8b){const _0x43964a=a58_0x19f5,_0x55de40=_0x5d2a26();while(!![]){try{const _0x1b1b03=parseInt(_0x43964a(0x149))/0x1*(-parseInt(_0x43964a(0x148))/0x2)+-parseInt(_0x43964a(0x14b))/0x3+parseInt(_0x43964a(0x151))/0x4+parseInt(_0x43964a(0x14f))/0x5+parseInt(_0x43964a(0x14a))/0x6*(-parseInt(_0x43964a(0x150))/0x7)+parseInt(_0x43964a(0x14d))/0x8+-parseInt(_0x43964a(0x14c))/0x9*(-parseInt(_0x43964a(0x14e))/0xa);if(_0x1b1b03===_0x59ae8b)break;else _0x55de40['push'](_0x55de40['shift']());}catch(_0x4ddb72){_0x55de40['push'](_0x55de40['shift']());}}}(a58_0x50da,0xbd1e2));function a58_0x19f5(_0x1dcaac,_0x3292e6){_0x1dcaac=_0x1dcaac-0x148;const _0x50da0b=a58_0x50da();let _0x19f543=_0x50da0b[_0x1dcaac];return _0x19f543;}import{sqlDetail}from'../../commands/sql/detail.js';import{sqlExec}from'../../commands/sql/exec.js';export const sqlDefinitions=[sqlDetail,sqlExec];function a58_0x50da(){const _0x540484=['3548635BFzPxR','7XEiFcR','3528012nolOMz','3232JcUGBQ','865yrWZcj','362058DncUSR','1371825rUAHYy','65565SJxTSS','6397352OCXLeq','410WwdBUQ'];a58_0x50da=function(){return _0x540484;};return a58_0x50da();}
|
package/lib/commands/update.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a59_0x4eaba9=a59_0x3fac;(function(_0x56172d,_0x388dea){const _0x1eb022=a59_0x3fac,_0x2f92ce=_0x56172d();while(!![]){try{const _0x322094=parseInt(_0x1eb022(0x1d6))/0x1*(-parseInt(_0x1eb022(0x1d0))/0x2)+parseInt(_0x1eb022(0x1ce))/0x3*(parseInt(_0x1eb022(0x1bb))/0x4)+parseInt(_0x1eb022(0x1ee))/0x5*(parseInt(_0x1eb022(0x1ae))/0x6)+parseInt(_0x1eb022(0x1d9))/0x7+-parseInt(_0x1eb022(0x1e1))/0x8*(parseInt(_0x1eb022(0x1dd))/0x9)+parseInt(_0x1eb022(0x1b2))/0xa*(-parseInt(_0x1eb022(0x1db))/0xb)+-parseInt(_0x1eb022(0x1f0))/0xc*(-parseInt(_0x1eb022(0x1d4))/0xd);if(_0x322094===_0x388dea)break;else _0x2f92ce['push'](_0x2f92ce['shift']());}catch(_0x5cb101){_0x2f92ce['push'](_0x2f92ce['shift']());}}}(a59_0x1cc0,0xe49db));import{spawnSync}from'node:child_process';function a59_0x1cc0(){const _0x43ac89=['prerelease','latest','Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','/dist-tags','Current\x20version:\x20','length','Already\x20on\x20requested\x20version\x20(v','message','validation','trim','args','\x20\x20Try\x20manually:\x20npm\x20install\x20-g\x20','error','status','json','237gYVVwf','\x20\x20Run\x20manually:\x20lovrabet\x20cli-skill\x20install','436AofceJ','Unable\x20to\x20resolve\x20','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','Updating\x20','559iLHJsz','Checking\x20npm\x20dist-tags...','8392FDuaKw','filter','\x20->\x20','12556243spSwBO','join','9898141BlpoVk','timeout','54BaQUNJ','Invalid\x20version:\x20','/-/package/','Update\x20failed:\x20','632248UrozbO','skills','inherit','update','fromEntries','Updated\x20to\x20v','Update\x20','Version\x20comparison\x20failed.','minor','run','unknown','string','stderr','5YbSiNq','match','67092qIRNTj','Use\x20full\x20semver\x20versions\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.','beta','pipe','toString','\x20version\x20from\x20npm.','Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.','major','install','--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.','version','str','Already\x20up\x20to\x20date\x20(v','Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag','write','log','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','cwd','bool','9905514bzLglM','patch','Checking\x20CLI\x20Built-in\x20Skill...','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','10dNtNjl','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','nonInteractive','warn','Install\x20a\x20specific\x20CLI\x20version','flag','boolean','no-skills','=1).','23028hLeims','Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','source'];a59_0x1cc0=function(){return _0x43ac89;};return a59_0x1cc0();}import{CliErrors}from'../errors.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{LOVRABET_NPM_PACKAGE_NAME,LOVRABET_SKILL_SOURCE,NPM_REGISTRY_BASE_URL}from'../constant/distribution.js';import{resolveNpmBin}from'../utils/platform.js';import{getCliVersion}from'../utils/version.js';import{LOVRABET_SKIP_NPX_SKILLS_ENV,runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';const updateFlags=[{'name':a59_0x4eaba9(0x1c0),'type':'boolean','description':a59_0x4eaba9(0x1fd),'default':![]},{'name':a59_0x4eaba9(0x1f2),'type':a59_0x4eaba9(0x1b8),'description':a59_0x4eaba9(0x1b1),'default':![]},{'name':a59_0x4eaba9(0x1fa),'type':a59_0x4eaba9(0x1ec),'description':a59_0x4eaba9(0x1b6)},{'name':a59_0x4eaba9(0x1b9),'type':a59_0x4eaba9(0x1b8),'description':a59_0x4eaba9(0x1bc),'default':![]},{'name':a59_0x4eaba9(0x1e2),'type':a59_0x4eaba9(0x1b8),'description':a59_0x4eaba9(0x1c1),'default':!![],'hidden':!![]}];function parseSemver(_0xdbfff0){const _0x4eb467=a59_0x4eaba9,_0x211c66=_0xdbfff0[_0x4eb467(0x1c8)]()[_0x4eb467(0x1ef)](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0x211c66)return null;return{'major':Number(_0x211c66[0x1]),'minor':Number(_0x211c66[0x2]),'patch':Number(_0x211c66[0x3]),'prerelease':_0x211c66[0x4]};}function compareSemver(_0x5ca2c0,_0x3bcb9d){const _0x379174=a59_0x4eaba9,_0x4f16b2=parseSemver(_0x5ca2c0),_0x5287a6=parseSemver(_0x3bcb9d);if(!_0x4f16b2||!_0x5287a6)throw CliErrors[_0x379174(0x1c7)](_0x379174(0x1e8),_0x379174(0x1f1));for(const _0x436ed1 of[_0x379174(0x1f7),_0x379174(0x1e9),_0x379174(0x1af)]){if(_0x4f16b2[_0x436ed1]<_0x5287a6[_0x436ed1])return-0x1;if(_0x4f16b2[_0x436ed1]>_0x5287a6[_0x436ed1])return 0x1;}if(!_0x4f16b2[_0x379174(0x1bf)]&&!_0x5287a6[_0x379174(0x1bf)])return 0x0;if(!_0x4f16b2[_0x379174(0x1bf)])return 0x1;if(!_0x5287a6['prerelease'])return-0x1;if(_0x4f16b2[_0x379174(0x1bf)]===_0x5287a6[_0x379174(0x1bf)])return 0x0;return _0x4f16b2[_0x379174(0x1bf)]<_0x5287a6['prerelease']?-0x1:0x1;}function a59_0x3fac(_0x23094a,_0x54374f){_0x23094a=_0x23094a-0x1ad;const _0x1cc0fd=a59_0x1cc0();let _0x3facb1=_0x1cc0fd[_0x23094a];return _0x3facb1;}function getRequestedVersion(_0x3695b7){const _0x255edb=a59_0x4eaba9,_0x44ccf6=_0x3695b7[_0x255edb(0x1fb)](_0x255edb(0x1fa))[_0x255edb(0x1c8)]();if(_0x44ccf6)return _0x44ccf6;return String(_0x3695b7[_0x255edb(0x1c9)]?.[0x0]??'')[_0x255edb(0x1c8)]();}function shouldSkipCliBuiltInSkill(_0x42a7d9){const _0x2d3a0c=a59_0x4eaba9;return _0x42a7d9[_0x2d3a0c(0x1ad)](_0x2d3a0c(0x1b9))||_0x42a7d9[_0x2d3a0c(0x1b7)](_0x2d3a0c(0x1e2))===![];}async function validateUpdateFlags(_0x2b04b7){const _0x399398=a59_0x4eaba9,_0x2d8dcb=getRequestedVersion(_0x2b04b7),_0x59cb5d=[_0x2b04b7[_0x399398(0x1ad)]('latest')?_0x399398(0x1c0):'',_0x2b04b7['bool'](_0x399398(0x1f2))?_0x399398(0x1f2):'',_0x2d8dcb?_0x399398(0x1fa):''][_0x399398(0x1d7)](Boolean);if(_0x59cb5d[_0x399398(0x1c4)]>0x1)throw CliErrors['validation'](_0x399398(0x1f9),_0x399398(0x1f6));if(_0x2d8dcb&&!parseSemver(_0x2d8dcb))throw CliErrors[_0x399398(0x1c7)](_0x399398(0x1de)+_0x2d8dcb,'Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.');}async function fetchNpmDistTags(){const _0x1fd561=a59_0x4eaba9;try{const _0x1be5f=NPM_REGISTRY_BASE_URL+_0x1fd561(0x1df)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x1fd561(0x1c2),_0x4f9b24=await fetch(_0x1be5f,{'signal':AbortSignal[_0x1fd561(0x1dc)](0x2710)});if(!_0x4f9b24['ok'])return null;const _0x2267c7=await _0x4f9b24[_0x1fd561(0x1cd)]();if(!_0x2267c7||typeof _0x2267c7!=='object')return null;return Object[_0x1fd561(0x1e5)](Object['entries'](_0x2267c7)['filter'](([,_0x1e9db0])=>typeof _0x1e9db0===_0x1fd561(0x1ec)&&_0x1e9db0['trim']())['map'](([_0x371b01,_0xeba8f0])=>[_0x371b01,String(_0xeba8f0)['trim']()]));}catch{return null;}}async function resolveTargetVersion(_0x3f8bb3){const _0x12e81a=a59_0x4eaba9,_0x26b455=getRequestedVersion(_0x3f8bb3);if(_0x26b455)return{'version':_0x26b455,'source':'version'};const _0x1ac842=_0x3f8bb3[_0x12e81a(0x1ad)]('beta')?'beta':_0x12e81a(0x1c0),_0x3cbffc=await fetchNpmDistTags(),_0x23c7dc=_0x3cbffc?.[_0x1ac842];if(!_0x23c7dc)return null;return{'version':_0x23c7dc,'source':_0x1ac842};}function shouldInstallTarget(_0x2119b7,_0x10bec2){const _0x396532=a59_0x4eaba9,_0x8f2198=compareSemver(_0x2119b7,_0x10bec2[_0x396532(0x1fa)]);if(_0x10bec2[_0x396532(0x1be)]===_0x396532(0x1fa))return _0x8f2198!==0x0;return _0x8f2198<0x0;}function installCliPackage(_0x2fac2d,_0x155c35){const _0x3eb03a=a59_0x4eaba9,_0x51da5b=resolveNpmBin('npm'),_0x2fb112=[_0x3eb03a(0x1f8),'-g',LOVRABET_NPM_PACKAGE_NAME+'@'+_0x2fac2d];console[_0x3eb03a(0x1ff)]('*\x20'+[_0x51da5b,..._0x2fb112][_0x3eb03a(0x1da)]('\x20'));const _0x266ed8=spawnSync(_0x51da5b,_0x2fb112,{'cwd':process[_0x3eb03a(0x201)](),'stdio':_0x155c35?'pipe':_0x3eb03a(0x1e3),'env':process.env,'shell':![]});if(_0x266ed8[_0x3eb03a(0x1cc)]===0x0)return{'ok':!![]};let _0x4ffcad=_0x266ed8['error']?.[_0x3eb03a(0x1c6)]||'exit\x20'+(_0x266ed8[_0x3eb03a(0x1cc)]??'unknown');if(_0x155c35){const _0x10ec95=_0x266ed8[_0x3eb03a(0x1ed)]?_0x266ed8[_0x3eb03a(0x1ed)][_0x3eb03a(0x1f4)]()['trim']():'',_0x15ffd9=_0x266ed8['stdout']?_0x266ed8['stdout'][_0x3eb03a(0x1f4)]()['trim']():'';if(_0x10ec95)_0x4ffcad=_0x10ec95;else{if(_0x15ffd9)_0x4ffcad=_0x15ffd9;}}return{'ok':![],'error':_0x4ffcad};}async function installCliBuiltInSkill(_0x3fe318){const _0x50fed6=a59_0x4eaba9;console[_0x50fed6(0x1ff)](_0x50fed6(0x1b0));const _0x137b2b=runNpxSkillsAddGlobal(process['cwd'](),LOVRABET_SKILL_SOURCE,{'stdio':_0x3fe318?_0x50fed6(0x1f3):_0x50fed6(0x1e3)});if(_0x137b2b['skipped']){console[_0x50fed6(0x1ff)]('\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20('+LOVRABET_SKIP_NPX_SKILLS_ENV+_0x50fed6(0x1ba));return;}if(_0x137b2b['ok']){console[_0x50fed6(0x1ff)]('\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.');return;}console[_0x50fed6(0x1b5)](_0x50fed6(0x1d2)+(_0x137b2b[_0x50fed6(0x1cb)]||_0x50fed6(0x1eb))),console[_0x50fed6(0x1ff)](_0x50fed6(0x1cf));}async function execute(_0x2a5fb8){const _0x144b92=a59_0x4eaba9;await validateUpdateFlags(_0x2a5fb8);const _0x36e8f0=getCliVersion();console[_0x144b92(0x1ff)](_0x144b92(0x1c3)+_0x36e8f0),console['log'](_0x144b92(0x1d5));const _0x99d732=await resolveTargetVersion(_0x2a5fb8);if(!_0x99d732){const _0x241286=_0x2a5fb8['bool']('beta')?_0x144b92(0x1f2):'latest',_0x6072cf=_0x144b92(0x1d1)+_0x241286+_0x144b92(0x1f5);return console['warn'](_0x6072cf),console[_0x144b92(0x1ff)](_0x144b92(0x200)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x241286),{'ok':![]};}if(!shouldInstallTarget(_0x36e8f0,_0x99d732)){const _0x4a6c77=_0x99d732['source']===_0x144b92(0x1fa)?_0x144b92(0x1c5)+_0x99d732['version']+').':_0x144b92(0x1fc)+_0x99d732[_0x144b92(0x1fa)]+').';return console[_0x144b92(0x1ff)](_0x4a6c77),shouldSkipCliBuiltInSkill(_0x2a5fb8)?console[_0x144b92(0x1ff)]('Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).'):await installCliBuiltInSkill(_0x2a5fb8[_0x144b92(0x1b4)]),{'ok':!![]};}console[_0x144b92(0x1ff)](_0x144b92(0x1d3)+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0x36e8f0+_0x144b92(0x1d8)+_0x99d732[_0x144b92(0x1fa)]);const _0x2151f4=installCliPackage(_0x99d732[_0x144b92(0x1fa)],_0x2a5fb8['nonInteractive']);if(!_0x2151f4['ok']){const _0x581817=_0x144b92(0x1e0)+(_0x2151f4[_0x144b92(0x1cb)]||'unknown');return console[_0x144b92(0x1cb)](_0x581817),console[_0x144b92(0x1ff)](_0x144b92(0x1ca)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x99d732[_0x144b92(0x1fa)]),{'ok':![]};}return console[_0x144b92(0x1ff)](_0x144b92(0x1e6)+_0x99d732[_0x144b92(0x1fa)]+'.'),console[_0x144b92(0x1ff)](_0x144b92(0x1bd)),shouldSkipCliBuiltInSkill(_0x2a5fb8)?console[_0x144b92(0x1ff)](_0x144b92(0x1b3)):await installCliBuiltInSkill(_0x2a5fb8[_0x144b92(0x1b4)]),{'ok':!![]};}export const updateDefinition={'service':a59_0x4eaba9(0x1e4),'command':a59_0x4eaba9(0x1ea),'description':a59_0x4eaba9(0x1e7)+CLI_BIN_NAME+'\x20CLI\x20from\x20npm','risk':a59_0x4eaba9(0x1fe),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
function a59_0x5234(_0x2db630,_0x5c4e67){_0x2db630=_0x2db630-0x19a;const _0x3ff0a3=a59_0x3ff0();let _0x52344d=_0x3ff0a3[_0x2db630];return _0x52344d;}const a59_0x160ec9=a59_0x5234;(function(_0x3c4abc,_0xc0c2d7){const _0xf5f1d5=a59_0x5234,_0x22f58b=_0x3c4abc();while(!![]){try{const _0x3f4d8b=-parseInt(_0xf5f1d5(0x1dc))/0x1+-parseInt(_0xf5f1d5(0x1d6))/0x2+-parseInt(_0xf5f1d5(0x1d1))/0x3*(parseInt(_0xf5f1d5(0x1b0))/0x4)+-parseInt(_0xf5f1d5(0x1bf))/0x5*(-parseInt(_0xf5f1d5(0x1e7))/0x6)+parseInt(_0xf5f1d5(0x1a1))/0x7+parseInt(_0xf5f1d5(0x1e1))/0x8*(-parseInt(_0xf5f1d5(0x1ca))/0x9)+-parseInt(_0xf5f1d5(0x1a9))/0xa*(-parseInt(_0xf5f1d5(0x1a4))/0xb);if(_0x3f4d8b===_0xc0c2d7)break;else _0x22f58b['push'](_0x22f58b['shift']());}catch(_0x4471ca){_0x22f58b['push'](_0x22f58b['shift']());}}}(a59_0x3ff0,0x8ab34));import{spawnSync}from'node:child_process';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{LOVRABET_NPM_PACKAGE_NAME,LOVRABET_SKILL_SOURCE,NPM_REGISTRY_BASE_URL}from'../constant/distribution.js';function a59_0x3ff0(){const _0x512b6c=['16WeNsZU','prerelease','Checking\x20npm\x20dist-tags...','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','str','no-skills','1266tHEvJJ','log','match','Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.','stdout','string','\x20version\x20from\x20npm.','bool','/-/package/','7776195cqWOWZ','write','Install\x20a\x20specific\x20CLI\x20version','23385901ALLWLx','\x20->\x20','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','minor','trim','10EAzAoc','Use\x20full\x20semver\x20versions\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.','cwd','Unable\x20to\x20resolve\x20','object','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','flag','4336Bizree','latest','Updated\x20to\x20v','source','npm','map','Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.','Already\x20up\x20to\x20date\x20(v','\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(','boolean','inherit','filter','patch','\x20\x20Run\x20manually:\x20lovrabet\x20cli-skill\x20install','validation','12340aUDfTB','length','Current\x20version:\x20','Invalid\x20version:\x20','run','version','Update\x20','--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.','Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','Already\x20on\x20requested\x20version\x20(v','\x20\x20Try\x20manually:\x20npm\x20install\x20-g\x20','780345CagfIs','skills','Updating\x20','beta','status','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','unknown','2220HLcrIM','nonInteractive','warn','major','error','2270624jLrpvw','json','install','toString','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','Update\x20failed:\x20','1078626KySfDt','\x20CLI\x20from\x20npm','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','pipe','stderr'];a59_0x3ff0=function(){return _0x512b6c;};return a59_0x3ff0();}import{resolveNpmBin}from'../utils/platform.js';import{getCliVersion}from'../utils/version.js';import{LOVRABET_SKIP_NPX_SKILLS_ENV,runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';const updateFlags=[{'name':a59_0x160ec9(0x1b1),'type':a59_0x160ec9(0x1b9),'description':'Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag','default':![]},{'name':'beta','type':a59_0x160ec9(0x1b9),'description':a59_0x160ec9(0x1da),'default':![]},{'name':'version','type':a59_0x160ec9(0x19d),'description':a59_0x160ec9(0x1a3)},{'name':a59_0x160ec9(0x1e6),'type':a59_0x160ec9(0x1b9),'description':a59_0x160ec9(0x1c7),'default':![]},{'name':a59_0x160ec9(0x1cb),'type':a59_0x160ec9(0x1b9),'description':'Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','default':!![],'hidden':!![]}];function parseSemver(_0x36b4fd){const _0x1ce4b3=a59_0x160ec9,_0x2ac361=_0x36b4fd['trim']()[_0x1ce4b3(0x19a)](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0x2ac361)return null;return{'major':Number(_0x2ac361[0x1]),'minor':Number(_0x2ac361[0x2]),'patch':Number(_0x2ac361[0x3]),'prerelease':_0x2ac361[0x4]};}function compareSemver(_0x143f84,_0x2da2cd){const _0x4dac6a=a59_0x160ec9,_0x42ab33=parseSemver(_0x143f84),_0x41f302=parseSemver(_0x2da2cd);if(!_0x42ab33||!_0x41f302)throw CliErrors['validation']('Version\x20comparison\x20failed.',_0x4dac6a(0x1aa));for(const _0x105faf of[_0x4dac6a(0x1d4),_0x4dac6a(0x1a7),_0x4dac6a(0x1bc)]){if(_0x42ab33[_0x105faf]<_0x41f302[_0x105faf])return-0x1;if(_0x42ab33[_0x105faf]>_0x41f302[_0x105faf])return 0x1;}if(!_0x42ab33[_0x4dac6a(0x1e2)]&&!_0x41f302[_0x4dac6a(0x1e2)])return 0x0;if(!_0x42ab33[_0x4dac6a(0x1e2)])return 0x1;if(!_0x41f302['prerelease'])return-0x1;if(_0x42ab33['prerelease']===_0x41f302['prerelease'])return 0x0;return _0x42ab33[_0x4dac6a(0x1e2)]<_0x41f302[_0x4dac6a(0x1e2)]?-0x1:0x1;}function getRequestedVersion(_0x506e5e){const _0x70f1f7=a59_0x160ec9,_0x18bdf5=_0x506e5e[_0x70f1f7(0x1e5)](_0x70f1f7(0x1c4))[_0x70f1f7(0x1a8)]();if(_0x18bdf5)return _0x18bdf5;return String(_0x506e5e['args']?.[0x0]??'')['trim']();}function shouldSkipCliBuiltInSkill(_0x369da6){const _0x4c2208=a59_0x160ec9;return _0x369da6[_0x4c2208(0x19f)]('no-skills')||_0x369da6[_0x4c2208(0x1af)](_0x4c2208(0x1cb))===![];}async function validateUpdateFlags(_0x4cb279){const _0x1b6059=a59_0x160ec9,_0x7861f7=getRequestedVersion(_0x4cb279),_0x246869=[_0x4cb279[_0x1b6059(0x19f)](_0x1b6059(0x1b1))?_0x1b6059(0x1b1):'',_0x4cb279[_0x1b6059(0x19f)]('beta')?_0x1b6059(0x1cd):'',_0x7861f7?_0x1b6059(0x1c4):''][_0x1b6059(0x1bb)](Boolean);if(_0x246869[_0x1b6059(0x1c0)]>0x1)throw CliErrors[_0x1b6059(0x1be)](_0x1b6059(0x1c6),_0x1b6059(0x1b6));if(_0x7861f7&&!parseSemver(_0x7861f7))throw CliErrors[_0x1b6059(0x1be)](_0x1b6059(0x1c2)+_0x7861f7,_0x1b6059(0x19b));}async function fetchNpmDistTags(){const _0x34e5fb=a59_0x160ec9;try{const _0x6dce2=NPM_REGISTRY_BASE_URL+_0x34e5fb(0x1a0)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+'/dist-tags',_0x3325e5=await fetch(_0x6dce2,{'signal':AbortSignal['timeout'](0x2710)});if(!_0x3325e5['ok'])return null;const _0x2657b1=await _0x3325e5[_0x34e5fb(0x1d7)]();if(!_0x2657b1||typeof _0x2657b1!==_0x34e5fb(0x1ad))return null;return Object['fromEntries'](Object['entries'](_0x2657b1)[_0x34e5fb(0x1bb)](([,_0x2c2ce7])=>typeof _0x2c2ce7===_0x34e5fb(0x19d)&&_0x2c2ce7['trim']())[_0x34e5fb(0x1b5)](([_0x253a33,_0x162ede])=>[_0x253a33,String(_0x162ede)[_0x34e5fb(0x1a8)]()]));}catch{return null;}}async function resolveTargetVersion(_0x51e6ac){const _0x34908a=a59_0x160ec9,_0x557bef=getRequestedVersion(_0x51e6ac);if(_0x557bef)return{'version':_0x557bef,'source':'version'};const _0x32c5b2=_0x51e6ac[_0x34908a(0x19f)](_0x34908a(0x1cd))?_0x34908a(0x1cd):_0x34908a(0x1b1),_0x1bc266=await fetchNpmDistTags(),_0x5630e8=_0x1bc266?.[_0x32c5b2];if(!_0x5630e8)return null;return{'version':_0x5630e8,'source':_0x32c5b2};}function shouldInstallTarget(_0x39837a,_0x35e7d4){const _0x1e51e0=a59_0x160ec9,_0x1a56a5=compareSemver(_0x39837a,_0x35e7d4['version']);if(_0x35e7d4[_0x1e51e0(0x1b3)]===_0x1e51e0(0x1c4))return _0x1a56a5!==0x0;return _0x1a56a5<0x0;}function installCliPackage(_0x8a5ed6,_0x5dcea5){const _0x2d1feb=a59_0x160ec9,_0x43513c=resolveNpmBin(_0x2d1feb(0x1b4)),_0x249894=[_0x2d1feb(0x1d8),'-g',LOVRABET_NPM_PACKAGE_NAME+'@'+_0x8a5ed6];console[_0x2d1feb(0x1e8)]('*\x20'+[_0x43513c,..._0x249894]['join']('\x20'));const _0x4a88da=spawnSync(_0x43513c,_0x249894,{'cwd':process[_0x2d1feb(0x1ab)](),'stdio':_0x5dcea5?_0x2d1feb(0x1df):'inherit','env':process.env,'shell':![]});if(_0x4a88da[_0x2d1feb(0x1ce)]===0x0)return{'ok':!![]};let _0x100b3a=_0x4a88da['error']?.['message']||'exit\x20'+(_0x4a88da[_0x2d1feb(0x1ce)]??'unknown');if(_0x5dcea5){const _0x31ff00=_0x4a88da['stderr']?_0x4a88da[_0x2d1feb(0x1e0)]['toString']()[_0x2d1feb(0x1a8)]():'',_0x3ae5c8=_0x4a88da[_0x2d1feb(0x19c)]?_0x4a88da[_0x2d1feb(0x19c)][_0x2d1feb(0x1d9)]()[_0x2d1feb(0x1a8)]():'';if(_0x31ff00)_0x100b3a=_0x31ff00;else{if(_0x3ae5c8)_0x100b3a=_0x3ae5c8;}}return{'ok':![],'error':_0x100b3a};}async function installCliBuiltInSkill(_0x4af3cc){const _0x272eb6=a59_0x160ec9;console[_0x272eb6(0x1e8)]('Checking\x20CLI\x20Built-in\x20Skill...');const _0x15d5ef=runNpxSkillsAddGlobal(process[_0x272eb6(0x1ab)](),LOVRABET_SKILL_SOURCE,{'stdio':_0x4af3cc?_0x272eb6(0x1df):_0x272eb6(0x1ba)});if(_0x15d5ef['skipped']){console[_0x272eb6(0x1e8)](_0x272eb6(0x1b8)+LOVRABET_SKIP_NPX_SKILLS_ENV+'=1).');return;}if(_0x15d5ef['ok']){console[_0x272eb6(0x1e8)](_0x272eb6(0x1de));return;}console[_0x272eb6(0x1d3)](_0x272eb6(0x1a6)+(_0x15d5ef[_0x272eb6(0x1d5)]||_0x272eb6(0x1d0))),console[_0x272eb6(0x1e8)](_0x272eb6(0x1bd));}async function execute(_0x1a2b96){const _0x4d7aa7=a59_0x160ec9;await validateUpdateFlags(_0x1a2b96);const _0x1a5174=getCliVersion();console[_0x4d7aa7(0x1e8)](_0x4d7aa7(0x1c1)+_0x1a5174),console[_0x4d7aa7(0x1e8)](_0x4d7aa7(0x1e3));const _0x57ac03=await resolveTargetVersion(_0x1a2b96);if(!_0x57ac03){const _0xfc5044=_0x1a2b96[_0x4d7aa7(0x19f)]('beta')?_0x4d7aa7(0x1cd):'latest',_0x33ab6d=_0x4d7aa7(0x1ac)+_0xfc5044+_0x4d7aa7(0x19e);return console[_0x4d7aa7(0x1d3)](_0x33ab6d),console[_0x4d7aa7(0x1e8)](_0x4d7aa7(0x1e4)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0xfc5044),{'ok':![]};}if(!shouldInstallTarget(_0x1a5174,_0x57ac03)){const _0x3e5850=_0x57ac03[_0x4d7aa7(0x1b3)]===_0x4d7aa7(0x1c4)?_0x4d7aa7(0x1c8)+_0x57ac03[_0x4d7aa7(0x1c4)]+').':_0x4d7aa7(0x1b7)+_0x57ac03[_0x4d7aa7(0x1c4)]+').';return console['log'](_0x3e5850),shouldSkipCliBuiltInSkill(_0x1a2b96)?console['log']('Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).'):await installCliBuiltInSkill(_0x1a2b96[_0x4d7aa7(0x1d2)]),{'ok':!![]};}console[_0x4d7aa7(0x1e8)](_0x4d7aa7(0x1cc)+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0x1a5174+_0x4d7aa7(0x1a5)+_0x57ac03['version']);const _0x50712a=installCliPackage(_0x57ac03['version'],_0x1a2b96[_0x4d7aa7(0x1d2)]);if(!_0x50712a['ok']){const _0x760715=_0x4d7aa7(0x1db)+(_0x50712a[_0x4d7aa7(0x1d5)]||_0x4d7aa7(0x1d0));return console[_0x4d7aa7(0x1d5)](_0x760715),console[_0x4d7aa7(0x1e8)](_0x4d7aa7(0x1c9)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x57ac03[_0x4d7aa7(0x1c4)]),{'ok':![]};}return console[_0x4d7aa7(0x1e8)](_0x4d7aa7(0x1b2)+_0x57ac03[_0x4d7aa7(0x1c4)]+'.'),console[_0x4d7aa7(0x1e8)](_0x4d7aa7(0x1ae)),shouldSkipCliBuiltInSkill(_0x1a2b96)?console[_0x4d7aa7(0x1e8)](_0x4d7aa7(0x1cf)):await installCliBuiltInSkill(_0x1a2b96[_0x4d7aa7(0x1d2)]),{'ok':!![]};}export const updateDefinition={'service':'update','command':a59_0x160ec9(0x1c3),'description':a59_0x160ec9(0x1c5)+CLI_BIN_NAME+a59_0x160ec9(0x1dd),'risk':a59_0x160ec9(0x1a2),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a60_0x541d9d=a60_0x236f;(function(_0x26dc57,_0x5d7e63){const _0x318ba4=a60_0x236f,_0x5049fe=_0x26dc57();while(!![]){try{const _0x35ce4d=parseInt(_0x318ba4(0x14f))/0x1+parseInt(_0x318ba4(0x13b))/0x2+-parseInt(_0x318ba4(0x144))/0x3*(-parseInt(_0x318ba4(0x14a))/0x4)+parseInt(_0x318ba4(0x132))/0x5*(-parseInt(_0x318ba4(0x13d))/0x6)+-parseInt(_0x318ba4(0x148))/0x7*(parseInt(_0x318ba4(0x149))/0x8)+parseInt(_0x318ba4(0x14b))/0x9+parseInt(_0x318ba4(0x138))/0xa*(-parseInt(_0x318ba4(0x14e))/0xb);if(_0x35ce4d===_0x5d7e63)break;else _0x5049fe['push'](_0x5049fe['shift']());}catch(_0x168bf5){_0x5049fe['push'](_0x5049fe['shift']());}}}(a60_0x3d65,0x79ac1));import{CLI_BIN_NAME}from'../../constant/cli.js';function a60_0x236f(_0x47191b,_0x5b4293){_0x47191b=_0x47191b-0x119;const _0x3d6594=a60_0x3d65();let _0x236f2e=_0x3d6594[_0x47191b];return _0x236f2e;}import{DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../../constant/env.js';import{CliErrors}from'../../errors.js';import{readConfigFile,resolveWriteConfigPath,writeConfigFile}from'../../context.js';import{findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../../commands/app/eligibility.js';const WORKSPACE_USE_FLAGS=[{'name':a60_0x541d9d(0x136),'type':'string','description':a60_0x541d9d(0x12e)},{'name':a60_0x541d9d(0x128),'type':a60_0x541d9d(0x147),'description':a60_0x541d9d(0x13a)},{'name':'env','type':a60_0x541d9d(0x147),'description':a60_0x541d9d(0x126),'enum':[...RUNTIME_ENV_VALUES]},{'name':a60_0x541d9d(0x141),'type':a60_0x541d9d(0x12d),'description':'Compatibility\x20flag;\x20workspace\x20config\x20updates\x20are\x20non-interactive','default':![]}];async function executeWorkspaceUse(_0x3fb5d0,_0x595407){const _0x4d6c0a=a60_0x541d9d,_0x1dabb9=_0x3fb5d0[_0x4d6c0a(0x129)](_0x4d6c0a(0x136))[_0x4d6c0a(0x12f)](),_0x4f5687=_0x3fb5d0['str'](_0x4d6c0a(0x128))[_0x4d6c0a(0x12f)](),_0x21259d=_0x3fb5d0['str'](_0x4d6c0a(0x11c))[_0x4d6c0a(0x12f)](),_0x3a23d1=resolveWorkspaceEnv(_0x21259d||_0x3fb5d0['envName']||DEFAULT_CONFIG_VALUES['env']);if(!_0x1dabb9&&!_0x4f5687)throw CliErrors[_0x4d6c0a(0x137)](_0x4d6c0a(0x13f),'Usage:\x20'+CLI_BIN_NAME+_0x4d6c0a(0x131)+_0x595407+_0x4d6c0a(0x12b)+CLI_BIN_NAME+'\x20workspace\x20'+_0x595407+'\x20--appcode\x20<code>\x20[--env\x20daily]');const _0x1061e3=_0x4f5687||await resolveRemoteAppCode({'command':_0x595407,'appName':_0x1dabb9,'env':_0x3a23d1,'accessKey':_0x3fb5d0[_0x4d6c0a(0x121)]}),_0x4cff59=writeWorkspaceConfig({'command':_0x595407,'appName':_0x1dabb9,'appcode':_0x1061e3,'env':_0x3a23d1,'shouldWriteEnv':!!_0x21259d,'accessKey':_0x3fb5d0[_0x4d6c0a(0x121)]});return{'ok':!![],'data':{'configPath':_0x4cff59,'app':_0x1dabb9||null,'appcode':_0x1061e3,'env':_0x21259d?_0x3a23d1:null,'accessKeyWritten':![],'command':'workspace\x20'+_0x595407},'message':buildWorkspaceMessage(_0x4cff59,_0x1dabb9,_0x1061e3,_0x21259d?_0x3a23d1:undefined)};}async function resolveRemoteAppCode(_0x1d754e){const _0xcd2927=a60_0x541d9d;if(!_0x1d754e[_0xcd2927(0x121)])throw CliErrors[_0xcd2927(0x11a)](_0xcd2927(0x13e)+CLI_BIN_NAME+_0xcd2927(0x131)+_0x1d754e[_0xcd2927(0x133)]+'.');const {setActiveAK:_0x516cbf}=await import('../../core/api-client.js'),{getRemoteAppList:_0x34d3b2}=await import(_0xcd2927(0x125));_0x516cbf(_0x1d754e[_0xcd2927(0x121)]);const _0x205365=await _0x34d3b2({'env':_0x1d754e[_0xcd2927(0x11c)],'accessKey':_0x1d754e[_0xcd2927(0x121)],'noCache':![]}),_0x51e913=findAppByName(_0x205365['items'],_0x1d754e['appName']);if(_0x51e913&&!isRuntimeAccessibleApp(_0x51e913))throw runtimeInaccessibleAppError(_0x51e913,'\x22'+_0x1d754e[_0xcd2927(0x123)]+'\x22');const _0x2d883b=_0x51e913?.[_0xcd2927(0x11d)]?.[_0xcd2927(0x12f)]();if(_0x2d883b)return _0x2d883b;const _0x57340c=_0x205365[_0xcd2927(0x143)]['map'](_0x145a63=>_0x145a63['appName'])[_0xcd2927(0x150)](Boolean),_0x2c7c2b=_0x57340c[_0xcd2927(0x124)]?_0xcd2927(0x127)+Array['from'](new Set(_0x57340c))[_0xcd2927(0x135)](',\x20')+'.':_0xcd2927(0x120)+CLI_BIN_NAME+'\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20pass\x20--appcode\x20directly.';throw CliErrors[_0xcd2927(0x137)](_0xcd2927(0x11f)+_0x1d754e[_0xcd2927(0x123)]+_0xcd2927(0x14d),_0x2c7c2b);}function writeWorkspaceConfig(_0x3e9694){const _0x18f170=a60_0x541d9d,_0xe1d7c3=resolveWriteConfigPath(_0x18f170(0x146)),_0x482d70=readConfigFile(_0xe1d7c3);_0x3e9694[_0x18f170(0x12a)]&&(_0x482d70[_0x18f170(0x11c)]=_0x3e9694[_0x18f170(0x11c)]);if(_0x3e9694[_0x18f170(0x123)]){const _0x2044b6=isRecord(_0x482d70[_0x18f170(0x130)])?{..._0x482d70[_0x18f170(0x130)]}:{},_0x382ce0=isRecord(_0x2044b6[_0x3e9694['appName']])?_0x2044b6[_0x3e9694[_0x18f170(0x123)]]:{};_0x2044b6[_0x3e9694[_0x18f170(0x123)]]={..._0x382ce0,'appcode':_0x3e9694['appcode']},_0x482d70[_0x18f170(0x130)]=_0x2044b6,_0x482d70['defaultApp']=_0x3e9694[_0x18f170(0x123)];if(_0x482d70[_0x18f170(0x136)])delete _0x482d70['app'];return writeAndReturn(_0xe1d7c3,_0x482d70);}_0x482d70[_0x18f170(0x128)]=_0x3e9694[_0x18f170(0x128)];if(_0x482d70[_0x18f170(0x136)])delete _0x482d70[_0x18f170(0x136)];return writeAndReturn(_0xe1d7c3,_0x482d70);}function a60_0x3d65(){const _0x16a487=['length','../../commands/app/remote-source.js','Target\x20environment','Available\x20apps:\x20','appcode','str','shouldWriteEnv','\x20--app\x20<name>\x20[--env\x20daily]\x20or\x20','write','boolean','App\x20name\x20to\x20bind\x20as\x20the\x20current\x20workspace\x20default','trim','apps','\x20workspace\x20','355DLUUUh','command','Invalid\x20env\x20\x22','join','app','validation','350420GkrulM','\x0aEnv:\x20','App\x20code\x20to\x20bind\x20directly','1376736ggCTPF','workspace','18030jJsLUT','Resolving\x20--app\x20requires\x20accessKey.\x20Pass\x20--appcode\x20directly,\x20or\x20set\x20accessKey\x20before\x20running\x20','Missing\x20workspace\x20app\x20selector.','Initialize\x20app\x20context\x20for\x20the\x20current\x20workspace','yes','init','items','15oyYkVJ','use','project','string','21moMRwW','62808ChnjgN','189832uhBLwo','4884516CxvpTH','Workspace\x20configured.\x0aConfig\x20file:\x20','\x22\x20not\x20found.','539xXSucS','983953yNSaJy','filter','isArray','authRequired','object','env','appCode','includes','App\x20\x22','Run\x20`','accessKey','\x0aDefault\x20app:\x20','appName'];a60_0x3d65=function(){return _0x16a487;};return a60_0x3d65();}function writeAndReturn(_0x416a69,_0x2e5c75){return writeConfigFile(_0x416a69,_0x2e5c75),_0x416a69;}function resolveWorkspaceEnv(_0x9e0bcc){const _0x24382b=a60_0x541d9d;if(RUNTIME_ENV_VALUES[_0x24382b(0x11e)](_0x9e0bcc))return _0x9e0bcc;throw CliErrors['validation'](_0x24382b(0x134)+_0x9e0bcc+'\x22.\x20Allowed:\x20'+RUNTIME_ENV_VALUES[_0x24382b(0x135)](',\x20'));}function buildWorkspaceMessage(_0x20cbf0,_0x332bf2,_0x1e4c25,_0x2e091e){const _0xc03665=a60_0x541d9d,_0x400622=_0x332bf2?_0x332bf2+'\x20('+_0x1e4c25+')':_0x1e4c25,_0x2b95b2=_0x2e091e?_0xc03665(0x139)+_0x2e091e:'';return _0xc03665(0x14c)+_0x20cbf0+_0xc03665(0x122)+_0x400622+_0x2b95b2+'\x0aAccessKey:\x20not\x20written';}function isRecord(_0xe36b96){const _0xe4148a=a60_0x541d9d;return typeof _0xe36b96===_0xe4148a(0x11b)&&_0xe36b96!==null&&!Array[_0xe4148a(0x119)](_0xe36b96);}function makeWorkspaceCommand(_0x369e7f){const _0x30f8e8=a60_0x541d9d;return{'service':_0x30f8e8(0x13c),'command':_0x369e7f,'description':_0x369e7f===_0x30f8e8(0x142)?_0x30f8e8(0x140):'Set\x20app\x20context\x20for\x20the\x20current\x20workspace','risk':_0x30f8e8(0x12c),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':WORKSPACE_USE_FLAGS,async 'execute'(_0x4a02d5){return executeWorkspaceUse(_0x4a02d5,_0x369e7f);}};}export const workspaceDefinitions=[makeWorkspaceCommand(a60_0x541d9d(0x142)),makeWorkspaceCommand(a60_0x541d9d(0x145))];
|
package/lib/config/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a61_0x3d487b=a61_0x47d9;(function(_0x4462fd,_0x4270a0){const _0x50af9f=a61_0x47d9,_0x528cc6=_0x4462fd();while(!![]){try{const _0x33e5e2=-parseInt(_0x50af9f(0x176))/0x1+parseInt(_0x50af9f(0x191))/0x2+-parseInt(_0x50af9f(0x18d))/0x3*(-parseInt(_0x50af9f(0x180))/0x4)+-parseInt(_0x50af9f(0x186))/0x5+-parseInt(_0x50af9f(0x178))/0x6+parseInt(_0x50af9f(0x17e))/0x7+parseInt(_0x50af9f(0x175))/0x8;if(_0x33e5e2===_0x4270a0)break;else _0x528cc6['push'](_0x528cc6['shift']());}catch(_0x1bd7eb){_0x528cc6['push'](_0x528cc6['shift']());}}}(a61_0xf95c,0x3fdbd));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{OUTPUT_FORMAT_VALUES}from'../constant/output.js';export const CONFIG_FIELD_SCHEMAS={'env':{'description':'Target\x20environment','topLevel':!![],'cliSettableTopLevel':!![],'enumValues':RUNTIME_ENV_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a61_0x3d487b(0x190)],'importable':!![]},'format':{'description':a61_0x3d487b(0x17d),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':OUTPUT_FORMAT_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a61_0x3d487b(0x187)],'importable':!![]},'pageSize':{'description':a61_0x3d487b(0x179),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'apiDomain':{'description':a61_0x3d487b(0x182),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'userDomain':{'description':a61_0x3d487b(0x18f),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'runtimeDomain':{'description':a61_0x3d487b(0x188),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'skillHubDomain':{'description':a61_0x3d487b(0x185),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'accessKey':{'description':a61_0x3d487b(0x17f),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'riskLevel':{'description':a61_0x3d487b(0x184),'topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a61_0x3d487b(0x177)],'importable':!![]},'locale':{'description':a61_0x3d487b(0x18e),'topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a61_0x3d487b(0x183)],'importable':!![],'legacyCompatOnly':!![]}};export const TOP_LEVEL_CONFIG_KEYS=new Set(Object[a61_0x3d487b(0x17a)](CONFIG_FIELD_SCHEMAS)[a61_0x3d487b(0x18a)](([,_0x13803a])=>_0x13803a['cliSettableTopLevel'])[a61_0x3d487b(0x18b)](([_0x4da7e6])=>_0x4da7e6));export const CONFIG_ENUM_VALUES=Object['fromEntries'](Object[a61_0x3d487b(0x17a)](CONFIG_FIELD_SCHEMAS)[a61_0x3d487b(0x18a)](([,_0x122777])=>_0x122777[a61_0x3d487b(0x181)])[a61_0x3d487b(0x18b)](([_0x5e12a2,_0x445641])=>[_0x5e12a2,[..._0x445641[a61_0x3d487b(0x181)]||[]]]));export const IMPORTABLE_RUNTIME_CONFIG_KEYS=Object['entries'](CONFIG_FIELD_SCHEMAS)[a61_0x3d487b(0x18a)](([,_0x27e517])=>_0x27e517[a61_0x3d487b(0x189)])['map'](([_0x22b6c1])=>_0x22b6c1);export function getConfigFieldSchema(_0x1a615e){return CONFIG_FIELD_SCHEMAS[_0x1a615e];}export function getConfigEnumValues(_0x145c4e){const _0x1271bb=a61_0x3d487b;return getConfigFieldSchema(_0x145c4e)?.[_0x1271bb(0x181)];}function a61_0xf95c(){const _0xc806b1=['Default\x20output\x20format','1719172LFWXBQ','Access\x20key\x20(client-ak\x20auth)','1637380zAPPnM','enumValues','Override\x20API\x20domain','locale','Risk\x20level','Override\x20SkillHub\x20domain','1719425lWAmRw','format','Override\x20runtime\x20domain','importable','filter','map','legacyCompatOnly','3Wyovpy','Locale','Override\x20user\x20domain','env','366390XNBnAo','Config\x20key.\x20Top-level:\x20','2522432kMfnRR','187645vkgmSS','riskLevel','2162070fYTOlq','Default\x20page\x20size','entries','has',';\x20local\x20alias:\x20apps.<alias>.appcode'];a61_0xf95c=function(){return _0xc806b1;};return a61_0xf95c();}export function getConfigDefaultValue(_0x453b50){return getConfigFieldSchema(_0x453b50)?.['defaultValue'];}export function isTopLevelConfigKey(_0x243f18){const _0x2a3cbc=a61_0x3d487b;return TOP_LEVEL_CONFIG_KEYS[_0x2a3cbc(0x17b)](_0x243f18);}export function isLegacyCompatConfigKey(_0x4cafec){const _0x180a99=a61_0x3d487b;return getConfigFieldSchema(_0x4cafec)?.[_0x180a99(0x18c)]===!![];}function a61_0x47d9(_0x4a3fc5,_0x2ec2c3){_0x4a3fc5=_0x4a3fc5-0x174;const _0xf95c91=a61_0xf95c();let _0x47d9d4=_0xf95c91[_0x4a3fc5];return _0x47d9d4;}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function formatConfigKeyList(_0x56d9ec){return[..._0x56d9ec]['join'](',\x20');}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x580637=a61_0x3d487b;return _0x580637(0x174)+getTopLevelConfigKeySummary()+_0x580637(0x17c);}export function buildAppProfileListFields(_0x155754){return{'env':_0x155754,'hasAccessKey':![],'format':null,'pageSize':null,'riskLevel':null,'locale':null};}
|
package/lib/constant/app.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a62_0x1998(_0x1556af,_0x3f8c34){_0x1556af=_0x1556af-0x6c;const _0x5a683b=a62_0x5a68();let _0x1998bd=_0x5a683b[_0x1556af];return _0x1998bd;}const a62_0x21986c=a62_0x1998;function a62_0x5a68(){const _0x2a16d7=['1140FkESRK','152OWSnDl','120810yNRNHX','45221dVGcjV','65925SPczUV','334594xhsBLS','UNPUBLISH','663adziLk','6648222FslXjb','216kxXQQX','42rmhtQL','2290xkdSyH','12884FKHWJe','13428irolHD'];a62_0x5a68=function(){return _0x2a16d7;};return a62_0x5a68();}(function(_0xaecd8a,_0x56a427){const _0xdeb23e=a62_0x1998,_0x2af5d9=_0xaecd8a();while(!![]){try{const _0x581782=-parseInt(_0xdeb23e(0x6c))/0x1*(parseInt(_0xdeb23e(0x6e))/0x2)+parseInt(_0xdeb23e(0x77))/0x3*(-parseInt(_0xdeb23e(0x6f))/0x4)+parseInt(_0xdeb23e(0x72))/0x5*(parseInt(_0xdeb23e(0x79))/0x6)+-parseInt(_0xdeb23e(0x78))/0x7+parseInt(_0xdeb23e(0x71))/0x8*(parseInt(_0xdeb23e(0x74))/0x9)+parseInt(_0xdeb23e(0x6d))/0xa*(-parseInt(_0xdeb23e(0x73))/0xb)+-parseInt(_0xdeb23e(0x70))/0xc*(-parseInt(_0xdeb23e(0x75))/0xd);if(_0x581782===_0x56a427)break;else _0x2af5d9['push'](_0x2af5d9['shift']());}catch(_0x527c5c){_0x2af5d9['push'](_0x2af5d9['shift']());}}}(a62_0x5a68,0x8665b));export const APP_PUBLISH_STATUS={'Published':'PUBLISHED','Unpublished':a62_0x21986c(0x76)};export const RUNTIME_ACCESSIBLE_APP_STATUS=APP_PUBLISH_STATUS['Published'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a63_0x1ffe5f=a63_0x5250;(function(_0x41f8df,_0x4e9f2b){const _0x45432e=a63_0x5250,_0x51eb04=_0x41f8df();while(!![]){try{const _0x271b8e=-parseInt(_0x45432e(0x86))/0x1*(-parseInt(_0x45432e(0x89))/0x2)+parseInt(_0x45432e(0x7e))/0x3+parseInt(_0x45432e(0x80))/0x4*(-parseInt(_0x45432e(0x87))/0x5)+parseInt(_0x45432e(0x8a))/0x6*(-parseInt(_0x45432e(0x82))/0x7)+-parseInt(_0x45432e(0x88))/0x8+parseInt(_0x45432e(0x8b))/0x9*(-parseInt(_0x45432e(0x83))/0xa)+-parseInt(_0x45432e(0x81))/0xb*(-parseInt(_0x45432e(0x7f))/0xc);if(_0x271b8e===_0x4e9f2b)break;else _0x51eb04['push'](_0x51eb04['shift']());}catch(_0x2caa45){_0x51eb04['push'](_0x51eb04['shift']());}}}(a63_0x28a0,0x5b072));function a63_0x5250(_0x6bee48,_0x273b31){_0x6bee48=_0x6bee48-0x7e;const _0x28a015=a63_0x28a0();let _0x52505b=_0x28a015[_0x6bee48];return _0x52505b;}function a63_0x28a0(){const _0x34397b=['1679988IEgzWO','877509orhVAN','207129ySwiNr','274872MWOrxS','4EqGkQa','649OKHMwi','7JIsGvr','40bimeDo','ClientAk','client-ak','499bYHWYD','1110255qMbWRU','2230776BbrWRx','494bTYaAF'];a63_0x28a0=function(){return _0x34397b;};return a63_0x28a0();}export const AUTH_MODE={'ClientAk':a63_0x1ffe5f(0x85)};export function isAuthMode(_0x1f6a3f){const _0x32a942=a63_0x1ffe5f;return _0x1f6a3f===AUTH_MODE[_0x32a942(0x84)];}
|
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a64_0x2867c6=a64_0x5602;function a64_0xefad(){const _0x29e5af=['verbose','340824GoOMBy','boolean','format','3535992NoUAKi','dry-run','Skip\x20confirmation\x20for\x20high-risk\x20writes','app','json\x20|\x20pretty\x20|\x20compress','Verbose\x20output','clear','1245490ZBegUb','SQL\x20query\x20code','appcode','<expr>','cliDisplayName','<name>','386678SAqxOD','params','1bqHrFW','Force\x20non-interactive\x20mode\x20(CI)','yes','type','28ptqzPX','Show\x20help','non-interactive','fromEntries','meowKey','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20implies\x20--format\x20json\x20when\x20current\x20format\x20is\x20pretty)','production\x20|\x20development\x20|\x20daily','global','Preview\x20operation\x20without\x20executing','Override\x20appcode','sqlcode','string','Select\x20app\x20profile\x20by\x20name','12bBzKmV','Output\x20format','map','env','JSON\x20params\x20for\x20execute\x20commands','Name\x20filter','4203160RRKpWF','name','Use\x20global\x20config\x20scope','Record\x20ID','429892pGfUQb','Clear\x20output','15017640fCGSNT'];a64_0xefad=function(){return _0x29e5af;};return a64_0xefad();}(function(_0x11ed76,_0x1f9bfc){const _0x45db26=a64_0x5602,_0x57290f=_0x11ed76();while(!![]){try{const _0xb8ae01=parseInt(_0x45db26(0x11c))/0x1*(parseInt(_0x45db26(0x11a))/0x2)+-parseInt(_0x45db26(0x12d))/0x3*(parseInt(_0x45db26(0x137))/0x4)+-parseInt(_0x45db26(0x114))/0x5+parseInt(_0x45db26(0x13b))/0x6*(parseInt(_0x45db26(0x120))/0x7)+-parseInt(_0x45db26(0x133))/0x8+-parseInt(_0x45db26(0x10d))/0x9+parseInt(_0x45db26(0x139))/0xa;if(_0xb8ae01===_0x1f9bfc)break;else _0x57290f['push'](_0x57290f['shift']());}catch(_0x5c4ca3){_0x57290f['push'](_0x57290f['shift']());}}}(a64_0xefad,0x4f5b6));import{PRODUCT_CONFIG}from'../constant/product.js';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';export const CLI_BIN_NAME=PRODUCT_CONFIG['cliBinName'];export const CLI_DISPLAY_NAME=PRODUCT_CONFIG[a64_0x2867c6(0x118)];export const NPM_PACKAGE_NAME=LOVRABET_NPM_PACKAGE_NAME;export const GLOBAL_FLAGS=[{'name':a64_0x2867c6(0x116),'meowKey':a64_0x2867c6(0x116),'type':a64_0x2867c6(0x12b),'description':a64_0x2867c6(0x129),'hint':'<code>'},{'name':a64_0x2867c6(0x110),'meowKey':a64_0x2867c6(0x110),'type':a64_0x2867c6(0x12b),'description':a64_0x2867c6(0x12c),'hint':a64_0x2867c6(0x119)},{'name':a64_0x2867c6(0x130),'meowKey':'env','type':a64_0x2867c6(0x12b),'description':'Environment','hint':a64_0x2867c6(0x126)},{'name':'format','meowKey':'format','type':'string','description':a64_0x2867c6(0x12e),'hint':a64_0x2867c6(0x111)},{'name':'jq','meowKey':'jq','type':a64_0x2867c6(0x12b),'description':a64_0x2867c6(0x125),'hint':a64_0x2867c6(0x117)},{'name':a64_0x2867c6(0x10e),'meowKey':'dryRun','type':'boolean','description':a64_0x2867c6(0x128)},{'name':a64_0x2867c6(0x11e),'meowKey':'yes','type':a64_0x2867c6(0x10b),'description':a64_0x2867c6(0x10f)},{'name':a64_0x2867c6(0x122),'meowKey':'nonInteractive','type':'boolean','description':a64_0x2867c6(0x11d)},{'name':a64_0x2867c6(0x127),'meowKey':a64_0x2867c6(0x127),'type':a64_0x2867c6(0x10b),'description':a64_0x2867c6(0x135)},{'name':'ci','meowKey':'ci','type':a64_0x2867c6(0x10b),'description':'Alias\x20for\x20--non-interactive','hidden':!![]},{'name':'help','meowKey':'help','type':a64_0x2867c6(0x10b),'description':a64_0x2867c6(0x121)},{'name':'id','meowKey':'id','type':a64_0x2867c6(0x12b),'description':a64_0x2867c6(0x136),'hidden':!![]},{'name':a64_0x2867c6(0x134),'meowKey':a64_0x2867c6(0x134),'type':a64_0x2867c6(0x12b),'description':a64_0x2867c6(0x132),'hidden':!![]},{'name':a64_0x2867c6(0x12a),'meowKey':a64_0x2867c6(0x12a),'type':a64_0x2867c6(0x12b),'description':a64_0x2867c6(0x115),'hidden':!![]},{'name':'params','meowKey':a64_0x2867c6(0x11b),'type':a64_0x2867c6(0x12b),'description':a64_0x2867c6(0x131),'hidden':!![]},{'name':'verbose','meowKey':a64_0x2867c6(0x13a),'type':a64_0x2867c6(0x10b),'description':a64_0x2867c6(0x112),'hidden':!![]},{'name':a64_0x2867c6(0x113),'meowKey':a64_0x2867c6(0x113),'type':'boolean','description':a64_0x2867c6(0x138),'hidden':!![]}];function a64_0x5602(_0x461155,_0x33f592){_0x461155=_0x461155-0x10b;const _0xefadce=a64_0xefad();let _0x5602ff=_0xefadce[_0x461155];return _0x5602ff;}export const PIPELINE_FLAG_NAMES=new Set([a64_0x2867c6(0x116),a64_0x2867c6(0x110),a64_0x2867c6(0x130),a64_0x2867c6(0x10c),'jq','dry-run',a64_0x2867c6(0x11e),'non-interactive','ci']);export function buildMeowFlags(){const _0x319c50=a64_0x2867c6;return Object[_0x319c50(0x123)](GLOBAL_FLAGS[_0x319c50(0x12f)](_0x42b7de=>[_0x42b7de[_0x319c50(0x124)],{'type':_0x42b7de[_0x319c50(0x11f)]}]));}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a65_0x1f98(){const _0x44fd96=['production','2CGBYHI','write','1135460ifDwCs','54109sblLkI','838584EHfCfB','8RZFCrT','main','3693968NAfGUp','3LJVrek','4870EnJsPN','compress','8239338NdTOfF','11555397gkfeXY','11078977jYAhir'];a65_0x1f98=function(){return _0x44fd96;};return a65_0x1f98();}const a65_0x22e05f=a65_0x19ec;(function(_0x569582,_0x39eaea){const _0x66cebd=a65_0x19ec,_0x32f759=_0x569582();while(!![]){try{const _0x3c0254=-parseInt(_0x66cebd(0x138))/0x1*(-parseInt(_0x66cebd(0x134))/0x2)+parseInt(_0x66cebd(0x13c))/0x3*(parseInt(_0x66cebd(0x13b))/0x4)+-parseInt(_0x66cebd(0x136))/0x5+parseInt(_0x66cebd(0x13f))/0x6+parseInt(_0x66cebd(0x141))/0x7+parseInt(_0x66cebd(0x139))/0x8*(-parseInt(_0x66cebd(0x140))/0x9)+parseInt(_0x66cebd(0x13d))/0xa*(-parseInt(_0x66cebd(0x137))/0xb);if(_0x3c0254===_0x39eaea)break;else _0x32f759['push'](_0x32f759['shift']());}catch(_0x3a3af9){_0x32f759['push'](_0x32f759['shift']());}}}(a65_0x1f98,0xc61a8));export const DEFAULT_APP_PROFILE_NAME=a65_0x22e05f(0x13a);export const DEFAULT_CONFIG_VALUES={'env':a65_0x22e05f(0x142),'format':'compress','locale':'en-US','riskLevel':a65_0x22e05f(0x135)};function a65_0x19ec(_0x4e80e6,_0x4e74d2){_0x4e80e6=_0x4e80e6-0x134;const _0x1f98b5=a65_0x1f98();let _0x19ecd9=_0x1f98b5[_0x4e80e6];return _0x19ecd9;}export const DEFAULT_COMMAND_OUTPUT_FORMAT=a65_0x22e05f(0x13e);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a66_0x14c108=a66_0x1a9b;function a66_0x4d27(){const _0x39c230=['5098962iitAAc','80412ClbqNV','13138600FipJDZ','skillSource','6396415Lutnje','52xMHjlt','42yfcSVh','7vTOWmk','npmPackageName','6311350aasQQK','42297717qskBRi','9ZgkyWX','52609HJZOOO'];a66_0x4d27=function(){return _0x39c230;};return a66_0x4d27();}function a66_0x1a9b(_0x37d1ba,_0x37e584){_0x37d1ba=_0x37d1ba-0x168;const _0x4d2707=a66_0x4d27();let _0x1a9bfc=_0x4d2707[_0x37d1ba];return _0x1a9bfc;}(function(_0x1ac04c,_0x23120b){const _0x226f47=a66_0x1a9b,_0x787a49=_0x1ac04c();while(!![]){try{const _0xb76ee0=parseInt(_0x226f47(0x16e))/0x1*(-parseInt(_0x226f47(0x168))/0x2)+parseInt(_0x226f47(0x170))/0x3*(-parseInt(_0x226f47(0x174))/0x4)+-parseInt(_0x226f47(0x173))/0x5+parseInt(_0x226f47(0x16f))/0x6*(parseInt(_0x226f47(0x169))/0x7)+-parseInt(_0x226f47(0x171))/0x8+-parseInt(_0x226f47(0x16d))/0x9*(-parseInt(_0x226f47(0x16b))/0xa)+parseInt(_0x226f47(0x16c))/0xb;if(_0xb76ee0===_0x23120b)break;else _0x787a49['push'](_0x787a49['shift']());}catch(_0x3c0439){_0x787a49['push'](_0x787a49['shift']());}}}(a66_0x4d27,0xe8440));import{PRODUCT_CONFIG}from'../constant/product.js';export const LOVRABET_NPM_PACKAGE_NAME=PRODUCT_CONFIG[a66_0x14c108(0x16a)];export const LOVRABET_SKILL_SOURCE=PRODUCT_CONFIG[a66_0x14c108(0x172)];export const NPM_REGISTRY_BASE_URL=PRODUCT_CONFIG['npmRegistryBaseUrl'];
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a67_0x337b(_0x15e7e4,_0x215d3c){_0x15e7e4=_0x15e7e4-0x144;const _0xd4218f=a67_0xd421();let _0x337b17=_0xd4218f[_0x15e7e4];return _0x337b17;}const a67_0x1ce712=a67_0x337b;function a67_0xd421(){const _0x26fdc3=['user','1314344OUyQWN','373518xjSbJf','721324afYgJK','domains','25GGzPZA','skillHubDomain','runtime','skillhub','apiDomain','nonProduction','462auAFMe','119602QWqBha','api','328926EOQviK','3000453THPVMo','production','runtimeDomain','54tWtSGp','7613530trFphO'];a67_0xd421=function(){return _0x26fdc3;};return a67_0xd421();}(function(_0x5406bb,_0x1476ce){const _0x4fc42d=a67_0x337b,_0x547279=_0x5406bb();while(!![]){try{const _0x223ba0=-parseInt(_0x4fc42d(0x14c))/0x1+-parseInt(_0x4fc42d(0x154))/0x2+parseInt(_0x4fc42d(0x14d))/0x3+parseInt(_0x4fc42d(0x155))/0x4*(-parseInt(_0x4fc42d(0x157))/0x5)+parseInt(_0x4fc42d(0x149))/0x6*(parseInt(_0x4fc42d(0x14a))/0x7)+parseInt(_0x4fc42d(0x153))/0x8*(-parseInt(_0x4fc42d(0x150))/0x9)+parseInt(_0x4fc42d(0x151))/0xa;if(_0x223ba0===_0x1476ce)break;else _0x547279['push'](_0x547279['shift']());}catch(_0x2878be){_0x547279['push'](_0x547279['shift']());}}}(a67_0xd421,0xa48ec));import{getEnv,isProduction}from'../constant/env.js';import{PRODUCT_CONFIG}from'../constant/product.js';let customApiDomain,customUserDomain,customRuntimeDomain,customSkillHubDomain;export function initDomains(_0x13b729){const _0xfbb471=a67_0x337b;customApiDomain=_0x13b729?.[_0xfbb471(0x147)],customUserDomain=_0x13b729?.['userDomain'],customRuntimeDomain=_0x13b729?.[_0xfbb471(0x14f)],customSkillHubDomain=_0x13b729?.[_0xfbb471(0x144)];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a67_0x1ce712(0x156)]['production'][a67_0x1ce712(0x152)]:PRODUCT_CONFIG[a67_0x1ce712(0x156)]['nonProduction'][a67_0x1ce712(0x152)]);export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a67_0x1ce712(0x156)][a67_0x1ce712(0x14e)][a67_0x1ce712(0x14b)]:PRODUCT_CONFIG[a67_0x1ce712(0x156)]['nonProduction'][a67_0x1ce712(0x14b)]);export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?PRODUCT_CONFIG['domains'][a67_0x1ce712(0x14e)][a67_0x1ce712(0x145)]:PRODUCT_CONFIG['domains'][a67_0x1ce712(0x148)][a67_0x1ce712(0x145)]);export const getSkillHubDomain=()=>customSkillHubDomain||(isProduction(getEnv())?PRODUCT_CONFIG['domains'][a67_0x1ce712(0x14e)][a67_0x1ce712(0x146)]:PRODUCT_CONFIG['domains'][a67_0x1ce712(0x148)][a67_0x1ce712(0x146)]);
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a68_0x1a09b4=a68_0x4e40;(function(_0x181442,_0x42944a){const _0x279a4c=a68_0x4e40,_0x58fe6f=_0x181442();while(!![]){try{const _0x1e8c74=-parseInt(_0x279a4c(0x121))/0x1+parseInt(_0x279a4c(0x11b))/0x2+parseInt(_0x279a4c(0x11f))/0x3+parseInt(_0x279a4c(0x11a))/0x4*(-parseInt(_0x279a4c(0x122))/0x5)+parseInt(_0x279a4c(0x11e))/0x6*(parseInt(_0x279a4c(0x11d))/0x7)+-parseInt(_0x279a4c(0x120))/0x8+-parseInt(_0x279a4c(0x116))/0x9*(parseInt(_0x279a4c(0x119))/0xa);if(_0x1e8c74===_0x42944a)break;else _0x58fe6f['push'](_0x58fe6f['shift']());}catch(_0x2d11c5){_0x58fe6f['push'](_0x58fe6f['shift']());}}}(a68_0x28a3,0xe8258));import{productEnv}from'../constant/product.js';function a68_0x4e40(_0x3ff4b2,_0x4185ab){_0x3ff4b2=_0x3ff4b2-0x113;const _0x28a357=a68_0x28a3();let _0x4e40cc=_0x28a357[_0x3ff4b2];return _0x4e40cc;}export const RUNTIME_ENV_VALUES=['production','development',a68_0x1a09b4(0x114)];export function normalizeEnv(_0x329ae6){const _0x4842b1=a68_0x1a09b4;return _0x329ae6===_0x4842b1(0x115)?_0x4842b1(0x118):_0x329ae6;}export function isProduction(_0x2cec33){const _0x584c07=a68_0x1a09b4;return normalizeEnv(_0x2cec33)===_0x584c07(0x118);}export function isDaily(_0x19881){const _0x5626be=a68_0x1a09b4;return normalizeEnv(_0x19881)===_0x5626be(0x114);}export function isDev(_0x522876){const _0x3cac17=a68_0x1a09b4,_0x4e132a=normalizeEnv(_0x522876);return _0x4e132a===_0x3cac17(0x11c)||_0x4e132a===_0x3cac17(0x117);}let env=normalizeEnv(productEnv(a68_0x1a09b4(0x113))||a68_0x1a09b4(0x118));export function getEnv(){return env;}function a68_0x28a3(){const _0x3aafc4=['802646gcpDsX','3436170XwYHeP','ENV','daily','online','234mDvBmW','dev','production','300470gZBOWg','4jBvOnp','1566432vUsxzO','development','6422227AcYpkg','6uNqbRx','4883406uHchKT','852040QGVLtP'];a68_0x28a3=function(){return _0x3aafc4;};return a68_0x28a3();}export function initEnv(_0x2e7049){env=normalizeEnv(_0x2e7049);}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a69_0x2042(){const _0x2eee1d=['1508740HNErWz','json','222130tIgPju','1324074XPrXCA','1754712IdVrJg','13920KIvhVO','1862336nHSneu','56657kQTHTG','1875BlHRDk','4FMWjLD','855pugmPo'];a69_0x2042=function(){return _0x2eee1d;};return a69_0x2042();}const a69_0x52f5af=a69_0x4eea;(function(_0x1213a3,_0x5195c4){const _0x4ba481=a69_0x4eea,_0x53a178=_0x1213a3();while(!![]){try{const _0xdc1845=parseInt(_0x4ba481(0xc9))/0x1+parseInt(_0x4ba481(0xcd))/0x2+parseInt(_0x4ba481(0xd0))/0x3*(parseInt(_0x4ba481(0xcb))/0x4)+parseInt(_0x4ba481(0xca))/0x5*(parseInt(_0x4ba481(0xc7))/0x6)+parseInt(_0x4ba481(0xc8))/0x7+parseInt(_0x4ba481(0xd1))/0x8+-parseInt(_0x4ba481(0xcc))/0x9*(parseInt(_0x4ba481(0xcf))/0xa);if(_0xdc1845===_0x5195c4)break;else _0x53a178['push'](_0x53a178['shift']());}catch(_0x534524){_0x53a178['push'](_0x53a178['shift']());}}}(a69_0x2042,0x79781));function a69_0x4eea(_0x4378a0,_0x541d86){_0x4378a0=_0x4378a0-0xc7;const _0x204248=a69_0x2042();let _0x4eea9d=_0x204248[_0x4378a0];return _0x4eea9d;}export const OUTPUT_FORMAT_VALUES=[a69_0x52f5af(0xce),'pretty','compress'];
|
package/lib/constant/product.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a70_0x1cd8(_0x50912f,_0xe1b8bd){_0x50912f=_0x50912f-0xdd;const _0x53e270=a70_0x53e2();let _0x1cd85e=_0x53e270[_0x50912f];return _0x1cd85e;}const a70_0x360ab7=a70_0x1cd8;(function(_0x353b6a,_0x5da892){const _0x55bbe1=a70_0x1cd8,_0x575ffa=_0x353b6a();while(!![]){try{const _0x196a44=-parseInt(_0x55bbe1(0xe0))/0x1*(-parseInt(_0x55bbe1(0xf4))/0x2)+parseInt(_0x55bbe1(0xeb))/0x3*(parseInt(_0x55bbe1(0xde))/0x4)+parseInt(_0x55bbe1(0xe7))/0x5*(-parseInt(_0x55bbe1(0xf1))/0x6)+-parseInt(_0x55bbe1(0xdd))/0x7+parseInt(_0x55bbe1(0xe6))/0x8*(-parseInt(_0x55bbe1(0xfb))/0x9)+parseInt(_0x55bbe1(0xf8))/0xa+parseInt(_0x55bbe1(0xe9))/0xb*(parseInt(_0x55bbe1(0xee))/0xc);if(_0x196a44===_0x5da892)break;else _0x575ffa['push'](_0x575ffa['shift']());}catch(_0x469fd2){_0x575ffa['push'](_0x575ffa['shift']());}}}(a70_0x53e2,0x2c49e));export const PRODUCT_CONFIG={'cliBinName':'lovrabet','cliDisplayName':a70_0x360ab7(0xfa),'npmPackageName':a70_0x360ab7(0xf5),'skillSource':a70_0x360ab7(0xe2),'npmRegistryBaseUrl':a70_0x360ab7(0xef),'envPrefix':a70_0x360ab7(0xe5),'legacyEnvPrefixes':['RABETBASE'],'configFileNames':[a70_0x360ab7(0xec),a70_0x360ab7(0xf3)],'newConfigFileName':a70_0x360ab7(0xec),'homeDirName':'.lovrabet','logFileName':a70_0x360ab7(0xf7),'invokeSource':a70_0x360ab7(0xf9),'userCenterDisplayName':'Lovrabet\x20User\x20Center','skipNpxSkillsEnvSuffix':a70_0x360ab7(0xdf),'domains':{'production':{'user':a70_0x360ab7(0xe4),'api':a70_0x360ab7(0xf6),'runtime':a70_0x360ab7(0xed),'skillhub':a70_0x360ab7(0xe8)},'nonProduction':{'user':'https://user-daily.lovrabet.com','api':'https://daily-api.lovrabet.com','runtime':a70_0x360ab7(0xea),'skillhub':a70_0x360ab7(0xe1)}},'accessKeyCreatePath':a70_0x360ab7(0xf2)};export function productEnvName(_0x488075){return PRODUCT_CONFIG['envPrefix']+'_'+_0x488075;}function a70_0x53e2(){const _0x8c0985=['https://runtime.lovrabet.com','1170768EaBtAm','https://registry.npmjs.org','map','33642NApYMT','/user/ak','.lovrabetrc','4jpTtHA','@lovrabet/lovrabet-cli','https://api.lovrabet.com','.lovrabet-runtime.log','395970YaRzmb','cli:lovrabet-runtime','Lovrabet\x20Runtime\x20CLI','9BGDlkP','1026879iBHzwM','1296448RldBxU','SKIP_NPX_SKILLS','84979JeAArm','https://skills-daily.lovrabet.com','lovrabet/lovrabet-cli','legacyEnvPrefixes','https://user.lovrabet.com','LOVRABET','1752184LLUYKg','75kyUQrA','https://skills.lovrabet.com','11NMhXUv','https://daily-runtime.lovrabet.com','3YvcgdJ','.lovrabet.json'];a70_0x53e2=function(){return _0x8c0985;};return a70_0x53e2();}export function productEnvNames(_0x4c8d36){const _0x1f4dd9=a70_0x360ab7;return[productEnvName(_0x4c8d36),...PRODUCT_CONFIG[_0x1f4dd9(0xe3)][_0x1f4dd9(0xf0)](_0x13d417=>_0x13d417+'_'+_0x4c8d36)];}export function productEnv(_0x1f6ad7){for(const _0x594bcb of productEnvNames(_0x1f6ad7)){const _0x326600=process.env[_0x594bcb];if(_0x326600!==undefined)return _0x326600;}return undefined;}
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a71_0x468e56=a71_0x21fe;(function(_0x451598,_0xabcde3){const _0x2eb2c5=a71_0x21fe,_0x33e1a0=_0x451598();while(!![]){try{const _0xfdfa93=parseInt(_0x2eb2c5(0x135))/0x1*(parseInt(_0x2eb2c5(0x132))/0x2)+parseInt(_0x2eb2c5(0x131))/0x3*(parseInt(_0x2eb2c5(0x136))/0x4)+parseInt(_0x2eb2c5(0x137))/0x5+-parseInt(_0x2eb2c5(0x138))/0x6+parseInt(_0x2eb2c5(0x13a))/0x7+parseInt(_0x2eb2c5(0x133))/0x8+-parseInt(_0x2eb2c5(0x13b))/0x9;if(_0xfdfa93===_0xabcde3)break;else _0x33e1a0['push'](_0x33e1a0['shift']());}catch(_0x5ac705){_0x33e1a0['push'](_0x33e1a0['shift']());}}}(a71_0x4a9d,0x96795));function a71_0x21fe(_0xd8f1e9,_0xba7227){_0xd8f1e9=_0xd8f1e9-0x130;const _0x4a9db2=a71_0x4a9d();let _0x21fe3a=_0x4a9db2[_0xd8f1e9];return _0x21fe3a;}function a71_0x4a9d(){const _0x133dca=['18414891vSjqdw','write','3LpPwwc','2GEFQlt','7079424PeBorx','read','1090493uigzbJ','3040436spWyqE','1455660rcNdMl','6772086aagaUj','high-risk-write','5351213fZjukG'];a71_0x4a9d=function(){return _0x133dca;};return a71_0x4a9d();}export const RISK_LEVEL_VALUES=[a71_0x468e56(0x134),a71_0x468e56(0x130),a71_0x468e56(0x139)];
|
package/lib/constant/url.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a72_0x40e9(){const _0x4f78d4=['8gsscll','2565048XtZiGe','1239714zWKKkj','651849BiePHw','production','10901862osFwum','4036753Iettqt','114740MwbNzm','1366110ZkVnuN','5rdzigf','domains'];a72_0x40e9=function(){return _0x4f78d4;};return a72_0x40e9();}const a72_0x47bc6c=a72_0x42f5;(function(_0x76279b,_0x422840){const _0x29698e=a72_0x42f5,_0xe45f39=_0x76279b();while(!![]){try{const _0x5af61d=parseInt(_0x29698e(0xe2))/0x1+parseInt(_0x29698e(0xe6))/0x2+-parseInt(_0x29698e(0xe1))/0x3+parseInt(_0x29698e(0xe0))/0x4*(parseInt(_0x29698e(0xe8))/0x5)+parseInt(_0x29698e(0xe7))/0x6+-parseInt(_0x29698e(0xe5))/0x7*(-parseInt(_0x29698e(0xdf))/0x8)+-parseInt(_0x29698e(0xe4))/0x9;if(_0x5af61d===_0x422840)break;else _0xe45f39['push'](_0xe45f39['shift']());}catch(_0x3a1e6e){_0xe45f39['push'](_0xe45f39['shift']());}}}(a72_0x40e9,0x81771));import{PRODUCT_CONFIG}from'../constant/product.js';function a72_0x42f5(_0x2d9e0c,_0x559353){_0x2d9e0c=_0x2d9e0c-0xdf;const _0x40e920=a72_0x40e9();let _0x42f5b5=_0x40e920[_0x2d9e0c];return _0x42f5b5;}export const USER_ACCESS_KEY_CREATE_URL=''+PRODUCT_CONFIG[a72_0x47bc6c(0xe9)][a72_0x47bc6c(0xe3)]['user']+PRODUCT_CONFIG['accessKeyCreatePath'];
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a73_0x4f8a99=a73_0x26be;(function(_0x2bc69d,_0x38ed72){const _0x280c85=a73_0x26be,_0x32d05e=_0x2bc69d();while(!![]){try{const _0x2eb967=-parseInt(_0x280c85(0xca))/0x1+parseInt(_0x280c85(0xe9))/0x2*(-parseInt(_0x280c85(0xe8))/0x3)+parseInt(_0x280c85(0xe6))/0x4+-parseInt(_0x280c85(0xcb))/0x5*(-parseInt(_0x280c85(0xb2))/0x6)+-parseInt(_0x280c85(0xbe))/0x7+-parseInt(_0x280c85(0xea))/0x8+parseInt(_0x280c85(0xa4))/0x9;if(_0x2eb967===_0x38ed72)break;else _0x32d05e['push'](_0x32d05e['shift']());}catch(_0x4d15b3){_0x32d05e['push'](_0x32d05e['shift']());}}}(a73_0xdf89,0xcdc70));import{readFileSync,existsSync,mkdirSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{homedir}from'node:os';import{logger}from'./utils/logger.js';import{CliErrors}from'./errors.js';import{CLI_BIN_NAME}from'./constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvNames}from'./constant/product.js';import{DEFAULT_CONFIG_VALUES}from'./constant/defaults.js';import{normalizeEnv,isDaily,isDev}from'./constant/env.js';import{normalizeLegacyOutputFormat}from'./framework/types.js';import{resolveCachedAppCode}from'./commands/app/cache.js';export{AUTH_MODE,isAuthMode}from'./constant/auth-mode.js';const CONFIG_NAMES=PRODUCT_CONFIG[a73_0x4f8a99(0xbb)];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a73_0x4f8a99(0xba)];function resolveConfigPath(_0xfa3d3f){for(const _0x19c64e of CONFIG_NAMES){const _0x506ca3=resolve(_0xfa3d3f,_0x19c64e);if(existsSync(_0x506ca3))return _0x506ca3;}return undefined;}export function resolveWriteConfigPath(_0x3462e2){const _0x122a47=a73_0x4f8a99,_0x1a4e02=_0x3462e2===_0x122a47(0xb7)?process[_0x122a47(0xe4)]():homedir(),_0x457e72=resolveConfigPath(_0x1a4e02);return _0x457e72??resolve(_0x1a4e02,NEW_CONFIG_NAME);}export function readConfigFile(_0x29e908){const _0x476371=a73_0x4f8a99;try{if(existsSync(_0x29e908)){const _0x1f8c72=readFileSync(_0x29e908,{'encoding':_0x476371(0xbd)});if(_0x1f8c72){const _0xe5ade8=JSON[_0x476371(0xb9)](_0x1f8c72);return migrateOnlineEnv(_0x29e908,_0xe5ade8),_0xe5ade8;}}}catch{}return{};}function migrateOnlineEnv(_0x49784c,_0x3fbf48){const _0x3aa547=a73_0x4f8a99;let _0x43a48a=![];_0x3fbf48[_0x3aa547(0xc5)]===_0x3aa547(0xdb)&&(_0x3fbf48[_0x3aa547(0xc5)]=_0x3aa547(0xda),_0x43a48a=!![]);if(_0x3fbf48['apps']&&typeof _0x3fbf48[_0x3aa547(0xcf)]===_0x3aa547(0xd2))for(const _0x882e53 of Object[_0x3aa547(0xb4)](_0x3fbf48[_0x3aa547(0xcf)])){_0x882e53&&_0x882e53[_0x3aa547(0xc5)]==='online'&&(_0x882e53[_0x3aa547(0xc5)]=_0x3aa547(0xda),_0x43a48a=!![]);}if(_0x43a48a)try{writeConfigFile(_0x49784c,_0x3fbf48);}catch{}}export function writeConfigFile(_0x2e1514,_0x3a7180){const _0x14fd38=a73_0x4f8a99,_0x32c31e=dirname(_0x2e1514);!existsSync(_0x32c31e)&&mkdirSync(_0x32c31e,{'recursive':!![]});const _0x17c971=_0x2e1514+'.tmp';try{writeFileSync(_0x17c971,JSON[_0x14fd38(0xdd)](_0x3a7180,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180});try{renameSync(_0x17c971,_0x2e1514);}catch(_0xca821e){if(_0xca821e['code']===_0x14fd38(0xe0)||_0xca821e['code']===_0x14fd38(0xc9)||_0xca821e[_0x14fd38(0xe1)]===_0x14fd38(0xaa)){writeFileSync(_0x2e1514,JSON['stringify'](_0x3a7180,null,0x2)+'\x0a',{'encoding':_0x14fd38(0xbd)});try{unlinkSync(_0x17c971);}catch{}}else throw _0xca821e;}}catch(_0x3c1df4){try{unlinkSync(_0x17c971);}catch{}throw _0x3c1df4;}}export function isNonInteractiveMode(_0x11e295){const _0x58d399=a73_0x4f8a99;return!!(_0x11e295[_0x58d399(0xaf)]||_0x11e295['ci']||productEnvNames('CI')[_0x58d399(0xae)](_0x1e4bb4=>process.env[_0x1e4bb4]===_0x58d399(0xe2))||process.env.CI===_0x58d399(0xe2)||!process['stdout'][_0x58d399(0xd6)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0xf5bc64=a73_0x4f8a99;if(!process[_0xf5bc64(0xc0)][_0xf5bc64(0xd6)])return![];try{const _0x1439f7=process[_0xf5bc64(0xc0)]['isRaw'];return process[_0xf5bc64(0xc0)][_0xf5bc64(0xc7)](!![]),process[_0xf5bc64(0xc0)][_0xf5bc64(0xc7)](_0x1439f7??![]),!![];}catch{return![];}}export async function createContext(_0x143958){const _0x2d9082=a73_0x4f8a99,_0x58c9a4=readRawConfig(),_0x1b17d2=buildConfig(_0x58c9a4,_0x143958);await initGlobalEnvironment(_0x1b17d2);const {getUserDomain:_0x1dd3e6,getApiDomain:_0x923ce2}=await import('./constant/domain.js'),_0x5c5d36={'apiDomain':_0x923ce2(),'userDomain':_0x1dd3e6()},_0x4b9881=await buildAuth(_0x1b17d2);logger['setLogPath'](process['cwd']());const _0x4eef44=(CLI_BIN_NAME+'\x20'+process[_0x2d9082(0xc6)][_0x2d9082(0xa9)](0x2)['join']('\x20'))[_0x2d9082(0xce)]();logger[_0x2d9082(0xec)](_0x4eef44);const _0x37fa3c=isNonInteractiveMode(_0x143958);return{'config':_0x1b17d2,'auth':_0x4b9881,'logger':logger,'env':_0x5c5d36,'nonInteractive':_0x37fa3c};}export function buildConfigFromFlags(_0x11685f){return buildConfig(readRawConfig(),_0x11685f);}function a73_0x26be(_0x2fa8a8,_0x220507){_0x2fa8a8=_0x2fa8a8-0xa4;const _0xdf895a=a73_0xdf89();let _0x26be2e=_0xdf895a[_0x2fa8a8];return _0x26be2e;}export function getLocalAppAliases(_0x2b27ec){const _0x922ba8=a73_0x4f8a99;return _0x2b27ec[_0x922ba8(0xcf)]&&typeof _0x2b27ec[_0x922ba8(0xcf)]===_0x922ba8(0xd2)?_0x2b27ec['apps']:{};}export function resolveLocalAppAliasCode(_0x1ed7ea,_0x29b909){const _0x3d2c68=a73_0x4f8a99;if(!_0x29b909)return undefined;const _0x34682d=getLocalAppAliases(_0x1ed7ea)[_0x29b909],_0x573ab3=_0x34682d?.[_0x3d2c68(0xc3)];return typeof _0x573ab3===_0x3d2c68(0xc4)&&_0x573ab3[_0x3d2c68(0xce)]()?_0x573ab3[_0x3d2c68(0xce)]():undefined;}export function readAppCodeFromConfig(){const _0x13bdd4=a73_0x4f8a99,_0x353765=readRawConfig(),_0x2b02b0=_0x353765['appcode']??_0x353765[_0x13bdd4(0xa8)];if(typeof _0x2b02b0==='string'&&_0x2b02b0[_0x13bdd4(0xce)]())return _0x2b02b0[_0x13bdd4(0xce)]();const _0x2db188=resolveLocalAppAliasCode(_0x353765,typeof _0x353765[_0x13bdd4(0xab)]===_0x13bdd4(0xc4)?_0x353765['defaultApp']:undefined);if(_0x2db188)return _0x2db188;const _0x4c13c2=normalizeEnv(String(_0x353765[_0x13bdd4(0xc5)]||_0x13bdd4(0xda))),_0x36714b=isDaily(_0x4c13c2)?_0x13bdd4(0xd9):isDev(_0x4c13c2)?_0x13bdd4(0xd5):_0x13bdd4(0xda),_0x48c35b=resolveCachedAppCode(typeof _0x353765[_0x13bdd4(0xab)]===_0x13bdd4(0xc4)?_0x353765[_0x13bdd4(0xab)]:undefined,_0x36714b,typeof _0x353765['accessKey']===_0x13bdd4(0xc4)?_0x353765[_0x13bdd4(0xc2)]:undefined);if(_0x48c35b)return _0x48c35b;const _0x157701=Object['values'](getLocalAppAliases(_0x353765))['find'](_0x4bf586=>_0x4bf586?.[_0x13bdd4(0xc3)]);return typeof _0x157701?.[_0x13bdd4(0xc3)]===_0x13bdd4(0xc4)&&_0x157701[_0x13bdd4(0xc3)][_0x13bdd4(0xce)]()?_0x157701[_0x13bdd4(0xc3)][_0x13bdd4(0xce)]():undefined;}export function readScopedConfig(_0x48174f){const _0x2123e9=a73_0x4f8a99,_0xfb0bb2=_0x48174f[_0x2123e9(0xb1)]?_0x2123e9(0xb1):_0x2123e9(0xb7);return readConfigFile(resolveWriteConfigPath(_0xfb0bb2));}export function writeScopedConfig(_0x2d046c,_0x2528a4){const _0x6e317=a73_0x4f8a99,_0x16e3cd=_0x2528a4[_0x6e317(0xb1)]?_0x6e317(0xb1):_0x6e317(0xb7);writeConfigFile(resolveWriteConfigPath(_0x16e3cd),_0x2d046c);}export async function initGlobalEnvironment(_0x15cd21){const _0x1185c1=a73_0x4f8a99,{initEnv:_0x1bfb12}=await import(_0x1185c1(0xb3));_0x1bfb12(_0x15cd21[_0x1185c1(0xc5)]);const {initDomains:_0x355aee}=await import(_0x1185c1(0xde));_0x355aee({'apiDomain':_0x15cd21[_0x1185c1(0xd0)][_0x1185c1(0xad)]||_0x15cd21['raw'][_0x1185c1(0xdc)]||undefined,'userDomain':_0x15cd21['raw'][_0x1185c1(0xd4)]||undefined,'runtimeDomain':_0x15cd21['raw'][_0x1185c1(0xa6)]||undefined,'skillHubDomain':_0x15cd21[_0x1185c1(0xd0)][_0x1185c1(0xc1)]||undefined});}export function getProjectConfigPath(){const _0x365c45=a73_0x4f8a99;return resolveConfigPath(process[_0x365c45(0xe4)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x4c9b5d){const _0x2a2040=a73_0x4f8a99;if(!existsSync(_0x4c9b5d))return{'status':'missing'};try{const _0xb44092=readFileSync(_0x4c9b5d,{'encoding':'utf8'});if(!_0xb44092?.['trim']())return{'status':'empty'};const _0x40a774=JSON[_0x2a2040(0xb9)](_0xb44092);return{'status':'ok','data':_0x40a774};}catch(_0x422fdd){return{'status':'error','message':_0x422fdd instanceof Error?_0x422fdd[_0x2a2040(0xcc)]:String(_0x422fdd)};}}export function loadRawConfigLayers(_0x1be8dc){const _0x876a01=a73_0x4f8a99;let _0x3504d7={},_0x53812e={},_0x576112,_0x2921c1;try{_0x576112=resolveConfigPath(homedir());if(_0x576112){const _0xb046de=readFileSync(_0x576112,{'encoding':_0x876a01(0xbd)});if(_0xb046de)_0x3504d7=JSON['parse'](_0xb046de);}}catch{}try{const _0x4fb17d=_0x1be8dc||process[_0x876a01(0xe4)]();_0x2921c1=resolveConfigPath(_0x4fb17d);if(_0x2921c1){const _0x5551fe=readFileSync(_0x2921c1,{'encoding':_0x876a01(0xbd)});if(_0x5551fe)_0x53812e=JSON['parse'](_0x5551fe);}}catch{}return{'globalPath':_0x576112,'projectPath':_0x2921c1,'globalConfig':_0x3504d7,'projectConfig':_0x53812e};}function mergeRawConfigLayers(_0x13faf7){const _0x2922eb=a73_0x4f8a99,{globalConfig:_0x419686,projectConfig:_0x160f23}=_0x13faf7;if(_0x160f23[_0x2922eb(0xb0)]===![]){const _0x406f06={..._0x160f23};return delete _0x406f06['inherit'],_0x406f06;}const _0x52c72d={..._0x419686,..._0x160f23};if(_0x2922eb(0xab)in _0x160f23)_0x52c72d['defaultApp']=_0x160f23[_0x2922eb(0xab)];else _0x419686[_0x2922eb(0xab)]&&(_0x52c72d[_0x2922eb(0xab)]=_0x419686[_0x2922eb(0xab)]);return _0x52c72d;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x1c876e){return mergeRawConfigLayers(loadRawConfigLayers(_0x1c876e));}export function readRawConfigWithLayers(_0x11a2aa){const _0x2af72d=loadRawConfigLayers(_0x11a2aa);return{'config':mergeRawConfigLayers(_0x2af72d),'layers':_0x2af72d};}export function resolveDefaultAppSource(_0x438adc){const _0x316abf=a73_0x4f8a99;if(_0x316abf(0xab)in _0x438adc[_0x316abf(0xdf)])return _0x316abf(0xb7);if(_0x438adc[_0x316abf(0xdf)][_0x316abf(0xb0)]===![])return null;if(_0x438adc[_0x316abf(0xbf)][_0x316abf(0xab)])return _0x316abf(0xb1);return null;}function buildConfig(_0x25ab75,_0x34bc97){const _0x1f097a=a73_0x4f8a99,_0x3261b4=_0x25ab75[_0x1f097a(0xab)]||undefined,_0x178371=_0x34bc97[_0x1f097a(0xa8)]||env(_0x1f097a(0xe7))||undefined,_0x463cc2=_0x178371||_0x3261b4||undefined,_0x2cb03f=env(_0x1f097a(0xcd))||_0x25ab75[_0x1f097a(0xc2)]||undefined,_0x49c359=_0x34bc97['env']||env(_0x1f097a(0xc8))||_0x25ab75[_0x1f097a(0xc5)]||DEFAULT_CONFIG_VALUES[_0x1f097a(0xc5)],_0x89cbae=normalizeEnv(String(_0x49c359)),_0x38d2a6=isDaily(_0x89cbae)?_0x1f097a(0xd9):isDev(_0x89cbae)?'development':_0x1f097a(0xda),_0x11e005=typeof _0x34bc97[_0x1f097a(0xc3)]===_0x1f097a(0xc4)?_0x34bc97[_0x1f097a(0xc3)]:undefined,_0x2863ab=env(_0x1f097a(0xe3)),_0x319263=_0x178371?undefined:_0x25ab75[_0x1f097a(0xc3)]||_0x25ab75[_0x1f097a(0xa8)]||undefined,_0x252a59=_0x178371||(_0x319263?undefined:_0x3261b4),_0x3b29ba=resolveLocalAppAliasCode(_0x25ab75,_0x252a59),_0x1e22c1=resolveCachedAppCode(_0x252a59,_0x38d2a6,_0x2cb03f),_0xe4147f=_0x11e005||_0x2863ab||_0x319263||_0x3b29ba||_0x1e22c1||undefined,_0x2008de=_0x11e005?_0x1f097a(0xa5):_0x2863ab?_0x1f097a(0xc5):_0x319263?_0x1f097a(0xa7):_0x3b29ba?_0x1f097a(0xeb):_0x1e22c1?_0x1f097a(0xd8):undefined,_0x4f26f8=_0x25ab75[_0x1f097a(0xd3)]||DEFAULT_CONFIG_VALUES['locale'],_0x4a7f09=undefined,_0x11bdc8=_0x34bc97[_0x1f097a(0xd1)]||env('FORMAT')||_0x25ab75['format'],_0x205513=normalizeLegacyOutputFormat(_0x11bdc8),_0x157a27=env(_0x1f097a(0xbc))||_0x25ab75[_0x1f097a(0xb6)],_0x2b7e65=_0x157a27?Number(_0x157a27)||undefined:undefined,_0x380702=_0x25ab75[_0x1f097a(0xe5)]||_0x25ab75[_0x1f097a(0xb8)],_0x35d9f6=_0x380702===_0x1f097a(0xb5)||_0x380702===_0x1f097a(0xd7)||_0x380702==='high-risk-write'?_0x380702:DEFAULT_CONFIG_VALUES[_0x1f097a(0xe5)],_0x4c801b=env(_0x1f097a(0xed)),_0x477949=_0x4c801b==='1'||_0x4c801b===_0x1f097a(0xe2);return{'appCode':typeof _0xe4147f==='string'&&_0xe4147f[_0x1f097a(0xce)]()?_0xe4147f[_0x1f097a(0xce)]():undefined,'appCodeSource':_0x2008de,'env':_0x38d2a6,'locale':_0x4f26f8,'cookie':_0x4a7f09,'accessKey':_0x2cb03f,'format':_0x205513,'pageSize':_0x2b7e65,'riskLevel':_0x35d9f6,'verbose':_0x477949,'defaultApp':_0x3261b4,'currentApp':typeof _0x463cc2===_0x1f097a(0xc4)?_0x463cc2:undefined,'raw':_0x25ab75};}function env(_0x408ab3){return productEnv(_0x408ab3);}async function buildAuth(_0x5be3e0){const _0x3780b2=a73_0x4f8a99,_0x55beaf='',_0xff193f=!!_0x5be3e0[_0x3780b2(0xc2)];return{'cookie':_0x55beaf,'isLoggedIn':_0xff193f,async 'getOrLogin'(){const _0x3296d8=_0x3780b2;if(_0xff193f)return _0x55beaf;throw CliErrors[_0x3296d8(0xac)]();}};}function a73_0xdf89(){const _0x5a8ac1=['./constant/env.js','values','read','pageSize','project','maxRisk','parse','newConfigFileName','configFileNames','PAGE_SIZE','utf8','7408786olfutb','globalConfig','stdin','skillHubDomain','accessKey','appcode','string','env','argv','setRawMode','ENV','EXDEV','628233phGRvj','5EXYDFv','message','ACCESS_KEY','trim','apps','raw','format','object','locale','userDomain','development','isTTY','write','cache','daily','production','online','host','stringify','./constant/domain.js','projectConfig','EPERM','code','true','APPCODE','cwd','riskLevel','714092gzoKgJ','APP','3161244bGcCLz','2qAnWBt','12892792fbdCvd','local-alias','setRawCommand','VERBOSE','44101089CSqEZR','explicit','runtimeDomain','top-level','app','slice','EACCES','defaultApp','authRequired','apiDomain','some','nonInteractive','inherit','global','697188Goqquz'];a73_0xdf89=function(){return _0x5a8ac1;};return a73_0xdf89();}
|
|
1
|
+
const a73_0x3ca18b=a73_0x1e8d;(function(_0x37d6a9,_0x5c139a){const _0x21726=a73_0x1e8d,_0x5cdeb2=_0x37d6a9();while(!![]){try{const _0x209433=parseInt(_0x21726(0x7b))/0x1+parseInt(_0x21726(0x9d))/0x2*(-parseInt(_0x21726(0xaa))/0x3)+parseInt(_0x21726(0xa9))/0x4*(parseInt(_0x21726(0x6c))/0x5)+-parseInt(_0x21726(0x93))/0x6*(parseInt(_0x21726(0x8c))/0x7)+-parseInt(_0x21726(0xac))/0x8*(-parseInt(_0x21726(0xa6))/0x9)+parseInt(_0x21726(0x6a))/0xa+-parseInt(_0x21726(0xa7))/0xb;if(_0x209433===_0x5c139a)break;else _0x5cdeb2['push'](_0x5cdeb2['shift']());}catch(_0x55a22d){_0x5cdeb2['push'](_0x5cdeb2['shift']());}}}(a73_0x5e9a,0x52716));import{readFileSync,existsSync,mkdirSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{homedir}from'node:os';import{logger}from'./utils/logger.js';import{CliErrors}from'./errors.js';import{CLI_BIN_NAME}from'./constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvNames}from'./constant/product.js';import{DEFAULT_CONFIG_VALUES}from'./constant/defaults.js';import{normalizeEnv,isDaily,isDev}from'./constant/env.js';import{normalizeLegacyOutputFormat}from'./framework/types.js';import{resolveCachedAppCode}from'./commands/app/cache.js';export{AUTH_MODE,isAuthMode}from'./constant/auth-mode.js';const CONFIG_NAMES=PRODUCT_CONFIG['configFileNames'];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a73_0x3ca18b(0x94)];function resolveConfigPath(_0x3f1279){for(const _0x336a45 of CONFIG_NAMES){const _0x3efe6b=resolve(_0x3f1279,_0x336a45);if(existsSync(_0x3efe6b))return _0x3efe6b;}return undefined;}export function resolveWriteConfigPath(_0x20668c){const _0x2b87b0=a73_0x3ca18b,_0x2b5ce2=_0x20668c===_0x2b87b0(0x71)?process[_0x2b87b0(0x79)]():homedir(),_0x5ddc6f=resolveConfigPath(_0x2b5ce2);return _0x5ddc6f??resolve(_0x2b5ce2,NEW_CONFIG_NAME);}export function readConfigFile(_0x190b35){const _0x253290=a73_0x3ca18b;try{if(existsSync(_0x190b35)){const _0xb65c47=readFileSync(_0x190b35,{'encoding':_0x253290(0x83)});if(_0xb65c47){const _0x15bac4=JSON[_0x253290(0x9c)](_0xb65c47);return migrateOnlineEnv(_0x190b35,_0x15bac4),_0x15bac4;}}}catch{}return{};}function migrateOnlineEnv(_0x6e7f2,_0x2c1c0a){const _0x559a42=a73_0x3ca18b;let _0x56328f=![];_0x2c1c0a['env']===_0x559a42(0x7c)&&(_0x2c1c0a[_0x559a42(0x91)]=_0x559a42(0xa5),_0x56328f=!![]);if(_0x2c1c0a['apps']&&typeof _0x2c1c0a[_0x559a42(0xa1)]===_0x559a42(0x7d))for(const _0x576280 of Object[_0x559a42(0xab)](_0x2c1c0a[_0x559a42(0xa1)])){_0x576280&&_0x576280['env']===_0x559a42(0x7c)&&(_0x576280[_0x559a42(0x91)]='production',_0x56328f=!![]);}if(_0x56328f)try{writeConfigFile(_0x6e7f2,_0x2c1c0a);}catch{}}export function writeConfigFile(_0x40bdf3,_0xfb8bda){const _0x4d1564=a73_0x3ca18b,_0x246287=dirname(_0x40bdf3);!existsSync(_0x246287)&&mkdirSync(_0x246287,{'recursive':!![]});const _0x8904c=_0x40bdf3+'.tmp';try{writeFileSync(_0x8904c,JSON['stringify'](_0xfb8bda,null,0x2)+'\x0a',{'encoding':_0x4d1564(0x83),'mode':0x180});try{renameSync(_0x8904c,_0x40bdf3);}catch(_0x30dba6){if(_0x30dba6['code']===_0x4d1564(0x9f)||_0x30dba6['code']===_0x4d1564(0x76)||_0x30dba6['code']===_0x4d1564(0x7a)){writeFileSync(_0x40bdf3,JSON['stringify'](_0xfb8bda,null,0x2)+'\x0a',{'encoding':_0x4d1564(0x83)});try{unlinkSync(_0x8904c);}catch{}}else throw _0x30dba6;}}catch(_0x172c8a){try{unlinkSync(_0x8904c);}catch{}throw _0x172c8a;}}export function isNonInteractiveMode(_0x805e12){const _0x46f396=a73_0x3ca18b;return!!(_0x805e12['nonInteractive']||_0x805e12['ci']||productEnvNames('CI')[_0x46f396(0x6f)](_0x59d583=>process.env[_0x59d583]===_0x46f396(0x96))||process.env.CI===_0x46f396(0x96)||!process['stdout']['isTTY']||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x1d9af7=a73_0x3ca18b;if(!process[_0x1d9af7(0x90)][_0x1d9af7(0x80)])return![];try{const _0x38c9c0=process[_0x1d9af7(0x90)]['isRaw'];return process['stdin'][_0x1d9af7(0x99)](!![]),process[_0x1d9af7(0x90)]['setRawMode'](_0x38c9c0??![]),!![];}catch{return![];}}export async function createContext(_0x328095){const _0x34e4da=a73_0x3ca18b,_0x1365e8=readRawConfig(),_0x2bbd31=buildConfig(_0x1365e8,_0x328095);await initGlobalEnvironment(_0x2bbd31);const {getUserDomain:_0x3d02ed,getApiDomain:_0xb3dd6d}=await import(_0x34e4da(0x98)),_0x545d82={'apiDomain':_0xb3dd6d(),'userDomain':_0x3d02ed()},_0x5d1e18=await buildAuth(_0x2bbd31);logger[_0x34e4da(0x88)](process['cwd']());const _0x2f8380=(CLI_BIN_NAME+'\x20'+process['argv']['slice'](0x2)['join']('\x20'))[_0x34e4da(0x9b)]();logger[_0x34e4da(0x95)](_0x2f8380);const _0x46b036=isNonInteractiveMode(_0x328095);return{'config':_0x2bbd31,'auth':_0x5d1e18,'logger':logger,'env':_0x545d82,'nonInteractive':_0x46b036};}export function buildConfigFromFlags(_0x5585dd){return buildConfig(readRawConfig(),_0x5585dd);}function a73_0x5e9a(){const _0x41a3f8=['defaultApp','production','9BLcNiW','9991586YDdLtd','userDomain','16RYHVgK','249jIXKMc','values','3817864bOUqHn','globalConfig','3325830YTzoxQ','string','403890zXRmaD','ENV','raw','some','APP','project','read','ACCESS_KEY','maxRisk','global','EXDEV','inherit','appcode','cwd','EACCES','665747KmjVWh','online','object','error','./constant/env.js','isTTY','accessKey','PAGE_SIZE','utf8','missing','top-level','projectConfig','high-risk-write','setLogPath','apiDomain','find','app','168xZeWdL','write','locale','host','stdin','env','local-alias','6258QAFITX','newConfigFileName','setRawCommand','true','riskLevel','./constant/domain.js','setRawMode','authRequired','trim','parse','12714FTYFKR','FORMAT','EPERM','development','apps','daily','explicit'];a73_0x5e9a=function(){return _0x41a3f8;};return a73_0x5e9a();}export function getLocalAppAliases(_0x393790){const _0x573273=a73_0x3ca18b;return _0x393790[_0x573273(0xa1)]&&typeof _0x393790[_0x573273(0xa1)]===_0x573273(0x7d)?_0x393790[_0x573273(0xa1)]:{};}export function resolveLocalAppAliasCode(_0xcf76b2,_0x4a3f34){const _0x207b71=a73_0x3ca18b;if(!_0x4a3f34)return undefined;const _0x3e5404=getLocalAppAliases(_0xcf76b2)[_0x4a3f34],_0x394998=_0x3e5404?.[_0x207b71(0x78)];return typeof _0x394998===_0x207b71(0x6b)&&_0x394998[_0x207b71(0x9b)]()?_0x394998['trim']():undefined;}export function readAppCodeFromConfig(){const _0xce77b7=a73_0x3ca18b,_0xd8998f=readRawConfig(),_0x2d7b36=_0xd8998f[_0xce77b7(0x78)]??_0xd8998f[_0xce77b7(0x8b)];if(typeof _0x2d7b36==='string'&&_0x2d7b36[_0xce77b7(0x9b)]())return _0x2d7b36[_0xce77b7(0x9b)]();const _0x64c274=resolveLocalAppAliasCode(_0xd8998f,typeof _0xd8998f[_0xce77b7(0xa4)]===_0xce77b7(0x6b)?_0xd8998f[_0xce77b7(0xa4)]:undefined);if(_0x64c274)return _0x64c274;const _0x4cc439=normalizeEnv(String(_0xd8998f[_0xce77b7(0x91)]||_0xce77b7(0xa5))),_0x853ff9=isDaily(_0x4cc439)?'daily':isDev(_0x4cc439)?_0xce77b7(0xa0):'production',_0x2857c8=resolveCachedAppCode(typeof _0xd8998f[_0xce77b7(0xa4)]===_0xce77b7(0x6b)?_0xd8998f['defaultApp']:undefined,_0x853ff9,typeof _0xd8998f[_0xce77b7(0x81)]===_0xce77b7(0x6b)?_0xd8998f[_0xce77b7(0x81)]:undefined);if(_0x2857c8)return _0x2857c8;const _0x5ac338=Object['values'](getLocalAppAliases(_0xd8998f))[_0xce77b7(0x8a)](_0x5975ef=>_0x5975ef?.['appcode']);return typeof _0x5ac338?.[_0xce77b7(0x78)]===_0xce77b7(0x6b)&&_0x5ac338[_0xce77b7(0x78)]['trim']()?_0x5ac338[_0xce77b7(0x78)][_0xce77b7(0x9b)]():undefined;}export function readScopedConfig(_0x259edc){const _0x22eb4d=a73_0x3ca18b,_0xe29a5a=_0x259edc[_0x22eb4d(0x75)]?_0x22eb4d(0x75):_0x22eb4d(0x71);return readConfigFile(resolveWriteConfigPath(_0xe29a5a));}export function writeScopedConfig(_0x2153aa,_0x25b5f7){const _0x453ecb=a73_0x3ca18b,_0x363403=_0x25b5f7[_0x453ecb(0x75)]?_0x453ecb(0x75):_0x453ecb(0x71);writeConfigFile(resolveWriteConfigPath(_0x363403),_0x2153aa);}function a73_0x1e8d(_0xe919d3,_0x2a48a6){_0xe919d3=_0xe919d3-0x6a;const _0x5e9af1=a73_0x5e9a();let _0x1e8d63=_0x5e9af1[_0xe919d3];return _0x1e8d63;}export async function initGlobalEnvironment(_0x3078fb){const _0x852412=a73_0x3ca18b,{initEnv:_0x2d014a}=await import(_0x852412(0x7f));_0x2d014a(_0x3078fb[_0x852412(0x91)]);const {initDomains:_0x15aa8c}=await import('./constant/domain.js');_0x15aa8c({'apiDomain':_0x3078fb[_0x852412(0x6e)][_0x852412(0x89)]||_0x3078fb[_0x852412(0x6e)][_0x852412(0x8f)]||undefined,'userDomain':_0x3078fb[_0x852412(0x6e)][_0x852412(0xa8)]||undefined,'runtimeDomain':_0x3078fb[_0x852412(0x6e)]['runtimeDomain']||undefined,'skillHubDomain':_0x3078fb[_0x852412(0x6e)]['skillHubDomain']||undefined});}export function getProjectConfigPath(){return resolveConfigPath(process['cwd']());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x5b6b1e){const _0x1fe23f=a73_0x3ca18b;if(!existsSync(_0x5b6b1e))return{'status':_0x1fe23f(0x84)};try{const _0x4ed5e8=readFileSync(_0x5b6b1e,{'encoding':_0x1fe23f(0x83)});if(!_0x4ed5e8?.['trim']())return{'status':'empty'};const _0x415114=JSON[_0x1fe23f(0x9c)](_0x4ed5e8);return{'status':'ok','data':_0x415114};}catch(_0x52f6a6){return{'status':_0x1fe23f(0x7e),'message':_0x52f6a6 instanceof Error?_0x52f6a6['message']:String(_0x52f6a6)};}}export function loadRawConfigLayers(_0x12326a){const _0x336720=a73_0x3ca18b;let _0xe3f0cb={},_0x455800={},_0x33b788,_0x3183d1;try{_0x33b788=resolveConfigPath(homedir());if(_0x33b788){const _0x1edb9d=readFileSync(_0x33b788,{'encoding':'utf8'});if(_0x1edb9d)_0xe3f0cb=JSON[_0x336720(0x9c)](_0x1edb9d);}}catch{}try{const _0x5b879a=_0x12326a||process[_0x336720(0x79)]();_0x3183d1=resolveConfigPath(_0x5b879a);if(_0x3183d1){const _0x4dec75=readFileSync(_0x3183d1,{'encoding':_0x336720(0x83)});if(_0x4dec75)_0x455800=JSON['parse'](_0x4dec75);}}catch{}return{'globalPath':_0x33b788,'projectPath':_0x3183d1,'globalConfig':_0xe3f0cb,'projectConfig':_0x455800};}function mergeRawConfigLayers(_0x1fa265){const _0x3b8db6=a73_0x3ca18b,{globalConfig:_0x4563f6,projectConfig:_0x1a6c96}=_0x1fa265;if(_0x1a6c96['inherit']===![]){const _0x359c1d={..._0x1a6c96};return delete _0x359c1d[_0x3b8db6(0x77)],_0x359c1d;}const _0x398ac2={..._0x4563f6,..._0x1a6c96};if(_0x3b8db6(0xa4)in _0x1a6c96)_0x398ac2[_0x3b8db6(0xa4)]=_0x1a6c96['defaultApp'];else _0x4563f6['defaultApp']&&(_0x398ac2[_0x3b8db6(0xa4)]=_0x4563f6[_0x3b8db6(0xa4)]);return _0x398ac2;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0xe87396){return mergeRawConfigLayers(loadRawConfigLayers(_0xe87396));}export function readRawConfigWithLayers(_0x25f4d9){const _0x11652b=loadRawConfigLayers(_0x25f4d9);return{'config':mergeRawConfigLayers(_0x11652b),'layers':_0x11652b};}export function resolveDefaultAppSource(_0x33ee6e){const _0x5e4cd8=a73_0x3ca18b;if('defaultApp'in _0x33ee6e[_0x5e4cd8(0x86)])return _0x5e4cd8(0x71);if(_0x33ee6e[_0x5e4cd8(0x86)]['inherit']===![])return null;if(_0x33ee6e[_0x5e4cd8(0xad)][_0x5e4cd8(0xa4)])return _0x5e4cd8(0x75);return null;}function buildConfig(_0x1d9ee2,_0x1d787f){const _0x1a2d2b=a73_0x3ca18b,_0x1e0168=_0x1d9ee2[_0x1a2d2b(0xa4)]||undefined,_0xdca351=_0x1d787f['app']||env(_0x1a2d2b(0x70))||undefined,_0x49c7b1=_0xdca351||_0x1e0168||undefined,_0x12fe32=env(_0x1a2d2b(0x73))||_0x1d9ee2[_0x1a2d2b(0x81)]||undefined,_0x5bd5cd=_0x1d787f[_0x1a2d2b(0x91)]||env(_0x1a2d2b(0x6d))||_0x1d9ee2[_0x1a2d2b(0x91)]||DEFAULT_CONFIG_VALUES['env'],_0x5bd0d8=normalizeEnv(String(_0x5bd5cd)),_0x44daf4=isDaily(_0x5bd0d8)?_0x1a2d2b(0xa2):isDev(_0x5bd0d8)?_0x1a2d2b(0xa0):_0x1a2d2b(0xa5),_0x2da24e=typeof _0x1d787f[_0x1a2d2b(0x78)]===_0x1a2d2b(0x6b)?_0x1d787f[_0x1a2d2b(0x78)]:undefined,_0x3f2701=env('APPCODE'),_0x11f004=_0xdca351?undefined:_0x1d9ee2[_0x1a2d2b(0x78)]||_0x1d9ee2[_0x1a2d2b(0x8b)]||undefined,_0x17431c=_0xdca351||(_0x11f004?undefined:_0x1e0168),_0x508528=resolveLocalAppAliasCode(_0x1d9ee2,_0x17431c),_0x58025e=resolveCachedAppCode(_0x17431c,_0x44daf4,_0x12fe32),_0x2f2128=_0x2da24e||_0x3f2701||_0x11f004||_0x508528||_0x58025e||undefined,_0x244406=_0x2da24e?_0x1a2d2b(0xa3):_0x3f2701?_0x1a2d2b(0x91):_0x11f004?_0x1a2d2b(0x85):_0x508528?_0x1a2d2b(0x92):_0x58025e?'cache':undefined,_0x2dacf7=_0x1d9ee2['locale']||DEFAULT_CONFIG_VALUES[_0x1a2d2b(0x8e)],_0xacb135=undefined,_0x78082f=_0x1d787f['format']||env(_0x1a2d2b(0x9e))||_0x1d9ee2['format'],_0x4cd682=normalizeLegacyOutputFormat(_0x78082f),_0xb86c56=env(_0x1a2d2b(0x82))||_0x1d9ee2['pageSize'],_0x47422f=_0xb86c56?Number(_0xb86c56)||undefined:undefined,_0x251c2e=_0x1d9ee2[_0x1a2d2b(0x97)]||_0x1d9ee2[_0x1a2d2b(0x74)],_0x56a717=_0x251c2e===_0x1a2d2b(0x72)||_0x251c2e===_0x1a2d2b(0x8d)||_0x251c2e===_0x1a2d2b(0x87)?_0x251c2e:DEFAULT_CONFIG_VALUES['riskLevel'],_0x47ffe0=env('VERBOSE'),_0x3c0a3f=_0x47ffe0==='1'||_0x47ffe0==='true';return{'appCode':typeof _0x2f2128===_0x1a2d2b(0x6b)&&_0x2f2128[_0x1a2d2b(0x9b)]()?_0x2f2128[_0x1a2d2b(0x9b)]():undefined,'appCodeSource':_0x244406,'env':_0x44daf4,'locale':_0x2dacf7,'cookie':_0xacb135,'accessKey':_0x12fe32,'format':_0x4cd682,'pageSize':_0x47422f,'riskLevel':_0x56a717,'verbose':_0x3c0a3f,'defaultApp':_0x1e0168,'currentApp':typeof _0x49c7b1==='string'?_0x49c7b1:undefined,'raw':_0x1d9ee2};}function env(_0x5c0e38){return productEnv(_0x5c0e38);}async function buildAuth(_0x57e7ca){const _0x4d16a4='',_0x147627=!!_0x57e7ca['accessKey'];return{'cookie':_0x4d16a4,'isLoggedIn':_0x147627,async 'getOrLogin'(){const _0x2cdea2=a73_0x1e8d;if(_0x147627)return _0x4d16a4;throw CliErrors[_0x2cdea2(0x9a)]();}};}
|