@lovrabet/lovrabet-cli 2.1.2 → 2.1.3-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/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/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/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/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 -0
- package/lib/commands/skill/commands/install.js +1 -0
- package/lib/commands/skill/commands/list.js +1 -0
- package/lib/commands/skill/commands/push.js +1 -0
- package/lib/commands/skill/commands/validate.js +1 -0
- package/lib/commands/skill/flags.js +1 -0
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -0
- package/lib/commands/skill/scopes.js +1 -0
- package/lib/commands/skill/summary.js +1 -0
- 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/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 -0
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -0
- package/lib/skills/runtime-skill-sync/hashing.js +1 -0
- package/lib/skills/runtime-skill-sync/links.js +1 -0
- package/lib/skills/runtime-skill-sync/list-local.js +1 -0
- package/lib/skills/runtime-skill-sync/local-files.js +1 -0
- package/lib/skills/runtime-skill-sync/materialize.js +1 -0
- package/lib/skills/runtime-skill-sync/metadata.js +1 -0
- package/lib/skills/runtime-skill-sync/paths.js +1 -0
- package/lib/skills/runtime-skill-sync/push.js +1 -0
- package/lib/skills/runtime-skill-sync/scopes.js +1 -0
- package/lib/skills/runtime-skill-sync/types.js +1 -0
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -0
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -0
- 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 +4 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const a35_0x59df79=a35_0x587b;(function(_0x37bbd8,_0xc5e956){const _0xcb759c=a35_0x587b,_0x3f595d=_0x37bbd8();while(!![]){try{const _0x5b7e7d=parseInt(_0xcb759c(0x209))/0x1+-parseInt(_0xcb759c(0x21d))/0x2*(parseInt(_0xcb759c(0x1d6))/0x3)+-parseInt(_0xcb759c(0x20b))/0x4+-parseInt(_0xcb759c(0x1ef))/0x5+parseInt(_0xcb759c(0x1e3))/0x6*(-parseInt(_0xcb759c(0x1d2))/0x7)+-parseInt(_0xcb759c(0x20e))/0x8+parseInt(_0xcb759c(0x1cb))/0x9*(parseInt(_0xcb759c(0x227))/0xa);if(_0x5b7e7d===_0xc5e956)break;else _0x3f595d['push'](_0x3f595d['shift']());}catch(_0x3b27a3){_0x3f595d['push'](_0x3f595d['shift']());}}}(a35_0x2b3b,0xdd3f3));import{CliErrors}from'../../errors.js';function a35_0x587b(_0x326c75,_0x5d5778){_0x326c75=_0x326c75-0x1c9;const _0x2b3b47=a35_0x2b3b();let _0x587b02=_0x2b3b47[_0x326c75];return _0x587b02;}import{existsSync,lstatSync,mkdirSync,writeFileSync}from'node:fs';import{dirname,resolve}from'node:path';import{DEFAULT_SKILL_TARGET,renderSkillTemplate,SKILL_NAME_PATTERN,SKILL_TYPES}from'../../commands/skill/templates.js';import{throwIfSkillValidationFailed,validateSkillDirectory}from'../../commands/skill/validate.js';const CODE_FLAG={'name':a35_0x59df79(0x1e4),'type':a35_0x59df79(0x1ce),'description':a35_0x59df79(0x21e)},SCOPE_FLAG={'name':'scope','type':'string','description':a35_0x59df79(0x20a),'enum':[a35_0x59df79(0x228),a35_0x59df79(0x232),a35_0x59df79(0x1d7)]},LIST_SCOPE_FLAG={'name':a35_0x59df79(0x1d8),'type':'string','description':a35_0x59df79(0x233),'enum':[a35_0x59df79(0x228),a35_0x59df79(0x232),a35_0x59df79(0x1d7)]},LOCAL_FLAG={'name':a35_0x59df79(0x1f4),'type':'boolean','description':'Read\x20CLI-managed\x20local\x20Skill\x20cache\x20and\x20links\x20instead\x20of\x20remote\x20lists'},DIR_FLAG={'name':a35_0x59df79(0x208),'type':a35_0x59df79(0x1ce),'required':!![],'description':a35_0x59df79(0x221)},CREATE_NAME_FLAG={'name':a35_0x59df79(0x216),'type':a35_0x59df79(0x1ce),'required':!![],'description':'Skill\x20name\x20using\x20lowercase\x20letters,\x20numbers,\x20and\x20hyphens','pattern':{'regex':SKILL_NAME_PATTERN,'description':a35_0x59df79(0x1d0)}},TYPE_FLAG={'name':a35_0x59df79(0x21a),'type':'string','description':a35_0x59df79(0x220),'default':a35_0x59df79(0x1d3),'enum':[...SKILL_TYPES]},TARGET_FLAG={'name':'target','type':a35_0x59df79(0x1ce),'description':'Directory\x20that\x20will\x20contain\x20the\x20generated\x20Skill\x20directory','default':DEFAULT_SKILL_TARGET},FORCE_FLAG={'name':a35_0x59df79(0x1ca),'type':a35_0x59df79(0x22b),'description':a35_0x59df79(0x1e0)},STRICT_FLAG={'name':a35_0x59df79(0x1f7),'type':a35_0x59df79(0x22b),'description':a35_0x59df79(0x212)};function summarizeRuntimeSkill(_0x17e0c9){const _0x111ff3=a35_0x59df79;return{'id':_0x17e0c9['id'],'skillCode':_0x17e0c9[_0x111ff3(0x1f8)],'skillName':_0x17e0c9[_0x111ff3(0x201)],'scope':_0x17e0c9[_0x111ff3(0x1d8)],'version':_0x17e0c9[_0x111ff3(0x200)],'readonly':_0x17e0c9[_0x111ff3(0x203)]};}function summarizeLocalRuntimeSkill(_0x3d666e){const _0x1cc8d5=a35_0x59df79;return{'id':_0x3d666e['id'],'skillCode':_0x3d666e[_0x1cc8d5(0x1f8)],'skillName':_0x3d666e[_0x1cc8d5(0x201)],'scope':_0x3d666e[_0x1cc8d5(0x1d8)],'appCode':_0x3d666e[_0x1cc8d5(0x204)],'version':_0x3d666e[_0x1cc8d5(0x200)],'status':_0x3d666e[_0x1cc8d5(0x1d1)],'readonly':_0x3d666e[_0x1cc8d5(0x203)],'tags':_0x3d666e['tags'],'dir':_0x3d666e[_0x1cc8d5(0x208)],'cacheDir':_0x3d666e[_0x1cc8d5(0x22e)],'skillMdPath':_0x3d666e[_0x1cc8d5(0x1de)],'metadataPath':_0x3d666e[_0x1cc8d5(0x219)],'linkedPaths':_0x3d666e[_0x1cc8d5(0x21b)],'contentHash':_0x3d666e['contentHash'],'treeHash':_0x3d666e[_0x1cc8d5(0x1e2)],'pulledAt':_0x3d666e[_0x1cc8d5(0x20d)]};}export const skillDefinitions=[{'service':a35_0x59df79(0x22d),'command':a35_0x59df79(0x1fa),'description':a35_0x59df79(0x234),'risk':a35_0x59df79(0x1d3),'requiresAuth':!![],'requiresAppCode':!![],'hasFormat':![],'flags':[CODE_FLAG,SCOPE_FLAG],async 'execute'(_0x4042e4){return syncRuntimeSkills(_0x4042e4);}},{'service':a35_0x59df79(0x22d),'command':a35_0x59df79(0x207),'description':a35_0x59df79(0x1fd),'risk':a35_0x59df79(0x1d3),'requiresAuth':![],'requiresAppCode':![],'flags':[CREATE_NAME_FLAG,TYPE_FLAG,TARGET_FLAG,FORCE_FLAG],async 'dryRun'(_0x82038e){const _0x16b3b5=a35_0x59df79,_0x1ddda3=buildSkillCreatePlan(_0x82038e[_0x16b3b5(0x215)]('name'),_0x82038e['str'](_0x16b3b5(0x21a)),_0x82038e[_0x16b3b5(0x215)](_0x16b3b5(0x230)));return{'method':_0x16b3b5(0x210),'url':_0x1ddda3[_0x16b3b5(0x229)],'body':{'skillName':_0x1ddda3[_0x16b3b5(0x1c9)][_0x16b3b5(0x201)],'type':_0x1ddda3[_0x16b3b5(0x1c9)][_0x16b3b5(0x21a)],'selfContained':!![],'files':_0x1ddda3[_0x16b3b5(0x1c9)][_0x16b3b5(0x217)][_0x16b3b5(0x1da)](_0x571afa=>_0x571afa[_0x16b3b5(0x20c)])},'description':_0x16b3b5(0x1db)};},async 'execute'(_0x36c1bc){const _0x4997dd=a35_0x59df79,_0x52f308=buildSkillCreatePlan(_0x36c1bc[_0x4997dd(0x215)](_0x4997dd(0x216)),_0x36c1bc[_0x4997dd(0x215)](_0x4997dd(0x21a)),_0x36c1bc[_0x4997dd(0x215)](_0x4997dd(0x230)));return writeSkillDraft(_0x52f308,_0x36c1bc[_0x4997dd(0x1df)](_0x4997dd(0x1ca))),{'ok':!![],'data':{'skillName':_0x52f308[_0x4997dd(0x1c9)][_0x4997dd(0x201)],'type':_0x52f308['rendered'][_0x4997dd(0x21a)],'dir':_0x52f308['skillDir'],'files':_0x52f308['rendered'][_0x4997dd(0x217)][_0x4997dd(0x1da)](_0x4fb952=>_0x4fb952['path'])},'message':_0x4997dd(0x1ec)+_0x52f308[_0x4997dd(0x1c9)][_0x4997dd(0x201)]};}},{'service':a35_0x59df79(0x22d),'command':a35_0x59df79(0x1f9),'description':a35_0x59df79(0x236),'risk':a35_0x59df79(0x1fb),'requiresAuth':![],'requiresAppCode':![],'flags':[DIR_FLAG,STRICT_FLAG],async 'execute'(_0x304384){const _0x4d61be=a35_0x59df79,_0x37a01e=_0x304384[_0x4d61be(0x1df)](_0x4d61be(0x1f7)),_0x137e1c=validateSkillDirectory(_0x304384[_0x4d61be(0x215)](_0x4d61be(0x208)),{'strict':_0x37a01e});return throwIfSkillValidationFailed(_0x137e1c,_0x37a01e),{'ok':!![],'data':{'dir':_0x137e1c[_0x4d61be(0x208)],'type':_0x137e1c[_0x4d61be(0x21a)],'errors':_0x137e1c[_0x4d61be(0x22a)],'warnings':_0x137e1c[_0x4d61be(0x1ee)]},'message':'Skill\x20validation\x20passed.'};}},{'service':a35_0x59df79(0x22d),'command':a35_0x59df79(0x205),'description':a35_0x59df79(0x237),'risk':'read','flags':[CODE_FLAG,LIST_SCOPE_FLAG,LOCAL_FLAG],async 'execute'(_0x20dadc){const _0xee19ec=a35_0x59df79,_0x24c43f=_0x20dadc['str'](_0xee19ec(0x1e4)),_0x2429fa=normalizeListScope(_0x20dadc[_0xee19ec(0x215)]('scope'));if(_0x20dadc['bool'](_0xee19ec(0x1f4))){const _0x3bc4b5=_0x20dadc[_0xee19ec(0x1f3)];if(!_0x3bc4b5)throw CliErrors[_0xee19ec(0x1e1)]();const {listLocalRuntimeSkills:_0x7156fb}=await import(_0xee19ec(0x223)),_0x277793=_0x7156fb({'env':_0x20dadc[_0xee19ec(0x1f2)]??_0xee19ec(0x1fe),'accessKey':_0x3bc4b5,'appCode':_0x20dadc[_0xee19ec(0x204)],'scopes':listScopeToRuntimeScopes(_0x2429fa),'code':_0x24c43f[_0xee19ec(0x1dc)]()||undefined}),_0x3ac23a=groupLocalRuntimeSkills(_0x277793);return{'ok':!![],'data':{'appCode':_0x20dadc[_0xee19ec(0x204)],'source':_0xee19ec(0x1f4),'scope':_0x2429fa,'total':_0x277793[_0xee19ec(0x1eb)],'personal':_0x3ac23a[_0xee19ec(0x232)][_0xee19ec(0x1eb)],'company':_0x3ac23a[_0xee19ec(0x1d7)][_0xee19ec(0x1eb)],'items':_0x277793[_0xee19ec(0x1da)](summarizeLocalRuntimeSkill),'skills':{'personal':_0x3ac23a['personal'][_0xee19ec(0x1da)](summarizeLocalRuntimeSkill),'company':_0x3ac23a[_0xee19ec(0x1d7)][_0xee19ec(0x1da)](summarizeLocalRuntimeSkill)}},'message':_0xee19ec(0x22c)+_0x277793[_0xee19ec(0x1eb)]+_0xee19ec(0x1ed)};}const {listRuntimeSkills:_0x2e7020}=await import('../../core/api-client.js'),_0x534f16=await _0x2e7020({'appCode':_0x20dadc['appCode'],'scope':listScopeToRemoteScope(_0x2429fa),'code':_0x24c43f[_0xee19ec(0x1dc)]()||undefined}),_0x563e85=shouldListScope(_0x2429fa,'personal')?_0x534f16['personal']??[]:[],_0x133e62=shouldListScope(_0x2429fa,_0xee19ec(0x1d7))?_0x534f16[_0xee19ec(0x1d7)]??[]:[],_0x576953=[..._0x563e85,..._0x133e62];return{'ok':!![],'data':{'appCode':_0x20dadc[_0xee19ec(0x204)],'source':_0xee19ec(0x1e7),'scope':_0x2429fa,'total':_0x576953[_0xee19ec(0x1eb)],'personal':_0x563e85[_0xee19ec(0x1eb)],'company':_0x133e62[_0xee19ec(0x1eb)],'items':_0x576953[_0xee19ec(0x1da)](summarizeRuntimeSkill),'skills':{'personal':_0x563e85['map'](summarizeRuntimeSkill),'company':_0x133e62['map'](summarizeRuntimeSkill)}},'message':_0xee19ec(0x22c)+_0x576953['length']+_0xee19ec(0x21c)};}},{'service':a35_0x59df79(0x22d),'command':'push','description':a35_0x59df79(0x235),'risk':a35_0x59df79(0x1d3),'flags':[DIR_FLAG],async 'execute'(_0x3d46db){const _0x3b35fb=a35_0x59df79,{createPersonalRuntimeSkill:_0x3e209a,downloadRuntimeSkillPackage:_0x2631a5,listRuntimeSkills:_0x2bbb96,updatePersonalRuntimeSkill:_0x4a3ff7}=await import(_0x3b35fb(0x22f)),{verifyRuntimeSkillPackage:_0xa3285c,verifyRuntimeSkillBundle:_0x78d67c,readPushDirectory:_0x4057e0,recordPushedRuntimeSkill:_0x159d5f}=await import('../../skills/runtime-skill-sync.js');if(!_0x3d46db[_0x3b35fb(0x1f3)])throw CliErrors[_0x3b35fb(0x1e1)]();const _0x50be8c=_0x3d46db[_0x3b35fb(0x215)](_0x3b35fb(0x208)),_0x393a9c=validateSkillDirectory(_0x50be8c);throwIfSkillValidationFailed(_0x393a9c);const _0x338255=_0x393a9c[_0x3b35fb(0x208)],_0x16dd6c=_0x4057e0(_0x338255,_0x3d46db[_0x3b35fb(0x204)]),_0x4a812d=(await _0x2bbb96({'appCode':_0x3d46db['appCode'],'scope':_0x3b35fb(0x232)}))[_0x3b35fb(0x232)][_0x3b35fb(0x1f6)](_0x420d1c=>_0x420d1c[_0x3b35fb(0x1f8)]===_0x16dd6c[_0x3b35fb(0x1f8)]),_0x2d9df8=_0x4a812d?await _0x4a3ff7(_0x16dd6c[_0x3b35fb(0x1f8)],_0x3d46db[_0x3b35fb(0x204)],_0x16dd6c[_0x3b35fb(0x213)]):await _0x3e209a(_0x3d46db['appCode'],_0x16dd6c['input']);let _0x3554c8=_0x2d9df8;if(isMultiFileManifest(_0x16dd6c['input'][_0x3b35fb(0x217)])){const _0x56b7a0=await _0x2631a5('personal',_0x2d9df8['skillCode']||_0x16dd6c[_0x3b35fb(0x1f8)],_0x3d46db['appCode']);_0x78d67c(_0x16dd6c[_0x3b35fb(0x213)][_0x3b35fb(0x217)],_0x56b7a0),_0x3554c8={..._0x2d9df8,'files':_0x16dd6c[_0x3b35fb(0x213)][_0x3b35fb(0x217)]};}else{if(isPackageBackedManifest(_0x2d9df8[_0x3b35fb(0x217)])){const _0x4a6cd8=await _0x2631a5(_0x3b35fb(0x232),_0x2d9df8[_0x3b35fb(0x1f8)]||_0x16dd6c[_0x3b35fb(0x1f8)],_0x3d46db[_0x3b35fb(0x204)]);_0xa3285c(_0x2d9df8[_0x3b35fb(0x217)],_0x4a6cd8);}}return _0x159d5f(_0x338255,_0x3554c8,_0x3d46db[_0x3b35fb(0x204)]),{'ok':!![],'data':summarizeRuntimeSkill(_0x2d9df8),'message':_0x4a812d?_0x3b35fb(0x211)+_0x16dd6c[_0x3b35fb(0x1f8)]:_0x3b35fb(0x231)+_0x16dd6c[_0x3b35fb(0x1f8)]};}}];async function syncRuntimeSkills(_0x8cec97){const _0x307d2f=a35_0x59df79,{downloadRuntimeSkillPackage:_0x4a3661,listRuntimeSkills:_0x150186}=await import(_0x307d2f(0x22f)),{linkEffectiveRuntimeSkills:_0x41c199,materializeRuntimeSkill:_0x4a97cf,pruneStaleRuntimeSkillCache:_0xb0cbad,pruneStaleRuntimeSkillLinks:_0x56490a}=await import(_0x307d2f(0x223)),_0x15645d=_0x8cec97[_0x307d2f(0x215)](_0x307d2f(0x1e4)),_0x112b15=normalizeSyncScopes(_0x8cec97['str'](_0x307d2f(0x1d8))),_0x31a69d=_0x8cec97[_0x307d2f(0x1f2)]??_0x307d2f(0x1fe),_0x20f57a=_0x8cec97[_0x307d2f(0x1f3)];if(!_0x20f57a)throw CliErrors[_0x307d2f(0x1e1)](_0x307d2f(0x21f));const _0x584b13=await Promise[_0x307d2f(0x228)](_0x112b15[_0x307d2f(0x1da)](_0x1adb81=>_0x150186({'appCode':_0x8cec97[_0x307d2f(0x204)],'scope':_0x1adb81,'code':_0x15645d['trim']()||undefined}))),_0x9f0cb=_0x112b15['includes'](_0x307d2f(0x232))?_0x584b13[_0x307d2f(0x1cc)]((_0x5a8fa5,_0x281a98)=>_0x112b15[_0x281a98]===_0x307d2f(0x232)?_0x5a8fa5['personal']:[]):[],_0x1b145d=_0x112b15[_0x307d2f(0x214)]('company')?_0x584b13[_0x307d2f(0x1cc)]((_0xa01a9,_0x1461c2)=>_0x112b15[_0x1461c2]===_0x307d2f(0x1d7)?_0xa01a9['company']:[]):[],_0x17bfbf=new Set([..._0x9f0cb['map'](_0x53cdb4=>_0x53cdb4[_0x307d2f(0x1f8)]?.['trim']())[_0x307d2f(0x1ea)](_0x29fdcb=>Boolean(_0x29fdcb)),..._0x1b145d[_0x307d2f(0x1da)](_0x5afc54=>_0x5afc54[_0x307d2f(0x1f8)]?.['trim']())[_0x307d2f(0x1ea)](_0x52a880=>Boolean(_0x52a880))]),_0x3f30c7=_0x15645d[_0x307d2f(0x1dc)]()?[_0x15645d[_0x307d2f(0x1dc)]()]:undefined,_0xefef52=_0x112b15[_0x307d2f(0x1eb)]===0x2&&_0x112b15[_0x307d2f(0x214)]('personal')&&_0x112b15[_0x307d2f(0x214)]('company'),_0x39aef0=_0xefef52?_0x56490a(_0x8cec97[_0x307d2f(0x204)],_0x17bfbf,{},_0x3f30c7):[],_0x1e2440=_0xb0cbad({'env':_0x31a69d,'accessKey':_0x20f57a,'appCode':_0x8cec97['appCode'],'activeSkillCodes':_0x17bfbf,'pruneSkillCodes':_0x3f30c7,'scopes':_0x112b15}),_0x587b64=[];for(const _0x271e0b of _0x9f0cb){_0x587b64[_0x307d2f(0x1e5)](_0x4a97cf(_0x271e0b,_0x307d2f(0x232),{'env':_0x31a69d,'accessKey':_0x20f57a,'appCode':_0x8cec97['appCode'],'packageBytes':await downloadPackageIfNeeded(_0x271e0b,_0x307d2f(0x232),_0x8cec97[_0x307d2f(0x204)],_0x4a3661)}));}for(const _0x1b6506 of _0x1b145d){_0x587b64[_0x307d2f(0x1e5)](_0x4a97cf(_0x1b6506,_0x307d2f(0x1d7),{'env':_0x31a69d,'accessKey':_0x20f57a,'appCode':_0x8cec97[_0x307d2f(0x204)],'packageBytes':await downloadPackageIfNeeded(_0x1b6506,_0x307d2f(0x1d7),_0x8cec97[_0x307d2f(0x204)],_0x4a3661)}));}const _0x281526=_0x41c199(_0x587b64,_0x8cec97[_0x307d2f(0x204)]),_0xc025f4=countLinkActions(_0x281526);return{'ok':!![],'data':{'appCode':_0x8cec97[_0x307d2f(0x204)],'personal':_0x9f0cb[_0x307d2f(0x1eb)],'company':_0x1b145d[_0x307d2f(0x1eb)],'materialized':_0x587b64['length'],'links':{'total':_0x281526[_0x307d2f(0x1eb)],'created':_0xc025f4[_0x307d2f(0x1f0)]??0x0,'updated':_0xc025f4[_0x307d2f(0x1fc)]??0x0,'unchanged':_0xc025f4[_0x307d2f(0x1e9)]??0x0,'skipped':0x0,'conflicted':0x0},'pruned':{'links':_0x39aef0[_0x307d2f(0x1ea)](_0x5e0e43=>_0x5e0e43[_0x307d2f(0x1e6)]===_0x307d2f(0x1cd))['length'],'cacheDirs':_0x1e2440[_0x307d2f(0x1ea)](_0x541dcc=>_0x541dcc[_0x307d2f(0x1e6)]==='removed')[_0x307d2f(0x1eb)],'skipped':[..._0x39aef0,..._0x1e2440]['filter'](_0x4676ac=>_0x4676ac[_0x307d2f(0x1e6)]===_0x307d2f(0x218))[_0x307d2f(0x1eb)]},'skills':{'personal':_0x9f0cb[_0x307d2f(0x1da)](summarizeRuntimeSkill),'company':_0x1b145d['map'](summarizeRuntimeSkill)}},'message':_0x307d2f(0x1dd)+_0x9f0cb['length']+'\x20personal\x20and\x20'+_0x1b145d[_0x307d2f(0x1eb)]+_0x307d2f(0x1d4)};}function buildSkillCreatePlan(_0x22cf3d,_0x28a77b,_0x2c8259){const _0xb063ee=a35_0x59df79,_0x499247=renderSkillTemplate({'skillName':_0x22cf3d,'type':_0x28a77b}),_0x39f45a=resolve(normalizeSkillTarget(_0x2c8259));return{'rendered':_0x499247,'targetRoot':_0x39f45a,'skillDir':resolve(_0x39f45a,_0x499247[_0xb063ee(0x201)])};}function normalizeSkillTarget(_0x13cd24){return(_0x13cd24||DEFAULT_SKILL_TARGET)['trim']()||DEFAULT_SKILL_TARGET;}function writeSkillDraft(_0x4e6d18,_0x91a0b3){const _0x322c5f=a35_0x59df79;if(existsSync(_0x4e6d18['skillDir'])){const _0x2073b8=lstatSync(_0x4e6d18['skillDir']);if(!_0x2073b8[_0x322c5f(0x1f1)]()||_0x2073b8[_0x322c5f(0x1cf)]())throw CliErrors[_0x322c5f(0x1e8)](_0x322c5f(0x226)+_0x4e6d18['skillDir']);if(!_0x91a0b3)throw CliErrors['validation']('Skill\x20directory\x20already\x20exists:\x20'+_0x4e6d18[_0x322c5f(0x229)],_0x322c5f(0x20f));}for(const _0x13b580 of _0x4e6d18['rendered'][_0x322c5f(0x217)]){const _0x4d71ca=resolve(_0x4e6d18['skillDir'],_0x13b580[_0x322c5f(0x20c)]),_0x52a77f=dirname(_0x4d71ca);mkdirSync(_0x52a77f,{'recursive':!![]});if(existsSync(_0x4d71ca)&&lstatSync(_0x4d71ca)[_0x322c5f(0x1cf)]())throw CliErrors['validation'](_0x322c5f(0x1d5)+_0x4d71ca);writeFileSync(_0x4d71ca,_0x13b580['content'],'utf8');}}function a35_0x2b3b(){const _0x32639a=['object','create','dir','340674WGIIXz','Skill\x20sync\x20scope:\x20all\x20(personal/company),\x20personal,\x20or\x20company','4652892VUKNQp','path','pulledAt','709704Cmexct','Pass\x20--force\x20to\x20overwrite\x20generated\x20template\x20files.','WRITE','Updated\x20personal\x20Skill\x20','Compatibility\x20flag;\x20no\x20extra\x20checks\x20are\x20enabled','input','includes','str','name','files','skipped','metadataPath','type','linkedPaths','\x20remote\x20Skill(s).','26zuyzNq','Only\x20target\x20a\x20specific\x20runtime\x20Skill\x20code','Business\x20Skill\x20installation\x20requires\x20authentication.\x20Run\x20`lovrabet\x20auth\x20login`,\x20or\x20use\x20`lovrabet\x20cli-skill\x20install`\x20for\x20CLI\x20Built-in\x20Skill\x20setup.','Skill\x20template\x20type','Local\x20Skill\x20directory\x20containing\x20SKILL.md','some','../../skills/runtime-skill-sync.js','isArray','reduce','Skill\x20path\x20already\x20exists\x20and\x20is\x20not\x20a\x20writable\x20directory:\x20','41009230pBHMdI','all','skillDir','errors','boolean','Listed\x20','skill','cacheDir','../../core/api-client.js','target','Created\x20personal\x20Skill\x20','personal','Skill\x20list\x20scope:\x20all,\x20personal,\x20or\x20company','Install\x20current-app\x20business\x20Skills\x20into\x20user-level\x20Agent\x20skill\x20directories','Push\x20a\x20local\x20Skill\x20directory\x20to\x20personal\x20runtime\x20Skill\x20scope','Validate\x20a\x20local\x20Skill\x20directory\x20as\x20a\x20self-contained\x20delivery\x20package','List\x20runtime\x20Skills\x20from\x20remote\x20or\x20CLI-managed\x20local\x20cache','rendered','force','9fFKarx','flatMap','removed','string','isSymbolicLink','lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens','status','63pMLLzl','write','\x20company\x20Skill(s).','Refusing\x20to\x20overwrite\x20symlink:\x20','153345bxxHOD','company','scope','Unsupported\x20Skill\x20sync\x20scope:\x20','map','Create\x20a\x20local\x20runtime\x20Skill\x20draft\x20without\x20uploading\x20or\x20publishing\x20it.','trim','Installed\x20','skillMdPath','bool','Overwrite\x20generated\x20files\x20when\x20the\x20Skill\x20directory\x20already\x20exists','authRequired','treeHash','840564vZkCnJ','code','push','action','remote','validation','unchanged','filter','length','Created\x20local\x20Skill\x20draft\x20','\x20local\x20Skill(s).','warnings','1790465kZuvPO','created','isDirectory','envName','accessKey','local','Unsupported\x20Skill\x20list\x20scope:\x20','find','strict','skillCode','validate','install','read','updated','Create\x20a\x20local\x20self-contained\x20runtime\x20Skill\x20draft','production','ossPath','version','skillName','SKILL.md','readonly','appCode','list'];a35_0x2b3b=function(){return _0x32639a;};return a35_0x2b3b();}async function downloadPackageIfNeeded(_0x2d0f6d,_0x28a23a,_0x737980,_0x89e19d){const _0x110e84=a35_0x59df79;if(!isPackageBackedManifest(_0x2d0f6d[_0x110e84(0x217)]))return undefined;return _0x89e19d(_0x28a23a,_0x2d0f6d[_0x110e84(0x1f8)],_0x737980);}function normalizeSyncScopes(_0x43fb75){const _0x3f4e3a=a35_0x59df79,_0x30983f=_0x43fb75[_0x3f4e3a(0x1dc)]();if(!_0x30983f||_0x30983f===_0x3f4e3a(0x228))return[_0x3f4e3a(0x232),_0x3f4e3a(0x1d7)];if(_0x30983f===_0x3f4e3a(0x232)||_0x30983f==='company')return[_0x30983f];throw CliErrors[_0x3f4e3a(0x1e8)](_0x3f4e3a(0x1d9)+_0x43fb75);}function normalizeListScope(_0x2097fe){const _0x22b406=a35_0x59df79,_0x4874fb=_0x2097fe[_0x22b406(0x1dc)]();if(!_0x4874fb)return _0x22b406(0x228);if(_0x4874fb===_0x22b406(0x232)||_0x4874fb===_0x22b406(0x1d7)||_0x4874fb===_0x22b406(0x228))return _0x4874fb;throw CliErrors[_0x22b406(0x1e8)](_0x22b406(0x1f5)+_0x2097fe);}function shouldListScope(_0x52dbd0,_0x571773){const _0x25a124=a35_0x59df79;if(_0x52dbd0===_0x25a124(0x228))return!![];return _0x52dbd0===_0x571773;}function listScopeToRuntimeScopes(_0x2e54b6){const _0x19de12=a35_0x59df79;if(_0x2e54b6==='all')return['personal',_0x19de12(0x1d7)];return[_0x2e54b6===_0x19de12(0x1d7)?_0x19de12(0x1d7):_0x2e54b6];}function listScopeToRemoteScope(_0x440972){return _0x440972;}function groupLocalRuntimeSkills(_0x9307a7){const _0x255eb8=a35_0x59df79;return{'personal':_0x9307a7['filter'](_0x52fc16=>_0x52fc16[_0x255eb8(0x1d8)]==='personal'),'company':_0x9307a7['filter'](_0x8d91f7=>_0x8d91f7['scope']===_0x255eb8(0x1d7)),'builtin':_0x9307a7['filter'](_0x36e983=>_0x36e983['scope']==='builtin')};}function countLinkActions(_0xec783e){const _0x2b2836=a35_0x59df79;return _0xec783e[_0x2b2836(0x225)]((_0x2e44a1,_0x3acbd7)=>{return _0x2e44a1[_0x3acbd7['action']]=(_0x2e44a1[_0x3acbd7['action']]??0x0)+0x1,_0x2e44a1;},{});}function isPackageBackedManifest(_0x3fe02a){const _0x2b0f13=a35_0x59df79;return!!_0x3fe02a&&typeof _0x3fe02a===_0x2b0f13(0x206)&&!Array[_0x2b0f13(0x224)](_0x3fe02a)&&typeof _0x3fe02a['ossPath']===_0x2b0f13(0x1ce)&&_0x3fe02a[_0x2b0f13(0x1ff)]['length']>0x0&&Array[_0x2b0f13(0x224)](_0x3fe02a[_0x2b0f13(0x217)]);}function isMultiFileManifest(_0x285a61){const _0x19672e=a35_0x59df79;return!!_0x285a61&&typeof _0x285a61===_0x19672e(0x206)&&!Array['isArray'](_0x285a61)&&Array['isArray'](_0x285a61[_0x19672e(0x217)])&&_0x285a61[_0x19672e(0x217)][_0x19672e(0x222)](_0x417823=>_0x417823['path']!==_0x19672e(0x202));}
|
|
1
|
+
(function(_0x30e609,_0x1a7612){const _0xe26f64=a41_0x5be4,_0x29f227=_0x30e609();while(!![]){try{const _0x37c4fe=-parseInt(_0xe26f64(0x1e1))/0x1*(parseInt(_0xe26f64(0x1e3))/0x2)+parseInt(_0xe26f64(0x1db))/0x3+parseInt(_0xe26f64(0x1e0))/0x4+-parseInt(_0xe26f64(0x1e4))/0x5*(-parseInt(_0xe26f64(0x1df))/0x6)+parseInt(_0xe26f64(0x1dd))/0x7+-parseInt(_0xe26f64(0x1dc))/0x8*(parseInt(_0xe26f64(0x1e2))/0x9)+-parseInt(_0xe26f64(0x1de))/0xa;if(_0x37c4fe===_0x1a7612)break;else _0x29f227['push'](_0x29f227['shift']());}catch(_0x171333){_0x29f227['push'](_0x29f227['shift']());}}}(a41_0x2394,0xbd147));import{createCommand}from'./commands/create.js';function a41_0x5be4(_0x4c30e2,_0x3652aa){_0x4c30e2=_0x4c30e2-0x1db;const _0x239470=a41_0x2394();let _0x5be413=_0x239470[_0x4c30e2];return _0x5be413;}import{installCommand}from'./commands/install.js';import{listCommand}from'./commands/list.js';import{pushCommand}from'./commands/push.js';import{validateCommand}from'./commands/validate.js';export const skillDefinitions=[installCommand,createCommand,validateCommand,listCommand,pushCommand];function a41_0x2394(){const _0x39bc3f=['335JxDHOa','3445662byKhWS','758736MabObv','9439262QYRyNj','8749440NifDzL','6150ayZfei','3649656JpHIvd','97EgtWgn','54waAlNF','25972Wohklm'];a41_0x2394=function(){return _0x39bc3f;};return a41_0x2394();}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x44f7a6,_0x347f9a){var _0x5b233d=a42_0x1309,_0x8ebb97=_0x44f7a6();while(!![]){try{var _0x5b946a=parseInt(_0x5b233d(0x193))/0x1*(-parseInt(_0x5b233d(0x198))/0x2)+parseInt(_0x5b233d(0x189))/0x3*(parseInt(_0x5b233d(0x18f))/0x4)+parseInt(_0x5b233d(0x190))/0x5*(-parseInt(_0x5b233d(0x18b))/0x6)+parseInt(_0x5b233d(0x196))/0x7*(-parseInt(_0x5b233d(0x188))/0x8)+parseInt(_0x5b233d(0x192))/0x9+parseInt(_0x5b233d(0x186))/0xa*(-parseInt(_0x5b233d(0x194))/0xb)+parseInt(_0x5b233d(0x18c))/0xc;if(_0x5b946a===_0x347f9a)break;else _0x8ebb97['push'](_0x8ebb97['shift']());}catch(_0x58d646){_0x8ebb97['push'](_0x8ebb97['shift']());}}}(a42_0x2bb8,0x6b085));export function isPackageBackedManifest(_0xdc3621){var _0xe488ed=a42_0x1309;return!!_0xdc3621&&typeof _0xdc3621===_0xe488ed(0x195)&&!Array[_0xe488ed(0x197)](_0xdc3621)&&typeof _0xdc3621['ossPath']==='string'&&_0xdc3621[_0xe488ed(0x18e)][_0xe488ed(0x18a)]>0x0&&Array[_0xe488ed(0x197)](_0xdc3621[_0xe488ed(0x187)]);}function a42_0x1309(_0x14f241,_0x39f4ad){_0x14f241=_0x14f241-0x186;var _0x2bb839=a42_0x2bb8();var _0x130927=_0x2bb839[_0x14f241];return _0x130927;}export function isMultiFileManifest(_0x4bc708){var _0x5677b6=a42_0x1309;return!!_0x4bc708&&typeof _0x4bc708==='object'&&!Array[_0x5677b6(0x197)](_0x4bc708)&&Array[_0x5677b6(0x197)](_0x4bc708[_0x5677b6(0x187)])&&_0x4bc708[_0x5677b6(0x187)]['some'](_0xaa5076=>_0xaa5076[_0x5677b6(0x191)]!==_0x5677b6(0x18d));}function a42_0x2bb8(){var _0x5e6f4e=['18430716tiwtIh','SKILL.md','ossPath','164EwTffY','65PCiSND','path','3220263SqcyyR','383dTJxMe','33nvtiGq','object','1162707bzrxHa','isArray','1046YRhPVI','2881490JaPxyS','files','24qmsmJa','37860brhMJo','length','189072RYujrz'];a42_0x2bb8=function(){return _0x5e6f4e;};return a42_0x2bb8();}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x2ef27e,_0x548553){const _0x544ac5=a43_0x45e2,_0x39bf9f=_0x2ef27e();while(!![]){try{const _0x4e9e4c=-parseInt(_0x544ac5(0x114))/0x1*(-parseInt(_0x544ac5(0x109))/0x2)+-parseInt(_0x544ac5(0x10e))/0x3+parseInt(_0x544ac5(0x112))/0x4+parseInt(_0x544ac5(0x116))/0x5+parseInt(_0x544ac5(0x115))/0x6+parseInt(_0x544ac5(0x113))/0x7+parseInt(_0x544ac5(0x110))/0x8*(-parseInt(_0x544ac5(0x10c))/0x9);if(_0x4e9e4c===_0x548553)break;else _0x39bf9f['push'](_0x39bf9f['shift']());}catch(_0x933011){_0x39bf9f['push'](_0x39bf9f['shift']());}}}(a43_0x5c05,0x8f47f));function a43_0x45e2(_0x5fe2d1,_0x222691){_0x5fe2d1=_0x5fe2d1-0x108;const _0x5c0540=a43_0x5c05();let _0x45e2b7=_0x5c0540[_0x5fe2d1];return _0x45e2b7;}function a43_0x5c05(){const _0x33bad7=['all','validation','11568321oRUznq','trim','685275gtJEPC','Unsupported\x20Skill\x20sync\x20scope:\x20','16OXMsLl','personal','1210952IEcnQt','5112534PahWWZ','267097Ivqhsn','5531868GddRuQ','1812880SCteOt','company','8rZuQed'];a43_0x5c05=function(){return _0x33bad7;};return a43_0x5c05();}import{CliErrors}from'../../errors.js';export function normalizeSyncScopes(_0x9187fa){const _0x50e0f8=a43_0x45e2,_0x99a6fa=_0x9187fa['trim']();if(!_0x99a6fa||_0x99a6fa===_0x50e0f8(0x10a))return[_0x50e0f8(0x111),_0x50e0f8(0x108)];if(_0x99a6fa===_0x50e0f8(0x111)||_0x99a6fa===_0x50e0f8(0x108))return[_0x99a6fa];throw CliErrors[_0x50e0f8(0x10b)](_0x50e0f8(0x10f)+_0x9187fa);}export function normalizeListScope(_0x5e764f){const _0x3284bc=a43_0x45e2,_0x491a34=_0x5e764f[_0x3284bc(0x10d)]();if(!_0x491a34)return _0x3284bc(0x10a);if(_0x491a34===_0x3284bc(0x111)||_0x491a34===_0x3284bc(0x108)||_0x491a34===_0x3284bc(0x10a))return _0x491a34;throw CliErrors[_0x3284bc(0x10b)]('Unsupported\x20Skill\x20list\x20scope:\x20'+_0x5e764f);}export function shouldListScope(_0x9c2482,_0x1714b0){const _0x4baec4=a43_0x45e2;if(_0x9c2482===_0x4baec4(0x10a))return!![];return _0x9c2482===_0x1714b0;}export function listScopeToRuntimeScopes(_0x1f8322){const _0x2cf990=a43_0x45e2;if(_0x1f8322===_0x2cf990(0x10a))return[_0x2cf990(0x111),_0x2cf990(0x108)];return[_0x1f8322===_0x2cf990(0x108)?_0x2cf990(0x108):_0x1f8322];}export function listScopeToRemoteScope(_0x24af24){return _0x24af24;}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a44_0x35a9(_0x47ea85,_0x27a3db){_0x47ea85=_0x47ea85-0x1bb;var _0x1a8b93=a44_0x1a8b();var _0x35a9e8=_0x1a8b93[_0x47ea85];return _0x35a9e8;}(function(_0x4f7c5c,_0x110d4b){var _0x58db30=a44_0x35a9,_0x537af4=_0x4f7c5c();while(!![]){try{var _0x1886a9=-parseInt(_0x58db30(0x1ce))/0x1*(parseInt(_0x58db30(0x1cb))/0x2)+-parseInt(_0x58db30(0x1d1))/0x3+-parseInt(_0x58db30(0x1bb))/0x4*(-parseInt(_0x58db30(0x1d0))/0x5)+parseInt(_0x58db30(0x1c6))/0x6*(-parseInt(_0x58db30(0x1c8))/0x7)+parseInt(_0x58db30(0x1bc))/0x8+parseInt(_0x58db30(0x1d2))/0x9*(parseInt(_0x58db30(0x1bd))/0xa)+parseInt(_0x58db30(0x1cd))/0xb;if(_0x1886a9===_0x110d4b)break;else _0x537af4['push'](_0x537af4['shift']());}catch(_0x5bfd6b){_0x537af4['push'](_0x537af4['shift']());}}}(a44_0x1a8b,0xaf65d));export function summarizeRuntimeSkill(_0x5dd297){var _0x3599e4=a44_0x35a9;return{'id':_0x5dd297['id'],'skillCode':_0x5dd297[_0x3599e4(0x1cc)],'skillName':_0x5dd297['skillName'],'scope':_0x5dd297[_0x3599e4(0x1c2)],'version':_0x5dd297[_0x3599e4(0x1c7)],'readonly':_0x5dd297[_0x3599e4(0x1ca)]};}function a44_0x1a8b(){var _0x3fdb1b=['661131mDguCZ','4bOLpkT','1517808UZARbC','10UZKYFK','contentHash','appCode','pulledAt','tags','scope','skillName','metadataPath','cacheDir','6004122gUuIay','version','7nqIjJy','linkedPaths','readonly','4bkCgOp','skillCode','16142060hPMMyN','424852UEMgCW','status','7127685NOlOJt','1762086QTFOTy'];a44_0x1a8b=function(){return _0x3fdb1b;};return a44_0x1a8b();}export function summarizeLocalRuntimeSkill(_0x271917){var _0x50a3e0=a44_0x35a9;return{'id':_0x271917['id'],'skillCode':_0x271917[_0x50a3e0(0x1cc)],'skillName':_0x271917[_0x50a3e0(0x1c3)],'scope':_0x271917[_0x50a3e0(0x1c2)],'appCode':_0x271917[_0x50a3e0(0x1bf)],'version':_0x271917[_0x50a3e0(0x1c7)],'status':_0x271917[_0x50a3e0(0x1cf)],'readonly':_0x271917[_0x50a3e0(0x1ca)],'tags':_0x271917[_0x50a3e0(0x1c1)],'dir':_0x271917['dir'],'cacheDir':_0x271917[_0x50a3e0(0x1c5)],'skillMdPath':_0x271917['skillMdPath'],'metadataPath':_0x271917[_0x50a3e0(0x1c4)],'linkedPaths':_0x271917[_0x50a3e0(0x1c9)],'contentHash':_0x271917[_0x50a3e0(0x1be)],'treeHash':_0x271917['treeHash'],'pulledAt':_0x271917[_0x50a3e0(0x1c0)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a45_0xe0111c=a45_0x5dc7;function a45_0x37e6(){const _0x2e17dd=['14235858YQjByn','\x0a\x0a##\x20错误与人工接管\x0a\x0aerrors\x20必须包含失败阶段、错误原因和可复核对象。\x0anextActions\x20必须给出重试、补充输入、人工接管或停止处理的动作。\x0a','##\x20业务状态流转\x0a\x0a【填写本\x20Skill\x20的前置业务状态、允许动作、目标业务状态、fromStatus\x20->\x20toStatus\x20预览、写入后读回核对,以及\x20unknown\x20/\x20needs_manual_check\x20处理。状态迁移合法性必须由业务\x20BFF、Lovrabet\x20平台命令或服务端接口判断,Skill\x20不作为状态事实源。】','1742WnnIdj','timestamp','join','references/output-contract.md','test','48crRqMy','read','67790Basltk','1.\x20受控模板预览:【填写待维护内容、影响范围和预览方式】\x0a2.\x20用户确认:【填写确认信息和不可省略的人工判断点】\x0a3.\x20受控维护:【填写确认后的维护步骤和记录方式】\x0a4.\x20只读核对:【填写维护后的核对入口、差异和回滚/修正方式】','trainer','\x22\x0a\x20\x20generator:\x20\x22lovrabet\x20skill\x20create\x22\x0a---\x0a\x0a#\x20','#\x20Output\x20Contract\x0a\x0a','#\x20Runtime\x20Contract\x0a\x0aSkill\x20push\x20后的\x20zip\x20包就是完整交付产物。','.agents/skills','\x20的所有必读规则必须位于\x20SKILL.md\x20或\x20references/\x20内。\x0a\x0a##\x20必读文档\x0a\x0a-\x20[SKILL.md](../SKILL.md)\x0a-\x20[runtime-contract.md](runtime-contract.md)\x0a-\x20[output-contract.md](output-contract.md)\x0a\x0a##\x20主边界\x0a\x0a-\x20不得依赖\x20Skill\x20目录外的仓库文件、绝对路径、file\x20URL\x20或本机专属配置。\x0a-\x20文档中的缓存路径、安装路径、示例路径或排障路径不等于运行时包外依赖;只有明确要求读取、链接或执行包外内容时才属于自包含风险。\x0a-\x20如需承接仓库规范,必须把必要规则内化到本\x20Skill\x20包内的\x20references/\x20文件中。\x0a-\x20type=','828tgJhbL','3603915HVfINl','includes','trim','type','48666WkULqc','\x0a\x0a##\x20内部要求\x0a\x0a执行前必须读取并遵守\x20[runtime-contract.md](references/runtime-contract.md)\x20和\x20[output-contract.md](references/output-contract.md)。\x0a\x0a##\x20使用边界\x0a\x0a【填写该\x20Skill\x20能做什么、不能做什么、适用业务范围和禁止扩大执行范围】\x0a\x0a##\x20输入门禁\x0a\x0a【填写必须具备的输入;缺失业务对象、执行范围、确认信息或权限上下文时必须停止】\x0a\x0a##\x20与现有能力集成\x0a\x0a【填写本\x20Skill\x20使用的\x20lovrabet\x20data、lovrabet\x20sql、lovrabet\x20bff\x20或\x20lovrabet\x20personal-bff\x20命令,以及包内\x20references/\x20中沉淀的运行态入口、脚本对接方式或人工操作边界。不得依赖\x20Skill\x20目录外文件、绝对路径或本机专属配置。】\x0a\x0a##\x20平台能力优先\x0a\x0a【填写本\x20Skill\x20优先使用的\x20Lovrabet\x20平台命令:lovrabet\x20data\x20/\x20lovrabet\x20sql\x20/\x20lovrabet\x20bff\x20/\x20lovrabet\x20personal-bff。本地脚本仅用于平台明确不覆盖的文件格式转换、静态校验、展示整理或第三方薄适配;不得用本地脚本替代平台命令承载业务写入、权限判断、状态机、审批提交或回滚。】\x0a\x0a##\x20第三方服务边界\x0a\x0a【填写是否调用第三方识别、生成、上传或行业服务;如涉及\x20API\x20Key、OAuth、Cookie、登录态或业务数据上传,必须说明由\x20Lovrabet\x20应用后台、BFF\x20或平台适配器统一配置。目标治理口径是\x20Skill\x20不读取、不分发、不保存明文凭证。详细凭证、额度、审计和审核发布规则写入\x20references/runtime-contract.md。】\x0a\x0a##\x20SOP\x20工作流\x0a\x0a','write','168SRQUap','Invalid\x20Skill\x20name:\x20','1947cMRnJB','SKILL.md','\x0a\x20\x20created:\x20\x22','skillName','Use\x20lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens,\x20for\x20example\x20invoice-export.','\x20的最终回复必须让运营人员能判断:是否执行、影响了什么、如何复核、失败后下一步做什么。\x0a\x0a##\x20状态枚举\x0a\x0astatus:\x20success\x20|\x20no_op\x20|\x20partial_success\x20|\x20blocked\x20|\x20failed\x20|\x20needs_manual_check\x0a\x0a-\x20success:动作已完成,且关键结果已核对。\x0a-\x20no_op:没有符合条件的对象或无需变更。\x0a-\x20partial_success:部分对象完成,未完成对象必须进入\x20errors\x20和\x20nextActions。\x0a-\x20blocked:缺少输入、权限、确认或平台能力,无法继续。\x0a-\x20failed:执行失败,必须说明失败阶段、错误和恢复方式。\x0a-\x20needs_manual_check:读回异常、状态未知或人工判断缺失。\x0a\x0aunknown、partial_success、failed、needs_manual_check\x20不能包装为\x20success。\x0a\x0a##\x20输出模式\x0a\x0amode:\x20dry_run\x20|\x20confirmed\x20|\x20read_only\x0a\x0a-\x20dry_run:只展示预览、影响范围和差异,不写入业务数据。\x0a-\x20confirmed:用户明确确认后的执行模式;写入后必须读回核对。\x0a-\x20read_only:只查询、汇总或核对,不触发写入。\x0a\x0a##\x20必填字段\x0a\x0a-\x20status\x0a-\x20mode\x0a-\x20summary\x0a-\x20scope\x0a-\x20changes\x0a-\x20verification\x0a-\x20warnings\x0a-\x20errors\x0a-\x20nextActions\x0a\x0a##\x20写入结果\x0a\x0a','764100lEXZpp','\x20类型默认不执行业务写入;如流程包含受控维护或人工确认,也必须用\x20mode\x20标明执行阶段并暴露核对结果。','\x0adescription:\x20\x22【填写模型触发语义:用户在什么场景应使用本\x20Skill、不要使用的边界和关键词】\x22\x0ametadata:\x0a\x20\x20type:\x20','2629rSoazf','---\x0aname:\x20','##\x20状态读回与未知状态处理\x0a\x0a【填写业务状态事实源、fromStatus\x20->\x20toStatus\x20预览、写入后读回核对方式,以及\x20unknown\x20/\x20needs_manual_check\x20的处理边界】\x0a\x0a','write\x20类型在\x20dry_run\x20下只展示预览、影响范围和差异,不写入业务数据。\x0aconfirmed\x20写入后必须执行读回核对,并把核对结果写入\x20verification。\x0a读回异常、业务状态未知或结果不一致时,status\x20必须为\x20partial_success、failed\x20或\x20needs_manual_check。','\x0a##\x20返回契约\x0a\x0a最终输出必须遵守\x20[output-contract.md](output-contract.md)。本文件只补充运行态安全约束;展示字段、状态枚举、失败暴露和人工处理项以\x20output-contract.md\x20为准。\x0a\x0a##\x20失败恢复\x0a\x0a【填写失败状态识别、checkpoint、重试和人工接管方式】\x0a\x0a##\x20禁止事项\x0a\x0a-\x20禁止链接或读取\x20Skill\x20目录外的\x20AGENTS.md、wiki、docs、脚本或个人路径作为运行时必读依赖。\x0a-\x20禁止把说明性的缓存路径、安装路径、示例路径或排障路径包装成运行时必读依赖。\x0a-\x20禁止在未确认影响范围时执行写入。\x0a-\x20禁止隐藏失败或把未知状态描述为成功。\x0a','842SYqCvu','885PxFWMs','1.\x20dry-run:【填写预览入口、影响范围和差异摘要;不得写入业务数据】\x0a2.\x20用户确认:【填写确认语义、目标对象、数量、风险和操作者责任】\x0a3.\x20confirmed\x20写入:【填写确认后的写入入口和幂等/防重复要求】\x0a4.\x20只读核对:【填写写入后的查询核对、差异展示和结果链接】\x0a5.\x20checkpoint:【填写失败恢复、重试条件和人工接管方式】'];a45_0x37e6=function(){return _0x2e17dd;};return a45_0x37e6();}(function(_0x4d15c9,_0x51eaa5){const _0x4f404b=a45_0x5dc7,_0x2029cc=_0x4d15c9();while(!![]){try{const _0x33482a=parseInt(_0x4f404b(0x217))/0x1*(parseInt(_0x4f404b(0x21d))/0x2)+parseInt(_0x4f404b(0x209))/0x3*(parseInt(_0x4f404b(0x1ff))/0x4)+parseInt(_0x4f404b(0x218))/0x5*(-parseInt(_0x4f404b(0x204))/0x6)+parseInt(_0x4f404b(0x200))/0x7+-parseInt(_0x4f404b(0x207))/0x8*(parseInt(_0x4f404b(0x20f))/0x9)+-parseInt(_0x4f404b(0x1f7))/0xa*(parseInt(_0x4f404b(0x212))/0xb)+parseInt(_0x4f404b(0x1f5))/0xc*(parseInt(_0x4f404b(0x21a))/0xd);if(_0x33482a===_0x51eaa5)break;else _0x2029cc['push'](_0x2029cc['shift']());}catch(_0x944656){_0x2029cc['push'](_0x2029cc['shift']());}}}(a45_0x37e6,0xe19ca));function a45_0x5dc7(_0x517b5c,_0x2fb80c){_0x517b5c=_0x517b5c-0x1f3;const _0x37e63a=a45_0x37e6();let _0x5dc74e=_0x37e63a[_0x517b5c];return _0x5dc74e;}import{CliErrors}from'../../errors.js';export const SKILL_TYPES=[a45_0xe0111c(0x206),a45_0xe0111c(0x1f6),a45_0xe0111c(0x1f9)];export const DEFAULT_SKILL_TARGET=a45_0xe0111c(0x1fd);export const SKILL_NAME_PATTERN=/^[a-z0-9]+(?:-[a-z0-9]+)*$/;export const RUNTIME_CONTRACT_FILE='references/runtime-contract.md';export const OUTPUT_CONTRACT_FILE=a45_0xe0111c(0x1f3);export function validateSkillName(_0x32ea01){const _0x2fc61e=a45_0xe0111c,_0x245d91=_0x32ea01[_0x2fc61e(0x202)]();if(!SKILL_NAME_PATTERN[_0x2fc61e(0x1f4)](_0x245d91))throw CliErrors['validation'](_0x2fc61e(0x208)+_0x32ea01+'.\x20Use\x20lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens.',_0x2fc61e(0x20d));return _0x245d91;}export function normalizeSkillTemplateType(_0x26f504){const _0x958139=a45_0xe0111c,_0x5d6e3a=(_0x26f504||'write')[_0x958139(0x202)]()||_0x958139(0x206);if(SKILL_TYPES[_0x958139(0x201)](_0x5d6e3a))return _0x5d6e3a;throw CliErrors['validation']('Unsupported\x20Skill\x20type:\x20'+_0x26f504,'Use\x20one\x20of:\x20'+SKILL_TYPES[_0x958139(0x21f)](',\x20')+'.');}export function renderSkillTemplate(_0x1dcd0c){const _0x4f9d91=a45_0xe0111c,_0x3c02e3=validateSkillName(_0x1dcd0c[_0x4f9d91(0x20c)]),_0x29e4db=normalizeSkillTemplateType(_0x1dcd0c[_0x4f9d91(0x203)]),_0x5d9254=_0x1dcd0c[_0x4f9d91(0x21e)]??new Date()['toISOString']();return{'skillName':_0x3c02e3,'type':_0x29e4db,'files':[{'path':_0x4f9d91(0x20a),'content':renderSkillMd(_0x3c02e3,_0x29e4db,_0x5d9254)},{'path':RUNTIME_CONTRACT_FILE,'content':renderRuntimeContract(_0x3c02e3,_0x29e4db)},{'path':OUTPUT_CONTRACT_FILE,'content':renderOutputContract(_0x3c02e3,_0x29e4db)}]};}function renderSkillMd(_0x42eb7d,_0x173510,_0x51639f){const _0xc2d54b=a45_0xe0111c,_0x382dcc=typeWorkflow(_0x173510);return _0xc2d54b(0x213)+_0x42eb7d+_0xc2d54b(0x211)+_0x173510+_0xc2d54b(0x20b)+_0x51639f+_0xc2d54b(0x1fa)+_0x42eb7d+_0xc2d54b(0x205)+_0x382dcc+'\x0a\x0a'+businessStateSection(_0x173510)+'\x0a\x0a##\x20展示规范\x0a\x0a【填写面向运营人员的展示字段、差异摘要、成功/失败状态和人工处理项;最终输出必须按\x20references/output-contract.md\x20的\x20status\x20/\x20mode\x20/\x20summary\x20/\x20errors\x20/\x20nextActions\x20返回,不能把\x20unknown、partial_success、failed\x20或\x20needs_manual_check\x20包装为\x20success。】\x0a\x0a##\x20失败恢复\x0a\x0a【填写失败后的\x20checkpoint、重试条件、人工接管方式和避免重复写入的核对步骤】\x0a';}function renderRuntimeContract(_0x27e597,_0x5020cc){const _0x295aa4=a45_0xe0111c,_0x3fb954=_0x5020cc===_0x295aa4(0x206)?_0x295aa4(0x214):'';return _0x295aa4(0x1fc)+_0x27e597+_0x295aa4(0x1fe)+_0x5020cc+'\x20只作为模板选择器,不替代业务权限、风险等级和用户确认。\x0a\x0a##\x20运行态入口\x0a\x0a【填写包内说明的运行态入口、可调用脚本或人工执行边界】\x0a\x0a##\x20凭证与登录态\x0a\x0a【填写本\x20Skill\x20依赖的第三方服务凭证和登录态治理方式。强烈建议通过\x20Lovrabet\x20应用后台或平台服务端适配器做平台托管配置;开发先行阶段如存在临时明文凭证,应标注后续治理计划、适用环境和额度边界,并避免进入长期交付内容。】\x0a\x0a##\x20第三方候选资产\x0a\x0a【填写第三方生成类结果的消费边界。生成类结果仅作为候选素材;涉及商品图、客户资料、Excel\x20或业务文件上传时,必须声明授权、额度、审计、失败降级和人工审核/业务\x20BFF\x20校验后的发布边界。】\x0a\x0a##\x20预览\x20/\x20写入\x20/\x20核对差异\x0a\x0a【填写预览、确认、正式执行和只读核对的顺序】\x0a\x0a'+_0x3fb954+_0x295aa4(0x216);}function renderOutputContract(_0x58a042,_0xf7c47c){const _0x5af651=a45_0xe0111c,_0x208071=_0xf7c47c===_0x5af651(0x206)?_0x5af651(0x215):_0xf7c47c+_0x5af651(0x210);return _0x5af651(0x1fb)+_0x58a042+_0x5af651(0x20e)+_0x208071+_0x5af651(0x21b);}function typeWorkflow(_0x5547e5){const _0x5d1f7e=a45_0xe0111c;if(_0x5547e5==='read')return'1.\x20只读查询:【填写查询入口、过滤条件和权限边界】\x0a2.\x20业务汇总:【填写统计口径、字段解释和异常提示】\x0a3.\x20查看链接:【填写可供运营人员复核的记录、页面或报告链接】\x0a4.\x20禁止写入:不得创建、更新、删除或触发会改变业务状态的动作。';if(_0x5547e5===_0x5d1f7e(0x1f9))return _0x5d1f7e(0x1f8);return _0x5d1f7e(0x219);}function businessStateSection(_0x22a83a){const _0x64c6db=a45_0xe0111c;if(_0x22a83a!==_0x64c6db(0x206))return'';return _0x64c6db(0x21c);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a46_0x42cefb=a46_0x5853;(function(_0x55891e,_0x41d6f2){const _0x55b19a=a46_0x5853,_0x3ef8d2=_0x55891e();while(!![]){try{const _0x4191f5=parseInt(_0x55b19a(0xd6))/0x1+parseInt(_0x55b19a(0xcf))/0x2*(-parseInt(_0x55b19a(0xcb))/0x3)+-parseInt(_0x55b19a(0xef))/0x4*(parseInt(_0x55b19a(0xb1))/0x5)+-parseInt(_0x55b19a(0xd5))/0x6*(-parseInt(_0x55b19a(0xb2))/0x7)+-parseInt(_0x55b19a(0xcc))/0x8*(parseInt(_0x55b19a(0xd4))/0x9)+-parseInt(_0x55b19a(0xec))/0xa+parseInt(_0x55b19a(0xf1))/0xb*(parseInt(_0x55b19a(0xe8))/0xc);if(_0x4191f5===_0x41d6f2)break;else _0x3ef8d2['push'](_0x3ef8d2['shift']());}catch(_0x18cc90){_0x3ef8d2['push'](_0x3ef8d2['shift']());}}}(a46_0xb2da,0x94e51));function a46_0x5853(_0x3026ce,_0x21bf24){_0x3026ce=_0x3026ce-0xb0;const _0xb2daee=a46_0xb2da();let _0x58539e=_0xb2daee[_0x3026ce];return _0x58539e;}function a46_0xb2da(){const _0x570d49=['SKILL.md\x20is\x20not\x20a\x20file.','map','filter','write','startsWith','填写模型触发语义:用户在什么场景应使用本\x20Skill、不要使用的边界和关键词。','480024UDQDix','Add\x20SKILL.md\x20at\x20the\x20Skill\x20directory\x20root.','frontmatter-required','match','4744550yfZrLw','SKILL.md\x20must\x20be\x20a\x20regular\x20file.','isSymbolicLink','697672ayeRSM','internal-skill','297lfeDDe','Frontmatter\x20description\x20is\x20empty.','20ccLsjP','60949VSPkTp','metadata','true','slice','path','hasFrontmatter','Replace\x20the\x20symlink\x20with\x20a\x20regular\x20SKILL.md\x20file\x20inside\x20the\x20Skill\x20directory.','validation','SKILL.md\x20must\x20start\x20with\x20frontmatter.','internal','toUpperCase','name','Frontmatter\x20name\x20is\x20missing.','false','utf8','content','test','join','trim','Skill\x20validation\x20failed:\x0a','has','toLowerCase','file','description','Set\x20name\x20to\x20the\x20Skill\x20directory\x20code.','396618fiTNSv','8ybLpdJ','length','level','2kgEsBg','endsWith','isDirectory','structure-complete','push','9041958RvlcKo','834faYACe','628541KLANkR','Missing\x20SKILL.md.','Fix\x20the\x20Skill\x20metadata\x20before\x20running\x20skill\x20push.','ruleId','type','section','Skill\x20directory\x20not\x20found:\x20','error','Add\x20SKILL.md\x20as\x20a\x20regular\x20file\x20at\x20the\x20Skill\x20directory\x20root.','split','trainer','Set\x20metadata.type\x20to\x20write,\x20read,\x20or\x20trainer.'];a46_0xb2da=function(){return _0x570d49;};return a46_0xb2da();}import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{resolve}from'node:path';import{CliErrors}from'../../errors.js';const SKILL_FILE='SKILL.md',SUPPORTED_SKILL_TYPES=new Set([a46_0x42cefb(0xe5),'read',a46_0x42cefb(0xe0)]);export function validateSkillDirectory(_0x110ac5,_0x2a792f={}){const _0xf7f05d=a46_0x42cefb,_0x185361=resolveSkillDirectoryRoot(_0x110ac5),_0x247c7d=[],_0x5206af=loadRequiredSkillFile(_0x185361,_0x247c7d),_0x4ba036=_0x5206af?parseFrontmatter(_0x5206af[_0xf7f05d(0xc1)]):{'hasFrontmatter':![]};_0x5206af&&validateFrontmatter(_0x5206af[_0xf7f05d(0xb6)],_0x4ba036,_0x247c7d);const _0x4ba8aa=_0x247c7d[_0xf7f05d(0xe4)](_0x56d9f7=>_0x56d9f7[_0xf7f05d(0xce)]===_0xf7f05d(0xdd));return{'ok':_0x4ba8aa[_0xf7f05d(0xcd)]===0x0,'dir':_0x185361,'type':_0x4ba036['type'],'errors':_0x4ba8aa,'warnings':[]};}function resolveSkillDirectoryRoot(_0x22016d){const _0x51a6c5=a46_0x42cefb,_0x136c88=resolve(_0x22016d);if(!existsSync(_0x136c88))throw CliErrors[_0x51a6c5(0xb9)](_0x51a6c5(0xdc)+_0x22016d);const _0x1f3e01=lstatSync(_0x136c88);if(_0x1f3e01[_0x51a6c5(0xd1)]())return _0x136c88;if(_0x1f3e01['isSymbolicLink']()){const _0x15fc9f=realpathSync(_0x136c88);if(lstatSync(_0x15fc9f)[_0x51a6c5(0xd1)]())return _0x15fc9f;}throw CliErrors[_0x51a6c5(0xb9)](_0x51a6c5(0xdc)+_0x22016d);}export function throwIfSkillValidationFailed(_0x12b047,_0x232cee=![]){const _0xb8a25c=a46_0x42cefb;if(_0x12b047['ok'])return;const _0x56d36f=_0x12b047['errors'][_0xb8a25c(0xe3)](_0x116bb2=>{const _0xfdcef8=_0xb8a25c,_0x338605=_0x116bb2[_0xfdcef8(0xdb)]?'#'+_0x116bb2[_0xfdcef8(0xdb)]:'';return _0x116bb2[_0xfdcef8(0xce)][_0xfdcef8(0xbc)]()+'\x20'+_0x116bb2[_0xfdcef8(0xd9)]+'\x20'+_0x116bb2[_0xfdcef8(0xc8)]+_0x338605+':\x20'+_0x116bb2['message']+'\x20Fix:\x20'+_0x116bb2['suggestion'];});throw CliErrors['validation'](_0xb8a25c(0xc5)+_0x56d36f[_0xb8a25c(0xc3)]('\x0a'),_0xb8a25c(0xd8));}function loadRequiredSkillFile(_0x543c27,_0x250eaf){const _0x234c2b=a46_0x42cefb,_0x25b7ca=resolve(_0x543c27,SKILL_FILE);if(!existsSync(_0x25b7ca))return _0x250eaf['push'](issue(_0x234c2b(0xdd),_0x234c2b(0xd2),SKILL_FILE,_0x234c2b(0xd7),_0x234c2b(0xe9))),undefined;const _0x13e7f1=lstatSync(_0x25b7ca);if(_0x13e7f1[_0x234c2b(0xee)]())return _0x250eaf[_0x234c2b(0xd3)](issue('error','structure-complete',SKILL_FILE,_0x234c2b(0xed),_0x234c2b(0xb8))),undefined;if(!_0x13e7f1['isFile']())return _0x250eaf['push'](issue(_0x234c2b(0xdd),_0x234c2b(0xd2),SKILL_FILE,_0x234c2b(0xe2),_0x234c2b(0xde))),undefined;return{'path':SKILL_FILE,'content':readFileSync(_0x25b7ca,_0x234c2b(0xc0))};}function validateFrontmatter(_0x6e1e64,_0x212ec9,_0x196770){const _0x3fff35=a46_0x42cefb;if(!_0x212ec9[_0x3fff35(0xb7)]){_0x196770['push'](issue(_0x3fff35(0xdd),_0x3fff35(0xea),_0x6e1e64,_0x3fff35(0xba),'Add\x20frontmatter\x20with\x20name\x20and\x20description.'));return;}!_0x212ec9[_0x3fff35(0xbd)]?.[_0x3fff35(0xc4)]()&&_0x196770[_0x3fff35(0xd3)](issue(_0x3fff35(0xdd),_0x3fff35(0xea),_0x6e1e64,_0x3fff35(0xbe),_0x3fff35(0xca))),!_0x212ec9[_0x3fff35(0xc9)]?.[_0x3fff35(0xc4)]()&&_0x196770[_0x3fff35(0xd3)](issue('error','description-required',_0x6e1e64,_0x3fff35(0xb0),_0x3fff35(0xe7))),_0x212ec9[_0x3fff35(0xbb)]===!![]&&_0x196770['push'](issue(_0x3fff35(0xdd),_0x3fff35(0xf0),_0x6e1e64,'metadata.internal=true\x20Skills\x20cannot\x20be\x20uploaded.','Remove\x20metadata.internal\x20or\x20set\x20it\x20to\x20false\x20before\x20running\x20skill\x20push.')),_0x212ec9['type']?.[_0x3fff35(0xc4)]()&&!SUPPORTED_SKILL_TYPES[_0x3fff35(0xc6)](_0x212ec9[_0x3fff35(0xda)])&&_0x196770['push'](issue('error',_0x3fff35(0xea),_0x6e1e64,'metadata.type\x20must\x20be\x20one\x20of\x20write,\x20read,\x20or\x20trainer.',_0x3fff35(0xe1)));}function parseFrontmatter(_0x4131f8){const _0x236e22=a46_0x42cefb,_0x5792b6=_0x4131f8[_0x236e22(0xeb)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x5792b6)return{'hasFrontmatter':![]};const _0x119c85=_0x5792b6[0x1]??'',_0x3f7a32={'hasFrontmatter':!![]};let _0x1f8e2e=![];for(const _0x48a65f of _0x119c85[_0x236e22(0xdf)](/\r?\n/)){if(/^\s*$/[_0x236e22(0xc2)](_0x48a65f))continue;const _0x132bc7=_0x48a65f[_0x236e22(0xeb)](/^([A-Za-z0-9_-]+):\s*(.*)$/);if(_0x132bc7){const _0x2562aa=_0x132bc7[0x1],_0x448b4d=cleanScalar(_0x132bc7[0x2]??'');_0x1f8e2e=_0x2562aa===_0x236e22(0xb3);if(_0x2562aa===_0x236e22(0xbd))_0x3f7a32[_0x236e22(0xbd)]=_0x448b4d;if(_0x2562aa===_0x236e22(0xc9))_0x3f7a32['description']=_0x448b4d;continue;}const _0x3b7220=_0x48a65f[_0x236e22(0xeb)](/^\s+type:\s*(.*)$/);if(_0x1f8e2e&&_0x3b7220){_0x3f7a32[_0x236e22(0xda)]=cleanScalar(_0x3b7220[0x1]??'');continue;}const _0x39b1d9=_0x48a65f[_0x236e22(0xeb)](/^\s+internal:\s*(.*)$/);_0x1f8e2e&&_0x39b1d9&&(_0x3f7a32['internal']=cleanBoolean(_0x39b1d9[0x1]??''));}return _0x3f7a32;}function cleanScalar(_0x4155fb){const _0xbbefc8=a46_0x42cefb,_0x2dd273=_0x4155fb[_0xbbefc8(0xc4)]();if(_0x2dd273[_0xbbefc8(0xe6)]('\x22')&&_0x2dd273[_0xbbefc8(0xd0)]('\x22')||_0x2dd273[_0xbbefc8(0xe6)]('\x27')&&_0x2dd273[_0xbbefc8(0xd0)]('\x27'))return _0x2dd273[_0xbbefc8(0xb5)](0x1,-0x1);return _0x2dd273;}function cleanBoolean(_0x5bf5bd){const _0x4ab799=a46_0x42cefb,_0x8f1dc0=cleanScalar(_0x5bf5bd)[_0x4ab799(0xc7)]();if(_0x8f1dc0===_0x4ab799(0xb4))return!![];if(_0x8f1dc0===_0x4ab799(0xbf))return![];return undefined;}function issue(_0x2bffb1,_0x596d77,_0x1fe5f0,_0x4cb1cb,_0x48c0c2,_0x125ace){return{'level':_0x2bffb1,'ruleId':_0x596d77,'file':_0x1fe5f0,'section':_0x125ace,'message':_0x4cb1cb,'suggestion':_0x48c0c2};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a47_0x45e4a2=a47_0xcf95;(function(_0x5981bb,_0xe94305){const _0x2182a3=a47_0xcf95,_0x5da943=_0x5981bb();while(!![]){try{const _0x2735c6=-parseInt(_0x2182a3(0x14c))/0x1*(-parseInt(_0x2182a3(0x14d))/0x2)+parseInt(_0x2182a3(0x155))/0x3+parseInt(_0x2182a3(0x14a))/0x4*(-parseInt(_0x2182a3(0x150))/0x5)+parseInt(_0x2182a3(0x148))/0x6*(parseInt(_0x2182a3(0x14b))/0x7)+parseInt(_0x2182a3(0x156))/0x8*(parseInt(_0x2182a3(0x144))/0x9)+parseInt(_0x2182a3(0x147))/0xa*(-parseInt(_0x2182a3(0x153))/0xb)+-parseInt(_0x2182a3(0x141))/0xc;if(_0x2735c6===_0xe94305)break;else _0x5da943['push'](_0x5da943['shift']());}catch(_0xb5ca96){_0x5da943['push'](_0x5da943['shift']());}}}(a47_0x1a7d,0xe8c67));import{getSqlQueryInfo}from'../../core/api-client.js';function a47_0x1a7d(){const _0xf96661=['sqlName','Get\x20custom\x20SQL\x20query\x20details\x20by\x20sqlCode','9019359XKqtnW','sql','description','3200geggHl','1385130QBWYZz','appCode','1418020PxNykT','35urZPvC','621487YlNFHp','4xncFPg','sqlContent','bool','25zzDxwn','sqlcode','verbose','53108RzIBrJ','dbId','4910907KHGJSQ','8gpEjsb','sqlCode','str','9185244sqQRpg'];a47_0x1a7d=function(){return _0xf96661;};return a47_0x1a7d();}import{getDbName}from'../../core/db-resolver.js';function a47_0xcf95(_0x377c8b,_0x48f68c){_0x377c8b=_0x377c8b-0x140;const _0x1a7d61=a47_0x1a7d();let _0xcf9586=_0x1a7d61[_0x377c8b];return _0xcf9586;}import{SQLCODE_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';export const sqlDetail={'service':a47_0x45e4a2(0x145),'command':'detail','description':a47_0x45e4a2(0x143),'risk':'read','flags':[SQLCODE_FLAG,VERBOSE_FLAG],async 'execute'(_0x341c85){const _0xb2d3bf=a47_0x45e4a2,_0x5834f4=await getSqlQueryInfo(_0x341c85[_0xb2d3bf(0x149)],_0x341c85[_0xb2d3bf(0x140)](_0xb2d3bf(0x151))),_0x14df6f=_0x341c85[_0xb2d3bf(0x14f)](_0xb2d3bf(0x152));if(_0x14df6f)return{'ok':!![],'data':_0x5834f4};const _0x1b9c0d=_0x5834f4['dbId']?await getDbName(_0x341c85['appCode'],_0x5834f4[_0xb2d3bf(0x154)]):undefined;return{'ok':!![],'data':{'sqlCode':_0x5834f4[_0xb2d3bf(0x157)],'sqlName':_0x5834f4[_0xb2d3bf(0x142)],'db':_0x1b9c0d?_0x1b9c0d+'\x20('+_0x5834f4[_0xb2d3bf(0x154)]+')':_0x5834f4[_0xb2d3bf(0x154)]??'','description':_0x5834f4[_0xb2d3bf(0x146)]??'','sqlContent':_0x5834f4[_0xb2d3bf(0x14e)]??''}};}};
|
package/lib/commands/sql/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a48_0x2e53(){const _0x3906d8=['str','sqlcode','28pcnyQp','16NBqbYH','SQL\x20execution\x20failed','execResult','length','3443085wymaCa','2935005MtAvsf','21HGIPlY','Execute\x20a\x20custom\x20SQL\x20query\x20by\x20sqlCode','41311176AtQrnp','execError','380208YQSexW','58zQJfvD','194900tsfdkH','Returned\x20','\x20row(s)\x20in\x20','params','247926Adacqa','read','19024XNdQFL','429twDZXy','exec','now'];a48_0x2e53=function(){return _0x3906d8;};return a48_0x2e53();}const a48_0x5ef252=a48_0x3108;(function(_0x4a222e,_0x12113c){const _0x3ee50a=a48_0x3108,_0x4b0e07=_0x4a222e();while(!![]){try{const _0x489158=-parseInt(_0x3ee50a(0x111))/0x1*(parseInt(_0x3ee50a(0x10a))/0x2)+-parseInt(_0x3ee50a(0x10f))/0x3*(parseInt(_0x3ee50a(0x117))/0x4)+-parseInt(_0x3ee50a(0x104))/0x5+-parseInt(_0x3ee50a(0x109))/0x6*(-parseInt(_0x3ee50a(0x105))/0x7)+-parseInt(_0x3ee50a(0x118))/0x8*(parseInt(_0x3ee50a(0x103))/0x9)+-parseInt(_0x3ee50a(0x10b))/0xa*(parseInt(_0x3ee50a(0x112))/0xb)+parseInt(_0x3ee50a(0x107))/0xc;if(_0x489158===_0x12113c)break;else _0x4b0e07['push'](_0x4b0e07['shift']());}catch(_0x1db817){_0x4b0e07['push'](_0x4b0e07['shift']());}}}(a48_0x2e53,0x5f47f));import{executeSdkSql}from'../../core/sdk-client.js';function a48_0x3108(_0x1392d5,_0x537f71){_0x1392d5=_0x1392d5-0x100;const _0x2e53fb=a48_0x2e53();let _0x310846=_0x2e53fb[_0x1392d5];return _0x310846;}import{SQLCODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';import{parseJsonParams}from'../../utils/params.js';export const sqlExec={'service':'sql','command':a48_0x5ef252(0x113),'description':a48_0x5ef252(0x106),'risk':a48_0x5ef252(0x110),'flags':[SQLCODE_FLAG,PARAMS_FLAG],async 'execute'(_0x573b96){const _0x3b67a1=a48_0x5ef252,_0x1ddd7a=parseJsonParams(_0x573b96[_0x3b67a1(0x115)](_0x3b67a1(0x10e))),_0x4bc331=Date[_0x3b67a1(0x114)](),_0xfd15a4=await executeSdkSql(_0x573b96['str'](_0x3b67a1(0x116)),_0x1ddd7a),_0x38adb3=Date['now']()-_0x4bc331,_0x4aea7e=_0xfd15a4?.[_0x3b67a1(0x101)]??_0xfd15a4,_0x51c65d=_0xfd15a4?.['execSuccess']??!![];if(!_0x51c65d)return{'ok':![],'data':{'error':_0xfd15a4?.[_0x3b67a1(0x108)]||_0x3b67a1(0x100),'elapsed':_0x38adb3},'message':'SQL\x20execution\x20failed'};const _0x101471=Array['isArray'](_0x4aea7e)?_0x4aea7e:[];return{'ok':!![],'data':{'rows':_0x101471,'rowCount':_0x101471[_0x3b67a1(0x102)],'elapsed':_0x38adb3},'message':_0x3b67a1(0x10c)+_0x101471['length']+_0x3b67a1(0x10d)+_0x38adb3+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x39b319,_0x54ab46){const _0x424f8f=a49_0x4657,_0x1c4836=_0x39b319();while(!![]){try{const _0x3acf1a=-parseInt(_0x424f8f(0xe2))/0x1+parseInt(_0x424f8f(0xda))/0x2*(parseInt(_0x424f8f(0xe0))/0x3)+parseInt(_0x424f8f(0xdf))/0x4*(parseInt(_0x424f8f(0xe3))/0x5)+parseInt(_0x424f8f(0xde))/0x6+parseInt(_0x424f8f(0xdb))/0x7*(-parseInt(_0x424f8f(0xdd))/0x8)+-parseInt(_0x424f8f(0xdc))/0x9+-parseInt(_0x424f8f(0xe1))/0xa;if(_0x3acf1a===_0x54ab46)break;else _0x1c4836['push'](_0x1c4836['shift']());}catch(_0x39c24f){_0x1c4836['push'](_0x1c4836['shift']());}}}(a49_0xcff1,0xd0f4b));import{sqlDetail}from'../../commands/sql/detail.js';function a49_0xcff1(){const _0x5f2077=['2618060mOzOkK','258126TmhlNC','10wTDDCu','10RtykEO','42IIcLbC','1138779VWvDki','1641776kMXVIh','2069388YpPtzk','3384120owcLrL','418032UajHvp'];a49_0xcff1=function(){return _0x5f2077;};return a49_0xcff1();}import{sqlExec}from'../../commands/sql/exec.js';function a49_0x4657(_0x45eb04,_0x2ba9a6){_0x45eb04=_0x45eb04-0xda;const _0xcff1f0=a49_0xcff1();let _0x465709=_0xcff1f0[_0x45eb04];return _0x465709;}export const sqlDefinitions=[sqlDetail,sqlExec];
|
package/lib/commands/update.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a41_0x57aa80=a41_0x39a0;function a41_0x3c7d(){const _0x3fd97c=['Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','update','\x20\x20Try\x20manually:\x20npm\x20install\x20-g\x20','145828YohhiW','971922XzlbYq','no-skills','str','Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','string','run','toString','Install\x20a\x20specific\x20CLI\x20version','skills','minor','bool','npm','Use\x20full\x20semver\x20versions\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.','join','Update\x20','3585322mdUqet','\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(','log','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','\x20CLI\x20from\x20npm','1999790ssEkLz','args','\x20version\x20from\x20npm.','18eiFbxC','timeout','length','1200272xIwiKN','pipe','filter','657872zVztgZ','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','fromEntries','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','validation','=1).','entries','object','trim','install','beta','prerelease','error','Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.','cwd','version','patch','message','stderr','json','map','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','1689665QuWVCh','--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.','Checking\x20npm\x20dist-tags...','Current\x20version:\x20','Checking\x20CLI\x20Built-in\x20Skill...','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag','Version\x20comparison\x20failed.','Unable\x20to\x20resolve\x20','Invalid\x20version:\x20','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','warn','Already\x20on\x20requested\x20version\x20(v','57fJczVY','source','unknown','stdout','major','18MgXYtM','inherit','nonInteractive','Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.','/-/package/','status','skipped','boolean','\x20->\x20','latest'];a41_0x3c7d=function(){return _0x3fd97c;};return a41_0x3c7d();}(function(_0x2020e0,_0x2a68cd){const _0x250042=a41_0x39a0,_0x481a4d=_0x2020e0();while(!![]){try{const _0x13823c=parseInt(_0x250042(0x7d))/0x1+-parseInt(_0x250042(0xc2))/0x2+parseInt(_0x250042(0xa0))/0x3*(parseInt(_0x250042(0xb2))/0x4)+parseInt(_0x250042(0x93))/0x5*(parseInt(_0x250042(0x77))/0x6)+parseInt(_0x250042(0xb3))/0x7+-parseInt(_0x250042(0x7a))/0x8+-parseInt(_0x250042(0xa5))/0x9*(-parseInt(_0x250042(0x74))/0xa);if(_0x13823c===_0x2a68cd)break;else _0x481a4d['push'](_0x481a4d['shift']());}catch(_0x5caa7d){_0x481a4d['push'](_0x481a4d['shift']());}}}(a41_0x3c7d,0xea7cf));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':a41_0x57aa80(0xac),'description':a41_0x57aa80(0x99),'default':![]},{'name':a41_0x57aa80(0x87),'type':a41_0x57aa80(0xac),'description':a41_0x57aa80(0x80),'default':![]},{'name':a41_0x57aa80(0x8c),'type':'string','description':a41_0x57aa80(0xba)},{'name':a41_0x57aa80(0xb4),'type':a41_0x57aa80(0xac),'description':a41_0x57aa80(0xb6),'default':![]},{'name':a41_0x57aa80(0xbb),'type':'boolean','description':a41_0x57aa80(0xaf),'default':!![],'hidden':!![]}];function parseSemver(_0x4ee452){const _0x3f2d2d=a41_0x57aa80,_0x4079c7=_0x4ee452[_0x3f2d2d(0x85)]()['match'](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0x4079c7)return null;return{'major':Number(_0x4079c7[0x1]),'minor':Number(_0x4079c7[0x2]),'patch':Number(_0x4079c7[0x3]),'prerelease':_0x4079c7[0x4]};}function compareSemver(_0x1a955b,_0x462057){const _0x12d014=a41_0x57aa80,_0x381c08=parseSemver(_0x1a955b),_0x5ca5e6=parseSemver(_0x462057);if(!_0x381c08||!_0x5ca5e6)throw CliErrors[_0x12d014(0x81)](_0x12d014(0x9a),_0x12d014(0xbf));for(const _0x36d778 of[_0x12d014(0xa4),_0x12d014(0xbc),_0x12d014(0x8d)]){if(_0x381c08[_0x36d778]<_0x5ca5e6[_0x36d778])return-0x1;if(_0x381c08[_0x36d778]>_0x5ca5e6[_0x36d778])return 0x1;}if(!_0x381c08[_0x12d014(0x88)]&&!_0x5ca5e6[_0x12d014(0x88)])return 0x0;if(!_0x381c08[_0x12d014(0x88)])return 0x1;if(!_0x5ca5e6['prerelease'])return-0x1;if(_0x381c08['prerelease']===_0x5ca5e6[_0x12d014(0x88)])return 0x0;return _0x381c08[_0x12d014(0x88)]<_0x5ca5e6[_0x12d014(0x88)]?-0x1:0x1;}function getRequestedVersion(_0x163bbe){const _0x1dfd99=a41_0x57aa80,_0x56f176=_0x163bbe[_0x1dfd99(0xb5)]('version')[_0x1dfd99(0x85)]();if(_0x56f176)return _0x56f176;return String(_0x163bbe[_0x1dfd99(0x75)]?.[0x0]??'')[_0x1dfd99(0x85)]();}function shouldSkipCliBuiltInSkill(_0x42486e){const _0x155ecc=a41_0x57aa80;return _0x42486e['bool'](_0x155ecc(0xb4))||_0x42486e['flag']('skills')===![];}async function validateUpdateFlags(_0x4ba41f){const _0x191c66=a41_0x57aa80,_0x232268=getRequestedVersion(_0x4ba41f),_0x346cf5=[_0x4ba41f[_0x191c66(0xbd)](_0x191c66(0xae))?_0x191c66(0xae):'',_0x4ba41f[_0x191c66(0xbd)](_0x191c66(0x87))?'beta':'',_0x232268?_0x191c66(0x8c):''][_0x191c66(0x7c)](Boolean);if(_0x346cf5[_0x191c66(0x79)]>0x1)throw CliErrors['validation'](_0x191c66(0x94),_0x191c66(0xa8));if(_0x232268&&!parseSemver(_0x232268))throw CliErrors[_0x191c66(0x81)](_0x191c66(0x9c)+_0x232268,_0x191c66(0x8a));}async function fetchNpmDistTags(){const _0x438556=a41_0x57aa80;try{const _0x3428ac=NPM_REGISTRY_BASE_URL+_0x438556(0xa9)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+'/dist-tags',_0x23687d=await fetch(_0x3428ac,{'signal':AbortSignal[_0x438556(0x78)](0x2710)});if(!_0x23687d['ok'])return null;const _0x581cc1=await _0x23687d[_0x438556(0x90)]();if(!_0x581cc1||typeof _0x581cc1!==_0x438556(0x84))return null;return Object[_0x438556(0x7f)](Object[_0x438556(0x83)](_0x581cc1)[_0x438556(0x7c)](([,_0x22d2ee])=>typeof _0x22d2ee===_0x438556(0xb7)&&_0x22d2ee[_0x438556(0x85)]())[_0x438556(0x91)](([_0xfda2a6,_0x506898])=>[_0xfda2a6,String(_0x506898)['trim']()]));}catch{return null;}}async function resolveTargetVersion(_0x239b97){const _0x4645bc=a41_0x57aa80,_0x50e5e8=getRequestedVersion(_0x239b97);if(_0x50e5e8)return{'version':_0x50e5e8,'source':'version'};const _0xfb0336=_0x239b97[_0x4645bc(0xbd)](_0x4645bc(0x87))?_0x4645bc(0x87):'latest',_0x13f570=await fetchNpmDistTags(),_0x1b3dcc=_0x13f570?.[_0xfb0336];if(!_0x1b3dcc)return null;return{'version':_0x1b3dcc,'source':_0xfb0336};}function shouldInstallTarget(_0x3f6d8f,_0x358638){const _0x1390b7=a41_0x57aa80,_0x4fe8b8=compareSemver(_0x3f6d8f,_0x358638[_0x1390b7(0x8c)]);if(_0x358638[_0x1390b7(0xa1)]===_0x1390b7(0x8c))return _0x4fe8b8!==0x0;return _0x4fe8b8<0x0;}function installCliPackage(_0x1a6628,_0x5eca0b){const _0x3d9bb2=a41_0x57aa80,_0x4666f4=resolveNpmBin(_0x3d9bb2(0xbe)),_0x115df9=[_0x3d9bb2(0x86),'-g',LOVRABET_NPM_PACKAGE_NAME+'@'+_0x1a6628];console['log']('*\x20'+[_0x4666f4,..._0x115df9][_0x3d9bb2(0xc0)]('\x20'));const _0x32454e=spawnSync(_0x4666f4,_0x115df9,{'cwd':process[_0x3d9bb2(0x8b)](),'stdio':_0x5eca0b?_0x3d9bb2(0x7b):_0x3d9bb2(0xa6),'env':process.env,'shell':![]});if(_0x32454e[_0x3d9bb2(0xaa)]===0x0)return{'ok':!![]};let _0x586b3a=_0x32454e[_0x3d9bb2(0x89)]?.[_0x3d9bb2(0x8e)]||'exit\x20'+(_0x32454e['status']??_0x3d9bb2(0xa2));if(_0x5eca0b){const _0x3cc926=_0x32454e[_0x3d9bb2(0x8f)]?_0x32454e['stderr'][_0x3d9bb2(0xb9)]()['trim']():'',_0x4d8ee2=_0x32454e[_0x3d9bb2(0xa3)]?_0x32454e[_0x3d9bb2(0xa3)]['toString']()['trim']():'';if(_0x3cc926)_0x586b3a=_0x3cc926;else{if(_0x4d8ee2)_0x586b3a=_0x4d8ee2;}}return{'ok':![],'error':_0x586b3a};}function a41_0x39a0(_0x2cd775,_0xcacde8){_0x2cd775=_0x2cd775-0x73;const _0x3c7d39=a41_0x3c7d();let _0x39a0bb=_0x3c7d39[_0x2cd775];return _0x39a0bb;}async function installCliBuiltInSkill(_0x11ba9c){const _0x219d83=a41_0x57aa80;console[_0x219d83(0xc4)](_0x219d83(0x97));const _0x35a133=runNpxSkillsAddGlobal(process['cwd'](),LOVRABET_SKILL_SOURCE,{'stdio':_0x11ba9c?_0x219d83(0x7b):_0x219d83(0xa6)});if(_0x35a133[_0x219d83(0xab)]){console[_0x219d83(0xc4)](_0x219d83(0xc3)+LOVRABET_SKIP_NPX_SKILLS_ENV+_0x219d83(0x82));return;}if(_0x35a133['ok']){console[_0x219d83(0xc4)](_0x219d83(0x92));return;}console['warn'](_0x219d83(0x98)+(_0x35a133[_0x219d83(0x89)]||_0x219d83(0xa2))),console[_0x219d83(0xc4)]('\x20\x20Run\x20manually:\x20lovrabet\x20cli-skill\x20install');}async function execute(_0x3ec9f0){const _0x1d0670=a41_0x57aa80;await validateUpdateFlags(_0x3ec9f0);const _0x50d881=getCliVersion();console['log'](_0x1d0670(0x96)+_0x50d881),console[_0x1d0670(0xc4)](_0x1d0670(0x95));const _0x208a25=await resolveTargetVersion(_0x3ec9f0);if(!_0x208a25){const _0x3d388a=_0x3ec9f0[_0x1d0670(0xbd)](_0x1d0670(0x87))?'beta':_0x1d0670(0xae),_0x22a25a=_0x1d0670(0x9b)+_0x3d388a+_0x1d0670(0x76);return console[_0x1d0670(0x9e)](_0x22a25a),console[_0x1d0670(0xc4)](_0x1d0670(0x7e)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x3d388a),{'ok':![]};}if(!shouldInstallTarget(_0x50d881,_0x208a25)){const _0x2752f1=_0x208a25[_0x1d0670(0xa1)]==='version'?_0x1d0670(0x9f)+_0x208a25[_0x1d0670(0x8c)]+').':'Already\x20up\x20to\x20date\x20(v'+_0x208a25[_0x1d0670(0x8c)]+').';return console[_0x1d0670(0xc4)](_0x2752f1),shouldSkipCliBuiltInSkill(_0x3ec9f0)?console[_0x1d0670(0xc4)](_0x1d0670(0x9d)):await installCliBuiltInSkill(_0x3ec9f0[_0x1d0670(0xa7)]),{'ok':!![]};}console[_0x1d0670(0xc4)]('Updating\x20'+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0x50d881+_0x1d0670(0xad)+_0x208a25[_0x1d0670(0x8c)]);const _0xd4ec5b=installCliPackage(_0x208a25[_0x1d0670(0x8c)],_0x3ec9f0['nonInteractive']);if(!_0xd4ec5b['ok']){const _0x243b1c='Update\x20failed:\x20'+(_0xd4ec5b[_0x1d0670(0x89)]||_0x1d0670(0xa2));return console['error'](_0x243b1c),console[_0x1d0670(0xc4)](_0x1d0670(0xb1)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x208a25['version']),{'ok':![]};}return console['log']('Updated\x20to\x20v'+_0x208a25[_0x1d0670(0x8c)]+'.'),console[_0x1d0670(0xc4)](_0x1d0670(0xc5)),shouldSkipCliBuiltInSkill(_0x3ec9f0)?console[_0x1d0670(0xc4)](_0x1d0670(0x9d)):await installCliBuiltInSkill(_0x3ec9f0['nonInteractive']),{'ok':!![]};}export const updateDefinition={'service':a41_0x57aa80(0xb0),'command':a41_0x57aa80(0xb8),'description':a41_0x57aa80(0xc1)+CLI_BIN_NAME+a41_0x57aa80(0x73),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a50_0x12c0e7=a50_0x334c;(function(_0x438830,_0x142ca8){const _0x2fc6cb=a50_0x334c,_0x2234da=_0x438830();while(!![]){try{const _0x3ff42c=parseInt(_0x2fc6cb(0x9e))/0x1*(parseInt(_0x2fc6cb(0xa2))/0x2)+-parseInt(_0x2fc6cb(0x91))/0x3+parseInt(_0x2fc6cb(0xaa))/0x4+-parseInt(_0x2fc6cb(0x96))/0x5*(-parseInt(_0x2fc6cb(0x85))/0x6)+parseInt(_0x2fc6cb(0x7a))/0x7*(-parseInt(_0x2fc6cb(0x90))/0x8)+parseInt(_0x2fc6cb(0x77))/0x9+-parseInt(_0x2fc6cb(0xa0))/0xa;if(_0x3ff42c===_0x142ca8)break;else _0x2234da['push'](_0x2234da['shift']());}catch(_0x34fcd6){_0x2234da['push'](_0x2234da['shift']());}}}(a50_0x3cea,0xc01e6));import{spawnSync}from'node:child_process';import{CliErrors}from'../errors.js';function a50_0x334c(_0x43883f,_0x2ecbe6){_0x43883f=_0x43883f-0x76;const _0x3ceaa3=a50_0x3cea();let _0x334c53=_0x3ceaa3[_0x43883f];return _0x334c53;}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';function a50_0x3cea(){const _0x409ac8=['264aaSzZR','\x20version\x20from\x20npm.','Update\x20','cwd','\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag','args','--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.','nonInteractive','skipped','11600JBYfxy','1951779lFiMhf','trim','status','boolean','Update\x20failed:\x20','178030WVcZXN','Current\x20version:\x20','warn','major','run','flag','no-skills','\x20->\x20','145567UPGZpb','source','15625910iPeArM','Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.','10XtTzoV','json','bool','Invalid\x20version:\x20','/dist-tags','minor','validation','pipe','1168908XYYecv','skills','Updated\x20to\x20v','patch','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','stderr','Version\x20comparison\x20failed.','write','\x20\x20Try\x20manually:\x20npm\x20install\x20-g\x20','\x20CLI\x20from\x20npm','prerelease','Already\x20up\x20to\x20date\x20(v','/-/package/','log','Updating\x20','string','length','version','error','=1).','toString','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','Checking\x20npm\x20dist-tags...','update','5429934XEkswS','latest','\x20\x20Run\x20manually:\x20lovrabet\x20cli-skill\x20install','917lMHESN','stdout','str','install','filter','npm','unknown','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','object','beta','join'];a50_0x3cea=function(){return _0x409ac8;};return a50_0x3cea();}import{LOVRABET_SKIP_NPX_SKILLS_ENV,runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';const updateFlags=[{'name':a50_0x12c0e7(0x78),'type':'boolean','description':a50_0x12c0e7(0x8b),'default':![]},{'name':a50_0x12c0e7(0x83),'type':a50_0x12c0e7(0x94),'description':'Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','default':![]},{'name':a50_0x12c0e7(0xbc),'type':a50_0x12c0e7(0xba),'description':'Install\x20a\x20specific\x20CLI\x20version'},{'name':a50_0x12c0e7(0x9c),'type':a50_0x12c0e7(0x94),'description':'Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','default':![]},{'name':a50_0x12c0e7(0xab),'type':a50_0x12c0e7(0x94),'description':'Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','default':!![],'hidden':!![]}];function parseSemver(_0x13e247){const _0x4bdd31=_0x13e247['trim']()['match'](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0x4bdd31)return null;return{'major':Number(_0x4bdd31[0x1]),'minor':Number(_0x4bdd31[0x2]),'patch':Number(_0x4bdd31[0x3]),'prerelease':_0x4bdd31[0x4]};}function compareSemver(_0x4fff22,_0x3a8a06){const _0x512e82=a50_0x12c0e7,_0xa661eb=parseSemver(_0x4fff22),_0x37a9bc=parseSemver(_0x3a8a06);if(!_0xa661eb||!_0x37a9bc)throw CliErrors[_0x512e82(0xa8)](_0x512e82(0xb1),'Use\x20full\x20semver\x20versions\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.');for(const _0x1f142c of[_0x512e82(0x99),_0x512e82(0xa7),_0x512e82(0xad)]){if(_0xa661eb[_0x1f142c]<_0x37a9bc[_0x1f142c])return-0x1;if(_0xa661eb[_0x1f142c]>_0x37a9bc[_0x1f142c])return 0x1;}if(!_0xa661eb[_0x512e82(0xb5)]&&!_0x37a9bc[_0x512e82(0xb5)])return 0x0;if(!_0xa661eb[_0x512e82(0xb5)])return 0x1;if(!_0x37a9bc['prerelease'])return-0x1;if(_0xa661eb['prerelease']===_0x37a9bc['prerelease'])return 0x0;return _0xa661eb[_0x512e82(0xb5)]<_0x37a9bc['prerelease']?-0x1:0x1;}function getRequestedVersion(_0x1aa92d){const _0x170697=a50_0x12c0e7,_0x29cc99=_0x1aa92d[_0x170697(0x7c)](_0x170697(0xbc))[_0x170697(0x92)]();if(_0x29cc99)return _0x29cc99;return String(_0x1aa92d[_0x170697(0x8c)]?.[0x0]??'')['trim']();}function shouldSkipCliBuiltInSkill(_0x18f637){const _0x1c257e=a50_0x12c0e7;return _0x18f637[_0x1c257e(0xa4)](_0x1c257e(0x9c))||_0x18f637[_0x1c257e(0x9b)](_0x1c257e(0xab))===![];}async function validateUpdateFlags(_0x49f7fb){const _0x42af7b=a50_0x12c0e7,_0x10fdf7=getRequestedVersion(_0x49f7fb),_0x31db61=[_0x49f7fb['bool'](_0x42af7b(0x78))?'latest':'',_0x49f7fb[_0x42af7b(0xa4)](_0x42af7b(0x83))?_0x42af7b(0x83):'',_0x10fdf7?'version':'']['filter'](Boolean);if(_0x31db61[_0x42af7b(0xbb)]>0x1)throw CliErrors[_0x42af7b(0xa8)](_0x42af7b(0x8d),'Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.');if(_0x10fdf7&&!parseSemver(_0x10fdf7))throw CliErrors[_0x42af7b(0xa8)](_0x42af7b(0xa5)+_0x10fdf7,_0x42af7b(0xa1));}async function fetchNpmDistTags(){const _0x36a7df=a50_0x12c0e7;try{const _0xf29f31=NPM_REGISTRY_BASE_URL+_0x36a7df(0xb7)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x36a7df(0xa6),_0x544468=await fetch(_0xf29f31,{'signal':AbortSignal['timeout'](0x2710)});if(!_0x544468['ok'])return null;const _0x3408f9=await _0x544468[_0x36a7df(0xa3)]();if(!_0x3408f9||typeof _0x3408f9!==_0x36a7df(0x82))return null;return Object['fromEntries'](Object['entries'](_0x3408f9)[_0x36a7df(0x7e)](([,_0x570ffa])=>typeof _0x570ffa==='string'&&_0x570ffa[_0x36a7df(0x92)]())['map'](([_0x25b7ec,_0x96e23d])=>[_0x25b7ec,String(_0x96e23d)[_0x36a7df(0x92)]()]));}catch{return null;}}async function resolveTargetVersion(_0x31a4a3){const _0x43e73a=a50_0x12c0e7,_0x49a0e3=getRequestedVersion(_0x31a4a3);if(_0x49a0e3)return{'version':_0x49a0e3,'source':'version'};const _0x49f42e=_0x31a4a3['bool'](_0x43e73a(0x83))?'beta':'latest',_0x46c828=await fetchNpmDistTags(),_0x27f37b=_0x46c828?.[_0x49f42e];if(!_0x27f37b)return null;return{'version':_0x27f37b,'source':_0x49f42e};}function shouldInstallTarget(_0x26d93b,_0x93ed57){const _0x3993e9=a50_0x12c0e7,_0x3d3288=compareSemver(_0x26d93b,_0x93ed57[_0x3993e9(0xbc)]);if(_0x93ed57[_0x3993e9(0x9f)]===_0x3993e9(0xbc))return _0x3d3288!==0x0;return _0x3d3288<0x0;}function installCliPackage(_0x75d4ad,_0x239390){const _0x56719a=a50_0x12c0e7,_0x477b05=resolveNpmBin(_0x56719a(0x7f)),_0x23b9cb=[_0x56719a(0x7d),'-g',LOVRABET_NPM_PACKAGE_NAME+'@'+_0x75d4ad];console[_0x56719a(0xb8)]('*\x20'+[_0x477b05,..._0x23b9cb][_0x56719a(0x84)]('\x20'));const _0x589a3f=spawnSync(_0x477b05,_0x23b9cb,{'cwd':process[_0x56719a(0x88)](),'stdio':_0x239390?_0x56719a(0xa9):'inherit','env':process.env,'shell':![]});if(_0x589a3f['status']===0x0)return{'ok':!![]};let _0x307a37=_0x589a3f[_0x56719a(0xbd)]?.['message']||'exit\x20'+(_0x589a3f[_0x56719a(0x93)]??'unknown');if(_0x239390){const _0x214704=_0x589a3f[_0x56719a(0xb0)]?_0x589a3f[_0x56719a(0xb0)][_0x56719a(0xbf)]()[_0x56719a(0x92)]():'',_0x25b4db=_0x589a3f['stdout']?_0x589a3f[_0x56719a(0x7b)][_0x56719a(0xbf)]()[_0x56719a(0x92)]():'';if(_0x214704)_0x307a37=_0x214704;else{if(_0x25b4db)_0x307a37=_0x25b4db;}}return{'ok':![],'error':_0x307a37};}async function installCliBuiltInSkill(_0x398ae3){const _0x1ad7fd=a50_0x12c0e7;console[_0x1ad7fd(0xb8)]('Checking\x20CLI\x20Built-in\x20Skill...');const _0x4d66cf=runNpxSkillsAddGlobal(process[_0x1ad7fd(0x88)](),LOVRABET_SKILL_SOURCE,{'stdio':_0x398ae3?_0x1ad7fd(0xa9):'inherit'});if(_0x4d66cf[_0x1ad7fd(0x8f)]){console[_0x1ad7fd(0xb8)](_0x1ad7fd(0x89)+LOVRABET_SKIP_NPX_SKILLS_ENV+_0x1ad7fd(0xbe));return;}if(_0x4d66cf['ok']){console['log'](_0x1ad7fd(0xae));return;}console[_0x1ad7fd(0x98)](_0x1ad7fd(0xc0)+(_0x4d66cf['error']||_0x1ad7fd(0x80))),console[_0x1ad7fd(0xb8)](_0x1ad7fd(0x79));}async function execute(_0x56837b){const _0xe3be1d=a50_0x12c0e7;await validateUpdateFlags(_0x56837b);const _0x390e04=getCliVersion();console['log'](_0xe3be1d(0x97)+_0x390e04),console[_0xe3be1d(0xb8)](_0xe3be1d(0xc1));const _0x54cb0d=await resolveTargetVersion(_0x56837b);if(!_0x54cb0d){const _0x41cff5=_0x56837b[_0xe3be1d(0xa4)](_0xe3be1d(0x83))?'beta':'latest',_0x4a4af0='Unable\x20to\x20resolve\x20'+_0x41cff5+_0xe3be1d(0x86);return console[_0xe3be1d(0x98)](_0x4a4af0),console['log'](_0xe3be1d(0x81)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x41cff5),{'ok':![]};}if(!shouldInstallTarget(_0x390e04,_0x54cb0d)){const _0x51f140=_0x54cb0d[_0xe3be1d(0x9f)]===_0xe3be1d(0xbc)?'Already\x20on\x20requested\x20version\x20(v'+_0x54cb0d['version']+').':_0xe3be1d(0xb6)+_0x54cb0d[_0xe3be1d(0xbc)]+').';return console[_0xe3be1d(0xb8)](_0x51f140),shouldSkipCliBuiltInSkill(_0x56837b)?console['log'](_0xe3be1d(0xaf)):await installCliBuiltInSkill(_0x56837b[_0xe3be1d(0x8e)]),{'ok':!![]};}console[_0xe3be1d(0xb8)](_0xe3be1d(0xb9)+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0x390e04+_0xe3be1d(0x9d)+_0x54cb0d[_0xe3be1d(0xbc)]);const _0x2c41e7=installCliPackage(_0x54cb0d[_0xe3be1d(0xbc)],_0x56837b[_0xe3be1d(0x8e)]);if(!_0x2c41e7['ok']){const _0x516a5a=_0xe3be1d(0x95)+(_0x2c41e7[_0xe3be1d(0xbd)]||_0xe3be1d(0x80));return console[_0xe3be1d(0xbd)](_0x516a5a),console[_0xe3be1d(0xb8)](_0xe3be1d(0xb3)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x54cb0d[_0xe3be1d(0xbc)]),{'ok':![]};}return console[_0xe3be1d(0xb8)](_0xe3be1d(0xac)+_0x54cb0d['version']+'.'),console[_0xe3be1d(0xb8)](_0xe3be1d(0x8a)),shouldSkipCliBuiltInSkill(_0x56837b)?console[_0xe3be1d(0xb8)](_0xe3be1d(0xaf)):await installCliBuiltInSkill(_0x56837b[_0xe3be1d(0x8e)]),{'ok':!![]};}export const updateDefinition={'service':a50_0x12c0e7(0x76),'command':a50_0x12c0e7(0x9a),'description':a50_0x12c0e7(0x87)+CLI_BIN_NAME+a50_0x12c0e7(0xb4),'risk':a50_0x12c0e7(0xb2),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a51_0x3cc762=a51_0xf1b5;(function(_0x22996c,_0x45b76e){const _0x67b1d9=a51_0xf1b5,_0x51547a=_0x22996c();while(!![]){try{const _0x10cd77=-parseInt(_0x67b1d9(0x145))/0x1*(parseInt(_0x67b1d9(0x12d))/0x2)+parseInt(_0x67b1d9(0x14e))/0x3*(parseInt(_0x67b1d9(0x14f))/0x4)+parseInt(_0x67b1d9(0x152))/0x5+-parseInt(_0x67b1d9(0x154))/0x6*(-parseInt(_0x67b1d9(0x13b))/0x7)+parseInt(_0x67b1d9(0x144))/0x8+-parseInt(_0x67b1d9(0x142))/0x9+-parseInt(_0x67b1d9(0x138))/0xa*(-parseInt(_0x67b1d9(0x125))/0xb);if(_0x10cd77===_0x45b76e)break;else _0x51547a['push'](_0x51547a['shift']());}catch(_0xeb00bf){_0x51547a['push'](_0x51547a['shift']());}}}(a51_0x6c15,0x4b376));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';function a51_0xf1b5(_0x74db98,_0x23dfc7){_0x74db98=_0x74db98-0x124;const _0x6c1521=a51_0x6c15();let _0xf1b56=_0x6c1521[_0x74db98];return _0xf1b56;}const WORKSPACE_USE_FLAGS=[{'name':'app','type':'string','description':a51_0x3cc762(0x141)},{'name':'appcode','type':a51_0x3cc762(0x128),'description':a51_0x3cc762(0x151)},{'name':'env','type':a51_0x3cc762(0x128),'description':'Target\x20environment','enum':[...RUNTIME_ENV_VALUES]},{'name':a51_0x3cc762(0x130),'type':a51_0x3cc762(0x12b),'description':a51_0x3cc762(0x13e),'default':![]}];async function executeWorkspaceUse(_0x2fbf10,_0x32bf51){const _0x52026d=a51_0x3cc762,_0x118acd=_0x2fbf10[_0x52026d(0x133)]('app')['trim'](),_0x3d70b8=_0x2fbf10[_0x52026d(0x133)](_0x52026d(0x13c))[_0x52026d(0x13d)](),_0x447749=_0x2fbf10[_0x52026d(0x133)](_0x52026d(0x136))['trim'](),_0x30707a=resolveWorkspaceEnv(_0x447749||_0x2fbf10['envName']||DEFAULT_CONFIG_VALUES['env']);if(!_0x118acd&&!_0x3d70b8)throw CliErrors['validation'](_0x52026d(0x153),_0x52026d(0x159)+CLI_BIN_NAME+'\x20workspace\x20'+_0x32bf51+_0x52026d(0x14a)+CLI_BIN_NAME+_0x52026d(0x14c)+_0x32bf51+_0x52026d(0x15d));const _0x284ad7=_0x3d70b8||await resolveRemoteAppCode({'command':_0x32bf51,'appName':_0x118acd,'env':_0x30707a,'accessKey':_0x2fbf10['accessKey']}),_0x67bab=writeWorkspaceConfig({'command':_0x32bf51,'appName':_0x118acd,'appcode':_0x284ad7,'env':_0x30707a,'shouldWriteEnv':!!_0x447749,'accessKey':_0x2fbf10[_0x52026d(0x12c)]});return{'ok':!![],'data':{'configPath':_0x67bab,'app':_0x118acd||null,'appcode':_0x284ad7,'env':_0x447749?_0x30707a:null,'accessKeyWritten':![],'command':_0x52026d(0x127)+_0x32bf51},'message':buildWorkspaceMessage(_0x67bab,_0x118acd,_0x284ad7,_0x447749?_0x30707a:undefined)};}async function resolveRemoteAppCode(_0x43768d){const _0x561d1e=a51_0x3cc762;if(!_0x43768d[_0x561d1e(0x12c)])throw CliErrors[_0x561d1e(0x135)](_0x561d1e(0x143)+CLI_BIN_NAME+'\x20workspace\x20'+_0x43768d['command']+'.');const {setActiveAK:_0x4ffde2}=await import(_0x561d1e(0x139)),{getRemoteAppList:_0x3b5a67}=await import(_0x561d1e(0x12f));_0x4ffde2(_0x43768d['accessKey']);const _0x38fb1b=await _0x3b5a67({'env':_0x43768d[_0x561d1e(0x136)],'accessKey':_0x43768d['accessKey'],'noCache':![]}),_0x5a0b80=findAppByName(_0x38fb1b['items'],_0x43768d[_0x561d1e(0x146)]);if(_0x5a0b80&&!isRuntimeAccessibleApp(_0x5a0b80))throw runtimeInaccessibleAppError(_0x5a0b80,'\x22'+_0x43768d[_0x561d1e(0x146)]+'\x22');const _0x566f1e=_0x5a0b80?.[_0x561d1e(0x13f)]?.[_0x561d1e(0x13d)]();if(_0x566f1e)return _0x566f1e;const _0xe71cbb=_0x38fb1b[_0x561d1e(0x157)]['map'](_0xc74173=>_0xc74173['appName'])['filter'](Boolean),_0x54ba9d=_0xe71cbb[_0x561d1e(0x15a)]?_0x561d1e(0x129)+Array[_0x561d1e(0x131)](new Set(_0xe71cbb))[_0x561d1e(0x15b)](',\x20')+'.':'Run\x20`'+CLI_BIN_NAME+_0x561d1e(0x140);throw CliErrors[_0x561d1e(0x158)]('App\x20\x22'+_0x43768d[_0x561d1e(0x146)]+'\x22\x20not\x20found.',_0x54ba9d);}function writeWorkspaceConfig(_0x34df44){const _0x52a875=a51_0x3cc762,_0x282a0f=resolveWriteConfigPath(_0x52a875(0x134)),_0x11acd4=readConfigFile(_0x282a0f);_0x34df44[_0x52a875(0x126)]&&(_0x11acd4[_0x52a875(0x136)]=_0x34df44[_0x52a875(0x136)]);if(_0x34df44[_0x52a875(0x146)]){const _0xd3f96=isRecord(_0x11acd4[_0x52a875(0x12e)])?{..._0x11acd4[_0x52a875(0x12e)]}:{},_0x2f2375=isRecord(_0xd3f96[_0x34df44[_0x52a875(0x146)]])?_0xd3f96[_0x34df44['appName']]:{};_0xd3f96[_0x34df44[_0x52a875(0x146)]]={..._0x2f2375,'appcode':_0x34df44['appcode']},_0x11acd4[_0x52a875(0x12e)]=_0xd3f96,_0x11acd4[_0x52a875(0x150)]=_0x34df44['appName'];if(_0x11acd4[_0x52a875(0x14b)])delete _0x11acd4['app'];return writeAndReturn(_0x282a0f,_0x11acd4);}_0x11acd4[_0x52a875(0x13c)]=_0x34df44[_0x52a875(0x13c)];if(_0x11acd4[_0x52a875(0x14b)])delete _0x11acd4['app'];return writeAndReturn(_0x282a0f,_0x11acd4);}function writeAndReturn(_0x53d1a4,_0x20f50d){return writeConfigFile(_0x53d1a4,_0x20f50d),_0x53d1a4;}function a51_0x6c15(){const _0x3b8937=['../../commands/app/remote-source.js','yes','from','\x22.\x20Allowed:\x20','str','project','authRequired','env','Set\x20app\x20context\x20for\x20the\x20current\x20workspace','3620pDVBVD','../../core/api-client.js','workspace','422891waqrkj','appcode','trim','Compatibility\x20flag;\x20workspace\x20config\x20updates\x20are\x20non-interactive','appCode','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20pass\x20--appcode\x20directly.','App\x20name\x20to\x20bind\x20as\x20the\x20current\x20workspace\x20default','4936248GyaSvi','Resolving\x20--app\x20requires\x20accessKey.\x20Pass\x20--appcode\x20directly,\x20or\x20set\x20accessKey\x20before\x20running\x20','4703680BSCszU','3QrHWDz','appName','\x0aDefault\x20app:\x20','includes','isArray','\x20--app\x20<name>\x20[--env\x20daily]\x20or\x20','app','\x20workspace\x20','\x0aEnv:\x20','3Gxgzpy','183584XyhlZS','defaultApp','App\x20code\x20to\x20bind\x20directly','357705MFPPcc','Missing\x20workspace\x20app\x20selector.','36oGOXaL','object','Invalid\x20env\x20\x22','items','validation','Usage:\x20','length','join','init','\x20--appcode\x20<code>\x20[--env\x20daily]','\x0aAccessKey:\x20not\x20written','9042QzKtHR','shouldWriteEnv','workspace\x20','string','Available\x20apps:\x20','write','boolean','accessKey','339254foRLXo','apps'];a51_0x6c15=function(){return _0x3b8937;};return a51_0x6c15();}function resolveWorkspaceEnv(_0x3c675f){const _0x53d3ff=a51_0x3cc762;if(RUNTIME_ENV_VALUES[_0x53d3ff(0x148)](_0x3c675f))return _0x3c675f;throw CliErrors[_0x53d3ff(0x158)](_0x53d3ff(0x156)+_0x3c675f+_0x53d3ff(0x132)+RUNTIME_ENV_VALUES[_0x53d3ff(0x15b)](',\x20'));}function buildWorkspaceMessage(_0x3d834b,_0xb16b8b,_0x338714,_0x364f09){const _0xa0215c=a51_0x3cc762,_0x4a60ad=_0xb16b8b?_0xb16b8b+'\x20('+_0x338714+')':_0x338714,_0x4c571b=_0x364f09?_0xa0215c(0x14d)+_0x364f09:'';return'Workspace\x20configured.\x0aConfig\x20file:\x20'+_0x3d834b+_0xa0215c(0x147)+_0x4a60ad+_0x4c571b+_0xa0215c(0x124);}function isRecord(_0x5415f6){const _0x21accf=a51_0x3cc762;return typeof _0x5415f6===_0x21accf(0x155)&&_0x5415f6!==null&&!Array[_0x21accf(0x149)](_0x5415f6);}function makeWorkspaceCommand(_0x541e9c){const _0x5a6063=a51_0x3cc762;return{'service':_0x5a6063(0x13a),'command':_0x541e9c,'description':_0x541e9c===_0x5a6063(0x15c)?'Initialize\x20app\x20context\x20for\x20the\x20current\x20workspace':_0x5a6063(0x137),'risk':_0x5a6063(0x12a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':WORKSPACE_USE_FLAGS,async 'execute'(_0x3fbedb){return executeWorkspaceUse(_0x3fbedb,_0x541e9c);}};}export const workspaceDefinitions=[makeWorkspaceCommand(a51_0x3cc762(0x15c)),makeWorkspaceCommand('use')];
|
package/lib/config/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a52_0x10b598=a52_0x2674;(function(_0x4a650d,_0x4e4b25){const _0x1d8b1e=a52_0x2674,_0x3fa6a4=_0x4a650d();while(!![]){try{const _0x5da04a=parseInt(_0x1d8b1e(0x100))/0x1*(parseInt(_0x1d8b1e(0x114))/0x2)+-parseInt(_0x1d8b1e(0x109))/0x3*(-parseInt(_0x1d8b1e(0x120))/0x4)+parseInt(_0x1d8b1e(0x106))/0x5+parseInt(_0x1d8b1e(0x110))/0x6*(parseInt(_0x1d8b1e(0x104))/0x7)+parseInt(_0x1d8b1e(0x11a))/0x8*(parseInt(_0x1d8b1e(0x102))/0x9)+parseInt(_0x1d8b1e(0x11c))/0xa*(-parseInt(_0x1d8b1e(0x11f))/0xb)+-parseInt(_0x1d8b1e(0x111))/0xc;if(_0x5da04a===_0x4e4b25)break;else _0x3fa6a4['push'](_0x3fa6a4['shift']());}catch(_0x10a34d){_0x3fa6a4['push'](_0x3fa6a4['shift']());}}}(a52_0x14fa,0xa75ce));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':a52_0x10b598(0x113),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':RUNTIME_ENV_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a52_0x10b598(0x10b)],'importable':!![]},'format':{'description':a52_0x10b598(0x11d),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':OUTPUT_FORMAT_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES['format'],'importable':!![]},'pageSize':{'description':a52_0x10b598(0x112),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'apiDomain':{'description':a52_0x10b598(0x117),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'userDomain':{'description':'Override\x20user\x20domain','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'runtimeDomain':{'description':a52_0x10b598(0x121),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'skillHubDomain':{'description':a52_0x10b598(0x10f),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'accessKey':{'description':a52_0x10b598(0x10a),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'riskLevel':{'description':a52_0x10b598(0x115),'topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a52_0x10b598(0x105)],'importable':!![]},'locale':{'description':'Locale','topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a52_0x10b598(0x122)],'importable':!![],'legacyCompatOnly':!![]}};export const TOP_LEVEL_CONFIG_KEYS=new Set(Object[a52_0x10b598(0x11b)](CONFIG_FIELD_SCHEMAS)[a52_0x10b598(0x116)](([,_0x37b855])=>_0x37b855[a52_0x10b598(0x103)])['map'](([_0x23d257])=>_0x23d257));export const CONFIG_ENUM_VALUES=Object[a52_0x10b598(0x119)](Object[a52_0x10b598(0x11b)](CONFIG_FIELD_SCHEMAS)[a52_0x10b598(0x116)](([,_0x5bc073])=>_0x5bc073[a52_0x10b598(0x108)])['map'](([_0x2fb8cf,_0x55942b])=>[_0x2fb8cf,[..._0x55942b[a52_0x10b598(0x108)]||[]]]));function a52_0x14fa(){const _0x37ba25=['Default\x20output\x20format','defaultValue','50347ObaejL','972doAPkW','Override\x20runtime\x20domain','locale','735217dfaUhC','importable','9mWtRpB','cliSettableTopLevel','105XjQxvx','riskLevel','917210zlhmjB','legacyCompatOnly','enumValues','753VZNdRK','Access\x20key\x20(client-ak\x20auth)','env','has','join','map','Override\x20SkillHub\x20domain','403620mrYINN','17983884QfdJPW','Default\x20page\x20size','Target\x20environment','2qIgqSk','Risk\x20level','filter','Override\x20API\x20domain','Config\x20key.\x20Top-level:\x20','fromEntries','2296104ExtLwH','entries','200ZMNxDD'];a52_0x14fa=function(){return _0x37ba25;};return a52_0x14fa();}export const IMPORTABLE_RUNTIME_CONFIG_KEYS=Object[a52_0x10b598(0x11b)](CONFIG_FIELD_SCHEMAS)[a52_0x10b598(0x116)](([,_0x2c0fe9])=>_0x2c0fe9[a52_0x10b598(0x101)])[a52_0x10b598(0x10e)](([_0x2d0f62])=>_0x2d0f62);export function getConfigFieldSchema(_0x1285e6){return CONFIG_FIELD_SCHEMAS[_0x1285e6];}export function getConfigEnumValues(_0x514134){const _0x4b290b=a52_0x10b598;return getConfigFieldSchema(_0x514134)?.[_0x4b290b(0x108)];}export function getConfigDefaultValue(_0x5da20e){const _0xf22cfd=a52_0x10b598;return getConfigFieldSchema(_0x5da20e)?.[_0xf22cfd(0x11e)];}function a52_0x2674(_0x51edc7,_0x497a5d){_0x51edc7=_0x51edc7-0x100;const _0x14fa6a=a52_0x14fa();let _0x267434=_0x14fa6a[_0x51edc7];return _0x267434;}export function isTopLevelConfigKey(_0x3490ae){const _0x911788=a52_0x10b598;return TOP_LEVEL_CONFIG_KEYS[_0x911788(0x10c)](_0x3490ae);}export function isLegacyCompatConfigKey(_0x5d5cee){const _0x59a76d=a52_0x10b598;return getConfigFieldSchema(_0x5d5cee)?.[_0x59a76d(0x107)]===!![];}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function formatConfigKeyList(_0x486599){const _0x4eb484=a52_0x10b598;return[..._0x486599][_0x4eb484(0x10d)](',\x20');}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x2ea80e=a52_0x10b598;return _0x2ea80e(0x118)+getTopLevelConfigKeySummary()+';\x20local\x20alias:\x20apps.<alias>.appcode';}export function buildAppProfileListFields(_0x4a29fe){return{'env':_0x4a29fe,'hasAccessKey':![],'format':null,'pageSize':null,'riskLevel':null,'locale':null};}
|
package/lib/constant/app.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a53_0x1937c9=a53_0x3cd1;(function(_0x36ac7e,_0x3ef4c3){const _0x2ee014=a53_0x3cd1,_0x1b7850=_0x36ac7e();while(!![]){try{const _0x2a6486=-parseInt(_0x2ee014(0x77))/0x1+-parseInt(_0x2ee014(0x6f))/0x2+parseInt(_0x2ee014(0x75))/0x3+-parseInt(_0x2ee014(0x74))/0x4+parseInt(_0x2ee014(0x72))/0x5+parseInt(_0x2ee014(0x71))/0x6*(parseInt(_0x2ee014(0x6e))/0x7)+parseInt(_0x2ee014(0x70))/0x8;if(_0x2a6486===_0x3ef4c3)break;else _0x1b7850['push'](_0x1b7850['shift']());}catch(_0x351ea5){_0x1b7850['push'](_0x1b7850['shift']());}}}(a53_0xcc27,0x613c6));function a53_0xcc27(){const _0x57caa1=['24nPTtAF','153975kPkklo','PUBLISHED','3142712nZUNhF','957393sJvgQe','UNPUBLISH','443080EJocTy','607201pXPRnY','444530FOgySn','9219224AyhDmK'];a53_0xcc27=function(){return _0x57caa1;};return a53_0xcc27();}function a53_0x3cd1(_0x476eed,_0x3d95ce){_0x476eed=_0x476eed-0x6e;const _0xcc276b=a53_0xcc27();let _0x3cd15e=_0xcc276b[_0x476eed];return _0x3cd15e;}export const APP_PUBLISH_STATUS={'Published':a53_0x1937c9(0x73),'Unpublished':a53_0x1937c9(0x76)};export const RUNTIME_ACCESSIBLE_APP_STATUS=APP_PUBLISH_STATUS['Published'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5124ac,_0x384806){const _0x375dd4=a54_0x1832,_0x2beb7c=_0x5124ac();while(!![]){try{const _0x5eb591=parseInt(_0x375dd4(0x74))/0x1+parseInt(_0x375dd4(0x77))/0x2*(-parseInt(_0x375dd4(0x72))/0x3)+parseInt(_0x375dd4(0x73))/0x4*(parseInt(_0x375dd4(0x70))/0x5)+-parseInt(_0x375dd4(0x6f))/0x6*(parseInt(_0x375dd4(0x71))/0x7)+parseInt(_0x375dd4(0x78))/0x8*(-parseInt(_0x375dd4(0x79))/0x9)+parseInt(_0x375dd4(0x75))/0xa+parseInt(_0x375dd4(0x76))/0xb;if(_0x5eb591===_0x384806)break;else _0x2beb7c['push'](_0x2beb7c['shift']());}catch(_0xd9bd54){_0x2beb7c['push'](_0x2beb7c['shift']());}}}(a54_0x4b43,0xac7f8));function a54_0x1832(_0x5079bb,_0xa1591f){_0x5079bb=_0x5079bb-0x6f;const _0x4b43aa=a54_0x4b43();let _0x183252=_0x4b43aa[_0x5079bb];return _0x183252;}function a54_0x4b43(){const _0xb23127=['998788YqzFoZ','16AqejEa','364617nqFjbq','78ZJiMMT','5KxqXBp','652841GwFwIn','6Rnronu','2383356wyrxVh','1059527HrCmwX','10376170QyeNpO','3363822QsgbET'];a54_0x4b43=function(){return _0xb23127;};return a54_0x4b43();}export const AUTH_MODE={'ClientAk':'client-ak'};export function isAuthMode(_0xdf60bc){return _0xdf60bc===AUTH_MODE['ClientAk'];}
|
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a55_0x240ebd=a55_0x5916;(function(_0x2110eb,_0x171513){const _0x1e9521=a55_0x5916,_0x269eb7=_0x2110eb();while(!![]){try{const _0x253b0f=parseInt(_0x1e9521(0x180))/0x1+parseInt(_0x1e9521(0x164))/0x2+parseInt(_0x1e9521(0x16a))/0x3+parseInt(_0x1e9521(0x171))/0x4+-parseInt(_0x1e9521(0x178))/0x5+-parseInt(_0x1e9521(0x160))/0x6*(parseInt(_0x1e9521(0x166))/0x7)+-parseInt(_0x1e9521(0x177))/0x8;if(_0x253b0f===_0x171513)break;else _0x269eb7['push'](_0x269eb7['shift']());}catch(_0x302826){_0x269eb7['push'](_0x269eb7['shift']());}}}(a55_0x4039,0x92bc6));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[a55_0x240ebd(0x173)];function a55_0x4039(){const _0x5a7404=['Use\x20global\x20config\x20scope','<code>','string','params','Force\x20non-interactive\x20mode\x20(CI)','2573400lLStet','map','cliDisplayName','dry-run','Record\x20ID','verbose','13845920gAaGfy','1104075mAyKGz','format','Skip\x20confirmation\x20for\x20high-risk\x20writes','appcode','name','json\x20|\x20pretty\x20|\x20compress','Clear\x20output','global','367067BcgoJO','Name\x20filter','help','clear','sqlcode','SQL\x20query\x20code','env','type','<expr>','6wMgXDk','app','meowKey','Environment','2333900rdGzaG','boolean','3742697IyunEL','Select\x20app\x20profile\x20by\x20name','non-interactive','yes','2729667flwbeC','nonInteractive'];a55_0x4039=function(){return _0x5a7404;};return a55_0x4039();}export const NPM_PACKAGE_NAME=LOVRABET_NPM_PACKAGE_NAME;export const GLOBAL_FLAGS=[{'name':a55_0x240ebd(0x17b),'meowKey':a55_0x240ebd(0x17b),'type':a55_0x240ebd(0x16e),'description':'Override\x20appcode','hint':a55_0x240ebd(0x16d)},{'name':a55_0x240ebd(0x161),'meowKey':'app','type':a55_0x240ebd(0x16e),'description':a55_0x240ebd(0x167),'hint':'<name>'},{'name':a55_0x240ebd(0x15d),'meowKey':'env','type':a55_0x240ebd(0x16e),'description':a55_0x240ebd(0x163),'hint':'production\x20|\x20development\x20|\x20daily'},{'name':a55_0x240ebd(0x179),'meowKey':a55_0x240ebd(0x179),'type':a55_0x240ebd(0x16e),'description':'Output\x20format','hint':a55_0x240ebd(0x17d)},{'name':'jq','meowKey':'jq','type':a55_0x240ebd(0x16e),'description':'Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20implies\x20--format\x20json\x20when\x20current\x20format\x20is\x20pretty)','hint':a55_0x240ebd(0x15f)},{'name':a55_0x240ebd(0x174),'meowKey':'dryRun','type':a55_0x240ebd(0x165),'description':'Preview\x20operation\x20without\x20executing'},{'name':a55_0x240ebd(0x169),'meowKey':a55_0x240ebd(0x169),'type':a55_0x240ebd(0x165),'description':a55_0x240ebd(0x17a)},{'name':a55_0x240ebd(0x168),'meowKey':a55_0x240ebd(0x16b),'type':a55_0x240ebd(0x165),'description':a55_0x240ebd(0x170)},{'name':'global','meowKey':a55_0x240ebd(0x17f),'type':a55_0x240ebd(0x165),'description':a55_0x240ebd(0x16c)},{'name':'ci','meowKey':'ci','type':'boolean','description':'Alias\x20for\x20--non-interactive','hidden':!![]},{'name':a55_0x240ebd(0x182),'meowKey':'help','type':a55_0x240ebd(0x165),'description':'Show\x20help'},{'name':'id','meowKey':'id','type':'string','description':a55_0x240ebd(0x175),'hidden':!![]},{'name':a55_0x240ebd(0x17c),'meowKey':'name','type':a55_0x240ebd(0x16e),'description':a55_0x240ebd(0x181),'hidden':!![]},{'name':a55_0x240ebd(0x15b),'meowKey':a55_0x240ebd(0x15b),'type':a55_0x240ebd(0x16e),'description':a55_0x240ebd(0x15c),'hidden':!![]},{'name':'params','meowKey':a55_0x240ebd(0x16f),'type':'string','description':'JSON\x20params\x20for\x20execute\x20commands','hidden':!![]},{'name':a55_0x240ebd(0x176),'meowKey':a55_0x240ebd(0x176),'type':a55_0x240ebd(0x165),'description':'Verbose\x20output','hidden':!![]},{'name':a55_0x240ebd(0x183),'meowKey':a55_0x240ebd(0x183),'type':a55_0x240ebd(0x165),'description':a55_0x240ebd(0x17e),'hidden':!![]}];function a55_0x5916(_0x42cc0e,_0x47520b){_0x42cc0e=_0x42cc0e-0x15b;const _0x4039e9=a55_0x4039();let _0x5916f5=_0x4039e9[_0x42cc0e];return _0x5916f5;}export const PIPELINE_FLAG_NAMES=new Set([a55_0x240ebd(0x17b),a55_0x240ebd(0x161),a55_0x240ebd(0x15d),a55_0x240ebd(0x179),'jq',a55_0x240ebd(0x174),a55_0x240ebd(0x169),a55_0x240ebd(0x168),'ci']);export function buildMeowFlags(){const _0x293a22=a55_0x240ebd;return Object['fromEntries'](GLOBAL_FLAGS[_0x293a22(0x172)](_0x284a77=>[_0x284a77[_0x293a22(0x162)],{'type':_0x284a77[_0x293a22(0x15e)]}]));}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a56_0x2b96c1=a56_0xb10b;(function(_0x2e4500,_0x3b1a99){const _0x5506b2=a56_0xb10b,_0x344218=_0x2e4500();while(!![]){try{const _0x5bbec8=-parseInt(_0x5506b2(0x86))/0x1+parseInt(_0x5506b2(0x89))/0x2+parseInt(_0x5506b2(0x85))/0x3*(-parseInt(_0x5506b2(0x8c))/0x4)+parseInt(_0x5506b2(0x8a))/0x5+parseInt(_0x5506b2(0x87))/0x6*(-parseInt(_0x5506b2(0x8b))/0x7)+parseInt(_0x5506b2(0x91))/0x8*(-parseInt(_0x5506b2(0x8d))/0x9)+parseInt(_0x5506b2(0x88))/0xa;if(_0x5bbec8===_0x3b1a99)break;else _0x344218['push'](_0x344218['shift']());}catch(_0x14cd8a){_0x344218['push'](_0x344218['shift']());}}}(a56_0x5ade,0x6e492));function a56_0xb10b(_0x1e9e4a,_0xc51754){_0x1e9e4a=_0x1e9e4a-0x85;const _0x5ade39=a56_0x5ade();let _0xb10b51=_0x5ade39[_0x1e9e4a];return _0xb10b51;}export const DEFAULT_APP_PROFILE_NAME=a56_0x2b96c1(0x92);export const DEFAULT_CONFIG_VALUES={'env':a56_0x2b96c1(0x8f),'format':a56_0x2b96c1(0x8e),'locale':'en-US','riskLevel':a56_0x2b96c1(0x90)};export const DEFAULT_COMMAND_OUTPUT_FORMAT=a56_0x2b96c1(0x8e);function a56_0x5ade(){const _0x4a698b=['production','write','123608pOkETY','main','1454199rbZSwD','270165VkyuAV','18MIgJYf','4629490ZiuMfU','1562790CJxPVo','2256890OrmWdj','456225tNLIiY','4GeidNm','171QmJUtt','compress'];a56_0x5ade=function(){return _0x4a698b;};return a56_0x5ade();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a57_0x1ba2cf=a57_0x2f28;function a57_0x4341(){const _0x191963=['7GfMaEC','1fzcDPE','5467280lPcopJ','npmPackageName','6239560XYrdqQ','11NgSvWc','106276mCtVhp','3402006McBVQY','10247184cnhBTY','402618Gqzxbm','2009802xsoNeL','45unztTo','9lWrVfb','skillSource'];a57_0x4341=function(){return _0x191963;};return a57_0x4341();}(function(_0x22dff4,_0xe9e894){const _0x5ad281=a57_0x2f28,_0x408c12=_0x22dff4();while(!![]){try{const _0x473796=-parseInt(_0x5ad281(0x1d3))/0x1*(parseInt(_0x5ad281(0x1db))/0x2)+parseInt(_0x5ad281(0x1dc))/0x3+-parseInt(_0x5ad281(0x1d8))/0x4*(parseInt(_0x5ad281(0x1dd))/0x5)+parseInt(_0x5ad281(0x1d9))/0x6*(parseInt(_0x5ad281(0x1d2))/0x7)+-parseInt(_0x5ad281(0x1d4))/0x8+parseInt(_0x5ad281(0x1de))/0x9*(-parseInt(_0x5ad281(0x1d6))/0xa)+-parseInt(_0x5ad281(0x1d7))/0xb*(-parseInt(_0x5ad281(0x1da))/0xc);if(_0x473796===_0xe9e894)break;else _0x408c12['push'](_0x408c12['shift']());}catch(_0x2a6f3f){_0x408c12['push'](_0x408c12['shift']());}}}(a57_0x4341,0x53c1f));import{PRODUCT_CONFIG}from'../constant/product.js';export const LOVRABET_NPM_PACKAGE_NAME=PRODUCT_CONFIG[a57_0x1ba2cf(0x1d5)];export const LOVRABET_SKILL_SOURCE=PRODUCT_CONFIG[a57_0x1ba2cf(0x1d1)];function a57_0x2f28(_0x543cce,_0x57bfcf){_0x543cce=_0x543cce-0x1d1;const _0x43416a=a57_0x4341();let _0x2f281b=_0x43416a[_0x543cce];return _0x2f281b;}export const NPM_REGISTRY_BASE_URL=PRODUCT_CONFIG['npmRegistryBaseUrl'];
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a58_0x20563c=a58_0x3da5;(function(_0x5ea947,_0x450d28){const _0x1718a7=a58_0x3da5,_0x5e70b9=_0x5ea947();while(!![]){try{const _0x8cd691=-parseInt(_0x1718a7(0xf9))/0x1*(-parseInt(_0x1718a7(0xef))/0x2)+-parseInt(_0x1718a7(0xff))/0x3+-parseInt(_0x1718a7(0xfe))/0x4+parseInt(_0x1718a7(0xf6))/0x5+parseInt(_0x1718a7(0xf5))/0x6*(-parseInt(_0x1718a7(0xec))/0x7)+parseInt(_0x1718a7(0xf8))/0x8*(parseInt(_0x1718a7(0xf0))/0x9)+parseInt(_0x1718a7(0xf3))/0xa*(parseInt(_0x1718a7(0xf2))/0xb);if(_0x8cd691===_0x450d28)break;else _0x5e70b9['push'](_0x5e70b9['shift']());}catch(_0x1bafd7){_0x5e70b9['push'](_0x5e70b9['shift']());}}}(a58_0x4dc9,0xbd404));function a58_0x3da5(_0x195d0c,_0x22d73f){_0x195d0c=_0x195d0c-0xeb;const _0x4dc907=a58_0x4dc9();let _0x3da5f5=_0x4dc907[_0x195d0c];return _0x3da5f5;}import{getEnv,isProduction}from'../constant/env.js';import{PRODUCT_CONFIG}from'../constant/product.js';let customApiDomain,customUserDomain,customRuntimeDomain,customSkillHubDomain;function a58_0x4dc9(){const _0x2489f8=['7096205XVcYon','skillHubDomain','96008fYwXuU','2XLbQok','api','nonProduction','userDomain','user','3961712hVCoru','3657684HnpyBJ','runtimeDomain','production','7mSkoVm','runtime','domains','60394wRXtRV','45njYdhg','apiDomain','891iIbkaV','362290bopRFg','skillhub','8936166gVOAwg'];a58_0x4dc9=function(){return _0x2489f8;};return a58_0x4dc9();}export function initDomains(_0x27dc85){const _0x54981f=a58_0x3da5;customApiDomain=_0x27dc85?.[_0x54981f(0xf1)],customUserDomain=_0x27dc85?.[_0x54981f(0xfc)],customRuntimeDomain=_0x27dc85?.[_0x54981f(0x100)],customSkillHubDomain=_0x27dc85?.[_0x54981f(0xf7)];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?PRODUCT_CONFIG['domains'][a58_0x20563c(0xeb)][a58_0x20563c(0xfd)]:PRODUCT_CONFIG['domains']['nonProduction']['user']);export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a58_0x20563c(0xee)][a58_0x20563c(0xeb)][a58_0x20563c(0xfa)]:PRODUCT_CONFIG[a58_0x20563c(0xee)]['nonProduction'][a58_0x20563c(0xfa)]);export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a58_0x20563c(0xee)][a58_0x20563c(0xeb)][a58_0x20563c(0xed)]:PRODUCT_CONFIG[a58_0x20563c(0xee)][a58_0x20563c(0xfb)][a58_0x20563c(0xed)]);export const getSkillHubDomain=()=>customSkillHubDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a58_0x20563c(0xee)][a58_0x20563c(0xeb)][a58_0x20563c(0xf4)]:PRODUCT_CONFIG[a58_0x20563c(0xee)][a58_0x20563c(0xfb)][a58_0x20563c(0xf4)]);
|