@lovrabet/lovrabet-cli 2.3.2-beta.3 → 2.3.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/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/approval/index.d.ts +15 -0
- package/lib/commands/approval/index.js +1 -0
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/permit/dataset-get.js +1 -1
- package/lib/commands/permit/dataset-set.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/schedule/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/function-name-adapter.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/diagram.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/diagram.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/user-account/bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/domain-config.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/region.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.d.ts +83 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/raw-flags.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/install-target.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/utils/access-key-redaction.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/positive-safe-integer.d.ts +5 -0
- package/lib/utils/positive-safe-integer.js +1 -0
- package/lib/utils/redaction.d.ts +17 -0
- package/lib/utils/redaction.js +1 -0
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/lovrabet/SKILL.md +3 -2
- package/skills/lovrabet/references/lovrabet-approval-workflow.md +73 -0
- package/skills/lovrabet.manifest.json +4 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const a80_0x4cbb5f=a80_0x29b4;(function(_0x5b8abf,_0x315665){const _0x3f39bb=a80_0x29b4,_0x3d91c1=_0x5b8abf();while(!![]){try{const _0x5c7b6f=-parseInt(_0x3f39bb(0xfa))/0x1*(-parseInt(_0x3f39bb(0xdb))/0x2)+-parseInt(_0x3f39bb(0xbe))/0x3*(-parseInt(_0x3f39bb(0x103))/0x4)+-parseInt(_0x3f39bb(0xdd))/0x5*(-parseInt(_0x3f39bb(0xdf))/0x6)+parseInt(_0x3f39bb(0xc1))/0x7+parseInt(_0x3f39bb(0x113))/0x8*(-parseInt(_0x3f39bb(0x10b))/0x9)+parseInt(_0x3f39bb(0xf6))/0xa+-parseInt(_0x3f39bb(0xdc))/0xb;if(_0x5c7b6f===_0x315665)break;else _0x3d91c1['push'](_0x3d91c1['shift']());}catch(_0x562947){_0x3d91c1['push'](_0x3d91c1['shift']());}}}(a80_0x2d85,0x8a5bc));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{resolve}from'node:path';import{parse as a80_0x4598a1}from'yaml';import{CliErrors}from'../../errors.js';import{fileText,scanSkillDirectory}from'../../skills/runtime-skill-sync/local-files.js';const SKILL_FILE=a80_0x4cbb5f(0xc9),SUPPORTED_SKILL_TYPES=new Set(['write','read']),TEXT_SKILL_FILE_PATTERN=/(?:^SKILL\.md$|\.(?:md|mdx|txt|json|ya?ml|js|mjs|cjs|ts|tsx|sh|sql))$/i;export function validateSkillDirectory(_0x5cf52a,_0x4c97cc={}){const _0x1234a9=a80_0x4cbb5f,_0x94c7fb=resolveSkillDirectoryRoot(_0x5cf52a),_0x8fd82f=[],_0x2cd855=loadRequiredSkillFile(_0x94c7fb,_0x8fd82f),_0x42065f=_0x2cd855?parseFrontmatter(_0x2cd855['content']):{'hasFrontmatter':![]};_0x2cd855&&validateFrontmatter(_0x2cd855['path'],_0x42065f,_0x8fd82f);validateRuntimeCliReferences(_0x94c7fb,_0x8fd82f);const _0xc058dc=_0x8fd82f['filter'](_0x41fd18=>_0x41fd18['level']==='error'),_0x393e49=_0x8fd82f['filter'](_0x577071=>_0x577071['level']===_0x1234a9(0xcd));return{'ok':_0xc058dc[_0x1234a9(0xbf)]===0x0,'dir':_0x94c7fb,'type':_0x42065f[_0x1234a9(0xee)],'errors':_0xc058dc,'warnings':_0x393e49};}function a80_0x29b4(_0x4cc8aa,_0x59ec8a){_0x4cc8aa=_0x4cc8aa-0xba;const _0x2d8594=a80_0x2d85();let _0x29b480=_0x2d8594[_0x4cc8aa];return _0x29b480;}function resolveSkillDirectoryRoot(_0x2c9842){const _0x494b2b=a80_0x4cbb5f,_0x23f406=resolve(_0x2c9842);if(!existsSync(_0x23f406))throw CliErrors[_0x494b2b(0xfe)](_0x494b2b(0xc8)+_0x2c9842);const _0x354d70=lstatSync(_0x23f406);if(_0x354d70[_0x494b2b(0xf3)]())return _0x23f406;if(_0x354d70[_0x494b2b(0xf4)]()){const _0x4bbc67=realpathSync(_0x23f406);if(lstatSync(_0x4bbc67)[_0x494b2b(0xf3)]())return _0x4bbc67;}throw CliErrors['validation'](_0x494b2b(0xc8)+_0x2c9842);}export function throwIfSkillValidationFailed(_0x368643,_0x15b45e=![]){const _0x4ab479=a80_0x4cbb5f;if(_0x368643['ok'])return;const _0x143818=_0x368643['errors'][_0x4ab479(0xbc)](_0x48ba5a=>{const _0x3c605b=_0x4ab479,_0x24226f=_0x48ba5a['section']?'#'+_0x48ba5a[_0x3c605b(0x104)]:'';return _0x48ba5a[_0x3c605b(0x108)]['toUpperCase']()+'\x20'+_0x48ba5a[_0x3c605b(0xe6)]+'\x20'+_0x48ba5a['file']+_0x24226f+':\x20'+_0x48ba5a['message']+_0x3c605b(0xfb)+_0x48ba5a[_0x3c605b(0x115)];});throw CliErrors[_0x4ab479(0xfe)]('Skill\x20validation\x20failed:\x0a'+_0x143818[_0x4ab479(0xf2)]('\x0a'),'Fix\x20the\x20Skill\x20metadata\x20before\x20running\x20skill\x20push.');}function loadRequiredSkillFile(_0x3ac448,_0x2186c6){const _0x40358b=a80_0x4cbb5f,_0x141c64=resolve(_0x3ac448,SKILL_FILE);if(!existsSync(_0x141c64))return _0x2186c6[_0x40358b(0xbb)](issue(_0x40358b(0x10e),_0x40358b(0xc3),SKILL_FILE,_0x40358b(0xf5),_0x40358b(0xf8))),undefined;const _0x2ba4cb=lstatSync(_0x141c64);if(_0x2ba4cb[_0x40358b(0xf4)]())return _0x2186c6[_0x40358b(0xbb)](issue(_0x40358b(0x10e),_0x40358b(0xc3),SKILL_FILE,_0x40358b(0x100),_0x40358b(0xe2))),undefined;if(!_0x2ba4cb[_0x40358b(0xca)]())return _0x2186c6['push'](issue(_0x40358b(0x10e),'structure-complete',SKILL_FILE,'SKILL.md\x20is\x20not\x20a\x20file.',_0x40358b(0xe9))),undefined;return{'path':SKILL_FILE,'content':readFileSync(_0x141c64,_0x40358b(0xe8))};}function validateFrontmatter(_0x346a93,_0x30f2e0,_0x430992){const _0x4bd5a4=a80_0x4cbb5f;if(!_0x30f2e0[_0x4bd5a4(0xe1)]){_0x430992['push'](issue(_0x4bd5a4(0x10e),_0x4bd5a4(0xe3),_0x346a93,_0x4bd5a4(0xd2),_0x4bd5a4(0xc6)));return;}!_0x30f2e0[_0x4bd5a4(0xff)]?.['trim']()&&_0x430992['push'](issue(_0x4bd5a4(0x10e),'frontmatter-required',_0x346a93,_0x4bd5a4(0xda),_0x4bd5a4(0xcf))),!_0x30f2e0['displayName']?.[_0x4bd5a4(0xde)]()&&_0x430992['push'](issue(_0x4bd5a4(0xcd),'display-name-recommended',_0x346a93,_0x4bd5a4(0xf7),_0x4bd5a4(0xc2))),!_0x30f2e0[_0x4bd5a4(0xed)]?.[_0x4bd5a4(0xde)]()&&_0x430992[_0x4bd5a4(0xbb)](issue(_0x4bd5a4(0xcd),_0x4bd5a4(0xe0),_0x346a93,_0x4bd5a4(0xeb),_0x4bd5a4(0xc4))),!_0x30f2e0['description']?.[_0x4bd5a4(0xde)]()&&_0x430992[_0x4bd5a4(0xbb)](issue('error',_0x4bd5a4(0xfc),_0x346a93,'Frontmatter\x20description\x20is\x20empty.',_0x4bd5a4(0xd0))),_0x30f2e0[_0x4bd5a4(0xc5)]===!![]&&_0x430992[_0x4bd5a4(0xbb)](issue(_0x4bd5a4(0x10e),_0x4bd5a4(0x101),_0x346a93,_0x4bd5a4(0xd8),_0x4bd5a4(0xe4))),_0x30f2e0[_0x4bd5a4(0xee)]?.[_0x4bd5a4(0xde)]()&&!SUPPORTED_SKILL_TYPES[_0x4bd5a4(0x105)](_0x30f2e0[_0x4bd5a4(0xee)])&&_0x430992['push'](issue('error',_0x4bd5a4(0xe3),_0x346a93,_0x4bd5a4(0xec),_0x4bd5a4(0xd9)));}function validateRuntimeCliReferences(_0x6f74ed,_0x227cda){const _0x20cc90=a80_0x4cbb5f;for(const _0x516aae of findRabetbaseCliInvocations(_0x6f74ed)){_0x227cda[_0x20cc90(0xbb)](issue('warning',_0x20cc90(0xea),_0x516aae[_0x20cc90(0xf0)],'This\x20line\x20invokes\x20the\x20rabetbase\x20CLI.\x20rabetbase\x20is\x20a\x20dev-time\x20tool;\x20runtime\x20Skills\x20should\x20drive\x20runtime\x20work\x20through\x20lovrabet\x20commands.',_0x20cc90(0x10c),'L'+_0x516aae[_0x20cc90(0xcb)]));}}function findRabetbaseCliInvocations(_0x43b6f0){const _0x57d886=a80_0x4cbb5f;return scanSkillDirectory(_0x43b6f0)['filter'](_0x45ff21=>TEXT_SKILL_FILE_PATTERN[_0x57d886(0xe7)](_0x45ff21[_0x57d886(0xbd)]))[_0x57d886(0x107)](_0x4d7223=>{const _0x12facd=_0x57d886,_0x1af923=fileText(_0x4d7223);return _0x1af923['split'](/\r?\n/)[_0x12facd(0xbc)]((_0x368c52,_0x2982bd)=>({'file':_0x4d7223['path'],'line':_0x2982bd+0x1,'text':_0x368c52}))['filter'](({text:_0x5c475a})=>isRabetbaseCliInvocation(_0x5c475a))[_0x12facd(0xbc)](({file:_0x235be2,line:_0x53f27b})=>({'file':_0x235be2,'line':_0x53f27b}));});}const RABETBASE_SUBCOMMANDS=['dataset',a80_0x4cbb5f(0x10d),a80_0x4cbb5f(0xce),a80_0x4cbb5f(0x106),a80_0x4cbb5f(0xef),a80_0x4cbb5f(0x112),a80_0x4cbb5f(0x10f),a80_0x4cbb5f(0xe5),'artifact','kb',a80_0x4cbb5f(0x114),a80_0x4cbb5f(0x111),a80_0x4cbb5f(0xcc),a80_0x4cbb5f(0xd5),'logs',a80_0x4cbb5f(0xf1)],RABETBASE_INVOCATION=new RegExp(String[a80_0x4cbb5f(0xd4)]`\brabetbase\s+(?:${RABETBASE_SUBCOMMANDS[a80_0x4cbb5f(0xf2)]('|')})\b`+String[a80_0x4cbb5f(0xd4)]`(?:\s+[a-z][\w-]*){0,2}\s+(?:--?[a-z]|[\w.-]+=)`,'i');function isRabetbaseCliInvocation(_0x1c10e6){const _0x200f47=a80_0x4cbb5f,_0x503ae7=_0x1c10e6[_0x200f47(0xd6)](/\brabetbase\b/i);if(_0x503ae7<0x0)return![];const _0x5e462c=_0x1c10e6[_0x200f47(0xc7)](_0x503ae7)[_0x200f47(0x109)](/\blovrabet\b/i)[0x0]??'';return RABETBASE_INVOCATION['test'](_0x5e462c);}function a80_0x2d85(){const _0x555d28=['isArray','3285uJaSBv','If\x20this\x20is\x20a\x20runtime\x20step,\x20replace\x20it\x20with\x20the\x20equivalent\x20lovrabet\x20command.\x20Dev-time\x20discovery\x20or\x20handoff\x20notes\x20can\x20stay.','sql','error','schema','match','workspace','app','1112MFWAul','config','suggestion','number','push','map','path','51312yBCwke','length','metadata','5041344mWKNcs','Set\x20displayName\x20to\x20the\x20human-readable\x20Skill\x20name\x20shown\x20in\x20SkillHub.','structure-complete','Set\x20example\x20to\x20one\x20short\x20user\x20message\x20that\x20can\x20directly\x20trigger\x20this\x20Skill.','internal','Add\x20frontmatter\x20with\x20name\x20and\x20description.','slice','Skill\x20directory\x20not\x20found:\x20','SKILL.md','isFile','line','data','warning','bff','Set\x20name\x20to\x20the\x20Skill\x20directory\x20code.','Describe\x20when\x20the\x20model\x20should\x20trigger\x20this\x20Skill,\x20plus\x20out-of-scope\x20boundaries\x20and\x20keywords.','displayName','SKILL.md\x20must\x20start\x20with\x20frontmatter.','string','raw','auth','search','object','metadata.internal=true\x20Skills\x20cannot\x20be\x20uploaded.','Set\x20metadata.type\x20to\x20write\x20or\x20read.','Frontmatter\x20name\x20is\x20missing.','2xRDtJE','25748272YfmYow','5sSmEXq','trim','6086706OfrGTB','example-recommended','hasFrontmatter','Replace\x20the\x20symlink\x20with\x20a\x20regular\x20SKILL.md\x20file\x20inside\x20the\x20Skill\x20directory.','frontmatter-required','Remove\x20metadata.internal\x20or\x20set\x20it\x20to\x20false\x20before\x20running\x20skill\x20push.','service','ruleId','test','utf8','Add\x20SKILL.md\x20as\x20a\x20regular\x20file\x20at\x20the\x20Skill\x20directory\x20root.','rabetbase-cli-reference','Frontmatter\x20example\x20is\x20missing.','metadata.type\x20must\x20be\x20one\x20of\x20write\x20or\x20read.','example','type','project','file','registry','join','isDirectory','isSymbolicLink','Missing\x20SKILL.md.','4199700FrGhkx','Frontmatter\x20displayName\x20is\x20missing.','Add\x20SKILL.md\x20at\x20the\x20Skill\x20directory\x20root.','description','102326pXRTfz','\x20Fix:\x20','description-required','boolean','validation','name','SKILL.md\x20must\x20be\x20a\x20regular\x20file.','internal-skill','false','164pzbZkV','section','has','page','flatMap','level','split'];a80_0x2d85=function(){return _0x555d28;};return a80_0x2d85();}function parseFrontmatter(_0x223a7e){const _0x3f3a37=a80_0x4cbb5f,_0x9c9325=_0x223a7e[_0x3f3a37(0x110)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x9c9325)return{'hasFrontmatter':![]};const _0x282520=_0x9c9325[0x1]??'',_0x24419e={'hasFrontmatter':!![]};let _0x4fd62b;try{_0x4fd62b=a80_0x4598a1(_0x282520);}catch{return _0x24419e;}const _0x3119bf=asRecord(_0x4fd62b);if(!_0x3119bf)return _0x24419e;_0x24419e[_0x3f3a37(0xff)]=scalarToString(_0x3119bf[_0x3f3a37(0xff)]),_0x24419e[_0x3f3a37(0xd1)]=scalarToString(_0x3119bf[_0x3f3a37(0xd1)]),_0x24419e['description']=scalarToString(_0x3119bf[_0x3f3a37(0xf9)]),_0x24419e[_0x3f3a37(0xed)]=scalarToString(_0x3119bf['example']);const _0x52f229=asRecord(_0x3119bf[_0x3f3a37(0xc0)]);return _0x52f229&&(_0x24419e[_0x3f3a37(0xee)]=scalarToString(_0x52f229[_0x3f3a37(0xee)]),_0x24419e[_0x3f3a37(0xc5)]=scalarToBoolean(_0x52f229['internal'])),_0x24419e;}function asRecord(_0x3334e1){const _0x5cf559=a80_0x4cbb5f;if(_0x3334e1&&typeof _0x3334e1===_0x5cf559(0xd7)&&!Array[_0x5cf559(0x10a)](_0x3334e1))return _0x3334e1;return undefined;}function scalarToString(_0x5998e3){const _0x22bf9f=a80_0x4cbb5f;if(typeof _0x5998e3===_0x22bf9f(0xd3))return _0x5998e3['trim']();if(typeof _0x5998e3===_0x22bf9f(0xba)||typeof _0x5998e3==='boolean')return String(_0x5998e3);return undefined;}function scalarToBoolean(_0x1147dc){const _0x466acc=a80_0x4cbb5f;if(typeof _0x1147dc===_0x466acc(0xfd))return _0x1147dc;if(typeof _0x1147dc===_0x466acc(0xd3))return cleanBoolean(_0x1147dc);return undefined;}function cleanBoolean(_0x7dd7eb){const _0x3200f3=a80_0x4cbb5f,_0x4f2c57=_0x7dd7eb[_0x3200f3(0xde)]()['toLowerCase']();if(_0x4f2c57==='true')return!![];if(_0x4f2c57===_0x3200f3(0x102))return![];return undefined;}function issue(_0x148ccf,_0x22a153,_0x154c15,_0x2fd8c8,_0x330013,_0x329ffc){return{'level':_0x148ccf,'ruleId':_0x22a153,'file':_0x154c15,'section':_0x329ffc,'message':_0x2fd8c8,'suggestion':_0x330013};}
|
|
1
|
+
const a81_0x12b5b6=a81_0xffbf;(function(_0x552ebb,_0x35f6b7){const _0x44cca6=a81_0xffbf,_0xc61fec=_0x552ebb();while(!![]){try{const _0x1e4633=-parseInt(_0x44cca6(0x1d2))/0x1+-parseInt(_0x44cca6(0x1dd))/0x2+parseInt(_0x44cca6(0x200))/0x3+parseInt(_0x44cca6(0x206))/0x4*(parseInt(_0x44cca6(0x1c3))/0x5)+-parseInt(_0x44cca6(0x1e2))/0x6*(-parseInt(_0x44cca6(0x1f0))/0x7)+parseInt(_0x44cca6(0x20f))/0x8+-parseInt(_0x44cca6(0x1bb))/0x9*(parseInt(_0x44cca6(0x1f4))/0xa);if(_0x1e4633===_0x35f6b7)break;else _0xc61fec['push'](_0xc61fec['shift']());}catch(_0x45f295){_0xc61fec['push'](_0xc61fec['shift']());}}}(a81_0x2893,0xb6e19));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{resolve}from'node:path';import{parse as a81_0x23f495}from'yaml';import{CliErrors}from'../../errors.js';import{fileText,scanSkillDirectory}from'../../skills/runtime-skill-sync/local-files.js';function a81_0x2893(){const _0x29d97a=['SKILL.md\x20must\x20start\x20with\x20frontmatter.','Set\x20name\x20to\x20the\x20Skill\x20directory\x20code.','join','false','Add\x20SKILL.md\x20as\x20a\x20regular\x20file\x20at\x20the\x20Skill\x20directory\x20root.','2182648mZAXxD','description-required','name','path','map','test','true','has','isDirectory','warning','isArray','27EzJxXy','Set\x20example\x20to\x20one\x20short\x20user\x20message\x20that\x20can\x20directly\x20trigger\x20this\x20Skill.','write','slice','metadata.type\x20must\x20be\x20one\x20of\x20write\x20or\x20read.','push','workspace','registry','5doyVZp','validation','Skill\x20validation\x20failed:\x0a','app','Set\x20displayName\x20to\x20the\x20human-readable\x20Skill\x20name\x20shown\x20in\x20SkillHub.','type','Add\x20frontmatter\x20with\x20name\x20and\x20description.','internal','section','raw','structure-complete','number','boolean','Describe\x20when\x20the\x20model\x20should\x20trigger\x20this\x20Skill,\x20plus\x20out-of-scope\x20boundaries\x20and\x20keywords.','Frontmatter\x20example\x20is\x20missing.','603999nokEty','Add\x20SKILL.md\x20at\x20the\x20Skill\x20directory\x20root.','line','level','string','Skill\x20directory\x20not\x20found:\x20','Frontmatter\x20displayName\x20is\x20missing.','example','flatMap','Frontmatter\x20name\x20is\x20missing.','metadata','2279710kblrXQ','message','SKILL.md\x20must\x20be\x20a\x20regular\x20file.','config','metadata.internal=true\x20Skills\x20cannot\x20be\x20uploaded.','5358WbfajV','length','dataset','Replace\x20the\x20symlink\x20with\x20a\x20regular\x20SKILL.md\x20file\x20inside\x20the\x20Skill\x20directory.','filter','SKILL.md\x20is\x20not\x20a\x20file.','Fix\x20the\x20Skill\x20metadata\x20before\x20running\x20skill\x20push.','SKILL.md','internal-skill','page','hasFrontmatter','example-recommended','frontmatter-required','sql','5908byOUUh','split','Missing\x20SKILL.md.','utf8','1058230LovsRo','errors','data','\x20Fix:\x20','description','toLowerCase','Frontmatter\x20description\x20is\x20empty.','ruleId','match','suggestion','displayName','rabetbase-cli-reference','1406820KROTac','trim','Set\x20metadata.type\x20to\x20write\x20or\x20read.','error','schema','search','5259764aJmhwg','read','artifact','isSymbolicLink'];a81_0x2893=function(){return _0x29d97a;};return a81_0x2893();}const SKILL_FILE=a81_0x12b5b6(0x1e9),SUPPORTED_SKILL_TYPES=new Set([a81_0x12b5b6(0x1bd),a81_0x12b5b6(0x207)]),TEXT_SKILL_FILE_PATTERN=/(?:^SKILL\.md$|\.(?:md|mdx|txt|json|ya?ml|js|mjs|cjs|ts|tsx|sh|sql))$/i;export function validateSkillDirectory(_0x193229,_0x1955df={}){const _0x212345=a81_0x12b5b6,_0x5d5000=resolveSkillDirectoryRoot(_0x193229),_0x36c0cf=[],_0x51cc71=loadRequiredSkillFile(_0x5d5000,_0x36c0cf),_0x2c0ed9=_0x51cc71?parseFrontmatter(_0x51cc71['content']):{'hasFrontmatter':![]};_0x51cc71&&validateFrontmatter(_0x51cc71['path'],_0x2c0ed9,_0x36c0cf);validateRuntimeCliReferences(_0x5d5000,_0x36c0cf);const _0x51c447=_0x36c0cf[_0x212345(0x1e6)](_0x1f2418=>_0x1f2418[_0x212345(0x1d5)]==='error'),_0x2336dc=_0x36c0cf['filter'](_0x5309c1=>_0x5309c1['level']===_0x212345(0x218));return{'ok':_0x51c447[_0x212345(0x1e3)]===0x0,'dir':_0x5d5000,'type':_0x2c0ed9[_0x212345(0x1c8)],'errors':_0x51c447,'warnings':_0x2336dc};}function a81_0xffbf(_0x5027f3,_0x127982){_0x5027f3=_0x5027f3-0x1ba;const _0x2893a0=a81_0x2893();let _0xffbf84=_0x2893a0[_0x5027f3];return _0xffbf84;}function resolveSkillDirectoryRoot(_0x3f2cf3){const _0x2f6766=a81_0x12b5b6,_0x5867e9=resolve(_0x3f2cf3);if(!existsSync(_0x5867e9))throw CliErrors[_0x2f6766(0x1c4)]('Skill\x20directory\x20not\x20found:\x20'+_0x3f2cf3);const _0x52967f=lstatSync(_0x5867e9);if(_0x52967f[_0x2f6766(0x217)]())return _0x5867e9;if(_0x52967f[_0x2f6766(0x209)]()){const _0x44eb14=realpathSync(_0x5867e9);if(lstatSync(_0x44eb14)[_0x2f6766(0x217)]())return _0x44eb14;}throw CliErrors[_0x2f6766(0x1c4)](_0x2f6766(0x1d7)+_0x3f2cf3);}export function throwIfSkillValidationFailed(_0x421c66,_0x52930b=![]){const _0xba004e=a81_0x12b5b6;if(_0x421c66['ok'])return;const _0x556990=_0x421c66[_0xba004e(0x1f5)][_0xba004e(0x213)](_0x278189=>{const _0x2ad7dc=_0xba004e,_0x57de12=_0x278189[_0x2ad7dc(0x1cb)]?'#'+_0x278189[_0x2ad7dc(0x1cb)]:'';return _0x278189['level']['toUpperCase']()+'\x20'+_0x278189[_0x2ad7dc(0x1fb)]+'\x20'+_0x278189['file']+_0x57de12+':\x20'+_0x278189[_0x2ad7dc(0x1de)]+_0x2ad7dc(0x1f7)+_0x278189[_0x2ad7dc(0x1fd)];});throw CliErrors['validation'](_0xba004e(0x1c5)+_0x556990[_0xba004e(0x20c)]('\x0a'),_0xba004e(0x1e8));}function loadRequiredSkillFile(_0x47b896,_0x275a80){const _0x5cc86f=a81_0x12b5b6,_0x44889e=resolve(_0x47b896,SKILL_FILE);if(!existsSync(_0x44889e))return _0x275a80[_0x5cc86f(0x1c0)](issue('error',_0x5cc86f(0x1cd),SKILL_FILE,_0x5cc86f(0x1f2),_0x5cc86f(0x1d3))),undefined;const _0x48c6f7=lstatSync(_0x44889e);if(_0x48c6f7[_0x5cc86f(0x209)]())return _0x275a80['push'](issue('error',_0x5cc86f(0x1cd),SKILL_FILE,_0x5cc86f(0x1df),_0x5cc86f(0x1e5))),undefined;if(!_0x48c6f7['isFile']())return _0x275a80[_0x5cc86f(0x1c0)](issue(_0x5cc86f(0x203),_0x5cc86f(0x1cd),SKILL_FILE,_0x5cc86f(0x1e7),_0x5cc86f(0x20e))),undefined;return{'path':SKILL_FILE,'content':readFileSync(_0x44889e,_0x5cc86f(0x1f3))};}function validateFrontmatter(_0xbea49e,_0x9ae717,_0xafa8fb){const _0x32dc35=a81_0x12b5b6;if(!_0x9ae717[_0x32dc35(0x1ec)]){_0xafa8fb[_0x32dc35(0x1c0)](issue(_0x32dc35(0x203),_0x32dc35(0x1ee),_0xbea49e,_0x32dc35(0x20a),_0x32dc35(0x1c9)));return;}!_0x9ae717[_0x32dc35(0x211)]?.[_0x32dc35(0x201)]()&&_0xafa8fb[_0x32dc35(0x1c0)](issue(_0x32dc35(0x203),_0x32dc35(0x1ee),_0xbea49e,_0x32dc35(0x1db),_0x32dc35(0x20b))),!_0x9ae717[_0x32dc35(0x1fe)]?.[_0x32dc35(0x201)]()&&_0xafa8fb[_0x32dc35(0x1c0)](issue(_0x32dc35(0x218),'display-name-recommended',_0xbea49e,_0x32dc35(0x1d8),_0x32dc35(0x1c7))),!_0x9ae717[_0x32dc35(0x1d9)]?.[_0x32dc35(0x201)]()&&_0xafa8fb['push'](issue(_0x32dc35(0x218),_0x32dc35(0x1ed),_0xbea49e,_0x32dc35(0x1d1),_0x32dc35(0x1bc))),!_0x9ae717[_0x32dc35(0x1f8)]?.[_0x32dc35(0x201)]()&&_0xafa8fb[_0x32dc35(0x1c0)](issue('error',_0x32dc35(0x210),_0xbea49e,_0x32dc35(0x1fa),_0x32dc35(0x1d0))),_0x9ae717[_0x32dc35(0x1ca)]===!![]&&_0xafa8fb[_0x32dc35(0x1c0)](issue(_0x32dc35(0x203),_0x32dc35(0x1ea),_0xbea49e,_0x32dc35(0x1e1),'Remove\x20metadata.internal\x20or\x20set\x20it\x20to\x20false\x20before\x20running\x20skill\x20push.')),_0x9ae717['type']?.[_0x32dc35(0x201)]()&&!SUPPORTED_SKILL_TYPES[_0x32dc35(0x216)](_0x9ae717[_0x32dc35(0x1c8)])&&_0xafa8fb[_0x32dc35(0x1c0)](issue(_0x32dc35(0x203),_0x32dc35(0x1ee),_0xbea49e,_0x32dc35(0x1bf),_0x32dc35(0x202)));}function validateRuntimeCliReferences(_0x480904,_0x272e42){const _0x2f8a41=a81_0x12b5b6;for(const _0x823801 of findRabetbaseCliInvocations(_0x480904)){_0x272e42[_0x2f8a41(0x1c0)](issue(_0x2f8a41(0x218),_0x2f8a41(0x1ff),_0x823801['file'],'This\x20line\x20invokes\x20the\x20rabetbase\x20CLI.\x20rabetbase\x20is\x20a\x20dev-time\x20tool;\x20runtime\x20Skills\x20should\x20drive\x20runtime\x20work\x20through\x20lovrabet\x20commands.','If\x20this\x20is\x20a\x20runtime\x20step,\x20replace\x20it\x20with\x20the\x20equivalent\x20lovrabet\x20command.\x20Dev-time\x20discovery\x20or\x20handoff\x20notes\x20can\x20stay.','L'+_0x823801[_0x2f8a41(0x1d4)]));}}function findRabetbaseCliInvocations(_0x406768){const _0x11fbe0=a81_0x12b5b6;return scanSkillDirectory(_0x406768)[_0x11fbe0(0x1e6)](_0x44ed3a=>TEXT_SKILL_FILE_PATTERN[_0x11fbe0(0x214)](_0x44ed3a[_0x11fbe0(0x212)]))[_0x11fbe0(0x1da)](_0x2872a6=>{const _0x35a2ba=_0x11fbe0,_0x3f69cd=fileText(_0x2872a6);return _0x3f69cd['split'](/\r?\n/)[_0x35a2ba(0x213)]((_0x38301f,_0x2e230a)=>({'file':_0x2872a6[_0x35a2ba(0x212)],'line':_0x2e230a+0x1,'text':_0x38301f}))[_0x35a2ba(0x1e6)](({text:_0x522509})=>isRabetbaseCliInvocation(_0x522509))[_0x35a2ba(0x213)](({file:_0x5481e5,line:_0x2b52d0})=>({'file':_0x5481e5,'line':_0x2b52d0}));});}const RABETBASE_SUBCOMMANDS=[a81_0x12b5b6(0x1e4),a81_0x12b5b6(0x1ef),'bff',a81_0x12b5b6(0x1eb),'project',a81_0x12b5b6(0x1c6),a81_0x12b5b6(0x204),'service',a81_0x12b5b6(0x208),'kb',a81_0x12b5b6(0x1e0),a81_0x12b5b6(0x1c1),a81_0x12b5b6(0x1f6),'auth','logs',a81_0x12b5b6(0x1c2)],RABETBASE_INVOCATION=new RegExp(String['raw']`\brabetbase\s+(?:${RABETBASE_SUBCOMMANDS[a81_0x12b5b6(0x20c)]('|')})\b`+String[a81_0x12b5b6(0x1cc)]`(?:\s+[a-z][\w-]*){0,2}\s+(?:--?[a-z]|[\w.-]+=)`,'i');function isRabetbaseCliInvocation(_0x493a27){const _0x2bd778=a81_0x12b5b6,_0xcf908=_0x493a27[_0x2bd778(0x205)](/\brabetbase\b/i);if(_0xcf908<0x0)return![];const _0x87daec=_0x493a27[_0x2bd778(0x1be)](_0xcf908)[_0x2bd778(0x1f1)](/\blovrabet\b/i)[0x0]??'';return RABETBASE_INVOCATION[_0x2bd778(0x214)](_0x87daec);}function parseFrontmatter(_0x4b1555){const _0x1cd4f0=a81_0x12b5b6,_0x13815e=_0x4b1555[_0x1cd4f0(0x1fc)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x13815e)return{'hasFrontmatter':![]};const _0x14ef2d=_0x13815e[0x1]??'',_0x587b06={'hasFrontmatter':!![]};let _0x1cbc8d;try{_0x1cbc8d=a81_0x23f495(_0x14ef2d);}catch{return _0x587b06;}const _0x28727e=asRecord(_0x1cbc8d);if(!_0x28727e)return _0x587b06;_0x587b06['name']=scalarToString(_0x28727e[_0x1cd4f0(0x211)]),_0x587b06[_0x1cd4f0(0x1fe)]=scalarToString(_0x28727e[_0x1cd4f0(0x1fe)]),_0x587b06['description']=scalarToString(_0x28727e[_0x1cd4f0(0x1f8)]),_0x587b06[_0x1cd4f0(0x1d9)]=scalarToString(_0x28727e['example']);const _0x13477d=asRecord(_0x28727e[_0x1cd4f0(0x1dc)]);return _0x13477d&&(_0x587b06['type']=scalarToString(_0x13477d[_0x1cd4f0(0x1c8)]),_0x587b06[_0x1cd4f0(0x1ca)]=scalarToBoolean(_0x13477d['internal'])),_0x587b06;}function asRecord(_0x5147a8){const _0x3cdcd0=a81_0x12b5b6;if(_0x5147a8&&typeof _0x5147a8==='object'&&!Array[_0x3cdcd0(0x1ba)](_0x5147a8))return _0x5147a8;return undefined;}function scalarToString(_0x104fac){const _0x383602=a81_0x12b5b6;if(typeof _0x104fac==='string')return _0x104fac['trim']();if(typeof _0x104fac===_0x383602(0x1ce)||typeof _0x104fac===_0x383602(0x1cf))return String(_0x104fac);return undefined;}function scalarToBoolean(_0x15794e){const _0x3662e5=a81_0x12b5b6;if(typeof _0x15794e==='boolean')return _0x15794e;if(typeof _0x15794e===_0x3662e5(0x1d6))return cleanBoolean(_0x15794e);return undefined;}function cleanBoolean(_0x50e287){const _0x301ef9=a81_0x12b5b6,_0x538a6f=_0x50e287[_0x301ef9(0x201)]()[_0x301ef9(0x1f9)]();if(_0x538a6f===_0x301ef9(0x215))return!![];if(_0x538a6f===_0x301ef9(0x20d))return![];return undefined;}function issue(_0x20a540,_0x4efdbc,_0xa2ca52,_0x5e25e7,_0xae74ba,_0x3b48bc){return{'level':_0x20a540,'ruleId':_0x4efdbc,'file':_0xa2ca52,'section':_0x3b48bc,'message':_0x5e25e7,'suggestion':_0xae74ba};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a82_0x55e12f=a82_0x5712;function a82_0x5712(_0x4fd0dc,_0x224ba9){_0x4fd0dc=_0x4fd0dc-0x1b1;const _0x3fa8bd=a82_0x3fa8();let _0x57129a=_0x3fa8bd[_0x4fd0dc];return _0x57129a;}(function(_0x1465f2,_0x353cfc){const _0x4bab59=a82_0x5712,_0x24a3a4=_0x1465f2();while(!![]){try{const _0xcb042c=-parseInt(_0x4bab59(0x1b7))/0x1+parseInt(_0x4bab59(0x1bc))/0x2+-parseInt(_0x4bab59(0x1b8))/0x3*(parseInt(_0x4bab59(0x1c1))/0x4)+-parseInt(_0x4bab59(0x1b5))/0x5+-parseInt(_0x4bab59(0x1b2))/0x6+parseInt(_0x4bab59(0x1b9))/0x7*(parseInt(_0x4bab59(0x1c4))/0x8)+parseInt(_0x4bab59(0x1bd))/0x9;if(_0xcb042c===_0x353cfc)break;else _0x24a3a4['push'](_0x24a3a4['shift']());}catch(_0x3ad450){_0x24a3a4['push'](_0x24a3a4['shift']());}}}(a82_0x3fa8,0x3c8da));import{getSqlQueryInfo}from'../../core/api-client.js';import{getDbName}from'../../core/db-resolver.js';import{SQLCODE_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';export const sqlDetail={'service':a82_0x55e12f(0x1c0),'command':'detail','description':a82_0x55e12f(0x1b4),'risk':a82_0x55e12f(0x1c2),'flags':[SQLCODE_FLAG,VERBOSE_FLAG],async 'execute'(_0xfe12fe){const _0x25a4bc=a82_0x55e12f,_0x1e095a=await getSqlQueryInfo(_0xfe12fe[_0x25a4bc(0x1b3)],_0xfe12fe[_0x25a4bc(0x1be)](_0x25a4bc(0x1ba))),_0x50ed74=_0xfe12fe[_0x25a4bc(0x1c5)](_0x25a4bc(0x1b6));if(_0x50ed74)return{'ok':!![],'data':_0x1e095a};const _0x215434=_0x1e095a[_0x25a4bc(0x1c3)]?await getDbName(_0xfe12fe[_0x25a4bc(0x1b3)],_0x1e095a[_0x25a4bc(0x1c3)]):undefined;return{'ok':!![],'data':{'sqlCode':_0x1e095a[_0x25a4bc(0x1b1)],'sqlName':_0x1e095a[_0x25a4bc(0x1bb)],'db':_0x215434?_0x215434+'\x20('+_0x1e095a['dbId']+')':_0x1e095a[_0x25a4bc(0x1c3)]??'','sqlContent':_0x1e095a[_0x25a4bc(0x1bf)]??''}};}};function a82_0x3fa8(){const _0x2972f2=['4449LkzKoI','962451PoumvL','sqlcode','sqlName','151832YasnaX','9708444FmfFEo','str','sqlContent','sql','780OLiVNG','read','dbId','24oaGLTu','bool','sqlCode','1773792clIaas','appCode','Get\x20custom\x20SQL\x20query\x20details\x20by\x20sqlCode','1229975fIFVAD','verbose','488273YThKQz'];a82_0x3fa8=function(){return _0x2972f2;};return a82_0x3fa8();}
|
package/lib/commands/sql/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a83_0x1e6b(){const _0x4127ee=['sql','1604480poePcN','4512752VajQMj','9CVCQat','135705lrhVxy','63380hJOGVp','execResult','113048UnlEIJ','execSuccess','length','14JBABVQ','sqlcode','SQL\x20execution\x20failed','params','14223250SOaTSc','exec','Execute\x20a\x20custom\x20SQL\x20query\x20by\x20sqlCode','1376922SYukFf','18pTYHRR','isArray','str'];a83_0x1e6b=function(){return _0x4127ee;};return a83_0x1e6b();}function a83_0x2ef7(_0x3201b3,_0x2e8db6){_0x3201b3=_0x3201b3-0xbf;const _0x1e6b57=a83_0x1e6b();let _0x2ef7aa=_0x1e6b57[_0x3201b3];return _0x2ef7aa;}const a83_0x1ada57=a83_0x2ef7;(function(_0x5d028d,_0x40b10b){const _0x20616d=a83_0x2ef7,_0x5566fe=_0x5d028d();while(!![]){try{const _0x52f519=-parseInt(_0x20616d(0xca))/0x1+parseInt(_0x20616d(0xc2))/0x2*(parseInt(_0x20616d(0xc9))/0x3)+-parseInt(_0x20616d(0xcc))/0x4+-parseInt(_0x20616d(0xc6))/0x5+-parseInt(_0x20616d(0xc1))/0x6*(parseInt(_0x20616d(0xcf))/0x7)+parseInt(_0x20616d(0xc7))/0x8*(-parseInt(_0x20616d(0xc8))/0x9)+parseInt(_0x20616d(0xd3))/0xa;if(_0x52f519===_0x40b10b)break;else _0x5566fe['push'](_0x5566fe['shift']());}catch(_0x551a79){_0x5566fe['push'](_0x5566fe['shift']());}}}(a83_0x1e6b,0x6026a));import{executeSdkSql}from'../../core/sdk-client.js';import{SQLCODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';import{parseJsonParams}from'../../utils/params.js';export const sqlExec={'service':a83_0x1ada57(0xc5),'command':a83_0x1ada57(0xbf),'description':a83_0x1ada57(0xc0),'risk':'read','flags':[SQLCODE_FLAG,PARAMS_FLAG],async 'execute'(_0x5dea96){const _0x581909=a83_0x1ada57,_0x46d17e=parseJsonParams(_0x5dea96[_0x581909(0xc4)](_0x581909(0xd2))),_0x3b29ac=Date['now'](),_0x1cc145=await executeSdkSql(_0x5dea96[_0x581909(0xc4)](_0x581909(0xd0)),_0x46d17e),_0x41e2c9=Date['now']()-_0x3b29ac,_0x80a017=_0x1cc145?.[_0x581909(0xcb)]??_0x1cc145,_0x4b415b=_0x1cc145?.[_0x581909(0xcd)]??!![];if(!_0x4b415b)return{'ok':![],'data':{'error':_0x1cc145?.['execError']||_0x581909(0xd1),'elapsed':_0x41e2c9},'message':_0x581909(0xd1)};const _0x38946e=Array[_0x581909(0xc3)](_0x80a017)?_0x80a017:[];return{'ok':!![],'data':{'rows':_0x38946e,'rowCount':_0x38946e[_0x581909(0xce)],'elapsed':_0x41e2c9},'message':'Returned\x20'+_0x38946e[_0x581909(0xce)]+'\x20row(s)\x20in\x20'+_0x41e2c9+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a84_0x5d52(_0x33836e,_0x1f95df){_0x33836e=_0x33836e-0x117;const _0x248b6b=a84_0x248b();let _0x5d52e8=_0x248b6b[_0x33836e];return _0x5d52e8;}(function(_0x2795df,_0x27c7a0){const _0x4ad968=a84_0x5d52,_0x262520=_0x2795df();while(!![]){try{const _0x28bec7=parseInt(_0x4ad968(0x11d))/0x1*(-parseInt(_0x4ad968(0x117))/0x2)+-parseInt(_0x4ad968(0x118))/0x3+-parseInt(_0x4ad968(0x11a))/0x4+parseInt(_0x4ad968(0x119))/0x5+-parseInt(_0x4ad968(0x11f))/0x6*(-parseInt(_0x4ad968(0x11c))/0x7)+parseInt(_0x4ad968(0x11b))/0x8*(parseInt(_0x4ad968(0x11e))/0x9)+parseInt(_0x4ad968(0x120))/0xa;if(_0x28bec7===_0x27c7a0)break;else _0x262520['push'](_0x262520['shift']());}catch(_0x1ce735){_0x262520['push'](_0x262520['shift']());}}}(a84_0x248b,0xe77fa));import{sqlDetail}from'../../commands/sql/detail.js';import{sqlExec}from'../../commands/sql/exec.js';function a84_0x248b(){const _0x588cc6=['16ZOTnlF','973007Ypgmjy','5hsVgsj','6934212pYshAQ','12OyWQJh','3569090nhQhdG','422582vthWya','2357553EqhsaE','6286575FwhULC','2570552dBrJDT'];a84_0x248b=function(){return _0x588cc6;};return a84_0x248b();}export const sqlDefinitions=[sqlDetail,sqlExec];
|
package/lib/commands/update.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a84_0x26b283=a84_0x3d8e;(function(_0x2fe3b0,_0x3ebc01){const _0x98b985=a84_0x3d8e,_0x55b6a0=_0x2fe3b0();while(!![]){try{const _0x3e4546=-parseInt(_0x98b985(0x13d))/0x1+parseInt(_0x98b985(0x136))/0x2*(-parseInt(_0x98b985(0x108))/0x3)+-parseInt(_0x98b985(0x14a))/0x4+parseInt(_0x98b985(0x153))/0x5*(parseInt(_0x98b985(0x141))/0x6)+parseInt(_0x98b985(0x148))/0x7+parseInt(_0x98b985(0x105))/0x8+parseInt(_0x98b985(0x11b))/0x9;if(_0x3e4546===_0x3ebc01)break;else _0x55b6a0['push'](_0x55b6a0['shift']());}catch(_0x4fcf5c){_0x55b6a0['push'](_0x55b6a0['shift']());}}}(a84_0x208d,0x1f0d6));import{fileURLToPath}from'node:url';import{basename,dirname,relative,win32}from'node:path';import{execaSync}from'execa';import a84_0x1815a2 from'semver';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{LOVRABET_NPM_PACKAGE_NAME,NPM_REGISTRY_BASE_URL}from'../constant/distribution.js';import{getCliVersion}from'../utils/version.js';import{inspectInstalledBuiltinSkillVersion,installBuiltinSkill}from'../skills/builtin-skill.js';function a84_0x3d8e(_0x307d32,_0x57e902){_0x307d32=_0x307d32-0xf6;const _0x208d4b=a84_0x208d();let _0x3d8ed5=_0x208d4b[_0x307d32];return _0x3d8ed5;}const updateFlags=[{'name':'latest','type':a84_0x26b283(0xf7),'description':a84_0x26b283(0x129),'default':![]},{'name':'beta','type':a84_0x26b283(0xf7),'description':a84_0x26b283(0x103),'default':![]},{'name':a84_0x26b283(0x156),'type':a84_0x26b283(0x123),'description':a84_0x26b283(0x13c)}];function getRequestedVersion(_0x3376cc){const _0x4eda72=a84_0x26b283,_0x26a2ad=_0x3376cc[_0x4eda72(0x12d)](_0x4eda72(0x156))[_0x4eda72(0x102)]();if(_0x26a2ad)return _0x26a2ad;return String(_0x3376cc[_0x4eda72(0x12b)]?.[0x0]??'')[_0x4eda72(0x102)]();}async function validateUpdateFlags(_0x450a22){const _0x34f2dd=a84_0x26b283,_0x4e37c3=getRequestedVersion(_0x450a22),_0x397c2c=[_0x450a22[_0x34f2dd(0x135)](_0x34f2dd(0x12f))?_0x34f2dd(0x12f):'',_0x450a22[_0x34f2dd(0x135)](_0x34f2dd(0x14b))?_0x34f2dd(0x14b):'',_0x4e37c3?'version':''][_0x34f2dd(0x142)](Boolean);if(_0x397c2c[_0x34f2dd(0x14c)]>0x1)throw CliErrors[_0x34f2dd(0x10f)](_0x34f2dd(0x134),_0x34f2dd(0x150));if(_0x4e37c3&&!a84_0x1815a2[_0x34f2dd(0x121)](_0x4e37c3))throw CliErrors[_0x34f2dd(0x10f)](_0x34f2dd(0x115)+_0x4e37c3,_0x34f2dd(0x104));}async function fetchNpmDistTags(){const _0x4f7e70=a84_0x26b283;try{const _0x1f2159=NPM_REGISTRY_BASE_URL+'/-/package/'+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+'/dist-tags',_0x116fb6=await fetch(_0x1f2159,{'signal':AbortSignal[_0x4f7e70(0x137)](0x2710)});if(!_0x116fb6['ok'])return null;const _0x3e2756=await _0x116fb6[_0x4f7e70(0x13b)]();if(!_0x3e2756||typeof _0x3e2756!=='object')return null;return Object['fromEntries'](Object[_0x4f7e70(0x11e)](_0x3e2756)['filter'](([,_0x9479d4])=>typeof _0x9479d4===_0x4f7e70(0x123)&&_0x9479d4[_0x4f7e70(0x102)]())[_0x4f7e70(0x114)](([_0x1fec47,_0x25d6ce])=>[_0x1fec47,String(_0x25d6ce)['trim']()]));}catch{return null;}}async function resolveTargetVersion(_0x3ecd87){const _0x3ff0ae=a84_0x26b283,_0x3b5750=getRequestedVersion(_0x3ecd87);if(_0x3b5750)return{'version':_0x3b5750,'source':_0x3ff0ae(0x156)};const _0x23b05a=_0x3ecd87[_0x3ff0ae(0x135)](_0x3ff0ae(0x14b))?_0x3ff0ae(0x14b):'latest',_0x26cea7=await fetchNpmDistTags(),_0x44d428=_0x26cea7?.[_0x23b05a];if(!_0x44d428)return null;return{'version':_0x44d428,'source':_0x23b05a};}function shouldInstallTarget(_0x605cca,_0x581cfa){const _0x5717ad=a84_0x26b283;if(_0x581cfa[_0x5717ad(0x132)]===_0x5717ad(0x156)||_0x581cfa[_0x5717ad(0x132)]===_0x5717ad(0x14b))return!a84_0x1815a2['eq'](_0x605cca,_0x581cfa[_0x5717ad(0x156)]);return a84_0x1815a2['lt'](_0x605cca,_0x581cfa[_0x5717ad(0x156)]);}export function installCliPackage(_0x435f86,_0x451e79,_0x47bea6=resolveCurrentCliNpmPrefix()){const _0x196bd2=a84_0x26b283,_0x37916c=LOVRABET_NPM_PACKAGE_NAME+'@'+_0x435f86,_0x338832=[_0x196bd2(0x13a),'-g',_0x37916c],_0x83b281=runNpmInstall(_0x338832,_0x451e79);if(_0x83b281['ok']||!isNpmPrefixPermissionError(_0x83b281[_0x196bd2(0x109)]))return _0x83b281;if(!_0x47bea6||_0x83b281['error']?.[_0x196bd2(0x10d)]()[_0x196bd2(0x147)](_0x47bea6[_0x196bd2(0x10d)]()))return _0x83b281;return console['warn'](_0x196bd2(0x118)+_0x47bea6),runNpmInstall([..._0x338832,_0x196bd2(0x152),_0x47bea6],_0x451e79);}export function resolveCurrentCliNpmPrefix(_0x18e94a=fileURLToPath(import.meta.url),_0x413d4a=process[a84_0x26b283(0x13e)]){const _0x1979ef=a84_0x26b283,_0x12069c=_0x413d4a===_0x1979ef(0xfd)?win32:{'basename':basename,'dirname':dirname,'relative':relative},_0x31cd3=_0x12069c[_0x1979ef(0x145)](_0x12069c[_0x1979ef(0x145)](_0x12069c['dirname'](_0x18e94a))),_0x55e577=_0x413d4a==='win32'?_0x1979ef(0x112):_0x1979ef(0x151);let _0x3be228=_0x12069c[_0x1979ef(0x145)](_0x31cd3);while(!![]){if(_0x12069c[_0x1979ef(0x155)](_0x3be228)===_0x1979ef(0x11a)&&_0x12069c[_0x1979ef(0xfc)](_0x3be228,_0x31cd3)===_0x55e577){const _0x3ed3b2=_0x12069c[_0x1979ef(0x145)](_0x3be228);return _0x12069c[_0x1979ef(0x155)](_0x3ed3b2)===_0x1979ef(0x12a)?_0x12069c[_0x1979ef(0x145)](_0x3ed3b2):_0x3ed3b2;}const _0x65d88e=_0x12069c[_0x1979ef(0x145)](_0x3be228);if(_0x65d88e===_0x3be228)return null;_0x3be228=_0x65d88e;}}function runNpmInstall(_0x1dc9b7,_0x5ed841){const _0x505780=a84_0x26b283;console[_0x505780(0x127)]('*\x20'+['npm',..._0x1dc9b7][_0x505780(0x133)]('\x20'));const _0x2a8e6b=execaSync('npm',_0x1dc9b7,{'cwd':process[_0x505780(0x126)](),'stdio':_0x505780(0xff),'env':process.env,'extendEnv':![],'shell':![],'reject':![]}),_0x444429=_0x2a8e6b[_0x505780(0x10c)]?String(_0x2a8e6b[_0x505780(0x10c)])['trim']():'',_0x40f49b=_0x2a8e6b[_0x505780(0x11c)]?String(_0x2a8e6b[_0x505780(0x11c)])[_0x505780(0x102)]():'';if(!_0x5ed841){if(_0x40f49b)process['stdout']['write'](_0x40f49b+'\x0a');if(_0x444429)process[_0x505780(0x10c)][_0x505780(0x106)](_0x444429+'\x0a');}if(_0x2a8e6b['exitCode']===0x0)return{'ok':!![]};const _0x54e423=_0x444429||_0x40f49b||_0x2a8e6b[_0x505780(0xfb)]||'exit\x20'+(_0x2a8e6b['exitCode']??_0x505780(0x130));return{'ok':![],'error':_0x54e423};}function isNpmPrefixPermissionError(_0xb5733c){const _0x898b8f=a84_0x26b283;return Boolean(_0xb5733c&&/\b(?:EACCES|EPERM)\b/[_0x898b8f(0x12c)](_0xb5733c));}function repairCurrentBuiltinSkill(_0x32a9a5){const _0x228775=a84_0x26b283;console[_0x228775(0x127)](_0x228775(0x131));const _0xd5ed73=installBuiltinSkill({'stdio':_0x32a9a5?_0x228775(0xff):_0x228775(0x140)});if(_0xd5ed73['ok']){console[_0x228775(0x127)](_0x228775(0x117)+_0xd5ed73[_0x228775(0x14e)]+'\x20is\x20current.');return;}throw CliErrors['apiError']('CLI\x20Built-in\x20Skill\x20repair\x20failed\x20['+(_0xd5ed73[_0x228775(0x11d)]||_0x228775(0x14f))+']:\x20'+(_0xd5ed73['error']||_0x228775(0x130)),_0x228775(0x116)+_0xd5ed73[_0x228775(0x144)]+_0x228775(0x138)+CLI_BIN_NAME+_0x228775(0x149));}function verifyUpdatedBuiltinSkill(_0x35214c){const _0x2830a8=a84_0x26b283;console[_0x2830a8(0x127)](_0x2830a8(0x131));const _0x6ec5f3=inspectInstalledBuiltinSkillVersion(_0x35214c);if(_0x6ec5f3[_0x2830a8(0xf9)]===_0x2830a8(0x143)){console[_0x2830a8(0x127)](_0x2830a8(0x117)+_0x35214c+_0x2830a8(0xf6));return;}const _0x4d3e95=_0x6ec5f3['skillVersion']?_0x2830a8(0x139)+_0x35214c+_0x2830a8(0x10e)+_0x6ec5f3['skillVersion']:_0x2830a8(0x139)+_0x35214c+',\x20state\x20'+_0x6ec5f3['state'],_0x16b48b=_0x6ec5f3[_0x2830a8(0x125)]?_0x4d3e95+':\x20'+_0x6ec5f3['reason']:_0x4d3e95;throw CliErrors[_0x2830a8(0x154)](_0x2830a8(0x124)+_0x35214c+',\x20but\x20Built-in\x20Skill\x20verification\x20failed:\x20'+_0x16b48b,_0x2830a8(0x116)+_0x6ec5f3['repairCommand']+_0x2830a8(0x138)+CLI_BIN_NAME+_0x2830a8(0x149));}async function execute(_0xb0e665){const _0x3ecda0=a84_0x26b283;await validateUpdateFlags(_0xb0e665);const _0x49ae83=getCliVersion();console[_0x3ecda0(0x127)](_0x3ecda0(0xfa)+_0x49ae83),console[_0x3ecda0(0x127)](_0x3ecda0(0x111));const _0x3997de=await resolveTargetVersion(_0xb0e665);if(!_0x3997de){const _0x493d91=_0xb0e665[_0x3ecda0(0x135)](_0x3ecda0(0x14b))?_0x3ecda0(0x14b):_0x3ecda0(0x12f),_0x44728e=_0x3ecda0(0x10a)+_0x493d91+_0x3ecda0(0x113);throw CliErrors['apiError'](_0x44728e,'Run:\x20npm\x20install\x20-g\x20'+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x493d91);}const _0x5207ae=[_0x49ae83,_0x3997de['version']][_0x3ecda0(0x14d)](_0x4cdfa0=>!a84_0x1815a2['valid'](_0x4cdfa0));if(_0x5207ae){const _0x4f5504=_0x3ecda0(0x146)+_0x5207ae+'.';throw CliErrors['apiError'](_0x4f5504,_0x3ecda0(0x12e)+LOVRABET_NPM_PACKAGE_NAME+_0x3ecda0(0x110));}if(!shouldInstallTarget(_0x49ae83,_0x3997de)){const _0x3f1ef2=_0x3997de[_0x3ecda0(0x132)]===_0x3ecda0(0x156)?_0x3ecda0(0x128)+_0x3997de[_0x3ecda0(0x156)]+').':_0x3ecda0(0x119)+_0x3997de[_0x3ecda0(0x156)]+').';return console[_0x3ecda0(0x127)](_0x3f1ef2),repairCurrentBuiltinSkill(_0xb0e665[_0x3ecda0(0x10b)]),{'ok':!![]};}console['log'](_0x3ecda0(0x107)+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0x49ae83+_0x3ecda0(0x101)+_0x3997de[_0x3ecda0(0x156)]);const _0x3139f8=installCliPackage(_0x3997de[_0x3ecda0(0x156)],_0xb0e665[_0x3ecda0(0x10b)]);if(!_0x3139f8['ok']){const _0x38b6a1=_0x3ecda0(0x100)+(_0x3139f8[_0x3ecda0(0x109)]||_0x3ecda0(0x130));throw CliErrors[_0x3ecda0(0x154)](_0x38b6a1,'Run:\x20npm\x20install\x20-g\x20'+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x3997de['version']);}return console[_0x3ecda0(0x127)]('Updated\x20to\x20v'+_0x3997de[_0x3ecda0(0x156)]+'.'),console[_0x3ecda0(0x127)](_0x3ecda0(0x11f)),verifyUpdatedBuiltinSkill(_0x3997de['version']),{'ok':!![]};}export const updateDefinition={'service':a84_0x26b283(0xfe),'command':a84_0x26b283(0xf8),'description':a84_0x26b283(0x122)+CLI_BIN_NAME+a84_0x26b283(0x120),'risk':a84_0x26b283(0x13f),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};function a84_0x208d(){const _0x551176=['find','skillVersion','INSTALL_FAILED','Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.','@lovrabet/lovrabet-cli','--prefix','26530oYEiuY','apiError','basename','version','\x20is\x20current.','boolean','run','state','Current\x20version:\x20','shortMessage','relative','win32','update','pipe','Update\x20failed:\x20','\x20->\x20','trim','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.','134752FnPtUv','write','Updating\x20','6093RAqVvg','error','Unable\x20to\x20resolve\x20','nonInteractive','stderr','toLowerCase',',\x20found\x20','validation','\x20dist-tags,\x20then\x20retry.','Checking\x20npm\x20dist-tags...','@lovrabet\x5clovrabet-cli','\x20version\x20from\x20npm.','map','Invalid\x20version:\x20','Run:\x20','\x20\x20CLI\x20Built-in\x20Skill\x20','Global\x20npm\x20prefix\x20is\x20not\x20writable;\x20retrying\x20in\x20the\x20current\x20CLI\x20Node\x20environment:\x20','Already\x20up\x20to\x20date\x20(v','node_modules','836856TtkiIg','stdout','code','entries','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','\x20CLI\x20from\x20npm','valid','Update\x20the\x20','string','CLI\x20updated\x20to\x20v','reason','cwd','log','Already\x20on\x20requested\x20version\x20(v','Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag','lib','args','test','str','Run:\x20npm\x20view\x20','latest','unknown','Checking\x20CLI\x20Built-in\x20Skill...','source','join','--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.','bool','12jignlJ','timeout',',\x20then\x20verify\x20with:\x20','expected\x20','install','json','Install\x20a\x20specific\x20CLI\x20version','136957kxrVMm','platform','read','inherit','282VniALZ','filter','current','repairCommand','dirname','Version\x20comparison\x20failed:\x20','includes','967694QgSVYk','\x20doctor','884476rwIcsg','beta','length'];a84_0x208d=function(){return _0x551176;};return a84_0x208d();}
|
|
1
|
+
const a85_0xd98eb0=a85_0x30c3;(function(_0x1f3da5,_0x1878f1){const _0xdd2e89=a85_0x30c3,_0x51f165=_0x1f3da5();while(!![]){try{const _0x212fac=parseInt(_0xdd2e89(0x13c))/0x1+parseInt(_0xdd2e89(0x152))/0x2+-parseInt(_0xdd2e89(0x146))/0x3+parseInt(_0xdd2e89(0x16f))/0x4*(-parseInt(_0xdd2e89(0x14e))/0x5)+-parseInt(_0xdd2e89(0x12a))/0x6+parseInt(_0xdd2e89(0x136))/0x7+parseInt(_0xdd2e89(0x161))/0x8;if(_0x212fac===_0x1878f1)break;else _0x51f165['push'](_0x51f165['shift']());}catch(_0x2dab57){_0x51f165['push'](_0x51f165['shift']());}}}(a85_0x2c72,0x9a46f));import{fileURLToPath}from'node:url';import{basename,dirname,relative,win32}from'node:path';import{execaSync}from'execa';import a85_0x10ccde from'semver';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME}from'../constant/cli.js';function a85_0x30c3(_0x58be32,_0x257859){_0x58be32=_0x58be32-0x113;const _0x2c7214=a85_0x2c72();let _0x30c342=_0x2c7214[_0x58be32];return _0x30c342;}function a85_0x2c72(){const _0x4c628d=['apiError','1436426ToNkYw','\x20->\x20','trim','skillVersion','\x20\x20CLI\x20Built-in\x20Skill\x20','Current\x20version:\x20','find','Updated\x20to\x20v','@lovrabet/lovrabet-cli','Update\x20the\x20','npm','valid','write','Invalid\x20version:\x20','relative','8399704trzZbK','read','install',']:\x20','version','boolean','lib','json','Checking\x20npm\x20dist-tags...','update','source','state','/dist-tags','CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','868556IZmybM',',\x20then\x20verify\x20with:\x20','Already\x20on\x20requested\x20version\x20(v','latest','Run:\x20npm\x20install\x20-g\x20','string','Update\x20failed:\x20','validation','\x20doctor','--prefix','nonInteractive','basename','repairCommand','\x20CLI\x20from\x20npm','\x20dist-tags,\x20then\x20retry.','join','Global\x20npm\x20prefix\x20is\x20not\x20writable;\x20retrying\x20in\x20the\x20current\x20CLI\x20Node\x20environment:\x20','code','filter','Unable\x20to\x20resolve\x20','reason','exit\x20','Updating\x20','unknown','Install\x20a\x20specific\x20CLI\x20version','3750330uKDhQh','dirname','Version\x20comparison\x20failed:\x20','fromEntries','length','win32','beta','pipe',',\x20but\x20Built-in\x20Skill\x20verification\x20failed:\x20','stdout','entries','includes','6192011lPHQJK','warn','test','str','object','bool','85128aWxrlq','\x20is\x20current.',',\x20found\x20','Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.','map','exitCode','CLI\x20updated\x20to\x20v','/-/package/','log','run','3791292plGgLM','expected\x20','\x20version\x20from\x20npm.','toLowerCase','Run:\x20','Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.','stderr','error','5gESlzc','INSTALL_FAILED','args'];a85_0x2c72=function(){return _0x4c628d;};return a85_0x2c72();}import{LOVRABET_NPM_PACKAGE_NAME,NPM_REGISTRY_BASE_URL}from'../constant/distribution.js';import{getCliVersion}from'../utils/version.js';import{inspectInstalledBuiltinSkillVersion,installBuiltinSkill}from'../skills/builtin-skill.js';const updateFlags=[{'name':'latest','type':a85_0xd98eb0(0x166),'description':'Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag','default':![]},{'name':'beta','type':a85_0xd98eb0(0x166),'description':'Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','default':![]},{'name':a85_0xd98eb0(0x165),'type':a85_0xd98eb0(0x116),'description':a85_0xd98eb0(0x129)}];function getRequestedVersion(_0x82326){const _0x2f7f9b=a85_0xd98eb0,_0x1df233=_0x82326[_0x2f7f9b(0x139)](_0x2f7f9b(0x165))[_0x2f7f9b(0x154)]();if(_0x1df233)return _0x1df233;return String(_0x82326[_0x2f7f9b(0x150)]?.[0x0]??'')[_0x2f7f9b(0x154)]();}async function validateUpdateFlags(_0x181426){const _0x2952e5=a85_0xd98eb0,_0x4e6c15=getRequestedVersion(_0x181426),_0x2912ba=[_0x181426[_0x2952e5(0x13b)](_0x2952e5(0x114))?_0x2952e5(0x114):'',_0x181426[_0x2952e5(0x13b)](_0x2952e5(0x130))?_0x2952e5(0x130):'',_0x4e6c15?_0x2952e5(0x165):'']['filter'](Boolean);if(_0x2912ba[_0x2952e5(0x12e)]>0x1)throw CliErrors[_0x2952e5(0x118)]('--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.',_0x2952e5(0x14b));if(_0x4e6c15&&!a85_0x10ccde[_0x2952e5(0x15d)](_0x4e6c15))throw CliErrors[_0x2952e5(0x118)](_0x2952e5(0x15f)+_0x4e6c15,_0x2952e5(0x13f));}async function fetchNpmDistTags(){const _0x164969=a85_0xd98eb0;try{const _0x3368e3=NPM_REGISTRY_BASE_URL+_0x164969(0x143)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x164969(0x16d),_0x5cb45e=await fetch(_0x3368e3,{'signal':AbortSignal['timeout'](0x2710)});if(!_0x5cb45e['ok'])return null;const _0x489562=await _0x5cb45e[_0x164969(0x168)]();if(!_0x489562||typeof _0x489562!==_0x164969(0x13a))return null;return Object[_0x164969(0x12d)](Object[_0x164969(0x134)](_0x489562)[_0x164969(0x123)](([,_0x16b076])=>typeof _0x16b076===_0x164969(0x116)&&_0x16b076[_0x164969(0x154)]())[_0x164969(0x140)](([_0x4cde32,_0x1f52c6])=>[_0x4cde32,String(_0x1f52c6)['trim']()]));}catch{return null;}}async function resolveTargetVersion(_0xd16cd1){const _0x2f757a=a85_0xd98eb0,_0x3e7fff=getRequestedVersion(_0xd16cd1);if(_0x3e7fff)return{'version':_0x3e7fff,'source':'version'};const _0x40057d=_0xd16cd1[_0x2f757a(0x13b)](_0x2f757a(0x130))?'beta':_0x2f757a(0x114),_0x24bab2=await fetchNpmDistTags(),_0x48bd22=_0x24bab2?.[_0x40057d];if(!_0x48bd22)return null;return{'version':_0x48bd22,'source':_0x40057d};}function shouldInstallTarget(_0x7259b1,_0x1b2571){const _0x32248d=a85_0xd98eb0;if(_0x1b2571[_0x32248d(0x16b)]==='version'||_0x1b2571[_0x32248d(0x16b)]===_0x32248d(0x130))return!a85_0x10ccde['eq'](_0x7259b1,_0x1b2571[_0x32248d(0x165)]);return a85_0x10ccde['lt'](_0x7259b1,_0x1b2571['version']);}export function installCliPackage(_0x15458e,_0x12993b,_0x4e6335=resolveCurrentCliNpmPrefix()){const _0x907e18=a85_0xd98eb0,_0x480cff=LOVRABET_NPM_PACKAGE_NAME+'@'+_0x15458e,_0x108695=[_0x907e18(0x163),'-g',_0x480cff],_0x1c62bf=runNpmInstall(_0x108695,_0x12993b);if(_0x1c62bf['ok']||!isNpmPrefixPermissionError(_0x1c62bf[_0x907e18(0x14d)]))return _0x1c62bf;if(!_0x4e6335||_0x1c62bf[_0x907e18(0x14d)]?.[_0x907e18(0x149)]()[_0x907e18(0x135)](_0x4e6335[_0x907e18(0x149)]()))return _0x1c62bf;return console[_0x907e18(0x137)](_0x907e18(0x121)+_0x4e6335),runNpmInstall([..._0x108695,_0x907e18(0x11a),_0x4e6335],_0x12993b);}export function resolveCurrentCliNpmPrefix(_0x4a7922=fileURLToPath(import.meta.url),_0x16d6d3=process['platform']){const _0x1b981e=a85_0xd98eb0,_0x5e77ad=_0x16d6d3===_0x1b981e(0x12f)?win32:{'basename':basename,'dirname':dirname,'relative':relative},_0x3aa465=_0x5e77ad[_0x1b981e(0x12b)](_0x5e77ad[_0x1b981e(0x12b)](_0x5e77ad[_0x1b981e(0x12b)](_0x4a7922))),_0x4d8218=_0x16d6d3===_0x1b981e(0x12f)?'@lovrabet\x5clovrabet-cli':_0x1b981e(0x15a);let _0x1d6bdb=_0x5e77ad[_0x1b981e(0x12b)](_0x3aa465);while(!![]){if(_0x5e77ad[_0x1b981e(0x11c)](_0x1d6bdb)==='node_modules'&&_0x5e77ad[_0x1b981e(0x160)](_0x1d6bdb,_0x3aa465)===_0x4d8218){const _0x20f085=_0x5e77ad['dirname'](_0x1d6bdb);return _0x5e77ad[_0x1b981e(0x11c)](_0x20f085)===_0x1b981e(0x167)?_0x5e77ad['dirname'](_0x20f085):_0x20f085;}const _0x4d2e03=_0x5e77ad['dirname'](_0x1d6bdb);if(_0x4d2e03===_0x1d6bdb)return null;_0x1d6bdb=_0x4d2e03;}}function runNpmInstall(_0x2b72b6,_0xa2e845){const _0x52ed2d=a85_0xd98eb0;console[_0x52ed2d(0x144)]('*\x20'+[_0x52ed2d(0x15c),..._0x2b72b6][_0x52ed2d(0x120)]('\x20'));const _0x323c3d=execaSync(_0x52ed2d(0x15c),_0x2b72b6,{'cwd':process['cwd'](),'stdio':_0x52ed2d(0x131),'env':process.env,'extendEnv':![],'shell':![],'reject':![]}),_0x1965cf=_0x323c3d[_0x52ed2d(0x14c)]?String(_0x323c3d[_0x52ed2d(0x14c)])[_0x52ed2d(0x154)]():'',_0x367796=_0x323c3d['stdout']?String(_0x323c3d[_0x52ed2d(0x133)])['trim']():'';if(!_0xa2e845){if(_0x367796)process[_0x52ed2d(0x133)]['write'](_0x367796+'\x0a');if(_0x1965cf)process['stderr'][_0x52ed2d(0x15e)](_0x1965cf+'\x0a');}if(_0x323c3d[_0x52ed2d(0x141)]===0x0)return{'ok':!![]};const _0x3609c9=_0x1965cf||_0x367796||_0x323c3d['shortMessage']||_0x52ed2d(0x126)+(_0x323c3d[_0x52ed2d(0x141)]??'unknown');return{'ok':![],'error':_0x3609c9};}function isNpmPrefixPermissionError(_0xf0c235){const _0x13a89d=a85_0xd98eb0;return Boolean(_0xf0c235&&/\b(?:EACCES|EPERM)\b/[_0x13a89d(0x138)](_0xf0c235));}function repairCurrentBuiltinSkill(_0x237e7e){const _0x1065d9=a85_0xd98eb0;console[_0x1065d9(0x144)]('Checking\x20CLI\x20Built-in\x20Skill...');const _0xfac0ee=installBuiltinSkill({'stdio':_0x237e7e?_0x1065d9(0x131):'inherit'});if(_0xfac0ee['ok']){console[_0x1065d9(0x144)]('\x20\x20CLI\x20Built-in\x20Skill\x20'+_0xfac0ee['skillVersion']+'\x20is\x20current.');return;}throw CliErrors[_0x1065d9(0x151)](_0x1065d9(0x16e)+(_0xfac0ee[_0x1065d9(0x122)]||_0x1065d9(0x14f))+_0x1065d9(0x164)+(_0xfac0ee[_0x1065d9(0x14d)]||_0x1065d9(0x128)),'Run:\x20'+_0xfac0ee['repairCommand']+_0x1065d9(0x170)+CLI_BIN_NAME+_0x1065d9(0x119));}function verifyUpdatedBuiltinSkill(_0xd41a5c){const _0x40be4c=a85_0xd98eb0;console[_0x40be4c(0x144)]('Checking\x20CLI\x20Built-in\x20Skill...');const _0x4ac59b=inspectInstalledBuiltinSkillVersion(_0xd41a5c);if(_0x4ac59b[_0x40be4c(0x16c)]==='current'){console[_0x40be4c(0x144)](_0x40be4c(0x156)+_0xd41a5c+_0x40be4c(0x13d));return;}const _0x131eaa=_0x4ac59b[_0x40be4c(0x155)]?'expected\x20'+_0xd41a5c+_0x40be4c(0x13e)+_0x4ac59b[_0x40be4c(0x155)]:_0x40be4c(0x147)+_0xd41a5c+',\x20state\x20'+_0x4ac59b[_0x40be4c(0x16c)],_0x8bb8c5=_0x4ac59b[_0x40be4c(0x125)]?_0x131eaa+':\x20'+_0x4ac59b[_0x40be4c(0x125)]:_0x131eaa;throw CliErrors[_0x40be4c(0x151)](_0x40be4c(0x142)+_0xd41a5c+_0x40be4c(0x132)+_0x8bb8c5,_0x40be4c(0x14a)+_0x4ac59b[_0x40be4c(0x11d)]+_0x40be4c(0x170)+CLI_BIN_NAME+_0x40be4c(0x119));}async function execute(_0x4db805){const _0x249972=a85_0xd98eb0;await validateUpdateFlags(_0x4db805);const _0xfba7c8=getCliVersion();console[_0x249972(0x144)](_0x249972(0x157)+_0xfba7c8),console[_0x249972(0x144)](_0x249972(0x169));const _0x352d68=await resolveTargetVersion(_0x4db805);if(!_0x352d68){const _0x53aaf9=_0x4db805[_0x249972(0x13b)](_0x249972(0x130))?_0x249972(0x130):'latest',_0x47365a=_0x249972(0x124)+_0x53aaf9+_0x249972(0x148);throw CliErrors['apiError'](_0x47365a,_0x249972(0x115)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x53aaf9);}const _0xb181d2=[_0xfba7c8,_0x352d68['version']][_0x249972(0x158)](_0x103ac9=>!a85_0x10ccde[_0x249972(0x15d)](_0x103ac9));if(_0xb181d2){const _0x3ea511=_0x249972(0x12c)+_0xb181d2+'.';throw CliErrors[_0x249972(0x151)](_0x3ea511,'Run:\x20npm\x20view\x20'+LOVRABET_NPM_PACKAGE_NAME+_0x249972(0x11f));}if(!shouldInstallTarget(_0xfba7c8,_0x352d68)){const _0x343eae=_0x352d68[_0x249972(0x16b)]===_0x249972(0x165)?_0x249972(0x113)+_0x352d68[_0x249972(0x165)]+').':'Already\x20up\x20to\x20date\x20(v'+_0x352d68[_0x249972(0x165)]+').';return console[_0x249972(0x144)](_0x343eae),repairCurrentBuiltinSkill(_0x4db805[_0x249972(0x11b)]),{'ok':!![]};}console['log'](_0x249972(0x127)+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0xfba7c8+_0x249972(0x153)+_0x352d68[_0x249972(0x165)]);const _0x2fd658=installCliPackage(_0x352d68['version'],_0x4db805[_0x249972(0x11b)]);if(!_0x2fd658['ok']){const _0x21c816=_0x249972(0x117)+(_0x2fd658[_0x249972(0x14d)]||_0x249972(0x128));throw CliErrors['apiError'](_0x21c816,_0x249972(0x115)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x352d68[_0x249972(0x165)]);}return console[_0x249972(0x144)](_0x249972(0x159)+_0x352d68[_0x249972(0x165)]+'.'),console[_0x249972(0x144)]('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.'),verifyUpdatedBuiltinSkill(_0x352d68['version']),{'ok':!![]};}export const updateDefinition={'service':a85_0xd98eb0(0x16a),'command':a85_0xd98eb0(0x145),'description':a85_0xd98eb0(0x15b)+CLI_BIN_NAME+a85_0xd98eb0(0x11e),'risk':a85_0xd98eb0(0x162),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a86_0x504a87=a86_0x9c7d;(function(_0x4d34f7,_0x586163){const _0xedd76c=a86_0x9c7d,_0x4ec71e=_0x4d34f7();while(!![]){try{const _0x5767a9=-parseInt(_0xedd76c(0x16d))/0x1*(parseInt(_0xedd76c(0x175))/0x2)+-parseInt(_0xedd76c(0x177))/0x3+-parseInt(_0xedd76c(0x16a))/0x4+parseInt(_0xedd76c(0x184))/0x5+parseInt(_0xedd76c(0x168))/0x6*(-parseInt(_0xedd76c(0x178))/0x7)+parseInt(_0xedd76c(0x169))/0x8+parseInt(_0xedd76c(0x17f))/0x9;if(_0x5767a9===_0x586163)break;else _0x4ec71e['push'](_0x4ec71e['shift']());}catch(_0x128e91){_0x4ec71e['push'](_0x4ec71e['shift']());}}}(a86_0x308d,0x3a171));function a86_0x308d(){const _0x22a016=['Binds\x20the\x20platform\x20user\x20of\x20the\x20current\x20AccessKey\x20to\x20the\x20given\x20collaboration-provider\x20account.\x20An\x20existing\x20bind\x20for\x20the\x20same\x20provider\x20may\x20be\x20replaced.','(empty)','POST','87578UMfqHf','validation','1170816TQVpBh','49RacqJp','toLowerCase','Bound\x20current\x20user\x20to\x20external\x20provider\x20account.','bind','user-account','External\x20account\x20binding\x20was\x20not\x20confirmed.','--account-id\x20cannot\x20be\x20empty.','9159993Wlyjix','write','External\x20account\x20ID\x20for\x20the\x20selected\x20provider','provider','string','343575sbXXuc','Pass\x20one\x20of:\x20','trim','349926GHpJBn','1718712OjQhjI','358876Yvfwhv','The\x20current\x20binding\x20is\x20not\x20exposed\x20by\x20the\x20server;\x20before\x20is\x20unavailable.','dingtalk','4HZnyFA','includes','str','apiError','account-id'];a86_0x308d=function(){return _0x22a016;};return a86_0x308d();}import{bindExternalUserAccount,USER_ACCOUNT_BIND_PATH}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const CURRENT_BINDING_WARNING=a86_0x504a87(0x16b),SUPPORTED_PROVIDERS=[a86_0x504a87(0x16c)];function readBindingInput(_0x3cc68a){const _0x169b97=a86_0x504a87,_0x144ed7=_0x3cc68a[_0x169b97(0x16f)](_0x169b97(0x182))[_0x169b97(0x186)]()[_0x169b97(0x179)]();if(!SUPPORTED_PROVIDERS[_0x169b97(0x16e)](_0x144ed7))throw CliErrors[_0x169b97(0x176)]('Unsupported\x20provider:\x20'+(_0x144ed7||_0x169b97(0x173))+'.',_0x169b97(0x185)+SUPPORTED_PROVIDERS['join'](',\x20')+'.');const _0x47ad2a=_0x3cc68a[_0x169b97(0x16f)](_0x169b97(0x171))[_0x169b97(0x186)]();if(!_0x47ad2a)throw CliErrors[_0x169b97(0x176)](_0x169b97(0x17e),'Pass\x20the\x20external\x20account\x20ID\x20for\x20the\x20selected\x20provider.');return{'provider':_0x144ed7,'accountId':_0x47ad2a};}function buildBindingData(_0x24111a,_0x41ba8c,_0x2fa145){const _0x312171=a86_0x504a87;return{'operation':_0x312171(0x17b),'selector':{'provider':_0x24111a,'accountId':_0x41ba8c},'before':null,'after':{'provider':_0x24111a,'accountId':_0x41ba8c,'bound':!![]},'dryRun':_0x2fa145,'warnings':[CURRENT_BINDING_WARNING]};}function a86_0x9c7d(_0x3b19bd,_0x75f89){_0x3b19bd=_0x3b19bd-0x168;const _0x308d26=a86_0x308d();let _0x9c7d3=_0x308d26[_0x3b19bd];return _0x9c7d3;}export const bindUserAccount={'service':a86_0x504a87(0x17c),'command':a86_0x504a87(0x17b),'description':'Bind\x20the\x20current\x20platform\x20user\x20to\x20an\x20external\x20provider\x20account','risk':a86_0x504a87(0x180),'confirmationDescription':a86_0x504a87(0x172),'requiresAuth':!![],'requiresAppCode':![],'flags':[{'name':a86_0x504a87(0x182),'type':a86_0x504a87(0x183),'required':!![],'enum':[...SUPPORTED_PROVIDERS],'description':'External\x20account\x20provider'},{'name':'account-id','type':a86_0x504a87(0x183),'required':!![],'description':a86_0x504a87(0x181)}],async 'validate'(_0x3b74a4){readBindingInput(_0x3b74a4);},async 'dryRun'(_0x1d5884){const _0x5ae162=a86_0x504a87,{provider:_0x22c9db,accountId:_0x314d17}=readBindingInput(_0x1d5884);return{...buildBindingData(_0x22c9db,_0x314d17,!![]),'method':_0x5ae162(0x174),'url':USER_ACCOUNT_BIND_PATH,'body':{'provider':_0x22c9db,'accountId':_0x314d17}};},async 'execute'(_0xed2e18){const _0x5b1971=a86_0x504a87,{provider:_0x2705e3,accountId:_0x4821e3}=readBindingInput(_0xed2e18),_0x545c7f=await bindExternalUserAccount(_0x2705e3,_0x4821e3);if(_0x545c7f!==!![])throw CliErrors[_0x5b1971(0x170)](_0x5b1971(0x17d),'Retry\x20with\x20the\x20same\x20--provider\x20and\x20--account-id\x20only\x20after\x20checking\x20the\x20current\x20AccessKey\x20identity.');return{'ok':!![],'data':buildBindingData(_0x2705e3,_0x4821e3,![]),'message':_0x5b1971(0x17a)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x47893f,_0x3629b8){const _0x10a25b=a87_0x5976,_0xf13f88=_0x47893f();while(!![]){try{const _0x2511a1=parseInt(_0x10a25b(0xc5))/0x1+parseInt(_0x10a25b(0xc4))/0x2+parseInt(_0x10a25b(0xc9))/0x3*(parseInt(_0x10a25b(0xc6))/0x4)+-parseInt(_0x10a25b(0xc1))/0x5+parseInt(_0x10a25b(0xc8))/0x6*(parseInt(_0x10a25b(0xc2))/0x7)+parseInt(_0x10a25b(0xc0))/0x8*(parseInt(_0x10a25b(0xc7))/0x9)+-parseInt(_0x10a25b(0xc3))/0xa;if(_0x2511a1===_0x3629b8)break;else _0xf13f88['push'](_0xf13f88['shift']());}catch(_0x68b188){_0xf13f88['push'](_0xf13f88['shift']());}}}(a87_0x509d,0x29de9));import{bindUserAccount}from'../../commands/user-account/bind.js';function a87_0x509d(){const _0x4e2b11=['663302lFXtcG','208533GcajPK','1317404iIVMcw','18MOiPow','6sKrOCn','3wGblOn','783056pByvBX','204205BxghyG','1732003pLomiZ','11003900UVgsON'];a87_0x509d=function(){return _0x4e2b11;};return a87_0x509d();}function a87_0x5976(_0xae3161,_0x1b65a1){_0xae3161=_0xae3161-0xc0;const _0x509df9=a87_0x509d();let _0x5976af=_0x509df9[_0xae3161];return _0x5976af;}export const userAccountDefinitions=[bindUserAccount];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a87_0x6983d9=a87_0x5a5e;function a87_0x5a5e(_0x453cd9,_0x89b5df){_0x453cd9=_0x453cd9-0xec;const _0x36dc9a=a87_0x36dc();let _0x5a5e6c=_0x36dc9a[_0x453cd9];return _0x5a5e6c;}(function(_0x3a148c,_0x5b2e46){const _0x3936be=a87_0x5a5e,_0xf355f0=_0x3a148c();while(!![]){try{const _0x53afaf=-parseInt(_0x3936be(0x11c))/0x1*(parseInt(_0x3936be(0x10e))/0x2)+parseInt(_0x3936be(0x105))/0x3*(-parseInt(_0x3936be(0x10f))/0x4)+parseInt(_0x3936be(0x115))/0x5+parseInt(_0x3936be(0xf0))/0x6*(-parseInt(_0x3936be(0x11f))/0x7)+parseInt(_0x3936be(0x119))/0x8*(-parseInt(_0x3936be(0xed))/0x9)+parseInt(_0x3936be(0x117))/0xa+parseInt(_0x3936be(0xf1))/0xb;if(_0x53afaf===_0x5b2e46)break;else _0xf355f0['push'](_0xf355f0['shift']());}catch(_0x491807){_0xf355f0['push'](_0xf355f0['shift']());}}}(a87_0x36dc,0x3aaf5));import{CLI_BIN_NAME}from'../../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../../constant/env.js';import{CliErrors}from'../../errors.js';import{readConfigFile,resolveWriteConfigPath,writeConfigFile}from'../../context.js';import{findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../../commands/app/eligibility.js';const WORKSPACE_USE_FLAGS=[{'name':a87_0x6983d9(0x111),'type':a87_0x6983d9(0x11a),'description':'App\x20name\x20to\x20bind\x20as\x20the\x20current\x20workspace\x20default'},{'name':a87_0x6983d9(0x11e),'type':a87_0x6983d9(0x11a),'description':a87_0x6983d9(0xfd)},{'name':'env','type':a87_0x6983d9(0x11a),'description':a87_0x6983d9(0x123),'enum':[...RUNTIME_ENV_VALUES]}];async function executeWorkspaceUse(_0x3a9308,_0x5e933e){const _0x5ac806=a87_0x6983d9,_0x3eaf0e=_0x3a9308[_0x5ac806(0x116)](_0x5ac806(0x111))[_0x5ac806(0x11b)](),_0x17cde9=_0x3a9308[_0x5ac806(0x116)](_0x5ac806(0x11e))['trim'](),_0x4f2507=_0x3a9308[_0x5ac806(0x116)](_0x5ac806(0x128))[_0x5ac806(0x11b)](),_0x4b3a71=resolveWorkspaceEnv(_0x4f2507||_0x3a9308['envName']||DEFAULT_CONFIG_VALUES[_0x5ac806(0x128)]);if(!_0x3eaf0e&&!_0x17cde9)throw CliErrors[_0x5ac806(0xee)]('Missing\x20workspace\x20app\x20selector.',_0x5ac806(0xff)+CLI_BIN_NAME+'\x20workspace\x20'+_0x5e933e+_0x5ac806(0x127)+CLI_BIN_NAME+'\x20workspace\x20'+_0x5e933e+_0x5ac806(0x129));if(_0x3eaf0e&&_0x17cde9)throw CliErrors[_0x5ac806(0xee)](_0x5ac806(0xec),'Pass\x20either\x20--app\x20<name>\x20or\x20--appcode\x20<code>,\x20not\x20both.');const _0x8caed=resolveWriteConfigPath(_0x5ac806(0x10a)),_0x3f5bad=readConfigFile(_0x8caed);assertWorkspaceCommandState(_0x5e933e,_0x3f5bad);const _0x580d74=_0x17cde9||await resolveRemoteAppCode({'command':_0x5e933e,'appName':_0x3eaf0e,'env':_0x4b3a71,'accessKey':_0x3a9308[_0x5ac806(0xfc)]});return writeWorkspaceConfig({'command':_0x5e933e,'appName':_0x3eaf0e,'appcode':_0x580d74,'env':_0x4b3a71,'shouldWriteEnv':!!_0x4f2507,'accessKey':_0x3a9308['accessKey']},_0x8caed,_0x3f5bad),{'ok':!![],'data':{'configPath':_0x8caed,'app':_0x3eaf0e||null,'appcode':_0x580d74,'env':_0x4f2507?_0x4b3a71:null,'accessKeyWritten':![],'command':_0x5ac806(0xf9)+_0x5e933e},'message':buildWorkspaceMessage(_0x8caed,_0x3eaf0e,_0x580d74,_0x4f2507?_0x4b3a71:undefined)};}async function resolveRemoteAppCode(_0x8a7208){const _0x20d9da=a87_0x6983d9;if(!_0x8a7208[_0x20d9da(0xfc)])throw CliErrors[_0x20d9da(0xf7)]('Resolving\x20--app\x20requires\x20accessKey.\x20Pass\x20--appcode\x20directly,\x20or\x20set\x20accessKey\x20before\x20running\x20'+CLI_BIN_NAME+_0x20d9da(0x122)+_0x8a7208[_0x20d9da(0x113)]+'.');const {setActiveAK:_0x1836c1}=await import(_0x20d9da(0x10d)),{getRemoteAppList:_0x2a5703}=await import(_0x20d9da(0x106));_0x1836c1(_0x8a7208[_0x20d9da(0xfc)]);const _0x49e4cb=await _0x2a5703({'env':_0x8a7208[_0x20d9da(0x128)],'accessKey':_0x8a7208[_0x20d9da(0xfc)],'noCache':![]}),_0x5d1bb5=findAppByName(_0x49e4cb[_0x20d9da(0x102)],_0x8a7208[_0x20d9da(0xfe)]);if(_0x5d1bb5&&!isRuntimeAccessibleApp(_0x5d1bb5))throw runtimeInaccessibleAppError(_0x5d1bb5,'\x22'+_0x8a7208[_0x20d9da(0xfe)]+'\x22');const _0x1d7d4e=_0x5d1bb5?.[_0x20d9da(0x104)]?.[_0x20d9da(0x11b)]();if(_0x1d7d4e)return _0x1d7d4e;const _0x430ec6=_0x49e4cb[_0x20d9da(0x102)]['map'](_0x416af7=>_0x416af7[_0x20d9da(0xfe)])[_0x20d9da(0xf8)](Boolean),_0x44d1ee=_0x430ec6['length']?_0x20d9da(0x121)+Array['from'](new Set(_0x430ec6))['join'](',\x20')+'.':_0x20d9da(0xf3)+CLI_BIN_NAME+'\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20pass\x20--appcode\x20directly.';throw CliErrors[_0x20d9da(0xee)](_0x20d9da(0x118)+_0x8a7208[_0x20d9da(0xfe)]+_0x20d9da(0xf4),_0x44d1ee);}function writeWorkspaceConfig(_0x16d0e9,_0x328dc3,_0x139c03){const _0x2da6eb=a87_0x6983d9;_0x16d0e9[_0x2da6eb(0xfa)]&&(_0x139c03['env']=_0x16d0e9['env']);if(_0x16d0e9[_0x2da6eb(0xfe)]){const _0x23b02b=isRecord(_0x139c03[_0x2da6eb(0xf6)])?{..._0x139c03[_0x2da6eb(0xf6)]}:{},_0x4feefa=isRecord(_0x23b02b[_0x16d0e9[_0x2da6eb(0xfe)]])?_0x23b02b[_0x16d0e9[_0x2da6eb(0xfe)]]:{};return _0x23b02b[_0x16d0e9[_0x2da6eb(0xfe)]]={..._0x4feefa,'appcode':_0x16d0e9['appcode']},_0x139c03['apps']=_0x23b02b,_0x139c03[_0x2da6eb(0xf5)]=_0x16d0e9[_0x2da6eb(0xfe)],delete _0x139c03[_0x2da6eb(0x11e)],delete _0x139c03[_0x2da6eb(0x111)],writeAndReturn(_0x328dc3,_0x139c03);}return _0x139c03[_0x2da6eb(0x11e)]=_0x16d0e9[_0x2da6eb(0x11e)],delete _0x139c03[_0x2da6eb(0xf5)],delete _0x139c03[_0x2da6eb(0x111)],writeAndReturn(_0x328dc3,_0x139c03);}function writeAndReturn(_0x427ccd,_0x4c9bdc){return writeConfigFile(_0x427ccd,_0x4c9bdc),_0x427ccd;}function resolveWorkspaceEnv(_0x455eaf){const _0x34a645=a87_0x6983d9;if(RUNTIME_ENV_VALUES[_0x34a645(0xf2)](_0x455eaf))return _0x455eaf;throw CliErrors[_0x34a645(0xee)](_0x34a645(0x100)+_0x455eaf+'\x22.\x20Allowed:\x20'+RUNTIME_ENV_VALUES['join'](',\x20'));}function buildWorkspaceMessage(_0x244cf1,_0x1dfa74,_0x3c5228,_0x5eb013){const _0x4b30c2=a87_0x6983d9,_0x4980b3=_0x1dfa74?_0x1dfa74+'\x20('+_0x3c5228+')':_0x3c5228,_0x2821a1=_0x5eb013?'\x0aEnv:\x20'+_0x5eb013:'';return _0x4b30c2(0xef)+_0x244cf1+_0x4b30c2(0x109)+_0x4980b3+_0x2821a1+_0x4b30c2(0x107);}function isRecord(_0x56607f){const _0x5bb5a2=a87_0x6983d9;return typeof _0x56607f===_0x5bb5a2(0x112)&&_0x56607f!==null&&!Array[_0x5bb5a2(0x108)](_0x56607f);}function hasWorkspaceAppBinding(_0x26dff0){const _0x33fad4=a87_0x6983d9;if(typeof _0x26dff0[_0x33fad4(0x11e)]===_0x33fad4(0x11a)&&_0x26dff0[_0x33fad4(0x11e)][_0x33fad4(0x11b)]()[_0x33fad4(0x11d)]>0x0)return!![];if(typeof _0x26dff0[_0x33fad4(0xf5)]!==_0x33fad4(0x11a)||!_0x26dff0[_0x33fad4(0xf5)][_0x33fad4(0x11b)]())return![];if(!isRecord(_0x26dff0['apps']))return![];const _0x443b9a=_0x26dff0['apps'][_0x26dff0['defaultApp'][_0x33fad4(0x11b)]()];return isRecord(_0x443b9a)&&typeof _0x443b9a[_0x33fad4(0x11e)]===_0x33fad4(0x11a)&&_0x443b9a[_0x33fad4(0x11e)]['trim']()['length']>0x0;}function assertWorkspaceCommandState(_0x2a67ab,_0x39b488){const _0x4129a0=a87_0x6983d9,_0xeba2ab=hasWorkspaceAppBinding(_0x39b488);if(_0x2a67ab==='init'&&_0xeba2ab)throw CliErrors[_0x4129a0(0xee)]('Workspace\x20app\x20context\x20is\x20already\x20initialized.','Use\x20`'+CLI_BIN_NAME+'\x20workspace\x20use\x20--app\x20<name>`\x20or\x20`'+CLI_BIN_NAME+_0x4129a0(0x126));if(_0x2a67ab===_0x4129a0(0x103)&&!_0xeba2ab)throw CliErrors[_0x4129a0(0xee)](_0x4129a0(0xfb),_0x4129a0(0xf3)+CLI_BIN_NAME+_0x4129a0(0x114)+CLI_BIN_NAME+_0x4129a0(0x10c));}function makeWorkspaceCommand(_0x201d1d){const _0x40c601=a87_0x6983d9;return{'service':_0x40c601(0x125),'command':_0x201d1d,'description':_0x201d1d===_0x40c601(0x110)?_0x40c601(0x124):_0x40c601(0x10b),'risk':'write','confirmationDescription':_0x201d1d==='init'?_0x40c601(0x120):_0x40c601(0x101),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':WORKSPACE_USE_FLAGS,async 'execute'(_0x2c1ef2){return executeWorkspaceUse(_0x2c1ef2,_0x201d1d);}};}export const workspaceDefinitions=[makeWorkspaceCommand(a87_0x6983d9(0x110)),makeWorkspaceCommand(a87_0x6983d9(0x103))];function a87_0x36dc(){const _0x5b4427=['12352NLMyOi','92PGHKmQ','init','app','object','command','\x20workspace\x20init\x20--app\x20<name>`\x20or\x20`','2099850YUAYPB','str','4399570OeGQeg','App\x20\x22','304280BijtJa','string','trim','3ffnfiH','length','appcode','1219925utcMcC','Writes\x20Lovrabet\x20project\x20config\x20in\x20the\x20current\x20working\x20directory\x20when\x20no\x20app\x20is\x20bound\x20yet,\x20and\x20sets\x20the\x20selected\x20app\x20as\x20the\x20directory\x20default.\x20AccessKey\x20is\x20not\x20written.','Available\x20apps:\x20','\x20workspace\x20','Target\x20environment','Initialize\x20app\x20context\x20for\x20the\x20current\x20working\x20directory\x20when\x20no\x20app\x20is\x20bound\x20yet','workspace','\x20workspace\x20use\x20--appcode\x20<code>`\x20to\x20change\x20it.','\x20--app\x20<name>\x20[--env\x20daily]\x20or\x20','env','\x20--appcode\x20<code>\x20[--env\x20daily]','Conflicting\x20workspace\x20app\x20selectors.','63IYdzPY','validation','Workspace\x20configured.\x0aConfig\x20file:\x20','12edBPkW','177012fwOYOX','includes','Run\x20`','\x22\x20not\x20found.','defaultApp','apps','authRequired','filter','workspace\x20','shouldWriteEnv','Workspace\x20app\x20context\x20is\x20not\x20initialized.','accessKey','App\x20code\x20to\x20bind\x20directly','appName','Usage:\x20','Invalid\x20env\x20\x22','Updates\x20the\x20app\x20binding\x20already\x20present\x20in\x20the\x20current\x20working\x20directory\x20and\x20sets\x20the\x20selected\x20app\x20as\x20the\x20directory\x20default.\x20AccessKey\x20is\x20not\x20written.','items','use','appCode','303gqZDmv','../../commands/app/remote-source.js','\x0aAccessKey:\x20not\x20written','isArray','\x0aDefault\x20app:\x20','project','Change\x20the\x20app\x20context\x20already\x20bound\x20to\x20the\x20current\x20working\x20directory','\x20workspace\x20init\x20--appcode\x20<code>`\x20first.','../../core/api-client.js'];a87_0x36dc=function(){return _0x5b4427;};return a87_0x36dc();}
|
|
1
|
+
const a88_0x43c194=a88_0x4b5a;function a88_0x4b5a(_0x2f3c02,_0x3b6097){_0x2f3c02=_0x2f3c02-0x1e4;const _0x13ff36=a88_0x13ff();let _0x4b5a87=_0x13ff36[_0x2f3c02];return _0x4b5a87;}(function(_0x4a58b2,_0x3ef763){const _0x56bd5d=a88_0x4b5a,_0x2627e1=_0x4a58b2();while(!![]){try{const _0x34b3f2=parseInt(_0x56bd5d(0x209))/0x1+parseInt(_0x56bd5d(0x225))/0x2+-parseInt(_0x56bd5d(0x218))/0x3+-parseInt(_0x56bd5d(0x1e6))/0x4*(parseInt(_0x56bd5d(0x1ea))/0x5)+parseInt(_0x56bd5d(0x22d))/0x6*(-parseInt(_0x56bd5d(0x226))/0x7)+-parseInt(_0x56bd5d(0x227))/0x8*(parseInt(_0x56bd5d(0x1f9))/0x9)+-parseInt(_0x56bd5d(0x20b))/0xa*(-parseInt(_0x56bd5d(0x217))/0xb);if(_0x34b3f2===_0x3ef763)break;else _0x2627e1['push'](_0x2627e1['shift']());}catch(_0x333391){_0x2627e1['push'](_0x2627e1['shift']());}}}(a88_0x13ff,0x6bb61));import{CLI_BIN_NAME}from'../../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../../constant/env.js';import{CliErrors}from'../../errors.js';import{readConfigFile,resolveWriteConfigPath,writeConfigFile}from'../../context.js';import{findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../../commands/app/eligibility.js';const WORKSPACE_USE_FLAGS=[{'name':a88_0x43c194(0x20c),'type':a88_0x43c194(0x1e8),'description':a88_0x43c194(0x222)},{'name':'appcode','type':a88_0x43c194(0x1e8),'description':a88_0x43c194(0x204)},{'name':a88_0x43c194(0x202),'type':a88_0x43c194(0x1e8),'description':a88_0x43c194(0x1e5),'enum':[...RUNTIME_ENV_VALUES]}];async function executeWorkspaceUse(_0x2c0f43,_0x430b47){const _0x1042c8=a88_0x43c194,_0xc84a1=_0x2c0f43[_0x1042c8(0x206)](_0x1042c8(0x20c))[_0x1042c8(0x208)](),_0x209918=_0x2c0f43['str'](_0x1042c8(0x1f0))['trim'](),_0x210c5c=_0x2c0f43[_0x1042c8(0x206)]('env')[_0x1042c8(0x208)](),_0x9acb67=resolveWorkspaceEnv(_0x210c5c||_0x2c0f43[_0x1042c8(0x1ec)]||DEFAULT_CONFIG_VALUES[_0x1042c8(0x202)]);if(!_0xc84a1&&!_0x209918)throw CliErrors[_0x1042c8(0x1e7)](_0x1042c8(0x1ee),'Usage:\x20'+CLI_BIN_NAME+_0x1042c8(0x212)+_0x430b47+_0x1042c8(0x224)+CLI_BIN_NAME+_0x1042c8(0x212)+_0x430b47+_0x1042c8(0x21e));if(_0xc84a1&&_0x209918)throw CliErrors[_0x1042c8(0x1e7)](_0x1042c8(0x21c),_0x1042c8(0x210));const _0x40ae55=resolveWriteConfigPath(_0x1042c8(0x1f4)),_0x17fbdb=readConfigFile(_0x40ae55);assertWorkspaceCommandState(_0x430b47,_0x17fbdb);const _0x2a8737=_0x209918||await resolveRemoteAppCode({'command':_0x430b47,'appName':_0xc84a1,'env':_0x9acb67,'accessKey':_0x2c0f43['accessKey']});return writeWorkspaceConfig({'command':_0x430b47,'appName':_0xc84a1,'appcode':_0x2a8737,'env':_0x9acb67,'shouldWriteEnv':!!_0x210c5c,'accessKey':_0x2c0f43[_0x1042c8(0x228)]},_0x40ae55,_0x17fbdb),{'ok':!![],'data':{'configPath':_0x40ae55,'app':_0xc84a1||null,'appcode':_0x2a8737,'env':_0x210c5c?_0x9acb67:null,'accessKeyWritten':![],'command':_0x1042c8(0x1fb)+_0x430b47},'message':buildWorkspaceMessage(_0x40ae55,_0xc84a1,_0x2a8737,_0x210c5c?_0x9acb67:undefined)};}async function resolveRemoteAppCode(_0x25d206){const _0x5307b8=a88_0x43c194;if(!_0x25d206[_0x5307b8(0x228)])throw CliErrors[_0x5307b8(0x22c)](_0x5307b8(0x20e)+CLI_BIN_NAME+'\x20workspace\x20'+_0x25d206[_0x5307b8(0x1f8)]+'.');const {setActiveAK:_0x62395c}=await import(_0x5307b8(0x1fa)),{getRemoteAppList:_0x493e73}=await import(_0x5307b8(0x214));_0x62395c(_0x25d206['accessKey']);const _0x3abf8e=await _0x493e73({'env':_0x25d206[_0x5307b8(0x202)],'accessKey':_0x25d206[_0x5307b8(0x228)],'noCache':![]}),_0x55c0d8=findAppByName(_0x3abf8e[_0x5307b8(0x1f7)],_0x25d206[_0x5307b8(0x22e)]);if(_0x55c0d8&&!isRuntimeAccessibleApp(_0x55c0d8))throw runtimeInaccessibleAppError(_0x55c0d8,'\x22'+_0x25d206[_0x5307b8(0x22e)]+'\x22');const _0x3132f0=_0x55c0d8?.[_0x5307b8(0x20f)]?.['trim']();if(_0x3132f0)return _0x3132f0;const _0x1fa539=_0x3abf8e[_0x5307b8(0x1f7)][_0x5307b8(0x21f)](_0x33284a=>_0x33284a[_0x5307b8(0x22e)])[_0x5307b8(0x211)](Boolean),_0x5ed69d=_0x1fa539[_0x5307b8(0x1fc)]?_0x5307b8(0x1fd)+Array[_0x5307b8(0x20d)](new Set(_0x1fa539))['join'](',\x20')+'.':'Run\x20`'+CLI_BIN_NAME+'\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20pass\x20--appcode\x20directly.';throw CliErrors[_0x5307b8(0x1e7)](_0x5307b8(0x205)+_0x25d206[_0x5307b8(0x22e)]+_0x5307b8(0x220),_0x5ed69d);}function writeWorkspaceConfig(_0x13c65f,_0x4c20c6,_0x2e5a27){const _0x522419=a88_0x43c194;_0x13c65f[_0x522419(0x1f5)]&&(_0x2e5a27['env']=_0x13c65f[_0x522419(0x202)]);if(_0x13c65f[_0x522419(0x22e)]){const _0x3b9d8c=isRecord(_0x2e5a27['apps'])?{..._0x2e5a27[_0x522419(0x20a)]}:{},_0x307ffd=isRecord(_0x3b9d8c[_0x13c65f[_0x522419(0x22e)]])?_0x3b9d8c[_0x13c65f[_0x522419(0x22e)]]:{};return _0x3b9d8c[_0x13c65f[_0x522419(0x22e)]]={..._0x307ffd,'appcode':_0x13c65f[_0x522419(0x1f0)]},_0x2e5a27['apps']=_0x3b9d8c,_0x2e5a27[_0x522419(0x22b)]=_0x13c65f['appName'],delete _0x2e5a27[_0x522419(0x1f0)],delete _0x2e5a27[_0x522419(0x20c)],writeAndReturn(_0x4c20c6,_0x2e5a27);}return _0x2e5a27[_0x522419(0x1f0)]=_0x13c65f['appcode'],delete _0x2e5a27['defaultApp'],delete _0x2e5a27[_0x522419(0x20c)],writeAndReturn(_0x4c20c6,_0x2e5a27);}function writeAndReturn(_0x122730,_0x363568){return writeConfigFile(_0x122730,_0x363568),_0x122730;}function resolveWorkspaceEnv(_0x568cb1){const _0x143b71=a88_0x43c194;if(RUNTIME_ENV_VALUES[_0x143b71(0x21a)](_0x568cb1))return _0x568cb1;throw CliErrors[_0x143b71(0x1e7)](_0x143b71(0x1f1)+_0x568cb1+_0x143b71(0x1ff)+RUNTIME_ENV_VALUES[_0x143b71(0x1f2)](',\x20'));}function buildWorkspaceMessage(_0x474816,_0x26c5ea,_0x9818d0,_0x57ab5b){const _0x4d464d=a88_0x43c194,_0x3c8ff5=_0x26c5ea?_0x26c5ea+'\x20('+_0x9818d0+')':_0x9818d0,_0x45646c=_0x57ab5b?_0x4d464d(0x1ef)+_0x57ab5b:'';return _0x4d464d(0x1f6)+_0x474816+_0x4d464d(0x219)+_0x3c8ff5+_0x45646c+_0x4d464d(0x213);}function isRecord(_0x4c6f7e){const _0x3e1e07=a88_0x43c194;return typeof _0x4c6f7e===_0x3e1e07(0x1fe)&&_0x4c6f7e!==null&&!Array[_0x3e1e07(0x21b)](_0x4c6f7e);}function hasWorkspaceAppBinding(_0x264d61){const _0x310851=a88_0x43c194;if(typeof _0x264d61[_0x310851(0x1f0)]==='string'&&_0x264d61[_0x310851(0x1f0)][_0x310851(0x208)]()[_0x310851(0x1fc)]>0x0)return!![];if(typeof _0x264d61['defaultApp']!==_0x310851(0x1e8)||!_0x264d61[_0x310851(0x22b)]['trim']())return![];if(!isRecord(_0x264d61[_0x310851(0x20a)]))return![];const _0x14453c=_0x264d61[_0x310851(0x20a)][_0x264d61[_0x310851(0x22b)][_0x310851(0x208)]()];return isRecord(_0x14453c)&&typeof _0x14453c[_0x310851(0x1f0)]==='string'&&_0x14453c['appcode'][_0x310851(0x208)]()[_0x310851(0x1fc)]>0x0;}function assertWorkspaceCommandState(_0x2839d8,_0x565d4a){const _0x5a1916=a88_0x43c194,_0x40e60f=hasWorkspaceAppBinding(_0x565d4a);if(_0x2839d8===_0x5a1916(0x203)&&_0x40e60f)throw CliErrors['validation'](_0x5a1916(0x229),_0x5a1916(0x221)+CLI_BIN_NAME+_0x5a1916(0x207)+CLI_BIN_NAME+_0x5a1916(0x201));if(_0x2839d8===_0x5a1916(0x21d)&&!_0x40e60f)throw CliErrors['validation'](_0x5a1916(0x1eb),_0x5a1916(0x216)+CLI_BIN_NAME+_0x5a1916(0x1e4)+CLI_BIN_NAME+_0x5a1916(0x22a));}function makeWorkspaceCommand(_0x2af531){const _0x5d04ee=a88_0x43c194;return{'service':_0x5d04ee(0x1ed),'command':_0x2af531,'description':_0x2af531===_0x5d04ee(0x203)?_0x5d04ee(0x223):_0x5d04ee(0x200),'risk':_0x5d04ee(0x1e9),'confirmationDescription':_0x2af531===_0x5d04ee(0x203)?_0x5d04ee(0x215):_0x5d04ee(0x1f3),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':WORKSPACE_USE_FLAGS,async 'execute'(_0x13264c){return executeWorkspaceUse(_0x13264c,_0x2af531);}};}function a88_0x13ff(){const _0x498910=['../../commands/app/remote-source.js','Writes\x20Lovrabet\x20project\x20config\x20in\x20the\x20current\x20working\x20directory\x20when\x20no\x20app\x20is\x20bound\x20yet,\x20and\x20sets\x20the\x20selected\x20app\x20as\x20the\x20directory\x20default.\x20AccessKey\x20is\x20not\x20written.','Run\x20`','33mXPyJK','191733HvyRsh','\x0aDefault\x20app:\x20','includes','isArray','Conflicting\x20workspace\x20app\x20selectors.','use','\x20--appcode\x20<code>\x20[--env\x20daily]','map','\x22\x20not\x20found.','Use\x20`','App\x20name\x20to\x20bind\x20as\x20the\x20current\x20workspace\x20default','Initialize\x20app\x20context\x20for\x20the\x20current\x20working\x20directory\x20when\x20no\x20app\x20is\x20bound\x20yet','\x20--app\x20<name>\x20[--env\x20daily]\x20or\x20','682420ubenAh','5613314rMNrNX','5831624KXOeQu','accessKey','Workspace\x20app\x20context\x20is\x20already\x20initialized.','\x20workspace\x20init\x20--appcode\x20<code>`\x20first.','defaultApp','authRequired','6hkWADo','appName','\x20workspace\x20init\x20--app\x20<name>`\x20or\x20`','Target\x20environment','126644KEqdzq','validation','string','write','85DpdMuO','Workspace\x20app\x20context\x20is\x20not\x20initialized.','envName','workspace','Missing\x20workspace\x20app\x20selector.','\x0aEnv:\x20','appcode','Invalid\x20env\x20\x22','join','Updates\x20the\x20app\x20binding\x20already\x20present\x20in\x20the\x20current\x20working\x20directory\x20and\x20sets\x20the\x20selected\x20app\x20as\x20the\x20directory\x20default.\x20AccessKey\x20is\x20not\x20written.','project','shouldWriteEnv','Workspace\x20configured.\x0aConfig\x20file:\x20','items','command','9zZYzEv','../../core/api-client.js','workspace\x20','length','Available\x20apps:\x20','object','\x22.\x20Allowed:\x20','Change\x20the\x20app\x20context\x20already\x20bound\x20to\x20the\x20current\x20working\x20directory','\x20workspace\x20use\x20--appcode\x20<code>`\x20to\x20change\x20it.','env','init','App\x20code\x20to\x20bind\x20directly','App\x20\x22','str','\x20workspace\x20use\x20--app\x20<name>`\x20or\x20`','trim','383685ZLpLYy','apps','6164310NcxHzo','app','from','Resolving\x20--app\x20requires\x20accessKey.\x20Pass\x20--appcode\x20directly,\x20or\x20set\x20accessKey\x20before\x20running\x20','appCode','Pass\x20either\x20--app\x20<name>\x20or\x20--appcode\x20<code>,\x20not\x20both.','filter','\x20workspace\x20','\x0aAccessKey:\x20not\x20written'];a88_0x13ff=function(){return _0x498910;};return a88_0x13ff();}export const workspaceDefinitions=[makeWorkspaceCommand(a88_0x43c194(0x203)),makeWorkspaceCommand(a88_0x43c194(0x21d))];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a89_0xd525e3=a89_0x1105;(function(_0x3355ae,_0x5dacd9){const _0x1a0aa7=a89_0x1105,_0x18fbcc=_0x3355ae();while(!![]){try{const _0x25f457=-parseInt(_0x1a0aa7(0x146))/0x1*(parseInt(_0x1a0aa7(0x12c))/0x2)+parseInt(_0x1a0aa7(0x15d))/0x3*(-parseInt(_0x1a0aa7(0x14d))/0x4)+parseInt(_0x1a0aa7(0x13f))/0x5+-parseInt(_0x1a0aa7(0x166))/0x6*(parseInt(_0x1a0aa7(0x135))/0x7)+parseInt(_0x1a0aa7(0x15c))/0x8+-parseInt(_0x1a0aa7(0x164))/0x9*(-parseInt(_0x1a0aa7(0x154))/0xa)+parseInt(_0x1a0aa7(0x141))/0xb*(parseInt(_0x1a0aa7(0x14b))/0xc);if(_0x25f457===_0x5dacd9)break;else _0x18fbcc['push'](_0x18fbcc['shift']());}catch(_0x3280aa){_0x18fbcc['push'](_0x18fbcc['shift']());}}}(a89_0x3fe8,0x6cc07));import{existsSync,readFileSync}from'node:fs';import{isAbsolute,resolve}from'node:path';import{CliErrors}from'../errors.js';import{ENTERPRISE_ROUTING_DOMAIN_FIELDS,ENTERPRISE_ROUTING_KIND,ENTERPRISE_ROUTING_PROTOCOL,REQUIRED_ENTERPRISE_ROUTING_DOMAIN_FIELDS}from'../generated/routing-contract.js';export const DOMAIN_CONFIG_FIELDS=[a89_0xd525e3(0x156),a89_0xd525e3(0x12b),a89_0xd525e3(0x13d),'skillDomain'];const DOMAIN_FLAGS={'userDomain':a89_0xd525e3(0x13b),'apiDomain':a89_0xd525e3(0x130),'runtimeDomain':a89_0xd525e3(0x13a),'skillDomain':a89_0xd525e3(0x15e)};function a89_0x3fe8(){const _0x641249=['platformDomain','search','api-domain','Unsupported\x20domain\x20config\x20field(s):\x20','legacy','Update\x20the\x20manifest\x20so\x20both\x20CLIs\x20consume\x20the\x20same\x20routing\x20data.','kind','7YWeLqC','domains',':\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.','password','https:','runtime-domain','user-domain','validation','runtimeDomain','Invalid\x20domain\x20config:\x20provide\x20at\x20least\x20one\x20supported\x20Domain.','4150365MpwjWy','username','1188055nSkpXX','utf8','join','filter','object','376250TwqWDU','\x20does\x20not\x20provide\x20a\x20Domain\x20for\x20','origin','Invalid\x20domain\x20config\x20JSON:\x20','pathname','60zSgpQZ','domain-config','44888lsbqen','Invalid\x20domain\x20config:\x20expected\x20a\x20JSON\x20object.','\x20and\x20has\x20no\x20default.','length','mode','Enterprise\x20routing\x20manifest\x20is\x20missing\x20required\x20Domain(s):\x20','Domain\x20config\x20file\x20not\x20found:\x20','152660HokQkH','hash','userDomain','Invalid\x20','\x22\x20and\x20kind\x20\x22',':\x20expected\x20an\x20HTTPS\x20origin\x20or\x20consumer\x20Domain\x20object.','protocol','skillDomain','3562832sTeamy','237lviHPv','skill-domain','agentDomain','str','isArray','enterprise-v1','skillHubDomain','441wZKNyA','keys','2874006fIIXKx',':\x20expected\x20a\x20non-empty\x20HTTPS\x20origin.','includes','trim','default','apiDomain','4xFJtMJ',':\x20\x22'];a89_0x3fe8=function(){return _0x641249;};return a89_0x3fe8();}export const LEGACY_DOMAIN_CONFIG_FIELDS=[a89_0xd525e3(0x15f),a89_0xd525e3(0x12e),a89_0xd525e3(0x163),'kbDomain'];const ENTERPRISE_TO_LOCAL_FIELD={'userDomain':'userDomain','apiDomain':a89_0xd525e3(0x12b),'runtimeDomain':'runtimeDomain','skillDomain':a89_0xd525e3(0x15b)},ROUTING_CONSUMER='lovrabet-cli';export function normalizeDomainOrigin(_0x4a781b,_0x12674a){const _0x1546f3=a89_0xd525e3;if(typeof _0x12674a!=='string'||!_0x12674a[_0x1546f3(0x169)]())throw CliErrors[_0x1546f3(0x13c)](_0x1546f3(0x157)+_0x4a781b+_0x1546f3(0x167));let _0x3468c5;try{_0x3468c5=new URL(_0x12674a['trim']());}catch{throw CliErrors[_0x1546f3(0x13c)](_0x1546f3(0x157)+_0x4a781b+_0x1546f3(0x12d)+_0x12674a+'\x22\x20is\x20not\x20a\x20valid\x20URL.');}if(_0x3468c5[_0x1546f3(0x15a)]!==_0x1546f3(0x139)||_0x3468c5[_0x1546f3(0x140)]||_0x3468c5[_0x1546f3(0x138)]||_0x3468c5[_0x1546f3(0x14a)]!=='/'&&_0x3468c5['pathname']!==''||_0x3468c5[_0x1546f3(0x12f)]||_0x3468c5[_0x1546f3(0x155)])throw CliErrors['validation'](_0x1546f3(0x157)+_0x4a781b+_0x1546f3(0x137),'For\x20internal\x20deployments,\x20terminate\x20TLS\x20at\x20the\x20ingress,\x20reverse\x20proxy,\x20or\x20load\x20balancer;\x20an\x20internal\x20CA\x20is\x20supported.');return _0x3468c5[_0x1546f3(0x148)];}export function normalizeRoutingDomainValue(_0x32da55,_0x56fb84){const _0x25a97c=a89_0xd525e3;if(typeof _0x56fb84==='string')return normalizeDomainOrigin(_0x32da55,_0x56fb84);if(!_0x56fb84||typeof _0x56fb84!=='object'||Array[_0x25a97c(0x161)](_0x56fb84))throw CliErrors[_0x25a97c(0x13c)](_0x25a97c(0x157)+_0x32da55+_0x25a97c(0x159));const _0x502785=_0x56fb84,_0x380406=_0x502785[ROUTING_CONSUMER]??_0x502785[_0x25a97c(0x16a)];if(_0x380406===undefined)throw CliErrors['validation']('Enterprise\x20'+_0x32da55+_0x25a97c(0x147)+ROUTING_CONSUMER+_0x25a97c(0x14f));return normalizeDomainOrigin(_0x32da55,_0x380406);}export function resolveEnterpriseRoutingConfig(_0x442d19){const _0x380a84=a89_0xd525e3;if(_0x442d19===undefined)return undefined;if(!_0x442d19||typeof _0x442d19!=='object'||Array[_0x380a84(0x161)](_0x442d19))throw CliErrors[_0x380a84(0x13c)]('Invalid\x20enterprise\x20routing\x20config:\x20expected\x20an\x20object.');return parseEnterpriseRoutingManifest(_0x442d19)[_0x380a84(0x136)];}function a89_0x1105(_0x36bcb6,_0x4ef55c){_0x36bcb6=_0x36bcb6-0x12b;const _0x3fe81a=a89_0x3fe8();let _0x110502=_0x3fe81a[_0x36bcb6];return _0x110502;}export function readDomainConfigInput(_0x44d2d4){const _0x4cbfc5=a89_0xd525e3,_0x5ccbbe=isAbsolute(_0x44d2d4)?_0x44d2d4:resolve(process['cwd'](),_0x44d2d4);if(!existsSync(_0x5ccbbe))throw CliErrors['validation'](_0x4cbfc5(0x153)+_0x5ccbbe);let _0x4a32f9;try{_0x4a32f9=JSON['parse'](readFileSync(_0x5ccbbe,_0x4cbfc5(0x142)));}catch{throw CliErrors[_0x4cbfc5(0x13c)](_0x4cbfc5(0x149)+_0x5ccbbe);}if(!_0x4a32f9||typeof _0x4a32f9!=='object'||Array['isArray'](_0x4a32f9))throw CliErrors[_0x4cbfc5(0x13c)](_0x4cbfc5(0x14e));const _0x45a3fd=_0x4a32f9;if(_0x4cbfc5(0x15a)in _0x45a3fd)return parseEnterpriseRoutingManifest(_0x45a3fd);const _0x2e14bb=Object[_0x4cbfc5(0x165)](_0x45a3fd)[_0x4cbfc5(0x144)](_0x3cd59b=>!DOMAIN_CONFIG_FIELDS[_0x4cbfc5(0x168)](_0x3cd59b));if(_0x2e14bb[_0x4cbfc5(0x150)]>0x0)throw CliErrors[_0x4cbfc5(0x13c)](_0x4cbfc5(0x131)+_0x2e14bb[_0x4cbfc5(0x143)](',\x20'),'Allowed\x20fields:\x20'+DOMAIN_CONFIG_FIELDS[_0x4cbfc5(0x143)](',\x20'));const _0x432728={};for(const _0x31e7ad of DOMAIN_CONFIG_FIELDS){_0x45a3fd[_0x31e7ad]!==undefined&&(_0x432728[_0x31e7ad]=normalizeDomainOrigin(_0x31e7ad,_0x45a3fd[_0x31e7ad]));}if(Object['keys'](_0x432728)[_0x4cbfc5(0x150)]===0x0)throw CliErrors[_0x4cbfc5(0x13c)](_0x4cbfc5(0x13e));return{'mode':_0x4cbfc5(0x132),'domains':_0x432728};}export function readDomainConfig(_0x1a1fa0){const _0x51b5b5=a89_0xd525e3;return readDomainConfigInput(_0x1a1fa0)[_0x51b5b5(0x136)];}export function resolveDomainConfigInput(_0x3322c5){const _0xfa0fba=a89_0xd525e3,_0x69008c=(_0x3322c5[_0xfa0fba(0x160)](_0xfa0fba(0x14c))||'')[_0xfa0fba(0x169)](),_0x934403=_0x69008c?readDomainConfigInput(_0x69008c):{'mode':_0xfa0fba(0x132),'domains':{}},_0x541205=DOMAIN_CONFIG_FIELDS[_0xfa0fba(0x144)](_0x103c36=>Boolean((_0x3322c5[_0xfa0fba(0x160)](DOMAIN_FLAGS[_0x103c36])||'')[_0xfa0fba(0x169)]()));if(_0x934403[_0xfa0fba(0x151)]===_0xfa0fba(0x162)&&_0x541205[_0xfa0fba(0x150)]>0x0)throw CliErrors[_0xfa0fba(0x13c)]('Enterprise\x20routing\x20manifests\x20cannot\x20be\x20combined\x20with\x20individual\x20Domain\x20flags.',_0xfa0fba(0x133));for(const _0x3f9507 of DOMAIN_CONFIG_FIELDS){const _0x47d0bc=(_0x3322c5[_0xfa0fba(0x160)](DOMAIN_FLAGS[_0x3f9507])||'')['trim']();if(_0x47d0bc)_0x934403[_0xfa0fba(0x136)][_0x3f9507]=normalizeDomainOrigin(_0x3f9507,_0x47d0bc);}return _0x934403;}export function resolveDomainFlags(_0x501615){const _0x3d757a=a89_0xd525e3;return resolveDomainConfigInput(_0x501615)[_0x3d757a(0x136)];}export function parseEnterpriseRoutingManifest(_0x25e918){const _0x415cee=a89_0xd525e3;if(_0x25e918[_0x415cee(0x15a)]!==ENTERPRISE_ROUTING_PROTOCOL||_0x25e918[_0x415cee(0x134)]!==ENTERPRISE_ROUTING_KIND)throw CliErrors['validation']('Unsupported\x20routing\x20manifest:\x20expected\x20protocol\x20\x22'+ENTERPRISE_ROUTING_PROTOCOL+_0x415cee(0x158)+ENTERPRISE_ROUTING_KIND+'\x22.');if(!_0x25e918[_0x415cee(0x136)]||typeof _0x25e918['domains']!==_0x415cee(0x145)||Array[_0x415cee(0x161)](_0x25e918['domains']))throw CliErrors[_0x415cee(0x13c)]('Invalid\x20enterprise\x20routing\x20manifest:\x20domains\x20must\x20be\x20an\x20object.');const _0x4300eb=_0x25e918[_0x415cee(0x136)],_0x35e510=REQUIRED_ENTERPRISE_ROUTING_DOMAIN_FIELDS[_0x415cee(0x144)](_0x2a7f22=>_0x4300eb[_0x2a7f22]===undefined);if(_0x35e510[_0x415cee(0x150)]>0x0)throw CliErrors[_0x415cee(0x13c)](_0x415cee(0x152)+_0x35e510['join'](',\x20'));const _0x52f718={},_0x1ce95a={};for(const _0x31917e of ENTERPRISE_ROUTING_DOMAIN_FIELDS){const _0x2bfbe9=_0x4300eb[_0x31917e];if(_0x2bfbe9===undefined)continue;const _0x214a79=normalizeRoutingDomainValue(_0x31917e,_0x2bfbe9);_0x52f718[_0x31917e]=_0x214a79;const _0x5bf0e7=ENTERPRISE_TO_LOCAL_FIELD[_0x31917e];_0x5bf0e7&&(_0x1ce95a[_0x5bf0e7]=_0x214a79);}return{'mode':'enterprise-v1','domains':_0x1ce95a,'manifestDomains':_0x52f718};}
|
package/lib/config/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a90_0x38f063=a90_0x2f14;(function(_0x122199,_0x1942f8){const _0x388b4d=a90_0x2f14,_0x1b53fb=_0x122199();while(!![]){try{const _0x288b15=-parseInt(_0x388b4d(0x1d8))/0x1*(-parseInt(_0x388b4d(0x1e6))/0x2)+-parseInt(_0x388b4d(0x1cd))/0x3+-parseInt(_0x388b4d(0x1dc))/0x4+-parseInt(_0x388b4d(0x1c9))/0x5*(-parseInt(_0x388b4d(0x1dd))/0x6)+-parseInt(_0x388b4d(0x1d2))/0x7+parseInt(_0x388b4d(0x1de))/0x8+-parseInt(_0x388b4d(0x1e5))/0x9*(parseInt(_0x388b4d(0x1e2))/0xa);if(_0x288b15===_0x1942f8)break;else _0x1b53fb['push'](_0x1b53fb['shift']());}catch(_0x3dc14c){_0x1b53fb['push'](_0x1b53fb['shift']());}}}(a90_0x11bf,0xcb1c5));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{OUTPUT_FORMAT_VALUES}from'../constant/output.js';import{DEFAULT_LOVRABET_REGION,ENABLED_LOVRABET_REGION_VALUES}from'../constant/region.js';export const CONFIG_FIELD_SCHEMAS={'routing':{'description':a90_0x38f063(0x1d3),'topLevel':!![]},'region':{'description':a90_0x38f063(0x1cf),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':ENABLED_LOVRABET_REGION_VALUES,'defaultValue':DEFAULT_LOVRABET_REGION,'importable':!![]},'env':{'description':a90_0x38f063(0x1e4),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':RUNTIME_ENV_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a90_0x38f063(0x1df)],'importable':!![]},'format':{'description':'Default\x20output\x20format','topLevel':!![],'cliSettableTopLevel':!![],'enumValues':OUTPUT_FORMAT_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a90_0x38f063(0x1e1)],'importable':!![]},'pageSize':{'description':a90_0x38f063(0x1e8),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'apiDomain':{'description':a90_0x38f063(0x1e0),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'userDomain':{'description':a90_0x38f063(0x1db),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'runtimeDomain':{'description':a90_0x38f063(0x1e3),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'skillDomain':{'description':a90_0x38f063(0x1d0),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'accessKey':{'description':a90_0x38f063(0x1cc),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'riskLevel':{'description':a90_0x38f063(0x1c7),'topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a90_0x38f063(0x1ce)],'importable':!![]},'nativeToolAvailable':{'description':'Native\x20Lovrabet\x20tool\x20availability\x20in\x20the\x20current\x20execution\x20host','topLevel':!![],'defaultValue':![]},'locale':{'description':'App\x20locale\x20(not\x20CLI\x20language;\x20reserved\x20for\x20later\x20app\x20use)','topLevel':!![],'cliSettableTopLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES['locale'],'importable':!![]}};export const TOP_LEVEL_CONFIG_KEYS=new Set(Object['entries'](CONFIG_FIELD_SCHEMAS)[a90_0x38f063(0x1d9)](([,_0x24d332])=>_0x24d332['cliSettableTopLevel'])[a90_0x38f063(0x1d4)](([_0x23d338])=>_0x23d338));export const CLI_PROTECTED_CONFIG_KEYS=new Set([a90_0x38f063(0x1ce),'nativeToolAvailable']);export const CONFIG_ENUM_VALUES=Object['fromEntries'](Object[a90_0x38f063(0x1d7)](CONFIG_FIELD_SCHEMAS)[a90_0x38f063(0x1d9)](([,_0x3878ee])=>_0x3878ee[a90_0x38f063(0x1ca)])['map'](([_0x169db1,_0x58948b])=>[_0x169db1,[..._0x58948b[a90_0x38f063(0x1ca)]||[]]]));export const IMPORTABLE_RUNTIME_CONFIG_KEYS=Object['entries'](CONFIG_FIELD_SCHEMAS)[a90_0x38f063(0x1d9)](([,_0x330749])=>_0x330749['importable'])[a90_0x38f063(0x1d4)](([_0x352cec])=>_0x352cec);export function getConfigFieldSchema(_0xc55497){return CONFIG_FIELD_SCHEMAS[_0xc55497];}export function getConfigEnumValues(_0x5bfb2d){const _0x408b65=a90_0x38f063;return getConfigFieldSchema(_0x5bfb2d)?.[_0x408b65(0x1ca)];}export function getConfigDefaultValue(_0x416fea){const _0x47f147=a90_0x38f063;return getConfigFieldSchema(_0x416fea)?.[_0x47f147(0x1d6)];}function a90_0x11bf(){const _0x5c92c3=['5985LPKTVm','riskLevel','Lovrabet\x20region','Override\x20SkillHub\x20domain','Config\x20key.\x20Top-level:\x20','239078nqDVfE','Versioned\x20enterprise\x20routing\x20manifest','map','zh-CN','defaultValue','entries','22793uxNPqF','filter','legacyCompatOnly','Override\x20user\x20domain','5266640bxWVio','7884UINKfM','6847440vQYCFK','env','Override\x20API\x20domain','format','10471000bTRSfs','Override\x20runtime\x20domain','Target\x20environment','9RQAoWV','76ZiSmJZ','join','Default\x20page\x20size','Risk\x20level','en-US','5745mMfSRS','enumValues','has','Access\x20key\x20(client-ak\x20auth)'];a90_0x11bf=function(){return _0x5c92c3;};return a90_0x11bf();}function a90_0x2f14(_0x412229,_0x647c43){_0x412229=_0x412229-0x1c7;const _0x11bfcd=a90_0x11bf();let _0x2f14b5=_0x11bfcd[_0x412229];return _0x2f14b5;}export function isTopLevelConfigKey(_0xcf0aa0){const _0x468370=a90_0x38f063;return TOP_LEVEL_CONFIG_KEYS[_0x468370(0x1cb)](_0xcf0aa0);}export function isCliProtectedConfigKey(_0x77a709){const _0xa27099=a90_0x38f063;return CLI_PROTECTED_CONFIG_KEYS[_0xa27099(0x1cb)](_0x77a709);}const LOCALE_MAP={'zh':a90_0x38f063(0x1d5),'zh-cn':a90_0x38f063(0x1d5),'zh_cn':a90_0x38f063(0x1d5),'en':a90_0x38f063(0x1c8),'en-us':a90_0x38f063(0x1c8),'en_us':a90_0x38f063(0x1c8)};export function normalizeLocale(_0x57f24c){if(!_0x57f24c)return null;return LOCALE_MAP[_0x57f24c['toLowerCase']()]??null;}export function isLegacyCompatConfigKey(_0x5c77d7){const _0x1ae798=a90_0x38f063;return getConfigFieldSchema(_0x5c77d7)?.[_0x1ae798(0x1da)]===!![];}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function formatConfigKeyList(_0x330922){const _0x468e2e=a90_0x38f063;return[..._0x330922][_0x468e2e(0x1e7)](',\x20');}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0xd370ee=a90_0x38f063;return _0xd370ee(0x1d1)+getTopLevelConfigKeySummary()+';\x20local\x20alias:\x20apps.<alias>.appcode';}export function buildAppProfileListFields(_0x544316){return{'env':_0x544316,'hasAccessKey':![],'format':null,'pageSize':null,'riskLevel':null,'locale':null};}
|
package/lib/constant/app.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a91_0x34bbad=a91_0x1d61;function a91_0x1d61(_0x27ecb9,_0x83b5e4){_0x27ecb9=_0x27ecb9-0xd1;const _0x5838b1=a91_0x5838();let _0x1d6129=_0x5838b1[_0x27ecb9];return _0x1d6129;}(function(_0x14aaab,_0x3a811f){const _0x3ddc45=a91_0x1d61,_0x1f542d=_0x14aaab();while(!![]){try{const _0x15b939=parseInt(_0x3ddc45(0xd3))/0x1*(parseInt(_0x3ddc45(0xd9))/0x2)+-parseInt(_0x3ddc45(0xd2))/0x3+-parseInt(_0x3ddc45(0xd1))/0x4*(parseInt(_0x3ddc45(0xd4))/0x5)+parseInt(_0x3ddc45(0xd5))/0x6*(-parseInt(_0x3ddc45(0xdc))/0x7)+parseInt(_0x3ddc45(0xd8))/0x8+-parseInt(_0x3ddc45(0xdd))/0x9+parseInt(_0x3ddc45(0xda))/0xa*(parseInt(_0x3ddc45(0xd6))/0xb);if(_0x15b939===_0x3a811f)break;else _0x1f542d['push'](_0x1f542d['shift']());}catch(_0x165fac){_0x1f542d['push'](_0x1f542d['shift']());}}}(a91_0x5838,0xb6428));export const APP_PUBLISH_STATUS={'Published':a91_0x34bbad(0xdb),'Unpublished':a91_0x34bbad(0xd7)};export const RUNTIME_ACCESSIBLE_APP_STATUS=APP_PUBLISH_STATUS['Published'];function a91_0x5838(){const _0x395f6f=['2042392ZxIjCO','UNPUBLISH','11590224UsmIYM','1132IVhsnd','80ohZukR','PUBLISHED','2948918sbBchW','3232548tJJrgQ','8wHykcX','3162060lSwokL','469LIZWLc','493330FlYKOo','12sxKvhB'];a91_0x5838=function(){return _0x395f6f;};return a91_0x5838();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a92_0x4bff94=a92_0x591d;(function(_0x2afb73,_0x46e291){const _0x522a35=a92_0x591d,_0x281354=_0x2afb73();while(!![]){try{const _0x3447aa=-parseInt(_0x522a35(0x197))/0x1+parseInt(_0x522a35(0x194))/0x2*(parseInt(_0x522a35(0x191))/0x3)+parseInt(_0x522a35(0x199))/0x4+parseInt(_0x522a35(0x193))/0x5*(parseInt(_0x522a35(0x19a))/0x6)+parseInt(_0x522a35(0x192))/0x7*(parseInt(_0x522a35(0x18f))/0x8)+-parseInt(_0x522a35(0x196))/0x9*(parseInt(_0x522a35(0x190))/0xa)+-parseInt(_0x522a35(0x198))/0xb;if(_0x3447aa===_0x46e291)break;else _0x281354['push'](_0x281354['shift']());}catch(_0x40cb02){_0x281354['push'](_0x281354['shift']());}}}(a92_0xd320,0x57428));function a92_0x591d(_0x5f4650,_0x35f7b3){_0x5f4650=_0x5f4650-0x18f;const _0xd3201a=a92_0xd320();let _0x591d7a=_0xd3201a[_0x5f4650];return _0x591d7a;}export const AUTH_MODE={'ClientAk':a92_0x4bff94(0x195)};export function isAuthMode(_0x40e709){return _0x40e709===AUTH_MODE['ClientAk'];}function a92_0xd320(){const _0x480016=['10KhiJMM','3040Mfdlvo','client-ak','9aFmxZG','226867IyutLq','4550095QoipHp','543516PndwXD','1520604vJCZii','2802952oZvaeW','3204680rRtOus','642OfMDho','7qjeAmd'];a92_0xd320=function(){return _0x480016;};return a92_0xd320();}
|
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a93_0x8ff7(){const _0x34ca69=['<name>','Clear\x20output','Record\x20ID','production\x20|\x20development\x20|\x20daily','10iDcfoW','appcode','Preview\x20operation\x20without\x20executing','params','<code>','<expr>','10wRahSh','2288539dvdqvy','format','boolean','Name\x20filter','sqlcode','verbose','json\x20|\x20pretty\x20|\x20compress','global','env','type','help','cliDisplayName','393252jLtmxZ','429nNMSKg','yes','string','nonInteractive','dry-run','name','clear','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20implies\x20--format\x20json\x20when\x20current\x20format\x20is\x20pretty)','cliBinName','meowKey','Output\x20format','Use\x20global\x20config\x20scope','50bcWvrA','JSON\x20params\x20for\x20execute\x20commands','fromEntries','720759xhercz','app','Alias\x20for\x20--non-interactive','1614owOReB','36pFCPhj','5761ZcxSft','111256ZbcyuY','Skip\x20confirmation\x20for\x20high-risk\x20writes','SQL\x20query\x20code','Force\x20non-interactive\x20mode\x20(CI)','Override\x20appcode','Select\x20app\x20profile\x20by\x20name','Verbose\x20output','8269cscyQC','36944oEpNum'];a93_0x8ff7=function(){return _0x34ca69;};return a93_0x8ff7();}const a93_0x2c16c4=a93_0x41d3;function a93_0x41d3(_0x86a811,_0x5efe7d){_0x86a811=_0x86a811-0x145;const _0x8ff7f8=a93_0x8ff7();let _0x41d30a=_0x8ff7f8[_0x86a811];return _0x41d30a;}(function(_0x25ea86,_0x3c1973){const _0x2f106e=a93_0x41d3,_0x1f645a=_0x25ea86();while(!![]){try{const _0x9d608b=-parseInt(_0x2f106e(0x148))/0x1*(parseInt(_0x2f106e(0x16e))/0x2)+-parseInt(_0x2f106e(0x171))/0x3+parseInt(_0x2f106e(0x177))/0x4*(-parseInt(_0x2f106e(0x154))/0x5)+parseInt(_0x2f106e(0x174))/0x6*(-parseInt(_0x2f106e(0x176))/0x7)+-parseInt(_0x2f106e(0x149))/0x8*(parseInt(_0x2f106e(0x175))/0x9)+parseInt(_0x2f106e(0x14e))/0xa*(-parseInt(_0x2f106e(0x155))/0xb)+parseInt(_0x2f106e(0x161))/0xc*(parseInt(_0x2f106e(0x162))/0xd);if(_0x9d608b===_0x3c1973)break;else _0x1f645a['push'](_0x1f645a['shift']());}catch(_0x20edc1){_0x1f645a['push'](_0x1f645a['shift']());}}}(a93_0x8ff7,0x1ff71));import{PRODUCT_CONFIG}from'../constant/product.js';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';export const CLI_BIN_NAME=PRODUCT_CONFIG[a93_0x2c16c4(0x16a)];export const CLI_DISPLAY_NAME=PRODUCT_CONFIG[a93_0x2c16c4(0x160)];export const NPM_PACKAGE_NAME=LOVRABET_NPM_PACKAGE_NAME;export const GLOBAL_FLAGS=[{'name':a93_0x2c16c4(0x14f),'meowKey':a93_0x2c16c4(0x14f),'type':a93_0x2c16c4(0x164),'description':a93_0x2c16c4(0x145),'hint':a93_0x2c16c4(0x152)},{'name':a93_0x2c16c4(0x172),'meowKey':a93_0x2c16c4(0x172),'type':a93_0x2c16c4(0x164),'description':a93_0x2c16c4(0x146),'hint':a93_0x2c16c4(0x14a)},{'name':a93_0x2c16c4(0x15d),'meowKey':a93_0x2c16c4(0x15d),'type':a93_0x2c16c4(0x164),'description':'Environment','hint':a93_0x2c16c4(0x14d)},{'name':a93_0x2c16c4(0x156),'meowKey':'format','type':a93_0x2c16c4(0x164),'description':a93_0x2c16c4(0x16c),'hint':a93_0x2c16c4(0x15b)},{'name':'jq','meowKey':'jq','type':a93_0x2c16c4(0x164),'description':a93_0x2c16c4(0x169),'hint':a93_0x2c16c4(0x153)},{'name':a93_0x2c16c4(0x166),'meowKey':'dryRun','type':'boolean','description':a93_0x2c16c4(0x150)},{'name':a93_0x2c16c4(0x163),'meowKey':a93_0x2c16c4(0x163),'type':a93_0x2c16c4(0x157),'description':a93_0x2c16c4(0x178)},{'name':'non-interactive','meowKey':a93_0x2c16c4(0x165),'type':'boolean','description':a93_0x2c16c4(0x17a)},{'name':a93_0x2c16c4(0x15c),'meowKey':a93_0x2c16c4(0x15c),'type':a93_0x2c16c4(0x157),'description':a93_0x2c16c4(0x16d)},{'name':'ci','meowKey':'ci','type':a93_0x2c16c4(0x157),'description':a93_0x2c16c4(0x173),'hidden':!![]},{'name':a93_0x2c16c4(0x15f),'meowKey':'help','type':a93_0x2c16c4(0x157),'description':'Show\x20help'},{'name':'id','meowKey':'id','type':a93_0x2c16c4(0x164),'description':a93_0x2c16c4(0x14c),'hidden':!![]},{'name':a93_0x2c16c4(0x167),'meowKey':a93_0x2c16c4(0x167),'type':a93_0x2c16c4(0x164),'description':a93_0x2c16c4(0x158),'hidden':!![]},{'name':a93_0x2c16c4(0x159),'meowKey':'sqlcode','type':a93_0x2c16c4(0x164),'description':a93_0x2c16c4(0x179),'hidden':!![]},{'name':'params','meowKey':a93_0x2c16c4(0x151),'type':a93_0x2c16c4(0x164),'description':a93_0x2c16c4(0x16f),'hidden':!![]},{'name':a93_0x2c16c4(0x15a),'meowKey':a93_0x2c16c4(0x15a),'type':'boolean','description':a93_0x2c16c4(0x147),'hidden':!![]},{'name':'clear','meowKey':a93_0x2c16c4(0x168),'type':'boolean','description':a93_0x2c16c4(0x14b),'hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a93_0x2c16c4(0x14f),'app',a93_0x2c16c4(0x15d),a93_0x2c16c4(0x156),'jq',a93_0x2c16c4(0x166),a93_0x2c16c4(0x163),'non-interactive','ci']);export function buildMeowFlags(){const _0x521afa=a93_0x2c16c4;return Object[_0x521afa(0x170)](GLOBAL_FLAGS['map'](_0x3200f6=>[_0x3200f6[_0x521afa(0x16b)],{'type':_0x3200f6[_0x521afa(0x15e)]}]));}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a94_0x1d94(){const _0x8662c2=['18YhFECh','2816499vTwnrE','280nSeYmv','640270BDmwEA','1753676kZrbSc','2574aHKnaa','3ieCDrs','377361zPSrGs','production','760710zTlZPX','main','compress','write','750160rlfNTt'];a94_0x1d94=function(){return _0x8662c2;};return a94_0x1d94();}function a94_0x4258(_0x16a6a4,_0x1da223){_0x16a6a4=_0x16a6a4-0xf1;const _0x1d94ea=a94_0x1d94();let _0x4258c9=_0x1d94ea[_0x16a6a4];return _0x4258c9;}const a94_0x2fa0ce=a94_0x4258;(function(_0x101f9c,_0x2067b3){const _0x1482c6=a94_0x4258,_0x23ac74=_0x101f9c();while(!![]){try{const _0x4d082b=-parseInt(_0x1482c6(0xf9))/0x1+parseInt(_0x1482c6(0xf1))/0x2+-parseInt(_0x1482c6(0xf8))/0x3*(parseInt(_0x1482c6(0xf6))/0x4)+-parseInt(_0x1482c6(0xfb))/0x5*(-parseInt(_0x1482c6(0xf2))/0x6)+parseInt(_0x1482c6(0xf3))/0x7+parseInt(_0x1482c6(0xf4))/0x8*(parseInt(_0x1482c6(0xf7))/0x9)+-parseInt(_0x1482c6(0xf5))/0xa;if(_0x4d082b===_0x2067b3)break;else _0x23ac74['push'](_0x23ac74['shift']());}catch(_0x2f3c36){_0x23ac74['push'](_0x23ac74['shift']());}}}(a94_0x1d94,0x58e22));export const DEFAULT_APP_PROFILE_NAME=a94_0x2fa0ce(0xfc);export const DEFAULT_CONFIG_VALUES={'env':a94_0x2fa0ce(0xfa),'format':a94_0x2fa0ce(0xfd),'locale':'en-US','riskLevel':a94_0x2fa0ce(0xfe)};export const DEFAULT_COMMAND_OUTPUT_FORMAT=a94_0x2fa0ce(0xfd);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a95_0xe094bd=a95_0x2265;(function(_0x9cee97,_0x1d55fe){const _0x2bb35d=a95_0x2265,_0x402d05=_0x9cee97();while(!![]){try{const _0x9a43e4=parseInt(_0x2bb35d(0x1cb))/0x1+parseInt(_0x2bb35d(0x1ce))/0x2*(-parseInt(_0x2bb35d(0x1c7))/0x3)+parseInt(_0x2bb35d(0x1cc))/0x4*(-parseInt(_0x2bb35d(0x1c3))/0x5)+parseInt(_0x2bb35d(0x1c5))/0x6*(parseInt(_0x2bb35d(0x1cf))/0x7)+-parseInt(_0x2bb35d(0x1c9))/0x8+-parseInt(_0x2bb35d(0x1c8))/0x9+-parseInt(_0x2bb35d(0x1c2))/0xa*(-parseInt(_0x2bb35d(0x1d0))/0xb);if(_0x9a43e4===_0x1d55fe)break;else _0x402d05['push'](_0x402d05['shift']());}catch(_0x2aa210){_0x402d05['push'](_0x402d05['shift']());}}}(a95_0x5e99,0x90a68));import{PRODUCT_CONFIG}from'../constant/product.js';export const LOVRABET_NPM_PACKAGE_NAME=PRODUCT_CONFIG[a95_0xe094bd(0x1c4)];function a95_0x2265(_0x320cbb,_0x4961ba){_0x320cbb=_0x320cbb-0x1c2;const _0x5e992b=a95_0x5e99();let _0x2265f1=_0x5e992b[_0x320cbb];return _0x2265f1;}export const LOVRABET_SKILL_SOURCE=PRODUCT_CONFIG[a95_0xe094bd(0x1cd)];export const NPM_REGISTRY_BASE_URL=PRODUCT_CONFIG[a95_0xe094bd(0x1c6)];function a95_0x5e99(){const _0x108765=['5832066rgUYMg','npmRegistryBaseUrl','292971PWPASQ','1479096eGJUNe','7896256emPdPU','cliCdnBaseUrl','1037691MUTWmT','52ckmUtf','skillSource','18NXFUoo','7iOFWZw','968VjuuBN','143060YYhVvl','248405GsynVK','npmPackageName'];a95_0x5e99=function(){return _0x108765;};return a95_0x5e99();}export const LOVRABET_CLI_CDN_BASE_URL=PRODUCT_CONFIG[a95_0xe094bd(0x1ca)];export const LOVRABET_CLI_VERSION_POLICY_URL=LOVRABET_CLI_CDN_BASE_URL+'/dist/lovrabet-cli/config/index.json';
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a96_0xc600(_0x5ebf72,_0x3efcd6){_0x5ebf72=_0x5ebf72-0xc4;const _0x54eff2=a96_0x54ef();let _0xc60028=_0x54eff2[_0x5ebf72];return _0xc60028;}const a96_0xb59e24=a96_0xc600;(function(_0x1a7293,_0x18123e){const _0x127e96=a96_0xc600,_0x153250=_0x1a7293();while(!![]){try{const _0x13a26a=-parseInt(_0x127e96(0xd6))/0x1*(parseInt(_0x127e96(0xd4))/0x2)+parseInt(_0x127e96(0xcd))/0x3*(-parseInt(_0x127e96(0xcb))/0x4)+parseInt(_0x127e96(0xca))/0x5+-parseInt(_0x127e96(0xc5))/0x6+parseInt(_0x127e96(0xc4))/0x7*(parseInt(_0x127e96(0xc6))/0x8)+parseInt(_0x127e96(0xce))/0x9*(parseInt(_0x127e96(0xc9))/0xa)+-parseInt(_0x127e96(0xd7))/0xb;if(_0x13a26a===_0x18123e)break;else _0x153250['push'](_0x153250['shift']());}catch(_0x3e2d2e){_0x153250['push'](_0x153250['shift']());}}}(a96_0x54ef,0x94c8a));import{getEnv,isProduction}from'../constant/env.js';import{OFFICIAL_ROUTING_PROFILES}from'../generated/official-routing.js';import{DEFAULT_LOVRABET_REGION}from'../constant/region.js';let customApiDomain,customUserDomain,customRuntimeDomain,customSkillDomain,activeRegion=DEFAULT_LOVRABET_REGION;export function initDomains(_0x4045ce){const _0x27378e=a96_0xc600;customApiDomain=_0x4045ce?.[_0x27378e(0xd5)],customUserDomain=_0x4045ce?.['userDomain'],customRuntimeDomain=_0x4045ce?.[_0x27378e(0xd3)],customSkillDomain=_0x4045ce?.[_0x27378e(0xc8)],activeRegion=_0x4045ce?.[_0x27378e(0xd1)]??DEFAULT_LOVRABET_REGION;}const getActiveRegionDomains=()=>{const _0x37c25f=a96_0xc600,_0x456c1b=OFFICIAL_ROUTING_PROFILES[activeRegion]['serviceDomains'];return isProduction(getEnv())?_0x456c1b[_0x37c25f(0xc7)]:_0x37c25f(0xd2)in _0x456c1b?_0x456c1b[_0x37c25f(0xd2)]:_0x456c1b[_0x37c25f(0xc7)];};export const getUserDomain=()=>customUserDomain||getActiveRegionDomains()[a96_0xb59e24(0xd0)];export const getApiDomain=()=>customApiDomain||getActiveRegionDomains()['api'];export const getRuntimeDomain=()=>customRuntimeDomain||getActiveRegionDomains()[a96_0xb59e24(0xcc)];function a96_0x54ef(){const _0x1ffe4c=['2012586QglmPt','280Wzseru','production','skillDomain','150xyBkej','4166305rOSDRu','168836pbySJn','runtime','21oZtuQX','686547ccrfou','skill','user','region','daily','runtimeDomain','4ZEccmm','apiDomain','94883wIOCKF','15294818iRdMXR','168602PtiCGY'];a96_0x54ef=function(){return _0x1ffe4c;};return a96_0x54ef();}export const getSkillDomain=()=>customSkillDomain||getActiveRegionDomains()[a96_0xb59e24(0xcf)];
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a97_0x3593d0=a97_0x54a3;(function(_0xc25612,_0x4b32ee){const _0x28aa72=a97_0x54a3,_0x206873=_0xc25612();while(!![]){try{const _0x8b149d=-parseInt(_0x28aa72(0x187))/0x1*(parseInt(_0x28aa72(0x182))/0x2)+-parseInt(_0x28aa72(0x18d))/0x3+parseInt(_0x28aa72(0x18a))/0x4*(-parseInt(_0x28aa72(0x190))/0x5)+parseInt(_0x28aa72(0x18f))/0x6+parseInt(_0x28aa72(0x188))/0x7+parseInt(_0x28aa72(0x18e))/0x8+parseInt(_0x28aa72(0x189))/0x9*(parseInt(_0x28aa72(0x183))/0xa);if(_0x8b149d===_0x4b32ee)break;else _0x206873['push'](_0x206873['shift']());}catch(_0x46d0c2){_0x206873['push'](_0x206873['shift']());}}}(a97_0x26f9,0x66598));import{productEnv}from'../constant/product.js';export const RUNTIME_ENV_VALUES=[a97_0x3593d0(0x18b),'development',a97_0x3593d0(0x18c)];export function normalizeEnv(_0x3b077d){const _0x170af1=a97_0x3593d0;return _0x3b077d==='online'?_0x170af1(0x18b):_0x3b077d;}function a97_0x54a3(_0x247e9a,_0x43f050){_0x247e9a=_0x247e9a-0x182;const _0x26f979=a97_0x26f9();let _0x54a304=_0x26f979[_0x247e9a];return _0x54a304;}export function isProduction(_0xc5656a){const _0x57eb53=a97_0x3593d0;return normalizeEnv(_0xc5656a)===_0x57eb53(0x18b);}function a97_0x26f9(){const _0x18ebe3=['dev','development','ENV','22753wOyYYH','4643737KGyadc','9LXoFXA','116uDqzrc','production','daily','794226MDEkOI','1824224GauryG','2204520mFzHFr','93175dIyPFQ','34nFtkyc','3523430NFgEmZ'];a97_0x26f9=function(){return _0x18ebe3;};return a97_0x26f9();}export function isDaily(_0x200020){const _0x2f9802=a97_0x3593d0;return normalizeEnv(_0x200020)===_0x2f9802(0x18c);}export function isDev(_0x13591f){const _0x3f8713=a97_0x3593d0,_0x13fd79=normalizeEnv(_0x13591f);return _0x13fd79===_0x3f8713(0x185)||_0x13fd79===_0x3f8713(0x184);}let env=normalizeEnv(productEnv(a97_0x3593d0(0x186))||a97_0x3593d0(0x18b));export function getEnv(){return env;}export function initEnv(_0xdf062d){env=normalizeEnv(_0xdf062d);}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a98_0x16c758=a98_0x3223;(function(_0x2e7605,_0x2b3d36){const _0x435061=a98_0x3223,_0x55f2d2=_0x2e7605();while(!![]){try{const _0x16968b=parseInt(_0x435061(0x157))/0x1*(parseInt(_0x435061(0x14d))/0x2)+parseInt(_0x435061(0x152))/0x3+-parseInt(_0x435061(0x150))/0x4+parseInt(_0x435061(0x14c))/0x5+parseInt(_0x435061(0x14f))/0x6+-parseInt(_0x435061(0x154))/0x7+parseInt(_0x435061(0x151))/0x8*(-parseInt(_0x435061(0x14e))/0x9);if(_0x16968b===_0x2b3d36)break;else _0x55f2d2['push'](_0x55f2d2['shift']());}catch(_0x4eb2ac){_0x55f2d2['push'](_0x55f2d2['shift']());}}}(a98_0x5c48,0x94833));export const OUTPUT_FORMAT_VALUES=[a98_0x16c758(0x155),a98_0x16c758(0x156),a98_0x16c758(0x153)];function a98_0x3223(_0x4cdfa0,_0x33d3ed){_0x4cdfa0=_0x4cdfa0-0x14c;const _0x5c48cf=a98_0x5c48();let _0x3223b7=_0x5c48cf[_0x4cdfa0];return _0x3223b7;}function a98_0x5c48(){const _0x45aea0=['4795644fpACsE','104IVWSmQ','3608079NGRmUR','compress','2472799NQZTAJ','json','pretty','229523dyrzBo','75180VWeZrJ','6GVhDXR','158967unUyyz','2902776cQGjJE'];a98_0x5c48=function(){return _0x45aea0;};return a98_0x5c48();}
|