@lovrabet/lovrabet-cli 2.1.7 → 2.1.8-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -0
- 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 -0
- 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 -0
- 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 -0
- package/lib/commands/skill/push-flow-helpers.js +1 -0
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
package/lib/commands/update.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a54_0x4675cb=a54_0x5766;(function(_0x29d306,_0x54f27b){const _0x3612fb=a54_0x5766,_0x4e6f5c=_0x29d306();while(!![]){try{const _0x4846be=-parseInt(_0x3612fb(0xf9))/0x1*(parseInt(_0x3612fb(0xde))/0x2)+parseInt(_0x3612fb(0xf7))/0x3+parseInt(_0x3612fb(0xe6))/0x4+-parseInt(_0x3612fb(0xf8))/0x5*(-parseInt(_0x3612fb(0x101))/0x6)+parseInt(_0x3612fb(0xe7))/0x7*(-parseInt(_0x3612fb(0x11a))/0x8)+parseInt(_0x3612fb(0x10e))/0x9*(parseInt(_0x3612fb(0x103))/0xa)+-parseInt(_0x3612fb(0x104))/0xb;if(_0x4846be===_0x54f27b)break;else _0x4e6f5c['push'](_0x4e6f5c['shift']());}catch(_0x56ac7f){_0x4e6f5c['push'](_0x4e6f5c['shift']());}}}(a54_0x2cfc,0x53d3f));function a54_0x2cfc(){const _0x234f16=['\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','trim','Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','latest','run','Already\x20up\x20to\x20date\x20(v','source','warn','status','json','nonInteractive','Update\x20','skipped','\x20CLI\x20from\x20npm','map','unknown','151490OSMmuh','\x20->\x20','Checking\x20npm\x20dist-tags...','object','prerelease','/dist-tags','\x20\x20Try\x20manually:\x20npm\x20install\x20-g\x20','Updating\x20','2033756SOznZO','581IkQsZt','no-skills','str','log','write','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','Current\x20version:\x20','--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.','filter','boolean','\x20\x20Run\x20manually:\x20lovrabet\x20cli-skill\x20install','args','Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag','flag','string','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','1406940XzwbQC','2045bTixVL','1wTEatk','minor','beta','version','stdout','major','Use\x20full\x20semver\x20versions\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.','Unable\x20to\x20resolve\x20','1614cMrFOi','skills','90zgZlhc','6182319PvAxnk','/-/package/','\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','toString','Update\x20failed:\x20','stderr','\x20version\x20from\x20npm.','Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.','timeout','505071pTEpIv','Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','update','exit\x20','fromEntries','error','join','Checking\x20CLI\x20Built-in\x20Skill...','Invalid\x20version:\x20','entries','pipe','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','58928nUrQSp','bool','cwd','validation'];a54_0x2cfc=function(){return _0x234f16;};return a54_0x2cfc();}import{spawnSync}from'node:child_process';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{LOVRABET_NPM_PACKAGE_NAME,LOVRABET_SKILL_SOURCE,NPM_REGISTRY_BASE_URL}from'../constant/distribution.js';function a54_0x5766(_0x266aa4,_0x1a3fe8){_0x266aa4=_0x266aa4-0xda;const _0x2cfc0f=a54_0x2cfc();let _0x57667f=_0x2cfc0f[_0x266aa4];return _0x57667f;}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':a54_0x4675cb(0x121),'type':'boolean','description':a54_0x4675cb(0xf3),'default':![]},{'name':a54_0x4675cb(0xfb),'type':a54_0x4675cb(0xf0),'description':a54_0x4675cb(0xec),'default':![]},{'name':a54_0x4675cb(0xfc),'type':'string','description':'Install\x20a\x20specific\x20CLI\x20version'},{'name':'no-skills','type':a54_0x4675cb(0xf0),'description':a54_0x4675cb(0x10f),'default':![]},{'name':a54_0x4675cb(0x102),'type':a54_0x4675cb(0xf0),'description':a54_0x4675cb(0x120),'default':!![],'hidden':!![]}];function parseSemver(_0x23cc5e){const _0x5353d0=a54_0x4675cb,_0x11ff9e=_0x23cc5e[_0x5353d0(0x11f)]()['match'](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0x11ff9e)return null;return{'major':Number(_0x11ff9e[0x1]),'minor':Number(_0x11ff9e[0x2]),'patch':Number(_0x11ff9e[0x3]),'prerelease':_0x11ff9e[0x4]};}function compareSemver(_0x390e8b,_0x26ab63){const _0x3d9cab=a54_0x4675cb,_0x15dfe3=parseSemver(_0x390e8b),_0x1b9e6c=parseSemver(_0x26ab63);if(!_0x15dfe3||!_0x1b9e6c)throw CliErrors[_0x3d9cab(0x11d)]('Version\x20comparison\x20failed.',_0x3d9cab(0xff));for(const _0x1023c2 of[_0x3d9cab(0xfe),_0x3d9cab(0xfa),'patch']){if(_0x15dfe3[_0x1023c2]<_0x1b9e6c[_0x1023c2])return-0x1;if(_0x15dfe3[_0x1023c2]>_0x1b9e6c[_0x1023c2])return 0x1;}if(!_0x15dfe3[_0x3d9cab(0xe2)]&&!_0x1b9e6c[_0x3d9cab(0xe2)])return 0x0;if(!_0x15dfe3[_0x3d9cab(0xe2)])return 0x1;if(!_0x1b9e6c[_0x3d9cab(0xe2)])return-0x1;if(_0x15dfe3['prerelease']===_0x1b9e6c[_0x3d9cab(0xe2)])return 0x0;return _0x15dfe3[_0x3d9cab(0xe2)]<_0x1b9e6c[_0x3d9cab(0xe2)]?-0x1:0x1;}function getRequestedVersion(_0x31f5fa){const _0x5b5378=a54_0x4675cb,_0x17c092=_0x31f5fa[_0x5b5378(0xe9)](_0x5b5378(0xfc))[_0x5b5378(0x11f)]();if(_0x17c092)return _0x17c092;return String(_0x31f5fa[_0x5b5378(0xf2)]?.[0x0]??'')[_0x5b5378(0x11f)]();}function shouldSkipCliBuiltInSkill(_0x1b0352){const _0x7701e0=a54_0x4675cb;return _0x1b0352['bool'](_0x7701e0(0xe8))||_0x1b0352[_0x7701e0(0xf4)]('skills')===![];}async function validateUpdateFlags(_0x569f13){const _0x5981c9=a54_0x4675cb,_0x593b4a=getRequestedVersion(_0x569f13),_0x5ee0f8=[_0x569f13[_0x5981c9(0x11b)](_0x5981c9(0x121))?_0x5981c9(0x121):'',_0x569f13[_0x5981c9(0x11b)](_0x5981c9(0xfb))?_0x5981c9(0xfb):'',_0x593b4a?'version':''][_0x5981c9(0xef)](Boolean);if(_0x5ee0f8['length']>0x1)throw CliErrors[_0x5981c9(0x11d)](_0x5981c9(0xee),_0x5981c9(0x10c));if(_0x593b4a&&!parseSemver(_0x593b4a))throw CliErrors[_0x5981c9(0x11d)](_0x5981c9(0x116)+_0x593b4a,'Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.');}async function fetchNpmDistTags(){const _0x44dab4=a54_0x4675cb;try{const _0x5540b1=NPM_REGISTRY_BASE_URL+_0x44dab4(0x105)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x44dab4(0xe3),_0xb9b039=await fetch(_0x5540b1,{'signal':AbortSignal[_0x44dab4(0x10d)](0x2710)});if(!_0xb9b039['ok'])return null;const _0x1946f6=await _0xb9b039[_0x44dab4(0x127)]();if(!_0x1946f6||typeof _0x1946f6!==_0x44dab4(0xe1))return null;return Object[_0x44dab4(0x112)](Object[_0x44dab4(0x117)](_0x1946f6)['filter'](([,_0x5d62c7])=>typeof _0x5d62c7===_0x44dab4(0xf5)&&_0x5d62c7[_0x44dab4(0x11f)]())[_0x44dab4(0xdc)](([_0x23b077,_0x28ff46])=>[_0x23b077,String(_0x28ff46)[_0x44dab4(0x11f)]()]));}catch{return null;}}async function resolveTargetVersion(_0x4530aa){const _0x46b693=a54_0x4675cb,_0x1edd18=getRequestedVersion(_0x4530aa);if(_0x1edd18)return{'version':_0x1edd18,'source':'version'};const _0x46a7e8=_0x4530aa[_0x46b693(0x11b)]('beta')?_0x46b693(0xfb):_0x46b693(0x121),_0x12220f=await fetchNpmDistTags(),_0x5f11f3=_0x12220f?.[_0x46a7e8];if(!_0x5f11f3)return null;return{'version':_0x5f11f3,'source':_0x46a7e8};}function shouldInstallTarget(_0x31c7ab,_0x496faa){const _0x2a3cc2=a54_0x4675cb,_0x2d900b=compareSemver(_0x31c7ab,_0x496faa[_0x2a3cc2(0xfc)]);if(_0x496faa[_0x2a3cc2(0x124)]===_0x2a3cc2(0xfc))return _0x2d900b!==0x0;return _0x2d900b<0x0;}function installCliPackage(_0x21e4e1,_0x5f29f9){const _0x53321c=a54_0x4675cb,_0x120288=resolveNpmBin('npm'),_0x597b8f=['install','-g',LOVRABET_NPM_PACKAGE_NAME+'@'+_0x21e4e1];console[_0x53321c(0xea)]('*\x20'+[_0x120288,..._0x597b8f][_0x53321c(0x114)]('\x20'));const _0x4871d6=spawnSync(_0x120288,_0x597b8f,{'cwd':process[_0x53321c(0x11c)](),'stdio':_0x5f29f9?_0x53321c(0x118):'inherit','env':process.env,'shell':![]});if(_0x4871d6['status']===0x0)return{'ok':!![]};let _0x356e32=_0x4871d6[_0x53321c(0x113)]?.['message']||_0x53321c(0x111)+(_0x4871d6[_0x53321c(0x126)]??_0x53321c(0xdd));if(_0x5f29f9){const _0x5a6ff1=_0x4871d6[_0x53321c(0x10a)]?_0x4871d6['stderr'][_0x53321c(0x108)]()['trim']():'',_0x3c4ffa=_0x4871d6[_0x53321c(0xfd)]?_0x4871d6['stdout'][_0x53321c(0x108)]()[_0x53321c(0x11f)]():'';if(_0x5a6ff1)_0x356e32=_0x5a6ff1;else{if(_0x3c4ffa)_0x356e32=_0x3c4ffa;}}return{'ok':![],'error':_0x356e32};}async function installCliBuiltInSkill(_0x51dcc1){const _0x543b91=a54_0x4675cb;console[_0x543b91(0xea)](_0x543b91(0x115));const _0x33d3ad=runNpxSkillsAddGlobal(process[_0x543b91(0x11c)](),LOVRABET_SKILL_SOURCE,{'stdio':_0x51dcc1?_0x543b91(0x118):'inherit'});if(_0x33d3ad[_0x543b91(0xda)]){console['log'](_0x543b91(0x106)+LOVRABET_SKIP_NPX_SKILLS_ENV+'=1).');return;}if(_0x33d3ad['ok']){console[_0x543b91(0xea)]('\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.');return;}console['warn'](_0x543b91(0x119)+(_0x33d3ad['error']||_0x543b91(0xdd))),console[_0x543b91(0xea)](_0x543b91(0xf1));}async function execute(_0x5df999){const _0x316e97=a54_0x4675cb;await validateUpdateFlags(_0x5df999);const _0x266bf8=getCliVersion();console[_0x316e97(0xea)](_0x316e97(0xed)+_0x266bf8),console[_0x316e97(0xea)](_0x316e97(0xe0));const _0x4a1495=await resolveTargetVersion(_0x5df999);if(!_0x4a1495){const _0x12dc9c=_0x5df999['bool'](_0x316e97(0xfb))?'beta':_0x316e97(0x121),_0x495f19=_0x316e97(0x100)+_0x12dc9c+_0x316e97(0x10b);return console[_0x316e97(0x125)](_0x495f19),console[_0x316e97(0xea)](_0x316e97(0xf6)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x12dc9c),{'ok':![]};}if(!shouldInstallTarget(_0x266bf8,_0x4a1495)){const _0x530bfe=_0x4a1495[_0x316e97(0x124)]===_0x316e97(0xfc)?'Already\x20on\x20requested\x20version\x20(v'+_0x4a1495[_0x316e97(0xfc)]+').':_0x316e97(0x123)+_0x4a1495[_0x316e97(0xfc)]+').';return console[_0x316e97(0xea)](_0x530bfe),shouldSkipCliBuiltInSkill(_0x5df999)?console[_0x316e97(0xea)](_0x316e97(0x107)):await installCliBuiltInSkill(_0x5df999[_0x316e97(0x128)]),{'ok':!![]};}console['log'](_0x316e97(0xe5)+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0x266bf8+_0x316e97(0xdf)+_0x4a1495[_0x316e97(0xfc)]);const _0x3e9003=installCliPackage(_0x4a1495[_0x316e97(0xfc)],_0x5df999[_0x316e97(0x128)]);if(!_0x3e9003['ok']){const _0x16e6ff=_0x316e97(0x109)+(_0x3e9003[_0x316e97(0x113)]||'unknown');return console[_0x316e97(0x113)](_0x16e6ff),console[_0x316e97(0xea)](_0x316e97(0xe4)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x4a1495[_0x316e97(0xfc)]),{'ok':![]};}return console[_0x316e97(0xea)]('Updated\x20to\x20v'+_0x4a1495[_0x316e97(0xfc)]+'.'),console[_0x316e97(0xea)](_0x316e97(0x11e)),shouldSkipCliBuiltInSkill(_0x5df999)?console[_0x316e97(0xea)]('Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).'):await installCliBuiltInSkill(_0x5df999[_0x316e97(0x128)]),{'ok':!![]};}export const updateDefinition={'service':a54_0x4675cb(0x110),'command':a54_0x4675cb(0x122),'description':a54_0x4675cb(0x129)+CLI_BIN_NAME+a54_0x4675cb(0xdb),'risk':a54_0x4675cb(0xeb),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a59_0x9d1f70=a59_0x4628;(function(_0x37d7f7,_0x266c30){const _0x282adc=a59_0x4628,_0x5af306=_0x37d7f7();while(!![]){try{const _0x11bd0c=-parseInt(_0x282adc(0x21c))/0x1*(-parseInt(_0x282adc(0x1ee))/0x2)+-parseInt(_0x282adc(0x1e6))/0x3*(-parseInt(_0x282adc(0x1d9))/0x4)+-parseInt(_0x282adc(0x1e7))/0x5+-parseInt(_0x282adc(0x1fe))/0x6*(-parseInt(_0x282adc(0x20b))/0x7)+parseInt(_0x282adc(0x201))/0x8+parseInt(_0x282adc(0x210))/0x9+-parseInt(_0x282adc(0x21a))/0xa;if(_0x11bd0c===_0x266c30)break;else _0x5af306['push'](_0x5af306['shift']());}catch(_0x4b7e57){_0x5af306['push'](_0x5af306['shift']());}}}(a59_0x41b2,0x4ac7d));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';function a59_0x4628(_0x39b69f,_0x964ae1){_0x39b69f=_0x39b69f-0x1cf;const _0x41b200=a59_0x41b2();let _0x462860=_0x41b200[_0x39b69f];return _0x462860;}const updateFlags=[{'name':a59_0x9d1f70(0x205),'type':'boolean','description':a59_0x9d1f70(0x1e0),'default':![]},{'name':a59_0x9d1f70(0x204),'type':'boolean','description':'Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','default':![]},{'name':a59_0x9d1f70(0x1db),'type':a59_0x9d1f70(0x1e4),'description':a59_0x9d1f70(0x216)},{'name':a59_0x9d1f70(0x1ea),'type':a59_0x9d1f70(0x20c),'description':a59_0x9d1f70(0x21b),'default':![]},{'name':'skills','type':a59_0x9d1f70(0x20c),'description':a59_0x9d1f70(0x1d0),'default':!![],'hidden':!![]}];function parseSemver(_0x204a91){const _0x4c8635=a59_0x9d1f70,_0x4d66f2=_0x204a91[_0x4c8635(0x1d1)]()[_0x4c8635(0x1e9)](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0x4d66f2)return null;return{'major':Number(_0x4d66f2[0x1]),'minor':Number(_0x4d66f2[0x2]),'patch':Number(_0x4d66f2[0x3]),'prerelease':_0x4d66f2[0x4]};}function compareSemver(_0x4173a2,_0x3eac24){const _0xce4035=a59_0x9d1f70,_0x2f6385=parseSemver(_0x4173a2),_0xfe7ac1=parseSemver(_0x3eac24);if(!_0x2f6385||!_0xfe7ac1)throw CliErrors[_0xce4035(0x1df)](_0xce4035(0x1d2),'Use\x20full\x20semver\x20versions\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.');for(const _0x2d663c of[_0xce4035(0x1f2),_0xce4035(0x203),_0xce4035(0x208)]){if(_0x2f6385[_0x2d663c]<_0xfe7ac1[_0x2d663c])return-0x1;if(_0x2f6385[_0x2d663c]>_0xfe7ac1[_0x2d663c])return 0x1;}if(!_0x2f6385[_0xce4035(0x1f0)]&&!_0xfe7ac1[_0xce4035(0x1f0)])return 0x0;if(!_0x2f6385[_0xce4035(0x1f0)])return 0x1;if(!_0xfe7ac1['prerelease'])return-0x1;if(_0x2f6385['prerelease']===_0xfe7ac1[_0xce4035(0x1f0)])return 0x0;return _0x2f6385['prerelease']<_0xfe7ac1[_0xce4035(0x1f0)]?-0x1:0x1;}function getRequestedVersion(_0x4d0128){const _0xb12b35=a59_0x9d1f70,_0x5485e0=_0x4d0128[_0xb12b35(0x1fc)](_0xb12b35(0x1db))[_0xb12b35(0x1d1)]();if(_0x5485e0)return _0x5485e0;return String(_0x4d0128['args']?.[0x0]??'')[_0xb12b35(0x1d1)]();}function shouldSkipCliBuiltInSkill(_0x15522c){const _0x286b51=a59_0x9d1f70;return _0x15522c['bool']('no-skills')||_0x15522c[_0x286b51(0x1d8)](_0x286b51(0x1e5))===![];}async function validateUpdateFlags(_0xe21c1){const _0x1350de=a59_0x9d1f70,_0x3e356a=getRequestedVersion(_0xe21c1),_0x534bb6=[_0xe21c1[_0x1350de(0x215)](_0x1350de(0x205))?'latest':'',_0xe21c1[_0x1350de(0x215)](_0x1350de(0x204))?_0x1350de(0x204):'',_0x3e356a?_0x1350de(0x1db):'']['filter'](Boolean);if(_0x534bb6[_0x1350de(0x1f4)]>0x1)throw CliErrors[_0x1350de(0x1df)](_0x1350de(0x20f),'Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.');if(_0x3e356a&&!parseSemver(_0x3e356a))throw CliErrors[_0x1350de(0x1df)](_0x1350de(0x212)+_0x3e356a,'Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.');}async function fetchNpmDistTags(){const _0x524855=a59_0x9d1f70;try{const _0x4c514e=NPM_REGISTRY_BASE_URL+_0x524855(0x20a)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x524855(0x1f6),_0xaf7587=await fetch(_0x4c514e,{'signal':AbortSignal['timeout'](0x2710)});if(!_0xaf7587['ok'])return null;const _0xfd7a9c=await _0xaf7587['json']();if(!_0xfd7a9c||typeof _0xfd7a9c!=='object')return null;return Object[_0x524855(0x1f5)](Object[_0x524855(0x1d4)](_0xfd7a9c)[_0x524855(0x1e8)](([,_0x115e4b])=>typeof _0x115e4b===_0x524855(0x1e4)&&_0x115e4b[_0x524855(0x1d1)]())[_0x524855(0x1e3)](([_0x30bd1f,_0x4ac279])=>[_0x30bd1f,String(_0x4ac279)[_0x524855(0x1d1)]()]));}catch{return null;}}async function resolveTargetVersion(_0x297f9e){const _0x34fdf3=a59_0x9d1f70,_0x359698=getRequestedVersion(_0x297f9e);if(_0x359698)return{'version':_0x359698,'source':_0x34fdf3(0x1db)};const _0x1e83f3=_0x297f9e['bool'](_0x34fdf3(0x204))?_0x34fdf3(0x204):_0x34fdf3(0x205),_0x136682=await fetchNpmDistTags(),_0x368257=_0x136682?.[_0x1e83f3];if(!_0x368257)return null;return{'version':_0x368257,'source':_0x1e83f3};}function shouldInstallTarget(_0x515c73,_0x50f2d4){const _0x7b9d88=a59_0x9d1f70,_0x5d2f9b=compareSemver(_0x515c73,_0x50f2d4[_0x7b9d88(0x1db)]);if(_0x50f2d4[_0x7b9d88(0x1f1)]===_0x7b9d88(0x1db))return _0x5d2f9b!==0x0;return _0x5d2f9b<0x0;}function installCliPackage(_0x416833,_0x529bcb){const _0x317e73=a59_0x9d1f70,_0x32bf06=resolveNpmBin(_0x317e73(0x1e2)),_0x3f5d5e=[_0x317e73(0x211),'-g',LOVRABET_NPM_PACKAGE_NAME+'@'+_0x416833];console[_0x317e73(0x200)]('*\x20'+[_0x32bf06,..._0x3f5d5e][_0x317e73(0x1ef)]('\x20'));const _0x4bb6a9=spawnSync(_0x32bf06,_0x3f5d5e,{'cwd':process['cwd'](),'stdio':_0x529bcb?_0x317e73(0x1d7):_0x317e73(0x218),'env':process.env,'shell':![]});if(_0x4bb6a9[_0x317e73(0x1cf)]===0x0)return{'ok':!![]};let _0x3614a2=_0x4bb6a9[_0x317e73(0x1fa)]?.[_0x317e73(0x1fd)]||_0x317e73(0x209)+(_0x4bb6a9[_0x317e73(0x1cf)]??_0x317e73(0x1da));if(_0x529bcb){const _0x297bc4=_0x4bb6a9[_0x317e73(0x20e)]?_0x4bb6a9[_0x317e73(0x20e)][_0x317e73(0x1d6)]()[_0x317e73(0x1d1)]():'',_0x167fb5=_0x4bb6a9[_0x317e73(0x207)]?_0x4bb6a9[_0x317e73(0x207)][_0x317e73(0x1d6)]()['trim']():'';if(_0x297bc4)_0x3614a2=_0x297bc4;else{if(_0x167fb5)_0x3614a2=_0x167fb5;}}return{'ok':![],'error':_0x3614a2};}async function installCliBuiltInSkill(_0x102cea){const _0x111a7d=a59_0x9d1f70;console[_0x111a7d(0x200)]('Checking\x20CLI\x20Built-in\x20Skill...');const _0x29df0e=runNpxSkillsAddGlobal(process[_0x111a7d(0x1f3)](),LOVRABET_SKILL_SOURCE,{'stdio':_0x102cea?_0x111a7d(0x1d7):_0x111a7d(0x218)});if(_0x29df0e[_0x111a7d(0x1eb)]){console[_0x111a7d(0x200)](_0x111a7d(0x202)+LOVRABET_SKIP_NPX_SKILLS_ENV+'=1).');return;}if(_0x29df0e['ok']){console[_0x111a7d(0x200)](_0x111a7d(0x1e1));return;}console[_0x111a7d(0x1f9)]('\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20'+(_0x29df0e['error']||_0x111a7d(0x1da))),console[_0x111a7d(0x200)](_0x111a7d(0x213));}async function execute(_0x32acde){const _0x5be3ee=a59_0x9d1f70;await validateUpdateFlags(_0x32acde);const _0x206773=getCliVersion();console['log']('Current\x20version:\x20'+_0x206773),console['log']('Checking\x20npm\x20dist-tags...');const _0x10c1e7=await resolveTargetVersion(_0x32acde);if(!_0x10c1e7){const _0x21f86f=_0x32acde['bool'](_0x5be3ee(0x204))?_0x5be3ee(0x204):_0x5be3ee(0x205),_0x4436af=_0x5be3ee(0x1dc)+_0x21f86f+_0x5be3ee(0x1dd);return console[_0x5be3ee(0x1f9)](_0x4436af),console['log']('\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20'+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x21f86f),{'ok':![]};}if(!shouldInstallTarget(_0x206773,_0x10c1e7)){const _0x28806c=_0x10c1e7['source']===_0x5be3ee(0x1db)?_0x5be3ee(0x1f8)+_0x10c1e7[_0x5be3ee(0x1db)]+').':_0x5be3ee(0x1d5)+_0x10c1e7[_0x5be3ee(0x1db)]+').';return console[_0x5be3ee(0x200)](_0x28806c),shouldSkipCliBuiltInSkill(_0x32acde)?console[_0x5be3ee(0x200)](_0x5be3ee(0x1ec)):await installCliBuiltInSkill(_0x32acde['nonInteractive']),{'ok':!![]};}console[_0x5be3ee(0x200)](_0x5be3ee(0x1ff)+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0x206773+_0x5be3ee(0x1d3)+_0x10c1e7['version']);const _0x2efd14=installCliPackage(_0x10c1e7['version'],_0x32acde[_0x5be3ee(0x214)]);if(!_0x2efd14['ok']){const _0x41d22f=_0x5be3ee(0x1ed)+(_0x2efd14[_0x5be3ee(0x1fa)]||'unknown');return console[_0x5be3ee(0x1fa)](_0x41d22f),console[_0x5be3ee(0x200)](_0x5be3ee(0x219)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x10c1e7[_0x5be3ee(0x1db)]),{'ok':![]};}return console[_0x5be3ee(0x200)](_0x5be3ee(0x1f7)+_0x10c1e7[_0x5be3ee(0x1db)]+'.'),console[_0x5be3ee(0x200)](_0x5be3ee(0x1fb)),shouldSkipCliBuiltInSkill(_0x32acde)?console[_0x5be3ee(0x200)](_0x5be3ee(0x1ec)):await installCliBuiltInSkill(_0x32acde[_0x5be3ee(0x214)]),{'ok':!![]};}function a59_0x41b2(){const _0x16b93c=['match','no-skills','skipped','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','Update\x20failed:\x20','2acKIpJ','join','prerelease','source','major','cwd','length','fromEntries','/dist-tags','Updated\x20to\x20v','Already\x20on\x20requested\x20version\x20(v','warn','error','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','str','message','6BHbfZY','Updating\x20','log','2278456ovayug','\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(','minor','beta','latest','update','stdout','patch','exit\x20','/-/package/','2275196ngPTfK','boolean','Update\x20','stderr','--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.','5071212YzKpwA','install','Invalid\x20version:\x20','\x20\x20Run\x20manually:\x20lovrabet\x20cli-skill\x20install','nonInteractive','bool','Install\x20a\x20specific\x20CLI\x20version','write','inherit','\x20\x20Try\x20manually:\x20npm\x20install\x20-g\x20','12957380xKXfBu','Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','408214enqBih','status','Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','trim','Version\x20comparison\x20failed.','\x20->\x20','entries','Already\x20up\x20to\x20date\x20(v','toString','pipe','flag','160148QWBCwT','unknown','version','Unable\x20to\x20resolve\x20','\x20version\x20from\x20npm.','run','validation','Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','npm','map','string','skills','18enCYNY','1098500NsZtgY','filter'];a59_0x41b2=function(){return _0x16b93c;};return a59_0x41b2();}export const updateDefinition={'service':a59_0x9d1f70(0x206),'command':a59_0x9d1f70(0x1de),'description':a59_0x9d1f70(0x20d)+CLI_BIN_NAME+'\x20CLI\x20from\x20npm','risk':a59_0x9d1f70(0x217),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a60_0x4317ff=a60_0x2752;(function(_0x552ffe,_0x3386b9){const _0x5762a7=a60_0x2752,_0x1ea39d=_0x552ffe();while(!![]){try{const _0x111fbd=parseInt(_0x5762a7(0x1eb))/0x1+-parseInt(_0x5762a7(0x1e3))/0x2*(parseInt(_0x5762a7(0x1cb))/0x3)+parseInt(_0x5762a7(0x1f4))/0x4*(-parseInt(_0x5762a7(0x1d5))/0x5)+-parseInt(_0x5762a7(0x1d0))/0x6+-parseInt(_0x5762a7(0x1dc))/0x7+-parseInt(_0x5762a7(0x1ef))/0x8+parseInt(_0x5762a7(0x1e1))/0x9;if(_0x111fbd===_0x3386b9)break;else _0x1ea39d['push'](_0x1ea39d['shift']());}catch(_0x356825){_0x1ea39d['push'](_0x1ea39d['shift']());}}}(a60_0x55d0,0x28061));import{CLI_BIN_NAME}from'../../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../../constant/env.js';function a60_0x2752(_0x526e7f,_0x15e32d){_0x526e7f=_0x526e7f-0x1c1;const _0x55d06b=a60_0x55d0();let _0x275220=_0x55d06b[_0x526e7f];return _0x275220;}function a60_0x55d0(){const _0x2ca649=['write','\x20workspace\x20','project','env','196070jMRhyT','\x0aDefault\x20app:\x20','defaultApp','items','764912OVmqnU','appCode','appcode','Workspace\x20configured.\x0aConfig\x20file:\x20','init','12fnxjrC','Initialize\x20app\x20context\x20for\x20the\x20current\x20workspace','\x20--appcode\x20<code>\x20[--env\x20daily]','\x22\x20not\x20found.','join','Available\x20apps:\x20','shouldWriteEnv','Run\x20`','appName','\x0aEnv:\x20','yes','Resolving\x20--app\x20requires\x20accessKey.\x20Pass\x20--appcode\x20directly,\x20or\x20set\x20accessKey\x20before\x20running\x20','accessKey','Set\x20app\x20context\x20for\x20the\x20current\x20workspace','3rHoSfE','map','\x0aAccessKey:\x20not\x20written','string','envName','401106rgPjZc','from','App\x20name\x20to\x20bind\x20as\x20the\x20current\x20workspace\x20default','workspace','object','527925vjFdum','apps','app','use','Usage:\x20','validation','../../core/api-client.js','32984byMTeX','trim','App\x20\x22','length','App\x20code\x20to\x20bind\x20directly','5568813PIehDd','Invalid\x20env\x20\x22','333916nPsnJX','str','workspace\x20','\x22.\x20Allowed:\x20'];a60_0x55d0=function(){return _0x2ca649;};return a60_0x55d0();}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_0x4317ff(0x1ce),'description':a60_0x4317ff(0x1d2)},{'name':a60_0x4317ff(0x1f1),'type':a60_0x4317ff(0x1ce),'description':a60_0x4317ff(0x1e0)},{'name':a60_0x4317ff(0x1ea),'type':'string','description':'Target\x20environment','enum':[...RUNTIME_ENV_VALUES]},{'name':a60_0x4317ff(0x1c7),'type':'boolean','description':'Compatibility\x20flag;\x20workspace\x20config\x20updates\x20are\x20non-interactive','default':![]}];async function executeWorkspaceUse(_0x2e4faa,_0x584861){const _0x4ec4b4=a60_0x4317ff,_0x159739=_0x2e4faa[_0x4ec4b4(0x1e4)](_0x4ec4b4(0x1d7))[_0x4ec4b4(0x1dd)](),_0x887613=_0x2e4faa['str'](_0x4ec4b4(0x1f1))['trim'](),_0x1f30af=_0x2e4faa[_0x4ec4b4(0x1e4)](_0x4ec4b4(0x1ea))[_0x4ec4b4(0x1dd)](),_0x333971=resolveWorkspaceEnv(_0x1f30af||_0x2e4faa[_0x4ec4b4(0x1cf)]||DEFAULT_CONFIG_VALUES[_0x4ec4b4(0x1ea)]);if(!_0x159739&&!_0x887613)throw CliErrors[_0x4ec4b4(0x1da)]('Missing\x20workspace\x20app\x20selector.',_0x4ec4b4(0x1d9)+CLI_BIN_NAME+_0x4ec4b4(0x1e8)+_0x584861+'\x20--app\x20<name>\x20[--env\x20daily]\x20or\x20'+CLI_BIN_NAME+_0x4ec4b4(0x1e8)+_0x584861+_0x4ec4b4(0x1f6));const _0x50cc19=_0x887613||await resolveRemoteAppCode({'command':_0x584861,'appName':_0x159739,'env':_0x333971,'accessKey':_0x2e4faa[_0x4ec4b4(0x1c9)]}),_0x10fe3b=writeWorkspaceConfig({'command':_0x584861,'appName':_0x159739,'appcode':_0x50cc19,'env':_0x333971,'shouldWriteEnv':!!_0x1f30af,'accessKey':_0x2e4faa[_0x4ec4b4(0x1c9)]});return{'ok':!![],'data':{'configPath':_0x10fe3b,'app':_0x159739||null,'appcode':_0x50cc19,'env':_0x1f30af?_0x333971:null,'accessKeyWritten':![],'command':_0x4ec4b4(0x1e5)+_0x584861},'message':buildWorkspaceMessage(_0x10fe3b,_0x159739,_0x50cc19,_0x1f30af?_0x333971:undefined)};}async function resolveRemoteAppCode(_0x45119a){const _0x376e99=a60_0x4317ff;if(!_0x45119a[_0x376e99(0x1c9)])throw CliErrors['authRequired'](_0x376e99(0x1c8)+CLI_BIN_NAME+_0x376e99(0x1e8)+_0x45119a['command']+'.');const {setActiveAK:_0x3c4b77}=await import(_0x376e99(0x1db)),{getRemoteAppList:_0x287b47}=await import('../../commands/app/remote-source.js');_0x3c4b77(_0x45119a[_0x376e99(0x1c9)]);const _0x3bf0a1=await _0x287b47({'env':_0x45119a[_0x376e99(0x1ea)],'accessKey':_0x45119a[_0x376e99(0x1c9)],'noCache':![]}),_0x3e806a=findAppByName(_0x3bf0a1[_0x376e99(0x1ee)],_0x45119a['appName']);if(_0x3e806a&&!isRuntimeAccessibleApp(_0x3e806a))throw runtimeInaccessibleAppError(_0x3e806a,'\x22'+_0x45119a[_0x376e99(0x1c5)]+'\x22');const _0x52a6a1=_0x3e806a?.[_0x376e99(0x1f0)]?.[_0x376e99(0x1dd)]();if(_0x52a6a1)return _0x52a6a1;const _0x199462=_0x3bf0a1[_0x376e99(0x1ee)][_0x376e99(0x1cc)](_0x9cc589=>_0x9cc589[_0x376e99(0x1c5)])['filter'](Boolean),_0x12cd3b=_0x199462[_0x376e99(0x1df)]?_0x376e99(0x1c2)+Array[_0x376e99(0x1d1)](new Set(_0x199462))['join'](',\x20')+'.':_0x376e99(0x1c4)+CLI_BIN_NAME+'\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20pass\x20--appcode\x20directly.';throw CliErrors[_0x376e99(0x1da)](_0x376e99(0x1de)+_0x45119a[_0x376e99(0x1c5)]+_0x376e99(0x1f7),_0x12cd3b);}function writeWorkspaceConfig(_0x3fe114){const _0x937e08=a60_0x4317ff,_0x5beb0d=resolveWriteConfigPath(_0x937e08(0x1e9)),_0x4a2694=readConfigFile(_0x5beb0d);_0x3fe114[_0x937e08(0x1c3)]&&(_0x4a2694[_0x937e08(0x1ea)]=_0x3fe114['env']);if(_0x3fe114[_0x937e08(0x1c5)]){const _0x156a4b=isRecord(_0x4a2694['apps'])?{..._0x4a2694[_0x937e08(0x1d6)]}:{},_0x2e1f7e=isRecord(_0x156a4b[_0x3fe114[_0x937e08(0x1c5)]])?_0x156a4b[_0x3fe114[_0x937e08(0x1c5)]]:{};_0x156a4b[_0x3fe114[_0x937e08(0x1c5)]]={..._0x2e1f7e,'appcode':_0x3fe114['appcode']},_0x4a2694[_0x937e08(0x1d6)]=_0x156a4b,_0x4a2694[_0x937e08(0x1ed)]=_0x3fe114[_0x937e08(0x1c5)];if(_0x4a2694[_0x937e08(0x1d7)])delete _0x4a2694[_0x937e08(0x1d7)];return writeAndReturn(_0x5beb0d,_0x4a2694);}_0x4a2694['appcode']=_0x3fe114['appcode'];if(_0x4a2694[_0x937e08(0x1d7)])delete _0x4a2694[_0x937e08(0x1d7)];return writeAndReturn(_0x5beb0d,_0x4a2694);}function writeAndReturn(_0x5c6431,_0x4548a3){return writeConfigFile(_0x5c6431,_0x4548a3),_0x5c6431;}function resolveWorkspaceEnv(_0x200597){const _0x147844=a60_0x4317ff;if(RUNTIME_ENV_VALUES['includes'](_0x200597))return _0x200597;throw CliErrors[_0x147844(0x1da)](_0x147844(0x1e2)+_0x200597+_0x147844(0x1e6)+RUNTIME_ENV_VALUES[_0x147844(0x1c1)](',\x20'));}function buildWorkspaceMessage(_0x4dc276,_0x385adc,_0x293eff,_0x180281){const _0x36a840=a60_0x4317ff,_0x22d45a=_0x385adc?_0x385adc+'\x20('+_0x293eff+')':_0x293eff,_0x574c50=_0x180281?_0x36a840(0x1c6)+_0x180281:'';return _0x36a840(0x1f2)+_0x4dc276+_0x36a840(0x1ec)+_0x22d45a+_0x574c50+_0x36a840(0x1cd);}function isRecord(_0x1c5d09){const _0x2cb080=a60_0x4317ff;return typeof _0x1c5d09===_0x2cb080(0x1d4)&&_0x1c5d09!==null&&!Array['isArray'](_0x1c5d09);}function makeWorkspaceCommand(_0x5dcecf){const _0x4d0ac5=a60_0x4317ff;return{'service':_0x4d0ac5(0x1d3),'command':_0x5dcecf,'description':_0x5dcecf==='init'?_0x4d0ac5(0x1f5):_0x4d0ac5(0x1ca),'risk':_0x4d0ac5(0x1e7),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':WORKSPACE_USE_FLAGS,async 'execute'(_0x4fa3f9){return executeWorkspaceUse(_0x4fa3f9,_0x5dcecf);}};}export const workspaceDefinitions=[makeWorkspaceCommand(a60_0x4317ff(0x1f3)),makeWorkspaceCommand(a60_0x4317ff(0x1d8))];
|
package/lib/config/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a61_0x3358(){const _0xd0f703=['entries','2071448LwzVdc','Target\x20environment','cliSettableTopLevel','133gneXgo','filter','1822350QAWDWT','648932TGPGgt','legacyCompatOnly','enumValues','join','format','986346RxpRuO','193668wBrzvD','map','riskLevel',';\x20local\x20alias:\x20apps.<alias>.appcode','Default\x20page\x20size','Override\x20API\x20domain','Override\x20SkillHub\x20domain','fromEntries','importable','has','171hFaTaT','defaultValue','Locale','Override\x20runtime\x20domain','Config\x20key.\x20Top-level:\x20','3544605eApFqA','785320mwXNek','env','Override\x20user\x20domain'];a61_0x3358=function(){return _0xd0f703;};return a61_0x3358();}const a61_0x5736b8=a61_0x2a5e;(function(_0x9ad25d,_0x15e140){const _0x337d69=a61_0x2a5e,_0x381648=_0x9ad25d();while(!![]){try{const _0x3f1f4c=-parseInt(_0x337d69(0xd5))/0x1+-parseInt(_0x337d69(0xda))/0x2+-parseInt(_0x337d69(0xd4))/0x3+parseInt(_0x337d69(0xcf))/0x4+-parseInt(_0x337d69(0xca))/0x5+-parseInt(_0x337d69(0xdb))/0x6*(-parseInt(_0x337d69(0xd2))/0x7)+parseInt(_0x337d69(0xcb))/0x8*(parseInt(_0x337d69(0xe5))/0x9);if(_0x3f1f4c===_0x15e140)break;else _0x381648['push'](_0x381648['shift']());}catch(_0x2417b3){_0x381648['push'](_0x381648['shift']());}}}(a61_0x3358,0x834cb));function a61_0x2a5e(_0x113c6a,_0x5a3c73){_0x113c6a=_0x113c6a-0xc9;const _0x3358eb=a61_0x3358();let _0x2a5eb2=_0x3358eb[_0x113c6a];return _0x2a5eb2;}import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{OUTPUT_FORMAT_VALUES}from'../constant/output.js';export const CONFIG_FIELD_SCHEMAS={'env':{'description':a61_0x5736b8(0xd0),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':RUNTIME_ENV_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a61_0x5736b8(0xcc)],'importable':!![]},'format':{'description':'Default\x20output\x20format','topLevel':!![],'cliSettableTopLevel':!![],'enumValues':OUTPUT_FORMAT_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a61_0x5736b8(0xd9)],'importable':!![]},'pageSize':{'description':a61_0x5736b8(0xdf),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'apiDomain':{'description':a61_0x5736b8(0xe0),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'userDomain':{'description':a61_0x5736b8(0xcd),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'runtimeDomain':{'description':a61_0x5736b8(0xe8),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'skillHubDomain':{'description':a61_0x5736b8(0xe1),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'accessKey':{'description':'Access\x20key\x20(client-ak\x20auth)','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'riskLevel':{'description':'Risk\x20level','topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a61_0x5736b8(0xdd)],'importable':!![]},'locale':{'description':a61_0x5736b8(0xe7),'topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES['locale'],'importable':!![],'legacyCompatOnly':!![]}};export const TOP_LEVEL_CONFIG_KEYS=new Set(Object[a61_0x5736b8(0xce)](CONFIG_FIELD_SCHEMAS)[a61_0x5736b8(0xd3)](([,_0x2e387b])=>_0x2e387b[a61_0x5736b8(0xd1)])[a61_0x5736b8(0xdc)](([_0x49abd1])=>_0x49abd1));export const CONFIG_ENUM_VALUES=Object[a61_0x5736b8(0xe2)](Object[a61_0x5736b8(0xce)](CONFIG_FIELD_SCHEMAS)[a61_0x5736b8(0xd3)](([,_0x4e8a38])=>_0x4e8a38[a61_0x5736b8(0xd7)])[a61_0x5736b8(0xdc)](([_0x3266f4,_0x25061e])=>[_0x3266f4,[..._0x25061e['enumValues']||[]]]));export const IMPORTABLE_RUNTIME_CONFIG_KEYS=Object[a61_0x5736b8(0xce)](CONFIG_FIELD_SCHEMAS)[a61_0x5736b8(0xd3)](([,_0x2483a4])=>_0x2483a4[a61_0x5736b8(0xe3)])[a61_0x5736b8(0xdc)](([_0x3dd84])=>_0x3dd84);export function getConfigFieldSchema(_0x7fbded){return CONFIG_FIELD_SCHEMAS[_0x7fbded];}export function getConfigEnumValues(_0x3fb3b2){const _0x1019d7=a61_0x5736b8;return getConfigFieldSchema(_0x3fb3b2)?.[_0x1019d7(0xd7)];}export function getConfigDefaultValue(_0x5a9c59){const _0xf9584a=a61_0x5736b8;return getConfigFieldSchema(_0x5a9c59)?.[_0xf9584a(0xe6)];}export function isTopLevelConfigKey(_0x1e1226){const _0x19ddb6=a61_0x5736b8;return TOP_LEVEL_CONFIG_KEYS[_0x19ddb6(0xe4)](_0x1e1226);}export function isLegacyCompatConfigKey(_0x184498){const _0x27b52a=a61_0x5736b8;return getConfigFieldSchema(_0x184498)?.[_0x27b52a(0xd6)]===!![];}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function formatConfigKeyList(_0x452a84){const _0x2c7d15=a61_0x5736b8;return[..._0x452a84][_0x2c7d15(0xd8)](',\x20');}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x14674=a61_0x5736b8;return _0x14674(0xc9)+getTopLevelConfigKeySummary()+_0x14674(0xde);}export function buildAppProfileListFields(_0x5ca2ba){return{'env':_0x5ca2ba,'hasAccessKey':![],'format':null,'pageSize':null,'riskLevel':null,'locale':null};}
|
package/lib/constant/app.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a62_0x268898=a62_0xb24d;(function(_0x5652f6,_0x486fc4){const _0x18a0a2=a62_0xb24d,_0x136973=_0x5652f6();while(!![]){try{const _0x305527=parseInt(_0x18a0a2(0x123))/0x1+parseInt(_0x18a0a2(0x11d))/0x2+-parseInt(_0x18a0a2(0x11c))/0x3+parseInt(_0x18a0a2(0x119))/0x4*(-parseInt(_0x18a0a2(0x117))/0x5)+parseInt(_0x18a0a2(0x11f))/0x6*(-parseInt(_0x18a0a2(0x11a))/0x7)+parseInt(_0x18a0a2(0x124))/0x8*(parseInt(_0x18a0a2(0x11e))/0x9)+-parseInt(_0x18a0a2(0x120))/0xa*(-parseInt(_0x18a0a2(0x118))/0xb);if(_0x305527===_0x486fc4)break;else _0x136973['push'](_0x136973['shift']());}catch(_0x521757){_0x136973['push'](_0x136973['shift']());}}}(a62_0x2ca4,0x426a9));export const APP_PUBLISH_STATUS={'Published':a62_0x268898(0x122),'Unpublished':a62_0x268898(0x121)};function a62_0xb24d(_0x496b8f,_0x4c0af8){_0x496b8f=_0x496b8f-0x117;const _0x2ca428=a62_0x2ca4();let _0xb24db9=_0x2ca428[_0x496b8f];return _0xb24db9;}function a62_0x2ca4(){const _0x479618=['758886FbTVzX','37062BqbPdP','30918UiFhAf','5063920hNTnsE','UNPUBLISH','PUBLISHED','306141HLFKWI','16PIJibm','5HRrYul','11kHKTEj','1527208AnthBF','133zBvOfU','Published','1345386PfcLSV'];a62_0x2ca4=function(){return _0x479618;};return a62_0x2ca4();}export const RUNTIME_ACCESSIBLE_APP_STATUS=APP_PUBLISH_STATUS[a62_0x268898(0x11b)];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a63_0x1abe20=a63_0x435e;(function(_0x463148,_0x2e956a){const _0x12a2a4=a63_0x435e,_0x2769f8=_0x463148();while(!![]){try{const _0x597afb=parseInt(_0x12a2a4(0x13f))/0x1+-parseInt(_0x12a2a4(0x13d))/0x2*(parseInt(_0x12a2a4(0x13c))/0x3)+parseInt(_0x12a2a4(0x139))/0x4*(parseInt(_0x12a2a4(0x137))/0x5)+-parseInt(_0x12a2a4(0x136))/0x6+parseInt(_0x12a2a4(0x13a))/0x7*(parseInt(_0x12a2a4(0x13e))/0x8)+-parseInt(_0x12a2a4(0x138))/0x9+parseInt(_0x12a2a4(0x140))/0xa;if(_0x597afb===_0x2e956a)break;else _0x2769f8['push'](_0x2769f8['shift']());}catch(_0x291967){_0x2769f8['push'](_0x2769f8['shift']());}}}(a63_0x2614,0x52791));export const AUTH_MODE={'ClientAk':a63_0x1abe20(0x13b)};function a63_0x435e(_0x2ca9f9,_0x5a8df9){_0x2ca9f9=_0x2ca9f9-0x136;const _0x26146b=a63_0x2614();let _0x435e29=_0x26146b[_0x2ca9f9];return _0x435e29;}export function isAuthMode(_0x2898ea){return _0x2898ea===AUTH_MODE['ClientAk'];}function a63_0x2614(){const _0x16b26e=['412kryaYs','63pwgDwy','client-ak','3LNcjgu','1306210IjVySu','372200DTMOLY','565076XoNvIk','4730110pCDMyD','2725158BpfJxJ','10555folgla','2062242CHryju'];a63_0x2614=function(){return _0x16b26e;};return a63_0x2614();}
|
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a64_0x1ff9(){const _0x210127=['<name>','Alias\x20for\x20--non-interactive','64qyGlnT','Environment','JSON\x20params\x20for\x20execute\x20commands','map','sqlcode','3786NTAdMF','447574iwKWAJ','Record\x20ID','boolean','verbose','clear','name','params','382697HyumQE','Verbose\x20output','112398HjQusq','help','format','4622662kCJywp','Clear\x20output','377421XdJiKE','env','dry-run','type','Use\x20global\x20config\x20scope','2857617rkTPaX','Show\x20help','meowKey','non-interactive','Name\x20filter','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20implies\x20--format\x20json\x20when\x20current\x20format\x20is\x20pretty)','4EkxfTX','app','Force\x20non-interactive\x20mode\x20(CI)','appcode','yes','dryRun','10QGqZGq','production\x20|\x20development\x20|\x20daily','4195ZWcikI','Preview\x20operation\x20without\x20executing','string','<code>','global','json\x20|\x20pretty\x20|\x20compress'];a64_0x1ff9=function(){return _0x210127;};return a64_0x1ff9();}const a64_0x2b56d2=a64_0x97f6;function a64_0x97f6(_0x38ac37,_0x241034){_0x38ac37=_0x38ac37-0x10c;const _0x1ff94c=a64_0x1ff9();let _0x97f626=_0x1ff94c[_0x38ac37];return _0x97f626;}(function(_0x6b6f8d,_0x3937e2){const _0x45e513=a64_0x97f6,_0x3e156a=_0x6b6f8d();while(!![]){try{const _0x38073f=parseInt(_0x45e513(0x10f))/0x1+-parseInt(_0x45e513(0x118))/0x2+-parseInt(_0x45e513(0x11d))/0x3*(-parseInt(_0x45e513(0x128))/0x4)+parseInt(_0x45e513(0x130))/0x5*(-parseInt(_0x45e513(0x10e))/0x6)+-parseInt(_0x45e513(0x116))/0x7*(parseInt(_0x45e513(0x138))/0x8)+parseInt(_0x45e513(0x122))/0x9+-parseInt(_0x45e513(0x12e))/0xa*(-parseInt(_0x45e513(0x11b))/0xb);if(_0x38073f===_0x3937e2)break;else _0x3e156a['push'](_0x3e156a['shift']());}catch(_0x352219){_0x3e156a['push'](_0x3e156a['shift']());}}}(a64_0x1ff9,0x465a0));import{PRODUCT_CONFIG}from'../constant/product.js';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';export const CLI_BIN_NAME=PRODUCT_CONFIG['cliBinName'];export const CLI_DISPLAY_NAME=PRODUCT_CONFIG['cliDisplayName'];export const NPM_PACKAGE_NAME=LOVRABET_NPM_PACKAGE_NAME;export const GLOBAL_FLAGS=[{'name':a64_0x2b56d2(0x12b),'meowKey':a64_0x2b56d2(0x12b),'type':'string','description':'Override\x20appcode','hint':a64_0x2b56d2(0x133)},{'name':a64_0x2b56d2(0x129),'meowKey':'app','type':'string','description':'Select\x20app\x20profile\x20by\x20name','hint':a64_0x2b56d2(0x136)},{'name':'env','meowKey':a64_0x2b56d2(0x11e),'type':a64_0x2b56d2(0x132),'description':a64_0x2b56d2(0x139),'hint':a64_0x2b56d2(0x12f)},{'name':a64_0x2b56d2(0x11a),'meowKey':a64_0x2b56d2(0x11a),'type':a64_0x2b56d2(0x132),'description':'Output\x20format','hint':a64_0x2b56d2(0x135)},{'name':'jq','meowKey':'jq','type':a64_0x2b56d2(0x132),'description':a64_0x2b56d2(0x127),'hint':'<expr>'},{'name':a64_0x2b56d2(0x11f),'meowKey':a64_0x2b56d2(0x12d),'type':a64_0x2b56d2(0x111),'description':a64_0x2b56d2(0x131)},{'name':'yes','meowKey':a64_0x2b56d2(0x12c),'type':a64_0x2b56d2(0x111),'description':'Skip\x20confirmation\x20for\x20high-risk\x20writes'},{'name':a64_0x2b56d2(0x125),'meowKey':'nonInteractive','type':'boolean','description':a64_0x2b56d2(0x12a)},{'name':a64_0x2b56d2(0x134),'meowKey':a64_0x2b56d2(0x134),'type':'boolean','description':a64_0x2b56d2(0x121)},{'name':'ci','meowKey':'ci','type':'boolean','description':a64_0x2b56d2(0x137),'hidden':!![]},{'name':'help','meowKey':a64_0x2b56d2(0x119),'type':'boolean','description':a64_0x2b56d2(0x123)},{'name':'id','meowKey':'id','type':a64_0x2b56d2(0x132),'description':a64_0x2b56d2(0x110),'hidden':!![]},{'name':a64_0x2b56d2(0x114),'meowKey':'name','type':a64_0x2b56d2(0x132),'description':a64_0x2b56d2(0x126),'hidden':!![]},{'name':'sqlcode','meowKey':a64_0x2b56d2(0x10d),'type':a64_0x2b56d2(0x132),'description':'SQL\x20query\x20code','hidden':!![]},{'name':a64_0x2b56d2(0x115),'meowKey':'params','type':'string','description':a64_0x2b56d2(0x13a),'hidden':!![]},{'name':a64_0x2b56d2(0x112),'meowKey':a64_0x2b56d2(0x112),'type':a64_0x2b56d2(0x111),'description':a64_0x2b56d2(0x117),'hidden':!![]},{'name':a64_0x2b56d2(0x113),'meowKey':a64_0x2b56d2(0x113),'type':a64_0x2b56d2(0x111),'description':a64_0x2b56d2(0x11c),'hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a64_0x2b56d2(0x12b),a64_0x2b56d2(0x129),a64_0x2b56d2(0x11e),a64_0x2b56d2(0x11a),'jq',a64_0x2b56d2(0x11f),a64_0x2b56d2(0x12c),'non-interactive','ci']);export function buildMeowFlags(){const _0x915263=a64_0x2b56d2;return Object['fromEntries'](GLOBAL_FLAGS[_0x915263(0x10c)](_0x592dfd=>[_0x592dfd[_0x915263(0x124)],{'type':_0x592dfd[_0x915263(0x120)]}]));}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a65_0x1b3a(_0x1b520b,_0x138558){_0x1b520b=_0x1b520b-0x1f1;const _0xac54d6=a65_0xac54();let _0x1b3a4c=_0xac54d6[_0x1b520b];return _0x1b3a4c;}const a65_0x39323e=a65_0x1b3a;(function(_0x74bf41,_0x185971){const _0x4bd8f2=a65_0x1b3a,_0xdab0f9=_0x74bf41();while(!![]){try{const _0x4453d0=parseInt(_0x4bd8f2(0x1fe))/0x1*(parseInt(_0x4bd8f2(0x1f3))/0x2)+parseInt(_0x4bd8f2(0x1fc))/0x3*(parseInt(_0x4bd8f2(0x1f1))/0x4)+parseInt(_0x4bd8f2(0x1fb))/0x5+-parseInt(_0x4bd8f2(0x1f7))/0x6*(parseInt(_0x4bd8f2(0x1f8))/0x7)+-parseInt(_0x4bd8f2(0x1fd))/0x8+-parseInt(_0x4bd8f2(0x200))/0x9*(-parseInt(_0x4bd8f2(0x1f2))/0xa)+parseInt(_0x4bd8f2(0x201))/0xb*(-parseInt(_0x4bd8f2(0x1f6))/0xc);if(_0x4453d0===_0x185971)break;else _0xdab0f9['push'](_0xdab0f9['shift']());}catch(_0x5b2539){_0xdab0f9['push'](_0xdab0f9['shift']());}}}(a65_0xac54,0xc7c7a));export const DEFAULT_APP_PROFILE_NAME=a65_0x39323e(0x1f5);function a65_0xac54(){const _0x3bd670=['1hxosTL','en-US','54UMZFkJ','22CgONqv','27556TsPlTl','2152210NxGFlS','1175026QlHTKF','production','main','4878084PMYhpX','230184UeEFWP','119PxfPkY','compress','write','7456820JTohIs','3ZDoAcz','8748736JwOYVu'];a65_0xac54=function(){return _0x3bd670;};return a65_0xac54();}export const DEFAULT_CONFIG_VALUES={'env':a65_0x39323e(0x1f4),'format':a65_0x39323e(0x1f9),'locale':a65_0x39323e(0x1ff),'riskLevel':a65_0x39323e(0x1fa)};export const DEFAULT_COMMAND_OUTPUT_FORMAT=a65_0x39323e(0x1f9);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a66_0x3f78(){const _0x409f61=['189iVgAMk','36940owJiSx','136623Jcubye','78THyPCs','1177fTyOWL','48uqqqBY','npmPackageName','32392OxXfkV','26905rETpYs','560802ybBfWv','96zWIBHt','12960NyGyBW','npmRegistryBaseUrl'];a66_0x3f78=function(){return _0x409f61;};return a66_0x3f78();}const a66_0x1295c1=a66_0x2a6b;(function(_0x167351,_0x2db634){const _0x550b67=a66_0x2a6b,_0x4e68ba=_0x167351();while(!![]){try{const _0x383133=-parseInt(_0x550b67(0xe5))/0x1+parseInt(_0x550b67(0xe6))/0x2*(parseInt(_0x550b67(0xe0))/0x3)+parseInt(_0x550b67(0xe8))/0x4*(parseInt(_0x550b67(0xeb))/0x5)+-parseInt(_0x550b67(0xec))/0x6+parseInt(_0x550b67(0xe3))/0x7*(-parseInt(_0x550b67(0xea))/0x8)+-parseInt(_0x550b67(0xe1))/0x9+parseInt(_0x550b67(0xe4))/0xa*(parseInt(_0x550b67(0xe7))/0xb);if(_0x383133===_0x2db634)break;else _0x4e68ba['push'](_0x4e68ba['shift']());}catch(_0x226e49){_0x4e68ba['push'](_0x4e68ba['shift']());}}}(a66_0x3f78,0x1d5a1));import{PRODUCT_CONFIG}from'../constant/product.js';export const LOVRABET_NPM_PACKAGE_NAME=PRODUCT_CONFIG[a66_0x1295c1(0xe9)];export const LOVRABET_SKILL_SOURCE=PRODUCT_CONFIG['skillSource'];function a66_0x2a6b(_0x109d4e,_0x421e91){_0x109d4e=_0x109d4e-0xe0;const _0x3f783f=a66_0x3f78();let _0x2a6b29=_0x3f783f[_0x109d4e];return _0x2a6b29;}export const NPM_REGISTRY_BASE_URL=PRODUCT_CONFIG[a66_0x1295c1(0xe2)];
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a67_0x195007=a67_0x3d0a;(function(_0x34b635,_0x1c8701){const _0xef4d8e=a67_0x3d0a,_0x458296=_0x34b635();while(!![]){try{const _0x2b2b81=-parseInt(_0xef4d8e(0x84))/0x1+parseInt(_0xef4d8e(0x7e))/0x2+-parseInt(_0xef4d8e(0x8d))/0x3+-parseInt(_0xef4d8e(0x89))/0x4*(parseInt(_0xef4d8e(0x8f))/0x5)+parseInt(_0xef4d8e(0x88))/0x6*(-parseInt(_0xef4d8e(0x8a))/0x7)+-parseInt(_0xef4d8e(0x7d))/0x8*(-parseInt(_0xef4d8e(0x82))/0x9)+parseInt(_0xef4d8e(0x8e))/0xa;if(_0x2b2b81===_0x1c8701)break;else _0x458296['push'](_0x458296['shift']());}catch(_0x596579){_0x458296['push'](_0x458296['shift']());}}}(a67_0x1049,0x53957));import{getEnv,isProduction}from'../constant/env.js';import{PRODUCT_CONFIG}from'../constant/product.js';function a67_0x1049(){const _0x48af03=['6288DVweUK','248860QQQkTF','runtime','userDomain','runtimeDomain','6597PVKoTS','user','350171fnqxyQ','production','skillhub','domains','138BmRzxR','407768HDagGX','90174QtkwiH','nonProduction','apiDomain','991170rcTQbe','12302900KFgCRw','30JSiIug','api'];a67_0x1049=function(){return _0x48af03;};return a67_0x1049();}let customApiDomain,customUserDomain,customRuntimeDomain,customSkillHubDomain;export function initDomains(_0x2fb4d7){const _0x5355e0=a67_0x3d0a;customApiDomain=_0x2fb4d7?.[_0x5355e0(0x8c)],customUserDomain=_0x2fb4d7?.[_0x5355e0(0x80)],customRuntimeDomain=_0x2fb4d7?.[_0x5355e0(0x81)],customSkillHubDomain=_0x2fb4d7?.['skillHubDomain'];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a67_0x195007(0x87)]['production']['user']:PRODUCT_CONFIG['domains'][a67_0x195007(0x8b)][a67_0x195007(0x83)]);export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?PRODUCT_CONFIG['domains'][a67_0x195007(0x85)][a67_0x195007(0x7c)]:PRODUCT_CONFIG[a67_0x195007(0x87)]['nonProduction'][a67_0x195007(0x7c)]);export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?PRODUCT_CONFIG['domains'][a67_0x195007(0x85)][a67_0x195007(0x7f)]:PRODUCT_CONFIG['domains'][a67_0x195007(0x8b)][a67_0x195007(0x7f)]);function a67_0x3d0a(_0x49d9e1,_0x4ae483){_0x49d9e1=_0x49d9e1-0x7c;const _0x104958=a67_0x1049();let _0x3d0ac5=_0x104958[_0x49d9e1];return _0x3d0ac5;}export const getSkillHubDomain=()=>customSkillHubDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a67_0x195007(0x87)][a67_0x195007(0x85)][a67_0x195007(0x86)]:PRODUCT_CONFIG['domains']['nonProduction']['skillhub']);
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a68_0xc37aa4=a68_0x3a19;(function(_0x4e231e,_0x1c1fb5){const _0x24d0c3=a68_0x3a19,_0x12277a=_0x4e231e();while(!![]){try{const _0x4dfdc5=-parseInt(_0x24d0c3(0x1d0))/0x1*(-parseInt(_0x24d0c3(0x1d9))/0x2)+-parseInt(_0x24d0c3(0x1ce))/0x3+-parseInt(_0x24d0c3(0x1d2))/0x4*(parseInt(_0x24d0c3(0x1dc))/0x5)+parseInt(_0x24d0c3(0x1d5))/0x6*(parseInt(_0x24d0c3(0x1d3))/0x7)+-parseInt(_0x24d0c3(0x1d4))/0x8+parseInt(_0x24d0c3(0x1d1))/0x9*(parseInt(_0x24d0c3(0x1d8))/0xa)+parseInt(_0x24d0c3(0x1d7))/0xb*(parseInt(_0x24d0c3(0x1cc))/0xc);if(_0x4dfdc5===_0x1c1fb5)break;else _0x12277a['push'](_0x12277a['shift']());}catch(_0x2cf64f){_0x12277a['push'](_0x12277a['shift']());}}}(a68_0x2524,0x70cc1));import{productEnv}from'../constant/product.js';export const RUNTIME_ENV_VALUES=['production',a68_0xc37aa4(0x1da),a68_0xc37aa4(0x1d6)];export function normalizeEnv(_0x4993e1){const _0x1243b7=a68_0xc37aa4;return _0x4993e1===_0x1243b7(0x1db)?'production':_0x4993e1;}export function isProduction(_0x268026){const _0x5a151c=a68_0xc37aa4;return normalizeEnv(_0x268026)===_0x5a151c(0x1cf);}function a68_0x2524(){const _0x26a716=['160898SBcmIH','development','online','10eMptON','115200Pjlwdn','ENV','2563413gljxMS','production','3pDDpBT','36BtPiTT','1638292SfMhgu','410291AgUqTZ','629872CgrRoC','6SnKJvE','daily','1661BSJprE','1162020iAmqOf'];a68_0x2524=function(){return _0x26a716;};return a68_0x2524();}function a68_0x3a19(_0x5b7951,_0x598ca2){_0x5b7951=_0x5b7951-0x1cc;const _0x252470=a68_0x2524();let _0x3a1979=_0x252470[_0x5b7951];return _0x3a1979;}export function isDaily(_0xc20de6){const _0x4a4723=a68_0xc37aa4;return normalizeEnv(_0xc20de6)===_0x4a4723(0x1d6);}export function isDev(_0x1067c1){const _0x5b43f4=a68_0xc37aa4,_0x57a030=normalizeEnv(_0x1067c1);return _0x57a030===_0x5b43f4(0x1da)||_0x57a030==='dev';}let env=normalizeEnv(productEnv(a68_0xc37aa4(0x1cd))||'production');export function getEnv(){return env;}export function initEnv(_0x21db5e){env=normalizeEnv(_0x21db5e);}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a69_0x393e(_0x1d6338,_0x423f31){_0x1d6338=_0x1d6338-0x121;const _0x40e05d=a69_0x40e0();let _0x393e58=_0x40e05d[_0x1d6338];return _0x393e58;}const a69_0x571ce2=a69_0x393e;(function(_0x4abfa4,_0xfe952f){const _0xa716e6=a69_0x393e,_0x134878=_0x4abfa4();while(!![]){try{const _0x366e47=-parseInt(_0xa716e6(0x122))/0x1*(-parseInt(_0xa716e6(0x129))/0x2)+-parseInt(_0xa716e6(0x124))/0x3+-parseInt(_0xa716e6(0x12d))/0x4*(-parseInt(_0xa716e6(0x12c))/0x5)+-parseInt(_0xa716e6(0x123))/0x6+-parseInt(_0xa716e6(0x128))/0x7+-parseInt(_0xa716e6(0x12b))/0x8*(-parseInt(_0xa716e6(0x12a))/0x9)+parseInt(_0xa716e6(0x127))/0xa*(parseInt(_0xa716e6(0x125))/0xb);if(_0x366e47===_0xfe952f)break;else _0x134878['push'](_0x134878['shift']());}catch(_0x163639){_0x134878['push'](_0x134878['shift']());}}}(a69_0x40e0,0xa626b));export const OUTPUT_FORMAT_VALUES=[a69_0x571ce2(0x121),a69_0x571ce2(0x126),a69_0x571ce2(0x12e)];function a69_0x40e0(){const _0x5985ed=['3951cdwClF','16920OjJTPj','75ySUrnH','132340ZnLlCI','compress','json','60KfOiYO','1193346nLgjju','3668370nfrcBS','2167iXmser','pretty','37230wHFzHC','6320405ITNNQB','28232bCuGcG'];a69_0x40e0=function(){return _0x5985ed;};return a69_0x40e0();}
|
package/lib/constant/product.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a70_0x44d5cc=a70_0x144f;function a70_0x144f(_0x3c6898,_0x4a4552){_0x3c6898=_0x3c6898-0x15a;const _0x2ac612=a70_0x2ac6();let _0x144f25=_0x2ac612[_0x3c6898];return _0x144f25;}(function(_0x21bf84,_0x3a62a0){const _0x1ff8be=a70_0x144f,_0x284099=_0x21bf84();while(!![]){try{const _0x2c377c=parseInt(_0x1ff8be(0x175))/0x1*(parseInt(_0x1ff8be(0x15c))/0x2)+parseInt(_0x1ff8be(0x173))/0x3*(parseInt(_0x1ff8be(0x16a))/0x4)+parseInt(_0x1ff8be(0x161))/0x5+parseInt(_0x1ff8be(0x162))/0x6+parseInt(_0x1ff8be(0x167))/0x7*(parseInt(_0x1ff8be(0x177))/0x8)+-parseInt(_0x1ff8be(0x164))/0x9*(parseInt(_0x1ff8be(0x16e))/0xa)+-parseInt(_0x1ff8be(0x16c))/0xb*(parseInt(_0x1ff8be(0x176))/0xc);if(_0x2c377c===_0x3a62a0)break;else _0x284099['push'](_0x284099['shift']());}catch(_0x965ac8){_0x284099['push'](_0x284099['shift']());}}}(a70_0x2ac6,0x7bdeb));export const PRODUCT_CONFIG={'cliBinName':a70_0x44d5cc(0x15f),'cliDisplayName':'Lovrabet\x20Runtime\x20CLI','npmPackageName':'@lovrabet/lovrabet-cli','skillSource':a70_0x44d5cc(0x166),'npmRegistryBaseUrl':a70_0x44d5cc(0x16d),'envPrefix':a70_0x44d5cc(0x169),'legacyEnvPrefixes':[a70_0x44d5cc(0x172)],'configFileNames':['.lovrabet.json',a70_0x44d5cc(0x171)],'newConfigFileName':a70_0x44d5cc(0x170),'homeDirName':a70_0x44d5cc(0x15e),'logFileName':'.lovrabet-runtime.log','invokeSource':a70_0x44d5cc(0x160),'userCenterDisplayName':'Lovrabet\x20User\x20Center','skipNpxSkillsEnvSuffix':a70_0x44d5cc(0x15a),'domains':{'production':{'user':a70_0x44d5cc(0x16b),'api':'https://api.lovrabet.com','runtime':a70_0x44d5cc(0x174),'skillhub':'https://skills.lovrabet.com'},'nonProduction':{'user':a70_0x44d5cc(0x15b),'api':'https://daily-api.lovrabet.com','runtime':a70_0x44d5cc(0x163),'skillhub':a70_0x44d5cc(0x16f)}},'accessKeyCreatePath':a70_0x44d5cc(0x15d)};function a70_0x2ac6(){const _0x5167a4=['envPrefix','LOVRABET','14696jbkkSI','https://user.lovrabet.com','11YeglKk','https://registry.npmjs.org','1200BeqUNe','https://skills-daily.lovrabet.com','.lovrabet.json','.lovrabetrc','RABETBASE','123NoJGnZ','https://runtime.lovrabet.com','519cOczbh','8600052HvaDQH','8OcHTnU','SKIP_NPX_SKILLS','https://user-daily.lovrabet.com','208RRVmKI','/user/ak','.lovrabet','lovrabet','cli:lovrabet-runtime','3917830ICLVZU','2235288uxxONd','https://daily-runtime.lovrabet.com','71271ODUyio','legacyEnvPrefixes','lovrabet/lovrabet-cli','5695186BQrbhy'];a70_0x2ac6=function(){return _0x5167a4;};return a70_0x2ac6();}export function productEnvName(_0x1d46e7){const _0x5c6add=a70_0x44d5cc;return PRODUCT_CONFIG[_0x5c6add(0x168)]+'_'+_0x1d46e7;}export function productEnvNames(_0x421e03){const _0x2d19ef=a70_0x44d5cc;return[productEnvName(_0x421e03),...PRODUCT_CONFIG[_0x2d19ef(0x165)]['map'](_0x41ca0c=>_0x41ca0c+'_'+_0x421e03)];}export function productEnv(_0x505769){for(const _0x1ec928 of productEnvNames(_0x505769)){const _0xf1930f=process.env[_0x1ec928];if(_0xf1930f!==undefined)return _0xf1930f;}return undefined;}
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a71_0x42b8(){const _0x147a37=['1526268gQudwJ','read','44kfkJcg','write','283125CFnhjL','202697pOjBwI','542WIVgYA','70OAhmiW','high-risk-write','4202784EEptkH','879tPylBF','64500tbKGfh','20qRyvwQ','326584KmNNdS'];a71_0x42b8=function(){return _0x147a37;};return a71_0x42b8();}function a71_0x4e0a(_0x346b3f,_0x3a3dee){_0x346b3f=_0x346b3f-0x172;const _0x42b851=a71_0x42b8();let _0x4e0a09=_0x42b851[_0x346b3f];return _0x4e0a09;}const a71_0x33ed65=a71_0x4e0a;(function(_0x46c27e,_0x34080c){const _0x27767b=a71_0x4e0a,_0xa35164=_0x46c27e();while(!![]){try{const _0x41d991=-parseInt(_0x27767b(0x17a))/0x1+parseInt(_0x27767b(0x17b))/0x2*(parseInt(_0x27767b(0x17f))/0x3)+-parseInt(_0x27767b(0x173))/0x4*(parseInt(_0x27767b(0x179))/0x5)+-parseInt(_0x27767b(0x175))/0x6+-parseInt(_0x27767b(0x17c))/0x7*(-parseInt(_0x27767b(0x174))/0x8)+parseInt(_0x27767b(0x17e))/0x9+parseInt(_0x27767b(0x172))/0xa*(parseInt(_0x27767b(0x177))/0xb);if(_0x41d991===_0x34080c)break;else _0xa35164['push'](_0xa35164['shift']());}catch(_0x450a2c){_0xa35164['push'](_0xa35164['shift']());}}}(a71_0x42b8,0x3aa51));export const RISK_LEVEL_VALUES=[a71_0x33ed65(0x176),a71_0x33ed65(0x178),a71_0x33ed65(0x17d)];
|
package/lib/constant/url.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a72_0x28153a=a72_0x4e2d;(function(_0xf4da62,_0x3f9d22){const _0x2b7e81=a72_0x4e2d,_0x208f5f=_0xf4da62();while(!![]){try{const _0x2d60ad=-parseInt(_0x2b7e81(0x195))/0x1*(-parseInt(_0x2b7e81(0x18d))/0x2)+-parseInt(_0x2b7e81(0x18c))/0x3+-parseInt(_0x2b7e81(0x190))/0x4+-parseInt(_0x2b7e81(0x198))/0x5+parseInt(_0x2b7e81(0x193))/0x6*(parseInt(_0x2b7e81(0x18e))/0x7)+parseInt(_0x2b7e81(0x191))/0x8*(-parseInt(_0x2b7e81(0x192))/0x9)+parseInt(_0x2b7e81(0x18b))/0xa*(parseInt(_0x2b7e81(0x18f))/0xb);if(_0x2d60ad===_0x3f9d22)break;else _0x208f5f['push'](_0x208f5f['shift']());}catch(_0x2ca05c){_0x208f5f['push'](_0x208f5f['shift']());}}}(a72_0x2b40,0xde922));function a72_0x4e2d(_0x11d4c9,_0x5e7ae3){_0x11d4c9=_0x11d4c9-0x18b;const _0x2b40a2=a72_0x2b40();let _0x4e2dd3=_0x2b40a2[_0x11d4c9];return _0x4e2dd3;}import{PRODUCT_CONFIG}from'../constant/product.js';export const USER_ACCESS_KEY_CREATE_URL=''+PRODUCT_CONFIG[a72_0x28153a(0x199)][a72_0x28153a(0x196)][a72_0x28153a(0x194)]+PRODUCT_CONFIG[a72_0x28153a(0x197)];function a72_0x2b40(){const _0x5d24a5=['5944885RmxFOr','domains','9145180IfsivT','3930921SLfjBC','4AqEwdT','14pZnVTs','44vguYCZ','3086472uFAEAu','5517728lMBqov','9AmArlV','2851620QDcFJQ','user','131828CriOXG','production','accessKeyCreatePath'];a72_0x2b40=function(){return _0x5d24a5;};return a72_0x2b40();}
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a68_0x4a00b3=a68_0xb49c;(function(_0x2e9aa0,_0x45ffc2){const _0x495eb1=a68_0xb49c,_0x4852b9=_0x2e9aa0();while(!![]){try{const _0x2e6135=parseInt(_0x495eb1(0x15e))/0x1*(-parseInt(_0x495eb1(0x123))/0x2)+parseInt(_0x495eb1(0x155))/0x3+-parseInt(_0x495eb1(0x147))/0x4+-parseInt(_0x495eb1(0x14c))/0x5+parseInt(_0x495eb1(0x159))/0x6*(-parseInt(_0x495eb1(0x133))/0x7)+parseInt(_0x495eb1(0x145))/0x8+parseInt(_0x495eb1(0x14b))/0x9*(parseInt(_0x495eb1(0x161))/0xa);if(_0x2e6135===_0x45ffc2)break;else _0x4852b9['push'](_0x4852b9['shift']());}catch(_0x4bc3b6){_0x4852b9['push'](_0x4852b9['shift']());}}}(a68_0x3225,0x8d984));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';function a68_0xb49c(_0x4a086a,_0x421717){_0x4a086a=_0x4a086a-0x117;const _0x3225e9=a68_0x3225();let _0xb49c83=_0x3225e9[_0x4a086a];return _0xb49c83;}const CONFIG_NAMES=PRODUCT_CONFIG[a68_0x4a00b3(0x12f)];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a68_0x4a00b3(0x134)];function resolveConfigPath(_0x3ae364){for(const _0x4ec64a of CONFIG_NAMES){const _0xbf3c79=resolve(_0x3ae364,_0x4ec64a);if(existsSync(_0xbf3c79))return _0xbf3c79;}return undefined;}export function resolveWriteConfigPath(_0x28604a){const _0x39732f=a68_0x4a00b3,_0x901b4d=_0x28604a===_0x39732f(0x11b)?process[_0x39732f(0x142)]():homedir(),_0xef0285=resolveConfigPath(_0x901b4d);return _0xef0285??resolve(_0x901b4d,NEW_CONFIG_NAME);}export function readConfigFile(_0x1fca5f){const _0x315ea1=a68_0x4a00b3;try{if(existsSync(_0x1fca5f)){const _0x2f47bd=readFileSync(_0x1fca5f,{'encoding':_0x315ea1(0x13a)});if(_0x2f47bd){const _0x7b3a5c=JSON[_0x315ea1(0x148)](_0x2f47bd);return migrateOnlineEnv(_0x1fca5f,_0x7b3a5c),_0x7b3a5c;}}}catch{}return{};}function migrateOnlineEnv(_0x2c31f7,_0x3fd7dd){const _0x8334de=a68_0x4a00b3;let _0x3e49f2=![];_0x3fd7dd[_0x8334de(0x118)]===_0x8334de(0x117)&&(_0x3fd7dd[_0x8334de(0x118)]='production',_0x3e49f2=!![]);if(_0x3fd7dd[_0x8334de(0x12d)]&&typeof _0x3fd7dd[_0x8334de(0x12d)]===_0x8334de(0x13d))for(const _0x5d9ff9 of Object[_0x8334de(0x151)](_0x3fd7dd[_0x8334de(0x12d)])){_0x5d9ff9&&_0x5d9ff9[_0x8334de(0x118)]===_0x8334de(0x117)&&(_0x5d9ff9['env']=_0x8334de(0x11d),_0x3e49f2=!![]);}if(_0x3e49f2)try{writeConfigFile(_0x2c31f7,_0x3fd7dd);}catch{}}export function writeConfigFile(_0xf3fa3d,_0x14c3a2){const _0x5dac34=a68_0x4a00b3,_0xb401a7=dirname(_0xf3fa3d);!existsSync(_0xb401a7)&&mkdirSync(_0xb401a7,{'recursive':!![]});const _0x48f5a=_0xf3fa3d+_0x5dac34(0x141);try{writeFileSync(_0x48f5a,JSON[_0x5dac34(0x13f)](_0x14c3a2,null,0x2)+'\x0a',{'encoding':_0x5dac34(0x13a),'mode':0x180});try{renameSync(_0x48f5a,_0xf3fa3d);}catch(_0x4a2f83){if(_0x4a2f83[_0x5dac34(0x13c)]===_0x5dac34(0x152)||_0x4a2f83[_0x5dac34(0x13c)]===_0x5dac34(0x13b)||_0x4a2f83[_0x5dac34(0x13c)]===_0x5dac34(0x156)){writeFileSync(_0xf3fa3d,JSON[_0x5dac34(0x13f)](_0x14c3a2,null,0x2)+'\x0a',{'encoding':_0x5dac34(0x13a)});try{unlinkSync(_0x48f5a);}catch{}}else throw _0x4a2f83;}}catch(_0x15e05){try{unlinkSync(_0x48f5a);}catch{}throw _0x15e05;}}export function isNonInteractiveMode(_0x2c983d){const _0x257b4e=a68_0x4a00b3;return!!(_0x2c983d[_0x257b4e(0x130)]||_0x2c983d['ci']||productEnvNames('CI')[_0x257b4e(0x11e)](_0x210575=>process.env[_0x210575]==='true')||process.env.CI===_0x257b4e(0x15c)||!process[_0x257b4e(0x164)]['isTTY']||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x1a205f=a68_0x4a00b3;if(!process[_0x1a205f(0x165)][_0x1a205f(0x11a)])return![];try{const _0xa2ad33=process[_0x1a205f(0x165)]['isRaw'];return process['stdin']['setRawMode'](!![]),process[_0x1a205f(0x165)][_0x1a205f(0x129)](_0xa2ad33??![]),!![];}catch{return![];}}export async function createContext(_0x4ca769){const _0x471580=a68_0x4a00b3,_0xcebd33=readRawConfig(),_0x51164d=buildConfig(_0xcebd33,_0x4ca769);await initGlobalEnvironment(_0x51164d);const {getUserDomain:_0x47c0c5,getApiDomain:_0xef8734}=await import(_0x471580(0x140)),_0xf0408={'apiDomain':_0xef8734(),'userDomain':_0x47c0c5()},_0x866b40=await buildAuth(_0x51164d);logger[_0x471580(0x125)](process[_0x471580(0x142)]());const _0x31ef28=(CLI_BIN_NAME+'\x20'+process[_0x471580(0x12e)][_0x471580(0x154)](0x2)[_0x471580(0x15f)]('\x20'))[_0x471580(0x162)]();logger['setRawCommand'](_0x31ef28);const _0xce420=isNonInteractiveMode(_0x4ca769);return{'config':_0x51164d,'auth':_0x866b40,'logger':logger,'env':_0xf0408,'nonInteractive':_0xce420};}export function buildConfigFromFlags(_0x552493){return buildConfig(readRawConfig(),_0x552493);}export function getLocalAppAliases(_0x195532){const _0x545e12=a68_0x4a00b3;return _0x195532[_0x545e12(0x12d)]&&typeof _0x195532[_0x545e12(0x12d)]===_0x545e12(0x13d)?_0x195532[_0x545e12(0x12d)]:{};}export function resolveLocalAppAliasCode(_0x45847a,_0x1b9a9e){const _0xe3f0ba=a68_0x4a00b3;if(!_0x1b9a9e)return undefined;const _0x97db1d=getLocalAppAliases(_0x45847a)[_0x1b9a9e],_0x3247a7=_0x97db1d?.[_0xe3f0ba(0x14e)];return typeof _0x3247a7===_0xe3f0ba(0x153)&&_0x3247a7[_0xe3f0ba(0x162)]()?_0x3247a7['trim']():undefined;}export function readAppCodeFromConfig(){const _0x5274bf=a68_0x4a00b3,_0x257bc7=readRawConfig(),_0x1ffe09=_0x257bc7[_0x5274bf(0x14e)]??_0x257bc7[_0x5274bf(0x160)];if(typeof _0x1ffe09===_0x5274bf(0x153)&&_0x1ffe09['trim']())return _0x1ffe09['trim']();const _0x40a1a4=resolveLocalAppAliasCode(_0x257bc7,typeof _0x257bc7[_0x5274bf(0x163)]===_0x5274bf(0x153)?_0x257bc7[_0x5274bf(0x163)]:undefined);if(_0x40a1a4)return _0x40a1a4;const _0x71e257=normalizeEnv(String(_0x257bc7[_0x5274bf(0x118)]||_0x5274bf(0x11d))),_0x1907ca=isDaily(_0x71e257)?_0x5274bf(0x12c):isDev(_0x71e257)?'development':'production',_0x53739f=resolveCachedAppCode(typeof _0x257bc7[_0x5274bf(0x163)]===_0x5274bf(0x153)?_0x257bc7['defaultApp']:undefined,_0x1907ca,typeof _0x257bc7[_0x5274bf(0x157)]===_0x5274bf(0x153)?_0x257bc7['accessKey']:undefined);if(_0x53739f)return _0x53739f;const _0x1bd731=Object[_0x5274bf(0x151)](getLocalAppAliases(_0x257bc7))[_0x5274bf(0x124)](_0x16ad04=>_0x16ad04?.[_0x5274bf(0x14e)]);return typeof _0x1bd731?.['appcode']==='string'&&_0x1bd731['appcode'][_0x5274bf(0x162)]()?_0x1bd731['appcode'][_0x5274bf(0x162)]():undefined;}export function readScopedConfig(_0x39e555){const _0x133895=a68_0x4a00b3,_0x37a4f9=_0x39e555[_0x133895(0x150)]?'global':'project';return readConfigFile(resolveWriteConfigPath(_0x37a4f9));}export function writeScopedConfig(_0x1566b7,_0x28f309){const _0xbf15b4=a68_0x4a00b3,_0x58766a=_0x28f309['global']?_0xbf15b4(0x150):_0xbf15b4(0x11b);writeConfigFile(resolveWriteConfigPath(_0x58766a),_0x1566b7);}export async function initGlobalEnvironment(_0x4c32d8){const _0x1058f6=a68_0x4a00b3,{initEnv:_0x3f919c}=await import(_0x1058f6(0x139));_0x3f919c(_0x4c32d8['env']);const {initDomains:_0x176a83}=await import(_0x1058f6(0x140));_0x176a83({'apiDomain':_0x4c32d8[_0x1058f6(0x149)][_0x1058f6(0x146)]||_0x4c32d8[_0x1058f6(0x149)][_0x1058f6(0x14f)]||undefined,'userDomain':_0x4c32d8[_0x1058f6(0x149)][_0x1058f6(0x128)]||undefined,'runtimeDomain':_0x4c32d8[_0x1058f6(0x149)][_0x1058f6(0x122)]||undefined,'skillHubDomain':_0x4c32d8[_0x1058f6(0x149)][_0x1058f6(0x135)]||undefined});}export function getProjectConfigPath(){return resolveConfigPath(process['cwd']());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x1944e7){const _0x3d6bff=a68_0x4a00b3;if(!existsSync(_0x1944e7))return{'status':'missing'};try{const _0x3c9912=readFileSync(_0x1944e7,{'encoding':_0x3d6bff(0x13a)});if(!_0x3c9912?.[_0x3d6bff(0x162)]())return{'status':_0x3d6bff(0x11c)};const _0x15146d=JSON[_0x3d6bff(0x148)](_0x3c9912);return{'status':'ok','data':_0x15146d};}catch(_0x5e198d){return{'status':'error','message':_0x5e198d instanceof Error?_0x5e198d[_0x3d6bff(0x158)]:String(_0x5e198d)};}}export function loadRawConfigLayers(_0x3297b2){const _0x1bf169=a68_0x4a00b3;let _0x38c4ef={},_0x341149={},_0xa69671,_0x3715d1;try{_0xa69671=resolveConfigPath(homedir());if(_0xa69671){const _0xdf27cd=readFileSync(_0xa69671,{'encoding':_0x1bf169(0x13a)});if(_0xdf27cd)_0x38c4ef=JSON['parse'](_0xdf27cd);}}catch{}try{const _0x8e5978=_0x3297b2||process[_0x1bf169(0x142)]();_0x3715d1=resolveConfigPath(_0x8e5978);if(_0x3715d1){const _0x47fafa=readFileSync(_0x3715d1,{'encoding':'utf8'});if(_0x47fafa)_0x341149=JSON[_0x1bf169(0x148)](_0x47fafa);}}catch{}return{'globalPath':_0xa69671,'projectPath':_0x3715d1,'globalConfig':_0x38c4ef,'projectConfig':_0x341149};}function mergeRawConfigLayers(_0x1ad7ac){const _0xa1b8f1=a68_0x4a00b3,{globalConfig:_0xd9d3ee,projectConfig:_0x3e7dc7}=_0x1ad7ac;if(_0x3e7dc7[_0xa1b8f1(0x138)]===![]){const _0x21899e={..._0x3e7dc7};return delete _0x21899e['inherit'],_0x21899e;}const _0x5af52e={..._0xd9d3ee,..._0x3e7dc7};if(_0xa1b8f1(0x163)in _0x3e7dc7)_0x5af52e[_0xa1b8f1(0x163)]=_0x3e7dc7[_0xa1b8f1(0x163)];else _0xd9d3ee[_0xa1b8f1(0x163)]&&(_0x5af52e[_0xa1b8f1(0x163)]=_0xd9d3ee[_0xa1b8f1(0x163)]);return _0x5af52e;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x46de16){return mergeRawConfigLayers(loadRawConfigLayers(_0x46de16));}export function readRawConfigWithLayers(_0x45dd54){const _0x3f8a9a=loadRawConfigLayers(_0x45dd54);return{'config':mergeRawConfigLayers(_0x3f8a9a),'layers':_0x3f8a9a};}export function resolveDefaultAppSource(_0x45757f){const _0x2491f5=a68_0x4a00b3;if(_0x2491f5(0x163)in _0x45757f[_0x2491f5(0x14a)])return'project';if(_0x45757f['projectConfig'][_0x2491f5(0x138)]===![])return null;if(_0x45757f[_0x2491f5(0x15b)][_0x2491f5(0x163)])return _0x2491f5(0x150);return null;}function buildConfig(_0x39ca1d,_0x5e1b27){const _0x26413d=a68_0x4a00b3,_0x3312d2=_0x39ca1d[_0x26413d(0x163)]||undefined,_0x2e6589=_0x5e1b27[_0x26413d(0x160)]||env(_0x26413d(0x136))||undefined,_0x51c3b0=_0x2e6589||_0x3312d2||undefined,_0x43ba64=env(_0x26413d(0x14d))||_0x39ca1d[_0x26413d(0x157)]||undefined,_0x274705=_0x5e1b27['env']||env(_0x26413d(0x13e))||_0x39ca1d['env']||DEFAULT_CONFIG_VALUES[_0x26413d(0x118)],_0x4cf034=normalizeEnv(String(_0x274705)),_0x4cf965=isDaily(_0x4cf034)?_0x26413d(0x12c):isDev(_0x4cf034)?_0x26413d(0x131):_0x26413d(0x11d),_0x1356b5=typeof _0x5e1b27[_0x26413d(0x14e)]==='string'?_0x5e1b27[_0x26413d(0x14e)]:undefined,_0x3427ff=env(_0x26413d(0x12b)),_0x477f10=_0x2e6589?undefined:_0x39ca1d[_0x26413d(0x14e)]||_0x39ca1d['app']||undefined,_0x6a7eca=_0x2e6589||(_0x477f10?undefined:_0x3312d2),_0x5143b1=resolveLocalAppAliasCode(_0x39ca1d,_0x6a7eca),_0x57c59f=resolveCachedAppCode(_0x6a7eca,_0x4cf965,_0x43ba64),_0x4d64d3=_0x1356b5||_0x3427ff||_0x477f10||_0x5143b1||_0x57c59f||undefined,_0x1ed5cd=_0x1356b5?_0x26413d(0x132):_0x3427ff?'env':_0x477f10?_0x26413d(0x137):_0x5143b1?_0x26413d(0x144):_0x57c59f?_0x26413d(0x11f):undefined,_0x3e09a6=_0x39ca1d[_0x26413d(0x119)]||DEFAULT_CONFIG_VALUES[_0x26413d(0x119)],_0x10c8c8=undefined,_0x2b9fab=_0x5e1b27[_0x26413d(0x15a)]||env(_0x26413d(0x126))||_0x39ca1d[_0x26413d(0x15a)],_0x5c7cdf=normalizeLegacyOutputFormat(_0x2b9fab),_0x1c3126=env(_0x26413d(0x120))||_0x39ca1d['pageSize'],_0x4e35e6=_0x1c3126?Number(_0x1c3126)||undefined:undefined,_0x153935=_0x39ca1d[_0x26413d(0x143)]||_0x39ca1d[_0x26413d(0x15d)],_0x498b6c=_0x153935==='read'||_0x153935==='write'||_0x153935===_0x26413d(0x121)?_0x153935:DEFAULT_CONFIG_VALUES[_0x26413d(0x143)],_0x5644c8=env(_0x26413d(0x12a)),_0x4c1ced=_0x5644c8==='1'||_0x5644c8===_0x26413d(0x15c);return{'appCode':typeof _0x4d64d3===_0x26413d(0x153)&&_0x4d64d3[_0x26413d(0x162)]()?_0x4d64d3['trim']():undefined,'appCodeSource':_0x1ed5cd,'env':_0x4cf965,'locale':_0x3e09a6,'cookie':_0x10c8c8,'accessKey':_0x43ba64,'format':_0x5c7cdf,'pageSize':_0x4e35e6,'riskLevel':_0x498b6c,'verbose':_0x4c1ced,'defaultApp':_0x3312d2,'currentApp':typeof _0x51c3b0===_0x26413d(0x153)?_0x51c3b0:undefined,'raw':_0x39ca1d};}function a68_0x3225(){const _0x3decac=['apiDomain','653180EOzsQs','parse','raw','projectConfig','90ncFdlv','4100475sPdNEY','ACCESS_KEY','appcode','host','global','values','EPERM','string','slice','1788819BcICnE','EACCES','accessKey','message','6062226ZdLxmX','format','globalConfig','true','maxRisk','1125807vYGHIF','join','app','2121960waAUOv','trim','defaultApp','stdout','stdin','online','env','locale','isTTY','project','empty','production','some','cache','PAGE_SIZE','high-risk-write','runtimeDomain','2pOKCLX','find','setLogPath','FORMAT','authRequired','userDomain','setRawMode','VERBOSE','APPCODE','daily','apps','argv','configFileNames','nonInteractive','development','explicit','7JedhhA','newConfigFileName','skillHubDomain','APP','top-level','inherit','./constant/env.js','utf8','EXDEV','code','object','ENV','stringify','./constant/domain.js','.tmp','cwd','riskLevel','local-alias','7850456aHOnBX'];a68_0x3225=function(){return _0x3decac;};return a68_0x3225();}function env(_0x312658){return productEnv(_0x312658);}async function buildAuth(_0x2edc2c){const _0x20b917=a68_0x4a00b3,_0xb98e53='',_0x3a553e=!!_0x2edc2c[_0x20b917(0x157)];return{'cookie':_0xb98e53,'isLoggedIn':_0x3a553e,async 'getOrLogin'(){const _0x38be0e=_0x20b917;if(_0x3a553e)return _0xb98e53;throw CliErrors[_0x38be0e(0x127)]();}};}
|
|
1
|
+
const a73_0x3543cd=a73_0x3982;(function(_0x290555,_0x4bd804){const _0x1c12c5=a73_0x3982,_0x50ebf0=_0x290555();while(!![]){try{const _0x9dccb8=parseInt(_0x1c12c5(0x17f))/0x1*(-parseInt(_0x1c12c5(0x167))/0x2)+-parseInt(_0x1c12c5(0x153))/0x3*(-parseInt(_0x1c12c5(0x155))/0x4)+parseInt(_0x1c12c5(0x183))/0x5+parseInt(_0x1c12c5(0x171))/0x6+parseInt(_0x1c12c5(0x16a))/0x7+parseInt(_0x1c12c5(0x17c))/0x8+-parseInt(_0x1c12c5(0x15e))/0x9*(parseInt(_0x1c12c5(0x158))/0xa);if(_0x9dccb8===_0x4bd804)break;else _0x50ebf0['push'](_0x50ebf0['shift']());}catch(_0x373aa1){_0x50ebf0['push'](_0x50ebf0['shift']());}}}(a73_0x1415,0x65aea));import{readFileSync,existsSync,mkdirSync,renameSync,unlinkSync,writeFileSync}from'node:fs';function a73_0x1415(){const _0x2726d7=['some','1397965rBmZaw','configFileNames','raw','.tmp','daily','nonInteractive','true','./constant/domain.js','format','join','PAGE_SIZE','top-level','FORMAT','runtimeDomain','stdout','read','defaultApp','inherit','stringify','argv','object','online','cache','find','userDomain','3513IWNgPB','setLogPath','1064FOBFwZ','empty','riskLevel','6426020jmRgYk','apps','APP','EPERM','stdin','trim','27lnLRNL','global','globalConfig','local-alias','string','appcode','newConfigFileName','authRequired','apiDomain','4314pmQcBy','parse','values','3946775KYfglu','project','utf8','env','isTTY','APPCODE','ACCESS_KEY','4678068RoQCaI','setRawMode','isRaw','cwd','pageSize','message','slice','locale','development','skillHubDomain','projectConfig','6193976toakLC','accessKey','production','169TisdbR','code','app'];a73_0x1415=function(){return _0x2726d7;};return a73_0x1415();}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';function a73_0x3982(_0x29468e,_0x229a37){_0x29468e=_0x29468e-0x13c;const _0x141506=a73_0x1415();let _0x3982fb=_0x141506[_0x29468e];return _0x3982fb;}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_0x3543cd(0x184)];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a73_0x3543cd(0x164)];function resolveConfigPath(_0x4f1876){for(const _0x1c6521 of CONFIG_NAMES){const _0x3e2086=resolve(_0x4f1876,_0x1c6521);if(existsSync(_0x3e2086))return _0x3e2086;}return undefined;}export function resolveWriteConfigPath(_0x1e7041){const _0x32b42c=a73_0x3543cd,_0x417c2c=_0x1e7041===_0x32b42c(0x16b)?process[_0x32b42c(0x174)]():homedir(),_0x137824=resolveConfigPath(_0x417c2c);return _0x137824??resolve(_0x417c2c,NEW_CONFIG_NAME);}export function readConfigFile(_0x2ba26a){const _0x49fad2=a73_0x3543cd;try{if(existsSync(_0x2ba26a)){const _0x4d4319=readFileSync(_0x2ba26a,{'encoding':_0x49fad2(0x16c)});if(_0x4d4319){const _0x4a2709=JSON[_0x49fad2(0x168)](_0x4d4319);return migrateOnlineEnv(_0x2ba26a,_0x4a2709),_0x4a2709;}}}catch{}return{};}function migrateOnlineEnv(_0x53249e,_0x1827b6){const _0x326b93=a73_0x3543cd;let _0x953122=![];_0x1827b6[_0x326b93(0x16d)]===_0x326b93(0x14f)&&(_0x1827b6[_0x326b93(0x16d)]=_0x326b93(0x17e),_0x953122=!![]);if(_0x1827b6['apps']&&typeof _0x1827b6[_0x326b93(0x159)]===_0x326b93(0x14e))for(const _0x9b6838 of Object[_0x326b93(0x169)](_0x1827b6[_0x326b93(0x159)])){_0x9b6838&&_0x9b6838[_0x326b93(0x16d)]===_0x326b93(0x14f)&&(_0x9b6838['env']='production',_0x953122=!![]);}if(_0x953122)try{writeConfigFile(_0x53249e,_0x1827b6);}catch{}}export function writeConfigFile(_0x1bc378,_0x58e01d){const _0x508086=a73_0x3543cd,_0x2c6700=dirname(_0x1bc378);!existsSync(_0x2c6700)&&mkdirSync(_0x2c6700,{'recursive':!![]});const _0x397af2=_0x1bc378+_0x508086(0x13d);try{writeFileSync(_0x397af2,JSON[_0x508086(0x14c)](_0x58e01d,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180});try{renameSync(_0x397af2,_0x1bc378);}catch(_0xe98bff){if(_0xe98bff[_0x508086(0x180)]===_0x508086(0x15b)||_0xe98bff['code']==='EXDEV'||_0xe98bff[_0x508086(0x180)]==='EACCES'){writeFileSync(_0x1bc378,JSON['stringify'](_0x58e01d,null,0x2)+'\x0a',{'encoding':_0x508086(0x16c)});try{unlinkSync(_0x397af2);}catch{}}else throw _0xe98bff;}}catch(_0x1a8bca){try{unlinkSync(_0x397af2);}catch{}throw _0x1a8bca;}}export function isNonInteractiveMode(_0x46d4d3){const _0x5b52d7=a73_0x3543cd;return!!(_0x46d4d3[_0x5b52d7(0x13f)]||_0x46d4d3['ci']||productEnvNames('CI')[_0x5b52d7(0x182)](_0x1b8289=>process.env[_0x1b8289]===_0x5b52d7(0x140))||process.env.CI===_0x5b52d7(0x140)||!process[_0x5b52d7(0x148)]['isTTY']||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x52e220=a73_0x3543cd;if(!process[_0x52e220(0x15c)][_0x52e220(0x16e)])return![];try{const _0xc26fd5=process[_0x52e220(0x15c)][_0x52e220(0x173)];return process[_0x52e220(0x15c)][_0x52e220(0x172)](!![]),process[_0x52e220(0x15c)][_0x52e220(0x172)](_0xc26fd5??![]),!![];}catch{return![];}}export async function createContext(_0x4492a4){const _0x28648f=a73_0x3543cd,_0x36cf54=readRawConfig(),_0xb3e807=buildConfig(_0x36cf54,_0x4492a4);await initGlobalEnvironment(_0xb3e807);const {getUserDomain:_0x20bc7b,getApiDomain:_0x4e7a32}=await import(_0x28648f(0x141)),_0x4c86e0={'apiDomain':_0x4e7a32(),'userDomain':_0x20bc7b()},_0x284efb=await buildAuth(_0xb3e807);logger[_0x28648f(0x154)](process[_0x28648f(0x174)]());const _0x5919d0=(CLI_BIN_NAME+'\x20'+process[_0x28648f(0x14d)][_0x28648f(0x177)](0x2)[_0x28648f(0x143)]('\x20'))[_0x28648f(0x15d)]();logger['setRawCommand'](_0x5919d0);const _0x437e12=isNonInteractiveMode(_0x4492a4);return{'config':_0xb3e807,'auth':_0x284efb,'logger':logger,'env':_0x4c86e0,'nonInteractive':_0x437e12};}export function buildConfigFromFlags(_0x1af480){return buildConfig(readRawConfig(),_0x1af480);}export function getLocalAppAliases(_0x11d4b0){const _0x1d0535=a73_0x3543cd;return _0x11d4b0[_0x1d0535(0x159)]&&typeof _0x11d4b0[_0x1d0535(0x159)]===_0x1d0535(0x14e)?_0x11d4b0[_0x1d0535(0x159)]:{};}export function resolveLocalAppAliasCode(_0x9928a1,_0x4943bc){const _0x420392=a73_0x3543cd;if(!_0x4943bc)return undefined;const _0x195980=getLocalAppAliases(_0x9928a1)[_0x4943bc],_0x28a930=_0x195980?.[_0x420392(0x163)];return typeof _0x28a930===_0x420392(0x162)&&_0x28a930[_0x420392(0x15d)]()?_0x28a930[_0x420392(0x15d)]():undefined;}export function readAppCodeFromConfig(){const _0x420624=a73_0x3543cd,_0xb74475=readRawConfig(),_0x485e9a=_0xb74475[_0x420624(0x163)]??_0xb74475[_0x420624(0x181)];if(typeof _0x485e9a===_0x420624(0x162)&&_0x485e9a[_0x420624(0x15d)]())return _0x485e9a[_0x420624(0x15d)]();const _0xed741b=resolveLocalAppAliasCode(_0xb74475,typeof _0xb74475[_0x420624(0x14a)]==='string'?_0xb74475[_0x420624(0x14a)]:undefined);if(_0xed741b)return _0xed741b;const _0x474d64=normalizeEnv(String(_0xb74475[_0x420624(0x16d)]||_0x420624(0x17e))),_0x4c93b3=isDaily(_0x474d64)?_0x420624(0x13e):isDev(_0x474d64)?_0x420624(0x179):_0x420624(0x17e),_0x282565=resolveCachedAppCode(typeof _0xb74475[_0x420624(0x14a)]===_0x420624(0x162)?_0xb74475['defaultApp']:undefined,_0x4c93b3,typeof _0xb74475['accessKey']===_0x420624(0x162)?_0xb74475[_0x420624(0x17d)]:undefined);if(_0x282565)return _0x282565;const _0x814ce1=Object[_0x420624(0x169)](getLocalAppAliases(_0xb74475))[_0x420624(0x151)](_0x30f271=>_0x30f271?.[_0x420624(0x163)]);return typeof _0x814ce1?.[_0x420624(0x163)]==='string'&&_0x814ce1[_0x420624(0x163)]['trim']()?_0x814ce1['appcode']['trim']():undefined;}export function readScopedConfig(_0x2e6847){const _0x19a634=a73_0x3543cd,_0x3e5d1d=_0x2e6847[_0x19a634(0x15f)]?_0x19a634(0x15f):_0x19a634(0x16b);return readConfigFile(resolveWriteConfigPath(_0x3e5d1d));}export function writeScopedConfig(_0x3fdcfc,_0xdd6059){const _0x46f698=a73_0x3543cd,_0x39b75d=_0xdd6059[_0x46f698(0x15f)]?_0x46f698(0x15f):_0x46f698(0x16b);writeConfigFile(resolveWriteConfigPath(_0x39b75d),_0x3fdcfc);}export async function initGlobalEnvironment(_0x3e4732){const _0x5020d7=a73_0x3543cd,{initEnv:_0x24d94c}=await import('./constant/env.js');_0x24d94c(_0x3e4732['env']);const {initDomains:_0x42b121}=await import(_0x5020d7(0x141));_0x42b121({'apiDomain':_0x3e4732[_0x5020d7(0x13c)][_0x5020d7(0x166)]||_0x3e4732[_0x5020d7(0x13c)]['host']||undefined,'userDomain':_0x3e4732[_0x5020d7(0x13c)][_0x5020d7(0x152)]||undefined,'runtimeDomain':_0x3e4732[_0x5020d7(0x13c)][_0x5020d7(0x147)]||undefined,'skillHubDomain':_0x3e4732[_0x5020d7(0x13c)][_0x5020d7(0x17a)]||undefined});}export function getProjectConfigPath(){const _0x7641e8=a73_0x3543cd;return resolveConfigPath(process[_0x7641e8(0x174)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x1b1ba5){const _0x4e70e8=a73_0x3543cd;if(!existsSync(_0x1b1ba5))return{'status':'missing'};try{const _0x2c02a0=readFileSync(_0x1b1ba5,{'encoding':_0x4e70e8(0x16c)});if(!_0x2c02a0?.[_0x4e70e8(0x15d)]())return{'status':_0x4e70e8(0x156)};const _0x3da03b=JSON[_0x4e70e8(0x168)](_0x2c02a0);return{'status':'ok','data':_0x3da03b};}catch(_0x155f4b){return{'status':'error','message':_0x155f4b instanceof Error?_0x155f4b[_0x4e70e8(0x176)]:String(_0x155f4b)};}}export function loadRawConfigLayers(_0x466571){const _0x4b8b4a=a73_0x3543cd;let _0x57b330={},_0x10e926={},_0xbac666,_0x54d4d5;try{_0xbac666=resolveConfigPath(homedir());if(_0xbac666){const _0x5af06f=readFileSync(_0xbac666,{'encoding':_0x4b8b4a(0x16c)});if(_0x5af06f)_0x57b330=JSON[_0x4b8b4a(0x168)](_0x5af06f);}}catch{}try{const _0x434b5c=_0x466571||process[_0x4b8b4a(0x174)]();_0x54d4d5=resolveConfigPath(_0x434b5c);if(_0x54d4d5){const _0x4367b3=readFileSync(_0x54d4d5,{'encoding':_0x4b8b4a(0x16c)});if(_0x4367b3)_0x10e926=JSON['parse'](_0x4367b3);}}catch{}return{'globalPath':_0xbac666,'projectPath':_0x54d4d5,'globalConfig':_0x57b330,'projectConfig':_0x10e926};}function mergeRawConfigLayers(_0x571bf3){const _0x39f011=a73_0x3543cd,{globalConfig:_0x47591c,projectConfig:_0x464424}=_0x571bf3;if(_0x464424[_0x39f011(0x14b)]===![]){const _0xce73a4={..._0x464424};return delete _0xce73a4[_0x39f011(0x14b)],_0xce73a4;}const _0x5b4cd6={..._0x47591c,..._0x464424};if(_0x39f011(0x14a)in _0x464424)_0x5b4cd6[_0x39f011(0x14a)]=_0x464424[_0x39f011(0x14a)];else _0x47591c[_0x39f011(0x14a)]&&(_0x5b4cd6['defaultApp']=_0x47591c[_0x39f011(0x14a)]);return _0x5b4cd6;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x5712a7){return mergeRawConfigLayers(loadRawConfigLayers(_0x5712a7));}export function readRawConfigWithLayers(_0x197809){const _0x130731=loadRawConfigLayers(_0x197809);return{'config':mergeRawConfigLayers(_0x130731),'layers':_0x130731};}export function resolveDefaultAppSource(_0x43d391){const _0x35df74=a73_0x3543cd;if(_0x35df74(0x14a)in _0x43d391[_0x35df74(0x17b)])return _0x35df74(0x16b);if(_0x43d391['projectConfig'][_0x35df74(0x14b)]===![])return null;if(_0x43d391[_0x35df74(0x160)][_0x35df74(0x14a)])return'global';return null;}function buildConfig(_0x177111,_0x5b2f9f){const _0x3d4b32=a73_0x3543cd,_0x246a17=_0x177111[_0x3d4b32(0x14a)]||undefined,_0x5b5485=_0x5b2f9f['app']||env(_0x3d4b32(0x15a))||undefined,_0x1bc32a=_0x5b5485||_0x246a17||undefined,_0x377567=env(_0x3d4b32(0x170))||_0x177111[_0x3d4b32(0x17d)]||undefined,_0x50cf13=_0x5b2f9f['env']||env('ENV')||_0x177111[_0x3d4b32(0x16d)]||DEFAULT_CONFIG_VALUES[_0x3d4b32(0x16d)],_0x44bb85=normalizeEnv(String(_0x50cf13)),_0xcbd2b0=isDaily(_0x44bb85)?_0x3d4b32(0x13e):isDev(_0x44bb85)?_0x3d4b32(0x179):_0x3d4b32(0x17e),_0x2b81f9=typeof _0x5b2f9f[_0x3d4b32(0x163)]===_0x3d4b32(0x162)?_0x5b2f9f[_0x3d4b32(0x163)]:undefined,_0x4fc96d=env(_0x3d4b32(0x16f)),_0xd7a40e=_0x5b5485?undefined:_0x177111[_0x3d4b32(0x163)]||_0x177111['app']||undefined,_0x44502b=_0x5b5485||(_0xd7a40e?undefined:_0x246a17),_0x24876c=resolveLocalAppAliasCode(_0x177111,_0x44502b),_0x229bc4=resolveCachedAppCode(_0x44502b,_0xcbd2b0,_0x377567),_0x2f67df=_0x2b81f9||_0x4fc96d||_0xd7a40e||_0x24876c||_0x229bc4||undefined,_0x616cbd=_0x2b81f9?'explicit':_0x4fc96d?_0x3d4b32(0x16d):_0xd7a40e?_0x3d4b32(0x145):_0x24876c?_0x3d4b32(0x161):_0x229bc4?_0x3d4b32(0x150):undefined,_0x5e102e=_0x177111[_0x3d4b32(0x178)]||DEFAULT_CONFIG_VALUES[_0x3d4b32(0x178)],_0x306059=undefined,_0x1bcbdc=_0x5b2f9f[_0x3d4b32(0x142)]||env(_0x3d4b32(0x146))||_0x177111[_0x3d4b32(0x142)],_0x54e8d2=normalizeLegacyOutputFormat(_0x1bcbdc),_0x3ee851=env(_0x3d4b32(0x144))||_0x177111[_0x3d4b32(0x175)],_0x57f11d=_0x3ee851?Number(_0x3ee851)||undefined:undefined,_0x3c7a5e=_0x177111[_0x3d4b32(0x157)]||_0x177111['maxRisk'],_0x272e7f=_0x3c7a5e===_0x3d4b32(0x149)||_0x3c7a5e==='write'||_0x3c7a5e==='high-risk-write'?_0x3c7a5e:DEFAULT_CONFIG_VALUES['riskLevel'],_0x19117a=env('VERBOSE'),_0x59ff4c=_0x19117a==='1'||_0x19117a===_0x3d4b32(0x140);return{'appCode':typeof _0x2f67df==='string'&&_0x2f67df[_0x3d4b32(0x15d)]()?_0x2f67df['trim']():undefined,'appCodeSource':_0x616cbd,'env':_0xcbd2b0,'locale':_0x5e102e,'cookie':_0x306059,'accessKey':_0x377567,'format':_0x54e8d2,'pageSize':_0x57f11d,'riskLevel':_0x272e7f,'verbose':_0x59ff4c,'defaultApp':_0x246a17,'currentApp':typeof _0x1bc32a===_0x3d4b32(0x162)?_0x1bc32a:undefined,'raw':_0x177111};}function env(_0x4fbe87){return productEnv(_0x4fbe87);}async function buildAuth(_0x252a14){const _0x5b0406=a73_0x3543cd,_0x2d7ee2='',_0x35322f=!!_0x252a14[_0x5b0406(0x17d)];return{'cookie':_0x2d7ee2,'isLoggedIn':_0x35322f,async 'getOrLogin'(){const _0x14ce9f=_0x5b0406;if(_0x35322f)return _0x2d7ee2;throw CliErrors[_0x14ce9f(0x165)]();}};}
|