@lovrabet/lovrabet-cli 2.1.12 → 2.1.13
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/function-name-adapter.js +1 -0
- 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/rate-limit.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/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const a55_0x14be65=a55_0x47c6;(function(_0x425949,_0x3e974f){const _0x395829=a55_0x47c6,_0x4b32bf=_0x425949();while(!![]){try{const _0x59380d=-parseInt(_0x395829(0x1af))/0x1+-parseInt(_0x395829(0x1da))/0x2+parseInt(_0x395829(0x1e0))/0x3+parseInt(_0x395829(0x19c))/0x4+-parseInt(_0x395829(0x1ae))/0x5+-parseInt(_0x395829(0x1ac))/0x6+parseInt(_0x395829(0x1f2))/0x7;if(_0x59380d===_0x3e974f)break;else _0x4b32bf['push'](_0x4b32bf['shift']());}catch(_0x77e1dd){_0x4b32bf['push'](_0x4b32bf['shift']());}}}(a55_0x2bb3,0x3b0ec));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';function a55_0x2bb3(){const _0x45fef7=['object','dataset','filter','push','search','string','split','false','SKILL.md\x20must\x20start\x20with\x20frontmatter.','Add\x20frontmatter\x20with\x20name\x20and\x20description.','743332TzEgJr','name','isFile','frontmatter-required','map','display-name-recommended','380226hwTfvj','isSymbolicLink','hasFrontmatter','schema','warning','type','boolean','\x20Fix:\x20','Set\x20example\x20to\x20one\x20short\x20user\x20message\x20that\x20can\x20directly\x20trigger\x20this\x20Skill.','errors','config','If\x20this\x20is\x20a\x20runtime\x20step,\x20replace\x20it\x20with\x20the\x20equivalent\x20lovrabet\x20command.\x20Dev-time\x20discovery\x20or\x20handoff\x20notes\x20can\x20stay.','ruleId','true','example','toUpperCase','internal','read','8996330DFspcO','validation','Add\x20SKILL.md\x20as\x20a\x20regular\x20file\x20at\x20the\x20Skill\x20directory\x20root.','metadata.internal=true\x20Skills\x20cannot\x20be\x20uploaded.','1413908HzXMil','level','data','填写模型触发语义:用户在什么场景应使用本\x20Skill、不要使用的边界和关键词。','error','path','Set\x20name\x20to\x20the\x20Skill\x20directory\x20code.','test','slice','flatMap','Frontmatter\x20description\x20is\x20empty.','number','displayName','page','registry','isArray','1820604ELHOBc','description','2098400AcRcjB','428729uQpjWy','isDirectory','content','Frontmatter\x20name\x20is\x20missing.','file','metadata.type\x20must\x20be\x20one\x20of\x20write,\x20read,\x20or\x20trainer.','section','suggestion','Fix\x20the\x20Skill\x20metadata\x20before\x20running\x20skill\x20push.','Add\x20SKILL.md\x20at\x20the\x20Skill\x20directory\x20root.','Skill\x20directory\x20not\x20found:\x20','project','toLowerCase','Set\x20displayName\x20to\x20the\x20human-readable\x20Skill\x20name\x20shown\x20in\x20SkillHub.','SKILL.md\x20is\x20not\x20a\x20file.','app','Replace\x20the\x20symlink\x20with\x20a\x20regular\x20SKILL.md\x20file\x20inside\x20the\x20Skill\x20directory.','trainer','raw','line','structure-complete','example-recommended','rabetbase-cli-reference','description-required','Remove\x20metadata.internal\x20or\x20set\x20it\x20to\x20false\x20before\x20running\x20skill\x20push.','join','utf8','length','match','metadata','trim','auth','sql'];a55_0x2bb3=function(){return _0x45fef7;};return a55_0x2bb3();}import{resolve}from'node:path';import{parse as a55_0x57fb66}from'yaml';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(['write',a55_0x14be65(0x1f1),a55_0x14be65(0x1c0)]),TEXT_SKILL_FILE_PATTERN=/(?:^SKILL\.md$|\.(?:md|mdx|txt|json|ya?ml|js|mjs|cjs|ts|tsx|sh|sql))$/i;function a55_0x47c6(_0x545fe8,_0x126d98){_0x545fe8=_0x545fe8-0x199;const _0x2bb39b=a55_0x2bb3();let _0x47c6aa=_0x2bb39b[_0x545fe8];return _0x47c6aa;}export function validateSkillDirectory(_0x381993,_0xe1986={}){const _0x198a32=a55_0x14be65,_0x352904=resolveSkillDirectoryRoot(_0x381993),_0x2da475=[],_0x13fd72=loadRequiredSkillFile(_0x352904,_0x2da475),_0x5a5ec7=_0x13fd72?parseFrontmatter(_0x13fd72[_0x198a32(0x1b1)]):{'hasFrontmatter':![]};_0x13fd72&&validateFrontmatter(_0x13fd72['path'],_0x5a5ec7,_0x2da475);validateRuntimeCliReferences(_0x352904,_0x2da475);const _0x416e2b=_0x2da475[_0x198a32(0x1d2)](_0x3de408=>_0x3de408[_0x198a32(0x19d)]===_0x198a32(0x1a0)),_0x3ccac6=_0x2da475[_0x198a32(0x1d2)](_0x4cf865=>_0x4cf865['level']===_0x198a32(0x1e4));return{'ok':_0x416e2b[_0x198a32(0x1ca)]===0x0,'dir':_0x352904,'type':_0x5a5ec7[_0x198a32(0x1e5)],'errors':_0x416e2b,'warnings':_0x3ccac6};}function resolveSkillDirectoryRoot(_0x263c6d){const _0x37ba99=a55_0x14be65,_0x715691=resolve(_0x263c6d);if(!existsSync(_0x715691))throw CliErrors['validation'](_0x37ba99(0x1b9)+_0x263c6d);const _0x18be7a=lstatSync(_0x715691);if(_0x18be7a[_0x37ba99(0x1b0)]())return _0x715691;if(_0x18be7a[_0x37ba99(0x1e1)]()){const _0x477b98=realpathSync(_0x715691);if(lstatSync(_0x477b98)[_0x37ba99(0x1b0)]())return _0x477b98;}throw CliErrors[_0x37ba99(0x199)](_0x37ba99(0x1b9)+_0x263c6d);}export function throwIfSkillValidationFailed(_0x403bcf,_0x4c3190=![]){const _0x3d068c=a55_0x14be65;if(_0x403bcf['ok'])return;const _0x14fe98=_0x403bcf[_0x3d068c(0x1e9)]['map'](_0x1b1bc0=>{const _0x1b68d9=_0x3d068c,_0x59e1cb=_0x1b1bc0['section']?'#'+_0x1b1bc0[_0x1b68d9(0x1b5)]:'';return _0x1b1bc0[_0x1b68d9(0x19d)][_0x1b68d9(0x1ef)]()+'\x20'+_0x1b1bc0[_0x1b68d9(0x1ec)]+'\x20'+_0x1b1bc0[_0x1b68d9(0x1b3)]+_0x59e1cb+':\x20'+_0x1b1bc0['message']+_0x1b68d9(0x1e7)+_0x1b1bc0[_0x1b68d9(0x1b6)];});throw CliErrors[_0x3d068c(0x199)]('Skill\x20validation\x20failed:\x0a'+_0x14fe98[_0x3d068c(0x1c8)]('\x0a'),_0x3d068c(0x1b7));}function loadRequiredSkillFile(_0x531622,_0x2a8fdb){const _0x183a41=a55_0x14be65,_0x3920ff=resolve(_0x531622,SKILL_FILE);if(!existsSync(_0x3920ff))return _0x2a8fdb[_0x183a41(0x1d3)](issue(_0x183a41(0x1a0),_0x183a41(0x1c3),SKILL_FILE,'Missing\x20SKILL.md.',_0x183a41(0x1b8))),undefined;const _0xa2dc67=lstatSync(_0x3920ff);if(_0xa2dc67[_0x183a41(0x1e1)]())return _0x2a8fdb['push'](issue(_0x183a41(0x1a0),_0x183a41(0x1c3),SKILL_FILE,'SKILL.md\x20must\x20be\x20a\x20regular\x20file.',_0x183a41(0x1bf))),undefined;if(!_0xa2dc67[_0x183a41(0x1dc)]())return _0x2a8fdb[_0x183a41(0x1d3)](issue(_0x183a41(0x1a0),_0x183a41(0x1c3),SKILL_FILE,_0x183a41(0x1bd),_0x183a41(0x19a))),undefined;return{'path':SKILL_FILE,'content':readFileSync(_0x3920ff,_0x183a41(0x1c9))};}function validateFrontmatter(_0x4c5888,_0x4f7fef,_0x1078cc){const _0x1da5a8=a55_0x14be65;if(!_0x4f7fef[_0x1da5a8(0x1e2)]){_0x1078cc['push'](issue(_0x1da5a8(0x1a0),_0x1da5a8(0x1dd),_0x4c5888,_0x1da5a8(0x1d8),_0x1da5a8(0x1d9)));return;}!_0x4f7fef[_0x1da5a8(0x1db)]?.[_0x1da5a8(0x1cd)]()&&_0x1078cc[_0x1da5a8(0x1d3)](issue(_0x1da5a8(0x1a0),_0x1da5a8(0x1dd),_0x4c5888,_0x1da5a8(0x1b2),_0x1da5a8(0x1a2))),!_0x4f7fef[_0x1da5a8(0x1a8)]?.[_0x1da5a8(0x1cd)]()&&_0x1078cc['push'](issue(_0x1da5a8(0x1e4),_0x1da5a8(0x1df),_0x4c5888,'Frontmatter\x20displayName\x20is\x20missing.',_0x1da5a8(0x1bc))),!_0x4f7fef[_0x1da5a8(0x1ee)]?.[_0x1da5a8(0x1cd)]()&&_0x1078cc[_0x1da5a8(0x1d3)](issue('warning',_0x1da5a8(0x1c4),_0x4c5888,'Frontmatter\x20example\x20is\x20missing.',_0x1da5a8(0x1e8))),!_0x4f7fef[_0x1da5a8(0x1ad)]?.[_0x1da5a8(0x1cd)]()&&_0x1078cc[_0x1da5a8(0x1d3)](issue(_0x1da5a8(0x1a0),_0x1da5a8(0x1c6),_0x4c5888,_0x1da5a8(0x1a6),_0x1da5a8(0x19f))),_0x4f7fef[_0x1da5a8(0x1f0)]===!![]&&_0x1078cc['push'](issue(_0x1da5a8(0x1a0),'internal-skill',_0x4c5888,_0x1da5a8(0x19b),_0x1da5a8(0x1c7))),_0x4f7fef[_0x1da5a8(0x1e5)]?.[_0x1da5a8(0x1cd)]()&&!SUPPORTED_SKILL_TYPES['has'](_0x4f7fef['type'])&&_0x1078cc[_0x1da5a8(0x1d3)](issue(_0x1da5a8(0x1a0),_0x1da5a8(0x1dd),_0x4c5888,_0x1da5a8(0x1b4),'Set\x20metadata.type\x20to\x20write,\x20read,\x20or\x20trainer.'));}function validateRuntimeCliReferences(_0x1564fd,_0x988a90){const _0x16c150=a55_0x14be65;for(const _0x207c32 of findRabetbaseCliInvocations(_0x1564fd)){_0x988a90['push'](issue(_0x16c150(0x1e4),_0x16c150(0x1c5),_0x207c32[_0x16c150(0x1b3)],'This\x20line\x20invokes\x20the\x20rabetbase\x20CLI.\x20rabetbase\x20is\x20a\x20dev-time\x20tool;\x20runtime\x20Skills\x20should\x20drive\x20runtime\x20work\x20through\x20lovrabet\x20commands.',_0x16c150(0x1eb),'L'+_0x207c32[_0x16c150(0x1c2)]));}}function findRabetbaseCliInvocations(_0x597c73){const _0x5e3b07=a55_0x14be65;return scanSkillDirectory(_0x597c73)[_0x5e3b07(0x1d2)](_0x2d3c0a=>TEXT_SKILL_FILE_PATTERN[_0x5e3b07(0x1a3)](_0x2d3c0a['path']))[_0x5e3b07(0x1a5)](_0x316323=>{const _0x4ba252=_0x5e3b07,_0x2c6351=fileText(_0x316323);return _0x2c6351[_0x4ba252(0x1d6)](/\r?\n/)['map']((_0x3573d1,_0x6ce49)=>({'file':_0x316323[_0x4ba252(0x1a1)],'line':_0x6ce49+0x1,'text':_0x3573d1}))[_0x4ba252(0x1d2)](({text:_0x254705})=>isRabetbaseCliInvocation(_0x254705))[_0x4ba252(0x1de)](({file:_0x47091c,line:_0x1c320c})=>({'file':_0x47091c,'line':_0x1c320c}));});}const RABETBASE_SUBCOMMANDS=[a55_0x14be65(0x1d1),a55_0x14be65(0x1cf),'bff',a55_0x14be65(0x1a9),a55_0x14be65(0x1ba),a55_0x14be65(0x1be),a55_0x14be65(0x1e3),'service','artifact','kb',a55_0x14be65(0x1ea),'workspace',a55_0x14be65(0x19e),a55_0x14be65(0x1ce),'logs',a55_0x14be65(0x1aa)],RABETBASE_INVOCATION=new RegExp(String[a55_0x14be65(0x1c1)]`\brabetbase\s+(?:${RABETBASE_SUBCOMMANDS['join']('|')})\b`+String[a55_0x14be65(0x1c1)]`(?:\s+[a-z][\w-]*){0,2}\s+(?:--?[a-z]|[\w.-]+=)`,'i');function isRabetbaseCliInvocation(_0x4cc010){const _0x2dac82=a55_0x14be65,_0x1cb0d8=_0x4cc010[_0x2dac82(0x1d4)](/\brabetbase\b/i);if(_0x1cb0d8<0x0)return![];const _0x1feaf8=_0x4cc010[_0x2dac82(0x1a4)](_0x1cb0d8)[_0x2dac82(0x1d6)](/\blovrabet\b/i)[0x0]??'';return RABETBASE_INVOCATION['test'](_0x1feaf8);}function parseFrontmatter(_0x3e3b6e){const _0xddaf23=a55_0x14be65,_0x18ca73=_0x3e3b6e[_0xddaf23(0x1cb)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x18ca73)return{'hasFrontmatter':![]};const _0x2b3918=_0x18ca73[0x1]??'',_0x3e75af={'hasFrontmatter':!![]};let _0x2f8173;try{_0x2f8173=a55_0x57fb66(_0x2b3918);}catch{return _0x3e75af;}const _0x32bbad=asRecord(_0x2f8173);if(!_0x32bbad)return _0x3e75af;_0x3e75af[_0xddaf23(0x1db)]=scalarToString(_0x32bbad[_0xddaf23(0x1db)]),_0x3e75af[_0xddaf23(0x1a8)]=scalarToString(_0x32bbad[_0xddaf23(0x1a8)]),_0x3e75af[_0xddaf23(0x1ad)]=scalarToString(_0x32bbad[_0xddaf23(0x1ad)]),_0x3e75af[_0xddaf23(0x1ee)]=scalarToString(_0x32bbad[_0xddaf23(0x1ee)]);const _0x58589e=asRecord(_0x32bbad[_0xddaf23(0x1cc)]);return _0x58589e&&(_0x3e75af[_0xddaf23(0x1e5)]=scalarToString(_0x58589e['type']),_0x3e75af[_0xddaf23(0x1f0)]=scalarToBoolean(_0x58589e['internal'])),_0x3e75af;}function asRecord(_0x4c29d0){const _0x58bf92=a55_0x14be65;if(_0x4c29d0&&typeof _0x4c29d0===_0x58bf92(0x1d0)&&!Array[_0x58bf92(0x1ab)](_0x4c29d0))return _0x4c29d0;return undefined;}function scalarToString(_0x17c7fb){const _0x3b6ef9=a55_0x14be65;if(typeof _0x17c7fb===_0x3b6ef9(0x1d5))return _0x17c7fb['trim']();if(typeof _0x17c7fb===_0x3b6ef9(0x1a7)||typeof _0x17c7fb===_0x3b6ef9(0x1e6))return String(_0x17c7fb);return undefined;}function scalarToBoolean(_0x3c043b){const _0xeb1e97=a55_0x14be65;if(typeof _0x3c043b===_0xeb1e97(0x1e6))return _0x3c043b;if(typeof _0x3c043b===_0xeb1e97(0x1d5))return cleanBoolean(_0x3c043b);return undefined;}function cleanBoolean(_0x4597f7){const _0x584366=a55_0x14be65,_0x3a70ff=_0x4597f7[_0x584366(0x1cd)]()[_0x584366(0x1bb)]();if(_0x3a70ff===_0x584366(0x1ed))return!![];if(_0x3a70ff===_0x584366(0x1d7))return![];return undefined;}function issue(_0x57c93f,_0xca1e81,_0x8ec1c0,_0xbb6351,_0x48a27e,_0x205e3e){return{'level':_0x57c93f,'ruleId':_0xca1e81,'file':_0x8ec1c0,'section':_0x205e3e,'message':_0xbb6351,'suggestion':_0x48a27e};}
|
|
1
|
+
function a56_0x19b2(){const _0x543c03=['utf8','false','Skill\x20directory\x20not\x20found:\x20','boolean','Add\x20SKILL.md\x20at\x20the\x20Skill\x20directory\x20root.','line','split','5438JqPcGv','isSymbolicLink','slice','displayName','logs','write','metadata.internal=true\x20Skills\x20cannot\x20be\x20uploaded.','level','join','auth','display-name-recommended','trim','workspace','Frontmatter\x20name\x20is\x20missing.','524193dSsqCi','33gdMvBf','metadata','metadata.type\x20must\x20be\x20one\x20of\x20write,\x20read,\x20or\x20trainer.','\x20Fix:\x20','test','Set\x20name\x20to\x20the\x20Skill\x20directory\x20code.','path','14050pWTQkF','isFile','page','config','632rMtmot','136104hNeQbT','push','23cDeMfZ','filter','file','Add\x20SKILL.md\x20as\x20a\x20regular\x20file\x20at\x20the\x20Skill\x20directory\x20root.','Skill\x20validation\x20failed:\x0a','Frontmatter\x20description\x20is\x20empty.','Set\x20displayName\x20to\x20the\x20human-readable\x20Skill\x20name\x20shown\x20in\x20SkillHub.','2198130HsrfVg','SKILL.md\x20must\x20be\x20a\x20regular\x20file.','internal','填写模型触发语义:用户在什么场景应使用本\x20Skill、不要使用的边界和关键词。','raw','If\x20this\x20is\x20a\x20runtime\x20step,\x20replace\x20it\x20with\x20the\x20equivalent\x20lovrabet\x20command.\x20Dev-time\x20discovery\x20or\x20handoff\x20notes\x20can\x20stay.','736908dOYChf','error','description','section','3795120UldWXY','frontmatter-required','warning','21WPlUTa','length','app','number','SKILL.md\x20is\x20not\x20a\x20file.','trainer','project','suggestion','bff','Frontmatter\x20example\x20is\x20missing.','internal-skill','Fix\x20the\x20Skill\x20metadata\x20before\x20running\x20skill\x20push.','Missing\x20SKILL.md.','service','artifact','errors','9KkJPDq','search','description-required','content','Remove\x20metadata.internal\x20or\x20set\x20it\x20to\x20false\x20before\x20running\x20skill\x20push.','structure-complete','string','SKILL.md\x20must\x20start\x20with\x20frontmatter.','isDirectory','map','true','Add\x20frontmatter\x20with\x20name\x20and\x20description.','object','isArray','toLowerCase','name','flatMap','example','dataset','Frontmatter\x20displayName\x20is\x20missing.','registry','type','read'];a56_0x19b2=function(){return _0x543c03;};return a56_0x19b2();}const a56_0x57a198=a56_0x4b2b;(function(_0x168588,_0x6ae14f){const _0x3a6ead=a56_0x4b2b,_0x1e997c=_0x168588();while(!![]){try{const _0x2b917b=-parseInt(_0x3a6ead(0x146))/0x1*(parseInt(_0x3a6ead(0x188))/0x2)+parseInt(_0x3a6ead(0x196))/0x3+-parseInt(_0x3a6ead(0x143))/0x4*(parseInt(_0x3a6ead(0x13f))/0x5)+-parseInt(_0x3a6ead(0x144))/0x6*(-parseInt(_0x3a6ead(0x15a))/0x7)+-parseInt(_0x3a6ead(0x157))/0x8*(-parseInt(_0x3a6ead(0x16a))/0x9)+parseInt(_0x3a6ead(0x14d))/0xa+-parseInt(_0x3a6ead(0x138))/0xb*(parseInt(_0x3a6ead(0x153))/0xc);if(_0x2b917b===_0x6ae14f)break;else _0x1e997c['push'](_0x1e997c['shift']());}catch(_0x3e0396){_0x1e997c['push'](_0x1e997c['shift']());}}}(a56_0x19b2,0x3c1e2));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{resolve}from'node:path';import{parse as a56_0x2f143b}from'yaml';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([a56_0x57a198(0x18d),a56_0x57a198(0x180),a56_0x57a198(0x15f)]),TEXT_SKILL_FILE_PATTERN=/(?:^SKILL\.md$|\.(?:md|mdx|txt|json|ya?ml|js|mjs|cjs|ts|tsx|sh|sql))$/i;export function validateSkillDirectory(_0x4d62b5,_0x460234={}){const _0x127800=a56_0x57a198,_0x4a669b=resolveSkillDirectoryRoot(_0x4d62b5),_0x4e58aa=[],_0x536c27=loadRequiredSkillFile(_0x4a669b,_0x4e58aa),_0x235add=_0x536c27?parseFrontmatter(_0x536c27[_0x127800(0x16d)]):{'hasFrontmatter':![]};_0x536c27&&validateFrontmatter(_0x536c27['path'],_0x235add,_0x4e58aa);validateRuntimeCliReferences(_0x4a669b,_0x4e58aa);const _0xeb74d9=_0x4e58aa[_0x127800(0x147)](_0x4efdd0=>_0x4efdd0[_0x127800(0x18f)]===_0x127800(0x154)),_0x339745=_0x4e58aa['filter'](_0x1f87b4=>_0x1f87b4[_0x127800(0x18f)]===_0x127800(0x159));return{'ok':_0xeb74d9[_0x127800(0x15b)]===0x0,'dir':_0x4a669b,'type':_0x235add[_0x127800(0x17f)],'errors':_0xeb74d9,'warnings':_0x339745};}function resolveSkillDirectoryRoot(_0x1ba96e){const _0x3ca921=a56_0x57a198,_0x54d3ed=resolve(_0x1ba96e);if(!existsSync(_0x54d3ed))throw CliErrors['validation'](_0x3ca921(0x183)+_0x1ba96e);const _0x5969c5=lstatSync(_0x54d3ed);if(_0x5969c5[_0x3ca921(0x172)]())return _0x54d3ed;if(_0x5969c5['isSymbolicLink']()){const _0x270403=realpathSync(_0x54d3ed);if(lstatSync(_0x270403)[_0x3ca921(0x172)]())return _0x270403;}throw CliErrors['validation']('Skill\x20directory\x20not\x20found:\x20'+_0x1ba96e);}export function throwIfSkillValidationFailed(_0x467cfc,_0x407186=![]){const _0x1cb233=a56_0x57a198;if(_0x467cfc['ok'])return;const _0x25bd03=_0x467cfc[_0x1cb233(0x169)][_0x1cb233(0x173)](_0x53406f=>{const _0x404b6b=_0x1cb233,_0x4af66b=_0x53406f['section']?'#'+_0x53406f[_0x404b6b(0x156)]:'';return _0x53406f[_0x404b6b(0x18f)]['toUpperCase']()+'\x20'+_0x53406f['ruleId']+'\x20'+_0x53406f[_0x404b6b(0x148)]+_0x4af66b+':\x20'+_0x53406f['message']+_0x404b6b(0x13b)+_0x53406f[_0x404b6b(0x161)];});throw CliErrors['validation'](_0x1cb233(0x14a)+_0x25bd03['join']('\x0a'),_0x1cb233(0x165));}function a56_0x4b2b(_0xb66968,_0x6f1b27){_0xb66968=_0xb66968-0x138;const _0x19b2be=a56_0x19b2();let _0x4b2bac=_0x19b2be[_0xb66968];return _0x4b2bac;}function loadRequiredSkillFile(_0x308c70,_0x585ec9){const _0x23de09=a56_0x57a198,_0x5d5e56=resolve(_0x308c70,SKILL_FILE);if(!existsSync(_0x5d5e56))return _0x585ec9[_0x23de09(0x145)](issue(_0x23de09(0x154),'structure-complete',SKILL_FILE,_0x23de09(0x166),_0x23de09(0x185))),undefined;const _0x3091ee=lstatSync(_0x5d5e56);if(_0x3091ee[_0x23de09(0x189)]())return _0x585ec9[_0x23de09(0x145)](issue('error',_0x23de09(0x16f),SKILL_FILE,_0x23de09(0x14e),'Replace\x20the\x20symlink\x20with\x20a\x20regular\x20SKILL.md\x20file\x20inside\x20the\x20Skill\x20directory.')),undefined;if(!_0x3091ee[_0x23de09(0x140)]())return _0x585ec9[_0x23de09(0x145)](issue(_0x23de09(0x154),_0x23de09(0x16f),SKILL_FILE,_0x23de09(0x15e),_0x23de09(0x149))),undefined;return{'path':SKILL_FILE,'content':readFileSync(_0x5d5e56,_0x23de09(0x181))};}function validateFrontmatter(_0x15fef6,_0x28020d,_0x535408){const _0x119895=a56_0x57a198;if(!_0x28020d['hasFrontmatter']){_0x535408[_0x119895(0x145)](issue(_0x119895(0x154),_0x119895(0x158),_0x15fef6,_0x119895(0x171),_0x119895(0x175)));return;}!_0x28020d[_0x119895(0x179)]?.[_0x119895(0x193)]()&&_0x535408[_0x119895(0x145)](issue(_0x119895(0x154),_0x119895(0x158),_0x15fef6,_0x119895(0x195),_0x119895(0x13d))),!_0x28020d['displayName']?.[_0x119895(0x193)]()&&_0x535408['push'](issue(_0x119895(0x159),_0x119895(0x192),_0x15fef6,_0x119895(0x17d),_0x119895(0x14c))),!_0x28020d['example']?.[_0x119895(0x193)]()&&_0x535408[_0x119895(0x145)](issue('warning','example-recommended',_0x15fef6,_0x119895(0x163),'Set\x20example\x20to\x20one\x20short\x20user\x20message\x20that\x20can\x20directly\x20trigger\x20this\x20Skill.')),!_0x28020d['description']?.[_0x119895(0x193)]()&&_0x535408[_0x119895(0x145)](issue(_0x119895(0x154),_0x119895(0x16c),_0x15fef6,_0x119895(0x14b),_0x119895(0x150))),_0x28020d[_0x119895(0x14f)]===!![]&&_0x535408[_0x119895(0x145)](issue(_0x119895(0x154),_0x119895(0x164),_0x15fef6,_0x119895(0x18e),_0x119895(0x16e))),_0x28020d[_0x119895(0x17f)]?.[_0x119895(0x193)]()&&!SUPPORTED_SKILL_TYPES['has'](_0x28020d[_0x119895(0x17f)])&&_0x535408[_0x119895(0x145)](issue(_0x119895(0x154),'frontmatter-required',_0x15fef6,_0x119895(0x13a),'Set\x20metadata.type\x20to\x20write,\x20read,\x20or\x20trainer.'));}function validateRuntimeCliReferences(_0x4b3139,_0x1ce16f){const _0x5e0027=a56_0x57a198;for(const _0x24eb45 of findRabetbaseCliInvocations(_0x4b3139)){_0x1ce16f['push'](issue(_0x5e0027(0x159),'rabetbase-cli-reference',_0x24eb45[_0x5e0027(0x148)],'This\x20line\x20invokes\x20the\x20rabetbase\x20CLI.\x20rabetbase\x20is\x20a\x20dev-time\x20tool;\x20runtime\x20Skills\x20should\x20drive\x20runtime\x20work\x20through\x20lovrabet\x20commands.',_0x5e0027(0x152),'L'+_0x24eb45[_0x5e0027(0x186)]));}}function findRabetbaseCliInvocations(_0x15f89e){const _0x491ba8=a56_0x57a198;return scanSkillDirectory(_0x15f89e)[_0x491ba8(0x147)](_0x51e376=>TEXT_SKILL_FILE_PATTERN['test'](_0x51e376[_0x491ba8(0x13e)]))[_0x491ba8(0x17a)](_0xddd333=>{const _0x4cce73=_0x491ba8,_0x47ac75=fileText(_0xddd333);return _0x47ac75[_0x4cce73(0x187)](/\r?\n/)[_0x4cce73(0x173)]((_0x4c2be9,_0x2d1315)=>({'file':_0xddd333[_0x4cce73(0x13e)],'line':_0x2d1315+0x1,'text':_0x4c2be9}))[_0x4cce73(0x147)](({text:_0x1629b4})=>isRabetbaseCliInvocation(_0x1629b4))[_0x4cce73(0x173)](({file:_0xcc53f6,line:_0x3ea39a})=>({'file':_0xcc53f6,'line':_0x3ea39a}));});}const RABETBASE_SUBCOMMANDS=[a56_0x57a198(0x17c),'sql',a56_0x57a198(0x162),a56_0x57a198(0x141),a56_0x57a198(0x160),a56_0x57a198(0x15c),'schema',a56_0x57a198(0x167),a56_0x57a198(0x168),'kb',a56_0x57a198(0x142),a56_0x57a198(0x194),'data',a56_0x57a198(0x191),a56_0x57a198(0x18c),a56_0x57a198(0x17e)],RABETBASE_INVOCATION=new RegExp(String[a56_0x57a198(0x151)]`\brabetbase\s+(?:${RABETBASE_SUBCOMMANDS[a56_0x57a198(0x190)]('|')})\b`+String[a56_0x57a198(0x151)]`(?:\s+[a-z][\w-]*){0,2}\s+(?:--?[a-z]|[\w.-]+=)`,'i');function isRabetbaseCliInvocation(_0x385625){const _0x238a88=a56_0x57a198,_0x257f5a=_0x385625[_0x238a88(0x16b)](/\brabetbase\b/i);if(_0x257f5a<0x0)return![];const _0x2584c7=_0x385625[_0x238a88(0x18a)](_0x257f5a)[_0x238a88(0x187)](/\blovrabet\b/i)[0x0]??'';return RABETBASE_INVOCATION[_0x238a88(0x13c)](_0x2584c7);}function parseFrontmatter(_0x108e7d){const _0x569ca0=a56_0x57a198,_0x21f177=_0x108e7d['match'](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x21f177)return{'hasFrontmatter':![]};const _0xe27a1e=_0x21f177[0x1]??'',_0x10d35e={'hasFrontmatter':!![]};let _0x409d75;try{_0x409d75=a56_0x2f143b(_0xe27a1e);}catch{return _0x10d35e;}const _0x3c446e=asRecord(_0x409d75);if(!_0x3c446e)return _0x10d35e;_0x10d35e[_0x569ca0(0x179)]=scalarToString(_0x3c446e[_0x569ca0(0x179)]),_0x10d35e[_0x569ca0(0x18b)]=scalarToString(_0x3c446e['displayName']),_0x10d35e[_0x569ca0(0x155)]=scalarToString(_0x3c446e['description']),_0x10d35e['example']=scalarToString(_0x3c446e[_0x569ca0(0x17b)]);const _0x523bab=asRecord(_0x3c446e[_0x569ca0(0x139)]);return _0x523bab&&(_0x10d35e[_0x569ca0(0x17f)]=scalarToString(_0x523bab[_0x569ca0(0x17f)]),_0x10d35e['internal']=scalarToBoolean(_0x523bab[_0x569ca0(0x14f)])),_0x10d35e;}function asRecord(_0x19ef0a){const _0x4e711f=a56_0x57a198;if(_0x19ef0a&&typeof _0x19ef0a===_0x4e711f(0x176)&&!Array[_0x4e711f(0x177)](_0x19ef0a))return _0x19ef0a;return undefined;}function scalarToString(_0x192fe7){const _0x47c0aa=a56_0x57a198;if(typeof _0x192fe7===_0x47c0aa(0x170))return _0x192fe7['trim']();if(typeof _0x192fe7===_0x47c0aa(0x15d)||typeof _0x192fe7===_0x47c0aa(0x184))return String(_0x192fe7);return undefined;}function scalarToBoolean(_0x38dbdf){const _0x253ee0=a56_0x57a198;if(typeof _0x38dbdf===_0x253ee0(0x184))return _0x38dbdf;if(typeof _0x38dbdf===_0x253ee0(0x170))return cleanBoolean(_0x38dbdf);return undefined;}function cleanBoolean(_0x22be1c){const _0x23d434=a56_0x57a198,_0x1e74a9=_0x22be1c[_0x23d434(0x193)]()[_0x23d434(0x178)]();if(_0x1e74a9===_0x23d434(0x174))return!![];if(_0x1e74a9===_0x23d434(0x182))return![];return undefined;}function issue(_0x2e8e07,_0x85ae35,_0x5b5ed7,_0x166809,_0x5b3b4c,_0x44b91e){return{'level':_0x2e8e07,'ruleId':_0x85ae35,'file':_0x5b5ed7,'section':_0x44b91e,'message':_0x166809,'suggestion':_0x5b3b4c};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a57_0x55f9d3=a57_0x18d3;(function(_0x25679b,_0x28a99f){const _0x561e08=a57_0x18d3,_0xb5ba23=_0x25679b();while(!![]){try{const _0x227c71=-parseInt(_0x561e08(0xdb))/0x1*(-parseInt(_0x561e08(0xdd))/0x2)+parseInt(_0x561e08(0xd9))/0x3*(-parseInt(_0x561e08(0xd6))/0x4)+parseInt(_0x561e08(0xd5))/0x5*(-parseInt(_0x561e08(0xe2))/0x6)+parseInt(_0x561e08(0xda))/0x7+-parseInt(_0x561e08(0xe1))/0x8*(-parseInt(_0x561e08(0xdc))/0x9)+-parseInt(_0x561e08(0xde))/0xa+-parseInt(_0x561e08(0xd4))/0xb*(-parseInt(_0x561e08(0xdf))/0xc);if(_0x227c71===_0x28a99f)break;else _0xb5ba23['push'](_0xb5ba23['shift']());}catch(_0xdb3c06){_0xb5ba23['push'](_0xb5ba23['shift']());}}}(a57_0x1eac,0xb8650));function a57_0x1eac(){const _0xec66c9=['8GvAuvK','376806HrjySJ','sqlContent','dbId','bool','sqlcode','sqlName','sql','Get\x20custom\x20SQL\x20query\x20details\x20by\x20sqlCode','44rMrrhC','110bZokSb','16VzOqju','description','appCode','24207eGOAvo','153328ZwhNBu','11GSmxKv','3646557PwYMyx','228090ZWrAnb','1849020uOnJjJ','2017524ttJAOS','verbose'];a57_0x1eac=function(){return _0xec66c9;};return a57_0x1eac();}import{getSqlQueryInfo}from'../../core/api-client.js';function a57_0x18d3(_0x355876,_0x29bb77){_0x355876=_0x355876-0xd0;const _0x1eac8b=a57_0x1eac();let _0x18d33f=_0x1eac8b[_0x355876];return _0x18d33f;}import{getDbName}from'../../core/db-resolver.js';import{SQLCODE_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';export const sqlDetail={'service':a57_0x55f9d3(0xd2),'command':'detail','description':a57_0x55f9d3(0xd3),'risk':'read','flags':[SQLCODE_FLAG,VERBOSE_FLAG],async 'execute'(_0x14d03f){const _0x3eb57e=a57_0x55f9d3,_0x48650d=await getSqlQueryInfo(_0x14d03f[_0x3eb57e(0xd8)],_0x14d03f['str'](_0x3eb57e(0xd0))),_0x2d949e=_0x14d03f[_0x3eb57e(0xe5)](_0x3eb57e(0xe0));if(_0x2d949e)return{'ok':!![],'data':_0x48650d};const _0x4c6f05=_0x48650d[_0x3eb57e(0xe4)]?await getDbName(_0x14d03f['appCode'],_0x48650d[_0x3eb57e(0xe4)]):undefined;return{'ok':!![],'data':{'sqlCode':_0x48650d['sqlCode'],'sqlName':_0x48650d[_0x3eb57e(0xd1)],'db':_0x4c6f05?_0x4c6f05+'\x20('+_0x48650d[_0x3eb57e(0xe4)]+')':_0x48650d[_0x3eb57e(0xe4)]??'','description':_0x48650d[_0x3eb57e(0xd7)]??'','sqlContent':_0x48650d[_0x3eb57e(0xe3)]??''}};}};
|
package/lib/commands/sql/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a58_0xbdee07=a58_0x314f;(function(_0x2ef81b,_0x3a48b2){const _0x452640=a58_0x314f,_0x31f06d=_0x2ef81b();while(!![]){try{const _0x2734aa=-parseInt(_0x452640(0xb2))/0x1+parseInt(_0x452640(0xb3))/0x2*(-parseInt(_0x452640(0xae))/0x3)+-parseInt(_0x452640(0xbd))/0x4*(parseInt(_0x452640(0xb0))/0x5)+-parseInt(_0x452640(0xba))/0x6*(-parseInt(_0x452640(0xbf))/0x7)+parseInt(_0x452640(0xb5))/0x8+-parseInt(_0x452640(0xb7))/0x9*(-parseInt(_0x452640(0xc1))/0xa)+parseInt(_0x452640(0xc3))/0xb;if(_0x2734aa===_0x3a48b2)break;else _0x31f06d['push'](_0x31f06d['shift']());}catch(_0x264d69){_0x31f06d['push'](_0x31f06d['shift']());}}}(a58_0x2f95,0x39d82));import{executeSdkSql}from'../../core/sdk-client.js';import{SQLCODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';function a58_0x314f(_0x248e96,_0x16ae75){_0x248e96=_0x248e96-0xae;const _0x2f9513=a58_0x2f95();let _0x314fbd=_0x2f9513[_0x248e96];return _0x314fbd;}import{parseJsonParams}from'../../utils/params.js';function a58_0x2f95(){const _0x53714b=['30ubRCCc','sql','1441297EbeOWW','execSuccess','isArray','Execute\x20a\x20custom\x20SQL\x20query\x20by\x20sqlCode','execError','27243qvNdHJ','SQL\x20execution\x20failed','3535BUawQv','now','242063Ofmwrl','58ZMjCdf','sqlcode','23032XpSIVA','params','1002195SuBYpl','str','length','888864ekozca','read','execResult','124mVjJKK','exec','14WNluTJ','\x20row(s)\x20in\x20'];a58_0x2f95=function(){return _0x53714b;};return a58_0x2f95();}export const sqlExec={'service':a58_0xbdee07(0xc2),'command':a58_0xbdee07(0xbe),'description':a58_0xbdee07(0xc6),'risk':a58_0xbdee07(0xbb),'flags':[SQLCODE_FLAG,PARAMS_FLAG],async 'execute'(_0x396f0b){const _0x50f582=a58_0xbdee07,_0x9f7ec0=parseJsonParams(_0x396f0b[_0x50f582(0xb8)](_0x50f582(0xb6))),_0x1de77a=Date[_0x50f582(0xb1)](),_0xe49e07=await executeSdkSql(_0x396f0b[_0x50f582(0xb8)](_0x50f582(0xb4)),_0x9f7ec0),_0x9d731d=Date['now']()-_0x1de77a,_0x5894d3=_0xe49e07?.[_0x50f582(0xbc)]??_0xe49e07,_0x53439b=_0xe49e07?.[_0x50f582(0xc4)]??!![];if(!_0x53439b)return{'ok':![],'data':{'error':_0xe49e07?.[_0x50f582(0xc7)]||_0x50f582(0xaf),'elapsed':_0x9d731d},'message':_0x50f582(0xaf)};const _0x54baa8=Array[_0x50f582(0xc5)](_0x5894d3)?_0x5894d3:[];return{'ok':!![],'data':{'rows':_0x54baa8,'rowCount':_0x54baa8[_0x50f582(0xb9)],'elapsed':_0x9d731d},'message':'Returned\x20'+_0x54baa8['length']+_0x50f582(0xc0)+_0x9d731d+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x420b23,_0x46d78b){const _0x1a48bb=a59_0x5819,_0x10d37a=_0x420b23();while(!![]){try{const _0x319eba=-parseInt(_0x1a48bb(0x1d6))/0x1*(parseInt(_0x1a48bb(0x1d4))/0x2)+parseInt(_0x1a48bb(0x1d5))/0x3*(parseInt(_0x1a48bb(0x1dc))/0x4)+parseInt(_0x1a48bb(0x1d7))/0x5*(parseInt(_0x1a48bb(0x1dd))/0x6)+parseInt(_0x1a48bb(0x1da))/0x7*(parseInt(_0x1a48bb(0x1d9))/0x8)+parseInt(_0x1a48bb(0x1d8))/0x9+-parseInt(_0x1a48bb(0x1db))/0xa*(-parseInt(_0x1a48bb(0x1de))/0xb)+-parseInt(_0x1a48bb(0x1df))/0xc;if(_0x319eba===_0x46d78b)break;else _0x10d37a['push'](_0x10d37a['shift']());}catch(_0x2df816){_0x10d37a['push'](_0x10d37a['shift']());}}}(a59_0x98ce,0x20a1a));import{sqlDetail}from'../../commands/sql/detail.js';function a59_0x98ce(){const _0x2bcf5b=['14MHmsDu','1452MAEOnH','27809MHbdSZ','325735kDVTOr','1249983rBKZwU','24QGDqXM','596841UdDXll','610KBAFTw','296gynKUZ','12RZSWxb','29733NMTUTz','4768176HkqeaL'];a59_0x98ce=function(){return _0x2bcf5b;};return a59_0x98ce();}import{sqlExec}from'../../commands/sql/exec.js';function a59_0x5819(_0x5a0855,_0x49a77c){_0x5a0855=_0x5a0855-0x1d4;const _0x98cee6=a59_0x98ce();let _0x58192f=_0x98cee6[_0x5a0855];return _0x58192f;}export const sqlDefinitions=[sqlDetail,sqlExec];
|
package/lib/commands/update.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function a59_0x1c00(_0x191317,_0x19123f){_0x191317=_0x191317-0x16e;const _0x2b8c5d=a59_0x2b8c();let _0x1c0087=_0x2b8c5d[_0x191317];return _0x1c0087;}const a59_0x15a9c8=a59_0x1c00;(function(_0xfa8498,_0x5c518e){const _0x3dec27=a59_0x1c00,_0x10dc91=_0xfa8498();while(!![]){try{const _0x3a32c8=-parseInt(_0x3dec27(0x19e))/0x1*(parseInt(_0x3dec27(0x1b4))/0x2)+parseInt(_0x3dec27(0x195))/0x3+-parseInt(_0x3dec27(0x199))/0x4+-parseInt(_0x3dec27(0x174))/0x5*(-parseInt(_0x3dec27(0x193))/0x6)+parseInt(_0x3dec27(0x198))/0x7+parseInt(_0x3dec27(0x181))/0x8*(parseInt(_0x3dec27(0x1a6))/0x9)+-parseInt(_0x3dec27(0x1a2))/0xa;if(_0x3a32c8===_0x5c518e)break;else _0x10dc91['push'](_0x10dc91['shift']());}catch(_0x2167ed){_0x10dc91['push'](_0x10dc91['shift']());}}}(a59_0x2b8c,0xd0290));import{spawnSync}from'node:child_process';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{LOVRABET_NPM_PACKAGE_NAME,LOVRABET_SKILL_SOURCE,NPM_REGISTRY_BASE_URL}from'../constant/distribution.js';function a59_0x2b8c(){const _0x1b0da1=['minor','bool','map','length','patch','fromEntries','warn','Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.','Updated\x20to\x20v','unknown','2134655cIJKkm','no-skills','boolean','Checking\x20npm\x20dist-tags...','Updating\x20','install','trim','Update\x20','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','message','\x20\x20Run\x20manually:\x20lovrabet\x20cli-skill\x20install','Unable\x20to\x20resolve\x20','update','8504vwWxcb','Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','cwd','=1).','args','stderr','npm','exit\x20','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','filter','\x20\x20Try\x20manually:\x20npm\x20install\x20-g\x20','error','Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','version','join','skills','object','latest','12FYzsPj','/dist-tags','2247408rqxDvt','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','entries','4429782bGWywk','3014780rVhWSa','log','Checking\x20CLI\x20Built-in\x20Skill...','Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag','Already\x20on\x20requested\x20version\x20(v','1juzIzu','\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(','pipe','nonInteractive','3904820cGocrh','json','write','/-/package/','2682LXdreL','Install\x20a\x20specific\x20CLI\x20version','--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.','beta','string','\x20->\x20','status','prerelease','Use\x20full\x20semver\x20versions\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','stdout','source','inherit','Invalid\x20version:\x20','1111594iCSrhs','Current\x20version:\x20','\x20version\x20from\x20npm.','validation'];a59_0x2b8c=function(){return _0x1b0da1;};return a59_0x2b8c();}import{resolveNpmBin}from'../utils/platform.js';import{getCliVersion}from'../utils/version.js';import{LOVRABET_SKIP_NPX_SKILLS_ENV,runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';const updateFlags=[{'name':a59_0x15a9c8(0x192),'type':a59_0x15a9c8(0x176),'description':a59_0x15a9c8(0x19c),'default':![]},{'name':'beta','type':a59_0x15a9c8(0x176),'description':a59_0x15a9c8(0x189),'default':![]},{'name':a59_0x15a9c8(0x18e),'type':a59_0x15a9c8(0x1aa),'description':a59_0x15a9c8(0x1a7)},{'name':a59_0x15a9c8(0x175),'type':a59_0x15a9c8(0x176),'description':a59_0x15a9c8(0x182),'default':![]},{'name':a59_0x15a9c8(0x190),'type':a59_0x15a9c8(0x176),'description':a59_0x15a9c8(0x18d),'default':!![],'hidden':!![]}];function parseSemver(_0x51f5f2){const _0x26f75c=_0x51f5f2['trim']()['match'](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0x26f75c)return null;return{'major':Number(_0x26f75c[0x1]),'minor':Number(_0x26f75c[0x2]),'patch':Number(_0x26f75c[0x3]),'prerelease':_0x26f75c[0x4]};}function compareSemver(_0x581ab7,_0x3a7b31){const _0x3abdeb=a59_0x15a9c8,_0x4ff6d9=parseSemver(_0x581ab7),_0x4b1290=parseSemver(_0x3a7b31);if(!_0x4ff6d9||!_0x4b1290)throw CliErrors['validation']('Version\x20comparison\x20failed.',_0x3abdeb(0x1ae));for(const _0x3213fd of['major',_0x3abdeb(0x1b8),_0x3abdeb(0x16e)]){if(_0x4ff6d9[_0x3213fd]<_0x4b1290[_0x3213fd])return-0x1;if(_0x4ff6d9[_0x3213fd]>_0x4b1290[_0x3213fd])return 0x1;}if(!_0x4ff6d9['prerelease']&&!_0x4b1290[_0x3abdeb(0x1ad)])return 0x0;if(!_0x4ff6d9[_0x3abdeb(0x1ad)])return 0x1;if(!_0x4b1290['prerelease'])return-0x1;if(_0x4ff6d9[_0x3abdeb(0x1ad)]===_0x4b1290[_0x3abdeb(0x1ad)])return 0x0;return _0x4ff6d9[_0x3abdeb(0x1ad)]<_0x4b1290[_0x3abdeb(0x1ad)]?-0x1:0x1;}function getRequestedVersion(_0x37f266){const _0x2e5eac=a59_0x15a9c8,_0x8c34fe=_0x37f266['str']('version')['trim']();if(_0x8c34fe)return _0x8c34fe;return String(_0x37f266[_0x2e5eac(0x185)]?.[0x0]??'')[_0x2e5eac(0x17a)]();}function shouldSkipCliBuiltInSkill(_0x43beff){const _0x5f3790=a59_0x15a9c8;return _0x43beff[_0x5f3790(0x1b9)](_0x5f3790(0x175))||_0x43beff['flag']('skills')===![];}async function validateUpdateFlags(_0x1caa05){const _0x150333=a59_0x15a9c8,_0x58a437=getRequestedVersion(_0x1caa05),_0x5b1bec=[_0x1caa05[_0x150333(0x1b9)](_0x150333(0x192))?'latest':'',_0x1caa05['bool']('beta')?_0x150333(0x1a9):'',_0x58a437?'version':''][_0x150333(0x18a)](Boolean);if(_0x5b1bec[_0x150333(0x1bb)]>0x1)throw CliErrors[_0x150333(0x1b7)](_0x150333(0x1a8),'Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.');if(_0x58a437&&!parseSemver(_0x58a437))throw CliErrors[_0x150333(0x1b7)](_0x150333(0x1b3)+_0x58a437,_0x150333(0x171));}async function fetchNpmDistTags(){const _0x169b92=a59_0x15a9c8;try{const _0x2e462b=NPM_REGISTRY_BASE_URL+_0x169b92(0x1a5)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x169b92(0x194),_0x1ccb60=await fetch(_0x2e462b,{'signal':AbortSignal['timeout'](0x2710)});if(!_0x1ccb60['ok'])return null;const _0x3f0fa4=await _0x1ccb60[_0x169b92(0x1a3)]();if(!_0x3f0fa4||typeof _0x3f0fa4!==_0x169b92(0x191))return null;return Object[_0x169b92(0x16f)](Object[_0x169b92(0x197)](_0x3f0fa4)[_0x169b92(0x18a)](([,_0x17bd39])=>typeof _0x17bd39===_0x169b92(0x1aa)&&_0x17bd39['trim']())[_0x169b92(0x1ba)](([_0x23b14a,_0x1d2ad9])=>[_0x23b14a,String(_0x1d2ad9)[_0x169b92(0x17a)]()]));}catch{return null;}}async function resolveTargetVersion(_0xc5b301){const _0x15e457=a59_0x15a9c8,_0x8a55c5=getRequestedVersion(_0xc5b301);if(_0x8a55c5)return{'version':_0x8a55c5,'source':_0x15e457(0x18e)};const _0xb95d97=_0xc5b301[_0x15e457(0x1b9)]('beta')?'beta':_0x15e457(0x192),_0x421324=await fetchNpmDistTags(),_0x153304=_0x421324?.[_0xb95d97];if(!_0x153304)return null;return{'version':_0x153304,'source':_0xb95d97};}function shouldInstallTarget(_0xd6c2cc,_0xb621a4){const _0x21df48=a59_0x15a9c8,_0x3f6ad7=compareSemver(_0xd6c2cc,_0xb621a4[_0x21df48(0x18e)]);if(_0xb621a4[_0x21df48(0x1b1)]===_0x21df48(0x18e))return _0x3f6ad7!==0x0;return _0x3f6ad7<0x0;}function installCliPackage(_0x343c56,_0x3de1bc){const _0x549fa1=a59_0x15a9c8,_0x4893af=resolveNpmBin(_0x549fa1(0x187)),_0x1db48b=[_0x549fa1(0x179),'-g',LOVRABET_NPM_PACKAGE_NAME+'@'+_0x343c56];console[_0x549fa1(0x19a)]('*\x20'+[_0x4893af,..._0x1db48b][_0x549fa1(0x18f)]('\x20'));const _0x52f007=spawnSync(_0x4893af,_0x1db48b,{'cwd':process[_0x549fa1(0x183)](),'stdio':_0x3de1bc?_0x549fa1(0x1a0):_0x549fa1(0x1b2),'env':process.env,'shell':![]});if(_0x52f007[_0x549fa1(0x1ac)]===0x0)return{'ok':!![]};let _0x92302b=_0x52f007[_0x549fa1(0x18c)]?.[_0x549fa1(0x17d)]||_0x549fa1(0x188)+(_0x52f007[_0x549fa1(0x1ac)]??_0x549fa1(0x173));if(_0x3de1bc){const _0x5233dd=_0x52f007[_0x549fa1(0x186)]?_0x52f007[_0x549fa1(0x186)]['toString']()[_0x549fa1(0x17a)]():'',_0xbbc6c2=_0x52f007[_0x549fa1(0x1b0)]?_0x52f007[_0x549fa1(0x1b0)]['toString']()[_0x549fa1(0x17a)]():'';if(_0x5233dd)_0x92302b=_0x5233dd;else{if(_0xbbc6c2)_0x92302b=_0xbbc6c2;}}return{'ok':![],'error':_0x92302b};}async function installCliBuiltInSkill(_0x4fbe64){const _0x1ee097=a59_0x15a9c8;console['log'](_0x1ee097(0x19b));const _0x552914=runNpxSkillsAddGlobal(process['cwd'](),LOVRABET_SKILL_SOURCE,{'stdio':_0x4fbe64?_0x1ee097(0x1a0):_0x1ee097(0x1b2)});if(_0x552914['skipped']){console[_0x1ee097(0x19a)](_0x1ee097(0x19f)+LOVRABET_SKIP_NPX_SKILLS_ENV+_0x1ee097(0x184));return;}if(_0x552914['ok']){console['log'](_0x1ee097(0x196));return;}console['warn'](_0x1ee097(0x17c)+(_0x552914[_0x1ee097(0x18c)]||_0x1ee097(0x173))),console[_0x1ee097(0x19a)](_0x1ee097(0x17e));}async function execute(_0x5dd36b){const _0x1d0c5a=a59_0x15a9c8;await validateUpdateFlags(_0x5dd36b);const _0x1d4d81=getCliVersion();console['log'](_0x1d0c5a(0x1b5)+_0x1d4d81),console[_0x1d0c5a(0x19a)](_0x1d0c5a(0x177));const _0x3bcd63=await resolveTargetVersion(_0x5dd36b);if(!_0x3bcd63){const _0x5da7f2=_0x5dd36b[_0x1d0c5a(0x1b9)](_0x1d0c5a(0x1a9))?_0x1d0c5a(0x1a9):_0x1d0c5a(0x192),_0x3ef00c=_0x1d0c5a(0x17f)+_0x5da7f2+_0x1d0c5a(0x1b6);return console[_0x1d0c5a(0x170)](_0x3ef00c),console[_0x1d0c5a(0x19a)](_0x1d0c5a(0x1af)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x5da7f2),{'ok':![]};}if(!shouldInstallTarget(_0x1d4d81,_0x3bcd63)){const _0x1733ba=_0x3bcd63[_0x1d0c5a(0x1b1)]===_0x1d0c5a(0x18e)?_0x1d0c5a(0x19d)+_0x3bcd63[_0x1d0c5a(0x18e)]+').':'Already\x20up\x20to\x20date\x20(v'+_0x3bcd63[_0x1d0c5a(0x18e)]+').';return console[_0x1d0c5a(0x19a)](_0x1733ba),shouldSkipCliBuiltInSkill(_0x5dd36b)?console[_0x1d0c5a(0x19a)]('Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).'):await installCliBuiltInSkill(_0x5dd36b[_0x1d0c5a(0x1a1)]),{'ok':!![]};}console[_0x1d0c5a(0x19a)](_0x1d0c5a(0x178)+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0x1d4d81+_0x1d0c5a(0x1ab)+_0x3bcd63[_0x1d0c5a(0x18e)]);const _0x25f3ed=installCliPackage(_0x3bcd63[_0x1d0c5a(0x18e)],_0x5dd36b[_0x1d0c5a(0x1a1)]);if(!_0x25f3ed['ok']){const _0x401714='Update\x20failed:\x20'+(_0x25f3ed[_0x1d0c5a(0x18c)]||_0x1d0c5a(0x173));return console[_0x1d0c5a(0x18c)](_0x401714),console[_0x1d0c5a(0x19a)](_0x1d0c5a(0x18b)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x3bcd63[_0x1d0c5a(0x18e)]),{'ok':![]};}return console['log'](_0x1d0c5a(0x172)+_0x3bcd63['version']+'.'),console[_0x1d0c5a(0x19a)]('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.'),shouldSkipCliBuiltInSkill(_0x5dd36b)?console[_0x1d0c5a(0x19a)]('Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).'):await installCliBuiltInSkill(_0x5dd36b[_0x1d0c5a(0x1a1)]),{'ok':!![]};}export const updateDefinition={'service':a59_0x15a9c8(0x180),'command':'run','description':a59_0x15a9c8(0x17b)+CLI_BIN_NAME+'\x20CLI\x20from\x20npm','risk':a59_0x15a9c8(0x1a4),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a60_0x321d99=a60_0x30b3;(function(_0x4ee002,_0x1576c2){const _0x9f22c4=a60_0x30b3,_0x50cf3=_0x4ee002();while(!![]){try{const _0x16b4d=-parseInt(_0x9f22c4(0x1d2))/0x1*(parseInt(_0x9f22c4(0x1e1))/0x2)+-parseInt(_0x9f22c4(0x1cd))/0x3+parseInt(_0x9f22c4(0x198))/0x4*(-parseInt(_0x9f22c4(0x1cb))/0x5)+parseInt(_0x9f22c4(0x1d3))/0x6+-parseInt(_0x9f22c4(0x1ac))/0x7*(parseInt(_0x9f22c4(0x1dd))/0x8)+parseInt(_0x9f22c4(0x1db))/0x9*(parseInt(_0x9f22c4(0x1aa))/0xa)+-parseInt(_0x9f22c4(0x1c4))/0xb*(-parseInt(_0x9f22c4(0x1bc))/0xc);if(_0x16b4d===_0x1576c2)break;else _0x50cf3['push'](_0x50cf3['shift']());}catch(_0x3805de){_0x50cf3['push'](_0x50cf3['shift']());}}}(a60_0x46c0,0x303d5));function a60_0x30b3(_0x27dc9a,_0x2b8a00){_0x27dc9a=_0x27dc9a-0x195;const _0x46c03a=a60_0x46c0();let _0x30b380=_0x46c03a[_0x27dc9a];return _0x30b380;}import{spawnSync}from'node:child_process';import{CliErrors}from'../errors.js';function a60_0x46c0(){const _0x2487b9=['Checking\x20npm\x20dist-tags...','Already\x20up\x20to\x20date\x20(v','9063835efwFJq','Update\x20','match','string','inherit','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','beta','1744145FShGRQ','Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','570072licElH','args','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','entries','3963VgHhxL','24510zwGRUf','\x20\x20Run\x20manually:\x20lovrabet\x20cli-skill\x20install','warn','json','cwd','filter','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','no-skills','36nzhTyi','run','8eVvYry','\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(','write','pipe','132qcVnaQ','major','Invalid\x20version:\x20','prerelease','bool','exit\x20','Use\x20full\x20semver\x20versions\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.','Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag','install','4klBHXW','update','boolean','\x20version\x20from\x20npm.','Current\x20version:\x20','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','status','trim','Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','/-/package/','\x20->\x20','message','Updated\x20to\x20v','/dist-tags','toString','latest','skipped','Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.','508800GRqMdf','stdout','235130WnFnXQ','=1).','Already\x20on\x20requested\x20version\x20(v','fromEntries','source','map','flag','minor','join','stderr','nonInteractive','str','skills','validation','Version\x20comparison\x20failed.','unknown','12kIjsDv','error','Updating\x20','log','\x20\x20Try\x20manually:\x20npm\x20install\x20-g\x20','version'];a60_0x46c0=function(){return _0x2487b9;};return a60_0x46c0();}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':a60_0x321d99(0x1a7),'type':a60_0x321d99(0x19a),'description':a60_0x321d99(0x196),'default':![]},{'name':a60_0x321d99(0x1ca),'type':a60_0x321d99(0x19a),'description':a60_0x321d99(0x19d),'default':![]},{'name':a60_0x321d99(0x1c1),'type':a60_0x321d99(0x1c7),'description':'Install\x20a\x20specific\x20CLI\x20version'},{'name':a60_0x321d99(0x1da),'type':a60_0x321d99(0x19a),'description':a60_0x321d99(0x1cc),'default':![]},{'name':a60_0x321d99(0x1b8),'type':a60_0x321d99(0x19a),'description':a60_0x321d99(0x1a0),'default':!![],'hidden':!![]}];function parseSemver(_0x20f859){const _0x5a262d=a60_0x321d99,_0x5aeb65=_0x20f859['trim']()[_0x5a262d(0x1c6)](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0x5aeb65)return null;return{'major':Number(_0x5aeb65[0x1]),'minor':Number(_0x5aeb65[0x2]),'patch':Number(_0x5aeb65[0x3]),'prerelease':_0x5aeb65[0x4]};}function compareSemver(_0x2c6026,_0x5a1cbd){const _0x5c406a=a60_0x321d99,_0x41e1b6=parseSemver(_0x2c6026),_0x4b1a1e=parseSemver(_0x5a1cbd);if(!_0x41e1b6||!_0x4b1a1e)throw CliErrors[_0x5c406a(0x1b9)](_0x5c406a(0x1ba),_0x5c406a(0x195));for(const _0x2888e2 of[_0x5c406a(0x1e2),_0x5c406a(0x1b3),'patch']){if(_0x41e1b6[_0x2888e2]<_0x4b1a1e[_0x2888e2])return-0x1;if(_0x41e1b6[_0x2888e2]>_0x4b1a1e[_0x2888e2])return 0x1;}if(!_0x41e1b6[_0x5c406a(0x1e4)]&&!_0x4b1a1e['prerelease'])return 0x0;if(!_0x41e1b6[_0x5c406a(0x1e4)])return 0x1;if(!_0x4b1a1e[_0x5c406a(0x1e4)])return-0x1;if(_0x41e1b6[_0x5c406a(0x1e4)]===_0x4b1a1e[_0x5c406a(0x1e4)])return 0x0;return _0x41e1b6['prerelease']<_0x4b1a1e[_0x5c406a(0x1e4)]?-0x1:0x1;}function getRequestedVersion(_0x5781b9){const _0x3b2391=a60_0x321d99,_0x4d4e19=_0x5781b9[_0x3b2391(0x1b7)](_0x3b2391(0x1c1))[_0x3b2391(0x19f)]();if(_0x4d4e19)return _0x4d4e19;return String(_0x5781b9[_0x3b2391(0x1ce)]?.[0x0]??'')[_0x3b2391(0x19f)]();}function shouldSkipCliBuiltInSkill(_0x1be4c6){const _0x544b38=a60_0x321d99;return _0x1be4c6[_0x544b38(0x1e5)]('no-skills')||_0x1be4c6[_0x544b38(0x1b2)](_0x544b38(0x1b8))===![];}async function validateUpdateFlags(_0x561bab){const _0x4e9762=a60_0x321d99,_0xe63768=getRequestedVersion(_0x561bab),_0x5894a4=[_0x561bab[_0x4e9762(0x1e5)](_0x4e9762(0x1a7))?_0x4e9762(0x1a7):'',_0x561bab[_0x4e9762(0x1e5)](_0x4e9762(0x1ca))?_0x4e9762(0x1ca):'',_0xe63768?_0x4e9762(0x1c1):''][_0x4e9762(0x1d8)](Boolean);if(_0x5894a4['length']>0x1)throw CliErrors[_0x4e9762(0x1b9)]('--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.','Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.');if(_0xe63768&&!parseSemver(_0xe63768))throw CliErrors[_0x4e9762(0x1b9)](_0x4e9762(0x1e3)+_0xe63768,_0x4e9762(0x1a9));}async function fetchNpmDistTags(){const _0x13c263=a60_0x321d99;try{const _0xe05f37=NPM_REGISTRY_BASE_URL+_0x13c263(0x1a1)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x13c263(0x1a5),_0x2d2c4b=await fetch(_0xe05f37,{'signal':AbortSignal['timeout'](0x2710)});if(!_0x2d2c4b['ok'])return null;const _0x1597e6=await _0x2d2c4b[_0x13c263(0x1d6)]();if(!_0x1597e6||typeof _0x1597e6!=='object')return null;return Object[_0x13c263(0x1af)](Object[_0x13c263(0x1d1)](_0x1597e6)[_0x13c263(0x1d8)](([,_0x37df93])=>typeof _0x37df93===_0x13c263(0x1c7)&&_0x37df93[_0x13c263(0x19f)]())[_0x13c263(0x1b1)](([_0x27d705,_0x244e0d])=>[_0x27d705,String(_0x244e0d)[_0x13c263(0x19f)]()]));}catch{return null;}}async function resolveTargetVersion(_0x4e1656){const _0x185577=a60_0x321d99,_0x17fca0=getRequestedVersion(_0x4e1656);if(_0x17fca0)return{'version':_0x17fca0,'source':_0x185577(0x1c1)};const _0x5a63e4=_0x4e1656['bool'](_0x185577(0x1ca))?_0x185577(0x1ca):_0x185577(0x1a7),_0x2a7e40=await fetchNpmDistTags(),_0x65f4b9=_0x2a7e40?.[_0x5a63e4];if(!_0x65f4b9)return null;return{'version':_0x65f4b9,'source':_0x5a63e4};}function shouldInstallTarget(_0x55f6c0,_0x37310){const _0x3750a3=a60_0x321d99,_0x4fa815=compareSemver(_0x55f6c0,_0x37310['version']);if(_0x37310[_0x3750a3(0x1b0)]===_0x3750a3(0x1c1))return _0x4fa815!==0x0;return _0x4fa815<0x0;}function installCliPackage(_0xdb4d08,_0x3ed3e8){const _0x30e799=a60_0x321d99,_0xe68539=resolveNpmBin('npm'),_0x2ac295=[_0x30e799(0x197),'-g',LOVRABET_NPM_PACKAGE_NAME+'@'+_0xdb4d08];console['log']('*\x20'+[_0xe68539,..._0x2ac295][_0x30e799(0x1b4)]('\x20'));const _0x220ab4=spawnSync(_0xe68539,_0x2ac295,{'cwd':process[_0x30e799(0x1d7)](),'stdio':_0x3ed3e8?_0x30e799(0x1e0):_0x30e799(0x1c8),'env':process.env,'shell':![]});if(_0x220ab4[_0x30e799(0x19e)]===0x0)return{'ok':!![]};let _0x56a0c8=_0x220ab4[_0x30e799(0x1bd)]?.[_0x30e799(0x1a3)]||_0x30e799(0x1e6)+(_0x220ab4[_0x30e799(0x19e)]??_0x30e799(0x1bb));if(_0x3ed3e8){const _0x33e1b6=_0x220ab4[_0x30e799(0x1b5)]?_0x220ab4[_0x30e799(0x1b5)][_0x30e799(0x1a6)]()[_0x30e799(0x19f)]():'',_0x58fb88=_0x220ab4[_0x30e799(0x1ab)]?_0x220ab4[_0x30e799(0x1ab)]['toString']()['trim']():'';if(_0x33e1b6)_0x56a0c8=_0x33e1b6;else{if(_0x58fb88)_0x56a0c8=_0x58fb88;}}return{'ok':![],'error':_0x56a0c8};}async function installCliBuiltInSkill(_0x514eb6){const _0xc5f2e7=a60_0x321d99;console[_0xc5f2e7(0x1bf)]('Checking\x20CLI\x20Built-in\x20Skill...');const _0x670fcd=runNpxSkillsAddGlobal(process[_0xc5f2e7(0x1d7)](),LOVRABET_SKILL_SOURCE,{'stdio':_0x514eb6?_0xc5f2e7(0x1e0):_0xc5f2e7(0x1c8)});if(_0x670fcd[_0xc5f2e7(0x1a8)]){console[_0xc5f2e7(0x1bf)](_0xc5f2e7(0x1de)+LOVRABET_SKIP_NPX_SKILLS_ENV+_0xc5f2e7(0x1ad));return;}if(_0x670fcd['ok']){console[_0xc5f2e7(0x1bf)](_0xc5f2e7(0x1cf));return;}console[_0xc5f2e7(0x1d5)](_0xc5f2e7(0x1c9)+(_0x670fcd[_0xc5f2e7(0x1bd)]||'unknown')),console[_0xc5f2e7(0x1bf)](_0xc5f2e7(0x1d4));}async function execute(_0x2a2976){const _0x7cf1fe=a60_0x321d99;await validateUpdateFlags(_0x2a2976);const _0x186978=getCliVersion();console['log'](_0x7cf1fe(0x19c)+_0x186978),console[_0x7cf1fe(0x1bf)](_0x7cf1fe(0x1c2));const _0x727351=await resolveTargetVersion(_0x2a2976);if(!_0x727351){const _0x39ce7d=_0x2a2976['bool']('beta')?_0x7cf1fe(0x1ca):_0x7cf1fe(0x1a7),_0x33f31c='Unable\x20to\x20resolve\x20'+_0x39ce7d+_0x7cf1fe(0x19b);return console[_0x7cf1fe(0x1d5)](_0x33f31c),console[_0x7cf1fe(0x1bf)](_0x7cf1fe(0x1d9)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x39ce7d),{'ok':![]};}if(!shouldInstallTarget(_0x186978,_0x727351)){const _0x28feca=_0x727351['source']===_0x7cf1fe(0x1c1)?_0x7cf1fe(0x1ae)+_0x727351[_0x7cf1fe(0x1c1)]+').':_0x7cf1fe(0x1c3)+_0x727351[_0x7cf1fe(0x1c1)]+').';return console[_0x7cf1fe(0x1bf)](_0x28feca),shouldSkipCliBuiltInSkill(_0x2a2976)?console['log']('Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).'):await installCliBuiltInSkill(_0x2a2976[_0x7cf1fe(0x1b6)]),{'ok':!![]};}console[_0x7cf1fe(0x1bf)](_0x7cf1fe(0x1be)+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0x186978+_0x7cf1fe(0x1a2)+_0x727351[_0x7cf1fe(0x1c1)]);const _0x11e90a=installCliPackage(_0x727351[_0x7cf1fe(0x1c1)],_0x2a2976[_0x7cf1fe(0x1b6)]);if(!_0x11e90a['ok']){const _0x123111='Update\x20failed:\x20'+(_0x11e90a['error']||'unknown');return console[_0x7cf1fe(0x1bd)](_0x123111),console[_0x7cf1fe(0x1bf)](_0x7cf1fe(0x1c0)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x727351[_0x7cf1fe(0x1c1)]),{'ok':![]};}return console[_0x7cf1fe(0x1bf)](_0x7cf1fe(0x1a4)+_0x727351[_0x7cf1fe(0x1c1)]+'.'),console[_0x7cf1fe(0x1bf)]('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.'),shouldSkipCliBuiltInSkill(_0x2a2976)?console[_0x7cf1fe(0x1bf)](_0x7cf1fe(0x1d0)):await installCliBuiltInSkill(_0x2a2976['nonInteractive']),{'ok':!![]};}export const updateDefinition={'service':a60_0x321d99(0x199),'command':a60_0x321d99(0x1dc),'description':a60_0x321d99(0x1c5)+CLI_BIN_NAME+'\x20CLI\x20from\x20npm','risk':a60_0x321d99(0x1df),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a61_0x730318=a61_0x3b27;function a61_0x24e3(){const _0x10a84d=['includes','../../core/api-client.js','62973cJsZVa','workspace\x20','map','shouldWriteEnv','object','workspace','2340801CFTjuN','trim','from','85170yqNAwW','Compatibility\x20flag;\x20workspace\x20config\x20updates\x20are\x20non-interactive','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20pass\x20--appcode\x20directly.','appcode','2CvsKpZ','init','1452290aOlXaj','defaultApp','1430374cQzqme','command','accessKey','\x20--appcode\x20<code>\x20[--env\x20daily]','string','App\x20name\x20to\x20bind\x20as\x20the\x20current\x20workspace\x20default','write','App\x20\x22','use','boolean','\x0aEnv:\x20','../../commands/app/remote-source.js','apps','str','Run\x20`','Usage:\x20','1320Exhdxn','isArray','appCode','\x0aDefault\x20app:\x20','filter','yes','Available\x20apps:\x20','4363374hmZRHb','env','items','14968dvoGiI','App\x20code\x20to\x20bind\x20directly','4qTIXAc','3227YCEZOF','Missing\x20workspace\x20app\x20selector.','Resolving\x20--app\x20requires\x20accessKey.\x20Pass\x20--appcode\x20directly,\x20or\x20set\x20accessKey\x20before\x20running\x20','\x20--app\x20<name>\x20[--env\x20daily]\x20or\x20','app','Initialize\x20app\x20context\x20for\x20the\x20current\x20workspace','validation','envName','appName','Set\x20app\x20context\x20for\x20the\x20current\x20workspace','\x20workspace\x20','\x22\x20not\x20found.','join','36OveESU'];a61_0x24e3=function(){return _0x10a84d;};return a61_0x24e3();}(function(_0x1e3bdf,_0x4e7e69){const _0x5d420e=a61_0x3b27,_0xee709b=_0x1e3bdf();while(!![]){try{const _0xf87f90=-parseInt(_0x5d420e(0x14d))/0x1+parseInt(_0x5d420e(0x113))/0x2*(-parseInt(_0x5d420e(0x14a))/0x3)+parseInt(_0x5d420e(0x133))/0x4*(parseInt(_0x5d420e(0x115))/0x5)+parseInt(_0x5d420e(0x12e))/0x6+-parseInt(_0x5d420e(0x134))/0x7*(-parseInt(_0x5d420e(0x131))/0x8)+parseInt(_0x5d420e(0x144))/0x9*(-parseInt(_0x5d420e(0x127))/0xa)+-parseInt(_0x5d420e(0x117))/0xb*(-parseInt(_0x5d420e(0x141))/0xc);if(_0xf87f90===_0x4e7e69)break;else _0xee709b['push'](_0xee709b['shift']());}catch(_0x2fe9c2){_0xee709b['push'](_0xee709b['shift']());}}}(a61_0x24e3,0x757ff));import{CLI_BIN_NAME}from'../../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../../constant/env.js';import{CliErrors}from'../../errors.js';import{readConfigFile,resolveWriteConfigPath,writeConfigFile}from'../../context.js';import{findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../../commands/app/eligibility.js';const WORKSPACE_USE_FLAGS=[{'name':a61_0x730318(0x138),'type':'string','description':a61_0x730318(0x11c)},{'name':a61_0x730318(0x112),'type':a61_0x730318(0x11b),'description':a61_0x730318(0x132)},{'name':a61_0x730318(0x12f),'type':'string','description':'Target\x20environment','enum':[...RUNTIME_ENV_VALUES]},{'name':a61_0x730318(0x12c),'type':a61_0x730318(0x120),'description':a61_0x730318(0x14e),'default':![]}];async function executeWorkspaceUse(_0x49ce9b,_0x365bbe){const _0x377f99=a61_0x730318,_0x25cb7d=_0x49ce9b[_0x377f99(0x124)](_0x377f99(0x138))[_0x377f99(0x14b)](),_0x481323=_0x49ce9b[_0x377f99(0x124)](_0x377f99(0x112))['trim'](),_0x2bcb42=_0x49ce9b['str'](_0x377f99(0x12f))['trim'](),_0xea1b52=resolveWorkspaceEnv(_0x2bcb42||_0x49ce9b[_0x377f99(0x13b)]||DEFAULT_CONFIG_VALUES[_0x377f99(0x12f)]);if(!_0x25cb7d&&!_0x481323)throw CliErrors[_0x377f99(0x13a)](_0x377f99(0x135),_0x377f99(0x126)+CLI_BIN_NAME+_0x377f99(0x13e)+_0x365bbe+_0x377f99(0x137)+CLI_BIN_NAME+_0x377f99(0x13e)+_0x365bbe+_0x377f99(0x11a));const _0x4bf1fd=_0x481323||await resolveRemoteAppCode({'command':_0x365bbe,'appName':_0x25cb7d,'env':_0xea1b52,'accessKey':_0x49ce9b[_0x377f99(0x119)]}),_0x4d076c=writeWorkspaceConfig({'command':_0x365bbe,'appName':_0x25cb7d,'appcode':_0x4bf1fd,'env':_0xea1b52,'shouldWriteEnv':!!_0x2bcb42,'accessKey':_0x49ce9b[_0x377f99(0x119)]});return{'ok':!![],'data':{'configPath':_0x4d076c,'app':_0x25cb7d||null,'appcode':_0x4bf1fd,'env':_0x2bcb42?_0xea1b52:null,'accessKeyWritten':![],'command':_0x377f99(0x145)+_0x365bbe},'message':buildWorkspaceMessage(_0x4d076c,_0x25cb7d,_0x4bf1fd,_0x2bcb42?_0xea1b52:undefined)};}async function resolveRemoteAppCode(_0x1ddf01){const _0x876c26=a61_0x730318;if(!_0x1ddf01[_0x876c26(0x119)])throw CliErrors['authRequired'](_0x876c26(0x136)+CLI_BIN_NAME+_0x876c26(0x13e)+_0x1ddf01[_0x876c26(0x118)]+'.');const {setActiveAK:_0x2fe04b}=await import(_0x876c26(0x143)),{getRemoteAppList:_0x1fc216}=await import(_0x876c26(0x122));_0x2fe04b(_0x1ddf01['accessKey']);const _0x4db07f=await _0x1fc216({'env':_0x1ddf01['env'],'accessKey':_0x1ddf01[_0x876c26(0x119)],'noCache':![]}),_0x3b9476=findAppByName(_0x4db07f[_0x876c26(0x130)],_0x1ddf01[_0x876c26(0x13c)]);if(_0x3b9476&&!isRuntimeAccessibleApp(_0x3b9476))throw runtimeInaccessibleAppError(_0x3b9476,'\x22'+_0x1ddf01[_0x876c26(0x13c)]+'\x22');const _0x2b8468=_0x3b9476?.[_0x876c26(0x129)]?.[_0x876c26(0x14b)]();if(_0x2b8468)return _0x2b8468;const _0x515ac4=_0x4db07f['items'][_0x876c26(0x146)](_0x221ee9=>_0x221ee9['appName'])[_0x876c26(0x12b)](Boolean),_0x1b0610=_0x515ac4['length']?_0x876c26(0x12d)+Array[_0x876c26(0x14c)](new Set(_0x515ac4))[_0x876c26(0x140)](',\x20')+'.':_0x876c26(0x125)+CLI_BIN_NAME+_0x876c26(0x111);throw CliErrors[_0x876c26(0x13a)](_0x876c26(0x11e)+_0x1ddf01['appName']+_0x876c26(0x13f),_0x1b0610);}function writeWorkspaceConfig(_0x1cca9c){const _0x5f0a84=a61_0x730318,_0x39b35d=resolveWriteConfigPath('project'),_0x1ab49f=readConfigFile(_0x39b35d);_0x1cca9c[_0x5f0a84(0x147)]&&(_0x1ab49f['env']=_0x1cca9c[_0x5f0a84(0x12f)]);if(_0x1cca9c[_0x5f0a84(0x13c)]){const _0x467659=isRecord(_0x1ab49f[_0x5f0a84(0x123)])?{..._0x1ab49f[_0x5f0a84(0x123)]}:{},_0x278681=isRecord(_0x467659[_0x1cca9c['appName']])?_0x467659[_0x1cca9c[_0x5f0a84(0x13c)]]:{};_0x467659[_0x1cca9c['appName']]={..._0x278681,'appcode':_0x1cca9c[_0x5f0a84(0x112)]},_0x1ab49f[_0x5f0a84(0x123)]=_0x467659,_0x1ab49f[_0x5f0a84(0x116)]=_0x1cca9c[_0x5f0a84(0x13c)];if(_0x1ab49f[_0x5f0a84(0x138)])delete _0x1ab49f[_0x5f0a84(0x138)];return writeAndReturn(_0x39b35d,_0x1ab49f);}_0x1ab49f['appcode']=_0x1cca9c[_0x5f0a84(0x112)];if(_0x1ab49f[_0x5f0a84(0x138)])delete _0x1ab49f['app'];return writeAndReturn(_0x39b35d,_0x1ab49f);}function writeAndReturn(_0x2caf3c,_0x2c9b6b){return writeConfigFile(_0x2caf3c,_0x2c9b6b),_0x2caf3c;}function a61_0x3b27(_0x316ff0,_0x2dd468){_0x316ff0=_0x316ff0-0x111;const _0x24e35f=a61_0x24e3();let _0x3b270c=_0x24e35f[_0x316ff0];return _0x3b270c;}function resolveWorkspaceEnv(_0x199e93){const _0x4ae1c2=a61_0x730318;if(RUNTIME_ENV_VALUES[_0x4ae1c2(0x142)](_0x199e93))return _0x199e93;throw CliErrors['validation']('Invalid\x20env\x20\x22'+_0x199e93+'\x22.\x20Allowed:\x20'+RUNTIME_ENV_VALUES['join'](',\x20'));}function buildWorkspaceMessage(_0x232416,_0x4df57a,_0x216919,_0x373dea){const _0x1e3c32=a61_0x730318,_0x3923d8=_0x4df57a?_0x4df57a+'\x20('+_0x216919+')':_0x216919,_0x5a5c02=_0x373dea?_0x1e3c32(0x121)+_0x373dea:'';return'Workspace\x20configured.\x0aConfig\x20file:\x20'+_0x232416+_0x1e3c32(0x12a)+_0x3923d8+_0x5a5c02+'\x0aAccessKey:\x20not\x20written';}function isRecord(_0x529a71){const _0x5afb48=a61_0x730318;return typeof _0x529a71===_0x5afb48(0x148)&&_0x529a71!==null&&!Array[_0x5afb48(0x128)](_0x529a71);}function makeWorkspaceCommand(_0x54336c){const _0x6be356=a61_0x730318;return{'service':_0x6be356(0x149),'command':_0x54336c,'description':_0x54336c===_0x6be356(0x114)?_0x6be356(0x139):_0x6be356(0x13d),'risk':_0x6be356(0x11d),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':WORKSPACE_USE_FLAGS,async 'execute'(_0x38514a){return executeWorkspaceUse(_0x38514a,_0x54336c);}};}export const workspaceDefinitions=[makeWorkspaceCommand(a61_0x730318(0x114)),makeWorkspaceCommand(a61_0x730318(0x11f))];
|
package/lib/config/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a62_0x360dcd=a62_0x591d;(function(_0x3295b3,_0x52944a){const _0x51dda9=a62_0x591d,_0x4487e8=_0x3295b3();while(!![]){try{const _0xbb134e=parseInt(_0x51dda9(0xfe))/0x1+parseInt(_0x51dda9(0xeb))/0x2+-parseInt(_0x51dda9(0xfd))/0x3*(-parseInt(_0x51dda9(0xf5))/0x4)+-parseInt(_0x51dda9(0xff))/0x5+-parseInt(_0x51dda9(0xee))/0x6+parseInt(_0x51dda9(0xed))/0x7+-parseInt(_0x51dda9(0xf0))/0x8;if(_0xbb134e===_0x52944a)break;else _0x4487e8['push'](_0x4487e8['shift']());}catch(_0x1f0ff9){_0x4487e8['push'](_0x4487e8['shift']());}}}(a62_0xcd71,0xcf02e));function a62_0xcd71(){const _0xf133b6=['5170764khjhLY','Override\x20runtime\x20domain','Override\x20user\x20domain','has','format',';\x20local\x20alias:\x20apps.<alias>.appcode','Risk\x20level','env','3naKKCH','1461538jmxKsV','7516955cDOPgq','map','importable','locale','defaultValue','riskLevel','filter','1553076KMuKcV','enumValues','4135775jDBOmv','9667032uXoMco','Default\x20page\x20size','1272888ewfOqD','entries','legacyCompatOnly','Access\x20key\x20(client-ak\x20auth)','Config\x20key.\x20Top-level:\x20'];a62_0xcd71=function(){return _0xf133b6;};return a62_0xcd71();}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 a62_0x591d(_0x15cac1,_0x5941b9){_0x15cac1=_0x15cac1-0xe8;const _0xcd712c=a62_0xcd71();let _0x591d53=_0xcd712c[_0x15cac1];return _0x591d53;}export const CONFIG_FIELD_SCHEMAS={'env':{'description':'Target\x20environment','topLevel':!![],'cliSettableTopLevel':!![],'enumValues':RUNTIME_ENV_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a62_0x360dcd(0xfc)],'importable':!![]},'format':{'description':'Default\x20output\x20format','topLevel':!![],'cliSettableTopLevel':!![],'enumValues':OUTPUT_FORMAT_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a62_0x360dcd(0xf9)],'importable':!![]},'pageSize':{'description':a62_0x360dcd(0xef),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'apiDomain':{'description':'Override\x20API\x20domain','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'userDomain':{'description':a62_0x360dcd(0xf7),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'runtimeDomain':{'description':a62_0x360dcd(0xf6),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'skillHubDomain':{'description':'Override\x20SkillHub\x20domain','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'accessKey':{'description':a62_0x360dcd(0xf3),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'riskLevel':{'description':a62_0x360dcd(0xfb),'topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a62_0x360dcd(0xe9)],'importable':!![]},'locale':{'description':'Locale','topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a62_0x360dcd(0x102)],'importable':!![],'legacyCompatOnly':!![]}};export const TOP_LEVEL_CONFIG_KEYS=new Set(Object[a62_0x360dcd(0xf1)](CONFIG_FIELD_SCHEMAS)[a62_0x360dcd(0xea)](([,_0x7d3d0d])=>_0x7d3d0d['cliSettableTopLevel'])['map'](([_0x59845a])=>_0x59845a));export const CONFIG_ENUM_VALUES=Object['fromEntries'](Object[a62_0x360dcd(0xf1)](CONFIG_FIELD_SCHEMAS)['filter'](([,_0x430b24])=>_0x430b24[a62_0x360dcd(0xec)])[a62_0x360dcd(0x100)](([_0x9ec6ef,_0x203e29])=>[_0x9ec6ef,[..._0x203e29[a62_0x360dcd(0xec)]||[]]]));export const IMPORTABLE_RUNTIME_CONFIG_KEYS=Object[a62_0x360dcd(0xf1)](CONFIG_FIELD_SCHEMAS)['filter'](([,_0x28b8e3])=>_0x28b8e3[a62_0x360dcd(0x101)])[a62_0x360dcd(0x100)](([_0x173481])=>_0x173481);export function getConfigFieldSchema(_0x23cb4d){return CONFIG_FIELD_SCHEMAS[_0x23cb4d];}export function getConfigEnumValues(_0x41e800){return getConfigFieldSchema(_0x41e800)?.['enumValues'];}export function getConfigDefaultValue(_0x4a30c2){const _0x4508e6=a62_0x360dcd;return getConfigFieldSchema(_0x4a30c2)?.[_0x4508e6(0xe8)];}export function isTopLevelConfigKey(_0x4e7b22){const _0x3c5067=a62_0x360dcd;return TOP_LEVEL_CONFIG_KEYS[_0x3c5067(0xf8)](_0x4e7b22);}export function isLegacyCompatConfigKey(_0x2960db){const _0x35e08f=a62_0x360dcd;return getConfigFieldSchema(_0x2960db)?.[_0x35e08f(0xf2)]===!![];}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function formatConfigKeyList(_0x8275d8){return[..._0x8275d8]['join'](',\x20');}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x7f2b19=a62_0x360dcd;return _0x7f2b19(0xf4)+getTopLevelConfigKeySummary()+_0x7f2b19(0xfa);}export function buildAppProfileListFields(_0x4635fc){return{'env':_0x4635fc,'hasAccessKey':![],'format':null,'pageSize':null,'riskLevel':null,'locale':null};}
|
package/lib/constant/app.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a63_0x28a46f=a63_0x3618;(function(_0x35edff,_0x409b95){const _0x34ade1=a63_0x3618,_0x2223b9=_0x35edff();while(!![]){try{const _0xf1ec55=parseInt(_0x34ade1(0x1fd))/0x1+parseInt(_0x34ade1(0x1fc))/0x2*(-parseInt(_0x34ade1(0x1f7))/0x3)+-parseInt(_0x34ade1(0x1f9))/0x4+-parseInt(_0x34ade1(0x1fa))/0x5+parseInt(_0x34ade1(0x1f3))/0x6+-parseInt(_0x34ade1(0x1fb))/0x7*(parseInt(_0x34ade1(0x1f6))/0x8)+-parseInt(_0x34ade1(0x1f8))/0x9*(-parseInt(_0x34ade1(0x1f5))/0xa);if(_0xf1ec55===_0x409b95)break;else _0x2223b9['push'](_0x2223b9['shift']());}catch(_0x364d8b){_0x2223b9['push'](_0x2223b9['shift']());}}}(a63_0x3e03,0x62f0a));export const APP_PUBLISH_STATUS={'Published':'PUBLISHED','Unpublished':'UNPUBLISH'};function a63_0x3e03(){const _0x47a693=['2EBCEgm','531671DnRstA','2389212YxNpRM','Published','360MQrbiC','8GZlwNd','1790481SMAApK','319077Vjnojt','948628sWSCtc','2621830BpQmCr','3098011ZugEaw'];a63_0x3e03=function(){return _0x47a693;};return a63_0x3e03();}function a63_0x3618(_0x231328,_0x2f072a){_0x231328=_0x231328-0x1f3;const _0x3e035d=a63_0x3e03();let _0x3618b8=_0x3e035d[_0x231328];return _0x3618b8;}export const RUNTIME_ACCESSIBLE_APP_STATUS=APP_PUBLISH_STATUS[a63_0x28a46f(0x1f4)];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x34eee9,_0x217b5d){const _0x355415=a64_0x32c7,_0x30bfba=_0x34eee9();while(!![]){try{const _0x3e767c=parseInt(_0x355415(0x76))/0x1+-parseInt(_0x355415(0x72))/0x2*(parseInt(_0x355415(0x74))/0x3)+-parseInt(_0x355415(0x70))/0x4+parseInt(_0x355415(0x75))/0x5+parseInt(_0x355415(0x71))/0x6+-parseInt(_0x355415(0x77))/0x7*(-parseInt(_0x355415(0x6e))/0x8)+-parseInt(_0x355415(0x6f))/0x9;if(_0x3e767c===_0x217b5d)break;else _0x30bfba['push'](_0x30bfba['shift']());}catch(_0x1b61f5){_0x30bfba['push'](_0x30bfba['shift']());}}}(a64_0x5536,0x509e6));export const AUTH_MODE={'ClientAk':'client-ak'};function a64_0x5536(){const _0x378a82=['8vcEHeT','5722533lXmzOz','1067652AzOQMB','3578304SXksOW','367224RerriV','ClientAk','3tjlqgL','1492120weCyWi','484194kzMeGy','263018zFwKlz'];a64_0x5536=function(){return _0x378a82;};return a64_0x5536();}function a64_0x32c7(_0x505bbb,_0x29a5e0){_0x505bbb=_0x505bbb-0x6e;const _0x553629=a64_0x5536();let _0x32c7c2=_0x553629[_0x505bbb];return _0x32c7c2;}export function isAuthMode(_0x10458a){const _0x357a13=a64_0x32c7;return _0x10458a===AUTH_MODE[_0x357a13(0x73)];}
|
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a65_0x15573a=a65_0x3075;(function(_0x22cfc8,_0x37ca60){const _0x165224=a65_0x3075,_0x3f8bec=_0x22cfc8();while(!![]){try{const _0x991e61=-parseInt(_0x165224(0x1df))/0x1+-parseInt(_0x165224(0x1de))/0x2*(parseInt(_0x165224(0x1dc))/0x3)+parseInt(_0x165224(0x1e5))/0x4+-parseInt(_0x165224(0x1c8))/0x5+-parseInt(_0x165224(0x1d6))/0x6+-parseInt(_0x165224(0x1c0))/0x7+parseInt(_0x165224(0x1bb))/0x8;if(_0x991e61===_0x37ca60)break;else _0x3f8bec['push'](_0x3f8bec['shift']());}catch(_0x3dd5af){_0x3f8bec['push'](_0x3f8bec['shift']());}}}(a65_0x37f6,0xb4bb7));import{PRODUCT_CONFIG}from'../constant/product.js';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';function a65_0x3075(_0x1eb20a,_0x2370d7){_0x1eb20a=_0x1eb20a-0x1bb;const _0x37f695=a65_0x37f6();let _0x3075c2=_0x37f695[_0x1eb20a];return _0x3075c2;}export const CLI_BIN_NAME=PRODUCT_CONFIG[a65_0x15573a(0x1c5)];export const CLI_DISPLAY_NAME=PRODUCT_CONFIG[a65_0x15573a(0x1e1)];export const NPM_PACKAGE_NAME=LOVRABET_NPM_PACKAGE_NAME;export const GLOBAL_FLAGS=[{'name':a65_0x15573a(0x1cf),'meowKey':a65_0x15573a(0x1cf),'type':a65_0x15573a(0x1e8),'description':a65_0x15573a(0x1dd),'hint':'<code>'},{'name':a65_0x15573a(0x1db),'meowKey':a65_0x15573a(0x1db),'type':a65_0x15573a(0x1e8),'description':a65_0x15573a(0x1e3),'hint':'<name>'},{'name':a65_0x15573a(0x1e6),'meowKey':a65_0x15573a(0x1e6),'type':a65_0x15573a(0x1e8),'description':'Environment','hint':'production\x20|\x20development\x20|\x20daily'},{'name':'format','meowKey':'format','type':'string','description':a65_0x15573a(0x1d7),'hint':a65_0x15573a(0x1d3)},{'name':'jq','meowKey':'jq','type':a65_0x15573a(0x1e8),'description':a65_0x15573a(0x1ce),'hint':a65_0x15573a(0x1cd)},{'name':a65_0x15573a(0x1d5),'meowKey':a65_0x15573a(0x1d8),'type':a65_0x15573a(0x1c3),'description':a65_0x15573a(0x1da)},{'name':'yes','meowKey':'yes','type':a65_0x15573a(0x1c3),'description':a65_0x15573a(0x1c6)},{'name':a65_0x15573a(0x1cb),'meowKey':a65_0x15573a(0x1e0),'type':a65_0x15573a(0x1c3),'description':a65_0x15573a(0x1d2)},{'name':a65_0x15573a(0x1ca),'meowKey':a65_0x15573a(0x1ca),'type':a65_0x15573a(0x1c3),'description':a65_0x15573a(0x1bf)},{'name':'ci','meowKey':'ci','type':a65_0x15573a(0x1c3),'description':a65_0x15573a(0x1e4),'hidden':!![]},{'name':a65_0x15573a(0x1cc),'meowKey':a65_0x15573a(0x1cc),'type':'boolean','description':a65_0x15573a(0x1bc)},{'name':'id','meowKey':'id','type':'string','description':a65_0x15573a(0x1d9),'hidden':!![]},{'name':a65_0x15573a(0x1e2),'meowKey':a65_0x15573a(0x1e2),'type':a65_0x15573a(0x1e8),'description':a65_0x15573a(0x1c4),'hidden':!![]},{'name':a65_0x15573a(0x1e7),'meowKey':'sqlcode','type':a65_0x15573a(0x1e8),'description':a65_0x15573a(0x1be),'hidden':!![]},{'name':'params','meowKey':a65_0x15573a(0x1e9),'type':a65_0x15573a(0x1e8),'description':'JSON\x20params\x20for\x20execute\x20commands','hidden':!![]},{'name':a65_0x15573a(0x1d1),'meowKey':a65_0x15573a(0x1d1),'type':a65_0x15573a(0x1c3),'description':'Verbose\x20output','hidden':!![]},{'name':'clear','meowKey':a65_0x15573a(0x1c2),'type':'boolean','description':a65_0x15573a(0x1c7),'hidden':!![]}];function a65_0x37f6(){const _0x27df6b=['global','non-interactive','help','<expr>','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20implies\x20--format\x20json\x20when\x20current\x20format\x20is\x20pretty)','appcode','map','verbose','Force\x20non-interactive\x20mode\x20(CI)','json\x20|\x20pretty\x20|\x20compress','type','dry-run','3334368utQWbZ','Output\x20format','dryRun','Record\x20ID','Preview\x20operation\x20without\x20executing','app','6MLrQAp','Override\x20appcode','1240258NFMvQV','557413JUXcut','nonInteractive','cliDisplayName','name','Select\x20app\x20profile\x20by\x20name','Alias\x20for\x20--non-interactive','715836OeEmYq','env','sqlcode','string','params','fromEntries','33890376FygPNw','Show\x20help','meowKey','SQL\x20query\x20code','Use\x20global\x20config\x20scope','4383127bEWQGQ','format','clear','boolean','Name\x20filter','cliBinName','Skip\x20confirmation\x20for\x20high-risk\x20writes','Clear\x20output','3477085wnMlnx','yes'];a65_0x37f6=function(){return _0x27df6b;};return a65_0x37f6();}export const PIPELINE_FLAG_NAMES=new Set([a65_0x15573a(0x1cf),a65_0x15573a(0x1db),a65_0x15573a(0x1e6),a65_0x15573a(0x1c1),'jq','dry-run',a65_0x15573a(0x1c9),a65_0x15573a(0x1cb),'ci']);export function buildMeowFlags(){const _0x52cead=a65_0x15573a;return Object[_0x52cead(0x1ea)](GLOBAL_FLAGS[_0x52cead(0x1d0)](_0x2a633f=>[_0x2a633f[_0x52cead(0x1bd)],{'type':_0x2a633f[_0x52cead(0x1d4)]}]));}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a66_0x493f72=a66_0x1ccb;function a66_0x589e(){const _0x3bcc4d=['5857056kCQvwW','1755708hyZizh','4OQHRLB','361164KZISLT','870ObmeRX','343681VuuFmv','en-US','2146344debDjn','21ORPcYz','11GZdIFv','production','write','30270wsUUWs','main','compress','13220320BWmnXx'];a66_0x589e=function(){return _0x3bcc4d;};return a66_0x589e();}function a66_0x1ccb(_0x2a5c81,_0x14a9a0){_0x2a5c81=_0x2a5c81-0x168;const _0x589e6a=a66_0x589e();let _0x1ccb28=_0x589e6a[_0x2a5c81];return _0x1ccb28;}(function(_0x1e132b,_0x5c0700){const _0x2970ca=a66_0x1ccb,_0x125088=_0x1e132b();while(!![]){try{const _0x46029f=-parseInt(_0x2970ca(0x171))/0x1+-parseInt(_0x2970ca(0x16e))/0x2*(-parseInt(_0x2970ca(0x16f))/0x3)+parseInt(_0x2970ca(0x16d))/0x4+parseInt(_0x2970ca(0x170))/0x5*(-parseInt(_0x2970ca(0x168))/0x6)+parseInt(_0x2970ca(0x174))/0x7*(-parseInt(_0x2970ca(0x173))/0x8)+parseInt(_0x2970ca(0x16c))/0x9+-parseInt(_0x2970ca(0x16b))/0xa*(-parseInt(_0x2970ca(0x175))/0xb);if(_0x46029f===_0x5c0700)break;else _0x125088['push'](_0x125088['shift']());}catch(_0x93029c){_0x125088['push'](_0x125088['shift']());}}}(a66_0x589e,0x98dd1));export const DEFAULT_APP_PROFILE_NAME=a66_0x493f72(0x169);export const DEFAULT_CONFIG_VALUES={'env':a66_0x493f72(0x176),'format':a66_0x493f72(0x16a),'locale':a66_0x493f72(0x172),'riskLevel':a66_0x493f72(0x177)};export const DEFAULT_COMMAND_OUTPUT_FORMAT=a66_0x493f72(0x16a);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a67_0x149821=a67_0xb1cf;(function(_0x3ff126,_0x27fa4f){const _0x2f5bd2=a67_0xb1cf,_0x482b7d=_0x3ff126();while(!![]){try{const _0x34e624=parseInt(_0x2f5bd2(0x1f6))/0x1*(-parseInt(_0x2f5bd2(0x1f9))/0x2)+parseInt(_0x2f5bd2(0x1fe))/0x3*(-parseInt(_0x2f5bd2(0x1f7))/0x4)+-parseInt(_0x2f5bd2(0x1f4))/0x5*(parseInt(_0x2f5bd2(0x1ff))/0x6)+parseInt(_0x2f5bd2(0x1fb))/0x7*(parseInt(_0x2f5bd2(0x1fa))/0x8)+parseInt(_0x2f5bd2(0x1f8))/0x9+-parseInt(_0x2f5bd2(0x1f3))/0xa*(parseInt(_0x2f5bd2(0x1fd))/0xb)+parseInt(_0x2f5bd2(0x1f5))/0xc*(parseInt(_0x2f5bd2(0x1f1))/0xd);if(_0x34e624===_0x27fa4f)break;else _0x482b7d['push'](_0x482b7d['shift']());}catch(_0x1d3420){_0x482b7d['push'](_0x482b7d['shift']());}}}(a67_0x44c0,0x6901c));function a67_0x44c0(){const _0x21248e=['5645fkquhS','20309964cVuKUJ','257294XjppKP','51556zTaCpy','780705YGkMKB','2esPGTs','2955568zxDmTw','7rstfnT','npmPackageName','38511DXHtuR','153EQBVTE','2598EssexF','13QVfdzU','skillSource','900ZEUmut'];a67_0x44c0=function(){return _0x21248e;};return a67_0x44c0();}function a67_0xb1cf(_0xaf31ae,_0x1e7dfb){_0xaf31ae=_0xaf31ae-0x1f1;const _0x44c0f1=a67_0x44c0();let _0xb1cf38=_0x44c0f1[_0xaf31ae];return _0xb1cf38;}import{PRODUCT_CONFIG}from'../constant/product.js';export const LOVRABET_NPM_PACKAGE_NAME=PRODUCT_CONFIG[a67_0x149821(0x1fc)];export const LOVRABET_SKILL_SOURCE=PRODUCT_CONFIG[a67_0x149821(0x1f2)];export const NPM_REGISTRY_BASE_URL=PRODUCT_CONFIG['npmRegistryBaseUrl'];
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a68_0xa21877=a68_0x2d96;(function(_0x35dbe6,_0x56df03){const _0x50820f=a68_0x2d96,_0x187b16=_0x35dbe6();while(!![]){try{const _0x13d26b=parseInt(_0x50820f(0x77))/0x1+parseInt(_0x50820f(0x82))/0x2+-parseInt(_0x50820f(0x89))/0x3+-parseInt(_0x50820f(0x7b))/0x4*(-parseInt(_0x50820f(0x78))/0x5)+-parseInt(_0x50820f(0x85))/0x6*(parseInt(_0x50820f(0x87))/0x7)+parseInt(_0x50820f(0x79))/0x8*(parseInt(_0x50820f(0x7f))/0x9)+-parseInt(_0x50820f(0x7d))/0xa*(parseInt(_0x50820f(0x7a))/0xb);if(_0x13d26b===_0x56df03)break;else _0x187b16['push'](_0x187b16['shift']());}catch(_0x4ce685){_0x187b16['push'](_0x187b16['shift']());}}}(a68_0x14cf,0x4b1d3));import{getEnv,isProduction}from'../constant/env.js';import{PRODUCT_CONFIG}from'../constant/product.js';let customApiDomain,customUserDomain,customRuntimeDomain,customSkillHubDomain;function a68_0x14cf(){const _0x2d203e=['production','4329VCxBvk','apiDomain','api','540490YykCYi','runtimeDomain','userDomain','6EvKQts','nonProduction','806365FLPpfb','user','355674uoagDd','runtime','skillhub','390774DDCPTj','15AcgCVW','8096ZjpCBD','37147pElLEt','263140rwWprv','domains','2380gHIJhW'];a68_0x14cf=function(){return _0x2d203e;};return a68_0x14cf();}function a68_0x2d96(_0x20805a,_0x3f0851){_0x20805a=_0x20805a-0x77;const _0x14cffd=a68_0x14cf();let _0x2d9667=_0x14cffd[_0x20805a];return _0x2d9667;}export function initDomains(_0x30af68){const _0x29cb2c=a68_0x2d96;customApiDomain=_0x30af68?.[_0x29cb2c(0x80)],customUserDomain=_0x30af68?.[_0x29cb2c(0x84)],customRuntimeDomain=_0x30af68?.[_0x29cb2c(0x83)],customSkillHubDomain=_0x30af68?.['skillHubDomain'];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a68_0xa21877(0x7c)][a68_0xa21877(0x7e)][a68_0xa21877(0x88)]:PRODUCT_CONFIG['domains'][a68_0xa21877(0x86)][a68_0xa21877(0x88)]);export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?PRODUCT_CONFIG['domains'][a68_0xa21877(0x7e)][a68_0xa21877(0x81)]:PRODUCT_CONFIG[a68_0xa21877(0x7c)][a68_0xa21877(0x86)]['api']);export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a68_0xa21877(0x7c)]['production'][a68_0xa21877(0x8a)]:PRODUCT_CONFIG['domains']['nonProduction'][a68_0xa21877(0x8a)]);export const getSkillHubDomain=()=>customSkillHubDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a68_0xa21877(0x7c)][a68_0xa21877(0x7e)]['skillhub']:PRODUCT_CONFIG[a68_0xa21877(0x7c)][a68_0xa21877(0x86)][a68_0xa21877(0x8b)]);
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a69_0x23ab(_0x264f62,_0x1d35ca){_0x264f62=_0x264f62-0x1d9;const _0x50a132=a69_0x50a1();let _0x23abb2=_0x50a132[_0x264f62];return _0x23abb2;}const a69_0x116b2e=a69_0x23ab;(function(_0x1d8333,_0x4d7373){const _0x368085=a69_0x23ab,_0x2a7a93=_0x1d8333();while(!![]){try{const _0x1c418c=-parseInt(_0x368085(0x1db))/0x1*(-parseInt(_0x368085(0x1de))/0x2)+parseInt(_0x368085(0x1e3))/0x3+parseInt(_0x368085(0x1e9))/0x4*(parseInt(_0x368085(0x1da))/0x5)+parseInt(_0x368085(0x1e8))/0x6+-parseInt(_0x368085(0x1e0))/0x7*(parseInt(_0x368085(0x1dd))/0x8)+parseInt(_0x368085(0x1e6))/0x9+-parseInt(_0x368085(0x1e1))/0xa*(parseInt(_0x368085(0x1e2))/0xb);if(_0x1c418c===_0x4d7373)break;else _0x2a7a93['push'](_0x2a7a93['shift']());}catch(_0x2b3219){_0x2a7a93['push'](_0x2a7a93['shift']());}}}(a69_0x50a1,0x81a39));import{productEnv}from'../constant/product.js';export const RUNTIME_ENV_VALUES=['production',a69_0x116b2e(0x1dc),a69_0x116b2e(0x1d9)];export function normalizeEnv(_0x1dbd21){const _0x4d11a8=a69_0x116b2e;return _0x1dbd21===_0x4d11a8(0x1e5)?_0x4d11a8(0x1df):_0x1dbd21;}export function isProduction(_0x211ab0){return normalizeEnv(_0x211ab0)==='production';}export function isDaily(_0x2ba69f){const _0x146a3a=a69_0x116b2e;return normalizeEnv(_0x2ba69f)===_0x146a3a(0x1d9);}function a69_0x50a1(){const _0x1d0675=['6590904NPAziH','40YvriXh','production','7SQATsp','31700DGXptA','4906MFinRX','466668dKpxLu','ENV','online','9423189nbiGIB','dev','3456042bTUInh','1220GgNjDG','daily','14540XjypRy','5158dsqpGA','development'];a69_0x50a1=function(){return _0x1d0675;};return a69_0x50a1();}export function isDev(_0x5430b7){const _0x1e3bee=a69_0x116b2e,_0x5369ed=normalizeEnv(_0x5430b7);return _0x5369ed==='development'||_0x5369ed===_0x1e3bee(0x1e7);}let env=normalizeEnv(productEnv(a69_0x116b2e(0x1e4))||a69_0x116b2e(0x1df));export function getEnv(){return env;}export function initEnv(_0x3db70b){env=normalizeEnv(_0x3db70b);}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a70_0x58453f=a70_0x2a0c;function a70_0x2a0c(_0x109bb1,_0x4cae03){_0x109bb1=_0x109bb1-0x1de;const _0x21f735=a70_0x21f7();let _0x2a0c09=_0x21f735[_0x109bb1];return _0x2a0c09;}(function(_0x1f8418,_0x47d538){const _0x58e221=a70_0x2a0c,_0x290309=_0x1f8418();while(!![]){try{const _0x568640=parseInt(_0x58e221(0x1e4))/0x1+parseInt(_0x58e221(0x1e0))/0x2*(-parseInt(_0x58e221(0x1e3))/0x3)+parseInt(_0x58e221(0x1df))/0x4*(-parseInt(_0x58e221(0x1e5))/0x5)+-parseInt(_0x58e221(0x1ea))/0x6*(-parseInt(_0x58e221(0x1e8))/0x7)+-parseInt(_0x58e221(0x1e7))/0x8*(-parseInt(_0x58e221(0x1de))/0x9)+-parseInt(_0x58e221(0x1e6))/0xa+parseInt(_0x58e221(0x1e1))/0xb*(parseInt(_0x58e221(0x1e2))/0xc);if(_0x568640===_0x47d538)break;else _0x290309['push'](_0x290309['shift']());}catch(_0x411841){_0x290309['push'](_0x290309['shift']());}}}(a70_0x21f7,0x6a13a));function a70_0x21f7(){const _0x3845d1=['121ExvIym','277944RKbyLt','138jJNCMY','808881bviLOR','194220UivtfE','520680ofkpAc','840IKGWKd','1930509BSWlff','json','12UDoKcf','pretty','compress','9873GsTBOK','60GoGyvw','28748bttkhz'];a70_0x21f7=function(){return _0x3845d1;};return a70_0x21f7();}export const OUTPUT_FORMAT_VALUES=[a70_0x58453f(0x1e9),a70_0x58453f(0x1eb),a70_0x58453f(0x1ec)];
|
package/lib/constant/product.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a71_0x49f1ca=a71_0xebcd;(function(_0x5aca08,_0x40c6e3){const _0x24424d=a71_0xebcd,_0x4e66e1=_0x5aca08();while(!![]){try{const _0x51ca3a=-parseInt(_0x24424d(0x6e))/0x1*(parseInt(_0x24424d(0x6b))/0x2)+-parseInt(_0x24424d(0x7c))/0x3+-parseInt(_0x24424d(0x76))/0x4+-parseInt(_0x24424d(0x83))/0x5+-parseInt(_0x24424d(0x6f))/0x6*(-parseInt(_0x24424d(0x84))/0x7)+-parseInt(_0x24424d(0x73))/0x8+parseInt(_0x24424d(0x86))/0x9*(parseInt(_0x24424d(0x81))/0xa);if(_0x51ca3a===_0x40c6e3)break;else _0x4e66e1['push'](_0x4e66e1['shift']());}catch(_0x466d3c){_0x4e66e1['push'](_0x4e66e1['shift']());}}}(a71_0x5096,0xdc8c0));export const PRODUCT_CONFIG={'cliBinName':'lovrabet','cliDisplayName':'Lovrabet\x20Runtime\x20CLI','npmPackageName':a71_0x49f1ca(0x80),'skillSource':a71_0x49f1ca(0x7e),'npmRegistryBaseUrl':a71_0x49f1ca(0x70),'envPrefix':a71_0x49f1ca(0x7a),'legacyEnvPrefixes':[a71_0x49f1ca(0x82)],'configFileNames':[a71_0x49f1ca(0x74),a71_0x49f1ca(0x7f)],'newConfigFileName':a71_0x49f1ca(0x74),'homeDirName':a71_0x49f1ca(0x71),'logFileName':a71_0x49f1ca(0x6c),'invokeSource':a71_0x49f1ca(0x7b),'userCenterDisplayName':a71_0x49f1ca(0x72),'skipNpxSkillsEnvSuffix':a71_0x49f1ca(0x6d),'domains':{'production':{'user':a71_0x49f1ca(0x85),'api':'https://api.lovrabet.com','runtime':a71_0x49f1ca(0x75),'skillhub':a71_0x49f1ca(0x78)},'nonProduction':{'user':'https://user-daily.lovrabet.com','api':a71_0x49f1ca(0x79),'runtime':'https://daily-runtime.lovrabet.com','skillhub':'https://skills-daily.lovrabet.com'}},'accessKeyCreatePath':a71_0x49f1ca(0x77)};export function productEnvName(_0x2b7d3e){const _0x40aa09=a71_0x49f1ca;return PRODUCT_CONFIG[_0x40aa09(0x7d)]+'_'+_0x2b7d3e;}export function productEnvNames(_0x5f0834){const _0x3dcd7b=a71_0x49f1ca;return[productEnvName(_0x5f0834),...PRODUCT_CONFIG[_0x3dcd7b(0x87)]['map'](_0x172afe=>_0x172afe+'_'+_0x5f0834)];}function a71_0xebcd(_0x2abb12,_0x659b1){_0x2abb12=_0x2abb12-0x6b;const _0x5096cb=a71_0x5096();let _0xebcd23=_0x5096cb[_0x2abb12];return _0xebcd23;}export function productEnv(_0x3a1d18){for(const _0x1bde4d of productEnvNames(_0x3a1d18)){const _0x3fecac=process.env[_0x1bde4d];if(_0x3fecac!==undefined)return _0x3fecac;}return undefined;}function a71_0x5096(){const _0x55a8c3=['envPrefix','lovrabet/lovrabet-cli','.lovrabetrc','@lovrabet/lovrabet-cli','580ZVXqrU','RABETBASE','8445920jSdyno','28sjqLaj','https://user.lovrabet.com','934830RGbcxi','legacyEnvPrefixes','1279448gcwEzy','.lovrabet-runtime.log','SKIP_NPX_SKILLS','1OTvVxN','543216wZGIdR','https://registry.npmjs.org','.lovrabet','Lovrabet\x20User\x20Center','12389544LRZzVi','.lovrabet.json','https://runtime.lovrabet.com','5080320zHewza','/user/ak','https://skills.lovrabet.com','https://daily-api.lovrabet.com','LOVRABET','cli:lovrabet-runtime','1006689OfAcZD'];a71_0x5096=function(){return _0x55a8c3;};return a71_0x5096();}
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a72_0x4521(){const _0x4bdbc0=['6850704aTyqpx','9899192BEHfGD','387ANrEYt','894oUaqgt','read','724119JIajPE','5005675nTvzyq','239790emIxEL','4054UARKTm','high-risk-write','4861430QcaIVL','4LBCVXH'];a72_0x4521=function(){return _0x4bdbc0;};return a72_0x4521();}function a72_0x426f(_0xfc9d51,_0x71ae0){_0xfc9d51=_0xfc9d51-0x8f;const _0x4521f2=a72_0x4521();let _0x426fb3=_0x4521f2[_0xfc9d51];return _0x426fb3;}const a72_0x1c912d=a72_0x426f;(function(_0x2463f4,_0x4527fb){const _0x489ce9=a72_0x426f,_0x507a66=_0x2463f4();while(!![]){try{const _0x1a03bf=-parseInt(_0x489ce9(0x99))/0x1+-parseInt(_0x489ce9(0x90))/0x2*(-parseInt(_0x489ce9(0x97))/0x3)+-parseInt(_0x489ce9(0x93))/0x4*(parseInt(_0x489ce9(0x9a))/0x5)+-parseInt(_0x489ce9(0x94))/0x6+parseInt(_0x489ce9(0x92))/0x7+parseInt(_0x489ce9(0x95))/0x8+parseInt(_0x489ce9(0x96))/0x9*(parseInt(_0x489ce9(0x8f))/0xa);if(_0x1a03bf===_0x4527fb)break;else _0x507a66['push'](_0x507a66['shift']());}catch(_0x48a704){_0x507a66['push'](_0x507a66['shift']());}}}(a72_0x4521,0xaae5a));export const RISK_LEVEL_VALUES=[a72_0x1c912d(0x98),'write',a72_0x1c912d(0x91)];
|
package/lib/constant/url.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a73_0x29fc8d=a73_0x28ab;(function(_0x494219,_0x251283){const _0x4fbbe4=a73_0x28ab,_0x2c51c1=_0x494219();while(!![]){try{const _0x2d209a=parseInt(_0x4fbbe4(0x19a))/0x1*(parseInt(_0x4fbbe4(0x199))/0x2)+-parseInt(_0x4fbbe4(0x198))/0x3+parseInt(_0x4fbbe4(0x197))/0x4*(parseInt(_0x4fbbe4(0x191))/0x5)+parseInt(_0x4fbbe4(0x193))/0x6+parseInt(_0x4fbbe4(0x19d))/0x7+-parseInt(_0x4fbbe4(0x19c))/0x8*(-parseInt(_0x4fbbe4(0x195))/0x9)+-parseInt(_0x4fbbe4(0x194))/0xa;if(_0x2d209a===_0x251283)break;else _0x2c51c1['push'](_0x2c51c1['shift']());}catch(_0x5e5083){_0x2c51c1['push'](_0x2c51c1['shift']());}}}(a73_0x4997,0xd02c2));function a73_0x28ab(_0x44b27e,_0xc7a189){_0x44b27e=_0x44b27e-0x191;const _0x499767=a73_0x4997();let _0x28ab40=_0x499767[_0x44b27e];return _0x28ab40;}function a73_0x4997(){const _0x35eba5=['user','8100732eUmUSO','24048850WugBby','18XDBBCb','production','1797064crdlTD','3790740Rfzphb','6qzAkEZ','26718kEBRkL','domains','6456488SYNTWo','4047463oaLkNH','10zGaXRd'];a73_0x4997=function(){return _0x35eba5;};return a73_0x4997();}import{PRODUCT_CONFIG}from'../constant/product.js';export const USER_ACCESS_KEY_CREATE_URL=''+PRODUCT_CONFIG[a73_0x29fc8d(0x19b)][a73_0x29fc8d(0x196)][a73_0x29fc8d(0x192)]+PRODUCT_CONFIG['accessKeyCreatePath'];
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a73_0x28d0f8=a73_0x3d41;(function(_0x2a3b4f,_0x540fa3){const _0x2c9245=a73_0x3d41,_0x547186=_0x2a3b4f();while(!![]){try{const _0x3ff349=-parseInt(_0x2c9245(0x1bf))/0x1+-parseInt(_0x2c9245(0x1d4))/0x2+parseInt(_0x2c9245(0x1e4))/0x3+-parseInt(_0x2c9245(0x1d1))/0x4*(parseInt(_0x2c9245(0x1c2))/0x5)+-parseInt(_0x2c9245(0x1b1))/0x6*(parseInt(_0x2c9245(0x1e9))/0x7)+parseInt(_0x2c9245(0x1e7))/0x8+-parseInt(_0x2c9245(0x1c7))/0x9*(-parseInt(_0x2c9245(0x1d8))/0xa);if(_0x3ff349===_0x540fa3)break;else _0x547186['push'](_0x547186['shift']());}catch(_0x1db23e){_0x547186['push'](_0x547186['shift']());}}}(a73_0x23c9,0xe93c0));import{readFileSync,existsSync,mkdirSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{homedir}from'node:os';import{logger}from'./utils/logger.js';import{CliErrors}from'./errors.js';import{CLI_BIN_NAME}from'./constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvNames}from'./constant/product.js';import{DEFAULT_CONFIG_VALUES}from'./constant/defaults.js';import{normalizeEnv,isDaily,isDev}from'./constant/env.js';import{normalizeLegacyOutputFormat}from'./framework/types.js';import{resolveCachedAppCode}from'./commands/app/cache.js';export{AUTH_MODE,isAuthMode}from'./constant/auth-mode.js';const CONFIG_NAMES=PRODUCT_CONFIG['configFileNames'];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a73_0x28d0f8(0x1bc)];function resolveConfigPath(_0xdc3f0e){for(const _0x3d2ad0 of CONFIG_NAMES){const _0x2d9914=resolve(_0xdc3f0e,_0x3d2ad0);if(existsSync(_0x2d9914))return _0x2d9914;}return undefined;}export function resolveWriteConfigPath(_0x1ac316){const _0x25d01b=a73_0x28d0f8,_0x51e63d=_0x1ac316===_0x25d01b(0x1d0)?process[_0x25d01b(0x1ba)]():homedir(),_0x375259=resolveConfigPath(_0x51e63d);return _0x375259??resolve(_0x51e63d,NEW_CONFIG_NAME);}export function readConfigFile(_0x403bd5){const _0x592d89=a73_0x28d0f8;try{if(existsSync(_0x403bd5)){const _0x2c3683=readFileSync(_0x403bd5,{'encoding':_0x592d89(0x1ea)});if(_0x2c3683){const _0x4e3773=JSON[_0x592d89(0x1e8)](_0x2c3683);return migrateOnlineEnv(_0x403bd5,_0x4e3773),_0x4e3773;}}}catch{}return{};}function migrateOnlineEnv(_0x53efad,_0x882ea7){const _0x345a66=a73_0x28d0f8;let _0x441f60=![];_0x882ea7[_0x345a66(0x1c1)]==='online'&&(_0x882ea7['env']=_0x345a66(0x1cb),_0x441f60=!![]);if(_0x882ea7[_0x345a66(0x1ed)]&&typeof _0x882ea7[_0x345a66(0x1ed)]===_0x345a66(0x1ee))for(const _0xb6fad9 of Object[_0x345a66(0x1c5)](_0x882ea7[_0x345a66(0x1ed)])){_0xb6fad9&&_0xb6fad9[_0x345a66(0x1c1)]==='online'&&(_0xb6fad9[_0x345a66(0x1c1)]=_0x345a66(0x1cb),_0x441f60=!![]);}if(_0x441f60)try{writeConfigFile(_0x53efad,_0x882ea7);}catch{}}export function writeConfigFile(_0x418b35,_0x223a04){const _0x5c0cea=a73_0x28d0f8,_0x15f86c=dirname(_0x418b35);!existsSync(_0x15f86c)&&mkdirSync(_0x15f86c,{'recursive':!![]});const _0x2b344f=_0x418b35+'.tmp';try{writeFileSync(_0x2b344f,JSON[_0x5c0cea(0x1d5)](_0x223a04,null,0x2)+'\x0a',{'encoding':_0x5c0cea(0x1ea),'mode':0x180});try{renameSync(_0x2b344f,_0x418b35);}catch(_0x45cd78){if(_0x45cd78[_0x5c0cea(0x1cc)]==='EPERM'||_0x45cd78['code']===_0x5c0cea(0x1b5)||_0x45cd78[_0x5c0cea(0x1cc)]==='EACCES'){writeFileSync(_0x418b35,JSON[_0x5c0cea(0x1d5)](_0x223a04,null,0x2)+'\x0a',{'encoding':'utf8'});try{unlinkSync(_0x2b344f);}catch{}}else throw _0x45cd78;}}catch(_0x1b1656){try{unlinkSync(_0x2b344f);}catch{}throw _0x1b1656;}}export function isNonInteractiveMode(_0x2c3a22){const _0xa5c983=a73_0x28d0f8;return!!(_0x2c3a22[_0xa5c983(0x1e3)]||_0x2c3a22['ci']||productEnvNames('CI')[_0xa5c983(0x1d9)](_0x2a4d79=>process.env[_0x2a4d79]===_0xa5c983(0x1c4))||process.env.CI===_0xa5c983(0x1c4)||!process[_0xa5c983(0x1bd)][_0xa5c983(0x1c8)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x27a3e9=a73_0x28d0f8;if(!process[_0x27a3e9(0x1eb)][_0x27a3e9(0x1c8)])return![];try{const _0xf6ea14=process[_0x27a3e9(0x1eb)][_0x27a3e9(0x1e5)];return process[_0x27a3e9(0x1eb)]['setRawMode'](!![]),process[_0x27a3e9(0x1eb)]['setRawMode'](_0xf6ea14??![]),!![];}catch{return![];}}export async function createContext(_0xdd6d04){const _0x54f1ee=a73_0x28d0f8,_0x10e7a0=readRawConfig(),_0x3c8655=buildConfig(_0x10e7a0,_0xdd6d04);await initGlobalEnvironment(_0x3c8655);const {getUserDomain:_0x502a74,getApiDomain:_0x467c03}=await import('./constant/domain.js'),_0xf662a5={'apiDomain':_0x467c03(),'userDomain':_0x502a74()},_0xd3e158=await buildAuth(_0x3c8655);logger['setLogPath'](process[_0x54f1ee(0x1ba)]());const _0x2ea2b9=(CLI_BIN_NAME+'\x20'+process[_0x54f1ee(0x1f0)]['slice'](0x2)[_0x54f1ee(0x1d7)]('\x20'))[_0x54f1ee(0x1d6)]();logger['setRawCommand'](_0x2ea2b9);const _0xbc6f54=isNonInteractiveMode(_0xdd6d04);return{'config':_0x3c8655,'auth':_0xd3e158,'logger':logger,'env':_0xf662a5,'nonInteractive':_0xbc6f54};}export function buildConfigFromFlags(_0x15242b){return buildConfig(readRawConfig(),_0x15242b);}export function getLocalAppAliases(_0x25e7a1){const _0x14e43f=a73_0x28d0f8;return _0x25e7a1[_0x14e43f(0x1ed)]&&typeof _0x25e7a1[_0x14e43f(0x1ed)]===_0x14e43f(0x1ee)?_0x25e7a1[_0x14e43f(0x1ed)]:{};}export function resolveLocalAppAliasCode(_0x42541a,_0x5b79af){const _0x1cc3ba=a73_0x28d0f8;if(!_0x5b79af)return undefined;const _0x258592=getLocalAppAliases(_0x42541a)[_0x5b79af],_0x104512=_0x258592?.[_0x1cc3ba(0x1e6)];return typeof _0x104512===_0x1cc3ba(0x1b6)&&_0x104512[_0x1cc3ba(0x1d6)]()?_0x104512[_0x1cc3ba(0x1d6)]():undefined;}export function readAppCodeFromConfig(){const _0x1ce69a=a73_0x28d0f8,_0x198f97=readRawConfig(),_0x10439d=_0x198f97['appcode']??_0x198f97[_0x1ce69a(0x1e1)];if(typeof _0x10439d===_0x1ce69a(0x1b6)&&_0x10439d[_0x1ce69a(0x1d6)]())return _0x10439d[_0x1ce69a(0x1d6)]();const _0x221b18=resolveLocalAppAliasCode(_0x198f97,typeof _0x198f97['defaultApp']==='string'?_0x198f97[_0x1ce69a(0x1b3)]:undefined);if(_0x221b18)return _0x221b18;const _0x548bc=normalizeEnv(String(_0x198f97['env']||'production')),_0x5c5402=isDaily(_0x548bc)?_0x1ce69a(0x1d2):isDev(_0x548bc)?_0x1ce69a(0x1dd):_0x1ce69a(0x1cb),_0x4dd917=resolveCachedAppCode(typeof _0x198f97[_0x1ce69a(0x1b3)]===_0x1ce69a(0x1b6)?_0x198f97[_0x1ce69a(0x1b3)]:undefined,_0x5c5402,typeof _0x198f97[_0x1ce69a(0x1c6)]===_0x1ce69a(0x1b6)?_0x198f97[_0x1ce69a(0x1c6)]:undefined);if(_0x4dd917)return _0x4dd917;const _0x296e46=Object[_0x1ce69a(0x1c5)](getLocalAppAliases(_0x198f97))[_0x1ce69a(0x1df)](_0x158f1c=>_0x158f1c?.[_0x1ce69a(0x1e6)]);return typeof _0x296e46?.[_0x1ce69a(0x1e6)]===_0x1ce69a(0x1b6)&&_0x296e46[_0x1ce69a(0x1e6)][_0x1ce69a(0x1d6)]()?_0x296e46[_0x1ce69a(0x1e6)][_0x1ce69a(0x1d6)]():undefined;}export function readScopedConfig(_0xf19d85){const _0x2a8c21=a73_0x28d0f8,_0x301b57=_0xf19d85[_0x2a8c21(0x1dc)]?'global':'project';return readConfigFile(resolveWriteConfigPath(_0x301b57));}export function writeScopedConfig(_0x7523fb,_0x3e672a){const _0xfbfc7f=a73_0x28d0f8,_0x2d4ffa=_0x3e672a[_0xfbfc7f(0x1dc)]?_0xfbfc7f(0x1dc):_0xfbfc7f(0x1d0);writeConfigFile(resolveWriteConfigPath(_0x2d4ffa),_0x7523fb);}export async function initGlobalEnvironment(_0x51c2e3){const _0x27a43a=a73_0x28d0f8,{initEnv:_0x2fecef}=await import('./constant/env.js');_0x2fecef(_0x51c2e3[_0x27a43a(0x1c1)]);const {initDomains:_0x47712a}=await import('./constant/domain.js');_0x47712a({'apiDomain':_0x51c2e3[_0x27a43a(0x1b7)][_0x27a43a(0x1b8)]||_0x51c2e3[_0x27a43a(0x1b7)][_0x27a43a(0x1be)]||undefined,'userDomain':_0x51c2e3[_0x27a43a(0x1b7)][_0x27a43a(0x1bb)]||undefined,'runtimeDomain':_0x51c2e3['raw'][_0x27a43a(0x1b2)]||undefined,'skillHubDomain':_0x51c2e3[_0x27a43a(0x1b7)]['skillHubDomain']||undefined});}export function getProjectConfigPath(){const _0x40d149=a73_0x28d0f8;return resolveConfigPath(process[_0x40d149(0x1ba)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}function a73_0x23c9(){const _0x41aae8=['empty','write','high-risk-write','project','4KiYXuy','daily','inherit','2123820kHmsSU','stringify','trim','join','6920QtQzYa','some','FORMAT','riskLevel','global','development','cache','find','APP','app','authRequired','nonInteractive','1650474JoQfnE','isRaw','appcode','5268432ousaeQ','parse','2949527nXJBxC','utf8','stdin','locale','apps','object','message','argv','12dumuJY','runtimeDomain','defaultApp','explicit','EXDEV','string','raw','apiDomain','projectConfig','cwd','userDomain','newConfigFileName','stdout','host','167201cUNZNC','missing','env','4294495dwMJNp','ENV','true','values','accessKey','34821JpvBmy','isTTY','pageSize','format','production','code'];a73_0x23c9=function(){return _0x41aae8;};return a73_0x23c9();}export function inspectCliConfigJsonFile(_0x35f36a){const _0xfa7083=a73_0x28d0f8;if(!existsSync(_0x35f36a))return{'status':_0xfa7083(0x1c0)};try{const _0x5bab93=readFileSync(_0x35f36a,{'encoding':'utf8'});if(!_0x5bab93?.['trim']())return{'status':_0xfa7083(0x1cd)};const _0x48053f=JSON[_0xfa7083(0x1e8)](_0x5bab93);return{'status':'ok','data':_0x48053f};}catch(_0x1c13af){return{'status':'error','message':_0x1c13af instanceof Error?_0x1c13af[_0xfa7083(0x1ef)]:String(_0x1c13af)};}}function a73_0x3d41(_0x5d79a9,_0x18b6c5){_0x5d79a9=_0x5d79a9-0x1b1;const _0x23c9d9=a73_0x23c9();let _0x3d41b8=_0x23c9d9[_0x5d79a9];return _0x3d41b8;}export function loadRawConfigLayers(_0x2fac6a){const _0x494253=a73_0x28d0f8;let _0x451e21={},_0x1695cb={},_0x3b965e,_0x2b098;try{_0x3b965e=resolveConfigPath(homedir());if(_0x3b965e){const _0x5e6215=readFileSync(_0x3b965e,{'encoding':_0x494253(0x1ea)});if(_0x5e6215)_0x451e21=JSON[_0x494253(0x1e8)](_0x5e6215);}}catch{}try{const _0x4f8b4f=_0x2fac6a||process['cwd']();_0x2b098=resolveConfigPath(_0x4f8b4f);if(_0x2b098){const _0x4dc809=readFileSync(_0x2b098,{'encoding':'utf8'});if(_0x4dc809)_0x1695cb=JSON[_0x494253(0x1e8)](_0x4dc809);}}catch{}return{'globalPath':_0x3b965e,'projectPath':_0x2b098,'globalConfig':_0x451e21,'projectConfig':_0x1695cb};}function mergeRawConfigLayers(_0x5d7379){const _0x4bdae6=a73_0x28d0f8,{globalConfig:_0x4c54c0,projectConfig:_0x2fc502}=_0x5d7379;if(_0x2fc502[_0x4bdae6(0x1d3)]===![]){const _0x22a6cf={..._0x2fc502};return delete _0x22a6cf[_0x4bdae6(0x1d3)],_0x22a6cf;}const _0x206a4f={..._0x4c54c0,..._0x2fc502};if(_0x4bdae6(0x1b3)in _0x2fc502)_0x206a4f[_0x4bdae6(0x1b3)]=_0x2fc502[_0x4bdae6(0x1b3)];else _0x4c54c0[_0x4bdae6(0x1b3)]&&(_0x206a4f[_0x4bdae6(0x1b3)]=_0x4c54c0[_0x4bdae6(0x1b3)]);return _0x206a4f;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x5024f8){return mergeRawConfigLayers(loadRawConfigLayers(_0x5024f8));}export function readRawConfigWithLayers(_0x1123c5){const _0x4ebd8c=loadRawConfigLayers(_0x1123c5);return{'config':mergeRawConfigLayers(_0x4ebd8c),'layers':_0x4ebd8c};}export function resolveDefaultAppSource(_0x3af328){const _0x15d5f0=a73_0x28d0f8;if(_0x15d5f0(0x1b3)in _0x3af328[_0x15d5f0(0x1b9)])return _0x15d5f0(0x1d0);if(_0x3af328[_0x15d5f0(0x1b9)]['inherit']===![])return null;if(_0x3af328['globalConfig'][_0x15d5f0(0x1b3)])return _0x15d5f0(0x1dc);return null;}function buildConfig(_0xee39a7,_0x1d499a){const _0x26c92c=a73_0x28d0f8,_0x3bdfd6=_0xee39a7[_0x26c92c(0x1b3)]||undefined,_0x5a11e1=_0x1d499a[_0x26c92c(0x1e1)]||env(_0x26c92c(0x1e0))||undefined,_0x3a1856=_0x5a11e1||_0x3bdfd6||undefined,_0x26e5ab=env('ACCESS_KEY')||_0xee39a7[_0x26c92c(0x1c6)]||undefined,_0x18f307=_0x1d499a[_0x26c92c(0x1c1)]||env(_0x26c92c(0x1c3))||_0xee39a7[_0x26c92c(0x1c1)]||DEFAULT_CONFIG_VALUES[_0x26c92c(0x1c1)],_0x3a35bc=normalizeEnv(String(_0x18f307)),_0x38540f=isDaily(_0x3a35bc)?_0x26c92c(0x1d2):isDev(_0x3a35bc)?_0x26c92c(0x1dd):_0x26c92c(0x1cb),_0x5b5d1d=typeof _0x1d499a[_0x26c92c(0x1e6)]===_0x26c92c(0x1b6)?_0x1d499a[_0x26c92c(0x1e6)]:undefined,_0x17cff8=env('APPCODE'),_0x34971c=_0x5a11e1?undefined:_0xee39a7['appcode']||_0xee39a7[_0x26c92c(0x1e1)]||undefined,_0x17c7f5=_0x5a11e1||(_0x34971c?undefined:_0x3bdfd6),_0x51857a=resolveLocalAppAliasCode(_0xee39a7,_0x17c7f5),_0x5451ba=resolveCachedAppCode(_0x17c7f5,_0x38540f,_0x26e5ab),_0x432aad=_0x5b5d1d||_0x17cff8||_0x34971c||_0x51857a||_0x5451ba||undefined,_0x29de80=_0x5b5d1d?_0x26c92c(0x1b4):_0x17cff8?_0x26c92c(0x1c1):_0x34971c?'top-level':_0x51857a?'local-alias':_0x5451ba?_0x26c92c(0x1de):undefined,_0x51affd=_0xee39a7[_0x26c92c(0x1ec)]||DEFAULT_CONFIG_VALUES[_0x26c92c(0x1ec)],_0x43092d=undefined,_0x1f9b25=_0x1d499a['format']||env(_0x26c92c(0x1da))||_0xee39a7[_0x26c92c(0x1ca)],_0x374495=normalizeLegacyOutputFormat(_0x1f9b25),_0x161575=env('PAGE_SIZE')||_0xee39a7[_0x26c92c(0x1c9)],_0xaf8110=_0x161575?Number(_0x161575)||undefined:undefined,_0x32ab90=_0xee39a7[_0x26c92c(0x1db)]||_0xee39a7['maxRisk'],_0x1d3538=_0x32ab90==='read'||_0x32ab90===_0x26c92c(0x1ce)||_0x32ab90===_0x26c92c(0x1cf)?_0x32ab90:DEFAULT_CONFIG_VALUES[_0x26c92c(0x1db)],_0xf3bc09=env('VERBOSE'),_0x223364=_0xf3bc09==='1'||_0xf3bc09===_0x26c92c(0x1c4);return{'appCode':typeof _0x432aad===_0x26c92c(0x1b6)&&_0x432aad['trim']()?_0x432aad[_0x26c92c(0x1d6)]():undefined,'appCodeSource':_0x29de80,'env':_0x38540f,'locale':_0x51affd,'cookie':_0x43092d,'accessKey':_0x26e5ab,'format':_0x374495,'pageSize':_0xaf8110,'riskLevel':_0x1d3538,'verbose':_0x223364,'defaultApp':_0x3bdfd6,'currentApp':typeof _0x3a1856===_0x26c92c(0x1b6)?_0x3a1856:undefined,'raw':_0xee39a7};}function env(_0x2b9287){return productEnv(_0x2b9287);}async function buildAuth(_0x265256){const _0x10b29f=a73_0x28d0f8,_0x5721cc='',_0x20fe19=!!_0x265256[_0x10b29f(0x1c6)];return{'cookie':_0x5721cc,'isLoggedIn':_0x20fe19,async 'getOrLogin'(){const _0x3f245d=_0x10b29f;if(_0x20fe19)return _0x5721cc;throw CliErrors[_0x3f245d(0x1e2)]();}};}
|
|
1
|
+
const a74_0x25082a=a74_0x41d8;(function(_0x2d8832,_0x373821){const _0x345708=a74_0x41d8,_0x26b77b=_0x2d8832();while(!![]){try{const _0x2462cb=parseInt(_0x345708(0x9e))/0x1*(parseInt(_0x345708(0xba))/0x2)+parseInt(_0x345708(0xd0))/0x3+-parseInt(_0x345708(0x9d))/0x4+-parseInt(_0x345708(0xb3))/0x5*(-parseInt(_0x345708(0xd2))/0x6)+-parseInt(_0x345708(0xd5))/0x7*(parseInt(_0x345708(0xb6))/0x8)+-parseInt(_0x345708(0xc1))/0x9*(parseInt(_0x345708(0xbe))/0xa)+-parseInt(_0x345708(0xda))/0xb;if(_0x2462cb===_0x373821)break;else _0x26b77b['push'](_0x26b77b['shift']());}catch(_0x4e2790){_0x26b77b['push'](_0x26b77b['shift']());}}}(a74_0x3b96,0x26a7f));import{readFileSync,existsSync,mkdirSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{homedir}from'node:os';import{logger}from'./utils/logger.js';import{CliErrors}from'./errors.js';import{CLI_BIN_NAME}from'./constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvNames}from'./constant/product.js';import{DEFAULT_CONFIG_VALUES}from'./constant/defaults.js';import{normalizeEnv,isDaily,isDev}from'./constant/env.js';import{normalizeLegacyOutputFormat}from'./framework/types.js';import{resolveCachedAppCode}from'./commands/app/cache.js';export{AUTH_MODE,isAuthMode}from'./constant/auth-mode.js';const CONFIG_NAMES=PRODUCT_CONFIG['configFileNames'];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a74_0x25082a(0xd4)];function resolveConfigPath(_0x207cb0){for(const _0x4d088c of CONFIG_NAMES){const _0x34c9eb=resolve(_0x207cb0,_0x4d088c);if(existsSync(_0x34c9eb))return _0x34c9eb;}return undefined;}export function resolveWriteConfigPath(_0x241681){const _0x2dacdc=a74_0x25082a,_0x47b255=_0x241681===_0x2dacdc(0xa7)?process['cwd']():homedir(),_0x4bd159=resolveConfigPath(_0x47b255);return _0x4bd159??resolve(_0x47b255,NEW_CONFIG_NAME);}function a74_0x3b96(){const _0x5bbe0f=['parse','some','isRaw','VERBOSE','message','pageSize','authRequired','write','riskLevel','apps','850332oGsnQY','inherit','450rkEWjj','setRawCommand','newConfigFileName','13223oFFGwI','env','EACCES','raw','EXDEV','75658RRIeGO','production','stringify','code','stdin','slice','APPCODE','setRawMode','explicit','development','error','848556RDosFL','5165HnFPTI','defaultApp','local-alias','trim','globalConfig','apiDomain','PAGE_SIZE','find','cwd','project','isTTY','stdout','online','APP','format','true','string','EPERM','read','object','empty','9250QuWYRN','values','maxRisk','1128EtNyfr','global','appcode','app','114wFddiw','join','setLogPath','daily','5740xaxJdS','runtimeDomain','host','1143xPdeht','utf8','ACCESS_KEY','./constant/domain.js','accessKey'];a74_0x3b96=function(){return _0x5bbe0f;};return a74_0x3b96();}export function readConfigFile(_0x51785d){const _0x368749=a74_0x25082a;try{if(existsSync(_0x51785d)){const _0x47ac26=readFileSync(_0x51785d,{'encoding':'utf8'});if(_0x47ac26){const _0x436c31=JSON[_0x368749(0xc6)](_0x47ac26);return migrateOnlineEnv(_0x51785d,_0x436c31),_0x436c31;}}}catch{}return{};}function migrateOnlineEnv(_0x5c379d,_0x276950){const _0x4a9706=a74_0x25082a;let _0x12ebc2=![];_0x276950[_0x4a9706(0xd6)]===_0x4a9706(0xaa)&&(_0x276950['env']=_0x4a9706(0xdb),_0x12ebc2=!![]);if(_0x276950['apps']&&typeof _0x276950[_0x4a9706(0xcf)]==='object')for(const _0x23c02f of Object[_0x4a9706(0xb4)](_0x276950[_0x4a9706(0xcf)])){_0x23c02f&&_0x23c02f['env']===_0x4a9706(0xaa)&&(_0x23c02f['env']=_0x4a9706(0xdb),_0x12ebc2=!![]);}if(_0x12ebc2)try{writeConfigFile(_0x5c379d,_0x276950);}catch{}}export function writeConfigFile(_0x3696ed,_0x276395){const _0x400a48=a74_0x25082a,_0x431474=dirname(_0x3696ed);!existsSync(_0x431474)&&mkdirSync(_0x431474,{'recursive':!![]});const _0x5020c8=_0x3696ed+'.tmp';try{writeFileSync(_0x5020c8,JSON[_0x400a48(0xdc)](_0x276395,null,0x2)+'\x0a',{'encoding':_0x400a48(0xc2),'mode':0x180});try{renameSync(_0x5020c8,_0x3696ed);}catch(_0x5c00a3){if(_0x5c00a3['code']===_0x400a48(0xaf)||_0x5c00a3['code']===_0x400a48(0xd9)||_0x5c00a3[_0x400a48(0xdd)]===_0x400a48(0xd7)){writeFileSync(_0x3696ed,JSON[_0x400a48(0xdc)](_0x276395,null,0x2)+'\x0a',{'encoding':_0x400a48(0xc2)});try{unlinkSync(_0x5020c8);}catch{}}else throw _0x5c00a3;}}catch(_0x36a86e){try{unlinkSync(_0x5020c8);}catch{}throw _0x36a86e;}}export function isNonInteractiveMode(_0x73a93c){const _0x385b6a=a74_0x25082a;return!!(_0x73a93c['nonInteractive']||_0x73a93c['ci']||productEnvNames('CI')[_0x385b6a(0xc7)](_0x104048=>process.env[_0x104048]==='true')||process.env.CI==='true'||!process[_0x385b6a(0xa9)][_0x385b6a(0xa8)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x399e8c=a74_0x25082a;if(!process[_0x399e8c(0xde)][_0x399e8c(0xa8)])return![];try{const _0x3382e8=process[_0x399e8c(0xde)][_0x399e8c(0xc8)];return process[_0x399e8c(0xde)][_0x399e8c(0xe1)](!![]),process[_0x399e8c(0xde)]['setRawMode'](_0x3382e8??![]),!![];}catch{return![];}}export async function createContext(_0x8eecc1){const _0x20a95a=a74_0x25082a,_0x8a92c0=readRawConfig(),_0x4fe14b=buildConfig(_0x8a92c0,_0x8eecc1);await initGlobalEnvironment(_0x4fe14b);const {getUserDomain:_0x459efb,getApiDomain:_0x488b22}=await import(_0x20a95a(0xc4)),_0x400ba9={'apiDomain':_0x488b22(),'userDomain':_0x459efb()},_0x376433=await buildAuth(_0x4fe14b);logger[_0x20a95a(0xbc)](process['cwd']());const _0x23da29=(CLI_BIN_NAME+'\x20'+process['argv'][_0x20a95a(0xdf)](0x2)[_0x20a95a(0xbb)]('\x20'))['trim']();logger[_0x20a95a(0xd3)](_0x23da29);const _0x2b3e5d=isNonInteractiveMode(_0x8eecc1);return{'config':_0x4fe14b,'auth':_0x376433,'logger':logger,'env':_0x400ba9,'nonInteractive':_0x2b3e5d};}export function buildConfigFromFlags(_0x4a0777){return buildConfig(readRawConfig(),_0x4a0777);}export function getLocalAppAliases(_0x59b93d){const _0x172b4a=a74_0x25082a;return _0x59b93d[_0x172b4a(0xcf)]&&typeof _0x59b93d[_0x172b4a(0xcf)]===_0x172b4a(0xb1)?_0x59b93d['apps']:{};}export function resolveLocalAppAliasCode(_0xbaca08,_0x3a2a16){const _0x55261f=a74_0x25082a;if(!_0x3a2a16)return undefined;const _0x300d78=getLocalAppAliases(_0xbaca08)[_0x3a2a16],_0x894217=_0x300d78?.[_0x55261f(0xb8)];return typeof _0x894217===_0x55261f(0xae)&&_0x894217[_0x55261f(0xa1)]()?_0x894217[_0x55261f(0xa1)]():undefined;}export function readAppCodeFromConfig(){const _0x1b7f12=a74_0x25082a,_0x3af5d5=readRawConfig(),_0x3d6dba=_0x3af5d5[_0x1b7f12(0xb8)]??_0x3af5d5[_0x1b7f12(0xb9)];if(typeof _0x3d6dba===_0x1b7f12(0xae)&&_0x3d6dba[_0x1b7f12(0xa1)]())return _0x3d6dba[_0x1b7f12(0xa1)]();const _0xcf64fe=resolveLocalAppAliasCode(_0x3af5d5,typeof _0x3af5d5[_0x1b7f12(0x9f)]===_0x1b7f12(0xae)?_0x3af5d5[_0x1b7f12(0x9f)]:undefined);if(_0xcf64fe)return _0xcf64fe;const _0x554df3=normalizeEnv(String(_0x3af5d5['env']||_0x1b7f12(0xdb))),_0x370d8e=isDaily(_0x554df3)?_0x1b7f12(0xbd):isDev(_0x554df3)?_0x1b7f12(0xe3):_0x1b7f12(0xdb),_0x394110=resolveCachedAppCode(typeof _0x3af5d5['defaultApp']===_0x1b7f12(0xae)?_0x3af5d5['defaultApp']:undefined,_0x370d8e,typeof _0x3af5d5[_0x1b7f12(0xc5)]===_0x1b7f12(0xae)?_0x3af5d5[_0x1b7f12(0xc5)]:undefined);if(_0x394110)return _0x394110;const _0x1606e4=Object[_0x1b7f12(0xb4)](getLocalAppAliases(_0x3af5d5))[_0x1b7f12(0xa5)](_0x3ffbfe=>_0x3ffbfe?.[_0x1b7f12(0xb8)]);return typeof _0x1606e4?.['appcode']===_0x1b7f12(0xae)&&_0x1606e4['appcode'][_0x1b7f12(0xa1)]()?_0x1606e4[_0x1b7f12(0xb8)][_0x1b7f12(0xa1)]():undefined;}export function readScopedConfig(_0x2b74bf){const _0xed8d2e=a74_0x25082a,_0x407527=_0x2b74bf[_0xed8d2e(0xb7)]?'global':'project';return readConfigFile(resolveWriteConfigPath(_0x407527));}export function writeScopedConfig(_0x38d425,_0x21b805){const _0xea8443=a74_0x25082a,_0x58fc94=_0x21b805[_0xea8443(0xb7)]?_0xea8443(0xb7):_0xea8443(0xa7);writeConfigFile(resolveWriteConfigPath(_0x58fc94),_0x38d425);}export async function initGlobalEnvironment(_0x4a1c11){const _0x1daf01=a74_0x25082a,{initEnv:_0x5e2799}=await import('./constant/env.js');_0x5e2799(_0x4a1c11['env']);const {initDomains:_0x438fd1}=await import(_0x1daf01(0xc4));_0x438fd1({'apiDomain':_0x4a1c11[_0x1daf01(0xd8)][_0x1daf01(0xa3)]||_0x4a1c11['raw'][_0x1daf01(0xc0)]||undefined,'userDomain':_0x4a1c11['raw']['userDomain']||undefined,'runtimeDomain':_0x4a1c11[_0x1daf01(0xd8)][_0x1daf01(0xbf)]||undefined,'skillHubDomain':_0x4a1c11[_0x1daf01(0xd8)]['skillHubDomain']||undefined});}export function getProjectConfigPath(){return resolveConfigPath(process['cwd']());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x2c7e54){const _0x11a26e=a74_0x25082a;if(!existsSync(_0x2c7e54))return{'status':'missing'};try{const _0x36637c=readFileSync(_0x2c7e54,{'encoding':_0x11a26e(0xc2)});if(!_0x36637c?.[_0x11a26e(0xa1)]())return{'status':_0x11a26e(0xb2)};const _0x15af8a=JSON['parse'](_0x36637c);return{'status':'ok','data':_0x15af8a};}catch(_0x59e536){return{'status':_0x11a26e(0x9c),'message':_0x59e536 instanceof Error?_0x59e536[_0x11a26e(0xca)]:String(_0x59e536)};}}export function loadRawConfigLayers(_0x35caf3){const _0x33598a=a74_0x25082a;let _0x1c1bac={},_0x10d0c7={},_0x2cb77e,_0x36d335;try{_0x2cb77e=resolveConfigPath(homedir());if(_0x2cb77e){const _0x4345b5=readFileSync(_0x2cb77e,{'encoding':_0x33598a(0xc2)});if(_0x4345b5)_0x1c1bac=JSON[_0x33598a(0xc6)](_0x4345b5);}}catch{}try{const _0x1f0d4e=_0x35caf3||process[_0x33598a(0xa6)]();_0x36d335=resolveConfigPath(_0x1f0d4e);if(_0x36d335){const _0x49402f=readFileSync(_0x36d335,{'encoding':'utf8'});if(_0x49402f)_0x10d0c7=JSON[_0x33598a(0xc6)](_0x49402f);}}catch{}return{'globalPath':_0x2cb77e,'projectPath':_0x36d335,'globalConfig':_0x1c1bac,'projectConfig':_0x10d0c7};}function mergeRawConfigLayers(_0x490fb2){const _0x602c3c=a74_0x25082a,{globalConfig:_0x44c25d,projectConfig:_0x3dcfec}=_0x490fb2;if(_0x3dcfec[_0x602c3c(0xd1)]===![]){const _0xaeb21c={..._0x3dcfec};return delete _0xaeb21c[_0x602c3c(0xd1)],_0xaeb21c;}const _0x40ef75={..._0x44c25d,..._0x3dcfec};if(_0x602c3c(0x9f)in _0x3dcfec)_0x40ef75[_0x602c3c(0x9f)]=_0x3dcfec[_0x602c3c(0x9f)];else _0x44c25d['defaultApp']&&(_0x40ef75[_0x602c3c(0x9f)]=_0x44c25d[_0x602c3c(0x9f)]);return _0x40ef75;}function a74_0x41d8(_0x504431,_0x321af8){_0x504431=_0x504431-0x9c;const _0x3b96ae=a74_0x3b96();let _0x41d82d=_0x3b96ae[_0x504431];return _0x41d82d;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x543360){return mergeRawConfigLayers(loadRawConfigLayers(_0x543360));}export function readRawConfigWithLayers(_0x318fb2){const _0x51e2c7=loadRawConfigLayers(_0x318fb2);return{'config':mergeRawConfigLayers(_0x51e2c7),'layers':_0x51e2c7};}export function resolveDefaultAppSource(_0x1d1b67){const _0x3a8f3c=a74_0x25082a;if(_0x3a8f3c(0x9f)in _0x1d1b67['projectConfig'])return'project';if(_0x1d1b67['projectConfig'][_0x3a8f3c(0xd1)]===![])return null;if(_0x1d1b67[_0x3a8f3c(0xa2)]['defaultApp'])return _0x3a8f3c(0xb7);return null;}function buildConfig(_0x44778d,_0x373a70){const _0x7a678f=a74_0x25082a,_0x2711ac=_0x44778d[_0x7a678f(0x9f)]||undefined,_0x191336=_0x373a70[_0x7a678f(0xb9)]||env(_0x7a678f(0xab))||undefined,_0x4b108e=_0x191336||_0x2711ac||undefined,_0x2dbf83=env(_0x7a678f(0xc3))||_0x44778d[_0x7a678f(0xc5)]||undefined,_0x21276d=_0x373a70[_0x7a678f(0xd6)]||env('ENV')||_0x44778d[_0x7a678f(0xd6)]||DEFAULT_CONFIG_VALUES[_0x7a678f(0xd6)],_0x4b908b=normalizeEnv(String(_0x21276d)),_0x297653=isDaily(_0x4b908b)?_0x7a678f(0xbd):isDev(_0x4b908b)?_0x7a678f(0xe3):_0x7a678f(0xdb),_0x230bff=typeof _0x373a70[_0x7a678f(0xb8)]===_0x7a678f(0xae)?_0x373a70[_0x7a678f(0xb8)]:undefined,_0x10a5a9=env(_0x7a678f(0xe0)),_0x44300c=_0x191336?undefined:_0x44778d[_0x7a678f(0xb8)]||_0x44778d[_0x7a678f(0xb9)]||undefined,_0x1e38a6=_0x191336||(_0x44300c?undefined:_0x2711ac),_0x406d79=resolveLocalAppAliasCode(_0x44778d,_0x1e38a6),_0x460677=resolveCachedAppCode(_0x1e38a6,_0x297653,_0x2dbf83),_0x2aba3b=_0x230bff||_0x10a5a9||_0x44300c||_0x406d79||_0x460677||undefined,_0x55f9f8=_0x230bff?_0x7a678f(0xe2):_0x10a5a9?_0x7a678f(0xd6):_0x44300c?'top-level':_0x406d79?_0x7a678f(0xa0):_0x460677?'cache':undefined,_0x4da8bc=_0x44778d['locale']||DEFAULT_CONFIG_VALUES['locale'],_0x5a0b92=undefined,_0x1049fb=_0x373a70[_0x7a678f(0xac)]||env('FORMAT')||_0x44778d[_0x7a678f(0xac)],_0xf34b4e=normalizeLegacyOutputFormat(_0x1049fb),_0x259b4d=env(_0x7a678f(0xa4))||_0x44778d[_0x7a678f(0xcb)],_0x356e67=_0x259b4d?Number(_0x259b4d)||undefined:undefined,_0x432963=_0x44778d[_0x7a678f(0xce)]||_0x44778d[_0x7a678f(0xb5)],_0x141b5d=_0x432963===_0x7a678f(0xb0)||_0x432963===_0x7a678f(0xcd)||_0x432963==='high-risk-write'?_0x432963:DEFAULT_CONFIG_VALUES[_0x7a678f(0xce)],_0x4ff6a9=env(_0x7a678f(0xc9)),_0x4ab5f2=_0x4ff6a9==='1'||_0x4ff6a9===_0x7a678f(0xad);return{'appCode':typeof _0x2aba3b===_0x7a678f(0xae)&&_0x2aba3b[_0x7a678f(0xa1)]()?_0x2aba3b[_0x7a678f(0xa1)]():undefined,'appCodeSource':_0x55f9f8,'env':_0x297653,'locale':_0x4da8bc,'cookie':_0x5a0b92,'accessKey':_0x2dbf83,'format':_0xf34b4e,'pageSize':_0x356e67,'riskLevel':_0x141b5d,'verbose':_0x4ab5f2,'defaultApp':_0x2711ac,'currentApp':typeof _0x4b108e==='string'?_0x4b108e:undefined,'raw':_0x44778d};}function env(_0x59cb9b){return productEnv(_0x59cb9b);}async function buildAuth(_0xb40c45){const _0x39698e='',_0x2dbc62=!!_0xb40c45['accessKey'];return{'cookie':_0x39698e,'isLoggedIn':_0x2dbc62,async 'getOrLogin'(){const _0x3b1eb4=a74_0x41d8;if(_0x2dbc62)return _0x39698e;throw CliErrors[_0x3b1eb4(0xcc)]();}};}
|