@lovrabet/lovrabet-cli 2.1.9-beta.1 → 2.1.9-beta.2
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_0x53689a=a55_0x43f7;function a55_0xc7ae(){const _0x409471=['false','utf8','warning','SKILL.md\x20is\x20not\x20a\x20file.','errors','Add\x20frontmatter\x20with\x20name\x20and\x20description.','artifact','1095805hzyJRE','Set\x20name\x20to\x20the\x20Skill\x20directory\x20code.','path','SKILL.md\x20must\x20start\x20with\x20frontmatter.','read','Frontmatter\x20displayName\x20is\x20missing.','\x20Fix:\x20','true','internal','填写模型触发语义:用户在什么场景应使用本\x20Skill、不要使用的边界和关键词。','has','Frontmatter\x20description\x20is\x20empty.','1874547MKvjAk','map','section','type','68LEsggg','isDirectory','error','string','content','raw','462BtHQOo','join','bff','Skill\x20validation\x20failed:\x0a','SKILL.md\x20must\x20be\x20a\x20regular\x20file.','ruleId','trainer','2ReUWxd','Skill\x20directory\x20not\x20found:\x20','Set\x20metadata.type\x20to\x20write,\x20read,\x20or\x20trainer.','split','auth','slice','write','If\x20this\x20is\x20a\x20runtime\x20step,\x20replace\x20it\x20with\x20the\x20equivalent\x20lovrabet\x20command.\x20Dev-time\x20discovery\x20or\x20handoff\x20notes\x20can\x20stay.','project','filter','frontmatter-required','1269220ubIOqr','validation','Missing\x20SKILL.md.','name','Add\x20SKILL.md\x20at\x20the\x20Skill\x20directory\x20root.','Set\x20displayName\x20to\x20the\x20human-readable\x20Skill\x20name\x20shown\x20in\x20SkillHub.','Frontmatter\x20name\x20is\x20missing.','level','Remove\x20metadata.internal\x20or\x20set\x20it\x20to\x20false\x20before\x20running\x20skill\x20push.','2643gjjMfn','message','Replace\x20the\x20symlink\x20with\x20a\x20regular\x20SKILL.md\x20file\x20inside\x20the\x20Skill\x20directory.','hasFrontmatter','file','line','rabetbase-cli-reference','2788313LWExCI','trim','push','displayName','description','flatMap','test','internal-skill','metadata.internal=true\x20Skills\x20cannot\x20be\x20uploaded.','boolean','Add\x20SKILL.md\x20as\x20a\x20regular\x20file\x20at\x20the\x20Skill\x20directory\x20root.','structure-complete','number','service','page','34984oXOmad','workspace','18657LWGkJc','data','isSymbolicLink','toUpperCase','6bVORMX','registry'];a55_0xc7ae=function(){return _0x409471;};return a55_0xc7ae();}(function(_0x150ed7,_0x11cacf){const _0x3f994c=a55_0x43f7,_0x1f33de=_0x150ed7();while(!![]){try{const _0x58ebc2=-parseInt(_0x3f994c(0x1af))/0x1*(parseInt(_0x3f994c(0x183))/0x2)+parseInt(_0x3f994c(0x197))/0x3*(parseInt(_0x3f994c(0x1cc))/0x4)+-parseInt(_0x3f994c(0x1bc))/0x5*(parseInt(_0x3f994c(0x1b3))/0x6)+-parseInt(_0x3f994c(0x17c))/0x7*(-parseInt(_0x3f994c(0x1ad))/0x8)+parseInt(_0x3f994c(0x1c8))/0x9+parseInt(_0x3f994c(0x18e))/0xa+-parseInt(_0x3f994c(0x19e))/0xb;if(_0x58ebc2===_0x11cacf)break;else _0x1f33de['push'](_0x1f33de['shift']());}catch(_0x1aefd1){_0x1f33de['push'](_0x1f33de['shift']());}}}(a55_0xc7ae,0x2402b));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{resolve}from'node:path';import{parse as a55_0x229dd7}from'yaml';function a55_0x43f7(_0x2a702b,_0x4bc696){_0x2a702b=_0x2a702b-0x17c;const _0xc7ae20=a55_0xc7ae();let _0x43f785=_0xc7ae20[_0x2a702b];return _0x43f785;}import{CliErrors}from'../../errors.js';import{fileText,scanSkillDirectory}from'../../skills/runtime-skill-sync/local-files.js';const SKILL_FILE='SKILL.md',SUPPORTED_SKILL_TYPES=new Set([a55_0x53689a(0x189),a55_0x53689a(0x1c0),a55_0x53689a(0x182)]),TEXT_SKILL_FILE_PATTERN=/(?:^SKILL\.md$|\.(?:md|mdx|txt|json|ya?ml|js|mjs|cjs|ts|tsx|sh|sql))$/i;export function validateSkillDirectory(_0x179053,_0x4cf29f={}){const _0x2628b4=a55_0x53689a,_0xefd346=resolveSkillDirectoryRoot(_0x179053),_0x38795a=[],_0x8d47a=loadRequiredSkillFile(_0xefd346,_0x38795a),_0x194236=_0x8d47a?parseFrontmatter(_0x8d47a[_0x2628b4(0x1d0)]):{'hasFrontmatter':![]};_0x8d47a&&validateFrontmatter(_0x8d47a[_0x2628b4(0x1be)],_0x194236,_0x38795a);validateRuntimeCliReferences(_0xefd346,_0x38795a);const _0x482c3b=_0x38795a['filter'](_0x5d2d27=>_0x5d2d27[_0x2628b4(0x195)]===_0x2628b4(0x1ce)),_0x347ff3=_0x38795a[_0x2628b4(0x18c)](_0x71eee7=>_0x71eee7[_0x2628b4(0x195)]===_0x2628b4(0x1b7));return{'ok':_0x482c3b['length']===0x0,'dir':_0xefd346,'type':_0x194236[_0x2628b4(0x1cb)],'errors':_0x482c3b,'warnings':_0x347ff3};}function resolveSkillDirectoryRoot(_0x599a13){const _0x29cf6f=a55_0x53689a,_0x137fa6=resolve(_0x599a13);if(!existsSync(_0x137fa6))throw CliErrors[_0x29cf6f(0x18f)](_0x29cf6f(0x184)+_0x599a13);const _0x203930=lstatSync(_0x137fa6);if(_0x203930['isDirectory']())return _0x137fa6;if(_0x203930[_0x29cf6f(0x1b1)]()){const _0x1b3fbe=realpathSync(_0x137fa6);if(lstatSync(_0x1b3fbe)[_0x29cf6f(0x1cd)]())return _0x1b3fbe;}throw CliErrors[_0x29cf6f(0x18f)](_0x29cf6f(0x184)+_0x599a13);}export function throwIfSkillValidationFailed(_0x436e4f,_0x17537e=![]){const _0x6c9a9d=a55_0x53689a;if(_0x436e4f['ok'])return;const _0x2c9aa3=_0x436e4f[_0x6c9a9d(0x1b9)][_0x6c9a9d(0x1c9)](_0x1b2c50=>{const _0x56538b=_0x6c9a9d,_0x54dbd8=_0x1b2c50['section']?'#'+_0x1b2c50[_0x56538b(0x1ca)]:'';return _0x1b2c50[_0x56538b(0x195)][_0x56538b(0x1b2)]()+'\x20'+_0x1b2c50[_0x56538b(0x181)]+'\x20'+_0x1b2c50[_0x56538b(0x19b)]+_0x54dbd8+':\x20'+_0x1b2c50[_0x56538b(0x198)]+_0x56538b(0x1c2)+_0x1b2c50['suggestion'];});throw CliErrors[_0x6c9a9d(0x18f)](_0x6c9a9d(0x17f)+_0x2c9aa3[_0x6c9a9d(0x17d)]('\x0a'),'Fix\x20the\x20Skill\x20metadata\x20before\x20running\x20skill\x20push.');}function loadRequiredSkillFile(_0x5773dc,_0x4f9356){const _0x43d9a6=a55_0x53689a,_0x4a7af2=resolve(_0x5773dc,SKILL_FILE);if(!existsSync(_0x4a7af2))return _0x4f9356[_0x43d9a6(0x1a0)](issue(_0x43d9a6(0x1ce),_0x43d9a6(0x1a9),SKILL_FILE,_0x43d9a6(0x190),_0x43d9a6(0x192))),undefined;const _0x4b8a1f=lstatSync(_0x4a7af2);if(_0x4b8a1f[_0x43d9a6(0x1b1)]())return _0x4f9356[_0x43d9a6(0x1a0)](issue(_0x43d9a6(0x1ce),_0x43d9a6(0x1a9),SKILL_FILE,_0x43d9a6(0x180),_0x43d9a6(0x199))),undefined;if(!_0x4b8a1f['isFile']())return _0x4f9356[_0x43d9a6(0x1a0)](issue(_0x43d9a6(0x1ce),_0x43d9a6(0x1a9),SKILL_FILE,_0x43d9a6(0x1b8),_0x43d9a6(0x1a8))),undefined;return{'path':SKILL_FILE,'content':readFileSync(_0x4a7af2,_0x43d9a6(0x1b6))};}function validateFrontmatter(_0xed167b,_0x5cf69c,_0x4e89a2){const _0x2545aa=a55_0x53689a;if(!_0x5cf69c[_0x2545aa(0x19a)]){_0x4e89a2[_0x2545aa(0x1a0)](issue(_0x2545aa(0x1ce),'frontmatter-required',_0xed167b,_0x2545aa(0x1bf),_0x2545aa(0x1ba)));return;}!_0x5cf69c[_0x2545aa(0x191)]?.[_0x2545aa(0x19f)]()&&_0x4e89a2[_0x2545aa(0x1a0)](issue(_0x2545aa(0x1ce),'frontmatter-required',_0xed167b,_0x2545aa(0x194),_0x2545aa(0x1bd))),!_0x5cf69c[_0x2545aa(0x1a1)]?.[_0x2545aa(0x19f)]()&&_0x4e89a2[_0x2545aa(0x1a0)](issue(_0x2545aa(0x1b7),'display-name-recommended',_0xed167b,_0x2545aa(0x1c1),_0x2545aa(0x193))),!_0x5cf69c['description']?.[_0x2545aa(0x19f)]()&&_0x4e89a2['push'](issue('error','description-required',_0xed167b,_0x2545aa(0x1c7),_0x2545aa(0x1c5))),_0x5cf69c['internal']===!![]&&_0x4e89a2['push'](issue(_0x2545aa(0x1ce),_0x2545aa(0x1a5),_0xed167b,_0x2545aa(0x1a6),_0x2545aa(0x196))),_0x5cf69c[_0x2545aa(0x1cb)]?.[_0x2545aa(0x19f)]()&&!SUPPORTED_SKILL_TYPES[_0x2545aa(0x1c6)](_0x5cf69c[_0x2545aa(0x1cb)])&&_0x4e89a2[_0x2545aa(0x1a0)](issue(_0x2545aa(0x1ce),_0x2545aa(0x18d),_0xed167b,'metadata.type\x20must\x20be\x20one\x20of\x20write,\x20read,\x20or\x20trainer.',_0x2545aa(0x185)));}function validateRuntimeCliReferences(_0x3a0250,_0x21f025){const _0x23ef40=a55_0x53689a;for(const _0x4a425e of findRabetbaseCliInvocations(_0x3a0250)){_0x21f025[_0x23ef40(0x1a0)](issue(_0x23ef40(0x1b7),_0x23ef40(0x19d),_0x4a425e['file'],'This\x20line\x20invokes\x20the\x20rabetbase\x20CLI.\x20rabetbase\x20is\x20a\x20dev-time\x20tool;\x20runtime\x20Skills\x20should\x20drive\x20runtime\x20work\x20through\x20lovrabet\x20commands.',_0x23ef40(0x18a),'L'+_0x4a425e[_0x23ef40(0x19c)]));}}function findRabetbaseCliInvocations(_0x589120){const _0x50c923=a55_0x53689a;return scanSkillDirectory(_0x589120)[_0x50c923(0x18c)](_0x334653=>TEXT_SKILL_FILE_PATTERN['test'](_0x334653[_0x50c923(0x1be)]))[_0x50c923(0x1a3)](_0x4c4f53=>{const _0x32bdd4=_0x50c923,_0x4fe8df=fileText(_0x4c4f53);return _0x4fe8df['split'](/\r?\n/)[_0x32bdd4(0x1c9)]((_0x5148cf,_0x1404a2)=>({'file':_0x4c4f53['path'],'line':_0x1404a2+0x1,'text':_0x5148cf}))['filter'](({text:_0x58dbbb})=>isRabetbaseCliInvocation(_0x58dbbb))[_0x32bdd4(0x1c9)](({file:_0x54c029,line:_0x23b095})=>({'file':_0x54c029,'line':_0x23b095}));});}const RABETBASE_SUBCOMMANDS=['dataset','sql',a55_0x53689a(0x17e),a55_0x53689a(0x1ac),a55_0x53689a(0x18b),'app','schema',a55_0x53689a(0x1ab),a55_0x53689a(0x1bb),'kb','config',a55_0x53689a(0x1ae),a55_0x53689a(0x1b0),a55_0x53689a(0x187),'logs',a55_0x53689a(0x1b4)],RABETBASE_INVOCATION=new RegExp(String[a55_0x53689a(0x1d1)]`\brabetbase\s+(?:${RABETBASE_SUBCOMMANDS[a55_0x53689a(0x17d)]('|')})\b`+String[a55_0x53689a(0x1d1)]`(?:\s+[a-z][\w-]*){0,2}\s+(?:--?[a-z]|[\w.-]+=)`,'i');function isRabetbaseCliInvocation(_0x4e8221){const _0x23c505=a55_0x53689a,_0x1ca26a=_0x4e8221['search'](/\brabetbase\b/i);if(_0x1ca26a<0x0)return![];const _0x2c5651=_0x4e8221[_0x23c505(0x188)](_0x1ca26a)[_0x23c505(0x186)](/\blovrabet\b/i)[0x0]??'';return RABETBASE_INVOCATION[_0x23c505(0x1a4)](_0x2c5651);}function parseFrontmatter(_0x2ff52b){const _0x146161=a55_0x53689a,_0x33200f=_0x2ff52b['match'](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x33200f)return{'hasFrontmatter':![]};const _0x3964ec=_0x33200f[0x1]??'',_0x553b45={'hasFrontmatter':!![]};let _0x24fdcd;try{_0x24fdcd=a55_0x229dd7(_0x3964ec);}catch{return _0x553b45;}const _0x32b4d4=asRecord(_0x24fdcd);if(!_0x32b4d4)return _0x553b45;_0x553b45['name']=scalarToString(_0x32b4d4['name']),_0x553b45[_0x146161(0x1a1)]=scalarToString(_0x32b4d4['displayName']),_0x553b45['description']=scalarToString(_0x32b4d4[_0x146161(0x1a2)]);const _0x223c23=asRecord(_0x32b4d4['metadata']);return _0x223c23&&(_0x553b45[_0x146161(0x1cb)]=scalarToString(_0x223c23[_0x146161(0x1cb)]),_0x553b45[_0x146161(0x1c4)]=scalarToBoolean(_0x223c23['internal'])),_0x553b45;}function asRecord(_0x518293){if(_0x518293&&typeof _0x518293==='object'&&!Array['isArray'](_0x518293))return _0x518293;return undefined;}function scalarToString(_0x9d897f){const _0x3eb597=a55_0x53689a;if(typeof _0x9d897f===_0x3eb597(0x1cf))return _0x9d897f[_0x3eb597(0x19f)]();if(typeof _0x9d897f===_0x3eb597(0x1aa)||typeof _0x9d897f==='boolean')return String(_0x9d897f);return undefined;}function scalarToBoolean(_0x563237){const _0x556698=a55_0x53689a;if(typeof _0x563237===_0x556698(0x1a7))return _0x563237;if(typeof _0x563237===_0x556698(0x1cf))return cleanBoolean(_0x563237);return undefined;}function cleanBoolean(_0x514f9d){const _0x13e40f=a55_0x53689a,_0x136120=_0x514f9d[_0x13e40f(0x19f)]()['toLowerCase']();if(_0x136120===_0x13e40f(0x1c3))return!![];if(_0x136120===_0x13e40f(0x1b5))return![];return undefined;}function issue(_0x1e5dbe,_0x11f6db,_0x4994e6,_0x1f5605,_0x226aea,_0x8250a){return{'level':_0x1e5dbe,'ruleId':_0x11f6db,'file':_0x4994e6,'section':_0x8250a,'message':_0x1f5605,'suggestion':_0x226aea};}
|
|
1
|
+
const a55_0x42409e=a55_0x5baa;(function(_0x2bf7e7,_0x5c7184){const _0x444e0a=a55_0x5baa,_0x22c09e=_0x2bf7e7();while(!![]){try{const _0x2e8f2d=parseInt(_0x444e0a(0x100))/0x1+parseInt(_0x444e0a(0xdf))/0x2*(parseInt(_0x444e0a(0xf3))/0x3)+parseInt(_0x444e0a(0xda))/0x4*(-parseInt(_0x444e0a(0xb3))/0x5)+parseInt(_0x444e0a(0xea))/0x6*(-parseInt(_0x444e0a(0x109))/0x7)+parseInt(_0x444e0a(0xfc))/0x8+parseInt(_0x444e0a(0xff))/0x9*(parseInt(_0x444e0a(0xe9))/0xa)+parseInt(_0x444e0a(0xc4))/0xb*(-parseInt(_0x444e0a(0x103))/0xc);if(_0x2e8f2d===_0x5c7184)break;else _0x22c09e['push'](_0x22c09e['shift']());}catch(_0x49b8a3){_0x22c09e['push'](_0x22c09e['shift']());}}}(a55_0x2357,0x76063));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{resolve}from'node:path';import{parse as a55_0x316edc}from'yaml';import{CliErrors}from'../../errors.js';import{fileText,scanSkillDirectory}from'../../skills/runtime-skill-sync/local-files.js';const SKILL_FILE=a55_0x42409e(0xd2),SUPPORTED_SKILL_TYPES=new Set([a55_0x42409e(0xf7),'read',a55_0x42409e(0xc6)]),TEXT_SKILL_FILE_PATTERN=/(?:^SKILL\.md$|\.(?:md|mdx|txt|json|ya?ml|js|mjs|cjs|ts|tsx|sh|sql))$/i;export function validateSkillDirectory(_0xef4c09,_0x44cb9b={}){const _0x49028a=a55_0x42409e,_0x13a86e=resolveSkillDirectoryRoot(_0xef4c09),_0xc6d5d9=[],_0x37d88d=loadRequiredSkillFile(_0x13a86e,_0xc6d5d9),_0x5e0136=_0x37d88d?parseFrontmatter(_0x37d88d[_0x49028a(0xd9)]):{'hasFrontmatter':![]};_0x37d88d&&validateFrontmatter(_0x37d88d[_0x49028a(0xf1)],_0x5e0136,_0xc6d5d9);validateRuntimeCliReferences(_0x13a86e,_0xc6d5d9);const _0x11508c=_0xc6d5d9[_0x49028a(0xba)](_0x42f716=>_0x42f716[_0x49028a(0xd7)]==='error'),_0x25560f=_0xc6d5d9[_0x49028a(0xba)](_0x993f66=>_0x993f66[_0x49028a(0xd7)]==='warning');return{'ok':_0x11508c[_0x49028a(0xec)]===0x0,'dir':_0x13a86e,'type':_0x5e0136[_0x49028a(0xbf)],'errors':_0x11508c,'warnings':_0x25560f};}function resolveSkillDirectoryRoot(_0x147254){const _0x4ec19e=a55_0x42409e,_0x2f0294=resolve(_0x147254);if(!existsSync(_0x2f0294))throw CliErrors[_0x4ec19e(0x101)](_0x4ec19e(0xbe)+_0x147254);const _0x1625d3=lstatSync(_0x2f0294);if(_0x1625d3[_0x4ec19e(0xfb)]())return _0x2f0294;if(_0x1625d3[_0x4ec19e(0xb1)]()){const _0x942f1e=realpathSync(_0x2f0294);if(lstatSync(_0x942f1e)['isDirectory']())return _0x942f1e;}throw CliErrors[_0x4ec19e(0x101)](_0x4ec19e(0xbe)+_0x147254);}export function throwIfSkillValidationFailed(_0x3d8ed8,_0x5dce62=![]){const _0x490fe8=a55_0x42409e;if(_0x3d8ed8['ok'])return;const _0x5b90f1=_0x3d8ed8[_0x490fe8(0xfe)][_0x490fe8(0xd0)](_0x4b2981=>{const _0x2770eb=_0x490fe8,_0x293b41=_0x4b2981[_0x2770eb(0xc3)]?'#'+_0x4b2981[_0x2770eb(0xc3)]:'';return _0x4b2981[_0x2770eb(0xd7)]['toUpperCase']()+'\x20'+_0x4b2981[_0x2770eb(0xb9)]+'\x20'+_0x4b2981[_0x2770eb(0xc7)]+_0x293b41+':\x20'+_0x4b2981[_0x2770eb(0xd8)]+'\x20Fix:\x20'+_0x4b2981['suggestion'];});throw CliErrors[_0x490fe8(0x101)](_0x490fe8(0xc2)+_0x5b90f1['join']('\x0a'),_0x490fe8(0x102));}function a55_0x2357(){const _0x3be24d=['project','object','dataset','metadata.internal=true\x20Skills\x20cannot\x20be\x20uploaded.','data','ruleId','filter','Add\x20SKILL.md\x20as\x20a\x20regular\x20file\x20at\x20the\x20Skill\x20directory\x20root.','SKILL.md\x20is\x20not\x20a\x20file.','name','Skill\x20directory\x20not\x20found:\x20','type','config','Add\x20frontmatter\x20with\x20name\x20and\x20description.','Skill\x20validation\x20failed:\x0a','section','4653715azOOce','false','trainer','file','warning','frontmatter-required','bff','raw','app','trim','service','Remove\x20metadata.internal\x20or\x20set\x20it\x20to\x20false\x20before\x20running\x20skill\x20push.','map','displayName','SKILL.md','split','Frontmatter\x20displayName\x20is\x20missing.','error','isFile','level','message','content','12DlWtCX','test','workspace','Frontmatter\x20description\x20is\x20empty.','Add\x20SKILL.md\x20at\x20the\x20Skill\x20directory\x20root.','4kjJIOr','Replace\x20the\x20symlink\x20with\x20a\x20regular\x20SKILL.md\x20file\x20inside\x20the\x20Skill\x20directory.','metadata','SKILL.md\x20must\x20start\x20with\x20frontmatter.','rabetbase-cli-reference','If\x20this\x20is\x20a\x20runtime\x20step,\x20replace\x20it\x20with\x20the\x20equivalent\x20lovrabet\x20command.\x20Dev-time\x20discovery\x20or\x20handoff\x20notes\x20can\x20stay.','number','true','description','logs','10jmLxPg','1294266CVECYA','string','length','SKILL.md\x20must\x20be\x20a\x20regular\x20file.','hasFrontmatter','toLowerCase','page','path','boolean','1303023TEvGaN','internal','structure-complete','search','write','auth','Frontmatter\x20name\x20is\x20missing.','Set\x20name\x20to\x20the\x20Skill\x20directory\x20code.','isDirectory','5924064vSHnVg','push','errors','3397617dEOPRi','886171zKlXZA','validation','Fix\x20the\x20Skill\x20metadata\x20before\x20running\x20skill\x20push.','48bIOTzI','has','internal-skill','slice','registry','Set\x20metadata.type\x20to\x20write,\x20read,\x20or\x20trainer.','7LnuUHi','isSymbolicLink','utf8','802460whiccY'];a55_0x2357=function(){return _0x3be24d;};return a55_0x2357();}function loadRequiredSkillFile(_0x1313d1,_0x59def8){const _0xda719e=a55_0x42409e,_0x5a5a42=resolve(_0x1313d1,SKILL_FILE);if(!existsSync(_0x5a5a42))return _0x59def8[_0xda719e(0xfd)](issue(_0xda719e(0xd5),_0xda719e(0xf5),SKILL_FILE,'Missing\x20SKILL.md.',_0xda719e(0xde))),undefined;const _0x4c3b70=lstatSync(_0x5a5a42);if(_0x4c3b70[_0xda719e(0xb1)]())return _0x59def8[_0xda719e(0xfd)](issue(_0xda719e(0xd5),'structure-complete',SKILL_FILE,_0xda719e(0xed),_0xda719e(0xe0))),undefined;if(!_0x4c3b70[_0xda719e(0xd6)]())return _0x59def8[_0xda719e(0xfd)](issue(_0xda719e(0xd5),_0xda719e(0xf5),SKILL_FILE,_0xda719e(0xbc),_0xda719e(0xbb))),undefined;return{'path':SKILL_FILE,'content':readFileSync(_0x5a5a42,_0xda719e(0xb2))};}function validateFrontmatter(_0x4f50aa,_0xfa60b5,_0x4259eb){const _0x252d70=a55_0x42409e;if(!_0xfa60b5[_0x252d70(0xee)]){_0x4259eb[_0x252d70(0xfd)](issue(_0x252d70(0xd5),_0x252d70(0xc9),_0x4f50aa,_0x252d70(0xe2),_0x252d70(0xc1)));return;}!_0xfa60b5[_0x252d70(0xbd)]?.[_0x252d70(0xcd)]()&&_0x4259eb[_0x252d70(0xfd)](issue('error',_0x252d70(0xc9),_0x4f50aa,_0x252d70(0xf9),_0x252d70(0xfa))),!_0xfa60b5[_0x252d70(0xd1)]?.[_0x252d70(0xcd)]()&&_0x4259eb['push'](issue(_0x252d70(0xc8),'display-name-recommended',_0x4f50aa,_0x252d70(0xd4),'Set\x20displayName\x20to\x20the\x20human-readable\x20Skill\x20name\x20shown\x20in\x20SkillHub.')),!_0xfa60b5[_0x252d70(0xe7)]?.[_0x252d70(0xcd)]()&&_0x4259eb['push'](issue(_0x252d70(0xd5),'description-required',_0x4f50aa,_0x252d70(0xdd),'填写模型触发语义:用户在什么场景应使用本\x20Skill、不要使用的边界和关键词。')),_0xfa60b5['internal']===!![]&&_0x4259eb[_0x252d70(0xfd)](issue(_0x252d70(0xd5),_0x252d70(0x105),_0x4f50aa,_0x252d70(0xb7),_0x252d70(0xcf))),_0xfa60b5[_0x252d70(0xbf)]?.[_0x252d70(0xcd)]()&&!SUPPORTED_SKILL_TYPES[_0x252d70(0x104)](_0xfa60b5[_0x252d70(0xbf)])&&_0x4259eb[_0x252d70(0xfd)](issue(_0x252d70(0xd5),_0x252d70(0xc9),_0x4f50aa,'metadata.type\x20must\x20be\x20one\x20of\x20write,\x20read,\x20or\x20trainer.',_0x252d70(0x108)));}function validateRuntimeCliReferences(_0x59e5bf,_0x51ca3a){const _0x11c2bf=a55_0x42409e;for(const _0x5947f6 of findRabetbaseCliInvocations(_0x59e5bf)){_0x51ca3a[_0x11c2bf(0xfd)](issue(_0x11c2bf(0xc8),_0x11c2bf(0xe3),_0x5947f6['file'],'This\x20line\x20invokes\x20the\x20rabetbase\x20CLI.\x20rabetbase\x20is\x20a\x20dev-time\x20tool;\x20runtime\x20Skills\x20should\x20drive\x20runtime\x20work\x20through\x20lovrabet\x20commands.',_0x11c2bf(0xe4),'L'+_0x5947f6['line']));}}function findRabetbaseCliInvocations(_0x2e88e2){const _0x4aefe9=a55_0x42409e;return scanSkillDirectory(_0x2e88e2)[_0x4aefe9(0xba)](_0x410baa=>TEXT_SKILL_FILE_PATTERN[_0x4aefe9(0xdb)](_0x410baa[_0x4aefe9(0xf1)]))['flatMap'](_0x375cf9=>{const _0x25cb4a=_0x4aefe9,_0x28caa5=fileText(_0x375cf9);return _0x28caa5[_0x25cb4a(0xd3)](/\r?\n/)[_0x25cb4a(0xd0)]((_0x367b57,_0x1634c0)=>({'file':_0x375cf9[_0x25cb4a(0xf1)],'line':_0x1634c0+0x1,'text':_0x367b57}))['filter'](({text:_0x290629})=>isRabetbaseCliInvocation(_0x290629))['map'](({file:_0x50a937,line:_0x4e48ba})=>({'file':_0x50a937,'line':_0x4e48ba}));});}const RABETBASE_SUBCOMMANDS=[a55_0x42409e(0xb6),'sql',a55_0x42409e(0xca),a55_0x42409e(0xf0),a55_0x42409e(0xb4),a55_0x42409e(0xcc),'schema',a55_0x42409e(0xce),'artifact','kb',a55_0x42409e(0xc0),a55_0x42409e(0xdc),a55_0x42409e(0xb8),a55_0x42409e(0xf8),a55_0x42409e(0xe8),a55_0x42409e(0x107)],RABETBASE_INVOCATION=new RegExp(String[a55_0x42409e(0xcb)]`\brabetbase\s+(?:${RABETBASE_SUBCOMMANDS['join']('|')})\b`+String[a55_0x42409e(0xcb)]`(?:\s+[a-z][\w-]*){0,2}\s+(?:--?[a-z]|[\w.-]+=)`,'i');function isRabetbaseCliInvocation(_0xa0ca61){const _0x4aacc3=a55_0x42409e,_0x5f1229=_0xa0ca61[_0x4aacc3(0xf6)](/\brabetbase\b/i);if(_0x5f1229<0x0)return![];const _0x2be396=_0xa0ca61[_0x4aacc3(0x106)](_0x5f1229)[_0x4aacc3(0xd3)](/\blovrabet\b/i)[0x0]??'';return RABETBASE_INVOCATION[_0x4aacc3(0xdb)](_0x2be396);}function parseFrontmatter(_0x5f530a){const _0x35407a=a55_0x42409e,_0x317d78=_0x5f530a['match'](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x317d78)return{'hasFrontmatter':![]};const _0x37acad=_0x317d78[0x1]??'',_0x3012c3={'hasFrontmatter':!![]};let _0x418a04;try{_0x418a04=a55_0x316edc(_0x37acad);}catch{return _0x3012c3;}const _0x32cc78=asRecord(_0x418a04);if(!_0x32cc78)return _0x3012c3;_0x3012c3[_0x35407a(0xbd)]=scalarToString(_0x32cc78[_0x35407a(0xbd)]),_0x3012c3[_0x35407a(0xd1)]=scalarToString(_0x32cc78['displayName']),_0x3012c3[_0x35407a(0xe7)]=scalarToString(_0x32cc78[_0x35407a(0xe7)]);const _0x1851a8=asRecord(_0x32cc78[_0x35407a(0xe1)]);return _0x1851a8&&(_0x3012c3[_0x35407a(0xbf)]=scalarToString(_0x1851a8[_0x35407a(0xbf)]),_0x3012c3[_0x35407a(0xf4)]=scalarToBoolean(_0x1851a8['internal'])),_0x3012c3;}function asRecord(_0x2ab206){const _0x1bbfab=a55_0x42409e;if(_0x2ab206&&typeof _0x2ab206===_0x1bbfab(0xb5)&&!Array['isArray'](_0x2ab206))return _0x2ab206;return undefined;}function scalarToString(_0x1996f0){const _0x46db5f=a55_0x42409e;if(typeof _0x1996f0===_0x46db5f(0xeb))return _0x1996f0[_0x46db5f(0xcd)]();if(typeof _0x1996f0===_0x46db5f(0xe5)||typeof _0x1996f0===_0x46db5f(0xf2))return String(_0x1996f0);return undefined;}function scalarToBoolean(_0x41f24d){const _0x3f3bf0=a55_0x42409e;if(typeof _0x41f24d===_0x3f3bf0(0xf2))return _0x41f24d;if(typeof _0x41f24d===_0x3f3bf0(0xeb))return cleanBoolean(_0x41f24d);return undefined;}function a55_0x5baa(_0x50fdfb,_0x56d5d2){_0x50fdfb=_0x50fdfb-0xb1;const _0x235722=a55_0x2357();let _0x5baa4a=_0x235722[_0x50fdfb];return _0x5baa4a;}function cleanBoolean(_0x13e977){const _0x4f4fef=a55_0x42409e,_0x149375=_0x13e977[_0x4f4fef(0xcd)]()[_0x4f4fef(0xef)]();if(_0x149375===_0x4f4fef(0xe6))return!![];if(_0x149375===_0x4f4fef(0xc5))return![];return undefined;}function issue(_0x44fba8,_0x223223,_0x4513ee,_0x1d0611,_0x3ed054,_0x545529){return{'level':_0x44fba8,'ruleId':_0x223223,'file':_0x4513ee,'section':_0x545529,'message':_0x1d0611,'suggestion':_0x3ed054};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a56_0x40e844=a56_0x15d6;(function(_0x3d6e2e,_0x1e2b51){const _0x15a5ca=a56_0x15d6,_0x34fef4=_0x3d6e2e();while(!![]){try{const _0x1d41a1=-parseInt(_0x15a5ca(0xec))/0x1+parseInt(_0x15a5ca(0xea))/0x2*(-parseInt(_0x15a5ca(0xf3))/0x3)+-parseInt(_0x15a5ca(0xed))/0x4+parseInt(_0x15a5ca(0xfb))/0x5*(parseInt(_0x15a5ca(0xf1))/0x6)+parseInt(_0x15a5ca(0xf8))/0x7*(-parseInt(_0x15a5ca(0xf5))/0x8)+parseInt(_0x15a5ca(0xf2))/0x9*(parseInt(_0x15a5ca(0xfa))/0xa)+parseInt(_0x15a5ca(0xf6))/0xb;if(_0x1d41a1===_0x1e2b51)break;else _0x34fef4['push'](_0x34fef4['shift']());}catch(_0x516b6b){_0x34fef4['push'](_0x34fef4['shift']());}}}(a56_0x1bfc,0x5d17a));function a56_0x15d6(_0x3bbc43,_0x25d6f2){_0x3bbc43=_0x3bbc43-0xe9;const _0x1bfc2c=a56_0x1bfc();let _0x15d6c4=_0x1bfc2c[_0x3bbc43];return _0x15d6c4;}import{getSqlQueryInfo}from'../../core/api-client.js';import{getDbName}from'../../core/db-resolver.js';function a56_0x1bfc(){const _0x1ad231=['detail','297204wxbOOC','72RotjbV','597723WDOsRp','sqlContent','24xdfRHc','6071791BmLVRm','sqlcode','1031317rAHtuA','Get\x20custom\x20SQL\x20query\x20details\x20by\x20sqlCode','922270DVDlfh','30kkvZxv','dbId','2WAMQoh','sql','181055AFFaJW','1533624XOuJPk','description','sqlName'];a56_0x1bfc=function(){return _0x1ad231;};return a56_0x1bfc();}import{SQLCODE_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';export const sqlDetail={'service':a56_0x40e844(0xeb),'command':a56_0x40e844(0xf0),'description':a56_0x40e844(0xf9),'risk':'read','flags':[SQLCODE_FLAG,VERBOSE_FLAG],async 'execute'(_0x3277bf){const _0x280528=a56_0x40e844,_0x21d625=await getSqlQueryInfo(_0x3277bf['appCode'],_0x3277bf['str'](_0x280528(0xf7))),_0x1b00ad=_0x3277bf['bool']('verbose');if(_0x1b00ad)return{'ok':!![],'data':_0x21d625};const _0x32ac44=_0x21d625[_0x280528(0xe9)]?await getDbName(_0x3277bf['appCode'],_0x21d625[_0x280528(0xe9)]):undefined;return{'ok':!![],'data':{'sqlCode':_0x21d625['sqlCode'],'sqlName':_0x21d625[_0x280528(0xef)],'db':_0x32ac44?_0x32ac44+'\x20('+_0x21d625[_0x280528(0xe9)]+')':_0x21d625[_0x280528(0xe9)]??'','description':_0x21d625[_0x280528(0xee)]??'','sqlContent':_0x21d625[_0x280528(0xf4)]??''}};}};
|
package/lib/commands/sql/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a57_0xf7e20d=a57_0x2f36;(function(_0x3a175c,_0x509b61){const _0x2d6657=a57_0x2f36,_0x480e0e=_0x3a175c();while(!![]){try{const _0x1005c0=-parseInt(_0x2d6657(0x1ec))/0x1+parseInt(_0x2d6657(0x1e7))/0x2*(-parseInt(_0x2d6657(0x1e9))/0x3)+-parseInt(_0x2d6657(0x1f3))/0x4+parseInt(_0x2d6657(0x1ee))/0x5*(-parseInt(_0x2d6657(0x1f8))/0x6)+-parseInt(_0x2d6657(0x1eb))/0x7*(parseInt(_0x2d6657(0x1f4))/0x8)+parseInt(_0x2d6657(0x1ed))/0x9*(parseInt(_0x2d6657(0x1f5))/0xa)+parseInt(_0x2d6657(0x1e6))/0xb;if(_0x1005c0===_0x509b61)break;else _0x480e0e['push'](_0x480e0e['shift']());}catch(_0x4af0c6){_0x480e0e['push'](_0x480e0e['shift']());}}}(a57_0x5d21,0x8e76f));function a57_0x5d21(){const _0x2d4b9c=['\x20row(s)\x20in\x20','Returned\x20','params','36357849tKJfDT','254ldecdm','sql','5691omlyWt','now','33152IADmmy','989475pLPhOV','2421CUrmoj','1876540VeadNS','str','sqlcode','exec','execError','1106024fPnMpU','1184fiHDqG','8800sYdMSP','Execute\x20a\x20custom\x20SQL\x20query\x20by\x20sqlCode','read','12nGOXpc','isArray','execResult','length'];a57_0x5d21=function(){return _0x2d4b9c;};return a57_0x5d21();}function a57_0x2f36(_0x33f5a9,_0x3967ce){_0x33f5a9=_0x33f5a9-0x1e3;const _0x5d21a6=a57_0x5d21();let _0x2f36e7=_0x5d21a6[_0x33f5a9];return _0x2f36e7;}import{executeSdkSql}from'../../core/sdk-client.js';import{SQLCODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';import{parseJsonParams}from'../../utils/params.js';export const sqlExec={'service':a57_0xf7e20d(0x1e8),'command':a57_0xf7e20d(0x1f1),'description':a57_0xf7e20d(0x1f6),'risk':a57_0xf7e20d(0x1f7),'flags':[SQLCODE_FLAG,PARAMS_FLAG],async 'execute'(_0x434be3){const _0x23bee2=a57_0xf7e20d,_0x3e674a=parseJsonParams(_0x434be3[_0x23bee2(0x1ef)](_0x23bee2(0x1e5))),_0x3adc60=Date[_0x23bee2(0x1ea)](),_0x4575e5=await executeSdkSql(_0x434be3[_0x23bee2(0x1ef)](_0x23bee2(0x1f0)),_0x3e674a),_0x295a14=Date[_0x23bee2(0x1ea)]()-_0x3adc60,_0x20d1c4=_0x4575e5?.[_0x23bee2(0x1fa)]??_0x4575e5,_0x1d2591=_0x4575e5?.['execSuccess']??!![];if(!_0x1d2591)return{'ok':![],'data':{'error':_0x4575e5?.[_0x23bee2(0x1f2)]||'SQL\x20execution\x20failed','elapsed':_0x295a14},'message':'SQL\x20execution\x20failed'};const _0x2ba26d=Array[_0x23bee2(0x1f9)](_0x20d1c4)?_0x20d1c4:[];return{'ok':!![],'data':{'rows':_0x2ba26d,'rowCount':_0x2ba26d[_0x23bee2(0x1fb)],'elapsed':_0x295a14},'message':_0x23bee2(0x1e4)+_0x2ba26d[_0x23bee2(0x1fb)]+_0x23bee2(0x1e3)+_0x295a14+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x53de20,_0x1e52a3){const _0x583e40=a58_0x44f4,_0x4a6b28=_0x53de20();while(!![]){try{const _0x10454c=parseInt(_0x583e40(0x9f))/0x1+-parseInt(_0x583e40(0xa5))/0x2+-parseInt(_0x583e40(0x9d))/0x3+-parseInt(_0x583e40(0xa3))/0x4+parseInt(_0x583e40(0xa4))/0x5*(parseInt(_0x583e40(0x9e))/0x6)+-parseInt(_0x583e40(0xa1))/0x7*(parseInt(_0x583e40(0xa0))/0x8)+parseInt(_0x583e40(0xa2))/0x9;if(_0x10454c===_0x1e52a3)break;else _0x4a6b28['push'](_0x4a6b28['shift']());}catch(_0x647e38){_0x4a6b28['push'](_0x4a6b28['shift']());}}}(a58_0x3f61,0xc1980));function a58_0x44f4(_0x1f3f6a,_0x57c790){_0x1f3f6a=_0x1f3f6a-0x9d;const _0x3f6110=a58_0x3f61();let _0x44f460=_0x3f6110[_0x1f3f6a];return _0x44f460;}function a58_0x3f61(){const _0x6a15fb=['155730yPyXRP','1675156gjUAqT','4577718JVGOWc','60CJUTzK','531181qVfyqX','77352NyIKlv','1057CmkBMT','41436765GMxsYP','3321052LRQWqY'];a58_0x3f61=function(){return _0x6a15fb;};return a58_0x3f61();}import{sqlDetail}from'../../commands/sql/detail.js';import{sqlExec}from'../../commands/sql/exec.js';export const sqlDefinitions=[sqlDetail,sqlExec];
|
package/lib/commands/update.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a59_0x4bad35=a59_0x61c7;(function(_0xa96265,_0x4528af){const _0x587735=a59_0x61c7,_0x41f04e=_0xa96265();while(!![]){try{const _0xdcdb46=parseInt(_0x587735(0x1f8))/0x1*(parseInt(_0x587735(0x20c))/0x2)+parseInt(_0x587735(0x206))/0x3*(-parseInt(_0x587735(0x1db))/0x4)+-parseInt(_0x587735(0x207))/0x5*(parseInt(_0x587735(0x208))/0x6)+-parseInt(_0x587735(0x1ff))/0x7*(-parseInt(_0x587735(0x1c6))/0x8)+parseInt(_0x587735(0x1c4))/0x9*(parseInt(_0x587735(0x1dd))/0xa)+-parseInt(_0x587735(0x1c0))/0xb+parseInt(_0x587735(0x1be))/0xc*(parseInt(_0x587735(0x1e2))/0xd);if(_0xdcdb46===_0x4528af)break;else _0x41f04e['push'](_0x41f04e['shift']());}catch(_0x4b183d){_0x41f04e['push'](_0x41f04e['shift']());}}}(a59_0x4c57,0x37be1));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';import{resolveNpmBin}from'../utils/platform.js';function a59_0x61c7(_0x2cfe7f,_0x46535d){_0x2cfe7f=_0x2cfe7f-0x1ba;const _0x4c5782=a59_0x4c57();let _0x61c711=_0x4c5782[_0x2cfe7f];return _0x61c711;}import{getCliVersion}from'../utils/version.js';import{LOVRABET_SKIP_NPX_SKILLS_ENV,runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';const updateFlags=[{'name':'latest','type':a59_0x4bad35(0x1d6),'description':a59_0x4bad35(0x1cb),'default':![]},{'name':a59_0x4bad35(0x1df),'type':a59_0x4bad35(0x1d6),'description':a59_0x4bad35(0x1fb),'default':![]},{'name':a59_0x4bad35(0x1cf),'type':a59_0x4bad35(0x1ec),'description':a59_0x4bad35(0x1e9)},{'name':a59_0x4bad35(0x1f3),'type':'boolean','description':a59_0x4bad35(0x1e3),'default':![]},{'name':a59_0x4bad35(0x1f7),'type':a59_0x4bad35(0x1d6),'description':a59_0x4bad35(0x1e5),'default':!![],'hidden':!![]}];function parseSemver(_0x2c6408){const _0x671f6a=a59_0x4bad35,_0x3653a4=_0x2c6408['trim']()[_0x671f6a(0x20d)](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0x3653a4)return null;return{'major':Number(_0x3653a4[0x1]),'minor':Number(_0x3653a4[0x2]),'patch':Number(_0x3653a4[0x3]),'prerelease':_0x3653a4[0x4]};}function compareSemver(_0xbc4b9d,_0x457db2){const _0x5496bb=a59_0x4bad35,_0x53cabf=parseSemver(_0xbc4b9d),_0x1890c0=parseSemver(_0x457db2);if(!_0x53cabf||!_0x1890c0)throw CliErrors[_0x5496bb(0x1d4)](_0x5496bb(0x1c8),'Use\x20full\x20semver\x20versions\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.');for(const _0x42c3b3 of[_0x5496bb(0x1f6),_0x5496bb(0x204),_0x5496bb(0x1dc)]){if(_0x53cabf[_0x42c3b3]<_0x1890c0[_0x42c3b3])return-0x1;if(_0x53cabf[_0x42c3b3]>_0x1890c0[_0x42c3b3])return 0x1;}if(!_0x53cabf['prerelease']&&!_0x1890c0['prerelease'])return 0x0;if(!_0x53cabf[_0x5496bb(0x1c3)])return 0x1;if(!_0x1890c0[_0x5496bb(0x1c3)])return-0x1;if(_0x53cabf['prerelease']===_0x1890c0[_0x5496bb(0x1c3)])return 0x0;return _0x53cabf[_0x5496bb(0x1c3)]<_0x1890c0[_0x5496bb(0x1c3)]?-0x1:0x1;}function getRequestedVersion(_0x4eba22){const _0x25238a=a59_0x4bad35,_0x211355=_0x4eba22['str'](_0x25238a(0x1cf))[_0x25238a(0x1ce)]();if(_0x211355)return _0x211355;return String(_0x4eba22[_0x25238a(0x200)]?.[0x0]??'')[_0x25238a(0x1ce)]();}function a59_0x4c57(){const _0x3034be=['\x20version\x20from\x20npm.','--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.','Update\x20failed:\x20','274490WCytjP','match','status','object','Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.','Updating\x20','stdout','12EekHFZ','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','4287459OShuQr','json','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','prerelease','468ylYnwR','Checking\x20npm\x20dist-tags...','16ZlraWr','skipped','Version\x20comparison\x20failed.','\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(','timeout','Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag','\x20\x20Try\x20manually:\x20npm\x20install\x20-g\x20','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','trim','version','/-/package/','source','join','unknown','validation','cwd','boolean','nonInteractive','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','fromEntries','Unable\x20to\x20resolve\x20','27604VoUgpE','patch','46270LxChrL','Current\x20version:\x20','beta','run','Updated\x20to\x20v','3435562ScOxBb','Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','toString','Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','pipe','Already\x20on\x20requested\x20version\x20(v','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','Install\x20a\x20specific\x20CLI\x20version','length','Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.','string','stderr','flag','message','inherit','filter','bool','no-skills','update','error','major','skills','3vcRNWg','\x20\x20Run\x20manually:\x20lovrabet\x20cli-skill\x20install','latest','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','write','log','=1).','885801DcQCdd','args','install','exit\x20','entries','minor','warn','171Vkcvjw','5lJhNNO','949512QfWNCQ'];a59_0x4c57=function(){return _0x3034be;};return a59_0x4c57();}function shouldSkipCliBuiltInSkill(_0x3f22a9){const _0x57f6d1=a59_0x4bad35;return _0x3f22a9[_0x57f6d1(0x1f2)](_0x57f6d1(0x1f3))||_0x3f22a9[_0x57f6d1(0x1ee)](_0x57f6d1(0x1f7))===![];}async function validateUpdateFlags(_0x481ecd){const _0x4b1d5e=a59_0x4bad35,_0x2655bf=getRequestedVersion(_0x481ecd),_0x132d9c=[_0x481ecd[_0x4b1d5e(0x1f2)]('latest')?'latest':'',_0x481ecd[_0x4b1d5e(0x1f2)](_0x4b1d5e(0x1df))?'beta':'',_0x2655bf?_0x4b1d5e(0x1cf):''][_0x4b1d5e(0x1f1)](Boolean);if(_0x132d9c[_0x4b1d5e(0x1ea)]>0x1)throw CliErrors[_0x4b1d5e(0x1d4)](_0x4b1d5e(0x20a),_0x4b1d5e(0x1bb));if(_0x2655bf&&!parseSemver(_0x2655bf))throw CliErrors[_0x4b1d5e(0x1d4)]('Invalid\x20version:\x20'+_0x2655bf,_0x4b1d5e(0x1eb));}async function fetchNpmDistTags(){const _0x253520=a59_0x4bad35;try{const _0x412328=NPM_REGISTRY_BASE_URL+_0x253520(0x1d0)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+'/dist-tags',_0x12c791=await fetch(_0x412328,{'signal':AbortSignal[_0x253520(0x1ca)](0x2710)});if(!_0x12c791['ok'])return null;const _0x21a938=await _0x12c791[_0x253520(0x1c1)]();if(!_0x21a938||typeof _0x21a938!==_0x253520(0x1ba))return null;return Object[_0x253520(0x1d9)](Object[_0x253520(0x203)](_0x21a938)[_0x253520(0x1f1)](([,_0x22f4fe])=>typeof _0x22f4fe===_0x253520(0x1ec)&&_0x22f4fe['trim']())['map'](([_0x3b6876,_0x3b8dde])=>[_0x3b6876,String(_0x3b8dde)['trim']()]));}catch{return null;}}async function resolveTargetVersion(_0x1e9a41){const _0x3b9bfb=a59_0x4bad35,_0x455a31=getRequestedVersion(_0x1e9a41);if(_0x455a31)return{'version':_0x455a31,'source':_0x3b9bfb(0x1cf)};const _0x2643cb=_0x1e9a41[_0x3b9bfb(0x1f2)](_0x3b9bfb(0x1df))?'beta':_0x3b9bfb(0x1fa),_0x371332=await fetchNpmDistTags(),_0x565ea4=_0x371332?.[_0x2643cb];if(!_0x565ea4)return null;return{'version':_0x565ea4,'source':_0x2643cb};}function shouldInstallTarget(_0x14453f,_0x2e27cc){const _0x1d59b0=a59_0x4bad35,_0x329edc=compareSemver(_0x14453f,_0x2e27cc[_0x1d59b0(0x1cf)]);if(_0x2e27cc[_0x1d59b0(0x1d1)]===_0x1d59b0(0x1cf))return _0x329edc!==0x0;return _0x329edc<0x0;}function installCliPackage(_0x39f326,_0x1ec496){const _0x4d6ef9=a59_0x4bad35,_0x4fae85=resolveNpmBin('npm'),_0x421140=[_0x4d6ef9(0x201),'-g',LOVRABET_NPM_PACKAGE_NAME+'@'+_0x39f326];console[_0x4d6ef9(0x1fd)]('*\x20'+[_0x4fae85,..._0x421140][_0x4d6ef9(0x1d2)]('\x20'));const _0x5570b3=spawnSync(_0x4fae85,_0x421140,{'cwd':process['cwd'](),'stdio':_0x1ec496?_0x4d6ef9(0x1e6):_0x4d6ef9(0x1f0),'env':process.env,'shell':![]});if(_0x5570b3[_0x4d6ef9(0x20e)]===0x0)return{'ok':!![]};let _0x37a4ee=_0x5570b3[_0x4d6ef9(0x1f5)]?.[_0x4d6ef9(0x1ef)]||_0x4d6ef9(0x202)+(_0x5570b3[_0x4d6ef9(0x20e)]??_0x4d6ef9(0x1d3));if(_0x1ec496){const _0x110c1c=_0x5570b3[_0x4d6ef9(0x1ed)]?_0x5570b3[_0x4d6ef9(0x1ed)][_0x4d6ef9(0x1e4)]()['trim']():'',_0x28cbd5=_0x5570b3[_0x4d6ef9(0x1bd)]?_0x5570b3[_0x4d6ef9(0x1bd)]['toString']()[_0x4d6ef9(0x1ce)]():'';if(_0x110c1c)_0x37a4ee=_0x110c1c;else{if(_0x28cbd5)_0x37a4ee=_0x28cbd5;}}return{'ok':![],'error':_0x37a4ee};}async function installCliBuiltInSkill(_0x41be43){const _0x3daff4=a59_0x4bad35;console[_0x3daff4(0x1fd)]('Checking\x20CLI\x20Built-in\x20Skill...');const _0x24f1cf=runNpxSkillsAddGlobal(process[_0x3daff4(0x1d5)](),LOVRABET_SKILL_SOURCE,{'stdio':_0x41be43?_0x3daff4(0x1e6):_0x3daff4(0x1f0)});if(_0x24f1cf[_0x3daff4(0x1c7)]){console[_0x3daff4(0x1fd)](_0x3daff4(0x1c9)+LOVRABET_SKIP_NPX_SKILLS_ENV+_0x3daff4(0x1fe));return;}if(_0x24f1cf['ok']){console[_0x3daff4(0x1fd)](_0x3daff4(0x1e8));return;}console[_0x3daff4(0x205)](_0x3daff4(0x1d8)+(_0x24f1cf[_0x3daff4(0x1f5)]||_0x3daff4(0x1d3))),console['log'](_0x3daff4(0x1f9));}async function execute(_0x56127d){const _0x5ece4c=a59_0x4bad35;await validateUpdateFlags(_0x56127d);const _0x31005f=getCliVersion();console[_0x5ece4c(0x1fd)](_0x5ece4c(0x1de)+_0x31005f),console['log'](_0x5ece4c(0x1c5));const _0xb420c9=await resolveTargetVersion(_0x56127d);if(!_0xb420c9){const _0x5aaa86=_0x56127d[_0x5ece4c(0x1f2)]('beta')?_0x5ece4c(0x1df):_0x5ece4c(0x1fa),_0x19dd30=_0x5ece4c(0x1da)+_0x5aaa86+_0x5ece4c(0x209);return console[_0x5ece4c(0x205)](_0x19dd30),console['log'](_0x5ece4c(0x1c2)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x5aaa86),{'ok':![]};}if(!shouldInstallTarget(_0x31005f,_0xb420c9)){const _0x111890=_0xb420c9['source']===_0x5ece4c(0x1cf)?_0x5ece4c(0x1e7)+_0xb420c9[_0x5ece4c(0x1cf)]+').':'Already\x20up\x20to\x20date\x20(v'+_0xb420c9[_0x5ece4c(0x1cf)]+').';return console[_0x5ece4c(0x1fd)](_0x111890),shouldSkipCliBuiltInSkill(_0x56127d)?console[_0x5ece4c(0x1fd)](_0x5ece4c(0x1bf)):await installCliBuiltInSkill(_0x56127d['nonInteractive']),{'ok':!![]};}console[_0x5ece4c(0x1fd)](_0x5ece4c(0x1bc)+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0x31005f+'\x20->\x20'+_0xb420c9['version']);const _0x28fe14=installCliPackage(_0xb420c9['version'],_0x56127d[_0x5ece4c(0x1d7)]);if(!_0x28fe14['ok']){const _0x22be81=_0x5ece4c(0x20b)+(_0x28fe14[_0x5ece4c(0x1f5)]||_0x5ece4c(0x1d3));return console[_0x5ece4c(0x1f5)](_0x22be81),console['log'](_0x5ece4c(0x1cc)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0xb420c9[_0x5ece4c(0x1cf)]),{'ok':![]};}return console[_0x5ece4c(0x1fd)](_0x5ece4c(0x1e1)+_0xb420c9[_0x5ece4c(0x1cf)]+'.'),console[_0x5ece4c(0x1fd)](_0x5ece4c(0x1cd)),shouldSkipCliBuiltInSkill(_0x56127d)?console[_0x5ece4c(0x1fd)](_0x5ece4c(0x1bf)):await installCliBuiltInSkill(_0x56127d[_0x5ece4c(0x1d7)]),{'ok':!![]};}export const updateDefinition={'service':a59_0x4bad35(0x1f4),'command':a59_0x4bad35(0x1e0),'description':'Update\x20'+CLI_BIN_NAME+'\x20CLI\x20from\x20npm','risk':a59_0x4bad35(0x1fc),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a59_0x38764d=a59_0x1bdf;(function(_0x33482e,_0x31c073){const _0x5a6e27=a59_0x1bdf,_0x4dd6d5=_0x33482e();while(!![]){try{const _0x25dd03=-parseInt(_0x5a6e27(0x1c4))/0x1*(parseInt(_0x5a6e27(0x1ab))/0x2)+parseInt(_0x5a6e27(0x19b))/0x3+parseInt(_0x5a6e27(0x18f))/0x4+parseInt(_0x5a6e27(0x1c5))/0x5*(-parseInt(_0x5a6e27(0x197))/0x6)+-parseInt(_0x5a6e27(0x1a0))/0x7*(-parseInt(_0x5a6e27(0x1a2))/0x8)+parseInt(_0x5a6e27(0x1ca))/0x9*(parseInt(_0x5a6e27(0x183))/0xa)+-parseInt(_0x5a6e27(0x185))/0xb*(parseInt(_0x5a6e27(0x1ce))/0xc);if(_0x25dd03===_0x31c073)break;else _0x4dd6d5['push'](_0x4dd6d5['shift']());}catch(_0x21fac2){_0x4dd6d5['push'](_0x4dd6d5['shift']());}}}(a59_0x2249,0xd13c6));import{spawnSync}from'node:child_process';import{CliErrors}from'../errors.js';function a59_0x2249(){const _0x322537=['message','pipe','boolean','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','513261UsnBqY','Use\x20full\x20semver\x20versions\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.','prerelease','no-skills','96BTpnIN','skipped','source','Already\x20on\x20requested\x20version\x20(v','match','=1).','130LbVwKl','minor','2659745EjzuBl','log','version','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','skills','Current\x20version:\x20','exit\x20','Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag','error','beta','6595504ZKjkhS','\x20CLI\x20from\x20npm','Updating\x20','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','run','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','unknown','Version\x20comparison\x20failed.','84NkqgKJ','Already\x20up\x20to\x20date\x20(v','npm','filter','4838583rewwmL','str','entries','flag','/-/package/','7paiXvt','Checking\x20npm\x20dist-tags...','8119248SyuqXQ','write','inherit','stdout','major','trim','bool','stderr','map','4GHzQqc','nonInteractive','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','Checking\x20CLI\x20Built-in\x20Skill...','Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.','--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.','\x20->\x20','length','\x20\x20Run\x20manually:\x20lovrabet\x20cli-skill\x20install','status','string','timeout','Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','json','Invalid\x20version:\x20','validation','Install\x20a\x20specific\x20CLI\x20version','latest','update','cwd','patch','object','/dist-tags','Updated\x20to\x20v','args','513415qztHit','428500VqMCEs'];a59_0x2249=function(){return _0x322537;};return a59_0x2249();}function a59_0x1bdf(_0x2e9af0,_0xb4aeea){_0x2e9af0=_0x2e9af0-0x180;const _0x224955=a59_0x2249();let _0x1bdfa8=_0x224955[_0x2e9af0];return _0x1bdfa8;}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_0x38764d(0x1bc),'type':a59_0x38764d(0x1c8),'description':a59_0x38764d(0x18c),'default':![]},{'name':a59_0x38764d(0x18e),'type':a59_0x38764d(0x1c8),'description':a59_0x38764d(0x188),'default':![]},{'name':'version','type':'string','description':a59_0x38764d(0x1bb)},{'name':a59_0x38764d(0x1cd),'type':a59_0x38764d(0x1c8),'description':a59_0x38764d(0x1b7),'default':![]},{'name':a59_0x38764d(0x189),'type':a59_0x38764d(0x1c8),'description':'Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','default':!![],'hidden':!![]}];function parseSemver(_0x1244c5){const _0x4bb5fa=a59_0x38764d,_0x1ff1b6=_0x1244c5[_0x4bb5fa(0x1a7)]()[_0x4bb5fa(0x181)](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0x1ff1b6)return null;return{'major':Number(_0x1ff1b6[0x1]),'minor':Number(_0x1ff1b6[0x2]),'patch':Number(_0x1ff1b6[0x3]),'prerelease':_0x1ff1b6[0x4]};}function compareSemver(_0xe4b0d3,_0x419573){const _0x2da268=a59_0x38764d,_0x546525=parseSemver(_0xe4b0d3),_0x3560c5=parseSemver(_0x419573);if(!_0x546525||!_0x3560c5)throw CliErrors['validation'](_0x2da268(0x196),_0x2da268(0x1cb));for(const _0xe1a624 of[_0x2da268(0x1a6),_0x2da268(0x184),_0x2da268(0x1bf)]){if(_0x546525[_0xe1a624]<_0x3560c5[_0xe1a624])return-0x1;if(_0x546525[_0xe1a624]>_0x3560c5[_0xe1a624])return 0x1;}if(!_0x546525[_0x2da268(0x1cc)]&&!_0x3560c5[_0x2da268(0x1cc)])return 0x0;if(!_0x546525[_0x2da268(0x1cc)])return 0x1;if(!_0x3560c5['prerelease'])return-0x1;if(_0x546525[_0x2da268(0x1cc)]===_0x3560c5[_0x2da268(0x1cc)])return 0x0;return _0x546525[_0x2da268(0x1cc)]<_0x3560c5[_0x2da268(0x1cc)]?-0x1:0x1;}function getRequestedVersion(_0x36ca64){const _0x49a02a=a59_0x38764d,_0x411149=_0x36ca64[_0x49a02a(0x19c)](_0x49a02a(0x187))[_0x49a02a(0x1a7)]();if(_0x411149)return _0x411149;return String(_0x36ca64[_0x49a02a(0x1c3)]?.[0x0]??'')[_0x49a02a(0x1a7)]();}function shouldSkipCliBuiltInSkill(_0x5d72c8){const _0x4bf746=a59_0x38764d;return _0x5d72c8[_0x4bf746(0x1a8)]('no-skills')||_0x5d72c8[_0x4bf746(0x19e)](_0x4bf746(0x189))===![];}async function validateUpdateFlags(_0x35858f){const _0x50e318=a59_0x38764d,_0x5ae963=getRequestedVersion(_0x35858f),_0x2ce50e=[_0x35858f[_0x50e318(0x1a8)]('latest')?'latest':'',_0x35858f[_0x50e318(0x1a8)](_0x50e318(0x18e))?'beta':'',_0x5ae963?_0x50e318(0x187):''][_0x50e318(0x19a)](Boolean);if(_0x2ce50e[_0x50e318(0x1b2)]>0x1)throw CliErrors['validation'](_0x50e318(0x1b0),_0x50e318(0x1af));if(_0x5ae963&&!parseSemver(_0x5ae963))throw CliErrors[_0x50e318(0x1ba)](_0x50e318(0x1b9)+_0x5ae963,'Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.');}async function fetchNpmDistTags(){const _0x4444e1=a59_0x38764d;try{const _0x2bd64e=NPM_REGISTRY_BASE_URL+_0x4444e1(0x19f)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x4444e1(0x1c1),_0x340586=await fetch(_0x2bd64e,{'signal':AbortSignal[_0x4444e1(0x1b6)](0x2710)});if(!_0x340586['ok'])return null;const _0x3e6030=await _0x340586[_0x4444e1(0x1b8)]();if(!_0x3e6030||typeof _0x3e6030!==_0x4444e1(0x1c0))return null;return Object['fromEntries'](Object[_0x4444e1(0x19d)](_0x3e6030)[_0x4444e1(0x19a)](([,_0x3028c7])=>typeof _0x3028c7===_0x4444e1(0x1b5)&&_0x3028c7[_0x4444e1(0x1a7)]())[_0x4444e1(0x1aa)](([_0x4590d9,_0x1e3268])=>[_0x4590d9,String(_0x1e3268)['trim']()]));}catch{return null;}}async function resolveTargetVersion(_0x441b2d){const _0x47d1ec=a59_0x38764d,_0x450234=getRequestedVersion(_0x441b2d);if(_0x450234)return{'version':_0x450234,'source':_0x47d1ec(0x187)};const _0x42d63e=_0x441b2d['bool']('beta')?_0x47d1ec(0x18e):_0x47d1ec(0x1bc),_0x304c8e=await fetchNpmDistTags(),_0x4c9bdc=_0x304c8e?.[_0x42d63e];if(!_0x4c9bdc)return null;return{'version':_0x4c9bdc,'source':_0x42d63e};}function shouldInstallTarget(_0x4c3f9e,_0x44cfa7){const _0x267982=a59_0x38764d,_0x122079=compareSemver(_0x4c3f9e,_0x44cfa7[_0x267982(0x187)]);if(_0x44cfa7[_0x267982(0x1d0)]===_0x267982(0x187))return _0x122079!==0x0;return _0x122079<0x0;}function installCliPackage(_0x4be058,_0x1d35b0){const _0x4744df=a59_0x38764d,_0x3aecac=resolveNpmBin(_0x4744df(0x199)),_0x5f440a=['install','-g',LOVRABET_NPM_PACKAGE_NAME+'@'+_0x4be058];console[_0x4744df(0x186)]('*\x20'+[_0x3aecac,..._0x5f440a]['join']('\x20'));const _0x183d6c=spawnSync(_0x3aecac,_0x5f440a,{'cwd':process[_0x4744df(0x1be)](),'stdio':_0x1d35b0?_0x4744df(0x1c7):_0x4744df(0x1a4),'env':process.env,'shell':![]});if(_0x183d6c[_0x4744df(0x1b4)]===0x0)return{'ok':!![]};let _0x3f4f01=_0x183d6c[_0x4744df(0x18d)]?.[_0x4744df(0x1c6)]||_0x4744df(0x18b)+(_0x183d6c[_0x4744df(0x1b4)]??_0x4744df(0x195));if(_0x1d35b0){const _0x4b41b6=_0x183d6c[_0x4744df(0x1a9)]?_0x183d6c[_0x4744df(0x1a9)]['toString']()['trim']():'',_0x2b8e36=_0x183d6c[_0x4744df(0x1a5)]?_0x183d6c[_0x4744df(0x1a5)]['toString']()['trim']():'';if(_0x4b41b6)_0x3f4f01=_0x4b41b6;else{if(_0x2b8e36)_0x3f4f01=_0x2b8e36;}}return{'ok':![],'error':_0x3f4f01};}async function installCliBuiltInSkill(_0x2ed48c){const _0x44011b=a59_0x38764d;console['log'](_0x44011b(0x1ae));const _0x4566ec=runNpxSkillsAddGlobal(process[_0x44011b(0x1be)](),LOVRABET_SKILL_SOURCE,{'stdio':_0x2ed48c?_0x44011b(0x1c7):_0x44011b(0x1a4)});if(_0x4566ec[_0x44011b(0x1cf)]){console[_0x44011b(0x186)]('\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20('+LOVRABET_SKIP_NPX_SKILLS_ENV+_0x44011b(0x182));return;}if(_0x4566ec['ok']){console['log']('\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.');return;}console['warn'](_0x44011b(0x1ad)+(_0x4566ec[_0x44011b(0x18d)]||_0x44011b(0x195))),console['log'](_0x44011b(0x1b3));}async function execute(_0x11cf3b){const _0x143491=a59_0x38764d;await validateUpdateFlags(_0x11cf3b);const _0x40c10f=getCliVersion();console['log'](_0x143491(0x18a)+_0x40c10f),console['log'](_0x143491(0x1a1));const _0x387507=await resolveTargetVersion(_0x11cf3b);if(!_0x387507){const _0x37b1b0=_0x11cf3b[_0x143491(0x1a8)](_0x143491(0x18e))?_0x143491(0x18e):_0x143491(0x1bc),_0x4b7d6b='Unable\x20to\x20resolve\x20'+_0x37b1b0+'\x20version\x20from\x20npm.';return console['warn'](_0x4b7d6b),console['log'](_0x143491(0x192)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x37b1b0),{'ok':![]};}if(!shouldInstallTarget(_0x40c10f,_0x387507)){const _0x37851f=_0x387507[_0x143491(0x1d0)]===_0x143491(0x187)?_0x143491(0x180)+_0x387507[_0x143491(0x187)]+').':_0x143491(0x198)+_0x387507['version']+').';return console[_0x143491(0x186)](_0x37851f),shouldSkipCliBuiltInSkill(_0x11cf3b)?console['log'](_0x143491(0x194)):await installCliBuiltInSkill(_0x11cf3b['nonInteractive']),{'ok':!![]};}console[_0x143491(0x186)](_0x143491(0x191)+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0x40c10f+_0x143491(0x1b1)+_0x387507['version']);const _0x16e7b1=installCliPackage(_0x387507[_0x143491(0x187)],_0x11cf3b[_0x143491(0x1ac)]);if(!_0x16e7b1['ok']){const _0x4bf090='Update\x20failed:\x20'+(_0x16e7b1['error']||'unknown');return console[_0x143491(0x18d)](_0x4bf090),console[_0x143491(0x186)]('\x20\x20Try\x20manually:\x20npm\x20install\x20-g\x20'+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x387507[_0x143491(0x187)]),{'ok':![]};}return console['log'](_0x143491(0x1c2)+_0x387507[_0x143491(0x187)]+'.'),console[_0x143491(0x186)](_0x143491(0x1c9)),shouldSkipCliBuiltInSkill(_0x11cf3b)?console[_0x143491(0x186)](_0x143491(0x194)):await installCliBuiltInSkill(_0x11cf3b[_0x143491(0x1ac)]),{'ok':!![]};}export const updateDefinition={'service':a59_0x38764d(0x1bd),'command':a59_0x38764d(0x193),'description':'Update\x20'+CLI_BIN_NAME+a59_0x38764d(0x190),'risk':a59_0x38764d(0x1a3),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a60_0x1e1936=a60_0x5dff;function a60_0x5dff(_0xc25aa4,_0x5a4b66){_0xc25aa4=_0xc25aa4-0x188;const _0x3969fe=a60_0x3969();let _0x5dffd6=_0x3969fe[_0xc25aa4];return _0x5dffd6;}(function(_0x5e9b73,_0x4102e5){const _0x38c0a6=a60_0x5dff,_0x5423cf=_0x5e9b73();while(!![]){try{const _0x3c6558=parseInt(_0x38c0a6(0x1ad))/0x1+parseInt(_0x38c0a6(0x19b))/0x2*(-parseInt(_0x38c0a6(0x1aa))/0x3)+parseInt(_0x38c0a6(0x1a4))/0x4*(-parseInt(_0x38c0a6(0x1a5))/0x5)+parseInt(_0x38c0a6(0x1b6))/0x6*(parseInt(_0x38c0a6(0x1bf))/0x7)+-parseInt(_0x38c0a6(0x1c2))/0x8*(parseInt(_0x38c0a6(0x18a))/0x9)+parseInt(_0x38c0a6(0x1be))/0xa+-parseInt(_0x38c0a6(0x18d))/0xb*(parseInt(_0x38c0a6(0x188))/0xc);if(_0x3c6558===_0x4102e5)break;else _0x5423cf['push'](_0x5423cf['shift']());}catch(_0x41b6c8){_0x5423cf['push'](_0x5423cf['shift']());}}}(a60_0x3969,0x41007));import{CLI_BIN_NAME}from'../../constant/cli.js';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':'app','type':a60_0x1e1936(0x1a7),'description':a60_0x1e1936(0x1bd)},{'name':a60_0x1e1936(0x1b1),'type':a60_0x1e1936(0x1a7),'description':a60_0x1e1936(0x18b)},{'name':'env','type':a60_0x1e1936(0x1a7),'description':a60_0x1e1936(0x194),'enum':[...RUNTIME_ENV_VALUES]},{'name':a60_0x1e1936(0x1ab),'type':a60_0x1e1936(0x1b3),'description':a60_0x1e1936(0x18f),'default':![]}];async function executeWorkspaceUse(_0xd38427,_0x391c08){const _0x4b9611=a60_0x1e1936,_0x3bc78b=_0xd38427[_0x4b9611(0x19d)]('app')[_0x4b9611(0x196)](),_0x21ad1e=_0xd38427[_0x4b9611(0x19d)](_0x4b9611(0x1b1))['trim'](),_0x3c954a=_0xd38427[_0x4b9611(0x19d)](_0x4b9611(0x1bc))[_0x4b9611(0x196)](),_0x11784b=resolveWorkspaceEnv(_0x3c954a||_0xd38427['envName']||DEFAULT_CONFIG_VALUES[_0x4b9611(0x1bc)]);if(!_0x3bc78b&&!_0x21ad1e)throw CliErrors[_0x4b9611(0x18e)]('Missing\x20workspace\x20app\x20selector.','Usage:\x20'+CLI_BIN_NAME+_0x4b9611(0x1c0)+_0x391c08+'\x20--app\x20<name>\x20[--env\x20daily]\x20or\x20'+CLI_BIN_NAME+_0x4b9611(0x1c0)+_0x391c08+_0x4b9611(0x1a9));const _0x172616=_0x21ad1e||await resolveRemoteAppCode({'command':_0x391c08,'appName':_0x3bc78b,'env':_0x11784b,'accessKey':_0xd38427[_0x4b9611(0x18c)]}),_0x2f056f=writeWorkspaceConfig({'command':_0x391c08,'appName':_0x3bc78b,'appcode':_0x172616,'env':_0x11784b,'shouldWriteEnv':!!_0x3c954a,'accessKey':_0xd38427[_0x4b9611(0x18c)]});return{'ok':!![],'data':{'configPath':_0x2f056f,'app':_0x3bc78b||null,'appcode':_0x172616,'env':_0x3c954a?_0x11784b:null,'accessKeyWritten':![],'command':_0x4b9611(0x1b5)+_0x391c08},'message':buildWorkspaceMessage(_0x2f056f,_0x3bc78b,_0x172616,_0x3c954a?_0x11784b:undefined)};}async function resolveRemoteAppCode(_0x408dd6){const _0x1ee190=a60_0x1e1936;if(!_0x408dd6[_0x1ee190(0x18c)])throw CliErrors['authRequired'](_0x1ee190(0x1af)+CLI_BIN_NAME+'\x20workspace\x20'+_0x408dd6[_0x1ee190(0x19e)]+'.');const {setActiveAK:_0xfc6074}=await import(_0x1ee190(0x1a8)),{getRemoteAppList:_0x1738dc}=await import('../../commands/app/remote-source.js');_0xfc6074(_0x408dd6[_0x1ee190(0x18c)]);const _0x1be268=await _0x1738dc({'env':_0x408dd6['env'],'accessKey':_0x408dd6[_0x1ee190(0x18c)],'noCache':![]}),_0x4336a3=findAppByName(_0x1be268[_0x1ee190(0x198)],_0x408dd6[_0x1ee190(0x1b8)]);if(_0x4336a3&&!isRuntimeAccessibleApp(_0x4336a3))throw runtimeInaccessibleAppError(_0x4336a3,'\x22'+_0x408dd6['appName']+'\x22');const _0x32a9d1=_0x4336a3?.[_0x1ee190(0x1b2)]?.[_0x1ee190(0x196)]();if(_0x32a9d1)return _0x32a9d1;const _0x141822=_0x1be268['items'][_0x1ee190(0x192)](_0x4644c8=>_0x4644c8[_0x1ee190(0x1b8)])[_0x1ee190(0x197)](Boolean),_0x490018=_0x141822[_0x1ee190(0x1ac)]?_0x1ee190(0x189)+Array[_0x1ee190(0x190)](new Set(_0x141822))[_0x1ee190(0x1bb)](',\x20')+'.':_0x1ee190(0x1a6)+CLI_BIN_NAME+_0x1ee190(0x199);throw CliErrors[_0x1ee190(0x18e)](_0x1ee190(0x1b9)+_0x408dd6[_0x1ee190(0x1b8)]+_0x1ee190(0x1ae),_0x490018);}function a60_0x3969(){const _0x2956ec=['filter','items','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20pass\x20--appcode\x20directly.','Invalid\x20env\x20\x22','2GHNGUU','workspace','str','command','init','isArray','Initialize\x20app\x20context\x20for\x20the\x20current\x20workspace','use','project','15372bpnEtV','140vfSPle','Run\x20`','string','../../core/api-client.js','\x20--appcode\x20<code>\x20[--env\x20daily]','241809RYXQjw','yes','length','456873ziuuBz','\x22\x20not\x20found.','Resolving\x20--app\x20requires\x20accessKey.\x20Pass\x20--appcode\x20directly,\x20or\x20set\x20accessKey\x20before\x20running\x20','Workspace\x20configured.\x0aConfig\x20file:\x20','appcode','appCode','boolean','apps','workspace\x20','6XHzmkJ','app','appName','App\x20\x22','defaultApp','join','env','App\x20name\x20to\x20bind\x20as\x20the\x20current\x20workspace\x20default','1000820ZIsNFY','3605371EhSjNd','\x20workspace\x20','\x22.\x20Allowed:\x20','1094744xJXuUK','24ZrwwLq','Available\x20apps:\x20','18QMrELj','App\x20code\x20to\x20bind\x20directly','accessKey','1891274HNOZgE','validation','Compatibility\x20flag;\x20workspace\x20config\x20updates\x20are\x20non-interactive','from','Set\x20app\x20context\x20for\x20the\x20current\x20workspace','map','shouldWriteEnv','Target\x20environment','write','trim'];a60_0x3969=function(){return _0x2956ec;};return a60_0x3969();}function writeWorkspaceConfig(_0x29aa74){const _0x22dd2b=a60_0x1e1936,_0x2f6bfd=resolveWriteConfigPath(_0x22dd2b(0x1a3)),_0x8b54bc=readConfigFile(_0x2f6bfd);_0x29aa74[_0x22dd2b(0x193)]&&(_0x8b54bc[_0x22dd2b(0x1bc)]=_0x29aa74['env']);if(_0x29aa74[_0x22dd2b(0x1b8)]){const _0x57078f=isRecord(_0x8b54bc[_0x22dd2b(0x1b4)])?{..._0x8b54bc[_0x22dd2b(0x1b4)]}:{},_0x14cfbf=isRecord(_0x57078f[_0x29aa74[_0x22dd2b(0x1b8)]])?_0x57078f[_0x29aa74[_0x22dd2b(0x1b8)]]:{};_0x57078f[_0x29aa74[_0x22dd2b(0x1b8)]]={..._0x14cfbf,'appcode':_0x29aa74[_0x22dd2b(0x1b1)]},_0x8b54bc[_0x22dd2b(0x1b4)]=_0x57078f,_0x8b54bc[_0x22dd2b(0x1ba)]=_0x29aa74[_0x22dd2b(0x1b8)];if(_0x8b54bc[_0x22dd2b(0x1b7)])delete _0x8b54bc[_0x22dd2b(0x1b7)];return writeAndReturn(_0x2f6bfd,_0x8b54bc);}_0x8b54bc[_0x22dd2b(0x1b1)]=_0x29aa74[_0x22dd2b(0x1b1)];if(_0x8b54bc[_0x22dd2b(0x1b7)])delete _0x8b54bc[_0x22dd2b(0x1b7)];return writeAndReturn(_0x2f6bfd,_0x8b54bc);}function writeAndReturn(_0x5ed558,_0x18faa8){return writeConfigFile(_0x5ed558,_0x18faa8),_0x5ed558;}function resolveWorkspaceEnv(_0xfcc41a){const _0x27ecf5=a60_0x1e1936;if(RUNTIME_ENV_VALUES['includes'](_0xfcc41a))return _0xfcc41a;throw CliErrors[_0x27ecf5(0x18e)](_0x27ecf5(0x19a)+_0xfcc41a+_0x27ecf5(0x1c1)+RUNTIME_ENV_VALUES[_0x27ecf5(0x1bb)](',\x20'));}function buildWorkspaceMessage(_0x383d23,_0x5aeb2c,_0x213f2b,_0x2385f2){const _0x1395a7=a60_0x1e1936,_0x42b049=_0x5aeb2c?_0x5aeb2c+'\x20('+_0x213f2b+')':_0x213f2b,_0x5618a0=_0x2385f2?'\x0aEnv:\x20'+_0x2385f2:'';return _0x1395a7(0x1b0)+_0x383d23+'\x0aDefault\x20app:\x20'+_0x42b049+_0x5618a0+'\x0aAccessKey:\x20not\x20written';}function isRecord(_0x44c3dd){const _0x9c2a6d=a60_0x1e1936;return typeof _0x44c3dd==='object'&&_0x44c3dd!==null&&!Array[_0x9c2a6d(0x1a0)](_0x44c3dd);}function makeWorkspaceCommand(_0x1f6e5d){const _0xb0c53b=a60_0x1e1936;return{'service':_0xb0c53b(0x19c),'command':_0x1f6e5d,'description':_0x1f6e5d===_0xb0c53b(0x19f)?_0xb0c53b(0x1a1):_0xb0c53b(0x191),'risk':_0xb0c53b(0x195),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':WORKSPACE_USE_FLAGS,async 'execute'(_0x25f6b7){return executeWorkspaceUse(_0x25f6b7,_0x1f6e5d);}};}export const workspaceDefinitions=[makeWorkspaceCommand(a60_0x1e1936(0x19f)),makeWorkspaceCommand(a60_0x1e1936(0x1a2))];
|
package/lib/config/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a61_0x4b3df5=a61_0x1de4;(function(_0x22f2d2,_0x470a16){const _0x2d087a=a61_0x1de4,_0x15154f=_0x22f2d2();while(!![]){try{const _0x13f533=parseInt(_0x2d087a(0x172))/0x1*(-parseInt(_0x2d087a(0x184))/0x2)+parseInt(_0x2d087a(0x166))/0x3*(-parseInt(_0x2d087a(0x17d))/0x4)+parseInt(_0x2d087a(0x174))/0x5*(-parseInt(_0x2d087a(0x16c))/0x6)+-parseInt(_0x2d087a(0x179))/0x7+parseInt(_0x2d087a(0x16b))/0x8+-parseInt(_0x2d087a(0x16f))/0x9*(-parseInt(_0x2d087a(0x16e))/0xa)+parseInt(_0x2d087a(0x162))/0xb*(parseInt(_0x2d087a(0x183))/0xc);if(_0x13f533===_0x470a16)break;else _0x15154f['push'](_0x15154f['shift']());}catch(_0xec563a){_0x15154f['push'](_0x15154f['shift']());}}}(a61_0x2cc4,0xaf2b7));function a61_0x1de4(_0x1c4ef3,_0x2fa980){_0x1c4ef3=_0x1c4ef3-0x160;const _0x2cc48e=a61_0x2cc4();let _0x1de453=_0x2cc48e[_0x1c4ef3];return _0x1de453;}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':a61_0x4b3df5(0x17b),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':RUNTIME_ENV_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a61_0x4b3df5(0x181)],'importable':!![]},'format':{'description':a61_0x4b3df5(0x17f),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':OUTPUT_FORMAT_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES['format'],'importable':!![]},'pageSize':{'description':a61_0x4b3df5(0x167),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'apiDomain':{'description':a61_0x4b3df5(0x178),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'userDomain':{'description':a61_0x4b3df5(0x175),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'runtimeDomain':{'description':a61_0x4b3df5(0x164),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'skillHubDomain':{'description':a61_0x4b3df5(0x173),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'accessKey':{'description':a61_0x4b3df5(0x180),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'riskLevel':{'description':a61_0x4b3df5(0x171),'topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES['riskLevel'],'importable':!![]},'locale':{'description':a61_0x4b3df5(0x170),'topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a61_0x4b3df5(0x17e)],'importable':!![],'legacyCompatOnly':!![]}};export const TOP_LEVEL_CONFIG_KEYS=new Set(Object[a61_0x4b3df5(0x160)](CONFIG_FIELD_SCHEMAS)[a61_0x4b3df5(0x16a)](([,_0xeb5052])=>_0xeb5052[a61_0x4b3df5(0x182)])['map'](([_0x23f4f4])=>_0x23f4f4));export const CONFIG_ENUM_VALUES=Object[a61_0x4b3df5(0x169)](Object[a61_0x4b3df5(0x160)](CONFIG_FIELD_SCHEMAS)[a61_0x4b3df5(0x16a)](([,_0x4d8822])=>_0x4d8822[a61_0x4b3df5(0x17a)])[a61_0x4b3df5(0x168)](([_0x403f21,_0x16aa18])=>[_0x403f21,[..._0x16aa18[a61_0x4b3df5(0x17a)]||[]]]));export const IMPORTABLE_RUNTIME_CONFIG_KEYS=Object[a61_0x4b3df5(0x160)](CONFIG_FIELD_SCHEMAS)[a61_0x4b3df5(0x16a)](([,_0x55d18f])=>_0x55d18f[a61_0x4b3df5(0x176)])[a61_0x4b3df5(0x168)](([_0x65914])=>_0x65914);function a61_0x2cc4(){const _0x5a8604=['Default\x20page\x20size','map','fromEntries','filter','6211064vJITSS','6ZRTBrP','legacyCompatOnly','670PKucMp','35037AqfpMr','Locale','Risk\x20level','137519ewzCej','Override\x20SkillHub\x20domain','6658895buocSy','Override\x20user\x20domain','importable','defaultValue','Override\x20API\x20domain','1651307RjbeDh','enumValues','Target\x20environment','join','4iCSPOd','locale','Default\x20output\x20format','Access\x20key\x20(client-ak\x20auth)','env','cliSettableTopLevel','198372SDNPdk','6VqLlQP','entries','Config\x20key.\x20Top-level:\x20','2024fXiEZl',';\x20local\x20alias:\x20apps.<alias>.appcode','Override\x20runtime\x20domain','has','4143558aKsxEb'];a61_0x2cc4=function(){return _0x5a8604;};return a61_0x2cc4();}export function getConfigFieldSchema(_0xb79e03){return CONFIG_FIELD_SCHEMAS[_0xb79e03];}export function getConfigEnumValues(_0x4636fa){const _0x42a89d=a61_0x4b3df5;return getConfigFieldSchema(_0x4636fa)?.[_0x42a89d(0x17a)];}export function getConfigDefaultValue(_0x157b06){const _0x551bff=a61_0x4b3df5;return getConfigFieldSchema(_0x157b06)?.[_0x551bff(0x177)];}export function isTopLevelConfigKey(_0x4f456d){const _0x3ff301=a61_0x4b3df5;return TOP_LEVEL_CONFIG_KEYS[_0x3ff301(0x165)](_0x4f456d);}export function isLegacyCompatConfigKey(_0x5116db){const _0x1ff013=a61_0x4b3df5;return getConfigFieldSchema(_0x5116db)?.[_0x1ff013(0x16d)]===!![];}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function formatConfigKeyList(_0x54ba89){const _0x3413a5=a61_0x4b3df5;return[..._0x54ba89][_0x3413a5(0x17c)](',\x20');}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x153903=a61_0x4b3df5;return _0x153903(0x161)+getTopLevelConfigKeySummary()+_0x153903(0x163);}export function buildAppProfileListFields(_0x5627dd){return{'env':_0x5627dd,'hasAccessKey':![],'format':null,'pageSize':null,'riskLevel':null,'locale':null};}
|
package/lib/constant/app.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a62_0x52e0(_0x1bb965,_0x9d382){_0x1bb965=_0x1bb965-0xba;const _0x550a54=a62_0x550a();let _0x52e06c=_0x550a54[_0x1bb965];return _0x52e06c;}const a62_0x49cf6d=a62_0x52e0;function a62_0x550a(){const _0x137154=['UNPUBLISH','594LkRHyl','40607BbelsF','1236WhcAtS','52776zrsrhA','Published','6779856oJNqnQ','6018771SHvnqN','10VHsFAo','1425128VdDvqe','10OxwTFO','836857fvbsZh','2428aoZtjC'];a62_0x550a=function(){return _0x137154;};return a62_0x550a();}(function(_0x385879,_0x4a578d){const _0x53d3a8=a62_0x52e0,_0x4f04b6=_0x385879();while(!![]){try{const _0x3b0637=-parseInt(_0x53d3a8(0xbd))/0x1+parseInt(_0x53d3a8(0xbe))/0x2*(parseInt(_0x53d3a8(0xc2))/0x3)+parseInt(_0x53d3a8(0xbb))/0x4*(parseInt(_0x53d3a8(0xbc))/0x5)+parseInt(_0x53d3a8(0xc0))/0x6*(parseInt(_0x53d3a8(0xc1))/0x7)+-parseInt(_0x53d3a8(0xc5))/0x8+parseInt(_0x53d3a8(0xc3))/0x9+parseInt(_0x53d3a8(0xba))/0xa*(parseInt(_0x53d3a8(0xc6))/0xb);if(_0x3b0637===_0x4a578d)break;else _0x4f04b6['push'](_0x4f04b6['shift']());}catch(_0x2940ea){_0x4f04b6['push'](_0x4f04b6['shift']());}}}(a62_0x550a,0xa0165));export const APP_PUBLISH_STATUS={'Published':'PUBLISHED','Unpublished':a62_0x49cf6d(0xbf)};export const RUNTIME_ACCESSIBLE_APP_STATUS=APP_PUBLISH_STATUS[a62_0x49cf6d(0xc4)];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a63_0x39ba(_0x3310b3,_0x733575){_0x3310b3=_0x3310b3-0x193;const _0xb66820=a63_0xb668();let _0x39bae0=_0xb66820[_0x3310b3];return _0x39bae0;}(function(_0x5699d0,_0xd3aa6a){const _0x3ba607=a63_0x39ba,_0x3a007f=_0x5699d0();while(!![]){try{const _0x2b9a03=-parseInt(_0x3ba607(0x194))/0x1*(-parseInt(_0x3ba607(0x199))/0x2)+parseInt(_0x3ba607(0x196))/0x3+-parseInt(_0x3ba607(0x19c))/0x4*(-parseInt(_0x3ba607(0x19a))/0x5)+parseInt(_0x3ba607(0x197))/0x6+parseInt(_0x3ba607(0x198))/0x7*(parseInt(_0x3ba607(0x19d))/0x8)+parseInt(_0x3ba607(0x195))/0x9+-parseInt(_0x3ba607(0x19b))/0xa*(parseInt(_0x3ba607(0x193))/0xb);if(_0x2b9a03===_0xd3aa6a)break;else _0x3a007f['push'](_0x3a007f['shift']());}catch(_0x3613ac){_0x3a007f['push'](_0x3a007f['shift']());}}}(a63_0xb668,0x8cf6d));export const AUTH_MODE={'ClientAk':'client-ak'};export function isAuthMode(_0x3ec6a8){const _0x1bce31=a63_0x39ba;return _0x3ec6a8===AUTH_MODE[_0x1bce31(0x19e)];}function a63_0xb668(){const _0xc701f2=['265398rHhpkI','1274638myhNGw','1340760CeYYyY','9080YKgSNe','8QnxUwn','104JmMrho','ClientAk','36311OXeiED','1eKaIWd','9119574DcxqaV','249414BPwHsI','4870608OupmCu'];a63_0xb668=function(){return _0xc701f2;};return a63_0xb668();}
|
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a64_0x1aaef3=a64_0x4566;(function(_0x48affc,_0x4b20db){const _0x1f0477=a64_0x4566,_0x13e8ac=_0x48affc();while(!![]){try{const _0x2956b2=parseInt(_0x1f0477(0x97))/0x1+parseInt(_0x1f0477(0x84))/0x2+-parseInt(_0x1f0477(0x6a))/0x3*(parseInt(_0x1f0477(0x68))/0x4)+parseInt(_0x1f0477(0x94))/0x5*(-parseInt(_0x1f0477(0x87))/0x6)+-parseInt(_0x1f0477(0x83))/0x7*(-parseInt(_0x1f0477(0x6c))/0x8)+-parseInt(_0x1f0477(0x77))/0x9+-parseInt(_0x1f0477(0x82))/0xa*(-parseInt(_0x1f0477(0x8b))/0xb);if(_0x2956b2===_0x4b20db)break;else _0x13e8ac['push'](_0x13e8ac['shift']());}catch(_0x3b05ff){_0x13e8ac['push'](_0x13e8ac['shift']());}}}(a64_0x3642,0x78307));import{PRODUCT_CONFIG}from'../constant/product.js';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';export const CLI_BIN_NAME=PRODUCT_CONFIG[a64_0x1aaef3(0x90)];export const CLI_DISPLAY_NAME=PRODUCT_CONFIG[a64_0x1aaef3(0x8d)];export const NPM_PACKAGE_NAME=LOVRABET_NPM_PACKAGE_NAME;function a64_0x4566(_0x5a4e85,_0x421ec3){_0x5a4e85=_0x5a4e85-0x66;const _0x364213=a64_0x3642();let _0x45664e=_0x364213[_0x5a4e85];return _0x45664e;}export const GLOBAL_FLAGS=[{'name':a64_0x1aaef3(0x8a),'meowKey':a64_0x1aaef3(0x8a),'type':a64_0x1aaef3(0x79),'description':a64_0x1aaef3(0x6f),'hint':a64_0x1aaef3(0x91)},{'name':a64_0x1aaef3(0x69),'meowKey':a64_0x1aaef3(0x69),'type':a64_0x1aaef3(0x79),'description':a64_0x1aaef3(0x89),'hint':a64_0x1aaef3(0x66)},{'name':a64_0x1aaef3(0x81),'meowKey':a64_0x1aaef3(0x81),'type':a64_0x1aaef3(0x79),'description':a64_0x1aaef3(0x8f),'hint':'production\x20|\x20development\x20|\x20daily'},{'name':a64_0x1aaef3(0x76),'meowKey':a64_0x1aaef3(0x76),'type':a64_0x1aaef3(0x79),'description':a64_0x1aaef3(0x73),'hint':a64_0x1aaef3(0x78)},{'name':'jq','meowKey':'jq','type':'string','description':a64_0x1aaef3(0x85),'hint':a64_0x1aaef3(0x80)},{'name':a64_0x1aaef3(0x8c),'meowKey':a64_0x1aaef3(0x93),'type':'boolean','description':a64_0x1aaef3(0x7c)},{'name':a64_0x1aaef3(0x71),'meowKey':'yes','type':a64_0x1aaef3(0x6b),'description':a64_0x1aaef3(0x98)},{'name':a64_0x1aaef3(0x6e),'meowKey':a64_0x1aaef3(0x95),'type':a64_0x1aaef3(0x6b),'description':a64_0x1aaef3(0x75)},{'name':a64_0x1aaef3(0x7b),'meowKey':a64_0x1aaef3(0x7b),'type':'boolean','description':a64_0x1aaef3(0x96)},{'name':'ci','meowKey':'ci','type':a64_0x1aaef3(0x6b),'description':a64_0x1aaef3(0x7e),'hidden':!![]},{'name':a64_0x1aaef3(0x9a),'meowKey':'help','type':a64_0x1aaef3(0x6b),'description':a64_0x1aaef3(0x67)},{'name':'id','meowKey':'id','type':a64_0x1aaef3(0x79),'description':a64_0x1aaef3(0x88),'hidden':!![]},{'name':'name','meowKey':a64_0x1aaef3(0x7f),'type':a64_0x1aaef3(0x79),'description':a64_0x1aaef3(0x99),'hidden':!![]},{'name':a64_0x1aaef3(0x74),'meowKey':a64_0x1aaef3(0x74),'type':'string','description':a64_0x1aaef3(0x9b),'hidden':!![]},{'name':a64_0x1aaef3(0x86),'meowKey':a64_0x1aaef3(0x86),'type':a64_0x1aaef3(0x79),'description':'JSON\x20params\x20for\x20execute\x20commands','hidden':!![]},{'name':a64_0x1aaef3(0x6d),'meowKey':'verbose','type':'boolean','description':a64_0x1aaef3(0x70),'hidden':!![]},{'name':a64_0x1aaef3(0x92),'meowKey':a64_0x1aaef3(0x92),'type':a64_0x1aaef3(0x6b),'description':a64_0x1aaef3(0x72),'hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a64_0x1aaef3(0x8a),a64_0x1aaef3(0x69),a64_0x1aaef3(0x81),a64_0x1aaef3(0x76),'jq',a64_0x1aaef3(0x8c),a64_0x1aaef3(0x71),'non-interactive','ci']);function a64_0x3642(){const _0xce7c80=['5978693ydTxTv','208730oJUNDn','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20implies\x20--format\x20json\x20when\x20current\x20format\x20is\x20pretty)','params','4517490qSgPPa','Record\x20ID','Select\x20app\x20profile\x20by\x20name','appcode','11yXmHiC','dry-run','cliDisplayName','type','Environment','cliBinName','<code>','clear','dryRun','5mGOHbW','nonInteractive','Use\x20global\x20config\x20scope','66543vgmhCF','Skip\x20confirmation\x20for\x20high-risk\x20writes','Name\x20filter','help','SQL\x20query\x20code','<name>','Show\x20help','43556oAEydZ','app','204RjsGqs','boolean','8ElvLUx','verbose','non-interactive','Override\x20appcode','Verbose\x20output','yes','Clear\x20output','Output\x20format','sqlcode','Force\x20non-interactive\x20mode\x20(CI)','format','8521344IXFxHW','json\x20|\x20pretty\x20|\x20compress','string','fromEntries','global','Preview\x20operation\x20without\x20executing','meowKey','Alias\x20for\x20--non-interactive','name','<expr>','env','19074710oWWTtP'];a64_0x3642=function(){return _0xce7c80;};return a64_0x3642();}export function buildMeowFlags(){const _0x2ae4a8=a64_0x1aaef3;return Object[_0x2ae4a8(0x7a)](GLOBAL_FLAGS['map'](_0x5195e3=>[_0x5195e3[_0x2ae4a8(0x7d)],{'type':_0x5195e3[_0x2ae4a8(0x8e)]}]));}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a65_0xa8f0a1=a65_0x3e80;(function(_0x3ed871,_0x1bd403){const _0x1e1202=a65_0x3e80,_0x44b57c=_0x3ed871();while(!![]){try{const _0xe0007=parseInt(_0x1e1202(0xba))/0x1+-parseInt(_0x1e1202(0xbf))/0x2+-parseInt(_0x1e1202(0xb3))/0x3*(-parseInt(_0x1e1202(0xbe))/0x4)+-parseInt(_0x1e1202(0xb5))/0x5+parseInt(_0x1e1202(0xbb))/0x6*(-parseInt(_0x1e1202(0xbc))/0x7)+-parseInt(_0x1e1202(0xb8))/0x8*(parseInt(_0x1e1202(0xb6))/0x9)+parseInt(_0x1e1202(0xb4))/0xa;if(_0xe0007===_0x1bd403)break;else _0x44b57c['push'](_0x44b57c['shift']());}catch(_0x317511){_0x44b57c['push'](_0x44b57c['shift']());}}}(a65_0x3c9a,0x60cf3));export const DEFAULT_APP_PROFILE_NAME='main';export const DEFAULT_CONFIG_VALUES={'env':a65_0xa8f0a1(0xb9),'format':a65_0xa8f0a1(0xb2),'locale':a65_0xa8f0a1(0xb7),'riskLevel':a65_0xa8f0a1(0xbd)};function a65_0x3e80(_0x1ecbe0,_0x4e1930){_0x1ecbe0=_0x1ecbe0-0xb2;const _0x3c9a1e=a65_0x3c9a();let _0x3e8049=_0x3c9a1e[_0x1ecbe0];return _0x3e8049;}function a65_0x3c9a(){const _0x5c86b3=['3qTcFct','7303220HprSPj','1771830CEGwrC','9NzBCFq','en-US','1063736SBQslg','production','302816NZnRcO','911046XGslop','7aaBCwp','write','3168556eNSdXq','1579144ltEETM','compress'];a65_0x3c9a=function(){return _0x5c86b3;};return a65_0x3c9a();}export const DEFAULT_COMMAND_OUTPUT_FORMAT=a65_0xa8f0a1(0xb2);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a66_0x3fcb0f=a66_0x2e05;function a66_0x2f9d(){const _0x268696=['915WfuoFj','96mLEXQN','4512200KBwfep','703779NAUjkO','6040ZLaoqa','10468YeEUXr','npmPackageName','19870WmpIdo','4634prHvum','1422jcAJJL','npmRegistryBaseUrl','1029546vYQNtE','skillSource','14821cOWWdH'];a66_0x2f9d=function(){return _0x268696;};return a66_0x2f9d();}function a66_0x2e05(_0x45e96d,_0x52af0f){_0x45e96d=_0x45e96d-0xb0;const _0x2f9df7=a66_0x2f9d();let _0x2e05bd=_0x2f9df7[_0x45e96d];return _0x2e05bd;}(function(_0x239eba,_0x474ac1){const _0x3257a5=a66_0x2e05,_0x27fada=_0x239eba();while(!![]){try{const _0x3a4b06=parseInt(_0x3257a5(0xb3))/0x1*(-parseInt(_0x3257a5(0xb5))/0x2)+parseInt(_0x3257a5(0xb7))/0x3+parseInt(_0x3257a5(0xb9))/0x4*(parseInt(_0x3257a5(0xb4))/0x5)+parseInt(_0x3257a5(0xb1))/0x6+parseInt(_0x3257a5(0xbc))/0x7*(-parseInt(_0x3257a5(0xb8))/0x8)+-parseInt(_0x3257a5(0xbd))/0x9*(-parseInt(_0x3257a5(0xbb))/0xa)+parseInt(_0x3257a5(0xb6))/0xb;if(_0x3a4b06===_0x474ac1)break;else _0x27fada['push'](_0x27fada['shift']());}catch(_0x45de78){_0x27fada['push'](_0x27fada['shift']());}}}(a66_0x2f9d,0x612c7));import{PRODUCT_CONFIG}from'../constant/product.js';export const LOVRABET_NPM_PACKAGE_NAME=PRODUCT_CONFIG[a66_0x3fcb0f(0xba)];export const LOVRABET_SKILL_SOURCE=PRODUCT_CONFIG[a66_0x3fcb0f(0xb2)];export const NPM_REGISTRY_BASE_URL=PRODUCT_CONFIG[a66_0x3fcb0f(0xb0)];
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a67_0x220a(_0x590ca8,_0x176a7b){_0x590ca8=_0x590ca8-0x83;const _0x2655b2=a67_0x2655();let _0x220ad0=_0x2655b2[_0x590ca8];return _0x220ad0;}const a67_0x17751c=a67_0x220a;(function(_0xe10778,_0x18e489){const _0x2c7335=a67_0x220a,_0x227a81=_0xe10778();while(!![]){try{const _0x2ff618=parseInt(_0x2c7335(0x8e))/0x1*(parseInt(_0x2c7335(0x95))/0x2)+-parseInt(_0x2c7335(0x89))/0x3*(-parseInt(_0x2c7335(0x8c))/0x4)+parseInt(_0x2c7335(0x91))/0x5+parseInt(_0x2c7335(0x83))/0x6+-parseInt(_0x2c7335(0x8d))/0x7*(parseInt(_0x2c7335(0x97))/0x8)+-parseInt(_0x2c7335(0x8f))/0x9*(parseInt(_0x2c7335(0x94))/0xa)+-parseInt(_0x2c7335(0x8b))/0xb;if(_0x2ff618===_0x18e489)break;else _0x227a81['push'](_0x227a81['shift']());}catch(_0x2b5c86){_0x227a81['push'](_0x227a81['shift']());}}}(a67_0x2655,0x92446));import{getEnv,isProduction}from'../constant/env.js';import{PRODUCT_CONFIG}from'../constant/product.js';function a67_0x2655(){const _0x3ffae4=['556630nElcbH','154zApsEr','user','1016ArAfUd','5735262ayGEJR','userDomain','apiDomain','runtimeDomain','runtime','api','18534ZdpcFo','domains','19573664cAecMZ','588gmShlQ','5600ykloyr','4058ISjYVl','54ThXNZx','production','3188015fFIMaD','nonProduction','skillhub'];a67_0x2655=function(){return _0x3ffae4;};return a67_0x2655();}let customApiDomain,customUserDomain,customRuntimeDomain,customSkillHubDomain;export function initDomains(_0x597729){const _0x49ec39=a67_0x220a;customApiDomain=_0x597729?.[_0x49ec39(0x85)],customUserDomain=_0x597729?.[_0x49ec39(0x84)],customRuntimeDomain=_0x597729?.[_0x49ec39(0x86)],customSkillHubDomain=_0x597729?.['skillHubDomain'];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?PRODUCT_CONFIG['domains'][a67_0x17751c(0x90)][a67_0x17751c(0x96)]:PRODUCT_CONFIG['domains'][a67_0x17751c(0x92)][a67_0x17751c(0x96)]);export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a67_0x17751c(0x8a)]['production'][a67_0x17751c(0x88)]:PRODUCT_CONFIG[a67_0x17751c(0x8a)][a67_0x17751c(0x92)][a67_0x17751c(0x88)]);export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?PRODUCT_CONFIG['domains'][a67_0x17751c(0x90)][a67_0x17751c(0x87)]:PRODUCT_CONFIG[a67_0x17751c(0x8a)][a67_0x17751c(0x92)][a67_0x17751c(0x87)]);export const getSkillHubDomain=()=>customSkillHubDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a67_0x17751c(0x8a)][a67_0x17751c(0x90)][a67_0x17751c(0x93)]:PRODUCT_CONFIG[a67_0x17751c(0x8a)][a67_0x17751c(0x92)][a67_0x17751c(0x93)]);
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a68_0x4b5020=a68_0xa98b;function a68_0x4a58(){const _0x28dca9=['development','daily','online','182822uiFdwt','3Ezsczu','1867663HuLzfZ','6KWcyOI','371661cfwTai','910535cwUAJu','120880WjGcjn','1649681OwUPHG','dev','8tqIzma','50zuLYaA','1071CrZBbb','production'];a68_0x4a58=function(){return _0x28dca9;};return a68_0x4a58();}(function(_0x3ae524,_0x5da845){const _0x210475=a68_0xa98b,_0x1f3c36=_0x3ae524();while(!![]){try{const _0x6de99a=parseInt(_0x210475(0x192))/0x1*(-parseInt(_0x210475(0x191))/0x2)+parseInt(_0x210475(0x195))/0x3+parseInt(_0x210475(0x197))/0x4+-parseInt(_0x210475(0x196))/0x5*(parseInt(_0x210475(0x194))/0x6)+-parseInt(_0x210475(0x193))/0x7*(parseInt(_0x210475(0x19a))/0x8)+parseInt(_0x210475(0x19c))/0x9+parseInt(_0x210475(0x19b))/0xa*(parseInt(_0x210475(0x198))/0xb);if(_0x6de99a===_0x5da845)break;else _0x1f3c36['push'](_0x1f3c36['shift']());}catch(_0x4b9dce){_0x1f3c36['push'](_0x1f3c36['shift']());}}}(a68_0x4a58,0x2c2c4));import{productEnv}from'../constant/product.js';export const RUNTIME_ENV_VALUES=[a68_0x4b5020(0x19d),a68_0x4b5020(0x18e),a68_0x4b5020(0x18f)];export function normalizeEnv(_0x10b5ab){const _0x2d1eef=a68_0x4b5020;return _0x10b5ab===_0x2d1eef(0x190)?_0x2d1eef(0x19d):_0x10b5ab;}export function isProduction(_0x51b994){const _0x90525f=a68_0x4b5020;return normalizeEnv(_0x51b994)===_0x90525f(0x19d);}export function isDaily(_0xe161a0){const _0x56b45b=a68_0x4b5020;return normalizeEnv(_0xe161a0)===_0x56b45b(0x18f);}export function isDev(_0x553924){const _0xf49a6=a68_0x4b5020,_0x3e033e=normalizeEnv(_0x553924);return _0x3e033e===_0xf49a6(0x18e)||_0x3e033e===_0xf49a6(0x199);}function a68_0xa98b(_0x2dd414,_0x4fdb1c){_0x2dd414=_0x2dd414-0x18e;const _0x4a58bf=a68_0x4a58();let _0xa98b82=_0x4a58bf[_0x2dd414];return _0xa98b82;}let env=normalizeEnv(productEnv('ENV')||a68_0x4b5020(0x19d));export function getEnv(){return env;}export function initEnv(_0x4b8700){env=normalizeEnv(_0x4b8700);}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a69_0x5f8bd0=a69_0x43c1;function a69_0x43c1(_0xb7557a,_0x1251a2){_0xb7557a=_0xb7557a-0x95;const _0x202b71=a69_0x202b();let _0x43c19f=_0x202b71[_0xb7557a];return _0x43c19f;}(function(_0x6cd99c,_0x3d7249){const _0x376e15=a69_0x43c1,_0x1e7dc8=_0x6cd99c();while(!![]){try{const _0x3a6e5b=-parseInt(_0x376e15(0x98))/0x1*(parseInt(_0x376e15(0x97))/0x2)+-parseInt(_0x376e15(0x9d))/0x3*(-parseInt(_0x376e15(0x9b))/0x4)+parseInt(_0x376e15(0x9f))/0x5+-parseInt(_0x376e15(0x96))/0x6+-parseInt(_0x376e15(0x9c))/0x7+-parseInt(_0x376e15(0x9e))/0x8+parseInt(_0x376e15(0x9a))/0x9;if(_0x3a6e5b===_0x3d7249)break;else _0x1e7dc8['push'](_0x1e7dc8['shift']());}catch(_0x45ec47){_0x1e7dc8['push'](_0x1e7dc8['shift']());}}}(a69_0x202b,0x6525b));export const OUTPUT_FORMAT_VALUES=['json',a69_0x5f8bd0(0x95),a69_0x5f8bd0(0x99)];function a69_0x202b(){const _0xe5a24c=['6iRxwKW','2680KAQypT','3847945EPckLs','pretty','2334630zqRkyW','52904JFkJbk','17RgQVMS','compress','2082780cPmlwR','1146892XIOYyo','2247224AZrnEQ'];a69_0x202b=function(){return _0xe5a24c;};return a69_0x202b();}
|
package/lib/constant/product.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a70_0x162ea1=a70_0x1c0b;function a70_0x1c0b(_0x5b346e,_0x41c3dc){_0x5b346e=_0x5b346e-0xe2;const _0x6364d1=a70_0x6364();let _0x1c0b6a=_0x6364d1[_0x5b346e];return _0x1c0b6a;}(function(_0x135029,_0x1405d0){const _0x3c4e24=a70_0x1c0b,_0x44a5d3=_0x135029();while(!![]){try{const _0x12522f=-parseInt(_0x3c4e24(0xef))/0x1*(parseInt(_0x3c4e24(0xfe))/0x2)+-parseInt(_0x3c4e24(0xf1))/0x3+parseInt(_0x3c4e24(0xea))/0x4*(-parseInt(_0x3c4e24(0xf5))/0x5)+-parseInt(_0x3c4e24(0xff))/0x6*(-parseInt(_0x3c4e24(0xe3))/0x7)+parseInt(_0x3c4e24(0xf6))/0x8+-parseInt(_0x3c4e24(0xf9))/0x9*(-parseInt(_0x3c4e24(0xec))/0xa)+parseInt(_0x3c4e24(0xf0))/0xb;if(_0x12522f===_0x1405d0)break;else _0x44a5d3['push'](_0x44a5d3['shift']());}catch(_0x1259ce){_0x44a5d3['push'](_0x44a5d3['shift']());}}}(a70_0x6364,0xb6ece));export const PRODUCT_CONFIG={'cliBinName':a70_0x162ea1(0xe7),'cliDisplayName':a70_0x162ea1(0xfb),'npmPackageName':a70_0x162ea1(0xe5),'skillSource':a70_0x162ea1(0xf7),'npmRegistryBaseUrl':a70_0x162ea1(0xf2),'envPrefix':a70_0x162ea1(0xeb),'legacyEnvPrefixes':[a70_0x162ea1(0xfc)],'configFileNames':[a70_0x162ea1(0xf8),'.lovrabetrc'],'newConfigFileName':a70_0x162ea1(0xf8),'homeDirName':a70_0x162ea1(0xe4),'logFileName':a70_0x162ea1(0x100),'invokeSource':'cli:lovrabet-runtime','userCenterDisplayName':a70_0x162ea1(0xfa),'skipNpxSkillsEnvSuffix':'SKIP_NPX_SKILLS','domains':{'production':{'user':a70_0x162ea1(0xed),'api':a70_0x162ea1(0xf3),'runtime':'https://runtime.lovrabet.com','skillhub':a70_0x162ea1(0xe8)},'nonProduction':{'user':'https://user-daily.lovrabet.com','api':a70_0x162ea1(0xe6),'runtime':a70_0x162ea1(0xf4),'skillhub':'https://skills-daily.lovrabet.com'}},'accessKeyCreatePath':a70_0x162ea1(0xe2)};export function productEnvName(_0xd87bfb){const _0x1e0a84=a70_0x162ea1;return PRODUCT_CONFIG[_0x1e0a84(0xe9)]+'_'+_0xd87bfb;}export function productEnvNames(_0x2bf286){const _0x2906a5=a70_0x162ea1;return[productEnvName(_0x2bf286),...PRODUCT_CONFIG[_0x2906a5(0xee)][_0x2906a5(0xfd)](_0x98747c=>_0x98747c+'_'+_0x2bf286)];}function a70_0x6364(){const _0x332d3c=['137097PnXvRS','Lovrabet\x20User\x20Center','Lovrabet\x20Runtime\x20CLI','RABETBASE','map','2eQuEDu','12kkNjvR','.lovrabet-runtime.log','/user/ak','976997yaQuit','.lovrabet','@lovrabet/lovrabet-cli','https://daily-api.lovrabet.com','lovrabet','https://skills.lovrabet.com','envPrefix','4zvNVxn','LOVRABET','940eWfsmq','https://user.lovrabet.com','legacyEnvPrefixes','356533chBNMg','3025737uyQowA','1770825OUaJob','https://registry.npmjs.org','https://api.lovrabet.com','https://daily-runtime.lovrabet.com','7051015eZbrQE','8961296VuYKio','lovrabet/lovrabet-cli','.lovrabet.json'];a70_0x6364=function(){return _0x332d3c;};return a70_0x6364();}export function productEnv(_0x369b74){for(const _0x100d85 of productEnvNames(_0x369b74)){const _0x1c81b5=process.env[_0x100d85];if(_0x1c81b5!==undefined)return _0x1c81b5;}return undefined;}
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a71_0xbefd(){const _0x273049=['write','read','1195748nWFKNx','761734YcrZcR','356oqQmMq','7rVmNyy','5921440QVBlhx','20TnrIuB','3639750duvJzr','4007665YzXgYK','33897kkbwap','15035211oumRuM'];a71_0xbefd=function(){return _0x273049;};return a71_0xbefd();}const a71_0x413f1d=a71_0x4bb3;function a71_0x4bb3(_0x6699b1,_0x9e5d42){_0x6699b1=_0x6699b1-0x6d;const _0xbefdc=a71_0xbefd();let _0x4bb3bf=_0xbefdc[_0x6699b1];return _0x4bb3bf;}(function(_0x1408a8,_0x52cb17){const _0x368d43=a71_0x4bb3,_0x568ef2=_0x1408a8();while(!![]){try{const _0x40d35c=parseInt(_0x368d43(0x75))/0x1+-parseInt(_0x368d43(0x76))/0x2+parseInt(_0x368d43(0x71))/0x3*(parseInt(_0x368d43(0x77))/0x4)+parseInt(_0x368d43(0x70))/0x5+-parseInt(_0x368d43(0x6f))/0x6*(-parseInt(_0x368d43(0x78))/0x7)+parseInt(_0x368d43(0x6d))/0x8+-parseInt(_0x368d43(0x72))/0x9*(parseInt(_0x368d43(0x6e))/0xa);if(_0x40d35c===_0x52cb17)break;else _0x568ef2['push'](_0x568ef2['shift']());}catch(_0x176ac6){_0x568ef2['push'](_0x568ef2['shift']());}}}(a71_0xbefd,0x993d8));export const RISK_LEVEL_VALUES=[a71_0x413f1d(0x74),a71_0x413f1d(0x73),'high-risk-write'];
|
package/lib/constant/url.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a72_0x19d5e5=a72_0x4514;(function(_0x54ad8f,_0x35292e){const _0x6a75c=a72_0x4514,_0x56430c=_0x54ad8f();while(!![]){try{const _0xd41e6a=-parseInt(_0x6a75c(0xde))/0x1+parseInt(_0x6a75c(0xd9))/0x2*(parseInt(_0x6a75c(0xdb))/0x3)+parseInt(_0x6a75c(0xe2))/0x4+-parseInt(_0x6a75c(0xe3))/0x5*(-parseInt(_0x6a75c(0xe0))/0x6)+parseInt(_0x6a75c(0xdf))/0x7+-parseInt(_0x6a75c(0xdc))/0x8+parseInt(_0x6a75c(0xda))/0x9;if(_0xd41e6a===_0x35292e)break;else _0x56430c['push'](_0x56430c['shift']());}catch(_0x118b41){_0x56430c['push'](_0x56430c['shift']());}}}(a72_0x35e3,0x6e22f));function a72_0x4514(_0x5c1516,_0x35a60b){_0x5c1516=_0x5c1516-0xd8;const _0x35e3e8=a72_0x35e3();let _0x451440=_0x35e3e8[_0x5c1516];return _0x451440;}import{PRODUCT_CONFIG}from'../constant/product.js';export const USER_ACCESS_KEY_CREATE_URL=''+PRODUCT_CONFIG[a72_0x19d5e5(0xdd)]['production'][a72_0x19d5e5(0xd8)]+PRODUCT_CONFIG[a72_0x19d5e5(0xe1)];function a72_0x35e3(){const _0x20bd8f=['4062120xPxdfV','domains','566584WwZHkw','3366797kQfjiP','348234bFbrzE','accessKeyCreatePath','1446632ReypqX','5GZCdQW','user','60HDGBgL','3278520FHEqZC','26052jMWjkd'];a72_0x35e3=function(){return _0x20bd8f;};return a72_0x35e3();}
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a73_0x4349fd=a73_0x1a82;(function(_0x1dd8ff,_0xd80771){const _0x2539b1=a73_0x1a82,_0x340736=_0x1dd8ff();while(!![]){try{const _0x3d6b24=parseInt(_0x2539b1(0x137))/0x1*(-parseInt(_0x2539b1(0x119))/0x2)+-parseInt(_0x2539b1(0xfa))/0x3*(parseInt(_0x2539b1(0x131))/0x4)+parseInt(_0x2539b1(0x130))/0x5*(-parseInt(_0x2539b1(0x11d))/0x6)+-parseInt(_0x2539b1(0x11f))/0x7+-parseInt(_0x2539b1(0x102))/0x8*(-parseInt(_0x2539b1(0x10e))/0x9)+-parseInt(_0x2539b1(0x114))/0xa*(parseInt(_0x2539b1(0x110))/0xb)+parseInt(_0x2539b1(0x106))/0xc;if(_0x3d6b24===_0xd80771)break;else _0x340736['push'](_0x340736['shift']());}catch(_0x36a94a){_0x340736['push'](_0x340736['shift']());}}}(a73_0x4e8a,0xa013f));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_0x4349fd(0x11a)];export const NEW_CONFIG_NAME=PRODUCT_CONFIG['newConfigFileName'];function resolveConfigPath(_0x536086){for(const _0x11efec of CONFIG_NAMES){const _0x5ce3ff=resolve(_0x536086,_0x11efec);if(existsSync(_0x5ce3ff))return _0x5ce3ff;}return undefined;}export function resolveWriteConfigPath(_0x1aaf36){const _0x48aad0=a73_0x4349fd,_0x3be959=_0x1aaf36===_0x48aad0(0x123)?process['cwd']():homedir(),_0x2991d8=resolveConfigPath(_0x3be959);return _0x2991d8??resolve(_0x3be959,NEW_CONFIG_NAME);}export function readConfigFile(_0x388117){const _0x4c13f3=a73_0x4349fd;try{if(existsSync(_0x388117)){const _0x3569a0=readFileSync(_0x388117,{'encoding':_0x4c13f3(0x12a)});if(_0x3569a0){const _0x176f5a=JSON[_0x4c13f3(0x136)](_0x3569a0);return migrateOnlineEnv(_0x388117,_0x176f5a),_0x176f5a;}}}catch{}return{};}function migrateOnlineEnv(_0x87c34f,_0x4d6ff3){const _0x40500f=a73_0x4349fd;let _0x11ef6d=![];_0x4d6ff3[_0x40500f(0x105)]===_0x40500f(0x10b)&&(_0x4d6ff3['env']=_0x40500f(0x141),_0x11ef6d=!![]);if(_0x4d6ff3['apps']&&typeof _0x4d6ff3['apps']===_0x40500f(0x11c))for(const _0x57ab73 of Object['values'](_0x4d6ff3[_0x40500f(0x120)])){_0x57ab73&&_0x57ab73[_0x40500f(0x105)]===_0x40500f(0x10b)&&(_0x57ab73[_0x40500f(0x105)]='production',_0x11ef6d=!![]);}if(_0x11ef6d)try{writeConfigFile(_0x87c34f,_0x4d6ff3);}catch{}}export function writeConfigFile(_0x26ed64,_0x414982){const _0x155f02=a73_0x4349fd,_0x18a3c0=dirname(_0x26ed64);!existsSync(_0x18a3c0)&&mkdirSync(_0x18a3c0,{'recursive':!![]});const _0x42c8e4=_0x26ed64+'.tmp';try{writeFileSync(_0x42c8e4,JSON[_0x155f02(0x127)](_0x414982,null,0x2)+'\x0a',{'encoding':_0x155f02(0x12a),'mode':0x180});try{renameSync(_0x42c8e4,_0x26ed64);}catch(_0x10c4e3){if(_0x10c4e3[_0x155f02(0x124)]==='EPERM'||_0x10c4e3[_0x155f02(0x124)]===_0x155f02(0x140)||_0x10c4e3[_0x155f02(0x124)]===_0x155f02(0x142)){writeFileSync(_0x26ed64,JSON[_0x155f02(0x127)](_0x414982,null,0x2)+'\x0a',{'encoding':_0x155f02(0x12a)});try{unlinkSync(_0x42c8e4);}catch{}}else throw _0x10c4e3;}}catch(_0x49b806){try{unlinkSync(_0x42c8e4);}catch{}throw _0x49b806;}}export function isNonInteractiveMode(_0x48c4fd){const _0xf29515=a73_0x4349fd;return!!(_0x48c4fd[_0xf29515(0x121)]||_0x48c4fd['ci']||productEnvNames('CI')[_0xf29515(0x107)](_0x5e0a64=>process.env[_0x5e0a64]==='true')||process.env.CI===_0xf29515(0x12c)||!process['stdout'][_0xf29515(0x132)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x5e28cc=a73_0x4349fd;if(!process[_0x5e28cc(0xfc)]['isTTY'])return![];try{const _0x1b96fc=process[_0x5e28cc(0xfc)][_0x5e28cc(0x13f)];return process[_0x5e28cc(0xfc)]['setRawMode'](!![]),process[_0x5e28cc(0xfc)][_0x5e28cc(0x11e)](_0x1b96fc??![]),!![];}catch{return![];}}function a73_0x1a82(_0x76b3ad,_0x270791){_0x76b3ad=_0x76b3ad-0xfa;const _0x4e8abe=a73_0x4e8a();let _0x1a821d=_0x4e8abe[_0x76b3ad];return _0x1a821d;}export async function createContext(_0x39a4c9){const _0x2ed60f=a73_0x4349fd,_0x32bcfb=readRawConfig(),_0x39fdcf=buildConfig(_0x32bcfb,_0x39a4c9);await initGlobalEnvironment(_0x39fdcf);const {getUserDomain:_0x47fa4c,getApiDomain:_0x4cfdbd}=await import('./constant/domain.js'),_0x5e4674={'apiDomain':_0x4cfdbd(),'userDomain':_0x47fa4c()},_0x2839b3=await buildAuth(_0x39fdcf);logger['setLogPath'](process['cwd']());const _0x29ef71=(CLI_BIN_NAME+'\x20'+process[_0x2ed60f(0x13a)][_0x2ed60f(0x13b)](0x2)[_0x2ed60f(0x12f)]('\x20'))[_0x2ed60f(0x108)]();logger[_0x2ed60f(0x139)](_0x29ef71);const _0x1647b1=isNonInteractiveMode(_0x39a4c9);return{'config':_0x39fdcf,'auth':_0x2839b3,'logger':logger,'env':_0x5e4674,'nonInteractive':_0x1647b1};}export function buildConfigFromFlags(_0x38e4d6){return buildConfig(readRawConfig(),_0x38e4d6);}function a73_0x4e8a(){const _0x587dd2=['./constant/domain.js','authRequired','7922230qrVXgU','ENV','VERBOSE','read','./constant/env.js','1217380emMhVB','configFileNames','PAGE_SIZE','object','15528EQyMYO','setRawMode','2299773CSmZrY','apps','nonInteractive','app','project','code','cwd','write','stringify','missing','skillHubDomain','utf8','inherit','true','top-level','ACCESS_KEY','join','2005AhVtgZ','56lISgKa','isTTY','appcode','accessKey','APPCODE','parse','2KIqOVd','find','setRawCommand','argv','slice','apiDomain','development','string','isRaw','EXDEV','production','EACCES','88629PcGysn','globalConfig','stdin','error','host','locale','high-risk-write','riskLevel','46232dWdqje','cache','empty','env','45991644jLrVNn','some','trim','projectConfig','maxRisk','online','raw','defaultApp','954DxFRAn','global','11IQhQpK','FORMAT'];a73_0x4e8a=function(){return _0x587dd2;};return a73_0x4e8a();}export function getLocalAppAliases(_0x5a384f){const _0x33937d=a73_0x4349fd;return _0x5a384f['apps']&&typeof _0x5a384f[_0x33937d(0x120)]===_0x33937d(0x11c)?_0x5a384f[_0x33937d(0x120)]:{};}export function resolveLocalAppAliasCode(_0xe7601e,_0x1f0e20){const _0x39fe9f=a73_0x4349fd;if(!_0x1f0e20)return undefined;const _0x59f160=getLocalAppAliases(_0xe7601e)[_0x1f0e20],_0x34798e=_0x59f160?.[_0x39fe9f(0x133)];return typeof _0x34798e===_0x39fe9f(0x13e)&&_0x34798e[_0x39fe9f(0x108)]()?_0x34798e[_0x39fe9f(0x108)]():undefined;}export function readAppCodeFromConfig(){const _0x3d9d25=a73_0x4349fd,_0x317e79=readRawConfig(),_0x42d93a=_0x317e79[_0x3d9d25(0x133)]??_0x317e79[_0x3d9d25(0x122)];if(typeof _0x42d93a===_0x3d9d25(0x13e)&&_0x42d93a[_0x3d9d25(0x108)]())return _0x42d93a[_0x3d9d25(0x108)]();const _0x98cd47=resolveLocalAppAliasCode(_0x317e79,typeof _0x317e79['defaultApp']===_0x3d9d25(0x13e)?_0x317e79[_0x3d9d25(0x10d)]:undefined);if(_0x98cd47)return _0x98cd47;const _0x20e82e=normalizeEnv(String(_0x317e79['env']||'production')),_0xa58d3=isDaily(_0x20e82e)?'daily':isDev(_0x20e82e)?_0x3d9d25(0x13d):'production',_0x2ae60e=resolveCachedAppCode(typeof _0x317e79[_0x3d9d25(0x10d)]==='string'?_0x317e79[_0x3d9d25(0x10d)]:undefined,_0xa58d3,typeof _0x317e79[_0x3d9d25(0x134)]===_0x3d9d25(0x13e)?_0x317e79[_0x3d9d25(0x134)]:undefined);if(_0x2ae60e)return _0x2ae60e;const _0x2f772d=Object['values'](getLocalAppAliases(_0x317e79))[_0x3d9d25(0x138)](_0x3d0144=>_0x3d0144?.[_0x3d9d25(0x133)]);return typeof _0x2f772d?.[_0x3d9d25(0x133)]==='string'&&_0x2f772d[_0x3d9d25(0x133)][_0x3d9d25(0x108)]()?_0x2f772d[_0x3d9d25(0x133)][_0x3d9d25(0x108)]():undefined;}export function readScopedConfig(_0x10bdd9){const _0x503e64=a73_0x4349fd,_0x5e81e9=_0x10bdd9[_0x503e64(0x10f)]?'global':'project';return readConfigFile(resolveWriteConfigPath(_0x5e81e9));}export function writeScopedConfig(_0x561f6d,_0x345476){const _0x56767a=a73_0x4349fd,_0x59f47c=_0x345476[_0x56767a(0x10f)]?_0x56767a(0x10f):_0x56767a(0x123);writeConfigFile(resolveWriteConfigPath(_0x59f47c),_0x561f6d);}export async function initGlobalEnvironment(_0x449d7f){const _0x432c0c=a73_0x4349fd,{initEnv:_0x52dc2d}=await import(_0x432c0c(0x118));_0x52dc2d(_0x449d7f['env']);const {initDomains:_0x49f328}=await import(_0x432c0c(0x112));_0x49f328({'apiDomain':_0x449d7f[_0x432c0c(0x10c)][_0x432c0c(0x13c)]||_0x449d7f[_0x432c0c(0x10c)][_0x432c0c(0xfe)]||undefined,'userDomain':_0x449d7f[_0x432c0c(0x10c)]['userDomain']||undefined,'runtimeDomain':_0x449d7f['raw']['runtimeDomain']||undefined,'skillHubDomain':_0x449d7f[_0x432c0c(0x10c)][_0x432c0c(0x129)]||undefined});}export function getProjectConfigPath(){return resolveConfigPath(process['cwd']());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x5becaa){const _0x19d26b=a73_0x4349fd;if(!existsSync(_0x5becaa))return{'status':_0x19d26b(0x128)};try{const _0x16782e=readFileSync(_0x5becaa,{'encoding':_0x19d26b(0x12a)});if(!_0x16782e?.[_0x19d26b(0x108)]())return{'status':_0x19d26b(0x104)};const _0x3f92ec=JSON['parse'](_0x16782e);return{'status':'ok','data':_0x3f92ec};}catch(_0x4104fd){return{'status':_0x19d26b(0xfd),'message':_0x4104fd instanceof Error?_0x4104fd['message']:String(_0x4104fd)};}}export function loadRawConfigLayers(_0x41141c){const _0x66bf2e=a73_0x4349fd;let _0x2b966f={},_0x519702={},_0x2cea2e,_0x4d3239;try{_0x2cea2e=resolveConfigPath(homedir());if(_0x2cea2e){const _0x5cc044=readFileSync(_0x2cea2e,{'encoding':_0x66bf2e(0x12a)});if(_0x5cc044)_0x2b966f=JSON['parse'](_0x5cc044);}}catch{}try{const _0x42998c=_0x41141c||process[_0x66bf2e(0x125)]();_0x4d3239=resolveConfigPath(_0x42998c);if(_0x4d3239){const _0x40224d=readFileSync(_0x4d3239,{'encoding':_0x66bf2e(0x12a)});if(_0x40224d)_0x519702=JSON[_0x66bf2e(0x136)](_0x40224d);}}catch{}return{'globalPath':_0x2cea2e,'projectPath':_0x4d3239,'globalConfig':_0x2b966f,'projectConfig':_0x519702};}function mergeRawConfigLayers(_0x147d2e){const _0x153de8=a73_0x4349fd,{globalConfig:_0x38f782,projectConfig:_0x17e06f}=_0x147d2e;if(_0x17e06f[_0x153de8(0x12b)]===![]){const _0x5c8292={..._0x17e06f};return delete _0x5c8292[_0x153de8(0x12b)],_0x5c8292;}const _0xd5b8b8={..._0x38f782,..._0x17e06f};if(_0x153de8(0x10d)in _0x17e06f)_0xd5b8b8[_0x153de8(0x10d)]=_0x17e06f[_0x153de8(0x10d)];else _0x38f782['defaultApp']&&(_0xd5b8b8[_0x153de8(0x10d)]=_0x38f782[_0x153de8(0x10d)]);return _0xd5b8b8;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x50e142){return mergeRawConfigLayers(loadRawConfigLayers(_0x50e142));}export function readRawConfigWithLayers(_0x45f8ba){const _0x2ce23b=loadRawConfigLayers(_0x45f8ba);return{'config':mergeRawConfigLayers(_0x2ce23b),'layers':_0x2ce23b};}export function resolveDefaultAppSource(_0x11d999){const _0x5d29bf=a73_0x4349fd;if(_0x5d29bf(0x10d)in _0x11d999[_0x5d29bf(0x109)])return _0x5d29bf(0x123);if(_0x11d999[_0x5d29bf(0x109)][_0x5d29bf(0x12b)]===![])return null;if(_0x11d999[_0x5d29bf(0xfb)][_0x5d29bf(0x10d)])return _0x5d29bf(0x10f);return null;}function buildConfig(_0x269cb8,_0x1daa24){const _0x327470=a73_0x4349fd,_0xb523c1=_0x269cb8['defaultApp']||undefined,_0x2a4b13=_0x1daa24[_0x327470(0x122)]||env('APP')||undefined,_0x50af9a=_0x2a4b13||_0xb523c1||undefined,_0x296532=env(_0x327470(0x12e))||_0x269cb8['accessKey']||undefined,_0xa7113d=_0x1daa24[_0x327470(0x105)]||env(_0x327470(0x115))||_0x269cb8['env']||DEFAULT_CONFIG_VALUES['env'],_0x178387=normalizeEnv(String(_0xa7113d)),_0x25d18b=isDaily(_0x178387)?'daily':isDev(_0x178387)?_0x327470(0x13d):_0x327470(0x141),_0x4e5afc=typeof _0x1daa24[_0x327470(0x133)]==='string'?_0x1daa24[_0x327470(0x133)]:undefined,_0x138e25=env(_0x327470(0x135)),_0xc0cda9=_0x2a4b13?undefined:_0x269cb8[_0x327470(0x133)]||_0x269cb8[_0x327470(0x122)]||undefined,_0x3474fd=_0x2a4b13||(_0xc0cda9?undefined:_0xb523c1),_0x3e102b=resolveLocalAppAliasCode(_0x269cb8,_0x3474fd),_0x4f1469=resolveCachedAppCode(_0x3474fd,_0x25d18b,_0x296532),_0xfbd0a5=_0x4e5afc||_0x138e25||_0xc0cda9||_0x3e102b||_0x4f1469||undefined,_0x398e4b=_0x4e5afc?'explicit':_0x138e25?'env':_0xc0cda9?_0x327470(0x12d):_0x3e102b?'local-alias':_0x4f1469?_0x327470(0x103):undefined,_0x29a75c=_0x269cb8[_0x327470(0xff)]||DEFAULT_CONFIG_VALUES[_0x327470(0xff)],_0x1f27ac=undefined,_0x4dadeb=_0x1daa24['format']||env(_0x327470(0x111))||_0x269cb8['format'],_0x3b1f3f=normalizeLegacyOutputFormat(_0x4dadeb),_0x36fc72=env(_0x327470(0x11b))||_0x269cb8['pageSize'],_0x161a63=_0x36fc72?Number(_0x36fc72)||undefined:undefined,_0x385512=_0x269cb8[_0x327470(0x101)]||_0x269cb8[_0x327470(0x10a)],_0x888838=_0x385512===_0x327470(0x117)||_0x385512===_0x327470(0x126)||_0x385512===_0x327470(0x100)?_0x385512:DEFAULT_CONFIG_VALUES['riskLevel'],_0x1e742c=env(_0x327470(0x116)),_0x43a3da=_0x1e742c==='1'||_0x1e742c===_0x327470(0x12c);return{'appCode':typeof _0xfbd0a5===_0x327470(0x13e)&&_0xfbd0a5['trim']()?_0xfbd0a5[_0x327470(0x108)]():undefined,'appCodeSource':_0x398e4b,'env':_0x25d18b,'locale':_0x29a75c,'cookie':_0x1f27ac,'accessKey':_0x296532,'format':_0x3b1f3f,'pageSize':_0x161a63,'riskLevel':_0x888838,'verbose':_0x43a3da,'defaultApp':_0xb523c1,'currentApp':typeof _0x50af9a===_0x327470(0x13e)?_0x50af9a:undefined,'raw':_0x269cb8};}function env(_0x35f368){return productEnv(_0x35f368);}async function buildAuth(_0x2266d5){const _0x27e3ba=a73_0x4349fd,_0x179a75='',_0x2a8592=!!_0x2266d5[_0x27e3ba(0x134)];return{'cookie':_0x179a75,'isLoggedIn':_0x2a8592,async 'getOrLogin'(){const _0x5da13a=_0x27e3ba;if(_0x2a8592)return _0x179a75;throw CliErrors[_0x5da13a(0x113)]();}};}
|
|
1
|
+
const a73_0x2254ff=a73_0x3194;(function(_0x4538b3,_0x398116){const _0x39dc09=a73_0x3194,_0x339f4d=_0x4538b3();while(!![]){try{const _0x125ebe=-parseInt(_0x39dc09(0x15e))/0x1+parseInt(_0x39dc09(0x16e))/0x2*(-parseInt(_0x39dc09(0x150))/0x3)+-parseInt(_0x39dc09(0x191))/0x4+-parseInt(_0x39dc09(0x14a))/0x5+-parseInt(_0x39dc09(0x171))/0x6+parseInt(_0x39dc09(0x151))/0x7*(-parseInt(_0x39dc09(0x14c))/0x8)+parseInt(_0x39dc09(0x188))/0x9*(parseInt(_0x39dc09(0x16b))/0xa);if(_0x125ebe===_0x398116)break;else _0x339f4d['push'](_0x339f4d['shift']());}catch(_0x33bc5a){_0x339f4d['push'](_0x339f4d['shift']());}}}(a73_0x4d97,0xdd483));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';function a73_0x4d97(){const _0x593383=['maxRisk','utf8','EPERM','cwd','pageSize','env','EACCES','isRaw','parse','isTTY','826235gUUbpP','apps','runtimeDomain','projectConfig','values','daily','empty','some','local-alias','FORMAT','defaultApp','trim','missing','580CcGVvr','object','authRequired','46KofmgQ','string','stdin','9337080QyGSrN','nonInteractive','globalConfig','global','cache','app','setRawCommand','read','raw','./constant/domain.js','project','userDomain','./constant/env.js','stdout','format','ENV','stringify','inherit','skillHubDomain','setLogPath','apiDomain','argv','newConfigFileName','968949PGZABx','APP','locale','online','accessKey','message','production','development','slice','488496JOppbd','setRawMode','error','7028335lJBZrX','code','3176qomqYN','VERBOSE','true','EXDEV','25134zpqppo','21777aKmZak','appcode','PAGE_SIZE'];a73_0x4d97=function(){return _0x593383;};return a73_0x4d97();}function a73_0x3194(_0x4fc7c2,_0x56e430){_0x4fc7c2=_0x4fc7c2-0x148;const _0x4d9739=a73_0x4d97();let _0x3194eb=_0x4d9739[_0x4fc7c2];return _0x3194eb;}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_0x2254ff(0x187)];function resolveConfigPath(_0x1da66){for(const _0x27975f of CONFIG_NAMES){const _0x26ae31=resolve(_0x1da66,_0x27975f);if(existsSync(_0x26ae31))return _0x26ae31;}return undefined;}export function resolveWriteConfigPath(_0x327787){const _0x1d3d80=a73_0x2254ff,_0x2eed78=_0x327787==='project'?process[_0x1d3d80(0x157)]():homedir(),_0x2812ea=resolveConfigPath(_0x2eed78);return _0x2812ea??resolve(_0x2eed78,NEW_CONFIG_NAME);}export function readConfigFile(_0x5a72fb){const _0x5a6633=a73_0x2254ff;try{if(existsSync(_0x5a72fb)){const _0x42b53c=readFileSync(_0x5a72fb,{'encoding':_0x5a6633(0x155)});if(_0x42b53c){const _0xdbb446=JSON[_0x5a6633(0x15c)](_0x42b53c);return migrateOnlineEnv(_0x5a72fb,_0xdbb446),_0xdbb446;}}}catch{}return{};}function migrateOnlineEnv(_0x1ef8ac,_0x373aeb){const _0x490fc1=a73_0x2254ff;let _0x22a828=![];_0x373aeb[_0x490fc1(0x159)]==='online'&&(_0x373aeb[_0x490fc1(0x159)]='production',_0x22a828=!![]);if(_0x373aeb['apps']&&typeof _0x373aeb[_0x490fc1(0x15f)]==='object')for(const _0x2309da of Object[_0x490fc1(0x162)](_0x373aeb['apps'])){_0x2309da&&_0x2309da[_0x490fc1(0x159)]===_0x490fc1(0x18b)&&(_0x2309da[_0x490fc1(0x159)]=_0x490fc1(0x18e),_0x22a828=!![]);}if(_0x22a828)try{writeConfigFile(_0x1ef8ac,_0x373aeb);}catch{}}export function writeConfigFile(_0xcb6b30,_0xc3a1c1){const _0x33e962=a73_0x2254ff,_0x3356de=dirname(_0xcb6b30);!existsSync(_0x3356de)&&mkdirSync(_0x3356de,{'recursive':!![]});const _0x1469cf=_0xcb6b30+'.tmp';try{writeFileSync(_0x1469cf,JSON[_0x33e962(0x181)](_0xc3a1c1,null,0x2)+'\x0a',{'encoding':_0x33e962(0x155),'mode':0x180});try{renameSync(_0x1469cf,_0xcb6b30);}catch(_0x3435dc){if(_0x3435dc[_0x33e962(0x14b)]===_0x33e962(0x156)||_0x3435dc[_0x33e962(0x14b)]===_0x33e962(0x14f)||_0x3435dc[_0x33e962(0x14b)]===_0x33e962(0x15a)){writeFileSync(_0xcb6b30,JSON[_0x33e962(0x181)](_0xc3a1c1,null,0x2)+'\x0a',{'encoding':_0x33e962(0x155)});try{unlinkSync(_0x1469cf);}catch{}}else throw _0x3435dc;}}catch(_0x1e3752){try{unlinkSync(_0x1469cf);}catch{}throw _0x1e3752;}}export function isNonInteractiveMode(_0x59b7f0){const _0x54d091=a73_0x2254ff;return!!(_0x59b7f0[_0x54d091(0x172)]||_0x59b7f0['ci']||productEnvNames('CI')[_0x54d091(0x165)](_0x4dbbeb=>process.env[_0x4dbbeb]===_0x54d091(0x14e))||process.env.CI==='true'||!process[_0x54d091(0x17e)][_0x54d091(0x15d)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x5f142c=a73_0x2254ff;if(!process[_0x5f142c(0x170)][_0x5f142c(0x15d)])return![];try{const _0x2cfae7=process[_0x5f142c(0x170)][_0x5f142c(0x15b)];return process[_0x5f142c(0x170)][_0x5f142c(0x148)](!![]),process['stdin']['setRawMode'](_0x2cfae7??![]),!![];}catch{return![];}}export async function createContext(_0x34ecce){const _0x19b079=a73_0x2254ff,_0x1fa322=readRawConfig(),_0x5bf270=buildConfig(_0x1fa322,_0x34ecce);await initGlobalEnvironment(_0x5bf270);const {getUserDomain:_0x2e5a12,getApiDomain:_0x219361}=await import(_0x19b079(0x17a)),_0x476727={'apiDomain':_0x219361(),'userDomain':_0x2e5a12()},_0x4a3619=await buildAuth(_0x5bf270);logger[_0x19b079(0x184)](process[_0x19b079(0x157)]());const _0xbb5653=(CLI_BIN_NAME+'\x20'+process[_0x19b079(0x186)][_0x19b079(0x190)](0x2)['join']('\x20'))[_0x19b079(0x169)]();logger[_0x19b079(0x177)](_0xbb5653);const _0x1d99ff=isNonInteractiveMode(_0x34ecce);return{'config':_0x5bf270,'auth':_0x4a3619,'logger':logger,'env':_0x476727,'nonInteractive':_0x1d99ff};}export function buildConfigFromFlags(_0x1d405b){return buildConfig(readRawConfig(),_0x1d405b);}export function getLocalAppAliases(_0x387c13){const _0x1e6167=a73_0x2254ff;return _0x387c13['apps']&&typeof _0x387c13[_0x1e6167(0x15f)]===_0x1e6167(0x16c)?_0x387c13[_0x1e6167(0x15f)]:{};}export function resolveLocalAppAliasCode(_0x1e15c4,_0x43be17){const _0x20c6bb=a73_0x2254ff;if(!_0x43be17)return undefined;const _0x5c3f6e=getLocalAppAliases(_0x1e15c4)[_0x43be17],_0x457c9f=_0x5c3f6e?.['appcode'];return typeof _0x457c9f===_0x20c6bb(0x16f)&&_0x457c9f[_0x20c6bb(0x169)]()?_0x457c9f[_0x20c6bb(0x169)]():undefined;}export function readAppCodeFromConfig(){const _0x3800f6=a73_0x2254ff,_0x40568b=readRawConfig(),_0x2752b5=_0x40568b[_0x3800f6(0x152)]??_0x40568b[_0x3800f6(0x176)];if(typeof _0x2752b5===_0x3800f6(0x16f)&&_0x2752b5[_0x3800f6(0x169)]())return _0x2752b5[_0x3800f6(0x169)]();const _0x4b9f86=resolveLocalAppAliasCode(_0x40568b,typeof _0x40568b[_0x3800f6(0x168)]===_0x3800f6(0x16f)?_0x40568b[_0x3800f6(0x168)]:undefined);if(_0x4b9f86)return _0x4b9f86;const _0x124750=normalizeEnv(String(_0x40568b[_0x3800f6(0x159)]||_0x3800f6(0x18e))),_0x3b3551=isDaily(_0x124750)?_0x3800f6(0x163):isDev(_0x124750)?_0x3800f6(0x18f):_0x3800f6(0x18e),_0x4a8f75=resolveCachedAppCode(typeof _0x40568b['defaultApp']===_0x3800f6(0x16f)?_0x40568b['defaultApp']:undefined,_0x3b3551,typeof _0x40568b['accessKey']==='string'?_0x40568b[_0x3800f6(0x18c)]:undefined);if(_0x4a8f75)return _0x4a8f75;const _0x5d59b0=Object[_0x3800f6(0x162)](getLocalAppAliases(_0x40568b))['find'](_0x53be3a=>_0x53be3a?.[_0x3800f6(0x152)]);return typeof _0x5d59b0?.['appcode']===_0x3800f6(0x16f)&&_0x5d59b0[_0x3800f6(0x152)]['trim']()?_0x5d59b0[_0x3800f6(0x152)][_0x3800f6(0x169)]():undefined;}export function readScopedConfig(_0x56eede){const _0x2e949b=a73_0x2254ff,_0x4ca960=_0x56eede[_0x2e949b(0x174)]?_0x2e949b(0x174):_0x2e949b(0x17b);return readConfigFile(resolveWriteConfigPath(_0x4ca960));}export function writeScopedConfig(_0x53de10,_0xfb1949){const _0x5f180d=a73_0x2254ff,_0x85bd4d=_0xfb1949['global']?_0x5f180d(0x174):_0x5f180d(0x17b);writeConfigFile(resolveWriteConfigPath(_0x85bd4d),_0x53de10);}export async function initGlobalEnvironment(_0x322958){const _0x3ecd67=a73_0x2254ff,{initEnv:_0x44361e}=await import(_0x3ecd67(0x17d));_0x44361e(_0x322958[_0x3ecd67(0x159)]);const {initDomains:_0x4432a3}=await import('./constant/domain.js');_0x4432a3({'apiDomain':_0x322958[_0x3ecd67(0x179)][_0x3ecd67(0x185)]||_0x322958[_0x3ecd67(0x179)]['host']||undefined,'userDomain':_0x322958[_0x3ecd67(0x179)][_0x3ecd67(0x17c)]||undefined,'runtimeDomain':_0x322958[_0x3ecd67(0x179)][_0x3ecd67(0x160)]||undefined,'skillHubDomain':_0x322958[_0x3ecd67(0x179)][_0x3ecd67(0x183)]||undefined});}export function getProjectConfigPath(){const _0x53f892=a73_0x2254ff;return resolveConfigPath(process[_0x53f892(0x157)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x16abaa){const _0x2a6f21=a73_0x2254ff;if(!existsSync(_0x16abaa))return{'status':_0x2a6f21(0x16a)};try{const _0x247f8e=readFileSync(_0x16abaa,{'encoding':'utf8'});if(!_0x247f8e?.[_0x2a6f21(0x169)]())return{'status':_0x2a6f21(0x164)};const _0x30ea90=JSON['parse'](_0x247f8e);return{'status':'ok','data':_0x30ea90};}catch(_0x1d00d3){return{'status':_0x2a6f21(0x149),'message':_0x1d00d3 instanceof Error?_0x1d00d3[_0x2a6f21(0x18d)]:String(_0x1d00d3)};}}export function loadRawConfigLayers(_0x91a0bd){const _0x4a8189=a73_0x2254ff;let _0x1dafa1={},_0x28385f={},_0x39e378,_0x47a33b;try{_0x39e378=resolveConfigPath(homedir());if(_0x39e378){const _0x319f89=readFileSync(_0x39e378,{'encoding':_0x4a8189(0x155)});if(_0x319f89)_0x1dafa1=JSON['parse'](_0x319f89);}}catch{}try{const _0x19778a=_0x91a0bd||process[_0x4a8189(0x157)]();_0x47a33b=resolveConfigPath(_0x19778a);if(_0x47a33b){const _0x3c9812=readFileSync(_0x47a33b,{'encoding':_0x4a8189(0x155)});if(_0x3c9812)_0x28385f=JSON['parse'](_0x3c9812);}}catch{}return{'globalPath':_0x39e378,'projectPath':_0x47a33b,'globalConfig':_0x1dafa1,'projectConfig':_0x28385f};}function mergeRawConfigLayers(_0x2d210c){const _0x47339b=a73_0x2254ff,{globalConfig:_0x451036,projectConfig:_0x4f22db}=_0x2d210c;if(_0x4f22db['inherit']===![]){const _0xbe22d4={..._0x4f22db};return delete _0xbe22d4[_0x47339b(0x182)],_0xbe22d4;}const _0x9bee71={..._0x451036,..._0x4f22db};if(_0x47339b(0x168)in _0x4f22db)_0x9bee71[_0x47339b(0x168)]=_0x4f22db[_0x47339b(0x168)];else _0x451036[_0x47339b(0x168)]&&(_0x9bee71[_0x47339b(0x168)]=_0x451036[_0x47339b(0x168)]);return _0x9bee71;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x1908b5){return mergeRawConfigLayers(loadRawConfigLayers(_0x1908b5));}export function readRawConfigWithLayers(_0x3bc9e8){const _0x545954=loadRawConfigLayers(_0x3bc9e8);return{'config':mergeRawConfigLayers(_0x545954),'layers':_0x545954};}export function resolveDefaultAppSource(_0x408a6f){const _0x1aad88=a73_0x2254ff;if(_0x1aad88(0x168)in _0x408a6f[_0x1aad88(0x161)])return _0x1aad88(0x17b);if(_0x408a6f[_0x1aad88(0x161)][_0x1aad88(0x182)]===![])return null;if(_0x408a6f[_0x1aad88(0x173)][_0x1aad88(0x168)])return _0x1aad88(0x174);return null;}function buildConfig(_0x486b2f,_0x3ad787){const _0xfec8b=a73_0x2254ff,_0x1e96df=_0x486b2f[_0xfec8b(0x168)]||undefined,_0x1308e9=_0x3ad787[_0xfec8b(0x176)]||env(_0xfec8b(0x189))||undefined,_0x3e1c54=_0x1308e9||_0x1e96df||undefined,_0x1b4d36=env('ACCESS_KEY')||_0x486b2f['accessKey']||undefined,_0x107be0=_0x3ad787[_0xfec8b(0x159)]||env(_0xfec8b(0x180))||_0x486b2f[_0xfec8b(0x159)]||DEFAULT_CONFIG_VALUES[_0xfec8b(0x159)],_0x20b04a=normalizeEnv(String(_0x107be0)),_0x38dc48=isDaily(_0x20b04a)?_0xfec8b(0x163):isDev(_0x20b04a)?'development':'production',_0x4aa817=typeof _0x3ad787[_0xfec8b(0x152)]===_0xfec8b(0x16f)?_0x3ad787['appcode']:undefined,_0x3bb99b=env('APPCODE'),_0x2081cb=_0x1308e9?undefined:_0x486b2f['appcode']||_0x486b2f['app']||undefined,_0x5dafdc=_0x1308e9||(_0x2081cb?undefined:_0x1e96df),_0x4be5df=resolveLocalAppAliasCode(_0x486b2f,_0x5dafdc),_0x4dbb06=resolveCachedAppCode(_0x5dafdc,_0x38dc48,_0x1b4d36),_0x3282d4=_0x4aa817||_0x3bb99b||_0x2081cb||_0x4be5df||_0x4dbb06||undefined,_0x1c3105=_0x4aa817?'explicit':_0x3bb99b?_0xfec8b(0x159):_0x2081cb?'top-level':_0x4be5df?_0xfec8b(0x166):_0x4dbb06?_0xfec8b(0x175):undefined,_0x229738=_0x486b2f[_0xfec8b(0x18a)]||DEFAULT_CONFIG_VALUES[_0xfec8b(0x18a)],_0x3212e0=undefined,_0x13850d=_0x3ad787[_0xfec8b(0x17f)]||env(_0xfec8b(0x167))||_0x486b2f['format'],_0x43e095=normalizeLegacyOutputFormat(_0x13850d),_0x199a8c=env(_0xfec8b(0x153))||_0x486b2f[_0xfec8b(0x158)],_0x302653=_0x199a8c?Number(_0x199a8c)||undefined:undefined,_0xf2a686=_0x486b2f['riskLevel']||_0x486b2f[_0xfec8b(0x154)],_0x3e852e=_0xf2a686===_0xfec8b(0x178)||_0xf2a686==='write'||_0xf2a686==='high-risk-write'?_0xf2a686:DEFAULT_CONFIG_VALUES['riskLevel'],_0x3516b2=env(_0xfec8b(0x14d)),_0x1c0749=_0x3516b2==='1'||_0x3516b2===_0xfec8b(0x14e);return{'appCode':typeof _0x3282d4===_0xfec8b(0x16f)&&_0x3282d4[_0xfec8b(0x169)]()?_0x3282d4[_0xfec8b(0x169)]():undefined,'appCodeSource':_0x1c3105,'env':_0x38dc48,'locale':_0x229738,'cookie':_0x3212e0,'accessKey':_0x1b4d36,'format':_0x43e095,'pageSize':_0x302653,'riskLevel':_0x3e852e,'verbose':_0x1c0749,'defaultApp':_0x1e96df,'currentApp':typeof _0x3e1c54==='string'?_0x3e1c54:undefined,'raw':_0x486b2f};}function env(_0x26772d){return productEnv(_0x26772d);}async function buildAuth(_0x5a4940){const _0x418710=a73_0x2254ff,_0x2cc502='',_0xdf22af=!!_0x5a4940[_0x418710(0x18c)];return{'cookie':_0x2cc502,'isLoggedIn':_0xdf22af,async 'getOrLogin'(){const _0x14d599=_0x418710;if(_0xdf22af)return _0x2cc502;throw CliErrors[_0x14d599(0x16d)]();}};}
|