@lovrabet/lovrabet-cli 2.1.8-beta.3 → 2.1.9-beta.1
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
|
-
function a55_0x22e6(_0x5bad82,_0x460f6a){_0x5bad82=_0x5bad82-0x82;const _0xa45b25=a55_0xa45b();let _0x22e6a2=_0xa45b25[_0x5bad82];return _0x22e6a2;}const a55_0x1a44c1=a55_0x22e6;(function(_0x42a7a4,_0x4ecf56){const _0x848ebe=a55_0x22e6,_0x7447bc=_0x42a7a4();while(!![]){try{const _0x48f7e8=parseInt(_0x848ebe(0xc2))/0x1*(-parseInt(_0x848ebe(0x9c))/0x2)+parseInt(_0x848ebe(0xa4))/0x3*(-parseInt(_0x848ebe(0xb6))/0x4)+parseInt(_0x848ebe(0x9e))/0x5*(parseInt(_0x848ebe(0xad))/0x6)+-parseInt(_0x848ebe(0xab))/0x7*(-parseInt(_0x848ebe(0x8a))/0x8)+parseInt(_0x848ebe(0xcb))/0x9*(-parseInt(_0x848ebe(0xba))/0xa)+parseInt(_0x848ebe(0xcf))/0xb*(parseInt(_0x848ebe(0x90))/0xc)+parseInt(_0x848ebe(0xd6))/0xd*(parseInt(_0x848ebe(0xa8))/0xe);if(_0x48f7e8===_0x4ecf56)break;else _0x7447bc['push'](_0x7447bc['shift']());}catch(_0x43d28f){_0x7447bc['push'](_0x7447bc['shift']());}}}(a55_0xa45b,0x66bab));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{resolve}from'node:path';import{parse as a55_0x1f9177}from'yaml';import{CliErrors}from'../../errors.js';function a55_0xa45b(){const _0x1bc71d=['page','false','filter','SKILL.md\x20must\x20start\x20with\x20frontmatter.','validation','content','displayName','sql','72UKwRGC','auth','project','search','391150sSIaDr','service','frontmatter-required','metadata.type\x20must\x20be\x20one\x20of\x20write,\x20read,\x20or\x20trainer.','SKILL.md\x20must\x20be\x20a\x20regular\x20file.','internal','section','split','724387tVxFGq','internal-skill','Frontmatter\x20name\x20is\x20missing.','Fix\x20the\x20Skill\x20metadata\x20before\x20running\x20skill\x20push.','Replace\x20the\x20symlink\x20with\x20a\x20regular\x20SKILL.md\x20file\x20inside\x20the\x20Skill\x20directory.','warning','isArray','SKILL.md','errors','135ezNqHt','write','isSymbolicLink','Missing\x20SKILL.md.','248941LJaLRD','match','join','push','object','level','schema','13zFMcoj','boolean','slice','This\x20line\x20invokes\x20the\x20rabetbase\x20CLI.\x20rabetbase\x20is\x20a\x20dev-time\x20tool;\x20runtime\x20Skills\x20should\x20drive\x20runtime\x20work\x20through\x20lovrabet\x20commands.','test','Skill\x20directory\x20not\x20found:\x20','artifact','Skill\x20validation\x20failed:\x0a','isDirectory','number','name','line','string','metadata','flatMap','utf8','structure-complete','626656XYZJkJ','description','map','has','app','Add\x20SKILL.md\x20at\x20the\x20Skill\x20directory\x20root.','444MNdKux','logs','isFile','suggestion','trainer','file','type','true','hasFrontmatter','error','path','SKILL.md\x20is\x20not\x20a\x20file.','2WCIyGK','Add\x20SKILL.md\x20as\x20a\x20regular\x20file\x20at\x20the\x20Skill\x20directory\x20root.','772070ICtyQR','raw','toLowerCase','Set\x20metadata.type\x20to\x20write,\x20read,\x20or\x20trainer.','config','registry','16539PnBupD','Set\x20displayName\x20to\x20the\x20human-readable\x20Skill\x20name\x20shown\x20in\x20SkillHub.','Set\x20name\x20to\x20the\x20Skill\x20directory\x20code.','data','2977912desRZQ','trim','bff','56gMZesu','Add\x20frontmatter\x20with\x20name\x20and\x20description.','6bykGmt'];a55_0xa45b=function(){return _0x1bc71d;};return a55_0xa45b();}import{fileText,scanSkillDirectory}from'../../skills/runtime-skill-sync/local-files.js';const SKILL_FILE=a55_0x1a44c1(0xc9),SUPPORTED_SKILL_TYPES=new Set([a55_0x1a44c1(0xcc),'read',a55_0x1a44c1(0x94)]),TEXT_SKILL_FILE_PATTERN=/(?:^SKILL\.md$|\.(?:md|mdx|txt|json|ya?ml|js|mjs|cjs|ts|tsx|sh|sql))$/i;export function validateSkillDirectory(_0xacaee3,_0x2e68eb={}){const _0xca0c04=a55_0x1a44c1,_0x14b66a=resolveSkillDirectoryRoot(_0xacaee3),_0x49fc6a=[],_0x36376b=loadRequiredSkillFile(_0x14b66a,_0x49fc6a),_0x53afa1=_0x36376b?parseFrontmatter(_0x36376b[_0xca0c04(0xb3)]):{'hasFrontmatter':![]};_0x36376b&&validateFrontmatter(_0x36376b['path'],_0x53afa1,_0x49fc6a);validateRuntimeCliReferences(_0x14b66a,_0x49fc6a);const _0x356d51=_0x49fc6a[_0xca0c04(0xb0)](_0x2d3a51=>_0x2d3a51[_0xca0c04(0xd4)]===_0xca0c04(0x99)),_0x36dcf4=_0x49fc6a[_0xca0c04(0xb0)](_0x28d46e=>_0x28d46e[_0xca0c04(0xd4)]==='warning');return{'ok':_0x356d51['length']===0x0,'dir':_0x14b66a,'type':_0x53afa1['type'],'errors':_0x356d51,'warnings':_0x36dcf4};}function resolveSkillDirectoryRoot(_0x1accef){const _0x2a5222=a55_0x1a44c1,_0x10f612=resolve(_0x1accef);if(!existsSync(_0x10f612))throw CliErrors[_0x2a5222(0xb2)]('Skill\x20directory\x20not\x20found:\x20'+_0x1accef);const _0x459206=lstatSync(_0x10f612);if(_0x459206[_0x2a5222(0xde)]())return _0x10f612;if(_0x459206[_0x2a5222(0xcd)]()){const _0x5f18f9=realpathSync(_0x10f612);if(lstatSync(_0x5f18f9)[_0x2a5222(0xde)]())return _0x5f18f9;}throw CliErrors[_0x2a5222(0xb2)](_0x2a5222(0xdb)+_0x1accef);}export function throwIfSkillValidationFailed(_0x860589,_0x49d6f9=![]){const _0x1a11af=a55_0x1a44c1;if(_0x860589['ok'])return;const _0x38de0d=_0x860589[_0x1a11af(0xca)][_0x1a11af(0x8c)](_0x563a4d=>{const _0x5ed95a=_0x1a11af,_0x2b5aea=_0x563a4d[_0x5ed95a(0xc0)]?'#'+_0x563a4d[_0x5ed95a(0xc0)]:'';return _0x563a4d['level']['toUpperCase']()+'\x20'+_0x563a4d['ruleId']+'\x20'+_0x563a4d[_0x5ed95a(0x95)]+_0x2b5aea+':\x20'+_0x563a4d['message']+'\x20Fix:\x20'+_0x563a4d[_0x5ed95a(0x93)];});throw CliErrors['validation'](_0x1a11af(0xdd)+_0x38de0d['join']('\x0a'),_0x1a11af(0xc5));}function loadRequiredSkillFile(_0x50a85b,_0x438e1c){const _0x20a1e6=a55_0x1a44c1,_0x5d2632=resolve(_0x50a85b,SKILL_FILE);if(!existsSync(_0x5d2632))return _0x438e1c[_0x20a1e6(0xd2)](issue(_0x20a1e6(0x99),_0x20a1e6(0x89),SKILL_FILE,_0x20a1e6(0xce),_0x20a1e6(0x8f))),undefined;const _0x1d1eea=lstatSync(_0x5d2632);if(_0x1d1eea['isSymbolicLink']())return _0x438e1c[_0x20a1e6(0xd2)](issue('error',_0x20a1e6(0x89),SKILL_FILE,_0x20a1e6(0xbe),_0x20a1e6(0xc6))),undefined;if(!_0x1d1eea[_0x20a1e6(0x92)]())return _0x438e1c[_0x20a1e6(0xd2)](issue('error',_0x20a1e6(0x89),SKILL_FILE,_0x20a1e6(0x9b),_0x20a1e6(0x9d))),undefined;return{'path':SKILL_FILE,'content':readFileSync(_0x5d2632,_0x20a1e6(0x88))};}function validateFrontmatter(_0x191fa3,_0xb35aff,_0x22cf49){const _0xd1437a=a55_0x1a44c1;if(!_0xb35aff[_0xd1437a(0x98)]){_0x22cf49[_0xd1437a(0xd2)](issue(_0xd1437a(0x99),'frontmatter-required',_0x191fa3,_0xd1437a(0xb1),_0xd1437a(0xac)));return;}!_0xb35aff[_0xd1437a(0x83)]?.['trim']()&&_0x22cf49['push'](issue(_0xd1437a(0x99),_0xd1437a(0xbc),_0x191fa3,_0xd1437a(0xc4),_0xd1437a(0xa6))),!_0xb35aff[_0xd1437a(0xb4)]?.[_0xd1437a(0xa9)]()&&_0x22cf49[_0xd1437a(0xd2)](issue(_0xd1437a(0xc7),'display-name-recommended',_0x191fa3,'Frontmatter\x20displayName\x20is\x20missing.',_0xd1437a(0xa5))),!_0xb35aff[_0xd1437a(0x8b)]?.[_0xd1437a(0xa9)]()&&_0x22cf49[_0xd1437a(0xd2)](issue(_0xd1437a(0x99),'description-required',_0x191fa3,'Frontmatter\x20description\x20is\x20empty.','填写模型触发语义:用户在什么场景应使用本\x20Skill、不要使用的边界和关键词。')),_0xb35aff[_0xd1437a(0xbf)]===!![]&&_0x22cf49['push'](issue('error',_0xd1437a(0xc3),_0x191fa3,'metadata.internal=true\x20Skills\x20cannot\x20be\x20uploaded.','Remove\x20metadata.internal\x20or\x20set\x20it\x20to\x20false\x20before\x20running\x20skill\x20push.')),_0xb35aff[_0xd1437a(0x96)]?.[_0xd1437a(0xa9)]()&&!SUPPORTED_SKILL_TYPES[_0xd1437a(0x8d)](_0xb35aff['type'])&&_0x22cf49[_0xd1437a(0xd2)](issue(_0xd1437a(0x99),_0xd1437a(0xbc),_0x191fa3,_0xd1437a(0xbd),_0xd1437a(0xa1)));}function validateRuntimeCliReferences(_0x404242,_0x404a0e){const _0x1d5288=a55_0x1a44c1;for(const _0x1347db of findRabetbaseCliInvocations(_0x404242)){_0x404a0e[_0x1d5288(0xd2)](issue(_0x1d5288(0xc7),'rabetbase-cli-reference',_0x1347db[_0x1d5288(0x95)],_0x1d5288(0xd9),'If\x20this\x20is\x20a\x20runtime\x20step,\x20replace\x20it\x20with\x20the\x20equivalent\x20lovrabet\x20command.\x20Dev-time\x20discovery\x20or\x20handoff\x20notes\x20can\x20stay.','L'+_0x1347db[_0x1d5288(0x84)]));}}function findRabetbaseCliInvocations(_0x4dcaf7){const _0x2ca274=a55_0x1a44c1;return scanSkillDirectory(_0x4dcaf7)[_0x2ca274(0xb0)](_0x1000c3=>TEXT_SKILL_FILE_PATTERN[_0x2ca274(0xda)](_0x1000c3['path']))[_0x2ca274(0x87)](_0x16b3c0=>{const _0x3ef98e=_0x2ca274,_0x4742b7=fileText(_0x16b3c0);return _0x4742b7[_0x3ef98e(0xc1)](/\r?\n/)['map']((_0x233e7b,_0x239e9f)=>({'file':_0x16b3c0[_0x3ef98e(0x9a)],'line':_0x239e9f+0x1,'text':_0x233e7b}))[_0x3ef98e(0xb0)](({text:_0x52ff0d})=>isRabetbaseCliInvocation(_0x52ff0d))['map'](({file:_0x249a03,line:_0x4fa72a})=>({'file':_0x249a03,'line':_0x4fa72a}));});}const RABETBASE_SUBCOMMANDS=['dataset',a55_0x1a44c1(0xb5),a55_0x1a44c1(0xaa),a55_0x1a44c1(0xae),a55_0x1a44c1(0xb8),a55_0x1a44c1(0x8e),a55_0x1a44c1(0xd5),a55_0x1a44c1(0xbb),a55_0x1a44c1(0xdc),'kb',a55_0x1a44c1(0xa2),'workspace',a55_0x1a44c1(0xa7),a55_0x1a44c1(0xb7),a55_0x1a44c1(0x91),a55_0x1a44c1(0xa3)],RABETBASE_INVOCATION=new RegExp(String[a55_0x1a44c1(0x9f)]`\brabetbase\s+(?:${RABETBASE_SUBCOMMANDS[a55_0x1a44c1(0xd1)]('|')})\b`+String[a55_0x1a44c1(0x9f)]`(?:\s+[a-z][\w-]*){0,2}\s+(?:--?[a-z]|[\w.-]+=)`,'i');function isRabetbaseCliInvocation(_0x25b99f){const _0x32b1a9=a55_0x1a44c1,_0x52f97b=_0x25b99f[_0x32b1a9(0xb9)](/\brabetbase\b/i);if(_0x52f97b<0x0)return![];const _0x46bc03=_0x25b99f[_0x32b1a9(0xd8)](_0x52f97b)[_0x32b1a9(0xc1)](/\blovrabet\b/i)[0x0]??'';return RABETBASE_INVOCATION[_0x32b1a9(0xda)](_0x46bc03);}function parseFrontmatter(_0x2b5905){const _0x59579f=a55_0x1a44c1,_0x104ce6=_0x2b5905[_0x59579f(0xd0)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x104ce6)return{'hasFrontmatter':![]};const _0x52a15a=_0x104ce6[0x1]??'',_0x47261e={'hasFrontmatter':!![]};let _0x44d9c2;try{_0x44d9c2=a55_0x1f9177(_0x52a15a);}catch{return _0x47261e;}const _0x496243=asRecord(_0x44d9c2);if(!_0x496243)return _0x47261e;_0x47261e[_0x59579f(0x83)]=scalarToString(_0x496243[_0x59579f(0x83)]),_0x47261e[_0x59579f(0xb4)]=scalarToString(_0x496243['displayName']),_0x47261e[_0x59579f(0x8b)]=scalarToString(_0x496243[_0x59579f(0x8b)]);const _0x103a0c=asRecord(_0x496243[_0x59579f(0x86)]);return _0x103a0c&&(_0x47261e['type']=scalarToString(_0x103a0c[_0x59579f(0x96)]),_0x47261e[_0x59579f(0xbf)]=scalarToBoolean(_0x103a0c[_0x59579f(0xbf)])),_0x47261e;}function asRecord(_0x14fec9){const _0x2076ad=a55_0x1a44c1;if(_0x14fec9&&typeof _0x14fec9===_0x2076ad(0xd3)&&!Array[_0x2076ad(0xc8)](_0x14fec9))return _0x14fec9;return undefined;}function scalarToString(_0x4be744){const _0x5987c9=a55_0x1a44c1;if(typeof _0x4be744===_0x5987c9(0x85))return _0x4be744[_0x5987c9(0xa9)]();if(typeof _0x4be744===_0x5987c9(0x82)||typeof _0x4be744===_0x5987c9(0xd7))return String(_0x4be744);return undefined;}function scalarToBoolean(_0x4e3c32){const _0x1b2b00=a55_0x1a44c1;if(typeof _0x4e3c32===_0x1b2b00(0xd7))return _0x4e3c32;if(typeof _0x4e3c32===_0x1b2b00(0x85))return cleanBoolean(_0x4e3c32);return undefined;}function cleanBoolean(_0x2f093d){const _0x4cf78d=a55_0x1a44c1,_0x4d02ea=_0x2f093d[_0x4cf78d(0xa9)]()[_0x4cf78d(0xa0)]();if(_0x4d02ea===_0x4cf78d(0x97))return!![];if(_0x4d02ea===_0x4cf78d(0xaf))return![];return undefined;}function issue(_0x49cc6d,_0x1822d1,_0x3b27fc,_0xb63b95,_0x1f601a,_0x432547){return{'level':_0x49cc6d,'ruleId':_0x1822d1,'file':_0x3b27fc,'section':_0x432547,'message':_0xb63b95,'suggestion':_0x1f601a};}
|
|
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 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a56_0x170931=a56_0x5566;(function(_0x2114b4,_0x1aa45b){const _0x3ae4b5=a56_0x5566,_0x2bab00=_0x2114b4();while(!![]){try{const _0x4d5934=parseInt(_0x3ae4b5(0x1d5))/0x1*(-parseInt(_0x3ae4b5(0x1ea))/0x2)+-parseInt(_0x3ae4b5(0x1d9))/0x3+parseInt(_0x3ae4b5(0x1d8))/0x4+-parseInt(_0x3ae4b5(0x1d6))/0x5+parseInt(_0x3ae4b5(0x1e4))/0x6*(-parseInt(_0x3ae4b5(0x1e9))/0x7)+parseInt(_0x3ae4b5(0x1e7))/0x8*(parseInt(_0x3ae4b5(0x1e3))/0x9)+-parseInt(_0x3ae4b5(0x1e1))/0xa*(-parseInt(_0x3ae4b5(0x1e8))/0xb);if(_0x4d5934===_0x1aa45b)break;else _0x2bab00['push'](_0x2bab00['shift']());}catch(_0x518f81){_0x2bab00['push'](_0x2bab00['shift']());}}}(a56_0x5b44,0x74952));import{getSqlQueryInfo}from'../../core/api-client.js';function a56_0x5b44(){const _0x5df75d=['36813WQoVUB','9082UDtkVL','sqlName','179iFJlJJ','4584050urdMtg','str','1288464EUyeAx','663213FVGwzT','dbId','Get\x20custom\x20SQL\x20query\x20details\x20by\x20sqlCode','sqlContent','read','bool','appCode','sqlcode','50hdEpLk','detail','9sGjeid','894ETZycl','sql','description','6838896VHuqYQ','4476681tBJxmY'];a56_0x5b44=function(){return _0x5df75d;};return a56_0x5b44();}import{getDbName}from'../../core/db-resolver.js';import{SQLCODE_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';function a56_0x5566(_0x33c617,_0x3b4fcd){_0x33c617=_0x33c617-0x1d4;const _0x5b4483=a56_0x5b44();let _0x556675=_0x5b4483[_0x33c617];return _0x556675;}export const sqlDetail={'service':a56_0x170931(0x1e5),'command':a56_0x170931(0x1e2),'description':a56_0x170931(0x1db),'risk':a56_0x170931(0x1dd),'flags':[SQLCODE_FLAG,VERBOSE_FLAG],async 'execute'(_0x865945){const _0x272b33=a56_0x170931,_0x5e91d=await getSqlQueryInfo(_0x865945[_0x272b33(0x1df)],_0x865945[_0x272b33(0x1d7)](_0x272b33(0x1e0))),_0x3d3f6e=_0x865945[_0x272b33(0x1de)]('verbose');if(_0x3d3f6e)return{'ok':!![],'data':_0x5e91d};const _0x434336=_0x5e91d[_0x272b33(0x1da)]?await getDbName(_0x865945[_0x272b33(0x1df)],_0x5e91d[_0x272b33(0x1da)]):undefined;return{'ok':!![],'data':{'sqlCode':_0x5e91d['sqlCode'],'sqlName':_0x5e91d[_0x272b33(0x1d4)],'db':_0x434336?_0x434336+'\x20('+_0x5e91d[_0x272b33(0x1da)]+')':_0x5e91d[_0x272b33(0x1da)]??'','description':_0x5e91d[_0x272b33(0x1e6)]??'','sqlContent':_0x5e91d[_0x272b33(0x1dc)]??''}};}};
|
package/lib/commands/sql/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a57_0x289d12=a57_0x5b84;(function(_0x4ad79f,_0x25193a){const _0x12daa2=a57_0x5b84,_0x44f74b=_0x4ad79f();while(!![]){try{const _0x1c9edf=parseInt(_0x12daa2(0xa1))/0x1+parseInt(_0x12daa2(0x9d))/0x2+-parseInt(_0x12daa2(0x95))/0x3*(parseInt(_0x12daa2(0xa0))/0x4)+-parseInt(_0x12daa2(0x97))/0x5*(parseInt(_0x12daa2(0x93))/0x6)+-parseInt(_0x12daa2(0x9b))/0x7*(parseInt(_0x12daa2(0x91))/0x8)+-parseInt(_0x12daa2(0x92))/0x9+-parseInt(_0x12daa2(0xa2))/0xa*(-parseInt(_0x12daa2(0x8c))/0xb);if(_0x1c9edf===_0x25193a)break;else _0x44f74b['push'](_0x44f74b['shift']());}catch(_0x2139e4){_0x44f74b['push'](_0x44f74b['shift']());}}}(a57_0x469d,0x52d28));import{executeSdkSql}from'../../core/sdk-client.js';function a57_0x469d(){const _0x2003ac=['\x20row(s)\x20in\x20','1498snGaEc','SQL\x20execution\x20failed','699416VSnoRF','params','execSuccess','278444isCgfP','333670dBNiJK','384010HDPMvi','execResult','execError','231XjKuqg','length','Returned\x20','isArray','sql','12712Huwwuk','4448889TmDpfo','92022wgrSdB','now','9CRhBnI','Execute\x20a\x20custom\x20SQL\x20query\x20by\x20sqlCode','35VAbVYy','read','str'];a57_0x469d=function(){return _0x2003ac;};return a57_0x469d();}import{SQLCODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';import{parseJsonParams}from'../../utils/params.js';function a57_0x5b84(_0x684f13,_0x18f68e){_0x684f13=_0x684f13-0x8b;const _0x469dce=a57_0x469d();let _0x5b849e=_0x469dce[_0x684f13];return _0x5b849e;}export const sqlExec={'service':a57_0x289d12(0x90),'command':'exec','description':a57_0x289d12(0x96),'risk':a57_0x289d12(0x98),'flags':[SQLCODE_FLAG,PARAMS_FLAG],async 'execute'(_0x5bc457){const _0x144cae=a57_0x289d12,_0xee40ae=parseJsonParams(_0x5bc457[_0x144cae(0x99)](_0x144cae(0x9e))),_0x2ce20b=Date[_0x144cae(0x94)](),_0x5ceb91=await executeSdkSql(_0x5bc457['str']('sqlcode'),_0xee40ae),_0x1827de=Date['now']()-_0x2ce20b,_0x2e4f70=_0x5ceb91?.[_0x144cae(0xa3)]??_0x5ceb91,_0x3e36bf=_0x5ceb91?.[_0x144cae(0x9f)]??!![];if(!_0x3e36bf)return{'ok':![],'data':{'error':_0x5ceb91?.[_0x144cae(0x8b)]||_0x144cae(0x9c),'elapsed':_0x1827de},'message':_0x144cae(0x9c)};const _0x3548b1=Array[_0x144cae(0x8f)](_0x2e4f70)?_0x2e4f70:[];return{'ok':!![],'data':{'rows':_0x3548b1,'rowCount':_0x3548b1['length'],'elapsed':_0x1827de},'message':_0x144cae(0x8e)+_0x3548b1[_0x144cae(0x8d)]+_0x144cae(0x9a)+_0x1827de+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a58_0x38a0(){const _0x2a3f19=['921484xyqGHR','6Lthodn','1679875MgBPDb','2291688CrFrtt','6PKaxFA','340777nrjYoe','307279bPNQFN','978152PCIZFS','14021847UbJwRz'];a58_0x38a0=function(){return _0x2a3f19;};return a58_0x38a0();}(function(_0x19dac9,_0x171192){const _0x1802b7=a58_0x5df0,_0xc9773e=_0x19dac9();while(!![]){try{const _0x1292d2=-parseInt(_0x1802b7(0x8e))/0x1+-parseInt(_0x1802b7(0x89))/0x2+parseInt(_0x1802b7(0x8d))/0x3*(-parseInt(_0x1802b7(0x90))/0x4)+parseInt(_0x1802b7(0x8b))/0x5+parseInt(_0x1802b7(0x8a))/0x6*(-parseInt(_0x1802b7(0x8f))/0x7)+-parseInt(_0x1802b7(0x8c))/0x8+parseInt(_0x1802b7(0x91))/0x9;if(_0x1292d2===_0x171192)break;else _0xc9773e['push'](_0xc9773e['shift']());}catch(_0x419075){_0xc9773e['push'](_0xc9773e['shift']());}}}(a58_0x38a0,0x42a6d));import{sqlDetail}from'../../commands/sql/detail.js';import{sqlExec}from'../../commands/sql/exec.js';function a58_0x5df0(_0x27c5c0,_0x2235ee){_0x27c5c0=_0x27c5c0-0x89;const _0x38a0f7=a58_0x38a0();let _0x5df0c0=_0x38a0f7[_0x27c5c0];return _0x5df0c0;}export const sqlDefinitions=[sqlDetail,sqlExec];
|
package/lib/commands/update.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function a59_0x275e(_0x1767da,_0x26a2f0){_0x1767da=_0x1767da-0xa3;const _0x57fb47=a59_0x57fb();let _0x275e18=_0x57fb47[_0x1767da];return _0x275e18;}const a59_0x376653=a59_0x275e;(function(_0x12d9e3,_0x1c20da){const _0x1741ec=a59_0x275e,_0xe23b68=_0x12d9e3();while(!![]){try{const _0x41e710=-parseInt(_0x1741ec(0xb3))/0x1+parseInt(_0x1741ec(0xd3))/0x2+parseInt(_0x1741ec(0xa8))/0x3*(-parseInt(_0x1741ec(0xd8))/0x4)+-parseInt(_0x1741ec(0xca))/0x5*(parseInt(_0x1741ec(0xc6))/0x6)+parseInt(_0x1741ec(0xe1))/0x7*(parseInt(_0x1741ec(0xa9))/0x8)+parseInt(_0x1741ec(0xe9))/0x9*(-parseInt(_0x1741ec(0xe3))/0xa)+parseInt(_0x1741ec(0xac))/0xb;if(_0x41e710===_0x1c20da)break;else _0xe23b68['push'](_0xe23b68['shift']());}catch(_0x38da4f){_0xe23b68['push'](_0xe23b68['shift']());}}}(a59_0x57fb,0x6d610));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';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_0x376653(0xb4),'description':a59_0x376653(0xbd),'default':![]},{'name':a59_0x376653(0xe5),'type':a59_0x376653(0xb4),'description':'Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','default':![]},{'name':'version','type':'string','description':'Install\x20a\x20specific\x20CLI\x20version'},{'name':'no-skills','type':a59_0x376653(0xb4),'description':a59_0x376653(0xad),'default':![]},{'name':a59_0x376653(0xb1),'type':a59_0x376653(0xb4),'description':a59_0x376653(0xc5),'default':!![],'hidden':!![]}];function parseSemver(_0x356b05){const _0x76556c=a59_0x376653,_0x42d7ff=_0x356b05[_0x76556c(0xb0)]()[_0x76556c(0xc2)](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0x42d7ff)return null;return{'major':Number(_0x42d7ff[0x1]),'minor':Number(_0x42d7ff[0x2]),'patch':Number(_0x42d7ff[0x3]),'prerelease':_0x42d7ff[0x4]};}function compareSemver(_0x47ce66,_0x3fdf1d){const _0x56da9f=a59_0x376653,_0x4b840e=parseSemver(_0x47ce66),_0x1f5e7c=parseSemver(_0x3fdf1d);if(!_0x4b840e||!_0x1f5e7c)throw CliErrors[_0x56da9f(0xba)](_0x56da9f(0xbc),'Use\x20full\x20semver\x20versions\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.');for(const _0x14640f of['major',_0x56da9f(0xee),_0x56da9f(0xda)]){if(_0x4b840e[_0x14640f]<_0x1f5e7c[_0x14640f])return-0x1;if(_0x4b840e[_0x14640f]>_0x1f5e7c[_0x14640f])return 0x1;}if(!_0x4b840e[_0x56da9f(0xbe)]&&!_0x1f5e7c[_0x56da9f(0xbe)])return 0x0;if(!_0x4b840e[_0x56da9f(0xbe)])return 0x1;if(!_0x1f5e7c['prerelease'])return-0x1;if(_0x4b840e[_0x56da9f(0xbe)]===_0x1f5e7c['prerelease'])return 0x0;return _0x4b840e[_0x56da9f(0xbe)]<_0x1f5e7c[_0x56da9f(0xbe)]?-0x1:0x1;}function getRequestedVersion(_0x2632de){const _0x3b12ca=a59_0x376653,_0x1eec0b=_0x2632de[_0x3b12ca(0xaa)](_0x3b12ca(0xb8))[_0x3b12ca(0xb0)]();if(_0x1eec0b)return _0x1eec0b;return String(_0x2632de[_0x3b12ca(0xe6)]?.[0x0]??'')[_0x3b12ca(0xb0)]();}function a59_0x57fb(){const _0x325cdf=['Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.','Already\x20up\x20to\x20date\x20(v','\x20->\x20','match','stderr','stdout','Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','304170WlzBRg','filter','error','json','35VAOavH','entries','no-skills','pipe','toString','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','source','skipped','cwd','1337544jbEdsD','Invalid\x20version:\x20','Current\x20version:\x20','map','flag','1145804KHJkVI','length','patch','/dist-tags','status','npm','\x20\x20Run\x20manually:\x20lovrabet\x20cli-skill\x20install','\x20version\x20from\x20npm.','\x20\x20Try\x20manually:\x20npm\x20install\x20-g\x20','12768ksfCuT','install','5824210dUEqNr','\x20CLI\x20from\x20npm','beta','args','Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','9oPZKlu','string','Update\x20failed:\x20','fromEntries','latest','minor','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','nonInteractive','Updating\x20','join','unknown','3RhSkXF','16uPdwAR','str','inherit','18177687mPGsNB','Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','bool','trim','skills','Unable\x20to\x20resolve\x20','653184WuDLWZ','boolean','object','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','Update\x20','version','warn','validation','log','Version\x20comparison\x20failed.','Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag','prerelease'];a59_0x57fb=function(){return _0x325cdf;};return a59_0x57fb();}function shouldSkipCliBuiltInSkill(_0x326ce5){const _0x242b56=a59_0x376653;return _0x326ce5[_0x242b56(0xaf)](_0x242b56(0xcc))||_0x326ce5[_0x242b56(0xd7)](_0x242b56(0xb1))===![];}async function validateUpdateFlags(_0x784f47){const _0x64b8ba=a59_0x376653,_0x425792=getRequestedVersion(_0x784f47),_0x3cc389=[_0x784f47[_0x64b8ba(0xaf)](_0x64b8ba(0xed))?'latest':'',_0x784f47['bool']('beta')?_0x64b8ba(0xe5):'',_0x425792?_0x64b8ba(0xb8):'']['filter'](Boolean);if(_0x3cc389[_0x64b8ba(0xd9)]>0x1)throw CliErrors[_0x64b8ba(0xba)]('--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.',_0x64b8ba(0xbf));if(_0x425792&&!parseSemver(_0x425792))throw CliErrors[_0x64b8ba(0xba)](_0x64b8ba(0xd4)+_0x425792,_0x64b8ba(0xe7));}async function fetchNpmDistTags(){const _0x213acd=a59_0x376653;try{const _0x2b4996=NPM_REGISTRY_BASE_URL+'/-/package/'+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x213acd(0xdb),_0x3468e7=await fetch(_0x2b4996,{'signal':AbortSignal['timeout'](0x2710)});if(!_0x3468e7['ok'])return null;const _0xfc00ac=await _0x3468e7[_0x213acd(0xc9)]();if(!_0xfc00ac||typeof _0xfc00ac!==_0x213acd(0xb5))return null;return Object[_0x213acd(0xec)](Object[_0x213acd(0xcb)](_0xfc00ac)[_0x213acd(0xc7)](([,_0x3a2d5a])=>typeof _0x3a2d5a===_0x213acd(0xea)&&_0x3a2d5a['trim']())[_0x213acd(0xd6)](([_0x1fda07,_0x285ead])=>[_0x1fda07,String(_0x285ead)[_0x213acd(0xb0)]()]));}catch{return null;}}async function resolveTargetVersion(_0x351ade){const _0x75c192=a59_0x376653,_0x1711ac=getRequestedVersion(_0x351ade);if(_0x1711ac)return{'version':_0x1711ac,'source':_0x75c192(0xb8)};const _0x10c034=_0x351ade[_0x75c192(0xaf)]('beta')?_0x75c192(0xe5):'latest',_0xcd3cda=await fetchNpmDistTags(),_0xae2120=_0xcd3cda?.[_0x10c034];if(!_0xae2120)return null;return{'version':_0xae2120,'source':_0x10c034};}function shouldInstallTarget(_0x378732,_0x5735b4){const _0xfdf93a=a59_0x376653,_0x1069c4=compareSemver(_0x378732,_0x5735b4[_0xfdf93a(0xb8)]);if(_0x5735b4[_0xfdf93a(0xd0)]===_0xfdf93a(0xb8))return _0x1069c4!==0x0;return _0x1069c4<0x0;}function installCliPackage(_0x9074a4,_0x386c2a){const _0x59f09d=a59_0x376653,_0x381002=resolveNpmBin(_0x59f09d(0xdd)),_0x4e6f52=[_0x59f09d(0xe2),'-g',LOVRABET_NPM_PACKAGE_NAME+'@'+_0x9074a4];console[_0x59f09d(0xbb)]('*\x20'+[_0x381002,..._0x4e6f52][_0x59f09d(0xa6)]('\x20'));const _0x2ff09e=spawnSync(_0x381002,_0x4e6f52,{'cwd':process[_0x59f09d(0xd2)](),'stdio':_0x386c2a?_0x59f09d(0xcd):_0x59f09d(0xab),'env':process.env,'shell':![]});if(_0x2ff09e[_0x59f09d(0xdc)]===0x0)return{'ok':!![]};let _0x102e90=_0x2ff09e[_0x59f09d(0xc8)]?.['message']||'exit\x20'+(_0x2ff09e[_0x59f09d(0xdc)]??'unknown');if(_0x386c2a){const _0xc8043a=_0x2ff09e[_0x59f09d(0xc3)]?_0x2ff09e[_0x59f09d(0xc3)][_0x59f09d(0xce)]()['trim']():'',_0x1a247d=_0x2ff09e['stdout']?_0x2ff09e[_0x59f09d(0xc4)][_0x59f09d(0xce)]()['trim']():'';if(_0xc8043a)_0x102e90=_0xc8043a;else{if(_0x1a247d)_0x102e90=_0x1a247d;}}return{'ok':![],'error':_0x102e90};}async function installCliBuiltInSkill(_0x7b90bd){const _0x37f073=a59_0x376653;console[_0x37f073(0xbb)]('Checking\x20CLI\x20Built-in\x20Skill...');const _0x3291b0=runNpxSkillsAddGlobal(process['cwd'](),LOVRABET_SKILL_SOURCE,{'stdio':_0x7b90bd?_0x37f073(0xcd):_0x37f073(0xab)});if(_0x3291b0[_0x37f073(0xd1)]){console[_0x37f073(0xbb)]('\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20('+LOVRABET_SKIP_NPX_SKILLS_ENV+'=1).');return;}if(_0x3291b0['ok']){console['log'](_0x37f073(0xb6));return;}console[_0x37f073(0xb9)](_0x37f073(0xa3)+(_0x3291b0[_0x37f073(0xc8)]||_0x37f073(0xa7))),console['log'](_0x37f073(0xde));}async function execute(_0x305fbe){const _0x51f6e7=a59_0x376653;await validateUpdateFlags(_0x305fbe);const _0x47adc6=getCliVersion();console[_0x51f6e7(0xbb)](_0x51f6e7(0xd5)+_0x47adc6),console[_0x51f6e7(0xbb)]('Checking\x20npm\x20dist-tags...');const _0x1dce86=await resolveTargetVersion(_0x305fbe);if(!_0x1dce86){const _0xd2af2e=_0x305fbe['bool'](_0x51f6e7(0xe5))?'beta':_0x51f6e7(0xed),_0x4955ce=_0x51f6e7(0xb2)+_0xd2af2e+_0x51f6e7(0xdf);return console[_0x51f6e7(0xb9)](_0x4955ce),console[_0x51f6e7(0xbb)](_0x51f6e7(0xe8)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0xd2af2e),{'ok':![]};}if(!shouldInstallTarget(_0x47adc6,_0x1dce86)){const _0x50db3f=_0x1dce86[_0x51f6e7(0xd0)]==='version'?'Already\x20on\x20requested\x20version\x20(v'+_0x1dce86[_0x51f6e7(0xb8)]+').':_0x51f6e7(0xc0)+_0x1dce86['version']+').';return console['log'](_0x50db3f),shouldSkipCliBuiltInSkill(_0x305fbe)?console[_0x51f6e7(0xbb)]('Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).'):await installCliBuiltInSkill(_0x305fbe[_0x51f6e7(0xa4)]),{'ok':!![]};}console[_0x51f6e7(0xbb)](_0x51f6e7(0xa5)+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0x47adc6+_0x51f6e7(0xc1)+_0x1dce86[_0x51f6e7(0xb8)]);const _0x5a7388=installCliPackage(_0x1dce86[_0x51f6e7(0xb8)],_0x305fbe[_0x51f6e7(0xa4)]);if(!_0x5a7388['ok']){const _0x1a9eb0=_0x51f6e7(0xeb)+(_0x5a7388[_0x51f6e7(0xc8)]||'unknown');return console[_0x51f6e7(0xc8)](_0x1a9eb0),console['log'](_0x51f6e7(0xe0)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x1dce86[_0x51f6e7(0xb8)]),{'ok':![]};}return console[_0x51f6e7(0xbb)]('Updated\x20to\x20v'+_0x1dce86[_0x51f6e7(0xb8)]+'.'),console[_0x51f6e7(0xbb)](_0x51f6e7(0xae)),shouldSkipCliBuiltInSkill(_0x305fbe)?console[_0x51f6e7(0xbb)](_0x51f6e7(0xcf)):await installCliBuiltInSkill(_0x305fbe[_0x51f6e7(0xa4)]),{'ok':!![]};}export const updateDefinition={'service':'update','command':'run','description':a59_0x376653(0xb7)+CLI_BIN_NAME+a59_0x376653(0xe4),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
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 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a60_0x1a43ae=a60_0x1379;(function(_0x590368,_0x3d59ef){const _0x36f921=a60_0x1379,_0x132ae8=_0x590368();while(!![]){try{const _0x15a02c=parseInt(_0x36f921(0xc5))/0x1+-parseInt(_0x36f921(0xa5))/0x2+parseInt(_0x36f921(0xa9))/0x3*(parseInt(_0x36f921(0xd9))/0x4)+parseInt(_0x36f921(0xd7))/0x5*(parseInt(_0x36f921(0xb3))/0x6)+parseInt(_0x36f921(0xb1))/0x7*(parseInt(_0x36f921(0xb4))/0x8)+-parseInt(_0x36f921(0xb6))/0x9*(parseInt(_0x36f921(0xcd))/0xa)+-parseInt(_0x36f921(0xad))/0xb*(-parseInt(_0x36f921(0xac))/0xc);if(_0x15a02c===_0x3d59ef)break;else _0x132ae8['push'](_0x132ae8['shift']());}catch(_0x3a0f82){_0x132ae8['push'](_0x132ae8['shift']());}}}(a60_0x43d1,0x5205a));import{CLI_BIN_NAME}from'../../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../../constant/env.js';function a60_0x1379(_0xb81cc4,_0x13f637){_0xb81cc4=_0xb81cc4-0x9e;const _0x43d1dd=a60_0x43d1();let _0x137983=_0x43d1dd[_0xb81cc4];return _0x137983;}import{CliErrors}from'../../errors.js';import{readConfigFile,resolveWriteConfigPath,writeConfigFile}from'../../context.js';import{findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../../commands/app/eligibility.js';const WORKSPACE_USE_FLAGS=[{'name':a60_0x1a43ae(0xd8),'type':a60_0x1a43ae(0xaa),'description':a60_0x1a43ae(0xc0)},{'name':'appcode','type':a60_0x1a43ae(0xaa),'description':a60_0x1a43ae(0xa4)},{'name':a60_0x1a43ae(0x9e),'type':'string','description':a60_0x1a43ae(0xd3),'enum':[...RUNTIME_ENV_VALUES]},{'name':a60_0x1a43ae(0xa8),'type':a60_0x1a43ae(0xc4),'description':a60_0x1a43ae(0xb8),'default':![]}];async function executeWorkspaceUse(_0x2171c0,_0x2ce226){const _0x4e08d0=a60_0x1a43ae,_0x553969=_0x2171c0['str'](_0x4e08d0(0xd8))['trim'](),_0x549969=_0x2171c0[_0x4e08d0(0xc8)](_0x4e08d0(0xc9))[_0x4e08d0(0xb5)](),_0x5bf3ec=_0x2171c0[_0x4e08d0(0xc8)](_0x4e08d0(0x9e))[_0x4e08d0(0xb5)](),_0x490baa=resolveWorkspaceEnv(_0x5bf3ec||_0x2171c0[_0x4e08d0(0xd1)]||DEFAULT_CONFIG_VALUES[_0x4e08d0(0x9e)]);if(!_0x553969&&!_0x549969)throw CliErrors[_0x4e08d0(0xaf)](_0x4e08d0(0xa2),'Usage:\x20'+CLI_BIN_NAME+_0x4e08d0(0xa0)+_0x2ce226+'\x20--app\x20<name>\x20[--env\x20daily]\x20or\x20'+CLI_BIN_NAME+_0x4e08d0(0xa0)+_0x2ce226+_0x4e08d0(0x9f));const _0x957280=_0x549969||await resolveRemoteAppCode({'command':_0x2ce226,'appName':_0x553969,'env':_0x490baa,'accessKey':_0x2171c0['accessKey']}),_0x3970f9=writeWorkspaceConfig({'command':_0x2ce226,'appName':_0x553969,'appcode':_0x957280,'env':_0x490baa,'shouldWriteEnv':!!_0x5bf3ec,'accessKey':_0x2171c0[_0x4e08d0(0xcf)]});return{'ok':!![],'data':{'configPath':_0x3970f9,'app':_0x553969||null,'appcode':_0x957280,'env':_0x5bf3ec?_0x490baa:null,'accessKeyWritten':![],'command':_0x4e08d0(0xb7)+_0x2ce226},'message':buildWorkspaceMessage(_0x3970f9,_0x553969,_0x957280,_0x5bf3ec?_0x490baa:undefined)};}async function resolveRemoteAppCode(_0x19f9fe){const _0x328bf5=a60_0x1a43ae;if(!_0x19f9fe[_0x328bf5(0xcf)])throw CliErrors[_0x328bf5(0xc1)](_0x328bf5(0xd6)+CLI_BIN_NAME+_0x328bf5(0xa0)+_0x19f9fe[_0x328bf5(0xa3)]+'.');const {setActiveAK:_0x3483bf}=await import(_0x328bf5(0xbc)),{getRemoteAppList:_0x104a99}=await import(_0x328bf5(0xb0));_0x3483bf(_0x19f9fe[_0x328bf5(0xcf)]);const _0x5f4c87=await _0x104a99({'env':_0x19f9fe[_0x328bf5(0x9e)],'accessKey':_0x19f9fe[_0x328bf5(0xcf)],'noCache':![]}),_0x302a5e=findAppByName(_0x5f4c87[_0x328bf5(0xa7)],_0x19f9fe[_0x328bf5(0xcb)]);if(_0x302a5e&&!isRuntimeAccessibleApp(_0x302a5e))throw runtimeInaccessibleAppError(_0x302a5e,'\x22'+_0x19f9fe['appName']+'\x22');const _0x1d2531=_0x302a5e?.['appCode']?.[_0x328bf5(0xb5)]();if(_0x1d2531)return _0x1d2531;const _0x2dcc54=_0x5f4c87[_0x328bf5(0xa7)][_0x328bf5(0xc7)](_0x3c5aa5=>_0x3c5aa5[_0x328bf5(0xcb)])['filter'](Boolean),_0x4afd3b=_0x2dcc54[_0x328bf5(0xca)]?'Available\x20apps:\x20'+Array['from'](new Set(_0x2dcc54))[_0x328bf5(0xd0)](',\x20')+'.':_0x328bf5(0xa1)+CLI_BIN_NAME+_0x328bf5(0xb2);throw CliErrors['validation'](_0x328bf5(0xbd)+_0x19f9fe[_0x328bf5(0xcb)]+_0x328bf5(0xd5),_0x4afd3b);}function writeWorkspaceConfig(_0x3ab138){const _0x99ff2b=a60_0x1a43ae,_0x5cb433=resolveWriteConfigPath('project'),_0x512584=readConfigFile(_0x5cb433);_0x3ab138[_0x99ff2b(0xae)]&&(_0x512584[_0x99ff2b(0x9e)]=_0x3ab138[_0x99ff2b(0x9e)]);if(_0x3ab138[_0x99ff2b(0xcb)]){const _0x116629=isRecord(_0x512584['apps'])?{..._0x512584[_0x99ff2b(0xab)]}:{},_0x212cdc=isRecord(_0x116629[_0x3ab138[_0x99ff2b(0xcb)]])?_0x116629[_0x3ab138[_0x99ff2b(0xcb)]]:{};_0x116629[_0x3ab138[_0x99ff2b(0xcb)]]={..._0x212cdc,'appcode':_0x3ab138[_0x99ff2b(0xc9)]},_0x512584[_0x99ff2b(0xab)]=_0x116629,_0x512584[_0x99ff2b(0xd4)]=_0x3ab138[_0x99ff2b(0xcb)];if(_0x512584[_0x99ff2b(0xd8)])delete _0x512584['app'];return writeAndReturn(_0x5cb433,_0x512584);}_0x512584[_0x99ff2b(0xc9)]=_0x3ab138[_0x99ff2b(0xc9)];if(_0x512584[_0x99ff2b(0xd8)])delete _0x512584['app'];return writeAndReturn(_0x5cb433,_0x512584);}function writeAndReturn(_0x2110be,_0x26f39b){return writeConfigFile(_0x2110be,_0x26f39b),_0x2110be;}function a60_0x43d1(){const _0x285c11=['App\x20\x22','init','includes','App\x20name\x20to\x20bind\x20as\x20the\x20current\x20workspace\x20default','authRequired','Invalid\x20env\x20\x22','Workspace\x20configured.\x0aConfig\x20file:\x20','boolean','205137CKsogg','workspace','map','str','appcode','length','appName','object','2353080fxeDPk','\x0aAccessKey:\x20not\x20written','accessKey','join','envName','\x0aDefault\x20app:\x20','Target\x20environment','defaultApp','\x22\x20not\x20found.','Resolving\x20--app\x20requires\x20accessKey.\x20Pass\x20--appcode\x20directly,\x20or\x20set\x20accessKey\x20before\x20running\x20','810AXRyUn','app','84yIpVgM','env','\x20--appcode\x20<code>\x20[--env\x20daily]','\x20workspace\x20','Run\x20`','Missing\x20workspace\x20app\x20selector.','command','App\x20code\x20to\x20bind\x20directly','798564uGXQrz','isArray','items','yes','1428xibXCr','string','apps','228OiLcPK','173162LTtSuy','shouldWriteEnv','validation','../../commands/app/remote-source.js','3655239bUOycn','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20pass\x20--appcode\x20directly.','6276gTNzgg','8OghPhl','trim','18PThuBK','workspace\x20','Compatibility\x20flag;\x20workspace\x20config\x20updates\x20are\x20non-interactive','Initialize\x20app\x20context\x20for\x20the\x20current\x20workspace','\x0aEnv:\x20','use','../../core/api-client.js'];a60_0x43d1=function(){return _0x285c11;};return a60_0x43d1();}function resolveWorkspaceEnv(_0x4defd5){const _0x6a5f70=a60_0x1a43ae;if(RUNTIME_ENV_VALUES[_0x6a5f70(0xbf)](_0x4defd5))return _0x4defd5;throw CliErrors[_0x6a5f70(0xaf)](_0x6a5f70(0xc2)+_0x4defd5+'\x22.\x20Allowed:\x20'+RUNTIME_ENV_VALUES[_0x6a5f70(0xd0)](',\x20'));}function buildWorkspaceMessage(_0x402cee,_0x5c203d,_0x1f42da,_0x36b3cc){const _0x1a90a8=a60_0x1a43ae,_0x399a05=_0x5c203d?_0x5c203d+'\x20('+_0x1f42da+')':_0x1f42da,_0x5ad5e3=_0x36b3cc?_0x1a90a8(0xba)+_0x36b3cc:'';return _0x1a90a8(0xc3)+_0x402cee+_0x1a90a8(0xd2)+_0x399a05+_0x5ad5e3+_0x1a90a8(0xce);}function isRecord(_0x208870){const _0x535897=a60_0x1a43ae;return typeof _0x208870===_0x535897(0xcc)&&_0x208870!==null&&!Array[_0x535897(0xa6)](_0x208870);}function makeWorkspaceCommand(_0xa2d19f){const _0x33a866=a60_0x1a43ae;return{'service':_0x33a866(0xc6),'command':_0xa2d19f,'description':_0xa2d19f===_0x33a866(0xbe)?_0x33a866(0xb9):'Set\x20app\x20context\x20for\x20the\x20current\x20workspace','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':WORKSPACE_USE_FLAGS,async 'execute'(_0x17d062){return executeWorkspaceUse(_0x17d062,_0xa2d19f);}};}export const workspaceDefinitions=[makeWorkspaceCommand(a60_0x1a43ae(0xbe)),makeWorkspaceCommand(a60_0x1a43ae(0xbb))];
|
package/lib/config/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a61_0x28d119=a61_0x9db7;(function(_0x4bef0c,_0x4f9dc7){const _0x4853d1=a61_0x9db7,_0x2849c1=_0x4bef0c();while(!![]){try{const _0x10e338=-parseInt(_0x4853d1(0x1d8))/0x1+parseInt(_0x4853d1(0x1cc))/0x2+-parseInt(_0x4853d1(0x1bd))/0x3+parseInt(_0x4853d1(0x1c5))/0x4*(parseInt(_0x4853d1(0x1c6))/0x5)+parseInt(_0x4853d1(0x1c1))/0x6*(parseInt(_0x4853d1(0x1c9))/0x7)+-parseInt(_0x4853d1(0x1da))/0x8*(-parseInt(_0x4853d1(0x1d7))/0x9)+-parseInt(_0x4853d1(0x1c2))/0xa*(-parseInt(_0x4853d1(0x1d2))/0xb);if(_0x10e338===_0x4f9dc7)break;else _0x2849c1['push'](_0x2849c1['shift']());}catch(_0x19022d){_0x2849c1['push'](_0x2849c1['shift']());}}}(a61_0x5d16,0xd4acc));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{OUTPUT_FORMAT_VALUES}from'../constant/output.js';function a61_0x9db7(_0x439c42,_0x151701){_0x439c42=_0x439c42-0x1ba;const _0x5d1699=a61_0x5d16();let _0x9db72b=_0x5d1699[_0x439c42];return _0x9db72b;}export const CONFIG_FIELD_SCHEMAS={'env':{'description':a61_0x28d119(0x1ba),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':RUNTIME_ENV_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a61_0x28d119(0x1be)],'importable':!![]},'format':{'description':a61_0x28d119(0x1cd),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':OUTPUT_FORMAT_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a61_0x28d119(0x1d6)],'importable':!![]},'pageSize':{'description':a61_0x28d119(0x1cb),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'apiDomain':{'description':a61_0x28d119(0x1c0),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'userDomain':{'description':'Override\x20user\x20domain','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'runtimeDomain':{'description':a61_0x28d119(0x1d0),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'skillHubDomain':{'description':a61_0x28d119(0x1bf),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'accessKey':{'description':a61_0x28d119(0x1db),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'riskLevel':{'description':a61_0x28d119(0x1d5),'topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a61_0x28d119(0x1c7)],'importable':!![]},'locale':{'description':a61_0x28d119(0x1cf),'topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a61_0x28d119(0x1dc)],'importable':!![],'legacyCompatOnly':!![]}};export const TOP_LEVEL_CONFIG_KEYS=new Set(Object['entries'](CONFIG_FIELD_SCHEMAS)['filter'](([,_0x44c214])=>_0x44c214[a61_0x28d119(0x1d1)])[a61_0x28d119(0x1c3)](([_0x3fc76b])=>_0x3fc76b));export const CONFIG_ENUM_VALUES=Object[a61_0x28d119(0x1bc)](Object['entries'](CONFIG_FIELD_SCHEMAS)[a61_0x28d119(0x1d9)](([,_0x3b650a])=>_0x3b650a[a61_0x28d119(0x1ce)])[a61_0x28d119(0x1c3)](([_0x5bd212,_0x1d15a7])=>[_0x5bd212,[..._0x1d15a7[a61_0x28d119(0x1ce)]||[]]]));export const IMPORTABLE_RUNTIME_CONFIG_KEYS=Object[a61_0x28d119(0x1c8)](CONFIG_FIELD_SCHEMAS)[a61_0x28d119(0x1d9)](([,_0x43b9a2])=>_0x43b9a2['importable'])[a61_0x28d119(0x1c3)](([_0x5bf23e])=>_0x5bf23e);export function getConfigFieldSchema(_0x275b0d){return CONFIG_FIELD_SCHEMAS[_0x275b0d];}export function getConfigEnumValues(_0x577150){const _0x5f098f=a61_0x28d119;return getConfigFieldSchema(_0x577150)?.[_0x5f098f(0x1ce)];}export function getConfigDefaultValue(_0x1d83bf){const _0x15e487=a61_0x28d119;return getConfigFieldSchema(_0x1d83bf)?.[_0x15e487(0x1d3)];}export function isTopLevelConfigKey(_0x4f3755){const _0x33a302=a61_0x28d119;return TOP_LEVEL_CONFIG_KEYS[_0x33a302(0x1d4)](_0x4f3755);}export function isLegacyCompatConfigKey(_0x33cf8a){const _0x8f5bfc=a61_0x28d119;return getConfigFieldSchema(_0x33cf8a)?.[_0x8f5bfc(0x1ca)]===!![];}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function formatConfigKeyList(_0x37a880){const _0x1f500f=a61_0x28d119;return[..._0x37a880][_0x1f500f(0x1bb)](',\x20');}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x9a2660=a61_0x28d119;return'Config\x20key.\x20Top-level:\x20'+getTopLevelConfigKeySummary()+_0x9a2660(0x1c4);}function a61_0x5d16(){const _0x8a5ac5=['264957pUFCft','legacyCompatOnly','Default\x20page\x20size','341566HjzsIc','Default\x20output\x20format','enumValues','Locale','Override\x20runtime\x20domain','cliSettableTopLevel','11GsEPbj','defaultValue','has','Risk\x20level','format','117RDNyOH','733885updGfX','filter','782792yMFkRu','Access\x20key\x20(client-ak\x20auth)','locale','Target\x20environment','join','fromEntries','2255358BMkfUF','env','Override\x20SkillHub\x20domain','Override\x20API\x20domain','18IBZKaX','2534180MkKIwA','map',';\x20local\x20alias:\x20apps.<alias>.appcode','316ISasJh','34620jzTEgD','riskLevel','entries'];a61_0x5d16=function(){return _0x8a5ac5;};return a61_0x5d16();}export function buildAppProfileListFields(_0x30fdc8){return{'env':_0x30fdc8,'hasAccessKey':![],'format':null,'pageSize':null,'riskLevel':null,'locale':null};}
|
package/lib/constant/app.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a62_0x205460=a62_0xde01;function a62_0xde01(_0x4999de,_0x563329){_0x4999de=_0x4999de-0x168;const _0x4e4841=a62_0x4e48();let _0xde013e=_0x4e4841[_0x4999de];return _0xde013e;}(function(_0x4a966d,_0x6c745d){const _0x1a8b68=a62_0xde01,_0x5472fc=_0x4a966d();while(!![]){try{const _0x31382d=-parseInt(_0x1a8b68(0x172))/0x1*(-parseInt(_0x1a8b68(0x16c))/0x2)+parseInt(_0x1a8b68(0x173))/0x3+parseInt(_0x1a8b68(0x171))/0x4+-parseInt(_0x1a8b68(0x16d))/0x5*(-parseInt(_0x1a8b68(0x169))/0x6)+parseInt(_0x1a8b68(0x16e))/0x7*(-parseInt(_0x1a8b68(0x16a))/0x8)+parseInt(_0x1a8b68(0x174))/0x9*(-parseInt(_0x1a8b68(0x170))/0xa)+-parseInt(_0x1a8b68(0x16f))/0xb;if(_0x31382d===_0x6c745d)break;else _0x5472fc['push'](_0x5472fc['shift']());}catch(_0x4c82fa){_0x5472fc['push'](_0x5472fc['shift']());}}}(a62_0x4e48,0x69d7d));export const APP_PUBLISH_STATUS={'Published':a62_0x205460(0x16b),'Unpublished':a62_0x205460(0x175)};function a62_0x4e48(){const _0x22d128=['Published','1954026cZufyA','162088VJgoRt','PUBLISHED','2GjrlvQ','5zNfpMa','161hszijU','4585977UiZPcZ','50rEJzZS','3340924tslDmU','491607klSkUE','389787UljhKF','838791FBMOUG','UNPUBLISH'];a62_0x4e48=function(){return _0x22d128;};return a62_0x4e48();}export const RUNTIME_ACCESSIBLE_APP_STATUS=APP_PUBLISH_STATUS[a62_0x205460(0x168)];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a63_0x501485=a63_0xf503;function a63_0x3554(){const _0x3dcccf=['739280QkXZrY','client-ak','5216808fUpoKF','42wqCynt','12PZYGfy','112265VXuMBq','836216ujoIRg','50xrXPxE','2uXfOkG','11nyHYmk','327870HoCRKH','ClientAk','337059skRzdw','984969svtEUB'];a63_0x3554=function(){return _0x3dcccf;};return a63_0x3554();}(function(_0xa8c491,_0x4dea77){const _0x5b44a3=a63_0xf503,_0x2a9820=_0xa8c491();while(!![]){try{const _0xe61032=-parseInt(_0x5b44a3(0x112))/0x1*(-parseInt(_0x5b44a3(0x10e))/0x2)+parseInt(_0x5b44a3(0x113))/0x3+-parseInt(_0x5b44a3(0x10c))/0x4+-parseInt(_0x5b44a3(0x10b))/0x5*(-parseInt(_0x5b44a3(0x10a))/0x6)+parseInt(_0x5b44a3(0x117))/0x7*(-parseInt(_0x5b44a3(0x114))/0x8)+-parseInt(_0x5b44a3(0x110))/0x9*(-parseInt(_0x5b44a3(0x10d))/0xa)+parseInt(_0x5b44a3(0x10f))/0xb*(parseInt(_0x5b44a3(0x116))/0xc);if(_0xe61032===_0x4dea77)break;else _0x2a9820['push'](_0x2a9820['shift']());}catch(_0x1e1529){_0x2a9820['push'](_0x2a9820['shift']());}}}(a63_0x3554,0x899ca));export const AUTH_MODE={'ClientAk':a63_0x501485(0x115)};function a63_0xf503(_0x548d03,_0x3f5119){_0x548d03=_0x548d03-0x10a;const _0x35543a=a63_0x3554();let _0xf5037d=_0x35543a[_0x548d03];return _0xf5037d;}export function isAuthMode(_0x5e5ec7){const _0x92d707=a63_0x501485;return _0x5e5ec7===AUTH_MODE[_0x92d707(0x111)];}
|
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a64_0x218306=a64_0x24de;(function(_0x137db9,_0x39f316){const _0x6589f3=a64_0x24de,_0x122929=_0x137db9();while(!![]){try{const _0x140081=parseInt(_0x6589f3(0x15e))/0x1*(-parseInt(_0x6589f3(0x14e))/0x2)+parseInt(_0x6589f3(0x156))/0x3*(parseInt(_0x6589f3(0x144))/0x4)+-parseInt(_0x6589f3(0x141))/0x5*(-parseInt(_0x6589f3(0x139))/0x6)+parseInt(_0x6589f3(0x15b))/0x7+-parseInt(_0x6589f3(0x153))/0x8+-parseInt(_0x6589f3(0x138))/0x9*(parseInt(_0x6589f3(0x130))/0xa)+parseInt(_0x6589f3(0x12c))/0xb*(parseInt(_0x6589f3(0x151))/0xc);if(_0x140081===_0x39f316)break;else _0x122929['push'](_0x122929['shift']());}catch(_0xdb36c1){_0x122929['push'](_0x122929['shift']());}}}(a64_0x38c3,0x51a3d));function a64_0x24de(_0x1d0eb2,_0x5f4d0b){_0x1d0eb2=_0x1d0eb2-0x12b;const _0x38c3ad=a64_0x38c3();let _0x24de6e=_0x38c3ad[_0x1d0eb2];return _0x24de6e;}import{PRODUCT_CONFIG}from'../constant/product.js';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';export const CLI_BIN_NAME=PRODUCT_CONFIG[a64_0x218306(0x13e)];export const CLI_DISPLAY_NAME=PRODUCT_CONFIG[a64_0x218306(0x12d)];export const NPM_PACKAGE_NAME=LOVRABET_NPM_PACKAGE_NAME;export const GLOBAL_FLAGS=[{'name':'appcode','meowKey':'appcode','type':a64_0x218306(0x15c),'description':a64_0x218306(0x14b),'hint':a64_0x218306(0x131)},{'name':a64_0x218306(0x146),'meowKey':a64_0x218306(0x146),'type':'string','description':a64_0x218306(0x12e),'hint':'<name>'},{'name':'env','meowKey':a64_0x218306(0x14a),'type':a64_0x218306(0x15c),'description':a64_0x218306(0x158),'hint':a64_0x218306(0x150)},{'name':a64_0x218306(0x14d),'meowKey':a64_0x218306(0x14d),'type':a64_0x218306(0x15c),'description':'Output\x20format','hint':a64_0x218306(0x134)},{'name':'jq','meowKey':'jq','type':a64_0x218306(0x15c),'description':a64_0x218306(0x13a),'hint':a64_0x218306(0x13c)},{'name':a64_0x218306(0x148),'meowKey':a64_0x218306(0x15d),'type':'boolean','description':'Preview\x20operation\x20without\x20executing'},{'name':a64_0x218306(0x154),'meowKey':'yes','type':a64_0x218306(0x12f),'description':a64_0x218306(0x133)},{'name':a64_0x218306(0x149),'meowKey':a64_0x218306(0x137),'type':'boolean','description':a64_0x218306(0x135)},{'name':a64_0x218306(0x13f),'meowKey':'global','type':a64_0x218306(0x12f),'description':a64_0x218306(0x145)},{'name':'ci','meowKey':'ci','type':a64_0x218306(0x12f),'description':a64_0x218306(0x13d),'hidden':!![]},{'name':a64_0x218306(0x143),'meowKey':'help','type':a64_0x218306(0x12f),'description':a64_0x218306(0x13b)},{'name':'id','meowKey':'id','type':a64_0x218306(0x15c),'description':'Record\x20ID','hidden':!![]},{'name':'name','meowKey':a64_0x218306(0x147),'type':a64_0x218306(0x15c),'description':a64_0x218306(0x12b),'hidden':!![]},{'name':a64_0x218306(0x159),'meowKey':a64_0x218306(0x159),'type':'string','description':a64_0x218306(0x136),'hidden':!![]},{'name':a64_0x218306(0x157),'meowKey':a64_0x218306(0x157),'type':a64_0x218306(0x15c),'description':'JSON\x20params\x20for\x20execute\x20commands','hidden':!![]},{'name':a64_0x218306(0x155),'meowKey':a64_0x218306(0x155),'type':a64_0x218306(0x12f),'description':a64_0x218306(0x14c),'hidden':!![]},{'name':a64_0x218306(0x15f),'meowKey':a64_0x218306(0x15f),'type':a64_0x218306(0x12f),'description':a64_0x218306(0x142),'hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a64_0x218306(0x15a),'app',a64_0x218306(0x14a),a64_0x218306(0x14d),'jq',a64_0x218306(0x148),a64_0x218306(0x154),a64_0x218306(0x149),'ci']);function a64_0x38c3(){const _0x105ff2=['params','Environment','sqlcode','appcode','229047nRDNDg','string','dryRun','26072GCaMhz','clear','Name\x20filter','15895uFgaGG','cliDisplayName','Select\x20app\x20profile\x20by\x20name','boolean','1098070qrkVtF','<code>','map','Skip\x20confirmation\x20for\x20high-risk\x20writes','json\x20|\x20pretty\x20|\x20compress','Force\x20non-interactive\x20mode\x20(CI)','SQL\x20query\x20code','nonInteractive','9apQYae','246lrWRDd','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20implies\x20--format\x20json\x20when\x20current\x20format\x20is\x20pretty)','Show\x20help','<expr>','Alias\x20for\x20--non-interactive','cliBinName','global','type','26960tPURuX','Clear\x20output','help','526060hXOOhB','Use\x20global\x20config\x20scope','app','name','dry-run','non-interactive','env','Override\x20appcode','Verbose\x20output','format','6nkSotv','meowKey','production\x20|\x20development\x20|\x20daily','6312czyjMy','fromEntries','4983664Vtflwm','yes','verbose','3mOkhen'];a64_0x38c3=function(){return _0x105ff2;};return a64_0x38c3();}export function buildMeowFlags(){const _0x10a8f5=a64_0x218306;return Object[_0x10a8f5(0x152)](GLOBAL_FLAGS[_0x10a8f5(0x132)](_0x334398=>[_0x334398[_0x10a8f5(0x14f)],{'type':_0x334398[_0x10a8f5(0x140)]}]));}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a65_0x581a4d=a65_0x4050;(function(_0x862dd9,_0x358ea0){const _0x4c5cb8=a65_0x4050,_0x321041=_0x862dd9();while(!![]){try{const _0x3beecd=-parseInt(_0x4c5cb8(0xd4))/0x1*(-parseInt(_0x4c5cb8(0xd8))/0x2)+-parseInt(_0x4c5cb8(0xcb))/0x3*(-parseInt(_0x4c5cb8(0xcc))/0x4)+-parseInt(_0x4c5cb8(0xce))/0x5*(parseInt(_0x4c5cb8(0xcf))/0x6)+-parseInt(_0x4c5cb8(0xd1))/0x7*(-parseInt(_0x4c5cb8(0xc9))/0x8)+parseInt(_0x4c5cb8(0xd2))/0x9*(parseInt(_0x4c5cb8(0xd6))/0xa)+parseInt(_0x4c5cb8(0xd0))/0xb*(-parseInt(_0x4c5cb8(0xc8))/0xc)+-parseInt(_0x4c5cb8(0xcd))/0xd;if(_0x3beecd===_0x358ea0)break;else _0x321041['push'](_0x321041['shift']());}catch(_0x2ea015){_0x321041['push'](_0x321041['shift']());}}}(a65_0x5cd9,0x5628d));function a65_0x4050(_0x4b3fc0,_0x51c7bc){_0x4b3fc0=_0x4b3fc0-0xc7;const _0x5cd929=a65_0x5cd9();let _0x405035=_0x5cd929[_0x4b3fc0];return _0x405035;}export const DEFAULT_APP_PROFILE_NAME=a65_0x581a4d(0xd3);export const DEFAULT_CONFIG_VALUES={'env':a65_0x581a4d(0xd5),'format':'compress','locale':a65_0x581a4d(0xca),'riskLevel':a65_0x581a4d(0xd7)};export const DEFAULT_COMMAND_OUTPUT_FORMAT=a65_0x581a4d(0xc7);function a65_0x5cd9(){const _0x31afd8=['en-US','9TdSnoS','675344FPHJtr','1754740pZZsQJ','5NCaeSE','2778678lqqZPk','2619276BLXIEj','14679JYgpVN','2047779MtBzuL','main','184OJhTUO','production','10boUTHY','write','1140OQWovw','compress','12bczrca','1336eVUICA'];a65_0x5cd9=function(){return _0x31afd8;};return a65_0x5cd9();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a66_0x1fd8a9=a66_0x1438;(function(_0x29b44a,_0x8ace64){const _0x58ddb4=a66_0x1438,_0x2f4b4c=_0x29b44a();while(!![]){try{const _0x14174b=-parseInt(_0x58ddb4(0x1f5))/0x1*(parseInt(_0x58ddb4(0x1ef))/0x2)+-parseInt(_0x58ddb4(0x1f4))/0x3+parseInt(_0x58ddb4(0x1ee))/0x4*(-parseInt(_0x58ddb4(0x1f2))/0x5)+-parseInt(_0x58ddb4(0x1f0))/0x6+-parseInt(_0x58ddb4(0x1eb))/0x7*(-parseInt(_0x58ddb4(0x1f3))/0x8)+parseInt(_0x58ddb4(0x1ec))/0x9+parseInt(_0x58ddb4(0x1ed))/0xa;if(_0x14174b===_0x8ace64)break;else _0x2f4b4c['push'](_0x2f4b4c['shift']());}catch(_0x4bc154){_0x2f4b4c['push'](_0x2f4b4c['shift']());}}}(a66_0x4159,0xb402a));import{PRODUCT_CONFIG}from'../constant/product.js';function a66_0x4159(){const _0x5a27d7=['32gyqusG','1829094UMcsLd','617657XuOYpU','npmPackageName','283157eZseEM','11594286jfwjoq','23099320KFgMdC','300GbRYrs','2tLCPmy','8678478MPvvov','skillSource','23260ZTYLAy'];a66_0x4159=function(){return _0x5a27d7;};return a66_0x4159();}export const LOVRABET_NPM_PACKAGE_NAME=PRODUCT_CONFIG[a66_0x1fd8a9(0x1f6)];export const LOVRABET_SKILL_SOURCE=PRODUCT_CONFIG[a66_0x1fd8a9(0x1f1)];function a66_0x1438(_0x1caff2,_0x18935b){_0x1caff2=_0x1caff2-0x1eb;const _0x415953=a66_0x4159();let _0x1438bc=_0x415953[_0x1caff2];return _0x1438bc;}export const NPM_REGISTRY_BASE_URL=PRODUCT_CONFIG['npmRegistryBaseUrl'];
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a67_0x2f2282=a67_0x221e;(function(_0x3dd752,_0x128d00){const _0x2be4a6=a67_0x221e,_0x2f1da5=_0x3dd752();while(!![]){try{const _0x4d4a55=-parseInt(_0x2be4a6(0x1b4))/0x1*(-parseInt(_0x2be4a6(0x1bf))/0x2)+parseInt(_0x2be4a6(0x1b0))/0x3*(parseInt(_0x2be4a6(0x1ae))/0x4)+parseInt(_0x2be4a6(0x1b3))/0x5*(parseInt(_0x2be4a6(0x1b9))/0x6)+-parseInt(_0x2be4a6(0x1b1))/0x7+parseInt(_0x2be4a6(0x1b5))/0x8*(-parseInt(_0x2be4a6(0x1ac))/0x9)+-parseInt(_0x2be4a6(0x1b6))/0xa*(parseInt(_0x2be4a6(0x1ab))/0xb)+parseInt(_0x2be4a6(0x1bb))/0xc;if(_0x4d4a55===_0x128d00)break;else _0x2f1da5['push'](_0x2f1da5['shift']());}catch(_0x21f0d4){_0x2f1da5['push'](_0x2f1da5['shift']());}}}(a67_0x1597,0x8f5fe));import{getEnv,isProduction}from'../constant/env.js';import{PRODUCT_CONFIG}from'../constant/product.js';let customApiDomain,customUserDomain,customRuntimeDomain,customSkillHubDomain;export function initDomains(_0xa65aa){const _0x3c9ef2=a67_0x221e;customApiDomain=_0xa65aa?.[_0x3c9ef2(0x1b8)],customUserDomain=_0xa65aa?.[_0x3c9ef2(0x1bc)],customRuntimeDomain=_0xa65aa?.[_0x3c9ef2(0x1b2)],customSkillHubDomain=_0xa65aa?.['skillHubDomain'];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a67_0x2f2282(0x1be)][a67_0x2f2282(0x1c0)][a67_0x2f2282(0x1ba)]:PRODUCT_CONFIG['domains']['nonProduction'][a67_0x2f2282(0x1ba)]);export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?PRODUCT_CONFIG['domains'][a67_0x2f2282(0x1c0)][a67_0x2f2282(0x1bd)]:PRODUCT_CONFIG[a67_0x2f2282(0x1be)][a67_0x2f2282(0x1af)][a67_0x2f2282(0x1bd)]);function a67_0x221e(_0x3cabfd,_0x52ffae){_0x3cabfd=_0x3cabfd-0x1ab;const _0x1597c6=a67_0x1597();let _0x221eae=_0x1597c6[_0x3cabfd];return _0x221eae;}function a67_0x1597(){const _0x12c4c7=['48NFFeDc','user','12014232XNUCmF','userDomain','api','domains','8MNoQLQ','production','3067999ZNFkCe','5751VaeXfp','runtime','188pQNHkx','nonProduction','27969yxriMw','6646150eKHrpo','runtimeDomain','632865XxJeCo','58733BOTLNV','7416IQhArM','20KLuVyx','skillhub','apiDomain'];a67_0x1597=function(){return _0x12c4c7;};return a67_0x1597();}export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a67_0x2f2282(0x1be)][a67_0x2f2282(0x1c0)]['runtime']:PRODUCT_CONFIG[a67_0x2f2282(0x1be)][a67_0x2f2282(0x1af)][a67_0x2f2282(0x1ad)]);export const getSkillHubDomain=()=>customSkillHubDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a67_0x2f2282(0x1be)][a67_0x2f2282(0x1c0)][a67_0x2f2282(0x1b7)]:PRODUCT_CONFIG[a67_0x2f2282(0x1be)][a67_0x2f2282(0x1af)][a67_0x2f2282(0x1b7)]);
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a68_0x1ec5(_0x2d8ff6,_0x38e732){_0x2d8ff6=_0x2d8ff6-0x9e;const _0x586f48=a68_0x586f();let _0x1ec5f9=_0x586f48[_0x2d8ff6];return _0x1ec5f9;}const a68_0x6d73ab=a68_0x1ec5;(function(_0x1a5834,_0x12feda){const _0x5bf9e2=a68_0x1ec5,_0x325b7c=_0x1a5834();while(!![]){try{const _0x25d5ba=-parseInt(_0x5bf9e2(0x9f))/0x1+parseInt(_0x5bf9e2(0xa0))/0x2*(parseInt(_0x5bf9e2(0xa8))/0x3)+parseInt(_0x5bf9e2(0xa2))/0x4+parseInt(_0x5bf9e2(0xad))/0x5+-parseInt(_0x5bf9e2(0xa1))/0x6*(parseInt(_0x5bf9e2(0x9e))/0x7)+-parseInt(_0x5bf9e2(0xa7))/0x8*(parseInt(_0x5bf9e2(0xac))/0x9)+parseInt(_0x5bf9e2(0xa4))/0xa*(parseInt(_0x5bf9e2(0xa5))/0xb);if(_0x25d5ba===_0x12feda)break;else _0x325b7c['push'](_0x325b7c['shift']());}catch(_0x5b2416){_0x325b7c['push'](_0x325b7c['shift']());}}}(a68_0x586f,0x24884));import{productEnv}from'../constant/product.js';export const RUNTIME_ENV_VALUES=[a68_0x6d73ab(0xa9),a68_0x6d73ab(0xaa),a68_0x6d73ab(0xab)];export function normalizeEnv(_0x5d7abf){const _0x45d6f2=a68_0x6d73ab;return _0x5d7abf===_0x45d6f2(0xa3)?_0x45d6f2(0xa9):_0x5d7abf;}export function isProduction(_0x3608b2){const _0x5a067a=a68_0x6d73ab;return normalizeEnv(_0x3608b2)===_0x5a067a(0xa9);}export function isDaily(_0x481899){const _0x15fa00=a68_0x6d73ab;return normalizeEnv(_0x481899)===_0x15fa00(0xab);}function a68_0x586f(){const _0x2d9552=['1537512QQnCVV','1086uiLSLB','production','development','daily','9HSoTHV','704025NMbABU','25655MWfIPR','210293sAfkpK','1570TQlopi','402pPgnBS','600384bQwrqG','online','10ipFbGl','2448622HlkxwL','dev'];a68_0x586f=function(){return _0x2d9552;};return a68_0x586f();}export function isDev(_0xbd64ec){const _0x25dbaa=a68_0x6d73ab,_0x4907e8=normalizeEnv(_0xbd64ec);return _0x4907e8===_0x25dbaa(0xaa)||_0x4907e8===_0x25dbaa(0xa6);}let env=normalizeEnv(productEnv('ENV')||a68_0x6d73ab(0xa9));export function getEnv(){return env;}export function initEnv(_0x3f5959){env=normalizeEnv(_0x3f5959);}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a69_0x3bbfc0=a69_0x3a69;(function(_0x3388a0,_0x36e520){const _0x5e2ce3=a69_0x3a69,_0x284e1f=_0x3388a0();while(!![]){try{const _0x3bcc2b=-parseInt(_0x5e2ce3(0x198))/0x1*(parseInt(_0x5e2ce3(0x1a2))/0x2)+parseInt(_0x5e2ce3(0x19d))/0x3+parseInt(_0x5e2ce3(0x19b))/0x4+-parseInt(_0x5e2ce3(0x197))/0x5*(-parseInt(_0x5e2ce3(0x19f))/0x6)+-parseInt(_0x5e2ce3(0x19e))/0x7+parseInt(_0x5e2ce3(0x1a1))/0x8*(parseInt(_0x5e2ce3(0x19a))/0x9)+parseInt(_0x5e2ce3(0x196))/0xa*(-parseInt(_0x5e2ce3(0x199))/0xb);if(_0x3bcc2b===_0x36e520)break;else _0x284e1f['push'](_0x284e1f['shift']());}catch(_0x1b389b){_0x284e1f['push'](_0x284e1f['shift']());}}}(a69_0x5b89,0x1fa5c));export const OUTPUT_FORMAT_VALUES=[a69_0x3bbfc0(0x1a0),a69_0x3bbfc0(0x19c),'compress'];function a69_0x3a69(_0x4f7bf1,_0x3f8c4b){_0x4f7bf1=_0x4f7bf1-0x196;const _0x5b898f=a69_0x5b89();let _0x3a690b=_0x5b898f[_0x4f7bf1];return _0x3a690b;}function a69_0x5b89(){const _0x4918b7=['26344lufoAc','178064Qrwtsa','10uqYMQx','55rbqovh','2jXHKDk','3143932sstvua','513cZcMlL','1032232CJeQWa','pretty','206607yiIcPM','1145795fYeEwC','132306TYYyEn','json'];a69_0x5b89=function(){return _0x4918b7;};return a69_0x5b89();}
|
package/lib/constant/product.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a70_0x3e6a09=a70_0x5a23;(function(_0x2d9fdf,_0x18a866){const _0x348685=a70_0x5a23,_0x329d8c=_0x2d9fdf();while(!![]){try{const _0x8c9d8a=-parseInt(_0x348685(0xfa))/0x1+-parseInt(_0x348685(0x10e))/0x2+-parseInt(_0x348685(0x10f))/0x3+parseInt(_0x348685(0x114))/0x4+-parseInt(_0x348685(0x105))/0x5*(parseInt(_0x348685(0x110))/0x6)+-parseInt(_0x348685(0xff))/0x7*(parseInt(_0x348685(0x112))/0x8)+parseInt(_0x348685(0x10a))/0x9;if(_0x8c9d8a===_0x18a866)break;else _0x329d8c['push'](_0x329d8c['shift']());}catch(_0x25806b){_0x329d8c['push'](_0x329d8c['shift']());}}}(a70_0x50f5,0xd0f76));function a70_0x50f5(){const _0xbed5e5=['https://daily-runtime.lovrabet.com','lovrabet/lovrabet-cli','Lovrabet\x20Runtime\x20CLI','687078NTJhrU','legacyEnvPrefixes','https://runtime.lovrabet.com','https://user-daily.lovrabet.com','https://user.lovrabet.com','1475523ugqReB','map','SKIP_NPX_SKILLS','RABETBASE','Lovrabet\x20User\x20Center','@lovrabet/lovrabet-cli','7205IoHnaN','.lovrabet.json','https://skills.lovrabet.com','envPrefix','https://registry.npmjs.org','50921190MEwXIo','.lovrabet','.lovrabetrc','https://api.lovrabet.com','1760860TynPwg','4672104PtRAdM','372YtbDZZ','https://skills-daily.lovrabet.com','64AxCQsT','https://daily-api.lovrabet.com','394184Pfuifp','.lovrabet-runtime.log'];a70_0x50f5=function(){return _0xbed5e5;};return a70_0x50f5();}export const PRODUCT_CONFIG={'cliBinName':'lovrabet','cliDisplayName':a70_0x3e6a09(0xf9),'npmPackageName':a70_0x3e6a09(0x104),'skillSource':a70_0x3e6a09(0x117),'npmRegistryBaseUrl':a70_0x3e6a09(0x109),'envPrefix':'LOVRABET','legacyEnvPrefixes':[a70_0x3e6a09(0x102)],'configFileNames':[a70_0x3e6a09(0x106),a70_0x3e6a09(0x10c)],'newConfigFileName':a70_0x3e6a09(0x106),'homeDirName':a70_0x3e6a09(0x10b),'logFileName':a70_0x3e6a09(0x115),'invokeSource':'cli:lovrabet-runtime','userCenterDisplayName':a70_0x3e6a09(0x103),'skipNpxSkillsEnvSuffix':a70_0x3e6a09(0x101),'domains':{'production':{'user':a70_0x3e6a09(0xfe),'api':a70_0x3e6a09(0x10d),'runtime':a70_0x3e6a09(0xfc),'skillhub':a70_0x3e6a09(0x107)},'nonProduction':{'user':a70_0x3e6a09(0xfd),'api':a70_0x3e6a09(0x113),'runtime':a70_0x3e6a09(0x116),'skillhub':a70_0x3e6a09(0x111)}},'accessKeyCreatePath':'/user/ak'};export function productEnvName(_0x56d428){const _0x5c2c84=a70_0x3e6a09;return PRODUCT_CONFIG[_0x5c2c84(0x108)]+'_'+_0x56d428;}function a70_0x5a23(_0x41d2a6,_0x4adc60){_0x41d2a6=_0x41d2a6-0xf9;const _0x50f5a6=a70_0x50f5();let _0x5a23a2=_0x50f5a6[_0x41d2a6];return _0x5a23a2;}export function productEnvNames(_0x36ecb1){const _0x5a24b6=a70_0x3e6a09;return[productEnvName(_0x36ecb1),...PRODUCT_CONFIG[_0x5a24b6(0xfb)][_0x5a24b6(0x100)](_0x5229ac=>_0x5229ac+'_'+_0x36ecb1)];}export function productEnv(_0x5f1f2a){for(const _0x2ea6ad of productEnvNames(_0x5f1f2a)){const _0x1942f6=process.env[_0x2ea6ad];if(_0x1942f6!==undefined)return _0x1942f6;}return undefined;}
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a71_0x4ffd(){const _0x134c25=['4JpejRV','738534WiVSpz','162204kivMOY','3652112CawnVV','567kZQNzl','2717721IBWiBd','high-risk-write','read','62466lcBWOi','70vNOFsx','285134aoShaG','3221530BcIhrF'];a71_0x4ffd=function(){return _0x134c25;};return a71_0x4ffd();}const a71_0x35df16=a71_0x2eb6;(function(_0x2ef802,_0xc8afaf){const _0x115e97=a71_0x2eb6,_0x2aad6f=_0x2ef802();while(!![]){try{const _0x1d9d27=-parseInt(_0x115e97(0x1c9))/0x1*(parseInt(_0x115e97(0x1c7))/0x2)+-parseInt(_0x115e97(0x1ca))/0x3+-parseInt(_0x115e97(0x1cb))/0x4*(-parseInt(_0x115e97(0x1c6))/0x5)+-parseInt(_0x115e97(0x1c5))/0x6*(-parseInt(_0x115e97(0x1cd))/0x7)+parseInt(_0x115e97(0x1cc))/0x8+-parseInt(_0x115e97(0x1ce))/0x9+-parseInt(_0x115e97(0x1c8))/0xa;if(_0x1d9d27===_0xc8afaf)break;else _0x2aad6f['push'](_0x2aad6f['shift']());}catch(_0xdb034){_0x2aad6f['push'](_0x2aad6f['shift']());}}}(a71_0x4ffd,0x683c7));function a71_0x2eb6(_0x1162db,_0x2f8eeb){_0x1162db=_0x1162db-0x1c5;const _0x4ffd27=a71_0x4ffd();let _0x2eb6a1=_0x4ffd27[_0x1162db];return _0x2eb6a1;}export const RISK_LEVEL_VALUES=[a71_0x35df16(0x1d0),'write',a71_0x35df16(0x1cf)];
|
package/lib/constant/url.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a72_0x4e76(_0x214a20,_0x3c7a21){_0x214a20=_0x214a20-0xee;const _0x37717a=a72_0x3771();let _0x4e76fa=_0x37717a[_0x214a20];return _0x4e76fa;}const a72_0x3e3e66=a72_0x4e76;(function(_0x17080b,_0x59295f){const _0x59a355=a72_0x4e76,_0x1f7bcc=_0x17080b();while(!![]){try{const _0x3839be=parseInt(_0x59a355(0xef))/0x1+-parseInt(_0x59a355(0xee))/0x2+parseInt(_0x59a355(0xf1))/0x3*(parseInt(_0x59a355(0xf5))/0x4)+-parseInt(_0x59a355(0xf9))/0x5+parseInt(_0x59a355(0xf3))/0x6+-parseInt(_0x59a355(0xf0))/0x7*(parseInt(_0x59a355(0xf7))/0x8)+-parseInt(_0x59a355(0xf6))/0x9;if(_0x3839be===_0x59295f)break;else _0x1f7bcc['push'](_0x1f7bcc['shift']());}catch(_0x1f6e25){_0x1f7bcc['push'](_0x1f7bcc['shift']());}}}(a72_0x3771,0xd1d8b));function a72_0x3771(){const _0x5185d5=['production','4lkXKwP','971568xKkVGX','2862056lFNdqB','accessKeyCreatePath','4654235pWkNNu','950000qkNzxx','850727hxFtUY','7dWLWih','699717NnFNPg','domains','9882726EdXjIi'];a72_0x3771=function(){return _0x5185d5;};return a72_0x3771();}import{PRODUCT_CONFIG}from'../constant/product.js';export const USER_ACCESS_KEY_CREATE_URL=''+PRODUCT_CONFIG[a72_0x3e3e66(0xf2)][a72_0x3e3e66(0xf4)]['user']+PRODUCT_CONFIG[a72_0x3e3e66(0xf8)];
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a73_0x3f2610=a73_0x32b6;(function(_0x7da876,_0x20d206){const _0x2b4c8b=a73_0x32b6,_0x1f4a0d=_0x7da876();while(!![]){try{const _0x25acdb=parseInt(_0x2b4c8b(0xee))/0x1+parseInt(_0x2b4c8b(0xf8))/0x2*(-parseInt(_0x2b4c8b(0xe1))/0x3)+-parseInt(_0x2b4c8b(0x11d))/0x4*(parseInt(_0x2b4c8b(0xd2))/0x5)+-parseInt(_0x2b4c8b(0xf2))/0x6+parseInt(_0x2b4c8b(0x11a))/0x7*(-parseInt(_0x2b4c8b(0xdd))/0x8)+-parseInt(_0x2b4c8b(0x108))/0x9*(-parseInt(_0x2b4c8b(0x101))/0xa)+parseInt(_0x2b4c8b(0xd3))/0xb*(parseInt(_0x2b4c8b(0x105))/0xc);if(_0x25acdb===_0x20d206)break;else _0x1f4a0d['push'](_0x1f4a0d['shift']());}catch(_0x439a2b){_0x1f4a0d['push'](_0x1f4a0d['shift']());}}}(a73_0x16ef,0xc0e4a));function a73_0x16ef(){const _0x2e4926=['inherit','EACCES','read','development','riskLevel','some','join','app','skillHubDomain','true','online','accessKey','missing','daily','setRawCommand','stdin','7WDLABw','EXDEV','nonInteractive','47636AxxjfH','globalConfig','high-risk-write','APP','write','515vEoeHX','3711917RGbEvh','production','find','defaultApp','userDomain','projectConfig','values','runtimeDomain','pageSize','slice','5318792xeKULu','format','utf8','apiDomain','255AWafZf','configFileNames','apps','./constant/domain.js','error','appcode','setRawMode','stringify','newConfigFileName','code','argv','maxRisk','local-alias','1359390RiEdSL','stdout','message','isTTY','1519050ztquJf','FORMAT','trim','EPERM','cwd','locale','4674BXIiPk','raw','top-level','project','parse','PAGE_SIZE','env','global','authRequired','10991020oFNaLq','setLogPath','explicit','./constant/env.js','24FCKvbE','object','string','9qvzpvu','ACCESS_KEY'];a73_0x16ef=function(){return _0x2e4926;};return a73_0x16ef();}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_0x3f2610(0xe2)];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a73_0x3f2610(0xe9)];function resolveConfigPath(_0x3756dd){for(const _0x5b5475 of CONFIG_NAMES){const _0x39c7a7=resolve(_0x3756dd,_0x5b5475);if(existsSync(_0x39c7a7))return _0x39c7a7;}return undefined;}export function resolveWriteConfigPath(_0x3d14ef){const _0x321021=a73_0x3f2610,_0x1858c5=_0x3d14ef===_0x321021(0xfb)?process[_0x321021(0xf6)]():homedir(),_0x5e993d=resolveConfigPath(_0x1858c5);return _0x5e993d??resolve(_0x1858c5,NEW_CONFIG_NAME);}export function readConfigFile(_0x1dfdae){try{if(existsSync(_0x1dfdae)){const _0xcff6c5=readFileSync(_0x1dfdae,{'encoding':'utf8'});if(_0xcff6c5){const _0x11c9ca=JSON['parse'](_0xcff6c5);return migrateOnlineEnv(_0x1dfdae,_0x11c9ca),_0x11c9ca;}}}catch{}return{};}function migrateOnlineEnv(_0x5963f7,_0x3325c7){const _0x5d5506=a73_0x3f2610;let _0x7df73b=![];_0x3325c7[_0x5d5506(0xfe)]==='online'&&(_0x3325c7[_0x5d5506(0xfe)]=_0x5d5506(0xd4),_0x7df73b=!![]);if(_0x3325c7['apps']&&typeof _0x3325c7[_0x5d5506(0xe3)]===_0x5d5506(0x106))for(const _0x40175f of Object['values'](_0x3325c7[_0x5d5506(0xe3)])){_0x40175f&&_0x40175f[_0x5d5506(0xfe)]===_0x5d5506(0x114)&&(_0x40175f[_0x5d5506(0xfe)]=_0x5d5506(0xd4),_0x7df73b=!![]);}if(_0x7df73b)try{writeConfigFile(_0x5963f7,_0x3325c7);}catch{}}function a73_0x32b6(_0x510f45,_0xf1568c){_0x510f45=_0x510f45-0xd2;const _0x16ef7e=a73_0x16ef();let _0x32b624=_0x16ef7e[_0x510f45];return _0x32b624;}export function writeConfigFile(_0x1373e2,_0x485324){const _0x4caee1=a73_0x3f2610,_0x4962e0=dirname(_0x1373e2);!existsSync(_0x4962e0)&&mkdirSync(_0x4962e0,{'recursive':!![]});const _0x1b4a15=_0x1373e2+'.tmp';try{writeFileSync(_0x1b4a15,JSON['stringify'](_0x485324,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180});try{renameSync(_0x1b4a15,_0x1373e2);}catch(_0x4382fa){if(_0x4382fa[_0x4caee1(0xea)]===_0x4caee1(0xf5)||_0x4382fa['code']===_0x4caee1(0x11b)||_0x4382fa['code']===_0x4caee1(0x10b)){writeFileSync(_0x1373e2,JSON[_0x4caee1(0xe8)](_0x485324,null,0x2)+'\x0a',{'encoding':_0x4caee1(0xdf)});try{unlinkSync(_0x1b4a15);}catch{}}else throw _0x4382fa;}}catch(_0x2f04f0){try{unlinkSync(_0x1b4a15);}catch{}throw _0x2f04f0;}}export function isNonInteractiveMode(_0x288cbf){const _0x4f6c9b=a73_0x3f2610;return!!(_0x288cbf[_0x4f6c9b(0x11c)]||_0x288cbf['ci']||productEnvNames('CI')[_0x4f6c9b(0x10f)](_0x3fe9b1=>process.env[_0x3fe9b1]===_0x4f6c9b(0x113))||process.env.CI===_0x4f6c9b(0x113)||!process[_0x4f6c9b(0xef)][_0x4f6c9b(0xf1)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x29d26d=a73_0x3f2610;if(!process[_0x29d26d(0x119)][_0x29d26d(0xf1)])return![];try{const _0xfeb874=process[_0x29d26d(0x119)]['isRaw'];return process[_0x29d26d(0x119)][_0x29d26d(0xe7)](!![]),process[_0x29d26d(0x119)]['setRawMode'](_0xfeb874??![]),!![];}catch{return![];}}export async function createContext(_0x4a42aa){const _0x2a948a=a73_0x3f2610,_0x11d76a=readRawConfig(),_0x59abe2=buildConfig(_0x11d76a,_0x4a42aa);await initGlobalEnvironment(_0x59abe2);const {getUserDomain:_0x53477d,getApiDomain:_0x4f68e7}=await import('./constant/domain.js'),_0x2a604b={'apiDomain':_0x4f68e7(),'userDomain':_0x53477d()},_0x51bebe=await buildAuth(_0x59abe2);logger[_0x2a948a(0x102)](process[_0x2a948a(0xf6)]());const _0x4f9b35=(CLI_BIN_NAME+'\x20'+process[_0x2a948a(0xeb)][_0x2a948a(0xdc)](0x2)[_0x2a948a(0x110)]('\x20'))['trim']();logger[_0x2a948a(0x118)](_0x4f9b35);const _0x531e44=isNonInteractiveMode(_0x4a42aa);return{'config':_0x59abe2,'auth':_0x51bebe,'logger':logger,'env':_0x2a604b,'nonInteractive':_0x531e44};}export function buildConfigFromFlags(_0x49f352){return buildConfig(readRawConfig(),_0x49f352);}export function getLocalAppAliases(_0x14e93f){const _0x16db1c=a73_0x3f2610;return _0x14e93f['apps']&&typeof _0x14e93f[_0x16db1c(0xe3)]===_0x16db1c(0x106)?_0x14e93f[_0x16db1c(0xe3)]:{};}export function resolveLocalAppAliasCode(_0x3478e5,_0x2f7e05){const _0x2408e3=a73_0x3f2610;if(!_0x2f7e05)return undefined;const _0x585c53=getLocalAppAliases(_0x3478e5)[_0x2f7e05],_0xcedf7f=_0x585c53?.[_0x2408e3(0xe6)];return typeof _0xcedf7f===_0x2408e3(0x107)&&_0xcedf7f[_0x2408e3(0xf4)]()?_0xcedf7f[_0x2408e3(0xf4)]():undefined;}export function readAppCodeFromConfig(){const _0x1c89ec=a73_0x3f2610,_0x135e48=readRawConfig(),_0xa83a5a=_0x135e48[_0x1c89ec(0xe6)]??_0x135e48['app'];if(typeof _0xa83a5a===_0x1c89ec(0x107)&&_0xa83a5a[_0x1c89ec(0xf4)]())return _0xa83a5a[_0x1c89ec(0xf4)]();const _0x3574cd=resolveLocalAppAliasCode(_0x135e48,typeof _0x135e48['defaultApp']==='string'?_0x135e48[_0x1c89ec(0xd6)]:undefined);if(_0x3574cd)return _0x3574cd;const _0x262ad7=normalizeEnv(String(_0x135e48['env']||_0x1c89ec(0xd4))),_0x25e081=isDaily(_0x262ad7)?_0x1c89ec(0x117):isDev(_0x262ad7)?_0x1c89ec(0x10d):_0x1c89ec(0xd4),_0x56111a=resolveCachedAppCode(typeof _0x135e48[_0x1c89ec(0xd6)]===_0x1c89ec(0x107)?_0x135e48[_0x1c89ec(0xd6)]:undefined,_0x25e081,typeof _0x135e48['accessKey']===_0x1c89ec(0x107)?_0x135e48[_0x1c89ec(0x115)]:undefined);if(_0x56111a)return _0x56111a;const _0x406262=Object[_0x1c89ec(0xd9)](getLocalAppAliases(_0x135e48))[_0x1c89ec(0xd5)](_0x2700e9=>_0x2700e9?.[_0x1c89ec(0xe6)]);return typeof _0x406262?.[_0x1c89ec(0xe6)]===_0x1c89ec(0x107)&&_0x406262['appcode'][_0x1c89ec(0xf4)]()?_0x406262['appcode'][_0x1c89ec(0xf4)]():undefined;}export function readScopedConfig(_0x29ada1){const _0x2eda75=a73_0x3f2610,_0x9ea278=_0x29ada1[_0x2eda75(0xff)]?_0x2eda75(0xff):_0x2eda75(0xfb);return readConfigFile(resolveWriteConfigPath(_0x9ea278));}export function writeScopedConfig(_0x33be24,_0x18c8d2){const _0x480341=a73_0x3f2610,_0x30f034=_0x18c8d2[_0x480341(0xff)]?'global':_0x480341(0xfb);writeConfigFile(resolveWriteConfigPath(_0x30f034),_0x33be24);}export async function initGlobalEnvironment(_0x1fd049){const _0x5eccb2=a73_0x3f2610,{initEnv:_0x144872}=await import(_0x5eccb2(0x104));_0x144872(_0x1fd049['env']);const {initDomains:_0xb66a32}=await import(_0x5eccb2(0xe4));_0xb66a32({'apiDomain':_0x1fd049[_0x5eccb2(0xf9)][_0x5eccb2(0xe0)]||_0x1fd049['raw']['host']||undefined,'userDomain':_0x1fd049[_0x5eccb2(0xf9)][_0x5eccb2(0xd7)]||undefined,'runtimeDomain':_0x1fd049['raw'][_0x5eccb2(0xda)]||undefined,'skillHubDomain':_0x1fd049['raw'][_0x5eccb2(0x112)]||undefined});}export function getProjectConfigPath(){const _0x2d0b3e=a73_0x3f2610;return resolveConfigPath(process[_0x2d0b3e(0xf6)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x276c84){const _0x136d1a=a73_0x3f2610;if(!existsSync(_0x276c84))return{'status':_0x136d1a(0x116)};try{const _0x1b5d77=readFileSync(_0x276c84,{'encoding':'utf8'});if(!_0x1b5d77?.[_0x136d1a(0xf4)]())return{'status':'empty'};const _0x623d57=JSON['parse'](_0x1b5d77);return{'status':'ok','data':_0x623d57};}catch(_0x26dcd2){return{'status':_0x136d1a(0xe5),'message':_0x26dcd2 instanceof Error?_0x26dcd2[_0x136d1a(0xf0)]:String(_0x26dcd2)};}}export function loadRawConfigLayers(_0x4a71d0){const _0x4d927c=a73_0x3f2610;let _0x5bf2ff={},_0x6f764e={},_0xb24dd9,_0x5d4226;try{_0xb24dd9=resolveConfigPath(homedir());if(_0xb24dd9){const _0xb5ba66=readFileSync(_0xb24dd9,{'encoding':'utf8'});if(_0xb5ba66)_0x5bf2ff=JSON[_0x4d927c(0xfc)](_0xb5ba66);}}catch{}try{const _0x8b4828=_0x4a71d0||process[_0x4d927c(0xf6)]();_0x5d4226=resolveConfigPath(_0x8b4828);if(_0x5d4226){const _0x330fd9=readFileSync(_0x5d4226,{'encoding':_0x4d927c(0xdf)});if(_0x330fd9)_0x6f764e=JSON['parse'](_0x330fd9);}}catch{}return{'globalPath':_0xb24dd9,'projectPath':_0x5d4226,'globalConfig':_0x5bf2ff,'projectConfig':_0x6f764e};}function mergeRawConfigLayers(_0x485e62){const _0x4bb548=a73_0x3f2610,{globalConfig:_0x1756c4,projectConfig:_0x365047}=_0x485e62;if(_0x365047[_0x4bb548(0x10a)]===![]){const _0x1f9511={..._0x365047};return delete _0x1f9511[_0x4bb548(0x10a)],_0x1f9511;}const _0x1410dd={..._0x1756c4,..._0x365047};if('defaultApp'in _0x365047)_0x1410dd[_0x4bb548(0xd6)]=_0x365047[_0x4bb548(0xd6)];else _0x1756c4[_0x4bb548(0xd6)]&&(_0x1410dd[_0x4bb548(0xd6)]=_0x1756c4[_0x4bb548(0xd6)]);return _0x1410dd;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x112294){return mergeRawConfigLayers(loadRawConfigLayers(_0x112294));}export function readRawConfigWithLayers(_0x44fd21){const _0xd4093b=loadRawConfigLayers(_0x44fd21);return{'config':mergeRawConfigLayers(_0xd4093b),'layers':_0xd4093b};}export function resolveDefaultAppSource(_0x348fad){const _0x52e33e=a73_0x3f2610;if('defaultApp'in _0x348fad[_0x52e33e(0xd8)])return _0x52e33e(0xfb);if(_0x348fad[_0x52e33e(0xd8)][_0x52e33e(0x10a)]===![])return null;if(_0x348fad[_0x52e33e(0x11e)][_0x52e33e(0xd6)])return _0x52e33e(0xff);return null;}function buildConfig(_0x5a0bfd,_0xd1ccd6){const _0x4906d5=a73_0x3f2610,_0x5685d1=_0x5a0bfd['defaultApp']||undefined,_0x3d6ff5=_0xd1ccd6[_0x4906d5(0x111)]||env(_0x4906d5(0x120))||undefined,_0x451d7e=_0x3d6ff5||_0x5685d1||undefined,_0x33f3b4=env(_0x4906d5(0x109))||_0x5a0bfd[_0x4906d5(0x115)]||undefined,_0x17dbd9=_0xd1ccd6[_0x4906d5(0xfe)]||env('ENV')||_0x5a0bfd[_0x4906d5(0xfe)]||DEFAULT_CONFIG_VALUES['env'],_0x247151=normalizeEnv(String(_0x17dbd9)),_0x4ba12b=isDaily(_0x247151)?'daily':isDev(_0x247151)?_0x4906d5(0x10d):_0x4906d5(0xd4),_0x176861=typeof _0xd1ccd6[_0x4906d5(0xe6)]==='string'?_0xd1ccd6[_0x4906d5(0xe6)]:undefined,_0x19672d=env('APPCODE'),_0x530f6c=_0x3d6ff5?undefined:_0x5a0bfd[_0x4906d5(0xe6)]||_0x5a0bfd[_0x4906d5(0x111)]||undefined,_0x2265fe=_0x3d6ff5||(_0x530f6c?undefined:_0x5685d1),_0x59e2e8=resolveLocalAppAliasCode(_0x5a0bfd,_0x2265fe),_0x26e230=resolveCachedAppCode(_0x2265fe,_0x4ba12b,_0x33f3b4),_0x3aa450=_0x176861||_0x19672d||_0x530f6c||_0x59e2e8||_0x26e230||undefined,_0x6b1886=_0x176861?_0x4906d5(0x103):_0x19672d?'env':_0x530f6c?_0x4906d5(0xfa):_0x59e2e8?_0x4906d5(0xed):_0x26e230?'cache':undefined,_0x375b21=_0x5a0bfd[_0x4906d5(0xf7)]||DEFAULT_CONFIG_VALUES[_0x4906d5(0xf7)],_0x22e905=undefined,_0x36304c=_0xd1ccd6[_0x4906d5(0xde)]||env(_0x4906d5(0xf3))||_0x5a0bfd[_0x4906d5(0xde)],_0x607fba=normalizeLegacyOutputFormat(_0x36304c),_0x4c85fa=env(_0x4906d5(0xfd))||_0x5a0bfd[_0x4906d5(0xdb)],_0xd77ccf=_0x4c85fa?Number(_0x4c85fa)||undefined:undefined,_0x41c99e=_0x5a0bfd[_0x4906d5(0x10e)]||_0x5a0bfd[_0x4906d5(0xec)],_0x5b61d8=_0x41c99e===_0x4906d5(0x10c)||_0x41c99e===_0x4906d5(0x121)||_0x41c99e===_0x4906d5(0x11f)?_0x41c99e:DEFAULT_CONFIG_VALUES[_0x4906d5(0x10e)],_0x3b7809=env('VERBOSE'),_0x4d0b3f=_0x3b7809==='1'||_0x3b7809===_0x4906d5(0x113);return{'appCode':typeof _0x3aa450==='string'&&_0x3aa450['trim']()?_0x3aa450[_0x4906d5(0xf4)]():undefined,'appCodeSource':_0x6b1886,'env':_0x4ba12b,'locale':_0x375b21,'cookie':_0x22e905,'accessKey':_0x33f3b4,'format':_0x607fba,'pageSize':_0xd77ccf,'riskLevel':_0x5b61d8,'verbose':_0x4d0b3f,'defaultApp':_0x5685d1,'currentApp':typeof _0x451d7e===_0x4906d5(0x107)?_0x451d7e:undefined,'raw':_0x5a0bfd};}function env(_0x1a4fe8){return productEnv(_0x1a4fe8);}async function buildAuth(_0x3cb514){const _0x583e83=a73_0x3f2610,_0x13bd0b='',_0x20334a=!!_0x3cb514[_0x583e83(0x115)];return{'cookie':_0x13bd0b,'isLoggedIn':_0x20334a,async 'getOrLogin'(){const _0x289857=_0x583e83;if(_0x20334a)return _0x13bd0b;throw CliErrors[_0x289857(0x100)]();}};}
|
|
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)]();}};}
|