@lovrabet/lovrabet-cli 2.1.11-beta.2 → 2.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/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 -0
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
function a55_0x1e36(_0x506137,_0x327062){_0x506137=_0x506137-0x17b;const _0x506854=a55_0x5068();let _0x1e3662=_0x506854[_0x506137];return _0x1e3662;}const a55_0x7aec6f=a55_0x1e36;(function(_0x1af0c3,_0x347f40){const _0x55e1b1=a55_0x1e36,_0x52a24f=_0x1af0c3();while(!![]){try{const _0x48334c=parseInt(_0x55e1b1(0x1bf))/0x1*(parseInt(_0x55e1b1(0x180))/0x2)+parseInt(_0x55e1b1(0x1da))/0x3+-parseInt(_0x55e1b1(0x195))/0x4*(-parseInt(_0x55e1b1(0x183))/0x5)+parseInt(_0x55e1b1(0x1cd))/0x6*(-parseInt(_0x55e1b1(0x192))/0x7)+parseInt(_0x55e1b1(0x1bc))/0x8+parseInt(_0x55e1b1(0x197))/0x9+parseInt(_0x55e1b1(0x1b9))/0xa*(-parseInt(_0x55e1b1(0x1a0))/0xb);if(_0x48334c===_0x347f40)break;else _0x52a24f['push'](_0x52a24f['shift']());}catch(_0x113654){_0x52a24f['push'](_0x52a24f['shift']());}}}(a55_0x5068,0x67c95));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{resolve}from'node:path';import{parse as a55_0x407961}from'yaml';import{CliErrors}from'../../errors.js';import{fileText,scanSkillDirectory}from'../../skills/runtime-skill-sync/local-files.js';const SKILL_FILE=a55_0x7aec6f(0x1be),SUPPORTED_SKILL_TYPES=new Set([a55_0x7aec6f(0x18a),a55_0x7aec6f(0x1a5),'trainer']),TEXT_SKILL_FILE_PATTERN=/(?:^SKILL\.md$|\.(?:md|mdx|txt|json|ya?ml|js|mjs|cjs|ts|tsx|sh|sql))$/i;export function validateSkillDirectory(_0x4860af,_0xc0c168={}){const _0x8adff4=a55_0x7aec6f,_0x98e46c=resolveSkillDirectoryRoot(_0x4860af),_0x358d1b=[],_0x468aed=loadRequiredSkillFile(_0x98e46c,_0x358d1b),_0x47ac36=_0x468aed?parseFrontmatter(_0x468aed[_0x8adff4(0x182)]):{'hasFrontmatter':![]};_0x468aed&&validateFrontmatter(_0x468aed[_0x8adff4(0x1d4)],_0x47ac36,_0x358d1b);validateRuntimeCliReferences(_0x98e46c,_0x358d1b);const _0x5041af=_0x358d1b[_0x8adff4(0x1c5)](_0x241e9c=>_0x241e9c[_0x8adff4(0x199)]===_0x8adff4(0x1c3)),_0x81f945=_0x358d1b['filter'](_0x34f170=>_0x34f170['level']===_0x8adff4(0x1c2));return{'ok':_0x5041af[_0x8adff4(0x17b)]===0x0,'dir':_0x98e46c,'type':_0x47ac36[_0x8adff4(0x1b6)],'errors':_0x5041af,'warnings':_0x81f945};}function resolveSkillDirectoryRoot(_0xc04e81){const _0x2ab312=a55_0x7aec6f,_0x34985c=resolve(_0xc04e81);if(!existsSync(_0x34985c))throw CliErrors[_0x2ab312(0x18d)](_0x2ab312(0x19a)+_0xc04e81);const _0x283611=lstatSync(_0x34985c);if(_0x283611[_0x2ab312(0x1d9)]())return _0x34985c;if(_0x283611[_0x2ab312(0x1a3)]()){const _0x37f752=realpathSync(_0x34985c);if(lstatSync(_0x37f752)[_0x2ab312(0x1d9)]())return _0x37f752;}throw CliErrors['validation'](_0x2ab312(0x19a)+_0xc04e81);}export function throwIfSkillValidationFailed(_0x49cf69,_0x206a47=![]){const _0x514ed4=a55_0x7aec6f;if(_0x49cf69['ok'])return;const _0x1a664f=_0x49cf69['errors']['map'](_0x584a86=>{const _0x421aad=a55_0x1e36,_0x70e4df=_0x584a86['section']?'#'+_0x584a86[_0x421aad(0x1c4)]:'';return _0x584a86[_0x421aad(0x199)][_0x421aad(0x1cb)]()+'\x20'+_0x584a86[_0x421aad(0x187)]+'\x20'+_0x584a86[_0x421aad(0x1b1)]+_0x70e4df+':\x20'+_0x584a86[_0x421aad(0x191)]+_0x421aad(0x189)+_0x584a86[_0x421aad(0x1c6)];});throw CliErrors[_0x514ed4(0x18d)](_0x514ed4(0x1d3)+_0x1a664f[_0x514ed4(0x1ca)]('\x0a'),_0x514ed4(0x1b0));}function loadRequiredSkillFile(_0x4a327,_0x20f5b8){const _0xf34d55=a55_0x7aec6f,_0x55e643=resolve(_0x4a327,SKILL_FILE);if(!existsSync(_0x55e643))return _0x20f5b8[_0xf34d55(0x18e)](issue('error',_0xf34d55(0x17e),SKILL_FILE,_0xf34d55(0x19c),_0xf34d55(0x1a4))),undefined;const _0x53bd29=lstatSync(_0x55e643);if(_0x53bd29[_0xf34d55(0x1a3)]())return _0x20f5b8[_0xf34d55(0x18e)](issue('error',_0xf34d55(0x17e),SKILL_FILE,_0xf34d55(0x1c8),_0xf34d55(0x1a1))),undefined;if(!_0x53bd29['isFile']())return _0x20f5b8['push'](issue(_0xf34d55(0x1c3),'structure-complete',SKILL_FILE,_0xf34d55(0x18f),'Add\x20SKILL.md\x20as\x20a\x20regular\x20file\x20at\x20the\x20Skill\x20directory\x20root.')),undefined;return{'path':SKILL_FILE,'content':readFileSync(_0x55e643,_0xf34d55(0x1d5))};}function validateFrontmatter(_0xed2c7c,_0x476a64,_0xb6dbe0){const _0x56af40=a55_0x7aec6f;if(!_0x476a64[_0x56af40(0x1c0)]){_0xb6dbe0[_0x56af40(0x18e)](issue(_0x56af40(0x1c3),_0x56af40(0x1ce),_0xed2c7c,_0x56af40(0x17f),_0x56af40(0x1c7)));return;}!_0x476a64[_0x56af40(0x1d7)]?.[_0x56af40(0x18b)]()&&_0xb6dbe0[_0x56af40(0x18e)](issue(_0x56af40(0x1c3),_0x56af40(0x1ce),_0xed2c7c,_0x56af40(0x19f),_0x56af40(0x1bb))),!_0x476a64[_0x56af40(0x17d)]?.[_0x56af40(0x18b)]()&&_0xb6dbe0[_0x56af40(0x18e)](issue(_0x56af40(0x1c2),_0x56af40(0x198),_0xed2c7c,_0x56af40(0x196),_0x56af40(0x188))),!_0x476a64[_0x56af40(0x184)]?.[_0x56af40(0x18b)]()&&_0xb6dbe0[_0x56af40(0x18e)](issue(_0x56af40(0x1c2),_0x56af40(0x19d),_0xed2c7c,_0x56af40(0x185),_0x56af40(0x1d6))),!_0x476a64[_0x56af40(0x1cc)]?.[_0x56af40(0x18b)]()&&_0xb6dbe0[_0x56af40(0x18e)](issue(_0x56af40(0x1c3),_0x56af40(0x186),_0xed2c7c,_0x56af40(0x1aa),_0x56af40(0x190))),_0x476a64[_0x56af40(0x1af)]===!![]&&_0xb6dbe0[_0x56af40(0x18e)](issue(_0x56af40(0x1c3),_0x56af40(0x1c9),_0xed2c7c,_0x56af40(0x19e),'Remove\x20metadata.internal\x20or\x20set\x20it\x20to\x20false\x20before\x20running\x20skill\x20push.')),_0x476a64[_0x56af40(0x1b6)]?.[_0x56af40(0x18b)]()&&!SUPPORTED_SKILL_TYPES[_0x56af40(0x1d0)](_0x476a64[_0x56af40(0x1b6)])&&_0xb6dbe0[_0x56af40(0x18e)](issue(_0x56af40(0x1c3),_0x56af40(0x1ce),_0xed2c7c,_0x56af40(0x1a7),_0x56af40(0x1ac)));}function validateRuntimeCliReferences(_0xf26781,_0x5911f4){const _0x43aa6e=a55_0x7aec6f;for(const _0x4d1061 of findRabetbaseCliInvocations(_0xf26781)){_0x5911f4['push'](issue(_0x43aa6e(0x1c2),_0x43aa6e(0x1d8),_0x4d1061[_0x43aa6e(0x1b1)],'This\x20line\x20invokes\x20the\x20rabetbase\x20CLI.\x20rabetbase\x20is\x20a\x20dev-time\x20tool;\x20runtime\x20Skills\x20should\x20drive\x20runtime\x20work\x20through\x20lovrabet\x20commands.','If\x20this\x20is\x20a\x20runtime\x20step,\x20replace\x20it\x20with\x20the\x20equivalent\x20lovrabet\x20command.\x20Dev-time\x20discovery\x20or\x20handoff\x20notes\x20can\x20stay.','L'+_0x4d1061[_0x43aa6e(0x1a8)]));}}function findRabetbaseCliInvocations(_0x4793f2){const _0x20e4e7=a55_0x7aec6f;return scanSkillDirectory(_0x4793f2)[_0x20e4e7(0x1c5)](_0x386213=>TEXT_SKILL_FILE_PATTERN['test'](_0x386213['path']))[_0x20e4e7(0x1c1)](_0x1828de=>{const _0x2142fb=_0x20e4e7,_0x1dfdfc=fileText(_0x1828de);return _0x1dfdfc[_0x2142fb(0x193)](/\r?\n/)[_0x2142fb(0x18c)]((_0x4dc0fc,_0xa3f673)=>({'file':_0x1828de[_0x2142fb(0x1d4)],'line':_0xa3f673+0x1,'text':_0x4dc0fc}))['filter'](({text:_0x4e2e12})=>isRabetbaseCliInvocation(_0x4e2e12))[_0x2142fb(0x18c)](({file:_0x325856,line:_0x5cbefa})=>({'file':_0x325856,'line':_0x5cbefa}));});}const RABETBASE_SUBCOMMANDS=[a55_0x7aec6f(0x1bd),a55_0x7aec6f(0x1d2),'bff',a55_0x7aec6f(0x1a6),a55_0x7aec6f(0x17c),a55_0x7aec6f(0x1b7),'schema',a55_0x7aec6f(0x1ae),a55_0x7aec6f(0x1cf),'kb','config','workspace',a55_0x7aec6f(0x1d1),a55_0x7aec6f(0x1b5),a55_0x7aec6f(0x1b2),'registry'],RABETBASE_INVOCATION=new RegExp(String[a55_0x7aec6f(0x1ba)]`\brabetbase\s+(?:${RABETBASE_SUBCOMMANDS[a55_0x7aec6f(0x1ca)]('|')})\b`+String[a55_0x7aec6f(0x1ba)]`(?:\s+[a-z][\w-]*){0,2}\s+(?:--?[a-z]|[\w.-]+=)`,'i');function a55_0x5068(){const _0x176cd5=['SKILL.md','1009mThWjW','hasFrontmatter','flatMap','warning','error','section','filter','suggestion','Add\x20frontmatter\x20with\x20name\x20and\x20description.','SKILL.md\x20must\x20be\x20a\x20regular\x20file.','internal-skill','join','toUpperCase','description','6SQKeXm','frontmatter-required','artifact','has','data','sql','Skill\x20validation\x20failed:\x0a','path','utf8','Set\x20example\x20to\x20one\x20short\x20user\x20message\x20that\x20can\x20directly\x20trigger\x20this\x20Skill.','name','rabetbase-cli-reference','isDirectory','581217EtFGcC','length','project','displayName','structure-complete','SKILL.md\x20must\x20start\x20with\x20frontmatter.','138fZruoD','toLowerCase','content','1374215QxWjKp','example','Frontmatter\x20example\x20is\x20missing.','description-required','ruleId','Set\x20displayName\x20to\x20the\x20human-readable\x20Skill\x20name\x20shown\x20in\x20SkillHub.','\x20Fix:\x20','write','trim','map','validation','push','SKILL.md\x20is\x20not\x20a\x20file.','填写模型触发语义:用户在什么场景应使用本\x20Skill、不要使用的边界和关键词。','message','1576029lirVIh','split','metadata','8YQBOpQ','Frontmatter\x20displayName\x20is\x20missing.','6400827ZLwVKu','display-name-recommended','level','Skill\x20directory\x20not\x20found:\x20','true','Missing\x20SKILL.md.','example-recommended','metadata.internal=true\x20Skills\x20cannot\x20be\x20uploaded.','Frontmatter\x20name\x20is\x20missing.','503327wMDARM','Replace\x20the\x20symlink\x20with\x20a\x20regular\x20SKILL.md\x20file\x20inside\x20the\x20Skill\x20directory.','number','isSymbolicLink','Add\x20SKILL.md\x20at\x20the\x20Skill\x20directory\x20root.','read','page','metadata.type\x20must\x20be\x20one\x20of\x20write,\x20read,\x20or\x20trainer.','line','slice','Frontmatter\x20description\x20is\x20empty.','isArray','Set\x20metadata.type\x20to\x20write,\x20read,\x20or\x20trainer.','false','service','internal','Fix\x20the\x20Skill\x20metadata\x20before\x20running\x20skill\x20push.','file','logs','search','boolean','auth','type','app','object','220tybfsO','raw','Set\x20name\x20to\x20the\x20Skill\x20directory\x20code.','1061288ryOFYZ','dataset'];a55_0x5068=function(){return _0x176cd5;};return a55_0x5068();}function isRabetbaseCliInvocation(_0x56d545){const _0x22c247=a55_0x7aec6f,_0x266f1a=_0x56d545[_0x22c247(0x1b3)](/\brabetbase\b/i);if(_0x266f1a<0x0)return![];const _0x2bd133=_0x56d545[_0x22c247(0x1a9)](_0x266f1a)[_0x22c247(0x193)](/\blovrabet\b/i)[0x0]??'';return RABETBASE_INVOCATION['test'](_0x2bd133);}function parseFrontmatter(_0xd57fe6){const _0x30ae1d=a55_0x7aec6f,_0x23dea1=_0xd57fe6['match'](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x23dea1)return{'hasFrontmatter':![]};const _0x428bbd=_0x23dea1[0x1]??'',_0x1160be={'hasFrontmatter':!![]};let _0x19218a;try{_0x19218a=a55_0x407961(_0x428bbd);}catch{return _0x1160be;}const _0x2bdc3a=asRecord(_0x19218a);if(!_0x2bdc3a)return _0x1160be;_0x1160be[_0x30ae1d(0x1d7)]=scalarToString(_0x2bdc3a[_0x30ae1d(0x1d7)]),_0x1160be['displayName']=scalarToString(_0x2bdc3a[_0x30ae1d(0x17d)]),_0x1160be['description']=scalarToString(_0x2bdc3a[_0x30ae1d(0x1cc)]),_0x1160be[_0x30ae1d(0x184)]=scalarToString(_0x2bdc3a[_0x30ae1d(0x184)]);const _0x4efd71=asRecord(_0x2bdc3a[_0x30ae1d(0x194)]);return _0x4efd71&&(_0x1160be[_0x30ae1d(0x1b6)]=scalarToString(_0x4efd71[_0x30ae1d(0x1b6)]),_0x1160be[_0x30ae1d(0x1af)]=scalarToBoolean(_0x4efd71[_0x30ae1d(0x1af)])),_0x1160be;}function asRecord(_0x12a6bb){const _0x4e217b=a55_0x7aec6f;if(_0x12a6bb&&typeof _0x12a6bb===_0x4e217b(0x1b8)&&!Array[_0x4e217b(0x1ab)](_0x12a6bb))return _0x12a6bb;return undefined;}function scalarToString(_0x4aa374){const _0x39b4b9=a55_0x7aec6f;if(typeof _0x4aa374==='string')return _0x4aa374[_0x39b4b9(0x18b)]();if(typeof _0x4aa374===_0x39b4b9(0x1a2)||typeof _0x4aa374===_0x39b4b9(0x1b4))return String(_0x4aa374);return undefined;}function scalarToBoolean(_0x181786){if(typeof _0x181786==='boolean')return _0x181786;if(typeof _0x181786==='string')return cleanBoolean(_0x181786);return undefined;}function cleanBoolean(_0x295fa1){const _0x5b30e4=a55_0x7aec6f,_0x37d083=_0x295fa1[_0x5b30e4(0x18b)]()[_0x5b30e4(0x181)]();if(_0x37d083===_0x5b30e4(0x19b))return!![];if(_0x37d083===_0x5b30e4(0x1ad))return![];return undefined;}function issue(_0x4d3ce6,_0xee127d,_0x1cc2e8,_0xd1ea11,_0x32f5e8,_0x20903f){return{'level':_0x4d3ce6,'ruleId':_0xee127d,'file':_0x1cc2e8,'section':_0x20903f,'message':_0xd1ea11,'suggestion':_0x32f5e8};}
|
|
1
|
+
const a55_0x540084=a55_0x5cfb;function a55_0x5cfb(_0x511f98,_0x281257){_0x511f98=_0x511f98-0x172;const _0x55ac0e=a55_0x55ac();let _0x5cfbff=_0x55ac0e[_0x511f98];return _0x5cfbff;}(function(_0x3a0875,_0x326e0c){const _0x6f0957=a55_0x5cfb,_0x3dfbc3=_0x3a0875();while(!![]){try{const _0x55c6ee=parseInt(_0x6f0957(0x191))/0x1*(-parseInt(_0x6f0957(0x1a5))/0x2)+parseInt(_0x6f0957(0x17a))/0x3*(parseInt(_0x6f0957(0x197))/0x4)+-parseInt(_0x6f0957(0x1a6))/0x5*(-parseInt(_0x6f0957(0x1c8))/0x6)+-parseInt(_0x6f0957(0x185))/0x7+parseInt(_0x6f0957(0x19f))/0x8+-parseInt(_0x6f0957(0x176))/0x9*(parseInt(_0x6f0957(0x1a9))/0xa)+parseInt(_0x6f0957(0x18b))/0xb;if(_0x55c6ee===_0x326e0c)break;else _0x3dfbc3['push'](_0x3dfbc3['shift']());}catch(_0x37712b){_0x3dfbc3['push'](_0x3dfbc3['shift']());}}}(a55_0x55ac,0xca9bb));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{resolve}from'node:path';import{parse as a55_0x3e1707}from'yaml';import{CliErrors}from'../../errors.js';import{fileText,scanSkillDirectory}from'../../skills/runtime-skill-sync/local-files.js';const SKILL_FILE=a55_0x540084(0x1c6),SUPPORTED_SKILL_TYPES=new Set([a55_0x540084(0x19a),'read',a55_0x540084(0x1a3)]),TEXT_SKILL_FILE_PATTERN=/(?:^SKILL\.md$|\.(?:md|mdx|txt|json|ya?ml|js|mjs|cjs|ts|tsx|sh|sql))$/i;export function validateSkillDirectory(_0x445a01,_0x5d9324={}){const _0x16b142=a55_0x540084,_0x2df51=resolveSkillDirectoryRoot(_0x445a01),_0x1bbba0=[],_0xfb8fa7=loadRequiredSkillFile(_0x2df51,_0x1bbba0),_0x29d26a=_0xfb8fa7?parseFrontmatter(_0xfb8fa7[_0x16b142(0x1c4)]):{'hasFrontmatter':![]};_0xfb8fa7&&validateFrontmatter(_0xfb8fa7[_0x16b142(0x188)],_0x29d26a,_0x1bbba0);validateRuntimeCliReferences(_0x2df51,_0x1bbba0);const _0x939f38=_0x1bbba0[_0x16b142(0x19b)](_0x445cf8=>_0x445cf8['level']==='error'),_0x217f5a=_0x1bbba0['filter'](_0x4e8378=>_0x4e8378[_0x16b142(0x1a1)]===_0x16b142(0x1ba));return{'ok':_0x939f38['length']===0x0,'dir':_0x2df51,'type':_0x29d26a[_0x16b142(0x1cd)],'errors':_0x939f38,'warnings':_0x217f5a};}function resolveSkillDirectoryRoot(_0x48ffa2){const _0x4ae460=a55_0x540084,_0x144d7b=resolve(_0x48ffa2);if(!existsSync(_0x144d7b))throw CliErrors[_0x4ae460(0x19e)](_0x4ae460(0x1c7)+_0x48ffa2);const _0x25b049=lstatSync(_0x144d7b);if(_0x25b049['isDirectory']())return _0x144d7b;if(_0x25b049[_0x4ae460(0x1ad)]()){const _0x4b1bc1=realpathSync(_0x144d7b);if(lstatSync(_0x4b1bc1)[_0x4ae460(0x1a2)]())return _0x4b1bc1;}throw CliErrors[_0x4ae460(0x19e)]('Skill\x20directory\x20not\x20found:\x20'+_0x48ffa2);}export function throwIfSkillValidationFailed(_0x4c0b87,_0x535db3=![]){const _0x212429=a55_0x540084;if(_0x4c0b87['ok'])return;const _0x54d010=_0x4c0b87[_0x212429(0x17d)]['map'](_0x71f95b=>{const _0x39ae26=_0x212429,_0x41093a=_0x71f95b[_0x39ae26(0x1b7)]?'#'+_0x71f95b[_0x39ae26(0x1b7)]:'';return _0x71f95b['level'][_0x39ae26(0x17c)]()+'\x20'+_0x71f95b['ruleId']+'\x20'+_0x71f95b[_0x39ae26(0x198)]+_0x41093a+':\x20'+_0x71f95b['message']+_0x39ae26(0x18d)+_0x71f95b[_0x39ae26(0x1b9)];});throw CliErrors[_0x212429(0x19e)](_0x212429(0x1c5)+_0x54d010[_0x212429(0x1b1)]('\x0a'),'Fix\x20the\x20Skill\x20metadata\x20before\x20running\x20skill\x20push.');}function loadRequiredSkillFile(_0x46b93e,_0x5de95d){const _0x1c3a7e=a55_0x540084,_0x3a63ed=resolve(_0x46b93e,SKILL_FILE);if(!existsSync(_0x3a63ed))return _0x5de95d[_0x1c3a7e(0x183)](issue(_0x1c3a7e(0x17b),_0x1c3a7e(0x178),SKILL_FILE,_0x1c3a7e(0x1b6),_0x1c3a7e(0x1cb))),undefined;const _0x1716e6=lstatSync(_0x3a63ed);if(_0x1716e6[_0x1c3a7e(0x1ad)]())return _0x5de95d[_0x1c3a7e(0x183)](issue('error','structure-complete',SKILL_FILE,'SKILL.md\x20must\x20be\x20a\x20regular\x20file.',_0x1c3a7e(0x1cc))),undefined;if(!_0x1716e6['isFile']())return _0x5de95d[_0x1c3a7e(0x183)](issue('error',_0x1c3a7e(0x178),SKILL_FILE,'SKILL.md\x20is\x20not\x20a\x20file.',_0x1c3a7e(0x1c2))),undefined;return{'path':SKILL_FILE,'content':readFileSync(_0x3a63ed,_0x1c3a7e(0x180))};}function validateFrontmatter(_0x7b0b48,_0x325eb8,_0xff92a){const _0x394ea7=a55_0x540084;if(!_0x325eb8[_0x394ea7(0x1a0)]){_0xff92a['push'](issue(_0x394ea7(0x17b),'frontmatter-required',_0x7b0b48,_0x394ea7(0x194),_0x394ea7(0x192)));return;}!_0x325eb8['name']?.[_0x394ea7(0x182)]()&&_0xff92a[_0x394ea7(0x183)](issue(_0x394ea7(0x17b),_0x394ea7(0x184),_0x7b0b48,_0x394ea7(0x1c0),'Set\x20name\x20to\x20the\x20Skill\x20directory\x20code.')),!_0x325eb8[_0x394ea7(0x1ce)]?.[_0x394ea7(0x182)]()&&_0xff92a[_0x394ea7(0x183)](issue('warning',_0x394ea7(0x18c),_0x7b0b48,_0x394ea7(0x187),'Set\x20displayName\x20to\x20the\x20human-readable\x20Skill\x20name\x20shown\x20in\x20SkillHub.')),!_0x325eb8[_0x394ea7(0x1a4)]?.[_0x394ea7(0x182)]()&&_0xff92a['push'](issue('warning',_0x394ea7(0x1aa),_0x7b0b48,'Frontmatter\x20example\x20is\x20missing.','Set\x20example\x20to\x20one\x20short\x20user\x20message\x20that\x20can\x20directly\x20trigger\x20this\x20Skill.')),!_0x325eb8[_0x394ea7(0x1c1)]?.['trim']()&&_0xff92a['push'](issue(_0x394ea7(0x17b),_0x394ea7(0x1af),_0x7b0b48,_0x394ea7(0x1a7),_0x394ea7(0x1bf))),_0x325eb8[_0x394ea7(0x1b4)]===!![]&&_0xff92a[_0x394ea7(0x183)](issue('error',_0x394ea7(0x1ac),_0x7b0b48,_0x394ea7(0x1c3),'Remove\x20metadata.internal\x20or\x20set\x20it\x20to\x20false\x20before\x20running\x20skill\x20push.')),_0x325eb8['type']?.[_0x394ea7(0x182)]()&&!SUPPORTED_SKILL_TYPES[_0x394ea7(0x177)](_0x325eb8[_0x394ea7(0x1cd)])&&_0xff92a[_0x394ea7(0x183)](issue(_0x394ea7(0x17b),_0x394ea7(0x184),_0x7b0b48,'metadata.type\x20must\x20be\x20one\x20of\x20write,\x20read,\x20or\x20trainer.',_0x394ea7(0x17e)));}function validateRuntimeCliReferences(_0x223070,_0x305614){const _0x216e3a=a55_0x540084;for(const _0x357883 of findRabetbaseCliInvocations(_0x223070)){_0x305614['push'](issue('warning','rabetbase-cli-reference',_0x357883['file'],_0x216e3a(0x1a8),_0x216e3a(0x1b2),'L'+_0x357883[_0x216e3a(0x1c9)]));}}function a55_0x55ac(){const _0x1b98d9=['Frontmatter\x20name\x20is\x20missing.','description','Add\x20SKILL.md\x20as\x20a\x20regular\x20file\x20at\x20the\x20Skill\x20directory\x20root.','metadata.internal=true\x20Skills\x20cannot\x20be\x20uploaded.','content','Skill\x20validation\x20failed:\x0a','SKILL.md','Skill\x20directory\x20not\x20found:\x20','12yqQRqk','line','search','Add\x20SKILL.md\x20at\x20the\x20Skill\x20directory\x20root.','Replace\x20the\x20symlink\x20with\x20a\x20regular\x20SKILL.md\x20file\x20inside\x20the\x20Skill\x20directory.','type','displayName','page','sql','dataset','object','auth','147717AjdoId','has','structure-complete','slice','4422OXVNdw','error','toUpperCase','errors','Set\x20metadata.type\x20to\x20write,\x20read,\x20or\x20trainer.','registry','utf8','map','trim','push','frontmatter-required','9388260kefTxu','string','Frontmatter\x20displayName\x20is\x20missing.','path','split','artifact','18541864qtxSlR','display-name-recommended','\x20Fix:\x20','isArray','config','boolean','5717DlmLEE','Add\x20frontmatter\x20with\x20name\x20and\x20description.','data','SKILL.md\x20must\x20start\x20with\x20frontmatter.','raw','schema','596jKXBUt','file','flatMap','write','filter','project','bff','validation','4242072hsbppW','hasFrontmatter','level','isDirectory','trainer','example','94mlPySt','133730iuJmBo','Frontmatter\x20description\x20is\x20empty.','This\x20line\x20invokes\x20the\x20rabetbase\x20CLI.\x20rabetbase\x20is\x20a\x20dev-time\x20tool;\x20runtime\x20Skills\x20should\x20drive\x20runtime\x20work\x20through\x20lovrabet\x20commands.','30noqyKV','example-recommended','logs','internal-skill','isSymbolicLink','test','description-required','service','join','If\x20this\x20is\x20a\x20runtime\x20step,\x20replace\x20it\x20with\x20the\x20equivalent\x20lovrabet\x20command.\x20Dev-time\x20discovery\x20or\x20handoff\x20notes\x20can\x20stay.','match','internal','toLowerCase','Missing\x20SKILL.md.','section','false','suggestion','warning','number','workspace','true','name','填写模型触发语义:用户在什么场景应使用本\x20Skill、不要使用的边界和关键词。'];a55_0x55ac=function(){return _0x1b98d9;};return a55_0x55ac();}function findRabetbaseCliInvocations(_0x4ff64f){const _0x274bd9=a55_0x540084;return scanSkillDirectory(_0x4ff64f)[_0x274bd9(0x19b)](_0x143b7f=>TEXT_SKILL_FILE_PATTERN[_0x274bd9(0x1ae)](_0x143b7f[_0x274bd9(0x188)]))[_0x274bd9(0x199)](_0x23a1b4=>{const _0x2d1e03=_0x274bd9,_0x25c96c=fileText(_0x23a1b4);return _0x25c96c['split'](/\r?\n/)['map']((_0x2444cf,_0x19bb0c)=>({'file':_0x23a1b4[_0x2d1e03(0x188)],'line':_0x19bb0c+0x1,'text':_0x2444cf}))['filter'](({text:_0x572a8b})=>isRabetbaseCliInvocation(_0x572a8b))[_0x2d1e03(0x181)](({file:_0x2c56b3,line:_0x3d125a})=>({'file':_0x2c56b3,'line':_0x3d125a}));});}const RABETBASE_SUBCOMMANDS=[a55_0x540084(0x173),a55_0x540084(0x172),a55_0x540084(0x19d),a55_0x540084(0x1cf),a55_0x540084(0x19c),'app',a55_0x540084(0x196),a55_0x540084(0x1b0),a55_0x540084(0x18a),'kb',a55_0x540084(0x18f),a55_0x540084(0x1bc),a55_0x540084(0x193),a55_0x540084(0x175),a55_0x540084(0x1ab),a55_0x540084(0x17f)],RABETBASE_INVOCATION=new RegExp(String[a55_0x540084(0x195)]`\brabetbase\s+(?:${RABETBASE_SUBCOMMANDS[a55_0x540084(0x1b1)]('|')})\b`+String[a55_0x540084(0x195)]`(?:\s+[a-z][\w-]*){0,2}\s+(?:--?[a-z]|[\w.-]+=)`,'i');function isRabetbaseCliInvocation(_0x8e49c7){const _0x4c1698=a55_0x540084,_0x2d6937=_0x8e49c7[_0x4c1698(0x1ca)](/\brabetbase\b/i);if(_0x2d6937<0x0)return![];const _0x3f782f=_0x8e49c7[_0x4c1698(0x179)](_0x2d6937)[_0x4c1698(0x189)](/\blovrabet\b/i)[0x0]??'';return RABETBASE_INVOCATION[_0x4c1698(0x1ae)](_0x3f782f);}function parseFrontmatter(_0x413bfd){const _0x2aaaa7=a55_0x540084,_0xea414a=_0x413bfd[_0x2aaaa7(0x1b3)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0xea414a)return{'hasFrontmatter':![]};const _0x2f966c=_0xea414a[0x1]??'',_0x3630c0={'hasFrontmatter':!![]};let _0x3e5cb0;try{_0x3e5cb0=a55_0x3e1707(_0x2f966c);}catch{return _0x3630c0;}const _0x413376=asRecord(_0x3e5cb0);if(!_0x413376)return _0x3630c0;_0x3630c0[_0x2aaaa7(0x1be)]=scalarToString(_0x413376[_0x2aaaa7(0x1be)]),_0x3630c0[_0x2aaaa7(0x1ce)]=scalarToString(_0x413376[_0x2aaaa7(0x1ce)]),_0x3630c0[_0x2aaaa7(0x1c1)]=scalarToString(_0x413376['description']),_0x3630c0['example']=scalarToString(_0x413376[_0x2aaaa7(0x1a4)]);const _0x2591be=asRecord(_0x413376['metadata']);return _0x2591be&&(_0x3630c0[_0x2aaaa7(0x1cd)]=scalarToString(_0x2591be[_0x2aaaa7(0x1cd)]),_0x3630c0[_0x2aaaa7(0x1b4)]=scalarToBoolean(_0x2591be['internal'])),_0x3630c0;}function asRecord(_0x184b29){const _0x50137b=a55_0x540084;if(_0x184b29&&typeof _0x184b29===_0x50137b(0x174)&&!Array[_0x50137b(0x18e)](_0x184b29))return _0x184b29;return undefined;}function scalarToString(_0x3a14ff){const _0x4d2ef4=a55_0x540084;if(typeof _0x3a14ff===_0x4d2ef4(0x186))return _0x3a14ff[_0x4d2ef4(0x182)]();if(typeof _0x3a14ff===_0x4d2ef4(0x1bb)||typeof _0x3a14ff===_0x4d2ef4(0x190))return String(_0x3a14ff);return undefined;}function scalarToBoolean(_0x23e1c7){const _0x51cab4=a55_0x540084;if(typeof _0x23e1c7===_0x51cab4(0x190))return _0x23e1c7;if(typeof _0x23e1c7===_0x51cab4(0x186))return cleanBoolean(_0x23e1c7);return undefined;}function cleanBoolean(_0x2f50aa){const _0x403f8d=a55_0x540084,_0x50207b=_0x2f50aa['trim']()[_0x403f8d(0x1b5)]();if(_0x50207b===_0x403f8d(0x1bd))return!![];if(_0x50207b===_0x403f8d(0x1b8))return![];return undefined;}function issue(_0x5e76f9,_0x24ec38,_0x47e28e,_0x4e9251,_0x4b7a55,_0x3a3b27){return{'level':_0x5e76f9,'ruleId':_0x24ec38,'file':_0x47e28e,'section':_0x3a3b27,'message':_0x4e9251,'suggestion':_0x4b7a55};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a56_0x2aa429=a56_0x3db8;function a56_0x16c5(){const _0x47b84e=['1XipFmt','sqlcode','3538367MXBaIe','88805VHGsSU','sql','description','bool','sqlName','appCode','str','1751828jIWCxd','dbId','8014944dcgYte','2448687mEqOdh','711DISbsX','111472UMfxZH','detail','Get\x20custom\x20SQL\x20query\x20details\x20by\x20sqlCode','sqlCode','read','sqlContent','verbose','12482162GrGMZf','244kVzsbM','10CMTsaA'];a56_0x16c5=function(){return _0x47b84e;};return a56_0x16c5();}(function(_0x1714f5,_0x5cb2ab){const _0x5af2d2=a56_0x3db8,_0x5dac41=_0x1714f5();while(!![]){try{const _0x7755dc=parseInt(_0x5af2d2(0x98))/0x1*(parseInt(_0x5af2d2(0x89))/0x2)+-parseInt(_0x5af2d2(0x8c))/0x3+-parseInt(_0x5af2d2(0x96))/0x4*(parseInt(_0x5af2d2(0x82))/0x5)+parseInt(_0x5af2d2(0x8b))/0x6+parseInt(_0x5af2d2(0x9a))/0x7+-parseInt(_0x5af2d2(0x8e))/0x8*(parseInt(_0x5af2d2(0x8d))/0x9)+-parseInt(_0x5af2d2(0x97))/0xa*(-parseInt(_0x5af2d2(0x95))/0xb);if(_0x7755dc===_0x5cb2ab)break;else _0x5dac41['push'](_0x5dac41['shift']());}catch(_0x460bcf){_0x5dac41['push'](_0x5dac41['shift']());}}}(a56_0x16c5,0xcfe45));import{getSqlQueryInfo}from'../../core/api-client.js';import{getDbName}from'../../core/db-resolver.js';import{SQLCODE_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';function a56_0x3db8(_0x233ac3,_0x8445e1){_0x233ac3=_0x233ac3-0x82;const _0x16c535=a56_0x16c5();let _0x3db81a=_0x16c535[_0x233ac3];return _0x3db81a;}export const sqlDetail={'service':a56_0x2aa429(0x83),'command':a56_0x2aa429(0x8f),'description':a56_0x2aa429(0x90),'risk':a56_0x2aa429(0x92),'flags':[SQLCODE_FLAG,VERBOSE_FLAG],async 'execute'(_0x4b8df4){const _0x52f135=a56_0x2aa429,_0x3e7bd5=await getSqlQueryInfo(_0x4b8df4[_0x52f135(0x87)],_0x4b8df4[_0x52f135(0x88)](_0x52f135(0x99))),_0x115253=_0x4b8df4[_0x52f135(0x85)](_0x52f135(0x94));if(_0x115253)return{'ok':!![],'data':_0x3e7bd5};const _0x40d8c2=_0x3e7bd5[_0x52f135(0x8a)]?await getDbName(_0x4b8df4[_0x52f135(0x87)],_0x3e7bd5[_0x52f135(0x8a)]):undefined;return{'ok':!![],'data':{'sqlCode':_0x3e7bd5[_0x52f135(0x91)],'sqlName':_0x3e7bd5[_0x52f135(0x86)],'db':_0x40d8c2?_0x40d8c2+'\x20('+_0x3e7bd5['dbId']+')':_0x3e7bd5[_0x52f135(0x8a)]??'','description':_0x3e7bd5[_0x52f135(0x84)]??'','sqlContent':_0x3e7bd5[_0x52f135(0x93)]??''}};}};
|
package/lib/commands/sql/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a57_0x21807a=a57_0x1ce7;function a57_0x1ce7(_0x434455,_0x2e7cd2){_0x434455=_0x434455-0x117;const _0x4f612b=a57_0x4f61();let _0x1ce742=_0x4f612b[_0x434455];return _0x1ce742;}(function(_0x27a2b4,_0x302aba){const _0x3a9bd0=a57_0x1ce7,_0x15e262=_0x27a2b4();while(!![]){try{const _0x2be9e6=-parseInt(_0x3a9bd0(0x123))/0x1+parseInt(_0x3a9bd0(0x125))/0x2*(parseInt(_0x3a9bd0(0x120))/0x3)+parseInt(_0x3a9bd0(0x11f))/0x4*(parseInt(_0x3a9bd0(0x124))/0x5)+-parseInt(_0x3a9bd0(0x118))/0x6+parseInt(_0x3a9bd0(0x129))/0x7+-parseInt(_0x3a9bd0(0x126))/0x8+-parseInt(_0x3a9bd0(0x12b))/0x9*(-parseInt(_0x3a9bd0(0x128))/0xa);if(_0x2be9e6===_0x302aba)break;else _0x15e262['push'](_0x15e262['shift']());}catch(_0x367447){_0x15e262['push'](_0x15e262['shift']());}}}(a57_0x4f61,0xe7681));import{executeSdkSql}from'../../core/sdk-client.js';function a57_0x4f61(){const _0x8726d1=['sqlcode','execResult','isArray','\x20row(s)\x20in\x20','3001476UBtxUg','111009PMIpTS','Execute\x20a\x20custom\x20SQL\x20query\x20by\x20sqlCode','length','1754582IRgxSY','5inyFjC','26idVSNp','12960584LjbZug','execSuccess','150WlECUj','4312917SfKKET','sql','2363571jlESJj','read','SQL\x20execution\x20failed','8785968BOVqgG','now','Returned\x20'];a57_0x4f61=function(){return _0x8726d1;};return a57_0x4f61();}import{SQLCODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';import{parseJsonParams}from'../../utils/params.js';export const sqlExec={'service':a57_0x21807a(0x12a),'command':'exec','description':a57_0x21807a(0x121),'risk':a57_0x21807a(0x12c),'flags':[SQLCODE_FLAG,PARAMS_FLAG],async 'execute'(_0x123daf){const _0x53b720=a57_0x21807a,_0x1475b2=parseJsonParams(_0x123daf['str']('params')),_0x457870=Date[_0x53b720(0x119)](),_0x2a60b5=await executeSdkSql(_0x123daf['str'](_0x53b720(0x11b)),_0x1475b2),_0x5c7fe7=Date[_0x53b720(0x119)]()-_0x457870,_0x596035=_0x2a60b5?.[_0x53b720(0x11c)]??_0x2a60b5,_0x58f9a3=_0x2a60b5?.[_0x53b720(0x127)]??!![];if(!_0x58f9a3)return{'ok':![],'data':{'error':_0x2a60b5?.['execError']||_0x53b720(0x117),'elapsed':_0x5c7fe7},'message':_0x53b720(0x117)};const _0x5c7359=Array[_0x53b720(0x11d)](_0x596035)?_0x596035:[];return{'ok':!![],'data':{'rows':_0x5c7359,'rowCount':_0x5c7359['length'],'elapsed':_0x5c7fe7},'message':_0x53b720(0x11a)+_0x5c7359[_0x53b720(0x122)]+_0x53b720(0x11e)+_0x5c7fe7+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a58_0x3afc(_0x6760f3,_0x44cc57){_0x6760f3=_0x6760f3-0x10e;const _0x574a89=a58_0x574a();let _0x3afce9=_0x574a89[_0x6760f3];return _0x3afce9;}(function(_0xda3ce3,_0x2fd764){const _0x46eccb=a58_0x3afc,_0x2d03d5=_0xda3ce3();while(!![]){try{const _0x5bbbc4=parseInt(_0x46eccb(0x115))/0x1+-parseInt(_0x46eccb(0x117))/0x2*(-parseInt(_0x46eccb(0x112))/0x3)+-parseInt(_0x46eccb(0x118))/0x4+parseInt(_0x46eccb(0x10f))/0x5+-parseInt(_0x46eccb(0x110))/0x6*(parseInt(_0x46eccb(0x10e))/0x7)+-parseInt(_0x46eccb(0x113))/0x8*(-parseInt(_0x46eccb(0x116))/0x9)+-parseInt(_0x46eccb(0x111))/0xa*(parseInt(_0x46eccb(0x114))/0xb);if(_0x5bbbc4===_0x2fd764)break;else _0x2d03d5['push'](_0x2d03d5['shift']());}catch(_0x3e027c){_0x2d03d5['push'](_0x2d03d5['shift']());}}}(a58_0x574a,0x56f32));import{sqlDetail}from'../../commands/sql/detail.js';import{sqlExec}from'../../commands/sql/exec.js';export const sqlDefinitions=[sqlDetail,sqlExec];function a58_0x574a(){const _0x43501b=['3690467UCMluQ','602529TkNSyj','63207qIDGpm','22888AttuLx','1766484UIMRla','13006WyVUft','2324780dLVaWl','1434tvBmNX','20ITVMsx','78QvtQVZ','624pdzljn'];a58_0x574a=function(){return _0x43501b;};return a58_0x574a();}
|
package/lib/commands/update.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a59_0x3538cf=a59_0x28b6;(function(_0x1ed0ce,_0x24d3e5){const _0x1dad99=a59_0x28b6,_0x5cbf9b=_0x1ed0ce();while(!![]){try{const _0x26498d=parseInt(_0x1dad99(0x136))/0x1*(-parseInt(_0x1dad99(0x142))/0x2)+-parseInt(_0x1dad99(0x129))/0x3+parseInt(_0x1dad99(0x160))/0x4*(-parseInt(_0x1dad99(0x138))/0x5)+-parseInt(_0x1dad99(0x139))/0x6*(-parseInt(_0x1dad99(0x15e))/0x7)+parseInt(_0x1dad99(0x11c))/0x8+parseInt(_0x1dad99(0x15a))/0x9*(parseInt(_0x1dad99(0x128))/0xa)+parseInt(_0x1dad99(0x14d))/0xb*(parseInt(_0x1dad99(0x12b))/0xc);if(_0x26498d===_0x24d3e5)break;else _0x5cbf9b['push'](_0x5cbf9b['shift']());}catch(_0x498c20){_0x5cbf9b['push'](_0x5cbf9b['shift']());}}}(a59_0x30e7,0xedf3d));import{spawnSync}from'node:child_process';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{LOVRABET_NPM_PACKAGE_NAME,LOVRABET_SKILL_SOURCE,NPM_REGISTRY_BASE_URL}from'../constant/distribution.js';import{resolveNpmBin}from'../utils/platform.js';import{getCliVersion}from'../utils/version.js';import{LOVRABET_SKIP_NPX_SKILLS_ENV,runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';const updateFlags=[{'name':'latest','type':a59_0x3538cf(0x147),'description':a59_0x3538cf(0x14f),'default':![]},{'name':'beta','type':a59_0x3538cf(0x147),'description':a59_0x3538cf(0x135),'default':![]},{'name':a59_0x3538cf(0x134),'type':a59_0x3538cf(0x13f),'description':a59_0x3538cf(0x13b)},{'name':'no-skills','type':a59_0x3538cf(0x147),'description':a59_0x3538cf(0x161),'default':![]},{'name':a59_0x3538cf(0x121),'type':a59_0x3538cf(0x147),'description':'Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','default':!![],'hidden':!![]}];function parseSemver(_0x1bd352){const _0x34fbfc=a59_0x3538cf,_0x195679=_0x1bd352[_0x34fbfc(0x169)]()[_0x34fbfc(0x143)](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0x195679)return null;return{'major':Number(_0x195679[0x1]),'minor':Number(_0x195679[0x2]),'patch':Number(_0x195679[0x3]),'prerelease':_0x195679[0x4]};}function compareSemver(_0x103ebf,_0x4b5e4e){const _0x246483=a59_0x3538cf,_0x142bd3=parseSemver(_0x103ebf),_0x57edbf=parseSemver(_0x4b5e4e);if(!_0x142bd3||!_0x57edbf)throw CliErrors[_0x246483(0x122)]('Version\x20comparison\x20failed.',_0x246483(0x12c));for(const _0x4d072c of[_0x246483(0x126),'minor',_0x246483(0x123)]){if(_0x142bd3[_0x4d072c]<_0x57edbf[_0x4d072c])return-0x1;if(_0x142bd3[_0x4d072c]>_0x57edbf[_0x4d072c])return 0x1;}if(!_0x142bd3[_0x246483(0x13d)]&&!_0x57edbf['prerelease'])return 0x0;if(!_0x142bd3[_0x246483(0x13d)])return 0x1;if(!_0x57edbf[_0x246483(0x13d)])return-0x1;if(_0x142bd3[_0x246483(0x13d)]===_0x57edbf[_0x246483(0x13d)])return 0x0;return _0x142bd3[_0x246483(0x13d)]<_0x57edbf['prerelease']?-0x1:0x1;}function getRequestedVersion(_0x3ab91c){const _0x2a6499=a59_0x3538cf,_0x5f1cb7=_0x3ab91c[_0x2a6499(0x14b)](_0x2a6499(0x134))[_0x2a6499(0x169)]();if(_0x5f1cb7)return _0x5f1cb7;return String(_0x3ab91c[_0x2a6499(0x14a)]?.[0x0]??'')['trim']();}function shouldSkipCliBuiltInSkill(_0x31f342){const _0x2c787b=a59_0x3538cf;return _0x31f342[_0x2c787b(0x157)]('no-skills')||_0x31f342[_0x2c787b(0x137)](_0x2c787b(0x121))===![];}async function validateUpdateFlags(_0x4d8cb6){const _0x90c22e=a59_0x3538cf,_0x1f5b8f=getRequestedVersion(_0x4d8cb6),_0x35227b=[_0x4d8cb6[_0x90c22e(0x157)](_0x90c22e(0x12d))?_0x90c22e(0x12d):'',_0x4d8cb6[_0x90c22e(0x157)]('beta')?_0x90c22e(0x132):'',_0x1f5b8f?_0x90c22e(0x134):'']['filter'](Boolean);if(_0x35227b[_0x90c22e(0x145)]>0x1)throw CliErrors['validation'](_0x90c22e(0x120),'Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.');if(_0x1f5b8f&&!parseSemver(_0x1f5b8f))throw CliErrors['validation']('Invalid\x20version:\x20'+_0x1f5b8f,_0x90c22e(0x154));}async function fetchNpmDistTags(){const _0x74b61e=a59_0x3538cf;try{const _0x121a88=NPM_REGISTRY_BASE_URL+_0x74b61e(0x12a)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x74b61e(0x158),_0x2bdbfb=await fetch(_0x121a88,{'signal':AbortSignal[_0x74b61e(0x15d)](0x2710)});if(!_0x2bdbfb['ok'])return null;const _0x341af1=await _0x2bdbfb[_0x74b61e(0x15b)]();if(!_0x341af1||typeof _0x341af1!==_0x74b61e(0x141))return null;return Object[_0x74b61e(0x15f)](Object[_0x74b61e(0x149)](_0x341af1)[_0x74b61e(0x148)](([,_0x4fd727])=>typeof _0x4fd727===_0x74b61e(0x13f)&&_0x4fd727['trim']())['map'](([_0x53f3dc,_0x173ab7])=>[_0x53f3dc,String(_0x173ab7)['trim']()]));}catch{return null;}}function a59_0x30e7(){const _0x2f932f=['match','\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(','length','Already\x20up\x20to\x20date\x20(v','boolean','filter','entries','args','str','\x20\x20Run\x20manually:\x20lovrabet\x20cli-skill\x20install','22VAKdNq','\x20->\x20','Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag','Already\x20on\x20requested\x20version\x20(v','source','npm','=1).','Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.','unknown','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','bool','/dist-tags','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','9mdMikd','json','skipped','timeout','7riGnOd','fromEntries','4CocBcn','Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','pipe','toString','Update\x20','Update\x20failed:\x20','error','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','Updating\x20','trim','\x20version\x20from\x20npm.','\x20\x20Try\x20manually:\x20npm\x20install\x20-g\x20','nonInteractive','2011048xzKpBI','warn','message','join','--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.','skills','validation','patch','log','status','major','inherit','12319470xkiULR','3633957UVKxRo','/-/package/','5975988jRFjwg','Use\x20full\x20semver\x20versions\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.','latest','\x20CLI\x20from\x20npm','Current\x20version:\x20','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','write','beta','cwd','version','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','443SSEUXs','flag','4160710klxqjs','4681338cEahZu','exit\x20','Install\x20a\x20specific\x20CLI\x20version','stderr','prerelease','update','string','Unable\x20to\x20resolve\x20','object','1090iEQhOx'];a59_0x30e7=function(){return _0x2f932f;};return a59_0x30e7();}async function resolveTargetVersion(_0xa448e4){const _0x255623=a59_0x3538cf,_0x4de5e9=getRequestedVersion(_0xa448e4);if(_0x4de5e9)return{'version':_0x4de5e9,'source':_0x255623(0x134)};const _0xd026aa=_0xa448e4[_0x255623(0x157)](_0x255623(0x132))?_0x255623(0x132):'latest',_0x3710bc=await fetchNpmDistTags(),_0x6bfda1=_0x3710bc?.[_0xd026aa];if(!_0x6bfda1)return null;return{'version':_0x6bfda1,'source':_0xd026aa};}function shouldInstallTarget(_0x2fb6c5,_0x1a8e3b){const _0x20bebb=a59_0x3538cf,_0x4cccb0=compareSemver(_0x2fb6c5,_0x1a8e3b[_0x20bebb(0x134)]);if(_0x1a8e3b[_0x20bebb(0x151)]==='version')return _0x4cccb0!==0x0;return _0x4cccb0<0x0;}function installCliPackage(_0x59fc45,_0x1be990){const _0x1e7451=a59_0x3538cf,_0x941ae8=resolveNpmBin(_0x1e7451(0x152)),_0x32edd1=['install','-g',LOVRABET_NPM_PACKAGE_NAME+'@'+_0x59fc45];console[_0x1e7451(0x124)]('*\x20'+[_0x941ae8,..._0x32edd1][_0x1e7451(0x11f)]('\x20'));const _0x421689=spawnSync(_0x941ae8,_0x32edd1,{'cwd':process[_0x1e7451(0x133)](),'stdio':_0x1be990?'pipe':_0x1e7451(0x127),'env':process.env,'shell':![]});if(_0x421689['status']===0x0)return{'ok':!![]};let _0x4adc1d=_0x421689['error']?.[_0x1e7451(0x11e)]||_0x1e7451(0x13a)+(_0x421689[_0x1e7451(0x125)]??_0x1e7451(0x155));if(_0x1be990){const _0x1b0572=_0x421689[_0x1e7451(0x13c)]?_0x421689[_0x1e7451(0x13c)][_0x1e7451(0x163)]()[_0x1e7451(0x169)]():'',_0x5067bc=_0x421689['stdout']?_0x421689['stdout']['toString']()[_0x1e7451(0x169)]():'';if(_0x1b0572)_0x4adc1d=_0x1b0572;else{if(_0x5067bc)_0x4adc1d=_0x5067bc;}}return{'ok':![],'error':_0x4adc1d};}async function installCliBuiltInSkill(_0x1b1950){const _0x58bcfe=a59_0x3538cf;console[_0x58bcfe(0x124)]('Checking\x20CLI\x20Built-in\x20Skill...');const _0x435692=runNpxSkillsAddGlobal(process[_0x58bcfe(0x133)](),LOVRABET_SKILL_SOURCE,{'stdio':_0x1b1950?_0x58bcfe(0x162):_0x58bcfe(0x127)});if(_0x435692[_0x58bcfe(0x15c)]){console[_0x58bcfe(0x124)](_0x58bcfe(0x144)+LOVRABET_SKIP_NPX_SKILLS_ENV+_0x58bcfe(0x153));return;}if(_0x435692['ok']){console['log'](_0x58bcfe(0x167));return;}console[_0x58bcfe(0x11d)](_0x58bcfe(0x156)+(_0x435692[_0x58bcfe(0x166)]||_0x58bcfe(0x155))),console[_0x58bcfe(0x124)](_0x58bcfe(0x14c));}async function execute(_0x752822){const _0x450ee1=a59_0x3538cf;await validateUpdateFlags(_0x752822);const _0x48d4ae=getCliVersion();console[_0x450ee1(0x124)](_0x450ee1(0x12f)+_0x48d4ae),console[_0x450ee1(0x124)]('Checking\x20npm\x20dist-tags...');const _0x4dbf47=await resolveTargetVersion(_0x752822);if(!_0x4dbf47){const _0x3d822e=_0x752822[_0x450ee1(0x157)](_0x450ee1(0x132))?_0x450ee1(0x132):_0x450ee1(0x12d),_0xc072e4=_0x450ee1(0x140)+_0x3d822e+_0x450ee1(0x16a);return console[_0x450ee1(0x11d)](_0xc072e4),console[_0x450ee1(0x124)]('\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20'+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x3d822e),{'ok':![]};}if(!shouldInstallTarget(_0x48d4ae,_0x4dbf47)){const _0x23dd5c=_0x4dbf47[_0x450ee1(0x151)]===_0x450ee1(0x134)?_0x450ee1(0x150)+_0x4dbf47[_0x450ee1(0x134)]+').':_0x450ee1(0x146)+_0x4dbf47[_0x450ee1(0x134)]+').';return console[_0x450ee1(0x124)](_0x23dd5c),shouldSkipCliBuiltInSkill(_0x752822)?console[_0x450ee1(0x124)](_0x450ee1(0x130)):await installCliBuiltInSkill(_0x752822['nonInteractive']),{'ok':!![]};}console[_0x450ee1(0x124)](_0x450ee1(0x168)+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0x48d4ae+_0x450ee1(0x14e)+_0x4dbf47[_0x450ee1(0x134)]);const _0x5ea583=installCliPackage(_0x4dbf47['version'],_0x752822[_0x450ee1(0x16c)]);if(!_0x5ea583['ok']){const _0x475f59=_0x450ee1(0x165)+(_0x5ea583[_0x450ee1(0x166)]||'unknown');return console[_0x450ee1(0x166)](_0x475f59),console[_0x450ee1(0x124)](_0x450ee1(0x16b)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x4dbf47[_0x450ee1(0x134)]),{'ok':![]};}return console[_0x450ee1(0x124)]('Updated\x20to\x20v'+_0x4dbf47[_0x450ee1(0x134)]+'.'),console[_0x450ee1(0x124)](_0x450ee1(0x159)),shouldSkipCliBuiltInSkill(_0x752822)?console[_0x450ee1(0x124)]('Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).'):await installCliBuiltInSkill(_0x752822['nonInteractive']),{'ok':!![]};}function a59_0x28b6(_0x4ce56d,_0x32942f){_0x4ce56d=_0x4ce56d-0x11c;const _0x30e787=a59_0x30e7();let _0x28b693=_0x30e787[_0x4ce56d];return _0x28b693;}export const updateDefinition={'service':a59_0x3538cf(0x13e),'command':'run','description':a59_0x3538cf(0x164)+CLI_BIN_NAME+a59_0x3538cf(0x12e),'risk':a59_0x3538cf(0x131),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a59_0x34e122=a59_0x4bf6;(function(_0x119075,_0x2173f7){const _0x7b06d4=a59_0x4bf6,_0x4b0d15=_0x119075();while(!![]){try{const _0x1701e7=-parseInt(_0x7b06d4(0xf2))/0x1*(-parseInt(_0x7b06d4(0x123))/0x2)+parseInt(_0x7b06d4(0x13a))/0x3*(-parseInt(_0x7b06d4(0x10b))/0x4)+-parseInt(_0x7b06d4(0x11a))/0x5+-parseInt(_0x7b06d4(0xf5))/0x6+-parseInt(_0x7b06d4(0x103))/0x7*(-parseInt(_0x7b06d4(0x10e))/0x8)+parseInt(_0x7b06d4(0x102))/0x9*(parseInt(_0x7b06d4(0x112))/0xa)+-parseInt(_0x7b06d4(0x132))/0xb;if(_0x1701e7===_0x2173f7)break;else _0x4b0d15['push'](_0x4b0d15['shift']());}catch(_0x545876){_0x4b0d15['push'](_0x4b0d15['shift']());}}}(a59_0xacee,0xe155a));import{spawnSync}from'node:child_process';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME}from'../constant/cli.js';function a59_0x4bf6(_0x495265,_0x2c65e3){_0x495265=_0x495265-0xf1;const _0xaceeae=a59_0xacee();let _0x4bf66d=_0xaceeae[_0x495265];return _0x4bf66d;}import{LOVRABET_NPM_PACKAGE_NAME,LOVRABET_SKILL_SOURCE,NPM_REGISTRY_BASE_URL}from'../constant/distribution.js';import{resolveNpmBin}from'../utils/platform.js';import{getCliVersion}from'../utils/version.js';import{LOVRABET_SKIP_NPX_SKILLS_ENV,runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';const updateFlags=[{'name':a59_0x34e122(0x117),'type':a59_0x34e122(0x100),'description':a59_0x34e122(0x133),'default':![]},{'name':a59_0x34e122(0xf4),'type':a59_0x34e122(0x100),'description':'Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','default':![]},{'name':a59_0x34e122(0x114),'type':a59_0x34e122(0x137),'description':a59_0x34e122(0x13d)},{'name':'no-skills','type':'boolean','description':a59_0x34e122(0x107),'default':![]},{'name':a59_0x34e122(0x109),'type':a59_0x34e122(0x100),'description':a59_0x34e122(0x131),'default':!![],'hidden':!![]}];function parseSemver(_0x4f2b95){const _0x477a77=a59_0x34e122,_0x3cf82c=_0x4f2b95[_0x477a77(0x136)]()[_0x477a77(0x13f)](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0x3cf82c)return null;return{'major':Number(_0x3cf82c[0x1]),'minor':Number(_0x3cf82c[0x2]),'patch':Number(_0x3cf82c[0x3]),'prerelease':_0x3cf82c[0x4]};}function a59_0xacee(){const _0x35cf5e=['message','Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.','2199513gmyqAa','fromEntries','Version\x20comparison\x20failed.','Install\x20a\x20specific\x20CLI\x20version','status','match','source','json','1486BMBnAi','Updating\x20','beta','838314xprRbd','unknown','patch','Unable\x20to\x20resolve\x20','\x20\x20Run\x20manually:\x20lovrabet\x20cli-skill\x20install','pipe','run','log','args','Current\x20version:\x20','cwd','boolean','nonInteractive','18558KxQfYr','88613wtKaoZ','--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.','timeout','minor','Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','skipped','skills','/-/package/','4rIqwoF','Updated\x20to\x20v','\x20\x20Try\x20manually:\x20npm\x20install\x20-g\x20','976GbQhTd','error','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','filter','3110fDsngO','warn','version','npm','length','latest','bool','validation','2885535AZxsQs','/dist-tags','install','Checking\x20npm\x20dist-tags...','Update\x20','write','Already\x20on\x20requested\x20version\x20(v','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','2238wIKkjr','inherit','flag','Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','Checking\x20CLI\x20Built-in\x20Skill...','Use\x20full\x20semver\x20versions\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.','\x20version\x20from\x20npm.','toString','prerelease','\x20CLI\x20from\x20npm','stdout','major','stderr','Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','16231017hkzlEY','Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag','Invalid\x20version:\x20','=1).','trim','string'];a59_0xacee=function(){return _0x35cf5e;};return a59_0xacee();}function compareSemver(_0xf73326,_0x439299){const _0x54efc9=a59_0x34e122,_0x25cef9=parseSemver(_0xf73326),_0x131ba4=parseSemver(_0x439299);if(!_0x25cef9||!_0x131ba4)throw CliErrors[_0x54efc9(0x119)](_0x54efc9(0x13c),_0x54efc9(0x129));for(const _0x1ed689 of[_0x54efc9(0x12f),_0x54efc9(0x106),_0x54efc9(0xf7)]){if(_0x25cef9[_0x1ed689]<_0x131ba4[_0x1ed689])return-0x1;if(_0x25cef9[_0x1ed689]>_0x131ba4[_0x1ed689])return 0x1;}if(!_0x25cef9[_0x54efc9(0x12c)]&&!_0x131ba4[_0x54efc9(0x12c)])return 0x0;if(!_0x25cef9['prerelease'])return 0x1;if(!_0x131ba4[_0x54efc9(0x12c)])return-0x1;if(_0x25cef9[_0x54efc9(0x12c)]===_0x131ba4[_0x54efc9(0x12c)])return 0x0;return _0x25cef9[_0x54efc9(0x12c)]<_0x131ba4[_0x54efc9(0x12c)]?-0x1:0x1;}function getRequestedVersion(_0x445344){const _0x10006e=a59_0x34e122,_0x5bfb89=_0x445344['str'](_0x10006e(0x114))[_0x10006e(0x136)]();if(_0x5bfb89)return _0x5bfb89;return String(_0x445344[_0x10006e(0xfd)]?.[0x0]??'')[_0x10006e(0x136)]();}function shouldSkipCliBuiltInSkill(_0x9d01d8){const _0x329e1d=a59_0x34e122;return _0x9d01d8['bool']('no-skills')||_0x9d01d8[_0x329e1d(0x125)](_0x329e1d(0x109))===![];}async function validateUpdateFlags(_0x4142fe){const _0x2e7b5d=a59_0x34e122,_0x37a4e4=getRequestedVersion(_0x4142fe),_0x79aa16=[_0x4142fe[_0x2e7b5d(0x118)](_0x2e7b5d(0x117))?_0x2e7b5d(0x117):'',_0x4142fe['bool'](_0x2e7b5d(0xf4))?'beta':'',_0x37a4e4?'version':''][_0x2e7b5d(0x111)](Boolean);if(_0x79aa16[_0x2e7b5d(0x116)]>0x1)throw CliErrors[_0x2e7b5d(0x119)](_0x2e7b5d(0x104),_0x2e7b5d(0x139));if(_0x37a4e4&&!parseSemver(_0x37a4e4))throw CliErrors[_0x2e7b5d(0x119)](_0x2e7b5d(0x134)+_0x37a4e4,_0x2e7b5d(0x126));}async function fetchNpmDistTags(){const _0xdfc378=a59_0x34e122;try{const _0x2d3919=NPM_REGISTRY_BASE_URL+_0xdfc378(0x10a)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0xdfc378(0x11b),_0x312b34=await fetch(_0x2d3919,{'signal':AbortSignal[_0xdfc378(0x105)](0x2710)});if(!_0x312b34['ok'])return null;const _0x354806=await _0x312b34[_0xdfc378(0xf1)]();if(!_0x354806||typeof _0x354806!=='object')return null;return Object[_0xdfc378(0x13b)](Object['entries'](_0x354806)[_0xdfc378(0x111)](([,_0x5ecaba])=>typeof _0x5ecaba===_0xdfc378(0x137)&&_0x5ecaba[_0xdfc378(0x136)]())['map'](([_0x4947ed,_0x50c1bd])=>[_0x4947ed,String(_0x50c1bd)[_0xdfc378(0x136)]()]));}catch{return null;}}async function resolveTargetVersion(_0x4de612){const _0x23e5e8=a59_0x34e122,_0x3caede=getRequestedVersion(_0x4de612);if(_0x3caede)return{'version':_0x3caede,'source':'version'};const _0x12a133=_0x4de612[_0x23e5e8(0x118)](_0x23e5e8(0xf4))?_0x23e5e8(0xf4):_0x23e5e8(0x117),_0x3d602b=await fetchNpmDistTags(),_0x18962c=_0x3d602b?.[_0x12a133];if(!_0x18962c)return null;return{'version':_0x18962c,'source':_0x12a133};}function shouldInstallTarget(_0x3491fb,_0x174bfe){const _0x48e387=a59_0x34e122,_0x3d7be3=compareSemver(_0x3491fb,_0x174bfe[_0x48e387(0x114)]);if(_0x174bfe[_0x48e387(0x140)]===_0x48e387(0x114))return _0x3d7be3!==0x0;return _0x3d7be3<0x0;}function installCliPackage(_0x3ad569,_0x31205c){const _0x2c1645=a59_0x34e122,_0x20a58d=resolveNpmBin(_0x2c1645(0x115)),_0x587a0a=[_0x2c1645(0x11c),'-g',LOVRABET_NPM_PACKAGE_NAME+'@'+_0x3ad569];console[_0x2c1645(0xfc)]('*\x20'+[_0x20a58d,..._0x587a0a]['join']('\x20'));const _0x5ca439=spawnSync(_0x20a58d,_0x587a0a,{'cwd':process[_0x2c1645(0xff)](),'stdio':_0x31205c?_0x2c1645(0xfa):_0x2c1645(0x124),'env':process.env,'shell':![]});if(_0x5ca439['status']===0x0)return{'ok':!![]};let _0x3bf5f0=_0x5ca439[_0x2c1645(0x10f)]?.[_0x2c1645(0x138)]||'exit\x20'+(_0x5ca439[_0x2c1645(0x13e)]??_0x2c1645(0xf6));if(_0x31205c){const _0x57820b=_0x5ca439['stderr']?_0x5ca439[_0x2c1645(0x130)]['toString']()[_0x2c1645(0x136)]():'',_0x34a52b=_0x5ca439[_0x2c1645(0x12e)]?_0x5ca439[_0x2c1645(0x12e)][_0x2c1645(0x12b)]()[_0x2c1645(0x136)]():'';if(_0x57820b)_0x3bf5f0=_0x57820b;else{if(_0x34a52b)_0x3bf5f0=_0x34a52b;}}return{'ok':![],'error':_0x3bf5f0};}async function installCliBuiltInSkill(_0x3ac546){const _0xc0b614=a59_0x34e122;console[_0xc0b614(0xfc)](_0xc0b614(0x128));const _0x11ad10=runNpxSkillsAddGlobal(process[_0xc0b614(0xff)](),LOVRABET_SKILL_SOURCE,{'stdio':_0x3ac546?_0xc0b614(0xfa):_0xc0b614(0x124)});if(_0x11ad10[_0xc0b614(0x108)]){console[_0xc0b614(0xfc)]('\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20('+LOVRABET_SKIP_NPX_SKILLS_ENV+_0xc0b614(0x135));return;}if(_0x11ad10['ok']){console[_0xc0b614(0xfc)](_0xc0b614(0x127));return;}console[_0xc0b614(0x113)]('\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20'+(_0x11ad10[_0xc0b614(0x10f)]||'unknown')),console['log'](_0xc0b614(0xf9));}async function execute(_0x2fd3cf){const _0x425c3f=a59_0x34e122;await validateUpdateFlags(_0x2fd3cf);const _0x15aff3=getCliVersion();console[_0x425c3f(0xfc)](_0x425c3f(0xfe)+_0x15aff3),console['log'](_0x425c3f(0x11d));const _0x5b513f=await resolveTargetVersion(_0x2fd3cf);if(!_0x5b513f){const _0x3cee88=_0x2fd3cf[_0x425c3f(0x118)](_0x425c3f(0xf4))?_0x425c3f(0xf4):'latest',_0x9ad4cb=_0x425c3f(0xf8)+_0x3cee88+_0x425c3f(0x12a);return console[_0x425c3f(0x113)](_0x9ad4cb),console['log'](_0x425c3f(0x122)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x3cee88),{'ok':![]};}if(!shouldInstallTarget(_0x15aff3,_0x5b513f)){const _0x125e88=_0x5b513f[_0x425c3f(0x140)]===_0x425c3f(0x114)?_0x425c3f(0x120)+_0x5b513f[_0x425c3f(0x114)]+').':'Already\x20up\x20to\x20date\x20(v'+_0x5b513f[_0x425c3f(0x114)]+').';return console[_0x425c3f(0xfc)](_0x125e88),shouldSkipCliBuiltInSkill(_0x2fd3cf)?console[_0x425c3f(0xfc)](_0x425c3f(0x110)):await installCliBuiltInSkill(_0x2fd3cf[_0x425c3f(0x101)]),{'ok':!![]};}console['log'](_0x425c3f(0xf3)+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0x15aff3+'\x20->\x20'+_0x5b513f['version']);const _0x5a793a=installCliPackage(_0x5b513f[_0x425c3f(0x114)],_0x2fd3cf[_0x425c3f(0x101)]);if(!_0x5a793a['ok']){const _0x1b8881='Update\x20failed:\x20'+(_0x5a793a[_0x425c3f(0x10f)]||_0x425c3f(0xf6));return console[_0x425c3f(0x10f)](_0x1b8881),console[_0x425c3f(0xfc)](_0x425c3f(0x10d)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x5b513f['version']),{'ok':![]};}return console[_0x425c3f(0xfc)](_0x425c3f(0x10c)+_0x5b513f[_0x425c3f(0x114)]+'.'),console[_0x425c3f(0xfc)](_0x425c3f(0x121)),shouldSkipCliBuiltInSkill(_0x2fd3cf)?console[_0x425c3f(0xfc)](_0x425c3f(0x110)):await installCliBuiltInSkill(_0x2fd3cf[_0x425c3f(0x101)]),{'ok':!![]};}export const updateDefinition={'service':'update','command':a59_0x34e122(0xfb),'description':a59_0x34e122(0x11e)+CLI_BIN_NAME+a59_0x34e122(0x12d),'risk':a59_0x34e122(0x11f),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a60_0x105407=a60_0x2c97;(function(_0xe15bee,_0x50cf45){const _0x515b42=a60_0x2c97,_0x4dfa90=_0xe15bee();while(!![]){try{const _0x55493b=-parseInt(_0x515b42(0x203))/0x1+-parseInt(_0x515b42(0x1d3))/0x2+parseInt(_0x515b42(0x201))/0x3+-parseInt(_0x515b42(0x1f7))/0x4*(-parseInt(_0x515b42(0x1dd))/0x5)+parseInt(_0x515b42(0x1da))/0x6*(parseInt(_0x515b42(0x1f0))/0x7)+parseInt(_0x515b42(0x1ee))/0x8+-parseInt(_0x515b42(0x1d8))/0x9;if(_0x55493b===_0x50cf45)break;else _0x4dfa90['push'](_0x4dfa90['shift']());}catch(_0x4d5ac3){_0x4dfa90['push'](_0x4dfa90['shift']());}}}(a60_0x126e,0x57983));import{CLI_BIN_NAME}from'../../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../../constant/env.js';import{CliErrors}from'../../errors.js';import{readConfigFile,resolveWriteConfigPath,writeConfigFile}from'../../context.js';import{findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../../commands/app/eligibility.js';const WORKSPACE_USE_FLAGS=[{'name':'app','type':a60_0x105407(0x1df),'description':a60_0x105407(0x1e5)},{'name':a60_0x105407(0x1e6),'type':'string','description':a60_0x105407(0x1d2)},{'name':'env','type':a60_0x105407(0x1df),'description':'Target\x20environment','enum':[...RUNTIME_ENV_VALUES]},{'name':a60_0x105407(0x1f1),'type':a60_0x105407(0x1ef),'description':'Compatibility\x20flag;\x20workspace\x20config\x20updates\x20are\x20non-interactive','default':![]}];async function executeWorkspaceUse(_0x578d03,_0x2e3ea0){const _0x1c134b=a60_0x105407,_0x254ee3=_0x578d03['str'](_0x1c134b(0x200))[_0x1c134b(0x1e3)](),_0x4f0301=_0x578d03[_0x1c134b(0x1f2)]('appcode')['trim'](),_0x1170d8=_0x578d03[_0x1c134b(0x1f2)](_0x1c134b(0x1de))[_0x1c134b(0x1e3)](),_0x434334=resolveWorkspaceEnv(_0x1170d8||_0x578d03[_0x1c134b(0x1db)]||DEFAULT_CONFIG_VALUES[_0x1c134b(0x1de)]);if(!_0x254ee3&&!_0x4f0301)throw CliErrors['validation']('Missing\x20workspace\x20app\x20selector.',_0x1c134b(0x1d5)+CLI_BIN_NAME+_0x1c134b(0x1fa)+_0x2e3ea0+_0x1c134b(0x1f9)+CLI_BIN_NAME+'\x20workspace\x20'+_0x2e3ea0+_0x1c134b(0x1fd));const _0x3b3361=_0x4f0301||await resolveRemoteAppCode({'command':_0x2e3ea0,'appName':_0x254ee3,'env':_0x434334,'accessKey':_0x578d03[_0x1c134b(0x1d9)]}),_0x1374b2=writeWorkspaceConfig({'command':_0x2e3ea0,'appName':_0x254ee3,'appcode':_0x3b3361,'env':_0x434334,'shouldWriteEnv':!!_0x1170d8,'accessKey':_0x578d03[_0x1c134b(0x1d9)]});return{'ok':!![],'data':{'configPath':_0x1374b2,'app':_0x254ee3||null,'appcode':_0x3b3361,'env':_0x1170d8?_0x434334:null,'accessKeyWritten':![],'command':_0x1c134b(0x1dc)+_0x2e3ea0},'message':buildWorkspaceMessage(_0x1374b2,_0x254ee3,_0x3b3361,_0x1170d8?_0x434334:undefined)};}async function resolveRemoteAppCode(_0x1ce03d){const _0x19cb0c=a60_0x105407;if(!_0x1ce03d[_0x19cb0c(0x1d9)])throw CliErrors['authRequired'](_0x19cb0c(0x1d0)+CLI_BIN_NAME+_0x19cb0c(0x1fa)+_0x1ce03d[_0x19cb0c(0x202)]+'.');const {setActiveAK:_0x1c51aa}=await import(_0x19cb0c(0x1f6)),{getRemoteAppList:_0x4f54d5}=await import(_0x19cb0c(0x1fe));_0x1c51aa(_0x1ce03d[_0x19cb0c(0x1d9)]);const _0x24dbba=await _0x4f54d5({'env':_0x1ce03d[_0x19cb0c(0x1de)],'accessKey':_0x1ce03d[_0x19cb0c(0x1d9)],'noCache':![]}),_0x32ec12=findAppByName(_0x24dbba[_0x19cb0c(0x1d1)],_0x1ce03d['appName']);if(_0x32ec12&&!isRuntimeAccessibleApp(_0x32ec12))throw runtimeInaccessibleAppError(_0x32ec12,'\x22'+_0x1ce03d['appName']+'\x22');const _0x177794=_0x32ec12?.[_0x19cb0c(0x1f5)]?.[_0x19cb0c(0x1e3)]();if(_0x177794)return _0x177794;const _0xc5085c=_0x24dbba[_0x19cb0c(0x1d1)][_0x19cb0c(0x204)](_0x5ec5b9=>_0x5ec5b9[_0x19cb0c(0x1eb)])[_0x19cb0c(0x1e0)](Boolean),_0x54bd94=_0xc5085c['length']?_0x19cb0c(0x1e8)+Array[_0x19cb0c(0x1e9)](new Set(_0xc5085c))[_0x19cb0c(0x1e4)](',\x20')+'.':'Run\x20`'+CLI_BIN_NAME+_0x19cb0c(0x1d7);throw CliErrors[_0x19cb0c(0x1e1)]('App\x20\x22'+_0x1ce03d[_0x19cb0c(0x1eb)]+_0x19cb0c(0x1d4),_0x54bd94);}function writeWorkspaceConfig(_0x557b09){const _0x2067be=a60_0x105407,_0x1e3d83=resolveWriteConfigPath(_0x2067be(0x1f3)),_0x3fc2b4=readConfigFile(_0x1e3d83);_0x557b09[_0x2067be(0x1ff)]&&(_0x3fc2b4['env']=_0x557b09[_0x2067be(0x1de)]);if(_0x557b09['appName']){const _0x278097=isRecord(_0x3fc2b4[_0x2067be(0x1f8)])?{..._0x3fc2b4[_0x2067be(0x1f8)]}:{},_0x5315ef=isRecord(_0x278097[_0x557b09['appName']])?_0x278097[_0x557b09['appName']]:{};_0x278097[_0x557b09[_0x2067be(0x1eb)]]={..._0x5315ef,'appcode':_0x557b09[_0x2067be(0x1e6)]},_0x3fc2b4[_0x2067be(0x1f8)]=_0x278097,_0x3fc2b4[_0x2067be(0x1fc)]=_0x557b09[_0x2067be(0x1eb)];if(_0x3fc2b4['app'])delete _0x3fc2b4[_0x2067be(0x200)];return writeAndReturn(_0x1e3d83,_0x3fc2b4);}_0x3fc2b4['appcode']=_0x557b09['appcode'];if(_0x3fc2b4['app'])delete _0x3fc2b4[_0x2067be(0x200)];return writeAndReturn(_0x1e3d83,_0x3fc2b4);}function writeAndReturn(_0x4507cb,_0xa33dec){return writeConfigFile(_0x4507cb,_0xa33dec),_0x4507cb;}function resolveWorkspaceEnv(_0x44f1dd){const _0x1fc36c=a60_0x105407;if(RUNTIME_ENV_VALUES[_0x1fc36c(0x1ec)](_0x44f1dd))return _0x44f1dd;throw CliErrors[_0x1fc36c(0x1e1)](_0x1fc36c(0x205)+_0x44f1dd+'\x22.\x20Allowed:\x20'+RUNTIME_ENV_VALUES[_0x1fc36c(0x1e4)](',\x20'));}function buildWorkspaceMessage(_0x5942f4,_0x43c28a,_0x3f3389,_0x14fa45){const _0x2734fa=a60_0x105407,_0x4d5654=_0x43c28a?_0x43c28a+'\x20('+_0x3f3389+')':_0x3f3389,_0x399e59=_0x14fa45?_0x2734fa(0x1d6)+_0x14fa45:'';return _0x2734fa(0x1ed)+_0x5942f4+_0x2734fa(0x1e2)+_0x4d5654+_0x399e59+'\x0aAccessKey:\x20not\x20written';}function isRecord(_0x3f009d){const _0x3b3b20=a60_0x105407;return typeof _0x3f009d===_0x3b3b20(0x206)&&_0x3f009d!==null&&!Array[_0x3b3b20(0x1e7)](_0x3f009d);}function a60_0x126e(){const _0xfa55d3=['appCode','../../core/api-client.js','356pmCuMI','apps','\x20--app\x20<name>\x20[--env\x20daily]\x20or\x20','\x20workspace\x20','init','defaultApp','\x20--appcode\x20<code>\x20[--env\x20daily]','../../commands/app/remote-source.js','shouldWriteEnv','app','1069341rFGeJc','command','585655RKAcZN','map','Invalid\x20env\x20\x22','object','Resolving\x20--app\x20requires\x20accessKey.\x20Pass\x20--appcode\x20directly,\x20or\x20set\x20accessKey\x20before\x20running\x20','items','App\x20code\x20to\x20bind\x20directly','855080pVrNMl','\x22\x20not\x20found.','Usage:\x20','\x0aEnv:\x20','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20pass\x20--appcode\x20directly.','3790278sLPPNi','accessKey','294LvXsIt','envName','workspace\x20','38615SxEeMh','env','string','filter','validation','\x0aDefault\x20app:\x20','trim','join','App\x20name\x20to\x20bind\x20as\x20the\x20current\x20workspace\x20default','appcode','isArray','Available\x20apps:\x20','from','write','appName','includes','Workspace\x20configured.\x0aConfig\x20file:\x20','3097368blmliJ','boolean','51737QzChNE','yes','str','project','workspace'];a60_0x126e=function(){return _0xfa55d3;};return a60_0x126e();}function a60_0x2c97(_0x4d0207,_0x181e65){_0x4d0207=_0x4d0207-0x1d0;const _0x126e5a=a60_0x126e();let _0x2c97d8=_0x126e5a[_0x4d0207];return _0x2c97d8;}function makeWorkspaceCommand(_0x34b8d3){const _0x532614=a60_0x105407;return{'service':_0x532614(0x1f4),'command':_0x34b8d3,'description':_0x34b8d3===_0x532614(0x1fb)?'Initialize\x20app\x20context\x20for\x20the\x20current\x20workspace':'Set\x20app\x20context\x20for\x20the\x20current\x20workspace','risk':_0x532614(0x1ea),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':WORKSPACE_USE_FLAGS,async 'execute'(_0x23f2aa){return executeWorkspaceUse(_0x23f2aa,_0x34b8d3);}};}export const workspaceDefinitions=[makeWorkspaceCommand(a60_0x105407(0x1fb)),makeWorkspaceCommand('use')];
|
package/lib/config/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a61_0x84fb18=a61_0x475d;(function(_0x54cef0,_0x2524e1){const _0x27dff3=a61_0x475d,_0x1c2976=_0x54cef0();while(!![]){try{const _0x4f7887=-parseInt(_0x27dff3(0x149))/0x1+parseInt(_0x27dff3(0x145))/0x2*(parseInt(_0x27dff3(0x14c))/0x3)+-parseInt(_0x27dff3(0x154))/0x4*(parseInt(_0x27dff3(0x159))/0x5)+-parseInt(_0x27dff3(0x140))/0x6*(parseInt(_0x27dff3(0x15f))/0x7)+parseInt(_0x27dff3(0x150))/0x8*(-parseInt(_0x27dff3(0x153))/0x9)+parseInt(_0x27dff3(0x14f))/0xa*(parseInt(_0x27dff3(0x147))/0xb)+parseInt(_0x27dff3(0x146))/0xc;if(_0x4f7887===_0x2524e1)break;else _0x1c2976['push'](_0x1c2976['shift']());}catch(_0x24788b){_0x1c2976['push'](_0x1c2976['shift']());}}}(a61_0x4ba5,0xa2f53));function a61_0x4ba5(){const _0x40a85e=['21dAAQqT','defaultValue','528738eEGcMd','Override\x20API\x20domain','Override\x20SkillHub\x20domain','join','map','2049626lINZeu','27106956ShJEej','1903jAUysH','Access\x20key\x20(client-ak\x20auth)','1056349zNhMAT','Override\x20user\x20domain','Default\x20output\x20format','3IYAwVk',';\x20local\x20alias:\x20apps.<alias>.appcode','Locale','17080pmcWKC','9241048AsKOrf','locale','entries','9ndqhEO','79252mjnfND','Risk\x20level','has','importable','filter','110UiJhSV','fromEntries','riskLevel','Override\x20runtime\x20domain','format','legacyCompatOnly'];a61_0x4ba5=function(){return _0x40a85e;};return a61_0x4ba5();}function a61_0x475d(_0x38d7db,_0x25917e){_0x38d7db=_0x38d7db-0x140;const _0x4ba58f=a61_0x4ba5();let _0x475daa=_0x4ba58f[_0x38d7db];return _0x475daa;}import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{OUTPUT_FORMAT_VALUES}from'../constant/output.js';export const CONFIG_FIELD_SCHEMAS={'env':{'description':'Target\x20environment','topLevel':!![],'cliSettableTopLevel':!![],'enumValues':RUNTIME_ENV_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES['env'],'importable':!![]},'format':{'description':a61_0x84fb18(0x14b),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':OUTPUT_FORMAT_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a61_0x84fb18(0x15d)],'importable':!![]},'pageSize':{'description':'Default\x20page\x20size','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'apiDomain':{'description':a61_0x84fb18(0x141),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'userDomain':{'description':a61_0x84fb18(0x14a),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'runtimeDomain':{'description':a61_0x84fb18(0x15c),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'skillHubDomain':{'description':a61_0x84fb18(0x142),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'accessKey':{'description':a61_0x84fb18(0x148),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'riskLevel':{'description':a61_0x84fb18(0x155),'topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a61_0x84fb18(0x15b)],'importable':!![]},'locale':{'description':a61_0x84fb18(0x14e),'topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a61_0x84fb18(0x151)],'importable':!![],'legacyCompatOnly':!![]}};export const TOP_LEVEL_CONFIG_KEYS=new Set(Object[a61_0x84fb18(0x152)](CONFIG_FIELD_SCHEMAS)[a61_0x84fb18(0x158)](([,_0x56a40a])=>_0x56a40a['cliSettableTopLevel'])[a61_0x84fb18(0x144)](([_0x3a900f])=>_0x3a900f));export const CONFIG_ENUM_VALUES=Object[a61_0x84fb18(0x15a)](Object['entries'](CONFIG_FIELD_SCHEMAS)[a61_0x84fb18(0x158)](([,_0x557edf])=>_0x557edf['enumValues'])['map'](([_0x339cb5,_0x5603e8])=>[_0x339cb5,[..._0x5603e8['enumValues']||[]]]));export const IMPORTABLE_RUNTIME_CONFIG_KEYS=Object[a61_0x84fb18(0x152)](CONFIG_FIELD_SCHEMAS)[a61_0x84fb18(0x158)](([,_0x39574f])=>_0x39574f[a61_0x84fb18(0x157)])[a61_0x84fb18(0x144)](([_0x16e8a9])=>_0x16e8a9);export function getConfigFieldSchema(_0x3bc638){return CONFIG_FIELD_SCHEMAS[_0x3bc638];}export function getConfigEnumValues(_0x22fadc){return getConfigFieldSchema(_0x22fadc)?.['enumValues'];}export function getConfigDefaultValue(_0x202de3){const _0x363468=a61_0x84fb18;return getConfigFieldSchema(_0x202de3)?.[_0x363468(0x160)];}export function isTopLevelConfigKey(_0x3ad323){const _0x3a77b4=a61_0x84fb18;return TOP_LEVEL_CONFIG_KEYS[_0x3a77b4(0x156)](_0x3ad323);}export function isLegacyCompatConfigKey(_0x2b16c4){const _0x4055c4=a61_0x84fb18;return getConfigFieldSchema(_0x2b16c4)?.[_0x4055c4(0x15e)]===!![];}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function formatConfigKeyList(_0x45b025){const _0x44dd41=a61_0x84fb18;return[..._0x45b025][_0x44dd41(0x143)](',\x20');}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x2499bd=a61_0x84fb18;return'Config\x20key.\x20Top-level:\x20'+getTopLevelConfigKeySummary()+_0x2499bd(0x14d);}export function buildAppProfileListFields(_0x38a308){return{'env':_0x38a308,'hasAccessKey':![],'format':null,'pageSize':null,'riskLevel':null,'locale':null};}
|
package/lib/constant/app.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a62_0x2858(_0xa26026,_0x305558){_0xa26026=_0xa26026-0x16a;const _0x351974=a62_0x3519();let _0x285830=_0x351974[_0xa26026];return _0x285830;}const a62_0x2f20ec=a62_0x2858;(function(_0x6d6ab,_0x84ec13){const _0x15faea=a62_0x2858,_0x2cffa4=_0x6d6ab();while(!![]){try{const _0x1b61c9=parseInt(_0x15faea(0x16d))/0x1*(parseInt(_0x15faea(0x16c))/0x2)+-parseInt(_0x15faea(0x16f))/0x3*(-parseInt(_0x15faea(0x177))/0x4)+parseInt(_0x15faea(0x178))/0x5*(parseInt(_0x15faea(0x170))/0x6)+-parseInt(_0x15faea(0x16e))/0x7+-parseInt(_0x15faea(0x16a))/0x8*(-parseInt(_0x15faea(0x171))/0x9)+parseInt(_0x15faea(0x175))/0xa*(-parseInt(_0x15faea(0x172))/0xb)+-parseInt(_0x15faea(0x176))/0xc*(parseInt(_0x15faea(0x173))/0xd);if(_0x1b61c9===_0x84ec13)break;else _0x2cffa4['push'](_0x2cffa4['shift']());}catch(_0x4c644b){_0x2cffa4['push'](_0x2cffa4['shift']());}}}(a62_0x3519,0x4d7de));function a62_0x3519(){const _0xabe770=['90DCOqWQ','42636oFkACU','265516pvaeFk','105465VcfouW','16oSRNOu','UNPUBLISH','2uxfHTP','258430mjLLBZ','2255603FPACvP','21ZAbRTE','42PDZMwF','2640186RQzKeB','343816iaRjEI','1963lsQgNe','Published'];a62_0x3519=function(){return _0xabe770;};return a62_0x3519();}export const APP_PUBLISH_STATUS={'Published':'PUBLISHED','Unpublished':a62_0x2f20ec(0x16b)};export const RUNTIME_ACCESSIBLE_APP_STATUS=APP_PUBLISH_STATUS[a62_0x2f20ec(0x174)];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a63_0x2f0b(){const _0x50c89d=['5176696RanVTt','2794618tNphrh','34690mWuZFF','1101361Ojxhbe','6475672Eoaxwn','3OToWyf','10mQPtiT','42355260BUfrtz','138vRVyOr','7723928szIiKk','ClientAk'];a63_0x2f0b=function(){return _0x50c89d;};return a63_0x2f0b();}function a63_0x3fd9(_0x2146c6,_0xe82486){_0x2146c6=_0x2146c6-0x14c;const _0x2f0b78=a63_0x2f0b();let _0x3fd926=_0x2f0b78[_0x2146c6];return _0x3fd926;}(function(_0xf491b6,_0xf9c233){const _0x22c6b2=a63_0x3fd9,_0x5e1667=_0xf491b6();while(!![]){try{const _0x2b3f63=parseInt(_0x22c6b2(0x151))/0x1+parseInt(_0x22c6b2(0x14f))/0x2*(parseInt(_0x22c6b2(0x153))/0x3)+parseInt(_0x22c6b2(0x152))/0x4+-parseInt(_0x22c6b2(0x150))/0x5*(parseInt(_0x22c6b2(0x156))/0x6)+parseInt(_0x22c6b2(0x14e))/0x7+parseInt(_0x22c6b2(0x14c))/0x8+parseInt(_0x22c6b2(0x155))/0x9*(-parseInt(_0x22c6b2(0x154))/0xa);if(_0x2b3f63===_0xf9c233)break;else _0x5e1667['push'](_0x5e1667['shift']());}catch(_0x52b8d0){_0x5e1667['push'](_0x5e1667['shift']());}}}(a63_0x2f0b,0xe99dd));export const AUTH_MODE={'ClientAk':'client-ak'};export function isAuthMode(_0x9c36ee){const _0x5266d9=a63_0x3fd9;return _0x9c36ee===AUTH_MODE[_0x5266d9(0x14d)];}
|
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a64_0x730188=a64_0x2c42;(function(_0x99539c,_0x4e9f6e){const _0x54404b=a64_0x2c42,_0x219055=_0x99539c();while(!![]){try{const _0x4e073c=-parseInt(_0x54404b(0x19a))/0x1*(-parseInt(_0x54404b(0x1bb))/0x2)+parseInt(_0x54404b(0x19f))/0x3+-parseInt(_0x54404b(0x1bf))/0x4+parseInt(_0x54404b(0x1b6))/0x5*(-parseInt(_0x54404b(0x1aa))/0x6)+-parseInt(_0x54404b(0x1b5))/0x7*(parseInt(_0x54404b(0x1ae))/0x8)+-parseInt(_0x54404b(0x193))/0x9+-parseInt(_0x54404b(0x195))/0xa*(-parseInt(_0x54404b(0x1ab))/0xb);if(_0x4e073c===_0x4e9f6e)break;else _0x219055['push'](_0x219055['shift']());}catch(_0x587c43){_0x219055['push'](_0x219055['shift']());}}}(a64_0x18f9,0x50b3f));function a64_0x2c42(_0x536e31,_0x43b853){_0x536e31=_0x536e31-0x191;const _0x18f94c=a64_0x18f9();let _0x2c422b=_0x18f94c[_0x536e31];return _0x2c422b;}function a64_0x18f9(){const _0x2f4cdf=['Override\x20appcode','96858JDasGJ','11rPxCEx','Record\x20ID','Alias\x20for\x20--non-interactive','16WrouvT','Use\x20global\x20config\x20scope','dry-run','fromEntries','Verbose\x20output','string','Force\x20non-interactive\x20mode\x20(CI)','621887jzFHXe','135KVrFNw','Name\x20filter','help','Clear\x20output','SQL\x20query\x20code','1306MqUWpa','map','Output\x20format','nonInteractive','1577072IQCZOu','JSON\x20params\x20for\x20execute\x20commands','<expr>','params','app','sqlcode','290403ZVVKvw','non-interactive','9247850CiDfnz','name','verbose','yes','type','622aPxnMG','appcode','<name>','cliBinName','env','119058XqvWfV','Skip\x20confirmation\x20for\x20high-risk\x20writes','dryRun','global','format','boolean','cliDisplayName','clear','Environment','Preview\x20operation\x20without\x20executing'];a64_0x18f9=function(){return _0x2f4cdf;};return a64_0x18f9();}import{PRODUCT_CONFIG}from'../constant/product.js';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';export const CLI_BIN_NAME=PRODUCT_CONFIG[a64_0x730188(0x19d)];export const CLI_DISPLAY_NAME=PRODUCT_CONFIG[a64_0x730188(0x1a5)];export const NPM_PACKAGE_NAME=LOVRABET_NPM_PACKAGE_NAME;export const GLOBAL_FLAGS=[{'name':a64_0x730188(0x19b),'meowKey':a64_0x730188(0x19b),'type':a64_0x730188(0x1b3),'description':a64_0x730188(0x1a9),'hint':'<code>'},{'name':a64_0x730188(0x191),'meowKey':a64_0x730188(0x191),'type':a64_0x730188(0x1b3),'description':'Select\x20app\x20profile\x20by\x20name','hint':a64_0x730188(0x19c)},{'name':'env','meowKey':a64_0x730188(0x19e),'type':a64_0x730188(0x1b3),'description':a64_0x730188(0x1a7),'hint':'production\x20|\x20development\x20|\x20daily'},{'name':'format','meowKey':a64_0x730188(0x1a3),'type':a64_0x730188(0x1b3),'description':a64_0x730188(0x1bd),'hint':'json\x20|\x20pretty\x20|\x20compress'},{'name':'jq','meowKey':'jq','type':'string','description':'Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20implies\x20--format\x20json\x20when\x20current\x20format\x20is\x20pretty)','hint':a64_0x730188(0x1c1)},{'name':'dry-run','meowKey':a64_0x730188(0x1a1),'type':'boolean','description':a64_0x730188(0x1a8)},{'name':'yes','meowKey':a64_0x730188(0x198),'type':a64_0x730188(0x1a4),'description':a64_0x730188(0x1a0)},{'name':a64_0x730188(0x194),'meowKey':a64_0x730188(0x1be),'type':a64_0x730188(0x1a4),'description':a64_0x730188(0x1b4)},{'name':a64_0x730188(0x1a2),'meowKey':a64_0x730188(0x1a2),'type':a64_0x730188(0x1a4),'description':a64_0x730188(0x1af)},{'name':'ci','meowKey':'ci','type':'boolean','description':a64_0x730188(0x1ad),'hidden':!![]},{'name':a64_0x730188(0x1b8),'meowKey':a64_0x730188(0x1b8),'type':a64_0x730188(0x1a4),'description':'Show\x20help'},{'name':'id','meowKey':'id','type':a64_0x730188(0x1b3),'description':a64_0x730188(0x1ac),'hidden':!![]},{'name':a64_0x730188(0x196),'meowKey':a64_0x730188(0x196),'type':a64_0x730188(0x1b3),'description':a64_0x730188(0x1b7),'hidden':!![]},{'name':'sqlcode','meowKey':a64_0x730188(0x192),'type':'string','description':a64_0x730188(0x1ba),'hidden':!![]},{'name':a64_0x730188(0x1c2),'meowKey':a64_0x730188(0x1c2),'type':a64_0x730188(0x1b3),'description':a64_0x730188(0x1c0),'hidden':!![]},{'name':a64_0x730188(0x197),'meowKey':a64_0x730188(0x197),'type':a64_0x730188(0x1a4),'description':a64_0x730188(0x1b2),'hidden':!![]},{'name':a64_0x730188(0x1a6),'meowKey':'clear','type':a64_0x730188(0x1a4),'description':a64_0x730188(0x1b9),'hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a64_0x730188(0x19b),'app',a64_0x730188(0x19e),a64_0x730188(0x1a3),'jq',a64_0x730188(0x1b0),a64_0x730188(0x198),a64_0x730188(0x194),'ci']);export function buildMeowFlags(){const _0x516b24=a64_0x730188;return Object[_0x516b24(0x1b1)](GLOBAL_FLAGS[_0x516b24(0x1bc)](_0x422ebd=>[_0x422ebd['meowKey'],{'type':_0x422ebd[_0x516b24(0x199)]}]));}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a65_0x2daaee=a65_0x293b;(function(_0x5adf97,_0x364278){const _0x268679=a65_0x293b,_0x5f51ef=_0x5adf97();while(!![]){try{const _0x35fcb5=parseInt(_0x268679(0xac))/0x1+parseInt(_0x268679(0xb0))/0x2*(parseInt(_0x268679(0xa9))/0x3)+parseInt(_0x268679(0xb1))/0x4*(parseInt(_0x268679(0xb5))/0x5)+parseInt(_0x268679(0xab))/0x6+-parseInt(_0x268679(0xad))/0x7*(parseInt(_0x268679(0xa8))/0x8)+-parseInt(_0x268679(0xaa))/0x9*(parseInt(_0x268679(0xaf))/0xa)+-parseInt(_0x268679(0xae))/0xb;if(_0x35fcb5===_0x364278)break;else _0x5f51ef['push'](_0x5f51ef['shift']());}catch(_0x101c85){_0x5f51ef['push'](_0x5f51ef['shift']());}}}(a65_0x52bd,0xab705));export const DEFAULT_APP_PROFILE_NAME='main';function a65_0x293b(_0x22a9ac,_0x49e4b4){_0x22a9ac=_0x22a9ac-0xa8;const _0x52bdfb=a65_0x52bd();let _0x293b77=_0x52bdfb[_0x22a9ac];return _0x293b77;}export const DEFAULT_CONFIG_VALUES={'env':'production','format':a65_0x2daaee(0xb2),'locale':a65_0x2daaee(0xb3),'riskLevel':a65_0x2daaee(0xb4)};export const DEFAULT_COMMAND_OUTPUT_FORMAT=a65_0x2daaee(0xb2);function a65_0x52bd(){const _0x17ae17=['4BqnLkz','compress','en-US','write','1998120XxkWlK','105848KWLtrP','3MdfMNY','774279ofETlD','6917052ANVvbG','1013675uFCKQE','217cSfClj','28534187dRcSNw','20PPtNwj','2624624tsctco'];a65_0x52bd=function(){return _0x17ae17;};return a65_0x52bd();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a66_0x564889=a66_0x4bb1;function a66_0x4bb1(_0x176c85,_0x469c8c){_0x176c85=_0x176c85-0x1d2;const _0xbdbf8f=a66_0xbdbf();let _0x4bb1ee=_0xbdbf8f[_0x176c85];return _0x4bb1ee;}(function(_0x3e339c,_0x2bed22){const _0x3f8ea7=a66_0x4bb1,_0x4cc8ba=_0x3e339c();while(!![]){try{const _0x14109e=-parseInt(_0x3f8ea7(0x1d4))/0x1+parseInt(_0x3f8ea7(0x1db))/0x2+parseInt(_0x3f8ea7(0x1da))/0x3*(parseInt(_0x3f8ea7(0x1d3))/0x4)+-parseInt(_0x3f8ea7(0x1dd))/0x5*(parseInt(_0x3f8ea7(0x1d9))/0x6)+-parseInt(_0x3f8ea7(0x1dc))/0x7+-parseInt(_0x3f8ea7(0x1d8))/0x8*(parseInt(_0x3f8ea7(0x1d2))/0x9)+parseInt(_0x3f8ea7(0x1d5))/0xa*(parseInt(_0x3f8ea7(0x1d6))/0xb);if(_0x14109e===_0x2bed22)break;else _0x4cc8ba['push'](_0x4cc8ba['shift']());}catch(_0xaf0b58){_0x4cc8ba['push'](_0x4cc8ba['shift']());}}}(a66_0xbdbf,0x40c5e));import{PRODUCT_CONFIG}from'../constant/product.js';export const LOVRABET_NPM_PACKAGE_NAME=PRODUCT_CONFIG[a66_0x564889(0x1de)];function a66_0xbdbf(){const _0xbedd46=['npmPackageName','10467qYYsKk','463196qONuEw','344274neKxQb','90QHhSbp','557337jZdbyx','npmRegistryBaseUrl','1880RyLQCt','56406qkYbYf','12pQOudk','395678bWKGKG','1441622qeAxFd','15Bkxafs'];a66_0xbdbf=function(){return _0xbedd46;};return a66_0xbdbf();}export const LOVRABET_SKILL_SOURCE=PRODUCT_CONFIG['skillSource'];export const NPM_REGISTRY_BASE_URL=PRODUCT_CONFIG[a66_0x564889(0x1d7)];
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a67_0x5c5c(){const _0x10faa8=['2862132GRDGmH','userDomain','10rWPJDk','5TityYx','5oBmBVN','user','skillHubDomain','167096OdyJdv','8652858tCiLHK','domains','252jlocoE','api','production','7078984mMAldy','nonProduction','129006SMXFYw','13288248dxaSyb','207036xWrhcW','runtime','skillhub','apiDomain'];a67_0x5c5c=function(){return _0x10faa8;};return a67_0x5c5c();}const a67_0x3221e9=a67_0x1a73;(function(_0x10a97c,_0x5664b9){const _0x43de9c=a67_0x1a73,_0x487ee8=_0x10a97c();while(!![]){try{const _0xf5c73=parseInt(_0x43de9c(0x136))/0x1*(-parseInt(_0x43de9c(0x141))/0x2)+parseInt(_0x43de9c(0x132))/0x3+parseInt(_0x43de9c(0x143))/0x4+-parseInt(_0x43de9c(0x135))/0x5*(parseInt(_0x43de9c(0x13a))/0x6)+parseInt(_0x43de9c(0x13c))/0x7*(parseInt(_0x43de9c(0x139))/0x8)+parseInt(_0x43de9c(0x142))/0x9*(parseInt(_0x43de9c(0x134))/0xa)+-parseInt(_0x43de9c(0x13f))/0xb;if(_0xf5c73===_0x5664b9)break;else _0x487ee8['push'](_0x487ee8['shift']());}catch(_0x12cba6){_0x487ee8['push'](_0x487ee8['shift']());}}}(a67_0x5c5c,0xc9a95));import{getEnv,isProduction}from'../constant/env.js';function a67_0x1a73(_0x15dc83,_0x13abc9){_0x15dc83=_0x15dc83-0x132;const _0x5c5c1d=a67_0x5c5c();let _0x1a7383=_0x5c5c1d[_0x15dc83];return _0x1a7383;}import{PRODUCT_CONFIG}from'../constant/product.js';let customApiDomain,customUserDomain,customRuntimeDomain,customSkillHubDomain;export function initDomains(_0x311e50){const _0x5771ff=a67_0x1a73;customApiDomain=_0x311e50?.[_0x5771ff(0x146)],customUserDomain=_0x311e50?.[_0x5771ff(0x133)],customRuntimeDomain=_0x311e50?.['runtimeDomain'],customSkillHubDomain=_0x311e50?.[_0x5771ff(0x138)];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a67_0x3221e9(0x13b)]['production'][a67_0x3221e9(0x137)]:PRODUCT_CONFIG[a67_0x3221e9(0x13b)][a67_0x3221e9(0x140)][a67_0x3221e9(0x137)]);export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a67_0x3221e9(0x13b)][a67_0x3221e9(0x13e)][a67_0x3221e9(0x13d)]:PRODUCT_CONFIG[a67_0x3221e9(0x13b)][a67_0x3221e9(0x140)][a67_0x3221e9(0x13d)]);export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a67_0x3221e9(0x13b)][a67_0x3221e9(0x13e)][a67_0x3221e9(0x144)]:PRODUCT_CONFIG[a67_0x3221e9(0x13b)]['nonProduction'][a67_0x3221e9(0x144)]);export const getSkillHubDomain=()=>customSkillHubDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a67_0x3221e9(0x13b)][a67_0x3221e9(0x13e)][a67_0x3221e9(0x145)]:PRODUCT_CONFIG[a67_0x3221e9(0x13b)][a67_0x3221e9(0x140)]['skillhub']);
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a68_0x58641e=a68_0x324e;(function(_0x5e9595,_0x39ed88){const _0x516dbc=a68_0x324e,_0x58a2d4=_0x5e9595();while(!![]){try{const _0x1c4677=parseInt(_0x516dbc(0x1a6))/0x1*(parseInt(_0x516dbc(0x1aa))/0x2)+parseInt(_0x516dbc(0x1b0))/0x3*(parseInt(_0x516dbc(0x1ac))/0x4)+parseInt(_0x516dbc(0x1ab))/0x5+-parseInt(_0x516dbc(0x1ad))/0x6+-parseInt(_0x516dbc(0x1a8))/0x7+-parseInt(_0x516dbc(0x1a9))/0x8+parseInt(_0x516dbc(0x1a5))/0x9;if(_0x1c4677===_0x39ed88)break;else _0x58a2d4['push'](_0x58a2d4['shift']());}catch(_0x585a80){_0x58a2d4['push'](_0x58a2d4['shift']());}}}(a68_0x5a2c,0xa3815));import{productEnv}from'../constant/product.js';export const RUNTIME_ENV_VALUES=['production',a68_0x58641e(0x1b1),a68_0x58641e(0x1ae)];export function normalizeEnv(_0x3ad89f){const _0xea7783=a68_0x58641e;return _0x3ad89f==='online'?_0xea7783(0x1a4):_0x3ad89f;}export function isProduction(_0x102992){return normalizeEnv(_0x102992)==='production';}export function isDaily(_0x1e8de9){const _0x488d97=a68_0x58641e;return normalizeEnv(_0x1e8de9)===_0x488d97(0x1ae);}function a68_0x324e(_0x4580b1,_0x520c4c){_0x4580b1=_0x4580b1-0x1a4;const _0x5a2c54=a68_0x5a2c();let _0x324e93=_0x5a2c54[_0x4580b1];return _0x324e93;}export function isDev(_0xe54e2c){const _0x256d14=a68_0x58641e,_0x1d2b65=normalizeEnv(_0xe54e2c);return _0x1d2b65===_0x256d14(0x1b1)||_0x1d2b65===_0x256d14(0x1a7);}function a68_0x5a2c(){const _0x235dee=['3673730MlAPSw','1745620TLBxfc','5439708zUwtTw','daily','ENV','3ytLeJQ','development','production','5109435ymfwlB','1vIyIwP','dev','7055622fmtIph','200104eKFGrD','1740856aBfPcC'];a68_0x5a2c=function(){return _0x235dee;};return a68_0x5a2c();}let env=normalizeEnv(productEnv(a68_0x58641e(0x1af))||a68_0x58641e(0x1a4));export function getEnv(){return env;}export function initEnv(_0x598a0d){env=normalizeEnv(_0x598a0d);}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a69_0x27c31c=a69_0x2ed9;function a69_0x1104(){const _0x576803=['122133uQXnLh','json','2990064bFFWvG','7Fbmcrp','14774580GINYOy','174ADFeTG','4seqGNg','pretty','9399070VqMdou','12928352KuWjQR','6466QwZnCx','7904985tdMCvx','compress'];a69_0x1104=function(){return _0x576803;};return a69_0x1104();}function a69_0x2ed9(_0x543018,_0x3e087d){_0x543018=_0x543018-0x10b;const _0x1104e1=a69_0x1104();let _0x2ed9ed=_0x1104e1[_0x543018];return _0x2ed9ed;}(function(_0x2799b7,_0x147a62){const _0x193737=a69_0x2ed9,_0x39b937=_0x2799b7();while(!![]){try{const _0x3be8c9=parseInt(_0x193737(0x10e))/0x1*(parseInt(_0x193737(0x113))/0x2)+parseInt(_0x193737(0x116))/0x3*(parseInt(_0x193737(0x10f))/0x4)+-parseInt(_0x193737(0x114))/0x5+-parseInt(_0x193737(0x10b))/0x6+parseInt(_0x193737(0x10c))/0x7*(parseInt(_0x193737(0x112))/0x8)+parseInt(_0x193737(0x10d))/0x9+-parseInt(_0x193737(0x111))/0xa;if(_0x3be8c9===_0x147a62)break;else _0x39b937['push'](_0x39b937['shift']());}catch(_0x292011){_0x39b937['push'](_0x39b937['shift']());}}}(a69_0x1104,0xcd7c5));export const OUTPUT_FORMAT_VALUES=[a69_0x27c31c(0x117),a69_0x27c31c(0x110),a69_0x27c31c(0x115)];
|
package/lib/constant/product.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a70_0x37d1(){const _0x28974b=['LOVRABET','map','cli:lovrabet-runtime','.lovrabet.json','4196374iGxqxB','23305EIvZKV','3814632HLnYcg','@lovrabet/lovrabet-cli','6920368jSSouc','Lovrabet\x20User\x20Center','1071675fpgcCZ','https://skills.lovrabet.com','1252YMfNma','https://registry.npmjs.org','https://user-daily.lovrabet.com','SKIP_NPX_SKILLS','936890VlNezC','envPrefix','https://daily-runtime.lovrabet.com','https://user.lovrabet.com','legacyEnvPrefixes','.lovrabet','.lovrabetrc','Lovrabet\x20Runtime\x20CLI','3062325qaMXEJ','lovrabet/lovrabet-cli','.lovrabet-runtime.log','https://api.lovrabet.com','lovrabet','RABETBASE'];a70_0x37d1=function(){return _0x28974b;};return a70_0x37d1();}const a70_0x59c7f7=a70_0x3d2b;function a70_0x3d2b(_0x38684e,_0x4f2b5f){_0x38684e=_0x38684e-0x149;const _0x37d11a=a70_0x37d1();let _0x3d2bdd=_0x37d11a[_0x38684e];return _0x3d2bdd;}(function(_0x222c36,_0x52b960){const _0x3cadaf=a70_0x3d2b,_0x410495=_0x222c36();while(!![]){try{const _0x2bcf25=parseInt(_0x3cadaf(0x15c))/0x1+-parseInt(_0x3cadaf(0x162))/0x2+parseInt(_0x3cadaf(0x14c))/0x3+parseInt(_0x3cadaf(0x15e))/0x4*(parseInt(_0x3cadaf(0x157))/0x5)+-parseInt(_0x3cadaf(0x158))/0x6+-parseInt(_0x3cadaf(0x156))/0x7+-parseInt(_0x3cadaf(0x15a))/0x8;if(_0x2bcf25===_0x52b960)break;else _0x410495['push'](_0x410495['shift']());}catch(_0x581ee0){_0x410495['push'](_0x410495['shift']());}}}(a70_0x37d1,0xefe46));export const PRODUCT_CONFIG={'cliBinName':a70_0x59c7f7(0x150),'cliDisplayName':a70_0x59c7f7(0x14b),'npmPackageName':a70_0x59c7f7(0x159),'skillSource':a70_0x59c7f7(0x14d),'npmRegistryBaseUrl':a70_0x59c7f7(0x15f),'envPrefix':a70_0x59c7f7(0x152),'legacyEnvPrefixes':[a70_0x59c7f7(0x151)],'configFileNames':[a70_0x59c7f7(0x155),a70_0x59c7f7(0x14a)],'newConfigFileName':a70_0x59c7f7(0x155),'homeDirName':a70_0x59c7f7(0x149),'logFileName':a70_0x59c7f7(0x14e),'invokeSource':a70_0x59c7f7(0x154),'userCenterDisplayName':a70_0x59c7f7(0x15b),'skipNpxSkillsEnvSuffix':a70_0x59c7f7(0x161),'domains':{'production':{'user':a70_0x59c7f7(0x165),'api':a70_0x59c7f7(0x14f),'runtime':'https://runtime.lovrabet.com','skillhub':a70_0x59c7f7(0x15d)},'nonProduction':{'user':a70_0x59c7f7(0x160),'api':'https://daily-api.lovrabet.com','runtime':a70_0x59c7f7(0x164),'skillhub':'https://skills-daily.lovrabet.com'}},'accessKeyCreatePath':'/user/ak'};export function productEnvName(_0x365ad0){const _0xe9236b=a70_0x59c7f7;return PRODUCT_CONFIG[_0xe9236b(0x163)]+'_'+_0x365ad0;}export function productEnvNames(_0x461216){const _0x2a917d=a70_0x59c7f7;return[productEnvName(_0x461216),...PRODUCT_CONFIG[_0x2a917d(0x166)][_0x2a917d(0x153)](_0x50f43c=>_0x50f43c+'_'+_0x461216)];}export function productEnv(_0x156c22){for(const _0xc84e42 of productEnvNames(_0x156c22)){const _0x460798=process.env[_0xc84e42];if(_0x460798!==undefined)return _0x460798;}return undefined;}
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a71_0x13b8(){const _0x47d5e9=['write','8022120XbRbGD','2zQFDKL','2333517pwiati','read','high-risk-write','5279048jSSitt','11741296qfcllE','9lAfbyI','120zTSeFg','830rgnzsX','599467ECruGn','431884LBoEDS','144325cCLaME'];a71_0x13b8=function(){return _0x47d5e9;};return a71_0x13b8();}const a71_0x1d9487=a71_0x450d;function a71_0x450d(_0x25c101,_0x53d6c5){_0x25c101=_0x25c101-0x1f4;const _0x13b874=a71_0x13b8();let _0x450d3a=_0x13b874[_0x25c101];return _0x450d3a;}(function(_0x46284a,_0x2ae37e){const _0xe63a44=a71_0x450d,_0x8400d9=_0x46284a();while(!![]){try{const _0x2d3d48=parseInt(_0xe63a44(0x1f6))/0x1+parseInt(_0xe63a44(0x1fa))/0x2*(-parseInt(_0xe63a44(0x1fb))/0x3)+parseInt(_0xe63a44(0x201))/0x4*(-parseInt(_0xe63a44(0x1f7))/0x5)+-parseInt(_0xe63a44(0x1f9))/0x6+-parseInt(_0xe63a44(0x1ff))/0x7+parseInt(_0xe63a44(0x1fe))/0x8*(parseInt(_0xe63a44(0x200))/0x9)+-parseInt(_0xe63a44(0x1f4))/0xa*(-parseInt(_0xe63a44(0x1f5))/0xb);if(_0x2d3d48===_0x2ae37e)break;else _0x8400d9['push'](_0x8400d9['shift']());}catch(_0x5ca502){_0x8400d9['push'](_0x8400d9['shift']());}}}(a71_0x13b8,0xe99cf));export const RISK_LEVEL_VALUES=[a71_0x1d9487(0x1fc),a71_0x1d9487(0x1f8),a71_0x1d9487(0x1fd)];
|
package/lib/constant/url.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a72_0x1da909=a72_0x34c7;(function(_0x1dda7d,_0x3bb082){const _0x3f688c=a72_0x34c7,_0x2f999b=_0x1dda7d();while(!![]){try{const _0x223414=-parseInt(_0x3f688c(0x14a))/0x1*(parseInt(_0x3f688c(0x146))/0x2)+parseInt(_0x3f688c(0x148))/0x3+parseInt(_0x3f688c(0x14f))/0x4+-parseInt(_0x3f688c(0x149))/0x5*(-parseInt(_0x3f688c(0x147))/0x6)+-parseInt(_0x3f688c(0x152))/0x7+parseInt(_0x3f688c(0x14b))/0x8+parseInt(_0x3f688c(0x150))/0x9*(-parseInt(_0x3f688c(0x14c))/0xa);if(_0x223414===_0x3bb082)break;else _0x2f999b['push'](_0x2f999b['shift']());}catch(_0x2d6731){_0x2f999b['push'](_0x2f999b['shift']());}}}(a72_0x4400,0x43689));function a72_0x4400(){const _0xf36ef=['2105360SewdjM','316930zIxWQt','user','production','1737940dZGLxH','117YMFoJS','domains','2899330GjbtFb','2alDiHo','18ofxVyK','890580iIHobf','758200atWaWU','347131tSTKbt'];a72_0x4400=function(){return _0xf36ef;};return a72_0x4400();}function a72_0x34c7(_0x46a335,_0x2d5ced){_0x46a335=_0x46a335-0x146;const _0x4400c5=a72_0x4400();let _0x34c7a1=_0x4400c5[_0x46a335];return _0x34c7a1;}import{PRODUCT_CONFIG}from'../constant/product.js';export const USER_ACCESS_KEY_CREATE_URL=''+PRODUCT_CONFIG[a72_0x1da909(0x151)][a72_0x1da909(0x14e)][a72_0x1da909(0x14d)]+PRODUCT_CONFIG['accessKeyCreatePath'];
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a73_0x34272b=a73_0x534f;function a73_0xaa57(){const _0x17ab30=['trim','./constant/env.js','APP','configFileNames','./constant/domain.js','userDomain','APPCODE','riskLevel','raw','stringify','130nSSRbk','3508730qcLMFs','write','PAGE_SIZE','65781ocpcvs','parse','182448zXpcMs','online','error','app','true','appcode','setRawMode','nonInteractive','runtimeDomain','stdin','values','daily','defaultApp','accessKey','top-level','production','authRequired','globalConfig','5110842FzrFiv','format','global','apps','project','310326rKlsla','ENV','FORMAT','development','projectConfig','object','local-alias','host','read','EPERM','skillHubDomain','maxRisk','VERBOSE','explicit','join','cache','string','newConfigFileName','isRaw','setRawCommand','ACCESS_KEY','inherit','missing','env','isTTY','cwd','786823MCeKcz','.tmp','slice','empty','high-risk-write','message','EXDEV','4fulCUJ','119vbUiYT','utf8','argv','code','locale','1612862AigrbW'];a73_0xaa57=function(){return _0x17ab30;};return a73_0xaa57();}(function(_0x50cdff,_0x3920ac){const _0x1e74a5=a73_0x534f,_0x4167a3=_0x50cdff();while(!![]){try{const _0x3f0f02=-parseInt(_0x1e74a5(0xd0))/0x1+-parseInt(_0x1e74a5(0xdd))/0x2+parseInt(_0x1e74a5(0xb6))/0x3*(parseInt(_0x1e74a5(0xd7))/0x4)+parseInt(_0x1e74a5(0x9a))/0x5+parseInt(_0x1e74a5(0xb1))/0x6+parseInt(_0x1e74a5(0xd8))/0x7*(parseInt(_0x1e74a5(0x9f))/0x8)+-parseInt(_0x1e74a5(0x9d))/0x9*(-parseInt(_0x1e74a5(0xe8))/0xa);if(_0x3f0f02===_0x3920ac)break;else _0x4167a3['push'](_0x4167a3['shift']());}catch(_0x1aa3bc){_0x4167a3['push'](_0x4167a3['shift']());}}}(a73_0xaa57,0x8569c));import{readFileSync,existsSync,mkdirSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{resolve,dirname}from'node:path';function a73_0x534f(_0x18991c,_0x406bdc){_0x18991c=_0x18991c-0x9a;const _0xaa5706=a73_0xaa57();let _0x534f4a=_0xaa5706[_0x18991c];return _0x534f4a;}import{homedir}from'node:os';import{logger}from'./utils/logger.js';import{CliErrors}from'./errors.js';import{CLI_BIN_NAME}from'./constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvNames}from'./constant/product.js';import{DEFAULT_CONFIG_VALUES}from'./constant/defaults.js';import{normalizeEnv,isDaily,isDev}from'./constant/env.js';import{normalizeLegacyOutputFormat}from'./framework/types.js';import{resolveCachedAppCode}from'./commands/app/cache.js';export{AUTH_MODE,isAuthMode}from'./constant/auth-mode.js';const CONFIG_NAMES=PRODUCT_CONFIG[a73_0x34272b(0xe1)];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a73_0x34272b(0xc7)];function resolveConfigPath(_0x42b6f3){for(const _0x11c629 of CONFIG_NAMES){const _0x202ebb=resolve(_0x42b6f3,_0x11c629);if(existsSync(_0x202ebb))return _0x202ebb;}return undefined;}export function resolveWriteConfigPath(_0x3adfdf){const _0x5a4569=a73_0x34272b,_0x39c6c9=_0x3adfdf===_0x5a4569(0xb5)?process[_0x5a4569(0xcf)]():homedir(),_0x475750=resolveConfigPath(_0x39c6c9);return _0x475750??resolve(_0x39c6c9,NEW_CONFIG_NAME);}export function readConfigFile(_0x2d58c5){const _0x454be4=a73_0x34272b;try{if(existsSync(_0x2d58c5)){const _0xc37540=readFileSync(_0x2d58c5,{'encoding':'utf8'});if(_0xc37540){const _0xb8e0ce=JSON[_0x454be4(0x9e)](_0xc37540);return migrateOnlineEnv(_0x2d58c5,_0xb8e0ce),_0xb8e0ce;}}}catch{}return{};}function migrateOnlineEnv(_0x34a9c4,_0x583dd1){const _0x449a32=a73_0x34272b;let _0x35c7f4=![];_0x583dd1[_0x449a32(0xcd)]===_0x449a32(0xa0)&&(_0x583dd1[_0x449a32(0xcd)]=_0x449a32(0xae),_0x35c7f4=!![]);if(_0x583dd1['apps']&&typeof _0x583dd1[_0x449a32(0xb4)]==='object')for(const _0x5771f3 of Object[_0x449a32(0xa9)](_0x583dd1[_0x449a32(0xb4)])){_0x5771f3&&_0x5771f3['env']==='online'&&(_0x5771f3[_0x449a32(0xcd)]=_0x449a32(0xae),_0x35c7f4=!![]);}if(_0x35c7f4)try{writeConfigFile(_0x34a9c4,_0x583dd1);}catch{}}export function writeConfigFile(_0xc00bba,_0x3ca5ff){const _0x430284=a73_0x34272b,_0x256e57=dirname(_0xc00bba);!existsSync(_0x256e57)&&mkdirSync(_0x256e57,{'recursive':!![]});const _0x523077=_0xc00bba+_0x430284(0xd1);try{writeFileSync(_0x523077,JSON[_0x430284(0xe7)](_0x3ca5ff,null,0x2)+'\x0a',{'encoding':_0x430284(0xd9),'mode':0x180});try{renameSync(_0x523077,_0xc00bba);}catch(_0xa5807){if(_0xa5807[_0x430284(0xdb)]===_0x430284(0xbf)||_0xa5807['code']===_0x430284(0xd6)||_0xa5807['code']==='EACCES'){writeFileSync(_0xc00bba,JSON[_0x430284(0xe7)](_0x3ca5ff,null,0x2)+'\x0a',{'encoding':_0x430284(0xd9)});try{unlinkSync(_0x523077);}catch{}}else throw _0xa5807;}}catch(_0x278f76){try{unlinkSync(_0x523077);}catch{}throw _0x278f76;}}export function isNonInteractiveMode(_0x966d4){const _0x8f5cc0=a73_0x34272b;return!!(_0x966d4[_0x8f5cc0(0xa6)]||_0x966d4['ci']||productEnvNames('CI')['some'](_0x4a87c2=>process.env[_0x4a87c2]===_0x8f5cc0(0xa3))||process.env.CI===_0x8f5cc0(0xa3)||!process['stdout'][_0x8f5cc0(0xce)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x1c75da=a73_0x34272b;if(!process['stdin']['isTTY'])return![];try{const _0x136823=process['stdin'][_0x1c75da(0xc8)];return process[_0x1c75da(0xa8)][_0x1c75da(0xa5)](!![]),process[_0x1c75da(0xa8)][_0x1c75da(0xa5)](_0x136823??![]),!![];}catch{return![];}}export async function createContext(_0x5b3b18){const _0x3c3624=a73_0x34272b,_0x2ba6cc=readRawConfig(),_0x1746ff=buildConfig(_0x2ba6cc,_0x5b3b18);await initGlobalEnvironment(_0x1746ff);const {getUserDomain:_0x317faf,getApiDomain:_0xed49bb}=await import('./constant/domain.js'),_0x50f58a={'apiDomain':_0xed49bb(),'userDomain':_0x317faf()},_0x5cb2f8=await buildAuth(_0x1746ff);logger['setLogPath'](process['cwd']());const _0x10b648=(CLI_BIN_NAME+'\x20'+process[_0x3c3624(0xda)][_0x3c3624(0xd2)](0x2)[_0x3c3624(0xc4)]('\x20'))[_0x3c3624(0xde)]();logger[_0x3c3624(0xc9)](_0x10b648);const _0xcfb7ce=isNonInteractiveMode(_0x5b3b18);return{'config':_0x1746ff,'auth':_0x5cb2f8,'logger':logger,'env':_0x50f58a,'nonInteractive':_0xcfb7ce};}export function buildConfigFromFlags(_0x297675){return buildConfig(readRawConfig(),_0x297675);}export function getLocalAppAliases(_0x5c9756){const _0x3065b0=a73_0x34272b;return _0x5c9756[_0x3065b0(0xb4)]&&typeof _0x5c9756[_0x3065b0(0xb4)]===_0x3065b0(0xbb)?_0x5c9756[_0x3065b0(0xb4)]:{};}export function resolveLocalAppAliasCode(_0x178a24,_0xc2e30c){const _0x15bd42=a73_0x34272b;if(!_0xc2e30c)return undefined;const _0x2469e4=getLocalAppAliases(_0x178a24)[_0xc2e30c],_0x555dc4=_0x2469e4?.[_0x15bd42(0xa4)];return typeof _0x555dc4===_0x15bd42(0xc6)&&_0x555dc4[_0x15bd42(0xde)]()?_0x555dc4[_0x15bd42(0xde)]():undefined;}export function readAppCodeFromConfig(){const _0x3642b7=a73_0x34272b,_0x116268=readRawConfig(),_0x1e0a06=_0x116268[_0x3642b7(0xa4)]??_0x116268['app'];if(typeof _0x1e0a06===_0x3642b7(0xc6)&&_0x1e0a06['trim']())return _0x1e0a06[_0x3642b7(0xde)]();const _0x1a8c3b=resolveLocalAppAliasCode(_0x116268,typeof _0x116268[_0x3642b7(0xab)]==='string'?_0x116268['defaultApp']:undefined);if(_0x1a8c3b)return _0x1a8c3b;const _0x2ec3fa=normalizeEnv(String(_0x116268[_0x3642b7(0xcd)]||'production')),_0x56e3ca=isDaily(_0x2ec3fa)?_0x3642b7(0xaa):isDev(_0x2ec3fa)?'development':'production',_0x70a713=resolveCachedAppCode(typeof _0x116268[_0x3642b7(0xab)]===_0x3642b7(0xc6)?_0x116268[_0x3642b7(0xab)]:undefined,_0x56e3ca,typeof _0x116268[_0x3642b7(0xac)]===_0x3642b7(0xc6)?_0x116268[_0x3642b7(0xac)]:undefined);if(_0x70a713)return _0x70a713;const _0x18ddfd=Object[_0x3642b7(0xa9)](getLocalAppAliases(_0x116268))['find'](_0x3217e5=>_0x3217e5?.[_0x3642b7(0xa4)]);return typeof _0x18ddfd?.[_0x3642b7(0xa4)]===_0x3642b7(0xc6)&&_0x18ddfd[_0x3642b7(0xa4)]['trim']()?_0x18ddfd[_0x3642b7(0xa4)][_0x3642b7(0xde)]():undefined;}export function readScopedConfig(_0x411667){const _0x11ff23=a73_0x34272b,_0x5d5e08=_0x411667[_0x11ff23(0xb3)]?_0x11ff23(0xb3):'project';return readConfigFile(resolveWriteConfigPath(_0x5d5e08));}export function writeScopedConfig(_0x4dbe9a,_0x1f985a){const _0x47e3e1=a73_0x34272b,_0x27b69a=_0x1f985a[_0x47e3e1(0xb3)]?'global':_0x47e3e1(0xb5);writeConfigFile(resolveWriteConfigPath(_0x27b69a),_0x4dbe9a);}export async function initGlobalEnvironment(_0x35f915){const _0x68f4c6=a73_0x34272b,{initEnv:_0x5a3efe}=await import(_0x68f4c6(0xdf));_0x5a3efe(_0x35f915[_0x68f4c6(0xcd)]);const {initDomains:_0x69c553}=await import(_0x68f4c6(0xe2));_0x69c553({'apiDomain':_0x35f915[_0x68f4c6(0xe6)]['apiDomain']||_0x35f915['raw'][_0x68f4c6(0xbd)]||undefined,'userDomain':_0x35f915[_0x68f4c6(0xe6)][_0x68f4c6(0xe3)]||undefined,'runtimeDomain':_0x35f915[_0x68f4c6(0xe6)][_0x68f4c6(0xa7)]||undefined,'skillHubDomain':_0x35f915[_0x68f4c6(0xe6)][_0x68f4c6(0xc0)]||undefined});}export function getProjectConfigPath(){const _0x134eaa=a73_0x34272b;return resolveConfigPath(process[_0x134eaa(0xcf)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x4a23ed){const _0x1d4e75=a73_0x34272b;if(!existsSync(_0x4a23ed))return{'status':_0x1d4e75(0xcc)};try{const _0x496f5a=readFileSync(_0x4a23ed,{'encoding':_0x1d4e75(0xd9)});if(!_0x496f5a?.[_0x1d4e75(0xde)]())return{'status':_0x1d4e75(0xd3)};const _0x4634b9=JSON[_0x1d4e75(0x9e)](_0x496f5a);return{'status':'ok','data':_0x4634b9};}catch(_0x3c57cb){return{'status':_0x1d4e75(0xa1),'message':_0x3c57cb instanceof Error?_0x3c57cb[_0x1d4e75(0xd5)]:String(_0x3c57cb)};}}export function loadRawConfigLayers(_0x5272c9){const _0x5dde75=a73_0x34272b;let _0x141fe3={},_0x2f9b0b={},_0x28a1ac,_0x329c5d;try{_0x28a1ac=resolveConfigPath(homedir());if(_0x28a1ac){const _0x34f149=readFileSync(_0x28a1ac,{'encoding':_0x5dde75(0xd9)});if(_0x34f149)_0x141fe3=JSON['parse'](_0x34f149);}}catch{}try{const _0xd92f47=_0x5272c9||process[_0x5dde75(0xcf)]();_0x329c5d=resolveConfigPath(_0xd92f47);if(_0x329c5d){const _0x1a9929=readFileSync(_0x329c5d,{'encoding':_0x5dde75(0xd9)});if(_0x1a9929)_0x2f9b0b=JSON['parse'](_0x1a9929);}}catch{}return{'globalPath':_0x28a1ac,'projectPath':_0x329c5d,'globalConfig':_0x141fe3,'projectConfig':_0x2f9b0b};}function mergeRawConfigLayers(_0x496ace){const _0x5a9329=a73_0x34272b,{globalConfig:_0x261e24,projectConfig:_0x254593}=_0x496ace;if(_0x254593[_0x5a9329(0xcb)]===![]){const _0x15a8a6={..._0x254593};return delete _0x15a8a6[_0x5a9329(0xcb)],_0x15a8a6;}const _0x3b3385={..._0x261e24,..._0x254593};if(_0x5a9329(0xab)in _0x254593)_0x3b3385[_0x5a9329(0xab)]=_0x254593[_0x5a9329(0xab)];else _0x261e24[_0x5a9329(0xab)]&&(_0x3b3385[_0x5a9329(0xab)]=_0x261e24[_0x5a9329(0xab)]);return _0x3b3385;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x842ed5){return mergeRawConfigLayers(loadRawConfigLayers(_0x842ed5));}export function readRawConfigWithLayers(_0x47da8c){const _0x34af05=loadRawConfigLayers(_0x47da8c);return{'config':mergeRawConfigLayers(_0x34af05),'layers':_0x34af05};}export function resolveDefaultAppSource(_0x42bd27){const _0x15bbc4=a73_0x34272b;if('defaultApp'in _0x42bd27[_0x15bbc4(0xba)])return _0x15bbc4(0xb5);if(_0x42bd27[_0x15bbc4(0xba)][_0x15bbc4(0xcb)]===![])return null;if(_0x42bd27[_0x15bbc4(0xb0)]['defaultApp'])return _0x15bbc4(0xb3);return null;}function buildConfig(_0x3a2d97,_0x3fcc7a){const _0x1babcf=a73_0x34272b,_0x3780c8=_0x3a2d97[_0x1babcf(0xab)]||undefined,_0x3df6b9=_0x3fcc7a['app']||env(_0x1babcf(0xe0))||undefined,_0x1816eb=_0x3df6b9||_0x3780c8||undefined,_0x5c4e21=env(_0x1babcf(0xca))||_0x3a2d97[_0x1babcf(0xac)]||undefined,_0x555c7c=_0x3fcc7a[_0x1babcf(0xcd)]||env(_0x1babcf(0xb7))||_0x3a2d97['env']||DEFAULT_CONFIG_VALUES['env'],_0x3c7239=normalizeEnv(String(_0x555c7c)),_0x8595c2=isDaily(_0x3c7239)?_0x1babcf(0xaa):isDev(_0x3c7239)?_0x1babcf(0xb9):_0x1babcf(0xae),_0x2a85e5=typeof _0x3fcc7a['appcode']===_0x1babcf(0xc6)?_0x3fcc7a[_0x1babcf(0xa4)]:undefined,_0x589c43=env(_0x1babcf(0xe4)),_0xe76b=_0x3df6b9?undefined:_0x3a2d97[_0x1babcf(0xa4)]||_0x3a2d97[_0x1babcf(0xa2)]||undefined,_0x576e34=_0x3df6b9||(_0xe76b?undefined:_0x3780c8),_0x31122b=resolveLocalAppAliasCode(_0x3a2d97,_0x576e34),_0x37f2a3=resolveCachedAppCode(_0x576e34,_0x8595c2,_0x5c4e21),_0x26aec3=_0x2a85e5||_0x589c43||_0xe76b||_0x31122b||_0x37f2a3||undefined,_0x19754f=_0x2a85e5?_0x1babcf(0xc3):_0x589c43?_0x1babcf(0xcd):_0xe76b?_0x1babcf(0xad):_0x31122b?_0x1babcf(0xbc):_0x37f2a3?_0x1babcf(0xc5):undefined,_0x1d94e7=_0x3a2d97[_0x1babcf(0xdc)]||DEFAULT_CONFIG_VALUES[_0x1babcf(0xdc)],_0x299476=undefined,_0x2bb2fe=_0x3fcc7a['format']||env(_0x1babcf(0xb8))||_0x3a2d97[_0x1babcf(0xb2)],_0x23dd72=normalizeLegacyOutputFormat(_0x2bb2fe),_0x4d5600=env(_0x1babcf(0x9c))||_0x3a2d97['pageSize'],_0x3ed544=_0x4d5600?Number(_0x4d5600)||undefined:undefined,_0x5260d0=_0x3a2d97[_0x1babcf(0xe5)]||_0x3a2d97[_0x1babcf(0xc1)],_0x5b6d4f=_0x5260d0===_0x1babcf(0xbe)||_0x5260d0===_0x1babcf(0x9b)||_0x5260d0===_0x1babcf(0xd4)?_0x5260d0:DEFAULT_CONFIG_VALUES['riskLevel'],_0x2d2f27=env(_0x1babcf(0xc2)),_0xf9e80a=_0x2d2f27==='1'||_0x2d2f27===_0x1babcf(0xa3);return{'appCode':typeof _0x26aec3===_0x1babcf(0xc6)&&_0x26aec3[_0x1babcf(0xde)]()?_0x26aec3[_0x1babcf(0xde)]():undefined,'appCodeSource':_0x19754f,'env':_0x8595c2,'locale':_0x1d94e7,'cookie':_0x299476,'accessKey':_0x5c4e21,'format':_0x23dd72,'pageSize':_0x3ed544,'riskLevel':_0x5b6d4f,'verbose':_0xf9e80a,'defaultApp':_0x3780c8,'currentApp':typeof _0x1816eb===_0x1babcf(0xc6)?_0x1816eb:undefined,'raw':_0x3a2d97};}function env(_0xad24e8){return productEnv(_0xad24e8);}async function buildAuth(_0x3f1972){const _0x571aa1=a73_0x34272b,_0x2bc393='',_0x5d8ba9=!!_0x3f1972[_0x571aa1(0xac)];return{'cookie':_0x2bc393,'isLoggedIn':_0x5d8ba9,async 'getOrLogin'(){const _0x39281a=_0x571aa1;if(_0x5d8ba9)return _0x2bc393;throw CliErrors[_0x39281a(0xaf)]();}};}
|
|
1
|
+
const a73_0x144905=a73_0x4c2c;(function(_0xf9115c,_0x2b70ca){const _0xbedd63=a73_0x4c2c,_0x22b9b7=_0xf9115c();while(!![]){try{const _0x569907=-parseInt(_0xbedd63(0x99))/0x1*(-parseInt(_0xbedd63(0xce))/0x2)+parseInt(_0xbedd63(0xe5))/0x3*(parseInt(_0xbedd63(0xe1))/0x4)+-parseInt(_0xbedd63(0xae))/0x5*(parseInt(_0xbedd63(0xa0))/0x6)+-parseInt(_0xbedd63(0xa8))/0x7*(parseInt(_0xbedd63(0xd1))/0x8)+-parseInt(_0xbedd63(0xcb))/0x9*(parseInt(_0xbedd63(0xb8))/0xa)+-parseInt(_0xbedd63(0xba))/0xb*(parseInt(_0xbedd63(0xe8))/0xc)+-parseInt(_0xbedd63(0xa3))/0xd*(-parseInt(_0xbedd63(0xc1))/0xe);if(_0x569907===_0x2b70ca)break;else _0x22b9b7['push'](_0x22b9b7['shift']());}catch(_0xffeee5){_0x22b9b7['push'](_0x22b9b7['shift']());}}}(a73_0x19ce,0x4f3ec));import{readFileSync,existsSync,mkdirSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{homedir}from'node:os';import{logger}from'./utils/logger.js';import{CliErrors}from'./errors.js';import{CLI_BIN_NAME}from'./constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvNames}from'./constant/product.js';import{DEFAULT_CONFIG_VALUES}from'./constant/defaults.js';import{normalizeEnv,isDaily,isDev}from'./constant/env.js';import{normalizeLegacyOutputFormat}from'./framework/types.js';import{resolveCachedAppCode}from'./commands/app/cache.js';export{AUTH_MODE,isAuthMode}from'./constant/auth-mode.js';const CONFIG_NAMES=PRODUCT_CONFIG[a73_0x144905(0xb6)];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a73_0x144905(0xc2)];function resolveConfigPath(_0x59e136){for(const _0x3cdd52 of CONFIG_NAMES){const _0x6863b=resolve(_0x59e136,_0x3cdd52);if(existsSync(_0x6863b))return _0x6863b;}return undefined;}export function resolveWriteConfigPath(_0xfb370f){const _0x271013=a73_0x144905,_0x661f=_0xfb370f===_0x271013(0xbb)?process[_0x271013(0x9f)]():homedir(),_0x5084e8=resolveConfigPath(_0x661f);return _0x5084e8??resolve(_0x661f,NEW_CONFIG_NAME);}export function readConfigFile(_0x316d46){const _0x3f07ad=a73_0x144905;try{if(existsSync(_0x316d46)){const _0x2fed6a=readFileSync(_0x316d46,{'encoding':_0x3f07ad(0xa2)});if(_0x2fed6a){const _0x18ded3=JSON[_0x3f07ad(0xe0)](_0x2fed6a);return migrateOnlineEnv(_0x316d46,_0x18ded3),_0x18ded3;}}}catch{}return{};}function migrateOnlineEnv(_0xa6bb49,_0x5b1e9f){const _0x187499=a73_0x144905;let _0x1b525e=![];_0x5b1e9f[_0x187499(0xb2)]==='online'&&(_0x5b1e9f[_0x187499(0xb2)]=_0x187499(0xda),_0x1b525e=!![]);if(_0x5b1e9f[_0x187499(0xdd)]&&typeof _0x5b1e9f[_0x187499(0xdd)]===_0x187499(0xab))for(const _0x4a717a of Object[_0x187499(0xc8)](_0x5b1e9f[_0x187499(0xdd)])){_0x4a717a&&_0x4a717a['env']===_0x187499(0xd3)&&(_0x4a717a[_0x187499(0xb2)]=_0x187499(0xda),_0x1b525e=!![]);}if(_0x1b525e)try{writeConfigFile(_0xa6bb49,_0x5b1e9f);}catch{}}export function writeConfigFile(_0xa0ac7,_0x32f467){const _0x495f5b=a73_0x144905,_0x53afeb=dirname(_0xa0ac7);!existsSync(_0x53afeb)&&mkdirSync(_0x53afeb,{'recursive':!![]});const _0x2edf6b=_0xa0ac7+_0x495f5b(0x9d);try{writeFileSync(_0x2edf6b,JSON[_0x495f5b(0xd6)](_0x32f467,null,0x2)+'\x0a',{'encoding':_0x495f5b(0xa2),'mode':0x180});try{renameSync(_0x2edf6b,_0xa0ac7);}catch(_0x96238){if(_0x96238[_0x495f5b(0xa7)]==='EPERM'||_0x96238['code']===_0x495f5b(0xb4)||_0x96238['code']==='EACCES'){writeFileSync(_0xa0ac7,JSON['stringify'](_0x32f467,null,0x2)+'\x0a',{'encoding':_0x495f5b(0xa2)});try{unlinkSync(_0x2edf6b);}catch{}}else throw _0x96238;}}catch(_0x4a618d){try{unlinkSync(_0x2edf6b);}catch{}throw _0x4a618d;}}export function isNonInteractiveMode(_0x3c5995){const _0x51705f=a73_0x144905;return!!(_0x3c5995[_0x51705f(0xde)]||_0x3c5995['ci']||productEnvNames('CI')[_0x51705f(0xbf)](_0x3d9de3=>process.env[_0x3d9de3]===_0x51705f(0xaf))||process.env.CI==='true'||!process[_0x51705f(0xd5)]['isTTY']||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x2875c9=a73_0x144905;if(!process[_0x2875c9(0xd9)][_0x2875c9(0xdf)])return![];try{const _0x3780ad=process[_0x2875c9(0xd9)][_0x2875c9(0xac)];return process['stdin']['setRawMode'](!![]),process['stdin'][_0x2875c9(0x9e)](_0x3780ad??![]),!![];}catch{return![];}}export async function createContext(_0x273725){const _0x295e58=a73_0x144905,_0x408a8f=readRawConfig(),_0x233303=buildConfig(_0x408a8f,_0x273725);await initGlobalEnvironment(_0x233303);const {getUserDomain:_0x41d048,getApiDomain:_0x58b1a1}=await import(_0x295e58(0xcf)),_0x410f67={'apiDomain':_0x58b1a1(),'userDomain':_0x41d048()},_0x20f25d=await buildAuth(_0x233303);logger[_0x295e58(0xb1)](process[_0x295e58(0x9f)]());const _0x3970e3=(CLI_BIN_NAME+'\x20'+process[_0x295e58(0xc9)][_0x295e58(0xa6)](0x2)['join']('\x20'))[_0x295e58(0xb0)]();logger[_0x295e58(0xc3)](_0x3970e3);const _0xa87d7b=isNonInteractiveMode(_0x273725);return{'config':_0x233303,'auth':_0x20f25d,'logger':logger,'env':_0x410f67,'nonInteractive':_0xa87d7b};}export function buildConfigFromFlags(_0x378c32){return buildConfig(readRawConfig(),_0x378c32);}function a73_0x19ce(){const _0x2e08a5=['20632kPolUW','raw','online','FORMAT','stdout','stringify','PAGE_SIZE','userDomain','stdin','production','top-level','development','apps','nonInteractive','isTTY','parse','4cNCIah','daily','locale','defaultApp','1113243OXFiCJ','high-risk-write','pageSize','552LEFzXn','233935nRONRY','authRequired','accessKey','appcode','.tmp','setRawMode','cwd','809742QaeUEV','empty','utf8','1014cQBFBD','skillHubDomain','format','slice','code','301kSssLm','VERBOSE','local-alias','object','isRaw','explicit','5XuJQSO','true','trim','setLogPath','env','write','EXDEV','projectConfig','configFileNames','APP','340FecTrf','string','141394RbXkUg','project','missing','error','host','some','riskLevel','134414skmdnv','newConfigFileName','setRawCommand','apiDomain','./constant/env.js','inherit','find','values','argv','app','50868mMwXzl','ENV','APPCODE','2Ojdajk','./constant/domain.js','global'];a73_0x19ce=function(){return _0x2e08a5;};return a73_0x19ce();}export function getLocalAppAliases(_0x3ff785){const _0xddc0d1=a73_0x144905;return _0x3ff785['apps']&&typeof _0x3ff785[_0xddc0d1(0xdd)]===_0xddc0d1(0xab)?_0x3ff785[_0xddc0d1(0xdd)]:{};}export function resolveLocalAppAliasCode(_0x1ed22a,_0x5f1c52){const _0x43f326=a73_0x144905;if(!_0x5f1c52)return undefined;const _0x3f6258=getLocalAppAliases(_0x1ed22a)[_0x5f1c52],_0x222d36=_0x3f6258?.[_0x43f326(0x9c)];return typeof _0x222d36===_0x43f326(0xb9)&&_0x222d36[_0x43f326(0xb0)]()?_0x222d36[_0x43f326(0xb0)]():undefined;}export function readAppCodeFromConfig(){const _0x1c8fdb=a73_0x144905,_0xf2f6ed=readRawConfig(),_0x463c17=_0xf2f6ed['appcode']??_0xf2f6ed['app'];if(typeof _0x463c17===_0x1c8fdb(0xb9)&&_0x463c17['trim']())return _0x463c17[_0x1c8fdb(0xb0)]();const _0x3796c6=resolveLocalAppAliasCode(_0xf2f6ed,typeof _0xf2f6ed[_0x1c8fdb(0xe4)]==='string'?_0xf2f6ed[_0x1c8fdb(0xe4)]:undefined);if(_0x3796c6)return _0x3796c6;const _0x3b453b=normalizeEnv(String(_0xf2f6ed[_0x1c8fdb(0xb2)]||'production')),_0x13972b=isDaily(_0x3b453b)?_0x1c8fdb(0xe2):isDev(_0x3b453b)?_0x1c8fdb(0xdc):'production',_0x166665=resolveCachedAppCode(typeof _0xf2f6ed[_0x1c8fdb(0xe4)]==='string'?_0xf2f6ed[_0x1c8fdb(0xe4)]:undefined,_0x13972b,typeof _0xf2f6ed['accessKey']==='string'?_0xf2f6ed[_0x1c8fdb(0x9b)]:undefined);if(_0x166665)return _0x166665;const _0x14f10b=Object['values'](getLocalAppAliases(_0xf2f6ed))[_0x1c8fdb(0xc7)](_0x2f7bac=>_0x2f7bac?.[_0x1c8fdb(0x9c)]);return typeof _0x14f10b?.[_0x1c8fdb(0x9c)]===_0x1c8fdb(0xb9)&&_0x14f10b['appcode'][_0x1c8fdb(0xb0)]()?_0x14f10b['appcode'][_0x1c8fdb(0xb0)]():undefined;}export function readScopedConfig(_0xf8ee3f){const _0x5a1aad=a73_0x144905,_0x5b2fb3=_0xf8ee3f[_0x5a1aad(0xd0)]?_0x5a1aad(0xd0):_0x5a1aad(0xbb);return readConfigFile(resolveWriteConfigPath(_0x5b2fb3));}export function writeScopedConfig(_0x4f3bd0,_0x36150d){const _0x189362=a73_0x144905,_0x25224d=_0x36150d[_0x189362(0xd0)]?'global':_0x189362(0xbb);writeConfigFile(resolveWriteConfigPath(_0x25224d),_0x4f3bd0);}export async function initGlobalEnvironment(_0x320cc5){const _0x533226=a73_0x144905,{initEnv:_0xaf059a}=await import(_0x533226(0xc5));_0xaf059a(_0x320cc5[_0x533226(0xb2)]);const {initDomains:_0x166bb0}=await import('./constant/domain.js');_0x166bb0({'apiDomain':_0x320cc5[_0x533226(0xd2)][_0x533226(0xc4)]||_0x320cc5[_0x533226(0xd2)][_0x533226(0xbe)]||undefined,'userDomain':_0x320cc5['raw'][_0x533226(0xd8)]||undefined,'runtimeDomain':_0x320cc5[_0x533226(0xd2)]['runtimeDomain']||undefined,'skillHubDomain':_0x320cc5['raw'][_0x533226(0xa4)]||undefined});}export function getProjectConfigPath(){return resolveConfigPath(process['cwd']());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x10e212){const _0x4fb6a1=a73_0x144905;if(!existsSync(_0x10e212))return{'status':_0x4fb6a1(0xbc)};try{const _0x308845=readFileSync(_0x10e212,{'encoding':_0x4fb6a1(0xa2)});if(!_0x308845?.[_0x4fb6a1(0xb0)]())return{'status':_0x4fb6a1(0xa1)};const _0x5431c4=JSON[_0x4fb6a1(0xe0)](_0x308845);return{'status':'ok','data':_0x5431c4};}catch(_0x18192f){return{'status':_0x4fb6a1(0xbd),'message':_0x18192f instanceof Error?_0x18192f['message']:String(_0x18192f)};}}function a73_0x4c2c(_0x26d3e9,_0x2d349e){_0x26d3e9=_0x26d3e9-0x99;const _0x19ce42=a73_0x19ce();let _0x4c2ce9=_0x19ce42[_0x26d3e9];return _0x4c2ce9;}export function loadRawConfigLayers(_0x1cf735){const _0x160c83=a73_0x144905;let _0x1ea55c={},_0x32c4d3={},_0x56c661,_0x2a7d5e;try{_0x56c661=resolveConfigPath(homedir());if(_0x56c661){const _0x5e7821=readFileSync(_0x56c661,{'encoding':_0x160c83(0xa2)});if(_0x5e7821)_0x1ea55c=JSON[_0x160c83(0xe0)](_0x5e7821);}}catch{}try{const _0x4709e9=_0x1cf735||process['cwd']();_0x2a7d5e=resolveConfigPath(_0x4709e9);if(_0x2a7d5e){const _0x107124=readFileSync(_0x2a7d5e,{'encoding':'utf8'});if(_0x107124)_0x32c4d3=JSON[_0x160c83(0xe0)](_0x107124);}}catch{}return{'globalPath':_0x56c661,'projectPath':_0x2a7d5e,'globalConfig':_0x1ea55c,'projectConfig':_0x32c4d3};}function mergeRawConfigLayers(_0x21d37c){const _0x3a81c5=a73_0x144905,{globalConfig:_0x11a172,projectConfig:_0x47ae5d}=_0x21d37c;if(_0x47ae5d[_0x3a81c5(0xc6)]===![]){const _0x183239={..._0x47ae5d};return delete _0x183239['inherit'],_0x183239;}const _0x547911={..._0x11a172,..._0x47ae5d};if('defaultApp'in _0x47ae5d)_0x547911['defaultApp']=_0x47ae5d[_0x3a81c5(0xe4)];else _0x11a172['defaultApp']&&(_0x547911['defaultApp']=_0x11a172['defaultApp']);return _0x547911;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x2cd660){return mergeRawConfigLayers(loadRawConfigLayers(_0x2cd660));}export function readRawConfigWithLayers(_0x3452d6){const _0x4c9721=loadRawConfigLayers(_0x3452d6);return{'config':mergeRawConfigLayers(_0x4c9721),'layers':_0x4c9721};}export function resolveDefaultAppSource(_0x195ef7){const _0x4f17d5=a73_0x144905;if('defaultApp'in _0x195ef7[_0x4f17d5(0xb5)])return'project';if(_0x195ef7[_0x4f17d5(0xb5)][_0x4f17d5(0xc6)]===![])return null;if(_0x195ef7['globalConfig'][_0x4f17d5(0xe4)])return'global';return null;}function buildConfig(_0x380de8,_0x47f9b6){const _0x3b3e59=a73_0x144905,_0x3a4e74=_0x380de8[_0x3b3e59(0xe4)]||undefined,_0x22547f=_0x47f9b6[_0x3b3e59(0xca)]||env(_0x3b3e59(0xb7))||undefined,_0x25aa66=_0x22547f||_0x3a4e74||undefined,_0x5d04ec=env('ACCESS_KEY')||_0x380de8[_0x3b3e59(0x9b)]||undefined,_0xed78f5=_0x47f9b6[_0x3b3e59(0xb2)]||env(_0x3b3e59(0xcc))||_0x380de8[_0x3b3e59(0xb2)]||DEFAULT_CONFIG_VALUES[_0x3b3e59(0xb2)],_0x210289=normalizeEnv(String(_0xed78f5)),_0x495150=isDaily(_0x210289)?'daily':isDev(_0x210289)?_0x3b3e59(0xdc):_0x3b3e59(0xda),_0x107931=typeof _0x47f9b6[_0x3b3e59(0x9c)]===_0x3b3e59(0xb9)?_0x47f9b6['appcode']:undefined,_0x320c97=env(_0x3b3e59(0xcd)),_0x14fbc0=_0x22547f?undefined:_0x380de8[_0x3b3e59(0x9c)]||_0x380de8[_0x3b3e59(0xca)]||undefined,_0x2d9824=_0x22547f||(_0x14fbc0?undefined:_0x3a4e74),_0x548d6b=resolveLocalAppAliasCode(_0x380de8,_0x2d9824),_0x30088a=resolveCachedAppCode(_0x2d9824,_0x495150,_0x5d04ec),_0x193a1c=_0x107931||_0x320c97||_0x14fbc0||_0x548d6b||_0x30088a||undefined,_0x4ceae6=_0x107931?_0x3b3e59(0xad):_0x320c97?'env':_0x14fbc0?_0x3b3e59(0xdb):_0x548d6b?_0x3b3e59(0xaa):_0x30088a?'cache':undefined,_0x2cfb7d=_0x380de8[_0x3b3e59(0xe3)]||DEFAULT_CONFIG_VALUES['locale'],_0x25900d=undefined,_0x179dd0=_0x47f9b6[_0x3b3e59(0xa5)]||env(_0x3b3e59(0xd4))||_0x380de8[_0x3b3e59(0xa5)],_0x56877d=normalizeLegacyOutputFormat(_0x179dd0),_0x4d2ff9=env(_0x3b3e59(0xd7))||_0x380de8[_0x3b3e59(0xe7)],_0x1a4aa0=_0x4d2ff9?Number(_0x4d2ff9)||undefined:undefined,_0x515312=_0x380de8[_0x3b3e59(0xc0)]||_0x380de8['maxRisk'],_0x1220b2=_0x515312==='read'||_0x515312===_0x3b3e59(0xb3)||_0x515312===_0x3b3e59(0xe6)?_0x515312:DEFAULT_CONFIG_VALUES[_0x3b3e59(0xc0)],_0x55581b=env(_0x3b3e59(0xa9)),_0x52e8e6=_0x55581b==='1'||_0x55581b===_0x3b3e59(0xaf);return{'appCode':typeof _0x193a1c===_0x3b3e59(0xb9)&&_0x193a1c[_0x3b3e59(0xb0)]()?_0x193a1c[_0x3b3e59(0xb0)]():undefined,'appCodeSource':_0x4ceae6,'env':_0x495150,'locale':_0x2cfb7d,'cookie':_0x25900d,'accessKey':_0x5d04ec,'format':_0x56877d,'pageSize':_0x1a4aa0,'riskLevel':_0x1220b2,'verbose':_0x52e8e6,'defaultApp':_0x3a4e74,'currentApp':typeof _0x25aa66==='string'?_0x25aa66:undefined,'raw':_0x380de8};}function env(_0x25f4e6){return productEnv(_0x25f4e6);}async function buildAuth(_0x65159d){const _0x47eba7=a73_0x144905,_0x18642a='',_0x4c401a=!!_0x65159d[_0x47eba7(0x9b)];return{'cookie':_0x18642a,'isLoggedIn':_0x4c401a,async 'getOrLogin'(){const _0xfcd931=_0x47eba7;if(_0x4c401a)return _0x18642a;throw CliErrors[_0xfcd931(0x9a)]();}};}
|