@lovrabet/lovrabet-cli 2.1.21 → 2.1.22-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- 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/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/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/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.d.ts +4 -0
- package/lib/commands/skill/commands/diagram.js +1 -0
- 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.d.ts +5 -0
- package/lib/commands/skill/diagram.js +1 -0
- package/lib/commands/skill/flags.d.ts +6 -0
- 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.d.ts +4 -0
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.d.ts +52 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/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/help.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/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/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +3 -1
package/lib/config/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a65_0xb800af=a65_0x26d9;(function(_0x3d1c1a,_0x1e6483){const _0x55697b=a65_0x26d9,_0x9d1f69=_0x3d1c1a();while(!![]){try{const _0x414dbe=parseInt(_0x55697b(0x9e))/0x1+-parseInt(_0x55697b(0x86))/0x2+-parseInt(_0x55697b(0x95))/0x3+-parseInt(_0x55697b(0x96))/0x4+-parseInt(_0x55697b(0x9d))/0x5+-parseInt(_0x55697b(0x97))/0x6*(parseInt(_0x55697b(0x8d))/0x7)+parseInt(_0x55697b(0x8b))/0x8;if(_0x414dbe===_0x1e6483)break;else _0x9d1f69['push'](_0x9d1f69['shift']());}catch(_0x553623){_0x9d1f69['push'](_0x9d1f69['shift']());}}}(a65_0x3246,0x51b03));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{OUTPUT_FORMAT_VALUES}from'../constant/output.js';export const CONFIG_FIELD_SCHEMAS={'env':{'description':a65_0xb800af(0x91),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':RUNTIME_ENV_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES['env'],'importable':!![]},'format':{'description':a65_0xb800af(0x9c),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':OUTPUT_FORMAT_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a65_0xb800af(0x92)],'importable':!![]},'pageSize':{'description':'Default\x20page\x20size','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'apiDomain':{'description':a65_0xb800af(0x89),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'userDomain':{'description':a65_0xb800af(0x8e),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'runtimeDomain':{'description':a65_0xb800af(0xa1),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'skillHubDomain':{'description':a65_0xb800af(0x99),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'accessKey':{'description':'Access\x20key\x20(client-ak\x20auth)','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'riskLevel':{'description':a65_0xb800af(0x87),'topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a65_0xb800af(0xa0)],'importable':!![]},'locale':{'description':a65_0xb800af(0x98),'topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a65_0xb800af(0x93)],'importable':!![],'legacyCompatOnly':!![]}};export const TOP_LEVEL_CONFIG_KEYS=new Set(Object[a65_0xb800af(0x90)](CONFIG_FIELD_SCHEMAS)['filter'](([,_0x506f9c])=>_0x506f9c[a65_0xb800af(0x9a)])['map'](([_0x19ece3])=>_0x19ece3));export const CONFIG_ENUM_VALUES=Object['fromEntries'](Object[a65_0xb800af(0x90)](CONFIG_FIELD_SCHEMAS)[a65_0xb800af(0x94)](([,_0x2563eb])=>_0x2563eb[a65_0xb800af(0x8a)])[a65_0xb800af(0x8f)](([_0x650763,_0x2902b8])=>[_0x650763,[..._0x2902b8[a65_0xb800af(0x8a)]||[]]]));export const IMPORTABLE_RUNTIME_CONFIG_KEYS=Object[a65_0xb800af(0x90)](CONFIG_FIELD_SCHEMAS)[a65_0xb800af(0x94)](([,_0x26c66f])=>_0x26c66f[a65_0xb800af(0x9b)])[a65_0xb800af(0x8f)](([_0x3faeac])=>_0x3faeac);export function getConfigFieldSchema(_0x5ebfc3){return CONFIG_FIELD_SCHEMAS[_0x5ebfc3];}export function getConfigEnumValues(_0x13fd21){return getConfigFieldSchema(_0x13fd21)?.['enumValues'];}function a65_0x26d9(_0x410b14,_0x127fe2){_0x410b14=_0x410b14-0x85;const _0x324612=a65_0x3246();let _0x26d984=_0x324612[_0x410b14];return _0x26d984;}export function getConfigDefaultValue(_0x3c82d4){const _0x307cd5=a65_0xb800af;return getConfigFieldSchema(_0x3c82d4)?.[_0x307cd5(0xa2)];}export function isTopLevelConfigKey(_0x400306){return TOP_LEVEL_CONFIG_KEYS['has'](_0x400306);}export function isLegacyCompatConfigKey(_0x4ce11b){const _0x4c9415=a65_0xb800af;return getConfigFieldSchema(_0x4ce11b)?.[_0x4c9415(0x8c)]===!![];}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function formatConfigKeyList(_0x2308a3){const _0x46fec1=a65_0xb800af;return[..._0x2308a3][_0x46fec1(0x9f)](',\x20');}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x171c73=a65_0xb800af;return _0x171c73(0x88)+getTopLevelConfigKeySummary()+_0x171c73(0x85);}function a65_0x3246(){const _0x118511=['Default\x20output\x20format','2857850yaEzAZ','542839BrKGGT','join','riskLevel','Override\x20runtime\x20domain','defaultValue',';\x20local\x20alias:\x20apps.<alias>.appcode','1092308gyXBPJ','Risk\x20level','Config\x20key.\x20Top-level:\x20','Override\x20API\x20domain','enumValues','10396712KlRLxT','legacyCompatOnly','56YfdnTg','Override\x20user\x20domain','map','entries','Target\x20environment','format','locale','filter','1023795WYHtMv','81904BMbIjd','21276dSQNXI','Locale','Override\x20SkillHub\x20domain','cliSettableTopLevel','importable'];a65_0x3246=function(){return _0x118511;};return a65_0x3246();}export function buildAppProfileListFields(_0x2fca78){return{'env':_0x2fca78,'hasAccessKey':![],'format':null,'pageSize':null,'riskLevel':null,'locale':null};}
|
package/lib/constant/app.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a66_0x5bfef2=a66_0x5c0f;function a66_0x2426(){const _0x1b0c94=['PUBLISHED','1354362rmxiEw','23350668vyhZkv','3773112BfyrDI','10QDEDov','2115489DodCjl','5KJLDXA','2dOMaIS','3624dpWdrg','9833152cpKMEO','3618954PmXgFt','10503ZgkQPY'];a66_0x2426=function(){return _0x1b0c94;};return a66_0x2426();}function a66_0x5c0f(_0x36918b,_0x58f1cf){_0x36918b=_0x36918b-0x1cb;const _0x2426f7=a66_0x2426();let _0x5c0fd6=_0x2426f7[_0x36918b];return _0x5c0fd6;}(function(_0x5a215a,_0x5e4f0d){const _0x19b8f9=a66_0x5c0f,_0x4ac291=_0x5a215a();while(!![]){try{const _0x1ff7be=parseInt(_0x19b8f9(0x1cd))/0x1+parseInt(_0x19b8f9(0x1d3))/0x2*(parseInt(_0x19b8f9(0x1d1))/0x3)+-parseInt(_0x19b8f9(0x1cf))/0x4+-parseInt(_0x19b8f9(0x1d2))/0x5*(parseInt(_0x19b8f9(0x1d6))/0x6)+-parseInt(_0x19b8f9(0x1d5))/0x7+parseInt(_0x19b8f9(0x1d4))/0x8*(-parseInt(_0x19b8f9(0x1cb))/0x9)+-parseInt(_0x19b8f9(0x1d0))/0xa*(-parseInt(_0x19b8f9(0x1ce))/0xb);if(_0x1ff7be===_0x5e4f0d)break;else _0x4ac291['push'](_0x4ac291['shift']());}catch(_0x5938d5){_0x4ac291['push'](_0x4ac291['shift']());}}}(a66_0x2426,0xab819));export const APP_PUBLISH_STATUS={'Published':a66_0x5bfef2(0x1cc),'Unpublished':'UNPUBLISH'};export const RUNTIME_ACCESSIBLE_APP_STATUS=APP_PUBLISH_STATUS['Published'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a67_0xd21b(_0x9a5539,_0x3fabe8){_0x9a5539=_0x9a5539-0xf1;const _0x86e20c=a67_0x86e2();let _0xd21b93=_0x86e20c[_0x9a5539];return _0xd21b93;}(function(_0xc42a73,_0x4fd8df){const _0x13eceb=a67_0xd21b,_0x41f533=_0xc42a73();while(!![]){try{const _0x24fa77=parseInt(_0x13eceb(0xf5))/0x1*(-parseInt(_0x13eceb(0xf2))/0x2)+parseInt(_0x13eceb(0xf8))/0x3*(parseInt(_0x13eceb(0xf6))/0x4)+parseInt(_0x13eceb(0xf4))/0x5+parseInt(_0x13eceb(0xf3))/0x6+parseInt(_0x13eceb(0xf1))/0x7+parseInt(_0x13eceb(0xf9))/0x8+-parseInt(_0x13eceb(0xf7))/0x9;if(_0x24fa77===_0x4fd8df)break;else _0x41f533['push'](_0x41f533['shift']());}catch(_0x3cae7f){_0x41f533['push'](_0x41f533['shift']());}}}(a67_0x86e2,0x21e31));export const AUTH_MODE={'ClientAk':'client-ak'};export function isAuthMode(_0x179462){return _0x179462===AUTH_MODE['ClientAk'];}function a67_0x86e2(){const _0x2c3394=['43630YhcMYS','7039yQIcYo','4SrgaJu','2169306mhHiXK','501801UYtocf','1165760UewPsD','955549dCdUdH','62WkSOlU','838944snsAth'];a67_0x86e2=function(){return _0x2c3394;};return a67_0x86e2();}
|
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a68_0x3c88f8=a68_0x35ab;(function(_0x3a67d3,_0x413f1c){const _0x1a0997=a68_0x35ab,_0x457ed3=_0x3a67d3();while(!![]){try{const _0x3aa4c1=-parseInt(_0x1a0997(0xb1))/0x1+parseInt(_0x1a0997(0xa5))/0x2+-parseInt(_0x1a0997(0xab))/0x3+parseInt(_0x1a0997(0xc5))/0x4*(parseInt(_0x1a0997(0x9f))/0x5)+-parseInt(_0x1a0997(0xc8))/0x6*(parseInt(_0x1a0997(0xba))/0x7)+parseInt(_0x1a0997(0xa8))/0x8+parseInt(_0x1a0997(0xb7))/0x9*(parseInt(_0x1a0997(0xae))/0xa);if(_0x3aa4c1===_0x413f1c)break;else _0x457ed3['push'](_0x457ed3['shift']());}catch(_0x1041dc){_0x457ed3['push'](_0x457ed3['shift']());}}}(a68_0x8a57,0x234db));import{PRODUCT_CONFIG}from'../constant/product.js';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';export const CLI_BIN_NAME=PRODUCT_CONFIG['cliBinName'];export const CLI_DISPLAY_NAME=PRODUCT_CONFIG[a68_0x3c88f8(0xa0)];function a68_0x35ab(_0x179f88,_0x12c628){_0x179f88=_0x179f88-0x9b;const _0x8a576b=a68_0x8a57();let _0x35ab92=_0x8a576b[_0x179f88];return _0x35ab92;}export const NPM_PACKAGE_NAME=LOVRABET_NPM_PACKAGE_NAME;export const GLOBAL_FLAGS=[{'name':a68_0x3c88f8(0xa9),'meowKey':a68_0x3c88f8(0xa9),'type':'string','description':a68_0x3c88f8(0xc2),'hint':a68_0x3c88f8(0xb8)},{'name':a68_0x3c88f8(0xa1),'meowKey':a68_0x3c88f8(0xa1),'type':a68_0x3c88f8(0xac),'description':a68_0x3c88f8(0xc4),'hint':a68_0x3c88f8(0x9d)},{'name':'env','meowKey':a68_0x3c88f8(0xb2),'type':a68_0x3c88f8(0xac),'description':a68_0x3c88f8(0xbe),'hint':'production\x20|\x20development\x20|\x20daily'},{'name':a68_0x3c88f8(0xa7),'meowKey':a68_0x3c88f8(0xa7),'type':a68_0x3c88f8(0xac),'description':a68_0x3c88f8(0xb6),'hint':'json\x20|\x20pretty\x20|\x20compress'},{'name':'jq','meowKey':'jq','type':a68_0x3c88f8(0xac),'description':'Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20implies\x20--format\x20json\x20when\x20current\x20format\x20is\x20pretty)','hint':a68_0x3c88f8(0xc1)},{'name':'dry-run','meowKey':a68_0x3c88f8(0xb3),'type':a68_0x3c88f8(0x9e),'description':a68_0x3c88f8(0xb9)},{'name':a68_0x3c88f8(0xa4),'meowKey':a68_0x3c88f8(0xa4),'type':a68_0x3c88f8(0x9e),'description':a68_0x3c88f8(0xa2)},{'name':a68_0x3c88f8(0xc3),'meowKey':a68_0x3c88f8(0xbd),'type':a68_0x3c88f8(0x9e),'description':a68_0x3c88f8(0xa3)},{'name':a68_0x3c88f8(0xad),'meowKey':a68_0x3c88f8(0xad),'type':a68_0x3c88f8(0x9e),'description':a68_0x3c88f8(0xaa)},{'name':'ci','meowKey':'ci','type':a68_0x3c88f8(0x9e),'description':a68_0x3c88f8(0xbc),'hidden':!![]},{'name':a68_0x3c88f8(0x9c),'meowKey':a68_0x3c88f8(0x9c),'type':a68_0x3c88f8(0x9e),'description':a68_0x3c88f8(0xc6)},{'name':'id','meowKey':'id','type':a68_0x3c88f8(0xac),'description':'Record\x20ID','hidden':!![]},{'name':a68_0x3c88f8(0xa6),'meowKey':a68_0x3c88f8(0xa6),'type':'string','description':a68_0x3c88f8(0xc7),'hidden':!![]},{'name':a68_0x3c88f8(0xc0),'meowKey':a68_0x3c88f8(0xc0),'type':'string','description':'SQL\x20query\x20code','hidden':!![]},{'name':a68_0x3c88f8(0xbb),'meowKey':a68_0x3c88f8(0xbb),'type':a68_0x3c88f8(0xac),'description':a68_0x3c88f8(0xc9),'hidden':!![]},{'name':a68_0x3c88f8(0x9b),'meowKey':a68_0x3c88f8(0x9b),'type':a68_0x3c88f8(0x9e),'description':a68_0x3c88f8(0xbf),'hidden':!![]},{'name':a68_0x3c88f8(0xb0),'meowKey':'clear','type':'boolean','description':'Clear\x20output','hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a68_0x3c88f8(0xa9),'app',a68_0x3c88f8(0xb2),a68_0x3c88f8(0xa7),'jq',a68_0x3c88f8(0xb5),'yes',a68_0x3c88f8(0xc3),'ci']);function a68_0x8a57(){const _0x23e472=['459254RVVNfw','name','format','2098176xGNYuY','appcode','Use\x20global\x20config\x20scope','412293crnnYj','string','global','10ocFLlS','fromEntries','clear','188615xtvpJu','env','dryRun','map','dry-run','Output\x20format','1761543PYjdbR','<code>','Preview\x20operation\x20without\x20executing','14bHIXWk','params','Alias\x20for\x20--non-interactive','nonInteractive','Environment','Verbose\x20output','sqlcode','<expr>','Override\x20appcode','non-interactive','Select\x20app\x20profile\x20by\x20name','580FyrvSf','Show\x20help','Name\x20filter','740106FZjtTq','JSON\x20params\x20for\x20execute\x20commands','meowKey','verbose','help','<name>','boolean','1025UEdnqc','cliDisplayName','app','Skip\x20confirmation\x20for\x20high-risk\x20writes','Force\x20non-interactive\x20mode\x20(CI)','yes'];a68_0x8a57=function(){return _0x23e472;};return a68_0x8a57();}export function buildMeowFlags(){const _0xc7b71d=a68_0x3c88f8;return Object[_0xc7b71d(0xaf)](GLOBAL_FLAGS[_0xc7b71d(0xb4)](_0x5c9c68=>[_0x5c9c68[_0xc7b71d(0xca)],{'type':_0x5c9c68['type']}]));}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a69_0x471a(){const _0xdb46f9=['3990690MlnhhK','16FMKkmT','1569522KsycNv','en-US','388pFKcSK','compress','main','production','139110EOnmJo','163827LJkRyl','875469HHiRpB','262339xRfTdV','858MugPSj','12mIIQEp','write'];a69_0x471a=function(){return _0xdb46f9;};return a69_0x471a();}const a69_0x451988=a69_0x9f02;(function(_0x39d576,_0x221aa2){const _0xf1e186=a69_0x9f02,_0x6dd380=_0x39d576();while(!![]){try{const _0x260365=-parseInt(_0xf1e186(0x17c))/0x1+parseInt(_0xf1e186(0x175))/0x2*(-parseInt(_0xf1e186(0x17d))/0x3)+parseInt(_0xf1e186(0x17e))/0x4*(parseInt(_0xf1e186(0x179))/0x5)+-parseInt(_0xf1e186(0x182))/0x6+parseInt(_0xf1e186(0x17b))/0x7*(parseInt(_0xf1e186(0x181))/0x8)+-parseInt(_0xf1e186(0x17a))/0x9+parseInt(_0xf1e186(0x180))/0xa;if(_0x260365===_0x221aa2)break;else _0x6dd380['push'](_0x6dd380['shift']());}catch(_0x54bd3a){_0x6dd380['push'](_0x6dd380['shift']());}}}(a69_0x471a,0x20f90));function a69_0x9f02(_0x1e083d,_0x35f133){_0x1e083d=_0x1e083d-0x175;const _0x471ac0=a69_0x471a();let _0x9f02a5=_0x471ac0[_0x1e083d];return _0x9f02a5;}export const DEFAULT_APP_PROFILE_NAME=a69_0x451988(0x177);export const DEFAULT_CONFIG_VALUES={'env':a69_0x451988(0x178),'format':a69_0x451988(0x176),'locale':a69_0x451988(0x183),'riskLevel':a69_0x451988(0x17f)};export const DEFAULT_COMMAND_OUTPUT_FORMAT='compress';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a70_0x4cbba1=a70_0x3b71;(function(_0x4ff909,_0x48a866){const _0x457016=a70_0x3b71,_0x4831d3=_0x4ff909();while(!![]){try{const _0x5d2555=-parseInt(_0x457016(0x9e))/0x1+parseInt(_0x457016(0xa4))/0x2+-parseInt(_0x457016(0xa1))/0x3*(parseInt(_0x457016(0xa5))/0x4)+-parseInt(_0x457016(0xa2))/0x5*(parseInt(_0x457016(0xa3))/0x6)+parseInt(_0x457016(0x9c))/0x7+parseInt(_0x457016(0xa7))/0x8+-parseInt(_0x457016(0x9d))/0x9*(-parseInt(_0x457016(0xa0))/0xa);if(_0x5d2555===_0x48a866)break;else _0x4831d3['push'](_0x4831d3['shift']());}catch(_0x4cbcbe){_0x4831d3['push'](_0x4831d3['shift']());}}}(a70_0x57f6,0x49bce));function a70_0x57f6(){const _0x330461=['skillSource','2424107aDRazE','349047sGIilF','241969VIpqOa','npmPackageName','20xqOQLX','195QaeeJD','1323015SkqtcE','6myQNJz','660496oXmviF','20480TtkdpZ','npmRegistryBaseUrl','3098296HBRqwV'];a70_0x57f6=function(){return _0x330461;};return a70_0x57f6();}import{PRODUCT_CONFIG}from'../constant/product.js';export const LOVRABET_NPM_PACKAGE_NAME=PRODUCT_CONFIG[a70_0x4cbba1(0x9f)];export const LOVRABET_SKILL_SOURCE=PRODUCT_CONFIG[a70_0x4cbba1(0x9b)];function a70_0x3b71(_0x1adf31,_0x52c662){_0x1adf31=_0x1adf31-0x9b;const _0x57f60c=a70_0x57f6();let _0x3b71c3=_0x57f60c[_0x1adf31];return _0x3b71c3;}export const NPM_REGISTRY_BASE_URL=PRODUCT_CONFIG[a70_0x4cbba1(0xa6)];
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a71_0x30cf14=a71_0x3d33;(function(_0x1586b7,_0x28c8eb){const _0xe2bd16=a71_0x3d33,_0x31852b=_0x1586b7();while(!![]){try{const _0x41a1e9=-parseInt(_0xe2bd16(0x10f))/0x1*(-parseInt(_0xe2bd16(0x103))/0x2)+-parseInt(_0xe2bd16(0x10c))/0x3+parseInt(_0xe2bd16(0xfd))/0x4+parseInt(_0xe2bd16(0x10e))/0x5+parseInt(_0xe2bd16(0x10a))/0x6+-parseInt(_0xe2bd16(0x108))/0x7+-parseInt(_0xe2bd16(0x106))/0x8*(parseInt(_0xe2bd16(0xff))/0x9);if(_0x41a1e9===_0x28c8eb)break;else _0x31852b['push'](_0x31852b['shift']());}catch(_0x489d65){_0x31852b['push'](_0x31852b['shift']());}}}(a71_0x5f27,0x8f687));import{getEnv,isProduction}from'../constant/env.js';function a71_0x5f27(){const _0x14e541=['166MsevKR','domains','api','8exdbqR','runtime','4431294fMsBzU','apiDomain','7024740lJopTW','skillHubDomain','293154BfIUUs','runtimeDomain','5224565ymsjbE','1309mPzZNb','nonProduction','3194920yVCZDw','skillhub','16244289qwhXHY','user','production','userDomain'];a71_0x5f27=function(){return _0x14e541;};return a71_0x5f27();}import{PRODUCT_CONFIG}from'../constant/product.js';let customApiDomain,customUserDomain,customRuntimeDomain,customSkillHubDomain;export function initDomains(_0x14f355){const _0x2a2f86=a71_0x3d33;customApiDomain=_0x14f355?.[_0x2a2f86(0x109)],customUserDomain=_0x14f355?.[_0x2a2f86(0x102)],customRuntimeDomain=_0x14f355?.[_0x2a2f86(0x10d)],customSkillHubDomain=_0x14f355?.[_0x2a2f86(0x10b)];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?PRODUCT_CONFIG['domains'][a71_0x30cf14(0x101)][a71_0x30cf14(0x100)]:PRODUCT_CONFIG[a71_0x30cf14(0x104)][a71_0x30cf14(0xfc)][a71_0x30cf14(0x100)]);function a71_0x3d33(_0x2e97ff,_0x3ee7f1){_0x2e97ff=_0x2e97ff-0xfc;const _0x5f278d=a71_0x5f27();let _0x3d3330=_0x5f278d[_0x2e97ff];return _0x3d3330;}export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a71_0x30cf14(0x104)][a71_0x30cf14(0x101)][a71_0x30cf14(0x105)]:PRODUCT_CONFIG[a71_0x30cf14(0x104)][a71_0x30cf14(0xfc)][a71_0x30cf14(0x105)]);export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a71_0x30cf14(0x104)][a71_0x30cf14(0x101)][a71_0x30cf14(0x107)]:PRODUCT_CONFIG[a71_0x30cf14(0x104)][a71_0x30cf14(0xfc)][a71_0x30cf14(0x107)]);export const getSkillHubDomain=()=>customSkillHubDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a71_0x30cf14(0x104)][a71_0x30cf14(0x101)][a71_0x30cf14(0xfe)]:PRODUCT_CONFIG['domains'][a71_0x30cf14(0xfc)][a71_0x30cf14(0xfe)]);
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a72_0x29c52b=a72_0x4257;(function(_0x4aba68,_0x59cc9e){const _0x2486f4=a72_0x4257,_0xb94031=_0x4aba68();while(!![]){try{const _0x109fd9=parseInt(_0x2486f4(0x19b))/0x1*(-parseInt(_0x2486f4(0x19e))/0x2)+parseInt(_0x2486f4(0x196))/0x3*(-parseInt(_0x2486f4(0x199))/0x4)+-parseInt(_0x2486f4(0x1a3))/0x5*(parseInt(_0x2486f4(0x1a2))/0x6)+-parseInt(_0x2486f4(0x19d))/0x7*(parseInt(_0x2486f4(0x195))/0x8)+parseInt(_0x2486f4(0x1a1))/0x9+-parseInt(_0x2486f4(0x197))/0xa+parseInt(_0x2486f4(0x19a))/0xb*(parseInt(_0x2486f4(0x198))/0xc);if(_0x109fd9===_0x59cc9e)break;else _0xb94031['push'](_0xb94031['shift']());}catch(_0x96248){_0xb94031['push'](_0xb94031['shift']());}}}(a72_0x4af6,0xad20b));import{productEnv}from'../constant/product.js';function a72_0x4257(_0x440ae4,_0x5e850f){_0x440ae4=_0x440ae4-0x194;const _0x4af659=a72_0x4af6();let _0x42576d=_0x4af659[_0x440ae4];return _0x42576d;}export const RUNTIME_ENV_VALUES=[a72_0x29c52b(0x1a0),'development',a72_0x29c52b(0x19f)];function a72_0x4af6(){const _0x28403a=['dev','257992lOCKVt','1831898wxTVlV','daily','production','6330294TwUpHm','4864170OdWdXx','5wHsXyM','online','304ubCxpa','1717197TXgHHg','1404480wvJyve','83604cnuHbI','4xPiXeb','6072YehTYM','1FLbZxq'];a72_0x4af6=function(){return _0x28403a;};return a72_0x4af6();}export function normalizeEnv(_0xc13f7b){const _0x3fd911=a72_0x29c52b;return _0xc13f7b===_0x3fd911(0x194)?_0x3fd911(0x1a0):_0xc13f7b;}export function isProduction(_0x3d95bc){const _0x58c484=a72_0x29c52b;return normalizeEnv(_0x3d95bc)===_0x58c484(0x1a0);}export function isDaily(_0x193735){return normalizeEnv(_0x193735)==='daily';}export function isDev(_0xb3d236){const _0x308f5a=a72_0x29c52b,_0x2f76fd=normalizeEnv(_0xb3d236);return _0x2f76fd==='development'||_0x2f76fd===_0x308f5a(0x19c);}let env=normalizeEnv(productEnv('ENV')||a72_0x29c52b(0x1a0));export function getEnv(){return env;}export function initEnv(_0x6f4a8b){env=normalizeEnv(_0x6f4a8b);}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a73_0x2045(_0x3f7baf,_0x54e1af){_0x3f7baf=_0x3f7baf-0x1ab;const _0x2ccdcd=a73_0x2ccd();let _0x20451b=_0x2ccdcd[_0x3f7baf];return _0x20451b;}function a73_0x2ccd(){const _0x1eabf1=['18wzQaCp','4usqLMt','209076qqeFNw','5471630mVgslx','368unVWpo','109377TDKaXh','json','40119830eupyYL','compress','7918602xSHrIe','439324MQAGjk','5962082GXQpVE'];a73_0x2ccd=function(){return _0x1eabf1;};return a73_0x2ccd();}const a73_0x1c4439=a73_0x2045;(function(_0x405fe0,_0x4bfa77){const _0x4e7836=a73_0x2045,_0x4b0470=_0x405fe0();while(!![]){try{const _0x1313dc=parseInt(_0x4e7836(0x1b2))/0x1+parseInt(_0x4e7836(0x1ae))/0x2*(-parseInt(_0x4e7836(0x1b0))/0x3)+-parseInt(_0x4e7836(0x1b1))/0x4*(parseInt(_0x4e7836(0x1b3))/0x5)+-parseInt(_0x4e7836(0x1ad))/0x6+parseInt(_0x4e7836(0x1af))/0x7+parseInt(_0x4e7836(0x1b4))/0x8*(-parseInt(_0x4e7836(0x1b5))/0x9)+parseInt(_0x4e7836(0x1ab))/0xa;if(_0x1313dc===_0x4bfa77)break;else _0x4b0470['push'](_0x4b0470['shift']());}catch(_0x3c66e7){_0x4b0470['push'](_0x4b0470['shift']());}}}(a73_0x2ccd,0xbed72));export const OUTPUT_FORMAT_VALUES=[a73_0x1c4439(0x1b6),'pretty',a73_0x1c4439(0x1ac)];
|
package/lib/constant/product.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a74_0x1d31(_0x45093d,_0x2b1b60){_0x45093d=_0x45093d-0x73;const _0x3adac7=a74_0x3ada();let _0x1d3170=_0x3adac7[_0x45093d];return _0x1d3170;}const a74_0x41b05c=a74_0x1d31;(function(_0x24ecba,_0x8eb26f){const _0x458422=a74_0x1d31,_0x4a6ae3=_0x24ecba();while(!![]){try{const _0xce6605=parseInt(_0x458422(0x88))/0x1*(-parseInt(_0x458422(0x80))/0x2)+-parseInt(_0x458422(0x89))/0x3+parseInt(_0x458422(0x74))/0x4*(parseInt(_0x458422(0x7c))/0x5)+parseInt(_0x458422(0x78))/0x6+parseInt(_0x458422(0x85))/0x7+parseInt(_0x458422(0x79))/0x8+parseInt(_0x458422(0x82))/0x9*(-parseInt(_0x458422(0x8c))/0xa);if(_0xce6605===_0x8eb26f)break;else _0x4a6ae3['push'](_0x4a6ae3['shift']());}catch(_0xc8de26){_0x4a6ae3['push'](_0x4a6ae3['shift']());}}}(a74_0x3ada,0x9fceb));export const PRODUCT_CONFIG={'cliBinName':a74_0x41b05c(0x8a),'cliDisplayName':a74_0x41b05c(0x7f),'npmPackageName':'@lovrabet/lovrabet-cli','skillSource':a74_0x41b05c(0x7b),'npmRegistryBaseUrl':a74_0x41b05c(0x83),'envPrefix':'LOVRABET','legacyEnvPrefixes':['RABETBASE'],'configFileNames':[a74_0x41b05c(0x81),a74_0x41b05c(0x77)],'newConfigFileName':a74_0x41b05c(0x81),'homeDirName':'.lovrabet','logFileName':a74_0x41b05c(0x8b),'invokeSource':a74_0x41b05c(0x87),'userCenterDisplayName':a74_0x41b05c(0x8d),'skipNpxSkillsEnvSuffix':a74_0x41b05c(0x73),'domains':{'production':{'user':'https://user.lovrabet.com','api':a74_0x41b05c(0x7d),'runtime':a74_0x41b05c(0x7e),'skillhub':a74_0x41b05c(0x84)},'nonProduction':{'user':'https://user-daily.lovrabet.com','api':'https://daily-api.lovrabet.com','runtime':a74_0x41b05c(0x7a),'skillhub':a74_0x41b05c(0x86)}},'accessKeyCreatePath':'/user/ak'};export function productEnvName(_0x1d9012){const _0x3e377f=a74_0x41b05c;return PRODUCT_CONFIG[_0x3e377f(0x76)]+'_'+_0x1d9012;}export function productEnvNames(_0x3e3526){const _0x5a7754=a74_0x41b05c;return[productEnvName(_0x3e3526),...PRODUCT_CONFIG['legacyEnvPrefixes'][_0x5a7754(0x75)](_0x127e20=>_0x127e20+'_'+_0x3e3526)];}export function productEnv(_0x5cc736){for(const _0x2106c6 of productEnvNames(_0x5cc736)){const _0x1023c6=process.env[_0x2106c6];if(_0x1023c6!==undefined)return _0x1023c6;}return undefined;}function a74_0x3ada(){const _0x46eb45=['https://api.lovrabet.com','https://runtime.lovrabet.com','Lovrabet\x20Runtime\x20CLI','372qdxktK','.lovrabet.json','9XUWlwW','https://registry.npmjs.org','https://skills.lovrabet.com','6138748PKVaoq','https://skills-daily.lovrabet.com','cli:lovrabet-runtime','5651ToqTCq','2943603RthiDR','lovrabet','.lovrabet-runtime.log','1636620ZHERYE','Lovrabet\x20User\x20Center','SKIP_NPX_SKILLS','4JWBAmT','map','envPrefix','.lovrabetrc','3184488BVNpGw','9329912TkApdI','https://daily-runtime.lovrabet.com','lovrabet/lovrabet-cli','1382845rMIwvz'];a74_0x3ada=function(){return _0x46eb45;};return a74_0x3ada();}
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a75_0x3dfc(_0xb433da,_0x310fc6){_0xb433da=_0xb433da-0x18d;const _0x1dacba=a75_0x1dac();let _0x3dfc49=_0x1dacba[_0xb433da];return _0x3dfc49;}const a75_0x5970a4=a75_0x3dfc;(function(_0xc57071,_0x59fcda){const _0x27aec7=a75_0x3dfc,_0x1c2c02=_0xc57071();while(!![]){try{const _0x292794=parseInt(_0x27aec7(0x18f))/0x1+-parseInt(_0x27aec7(0x190))/0x2+parseInt(_0x27aec7(0x193))/0x3*(-parseInt(_0x27aec7(0x195))/0x4)+-parseInt(_0x27aec7(0x192))/0x5*(-parseInt(_0x27aec7(0x18e))/0x6)+parseInt(_0x27aec7(0x194))/0x7+-parseInt(_0x27aec7(0x197))/0x8+parseInt(_0x27aec7(0x18d))/0x9;if(_0x292794===_0x59fcda)break;else _0x1c2c02['push'](_0x1c2c02['shift']());}catch(_0xb591c4){_0x1c2c02['push'](_0x1c2c02['shift']());}}}(a75_0x1dac,0xce079));export const RISK_LEVEL_VALUES=[a75_0x5970a4(0x191),a75_0x5970a4(0x196),'high-risk-write'];function a75_0x1dac(){const _0x46f937=['868dwcqnu','write','8574952LOrEDp','9918396vIlmYE','534NDBPNd','246035cmwvJs','1878630OTNezw','read','49805znnNwN','8913HlNwZd','8856260bdojpg'];a75_0x1dac=function(){return _0x46f937;};return a75_0x1dac();}
|
package/lib/constant/url.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a76_0x2ef2(_0x5a3cd6,_0x23ee8b){_0x5a3cd6=_0x5a3cd6-0xb0;const _0x23b92a=a76_0x23b9();let _0x2ef230=_0x23b92a[_0x5a3cd6];return _0x2ef230;}const a76_0x5753a6=a76_0x2ef2;(function(_0x2d80ab,_0x36bc5c){const _0x3d4976=a76_0x2ef2,_0x3c0dfe=_0x2d80ab();while(!![]){try{const _0x4116a0=parseInt(_0x3d4976(0xbd))/0x1*(-parseInt(_0x3d4976(0xb9))/0x2)+-parseInt(_0x3d4976(0xb3))/0x3*(parseInt(_0x3d4976(0xb5))/0x4)+parseInt(_0x3d4976(0xbc))/0x5+parseInt(_0x3d4976(0xb1))/0x6+-parseInt(_0x3d4976(0xb2))/0x7+parseInt(_0x3d4976(0xb8))/0x8+parseInt(_0x3d4976(0xb0))/0x9*(-parseInt(_0x3d4976(0xb7))/0xa);if(_0x4116a0===_0x36bc5c)break;else _0x3c0dfe['push'](_0x3c0dfe['shift']());}catch(_0x39c48d){_0x3c0dfe['push'](_0x3c0dfe['shift']());}}}(a76_0x23b9,0x18d60));function a76_0x23b9(){const _0x30a920=['accessKeyCreatePath','4zfyUmO','production','20oQTXas','1209264GUTmsL','2GYmHMv','domains','user','748605hOOxCP','37537VnnBEF','1114119EBxLan','1190406KAiQNk','235158jlPIPF','236517VivVTt'];a76_0x23b9=function(){return _0x30a920;};return a76_0x23b9();}import{PRODUCT_CONFIG}from'../constant/product.js';export const USER_ACCESS_KEY_CREATE_URL=''+PRODUCT_CONFIG[a76_0x5753a6(0xba)][a76_0x5753a6(0xb6)][a76_0x5753a6(0xbb)]+PRODUCT_CONFIG[a76_0x5753a6(0xb4)];
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a75_0x13a496=a75_0x4584;(function(_0x193315,_0x4fe695){const _0x6ea122=a75_0x4584,_0x2ed367=_0x193315();while(!![]){try{const _0x149756=parseInt(_0x6ea122(0x14b))/0x1*(parseInt(_0x6ea122(0x14e))/0x2)+-parseInt(_0x6ea122(0x12e))/0x3*(parseInt(_0x6ea122(0x144))/0x4)+-parseInt(_0x6ea122(0x16b))/0x5*(parseInt(_0x6ea122(0x134))/0x6)+parseInt(_0x6ea122(0x14c))/0x7*(parseInt(_0x6ea122(0x14f))/0x8)+-parseInt(_0x6ea122(0x128))/0x9*(-parseInt(_0x6ea122(0x161))/0xa)+-parseInt(_0x6ea122(0x12f))/0xb*(parseInt(_0x6ea122(0x127))/0xc)+-parseInt(_0x6ea122(0x13a))/0xd;if(_0x149756===_0x4fe695)break;else _0x2ed367['push'](_0x2ed367['shift']());}catch(_0x271eba){_0x2ed367['push'](_0x2ed367['shift']());}}}(a75_0x2147,0x2eaff));import{readFileSync,existsSync,mkdirSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{homedir}from'node:os';function a75_0x4584(_0xe5dc3b,_0x29eede){_0xe5dc3b=_0xe5dc3b-0x122;const _0x2147f6=a75_0x2147();let _0x45845d=_0x2147f6[_0xe5dc3b];return _0x45845d;}import{logger}from'./utils/logger.js';import{CliErrors}from'./errors.js';import{CLI_BIN_NAME}from'./constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvNames}from'./constant/product.js';import{DEFAULT_CONFIG_VALUES}from'./constant/defaults.js';import{normalizeEnv,isDaily,isDev}from'./constant/env.js';import{normalizeLegacyOutputFormat}from'./framework/types.js';import{resolveCachedAppCode}from'./commands/app/cache.js';export{AUTH_MODE,isAuthMode}from'./constant/auth-mode.js';const CONFIG_NAMES=PRODUCT_CONFIG['configFileNames'];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a75_0x13a496(0x15b)];function resolveConfigPath(_0x428a73){for(const _0x2bcbac of CONFIG_NAMES){const _0x163fab=resolve(_0x428a73,_0x2bcbac);if(existsSync(_0x163fab))return _0x163fab;}return undefined;}export function resolveWriteConfigPath(_0x5de703){const _0x49b146=a75_0x13a496,_0x41171d=_0x5de703===_0x49b146(0x142)?process['cwd']():homedir(),_0x4f3be0=resolveConfigPath(_0x41171d);return _0x4f3be0??resolve(_0x41171d,NEW_CONFIG_NAME);}export function readConfigFile(_0x2a0012){const _0x283dc6=a75_0x13a496;try{if(existsSync(_0x2a0012)){const _0x4e9f71=readFileSync(_0x2a0012,{'encoding':_0x283dc6(0x151)});if(_0x4e9f71){const _0x50797d=JSON['parse'](_0x4e9f71);return migrateOnlineEnv(_0x2a0012,_0x50797d),_0x50797d;}}}catch{}return{};}function migrateOnlineEnv(_0x570e73,_0x360411){const _0x24d9ba=a75_0x13a496;let _0x3ca7e5=![];_0x360411[_0x24d9ba(0x158)]===_0x24d9ba(0x15c)&&(_0x360411['env']=_0x24d9ba(0x12c),_0x3ca7e5=!![]);if(_0x360411[_0x24d9ba(0x157)]&&typeof _0x360411['apps']===_0x24d9ba(0x153))for(const _0x4a5ad9 of Object['values'](_0x360411[_0x24d9ba(0x157)])){_0x4a5ad9&&_0x4a5ad9[_0x24d9ba(0x158)]===_0x24d9ba(0x15c)&&(_0x4a5ad9[_0x24d9ba(0x158)]=_0x24d9ba(0x12c),_0x3ca7e5=!![]);}if(_0x3ca7e5)try{writeConfigFile(_0x570e73,_0x360411);}catch{}}export function writeConfigFile(_0x31fc95,_0x3a0403){const _0x9bfc6f=a75_0x13a496,_0x2c7dcd=dirname(_0x31fc95);!existsSync(_0x2c7dcd)&&mkdirSync(_0x2c7dcd,{'recursive':!![]});const _0x1a7c53=_0x31fc95+_0x9bfc6f(0x167);try{writeFileSync(_0x1a7c53,JSON['stringify'](_0x3a0403,null,0x2)+'\x0a',{'encoding':_0x9bfc6f(0x151),'mode':0x180});try{renameSync(_0x1a7c53,_0x31fc95);}catch(_0x172662){if(_0x172662[_0x9bfc6f(0x123)]===_0x9bfc6f(0x148)||_0x172662['code']===_0x9bfc6f(0x162)||_0x172662[_0x9bfc6f(0x123)]===_0x9bfc6f(0x136)){writeFileSync(_0x31fc95,JSON[_0x9bfc6f(0x154)](_0x3a0403,null,0x2)+'\x0a',{'encoding':'utf8'});try{unlinkSync(_0x1a7c53);}catch{}}else throw _0x172662;}}catch(_0x36f528){try{unlinkSync(_0x1a7c53);}catch{}throw _0x36f528;}}export function isNonInteractiveMode(_0x4210cf){const _0x42e16f=a75_0x13a496;return!!(_0x4210cf[_0x42e16f(0x152)]||_0x4210cf['ci']||productEnvNames('CI')[_0x42e16f(0x13c)](_0x5c6f21=>process.env[_0x5c6f21]==='true')||process.env.CI===_0x42e16f(0x168)||!process[_0x42e16f(0x16a)][_0x42e16f(0x12a)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x5f456e=a75_0x13a496;if(!process[_0x5f456e(0x125)]['isTTY'])return![];try{const _0x583944=process[_0x5f456e(0x125)]['isRaw'];return process[_0x5f456e(0x125)][_0x5f456e(0x164)](!![]),process[_0x5f456e(0x125)]['setRawMode'](_0x583944??![]),!![];}catch{return![];}}export async function createContext(_0x17f6b9){const _0x16ffc4=a75_0x13a496,_0x151e4f=readRawConfig(),_0x313316=buildConfig(_0x151e4f,_0x17f6b9);await initGlobalEnvironment(_0x313316);const {getUserDomain:_0x5a36fc,getApiDomain:_0xdb2e9f}=await import(_0x16ffc4(0x13e)),_0x1df930={'apiDomain':_0xdb2e9f(),'userDomain':_0x5a36fc()},_0x40984c=await buildAuth(_0x313316);logger['setLogPath'](process['cwd']());const _0x8830f9=(CLI_BIN_NAME+'\x20'+process[_0x16ffc4(0x131)][_0x16ffc4(0x150)](0x2)[_0x16ffc4(0x145)]('\x20'))[_0x16ffc4(0x155)]();logger[_0x16ffc4(0x122)](_0x8830f9);const _0x9ce2de=isNonInteractiveMode(_0x17f6b9);return{'config':_0x313316,'auth':_0x40984c,'logger':logger,'env':_0x1df930,'nonInteractive':_0x9ce2de};}function a75_0x2147(){const _0x4c98b8=['./constant/env.js','accessKey','newConfigFileName','online','top-level','host','error','projectConfig','10LSbgDn','EXDEV','globalConfig','setRawMode','development','format','.tmp','true','string','stdout','535ruZFAq','defaultApp','missing','riskLevel','global','setRawCommand','code','inherit','stdin','APPCODE','852fMvlUK','3080106AmAGMB','daily','isTTY','cache','production','FORMAT','9WNCSHz','10637KUirIY','empty','argv','high-risk-write','cwd','7080FAGuXB','explicit','EACCES','VERBOSE','find','apiDomain','2488044DRqTIE','ENV','some','appcode','./constant/domain.js','raw','PAGE_SIZE','skillHubDomain','project','app','209356hanTaI','join','ACCESS_KEY','parse','EPERM','APP','write','1PNCtkL','28YJAqHa','locale','677318qHAoXN','107320jKZKbu','slice','utf8','nonInteractive','object','stringify','trim','runtimeDomain','apps','env'];a75_0x2147=function(){return _0x4c98b8;};return a75_0x2147();}export function buildConfigFromFlags(_0x1e784b){return buildConfig(readRawConfig(),_0x1e784b);}export function getLocalAppAliases(_0x194cad){const _0x5eb2a0=a75_0x13a496;return _0x194cad[_0x5eb2a0(0x157)]&&typeof _0x194cad['apps']==='object'?_0x194cad[_0x5eb2a0(0x157)]:{};}export function resolveLocalAppAliasCode(_0x195837,_0xc9030d){const _0xb760dc=a75_0x13a496;if(!_0xc9030d)return undefined;const _0x1dc6e5=getLocalAppAliases(_0x195837)[_0xc9030d],_0x35fa07=_0x1dc6e5?.[_0xb760dc(0x13d)];return typeof _0x35fa07===_0xb760dc(0x169)&&_0x35fa07[_0xb760dc(0x155)]()?_0x35fa07[_0xb760dc(0x155)]():undefined;}export function readAppCodeFromConfig(){const _0x3e0519=a75_0x13a496,_0x298902=readRawConfig(),_0x2cd733=_0x298902['appcode']??_0x298902[_0x3e0519(0x143)];if(typeof _0x2cd733==='string'&&_0x2cd733[_0x3e0519(0x155)]())return _0x2cd733[_0x3e0519(0x155)]();const _0xc27fcc=resolveLocalAppAliasCode(_0x298902,typeof _0x298902[_0x3e0519(0x16c)]===_0x3e0519(0x169)?_0x298902[_0x3e0519(0x16c)]:undefined);if(_0xc27fcc)return _0xc27fcc;const _0x173e04=normalizeEnv(String(_0x298902['env']||_0x3e0519(0x12c))),_0x33282d=isDaily(_0x173e04)?_0x3e0519(0x129):isDev(_0x173e04)?_0x3e0519(0x165):_0x3e0519(0x12c),_0x368d98=resolveCachedAppCode(typeof _0x298902[_0x3e0519(0x16c)]===_0x3e0519(0x169)?_0x298902[_0x3e0519(0x16c)]:undefined,_0x33282d,typeof _0x298902[_0x3e0519(0x15a)]===_0x3e0519(0x169)?_0x298902[_0x3e0519(0x15a)]:undefined);if(_0x368d98)return _0x368d98;const _0x297b17=Object['values'](getLocalAppAliases(_0x298902))[_0x3e0519(0x138)](_0x37018b=>_0x37018b?.[_0x3e0519(0x13d)]);return typeof _0x297b17?.[_0x3e0519(0x13d)]===_0x3e0519(0x169)&&_0x297b17[_0x3e0519(0x13d)][_0x3e0519(0x155)]()?_0x297b17[_0x3e0519(0x13d)]['trim']():undefined;}export function readScopedConfig(_0x3adf14){const _0x578257=a75_0x13a496,_0x4f7aae=_0x3adf14[_0x578257(0x16f)]?_0x578257(0x16f):_0x578257(0x142);return readConfigFile(resolveWriteConfigPath(_0x4f7aae));}export function writeScopedConfig(_0x2eafce,_0x52b7f3){const _0xfac51d=a75_0x13a496,_0x4f92cd=_0x52b7f3[_0xfac51d(0x16f)]?_0xfac51d(0x16f):_0xfac51d(0x142);writeConfigFile(resolveWriteConfigPath(_0x4f92cd),_0x2eafce);}export async function initGlobalEnvironment(_0x45b6df){const _0x37ea8a=a75_0x13a496,{initEnv:_0x1057f6}=await import(_0x37ea8a(0x159));_0x1057f6(_0x45b6df[_0x37ea8a(0x158)]);const {initDomains:_0xb5cad0}=await import(_0x37ea8a(0x13e));_0xb5cad0({'apiDomain':_0x45b6df[_0x37ea8a(0x13f)][_0x37ea8a(0x139)]||_0x45b6df[_0x37ea8a(0x13f)][_0x37ea8a(0x15e)]||undefined,'userDomain':_0x45b6df[_0x37ea8a(0x13f)]['userDomain']||undefined,'runtimeDomain':_0x45b6df[_0x37ea8a(0x13f)][_0x37ea8a(0x156)]||undefined,'skillHubDomain':_0x45b6df[_0x37ea8a(0x13f)][_0x37ea8a(0x141)]||undefined});}export function getProjectConfigPath(){const _0x2cc9af=a75_0x13a496;return resolveConfigPath(process[_0x2cc9af(0x133)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x31bb6a){const _0x18f287=a75_0x13a496;if(!existsSync(_0x31bb6a))return{'status':_0x18f287(0x16d)};try{const _0x3926c7=readFileSync(_0x31bb6a,{'encoding':_0x18f287(0x151)});if(!_0x3926c7?.[_0x18f287(0x155)]())return{'status':_0x18f287(0x130)};const _0x2b4ea0=JSON['parse'](_0x3926c7);return{'status':'ok','data':_0x2b4ea0};}catch(_0x4dd5b5){return{'status':_0x18f287(0x15f),'message':_0x4dd5b5 instanceof Error?_0x4dd5b5['message']:String(_0x4dd5b5)};}}export function loadRawConfigLayers(_0x3762aa){const _0x36ce74=a75_0x13a496;let _0x4f5278={},_0x16069f={},_0x140063,_0x2c81d5;try{_0x140063=resolveConfigPath(homedir());if(_0x140063){const _0x19c94a=readFileSync(_0x140063,{'encoding':_0x36ce74(0x151)});if(_0x19c94a)_0x4f5278=JSON[_0x36ce74(0x147)](_0x19c94a);}}catch{}try{const _0x3d07ab=_0x3762aa||process[_0x36ce74(0x133)]();_0x2c81d5=resolveConfigPath(_0x3d07ab);if(_0x2c81d5){const _0x3d48e4=readFileSync(_0x2c81d5,{'encoding':'utf8'});if(_0x3d48e4)_0x16069f=JSON[_0x36ce74(0x147)](_0x3d48e4);}}catch{}return{'globalPath':_0x140063,'projectPath':_0x2c81d5,'globalConfig':_0x4f5278,'projectConfig':_0x16069f};}function mergeRawConfigLayers(_0x128fef){const _0x4773d3=a75_0x13a496,{globalConfig:_0xbcb7da,projectConfig:_0x2a966c}=_0x128fef;if(_0x2a966c['inherit']===![]){const _0x536327={..._0x2a966c};return delete _0x536327[_0x4773d3(0x124)],_0x536327;}const _0x4bfe7e={..._0xbcb7da,..._0x2a966c};if('defaultApp'in _0x2a966c)_0x4bfe7e[_0x4773d3(0x16c)]=_0x2a966c[_0x4773d3(0x16c)];else _0xbcb7da['defaultApp']&&(_0x4bfe7e[_0x4773d3(0x16c)]=_0xbcb7da[_0x4773d3(0x16c)]);return _0x4bfe7e;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x4e35c8){return mergeRawConfigLayers(loadRawConfigLayers(_0x4e35c8));}export function readRawConfigWithLayers(_0x267c8d){const _0x468750=loadRawConfigLayers(_0x267c8d);return{'config':mergeRawConfigLayers(_0x468750),'layers':_0x468750};}export function resolveDefaultAppSource(_0xdca81b){const _0x410aff=a75_0x13a496;if(_0x410aff(0x16c)in _0xdca81b[_0x410aff(0x160)])return _0x410aff(0x142);if(_0xdca81b[_0x410aff(0x160)]['inherit']===![])return null;if(_0xdca81b[_0x410aff(0x163)]['defaultApp'])return _0x410aff(0x16f);return null;}function buildConfig(_0xc2ee97,_0x299836){const _0x1622c9=a75_0x13a496,_0x540c9d=_0xc2ee97[_0x1622c9(0x16c)]||undefined,_0x5d5df3=_0x299836['app']||env(_0x1622c9(0x149))||undefined,_0x4926d9=_0x5d5df3||_0x540c9d||undefined,_0x450a6c=env(_0x1622c9(0x146))||_0xc2ee97['accessKey']||undefined,_0x522b64=_0x299836[_0x1622c9(0x158)]||env(_0x1622c9(0x13b))||_0xc2ee97[_0x1622c9(0x158)]||DEFAULT_CONFIG_VALUES[_0x1622c9(0x158)],_0x261aa2=normalizeEnv(String(_0x522b64)),_0x393f30=isDaily(_0x261aa2)?_0x1622c9(0x129):isDev(_0x261aa2)?_0x1622c9(0x165):_0x1622c9(0x12c),_0x16221c=typeof _0x299836[_0x1622c9(0x13d)]==='string'?_0x299836['appcode']:undefined,_0x1a2828=env(_0x1622c9(0x126)),_0x3d8968=_0x5d5df3?undefined:_0xc2ee97[_0x1622c9(0x13d)]||_0xc2ee97[_0x1622c9(0x143)]||undefined,_0x18fc45=_0x5d5df3||(_0x3d8968?undefined:_0x540c9d),_0x42eefb=resolveLocalAppAliasCode(_0xc2ee97,_0x18fc45),_0x43982a=resolveCachedAppCode(_0x18fc45,_0x393f30,_0x450a6c),_0x1e2fe8=_0x16221c||_0x1a2828||_0x3d8968||_0x42eefb||_0x43982a||undefined,_0x4950c4=_0x16221c?_0x1622c9(0x135):_0x1a2828?'env':_0x3d8968?_0x1622c9(0x15d):_0x42eefb?'local-alias':_0x43982a?_0x1622c9(0x12b):undefined,_0x1f06eb=_0xc2ee97[_0x1622c9(0x14d)]||DEFAULT_CONFIG_VALUES[_0x1622c9(0x14d)],_0x9638bf=undefined,_0x237be=_0x299836[_0x1622c9(0x166)]||env(_0x1622c9(0x12d))||_0xc2ee97[_0x1622c9(0x166)],_0x5a6b50=normalizeLegacyOutputFormat(_0x237be),_0x4b689a=env(_0x1622c9(0x140))||_0xc2ee97['pageSize'],_0x1d03c9=_0x4b689a?Number(_0x4b689a)||undefined:undefined,_0x31c084=_0xc2ee97[_0x1622c9(0x16e)]||_0xc2ee97['maxRisk'],_0xbfe316=_0x31c084==='read'||_0x31c084===_0x1622c9(0x14a)||_0x31c084===_0x1622c9(0x132)?_0x31c084:DEFAULT_CONFIG_VALUES[_0x1622c9(0x16e)],_0x47f902=env(_0x1622c9(0x137)),_0x20dcf6=_0x47f902==='1'||_0x47f902===_0x1622c9(0x168);return{'appCode':typeof _0x1e2fe8==='string'&&_0x1e2fe8['trim']()?_0x1e2fe8[_0x1622c9(0x155)]():undefined,'appCodeSource':_0x4950c4,'env':_0x393f30,'locale':_0x1f06eb,'cookie':_0x9638bf,'accessKey':_0x450a6c,'format':_0x5a6b50,'pageSize':_0x1d03c9,'riskLevel':_0xbfe316,'verbose':_0x20dcf6,'defaultApp':_0x540c9d,'currentApp':typeof _0x4926d9===_0x1622c9(0x169)?_0x4926d9:undefined,'raw':_0xc2ee97};}function env(_0x5e9742){return productEnv(_0x5e9742);}async function buildAuth(_0x4a6cd6){const _0xaa866b='',_0x596b03=!!_0x4a6cd6['accessKey'];return{'cookie':_0xaa866b,'isLoggedIn':_0x596b03,async 'getOrLogin'(){if(_0x596b03)return _0xaa866b;throw CliErrors['authRequired']();}};}
|
|
1
|
+
const a77_0xa8dd1e=a77_0x2d4a;(function(_0x44cbf3,_0x80a5d5){const _0x3efbf0=a77_0x2d4a,_0x2a8386=_0x44cbf3();while(!![]){try{const _0x1a1a2f=-parseInt(_0x3efbf0(0x1cb))/0x1*(parseInt(_0x3efbf0(0x1d1))/0x2)+-parseInt(_0x3efbf0(0x1aa))/0x3*(-parseInt(_0x3efbf0(0x1b1))/0x4)+parseInt(_0x3efbf0(0x1e7))/0x5*(parseInt(_0x3efbf0(0x1e3))/0x6)+parseInt(_0x3efbf0(0x1ce))/0x7+-parseInt(_0x3efbf0(0x1c7))/0x8*(-parseInt(_0x3efbf0(0x1bf))/0x9)+parseInt(_0x3efbf0(0x1ea))/0xa*(parseInt(_0x3efbf0(0x1b3))/0xb)+-parseInt(_0x3efbf0(0x1d8))/0xc;if(_0x1a1a2f===_0x80a5d5)break;else _0x2a8386['push'](_0x2a8386['shift']());}catch(_0x293284){_0x2a8386['push'](_0x2a8386['shift']());}}}(a77_0x23ee,0x57c0f));import{readFileSync,existsSync,mkdirSync,renameSync,unlinkSync,writeFileSync}from'node:fs';function a77_0x23ee(){const _0x40fda1=['EPERM','stringify','4209037teoVuz','appcode','host','35254WokMMw','empty','slice','format','project','inherit','EXDEV','9409716yxZVRl','cache','some','cwd','apiDomain','authRequired','VERBOSE','env','top-level','riskLevel','true','36gnZRVM','global','utf8','app','144140mxaMNu','missing','userDomain','21190tNqUCz','isRaw','locale','APP','setLogPath','ENV','online','development','nonInteractive','stdin','ACCESS_KEY','values','read','12621BOpQBa','apps','high-risk-write','projectConfig','explicit','raw','setRawMode','92oVobiH','production','3421FfDFnP','accessKey','globalConfig','EACCES','write','trim','error','daily','isTTY','defaultApp','argv','newConfigFileName','329409cQGkNF','PAGE_SIZE','FORMAT','code','object','message','string','pageSize','8RdTPtJ','.tmp','./constant/domain.js','setRawCommand','24AglvIB'];a77_0x23ee=function(){return _0x40fda1;};return a77_0x23ee();}import{resolve,dirname}from'node:path';import{homedir}from'node:os';import{logger}from'./utils/logger.js';function a77_0x2d4a(_0x4ddab5,_0x22f993){_0x4ddab5=_0x4ddab5-0x19f;const _0x23eea3=a77_0x23ee();let _0x2d4ac2=_0x23eea3[_0x4ddab5];return _0x2d4ac2;}import{CliErrors}from'./errors.js';import{CLI_BIN_NAME}from'./constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvNames}from'./constant/product.js';import{DEFAULT_CONFIG_VALUES}from'./constant/defaults.js';import{normalizeEnv,isDaily,isDev}from'./constant/env.js';import{normalizeLegacyOutputFormat}from'./framework/types.js';import{resolveCachedAppCode}from'./commands/app/cache.js';export{AUTH_MODE,isAuthMode}from'./constant/auth-mode.js';const CONFIG_NAMES=PRODUCT_CONFIG['configFileNames'];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a77_0xa8dd1e(0x1be)];function resolveConfigPath(_0x16c63b){for(const _0x1d68ff of CONFIG_NAMES){const _0x29d62f=resolve(_0x16c63b,_0x1d68ff);if(existsSync(_0x29d62f))return _0x29d62f;}return undefined;}export function resolveWriteConfigPath(_0x3769d8){const _0x1ce755=a77_0xa8dd1e,_0x55df93=_0x3769d8==='project'?process[_0x1ce755(0x1db)]():homedir(),_0x5b9d96=resolveConfigPath(_0x55df93);return _0x5b9d96??resolve(_0x55df93,NEW_CONFIG_NAME);}export function readConfigFile(_0x4582bd){const _0xcca81a=a77_0xa8dd1e;try{if(existsSync(_0x4582bd)){const _0x141ab8=readFileSync(_0x4582bd,{'encoding':_0xcca81a(0x1e5)});if(_0x141ab8){const _0x253ef3=JSON['parse'](_0x141ab8);return migrateOnlineEnv(_0x4582bd,_0x253ef3),_0x253ef3;}}}catch{}return{};}function migrateOnlineEnv(_0xdbd6a8,_0x1d91b1){const _0x8752b2=a77_0xa8dd1e;let _0x47b177=![];_0x1d91b1['env']===_0x8752b2(0x1a3)&&(_0x1d91b1[_0x8752b2(0x1df)]='production',_0x47b177=!![]);if(_0x1d91b1['apps']&&typeof _0x1d91b1[_0x8752b2(0x1ab)]===_0x8752b2(0x1c3))for(const _0x3fcdf8 of Object[_0x8752b2(0x1a8)](_0x1d91b1[_0x8752b2(0x1ab)])){_0x3fcdf8&&_0x3fcdf8[_0x8752b2(0x1df)]===_0x8752b2(0x1a3)&&(_0x3fcdf8[_0x8752b2(0x1df)]=_0x8752b2(0x1b2),_0x47b177=!![]);}if(_0x47b177)try{writeConfigFile(_0xdbd6a8,_0x1d91b1);}catch{}}export function writeConfigFile(_0x15a781,_0x31956c){const _0x3219c3=a77_0xa8dd1e,_0x4f8733=dirname(_0x15a781);!existsSync(_0x4f8733)&&mkdirSync(_0x4f8733,{'recursive':!![]});const _0x533789=_0x15a781+_0x3219c3(0x1c8);try{writeFileSync(_0x533789,JSON[_0x3219c3(0x1cd)](_0x31956c,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180});try{renameSync(_0x533789,_0x15a781);}catch(_0x5e793c){if(_0x5e793c[_0x3219c3(0x1c2)]===_0x3219c3(0x1cc)||_0x5e793c[_0x3219c3(0x1c2)]===_0x3219c3(0x1d7)||_0x5e793c[_0x3219c3(0x1c2)]===_0x3219c3(0x1b6)){writeFileSync(_0x15a781,JSON['stringify'](_0x31956c,null,0x2)+'\x0a',{'encoding':_0x3219c3(0x1e5)});try{unlinkSync(_0x533789);}catch{}}else throw _0x5e793c;}}catch(_0x18e13e){try{unlinkSync(_0x533789);}catch{}throw _0x18e13e;}}export function isNonInteractiveMode(_0x4e56a){const _0x413409=a77_0xa8dd1e;return!!(_0x4e56a[_0x413409(0x1a5)]||_0x4e56a['ci']||productEnvNames('CI')[_0x413409(0x1da)](_0x120b7c=>process.env[_0x120b7c]===_0x413409(0x1e2))||process.env.CI==='true'||!process['stdout'][_0x413409(0x1bb)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x28bcf6=a77_0xa8dd1e;if(!process[_0x28bcf6(0x1a6)][_0x28bcf6(0x1bb)])return![];try{const _0xcb52c1=process['stdin'][_0x28bcf6(0x1eb)];return process['stdin'][_0x28bcf6(0x1b0)](!![]),process[_0x28bcf6(0x1a6)][_0x28bcf6(0x1b0)](_0xcb52c1??![]),!![];}catch{return![];}}export async function createContext(_0x4a15f0){const _0x140438=a77_0xa8dd1e,_0x1bd6c8=readRawConfig(),_0x365ab9=buildConfig(_0x1bd6c8,_0x4a15f0);await initGlobalEnvironment(_0x365ab9);const {getUserDomain:_0x240b9d,getApiDomain:_0x1d6c35}=await import('./constant/domain.js'),_0x14a9ec={'apiDomain':_0x1d6c35(),'userDomain':_0x240b9d()},_0xabb4ab=await buildAuth(_0x365ab9);logger[_0x140438(0x1a1)](process[_0x140438(0x1db)]());const _0x40d90d=(CLI_BIN_NAME+'\x20'+process[_0x140438(0x1bd)][_0x140438(0x1d3)](0x2)['join']('\x20'))[_0x140438(0x1b8)]();logger[_0x140438(0x1ca)](_0x40d90d);const _0x22a307=isNonInteractiveMode(_0x4a15f0);return{'config':_0x365ab9,'auth':_0xabb4ab,'logger':logger,'env':_0x14a9ec,'nonInteractive':_0x22a307};}export function buildConfigFromFlags(_0x547f67){return buildConfig(readRawConfig(),_0x547f67);}export function getLocalAppAliases(_0x43526f){const _0x743fc1=a77_0xa8dd1e;return _0x43526f['apps']&&typeof _0x43526f[_0x743fc1(0x1ab)]===_0x743fc1(0x1c3)?_0x43526f[_0x743fc1(0x1ab)]:{};}export function resolveLocalAppAliasCode(_0x16caba,_0x3194f5){const _0x2aa3d9=a77_0xa8dd1e;if(!_0x3194f5)return undefined;const _0xa858b1=getLocalAppAliases(_0x16caba)[_0x3194f5],_0x3dcf5f=_0xa858b1?.[_0x2aa3d9(0x1cf)];return typeof _0x3dcf5f===_0x2aa3d9(0x1c5)&&_0x3dcf5f[_0x2aa3d9(0x1b8)]()?_0x3dcf5f[_0x2aa3d9(0x1b8)]():undefined;}export function readAppCodeFromConfig(){const _0x5980b5=a77_0xa8dd1e,_0x292829=readRawConfig(),_0x1f9c84=_0x292829[_0x5980b5(0x1cf)]??_0x292829[_0x5980b5(0x1e6)];if(typeof _0x1f9c84===_0x5980b5(0x1c5)&&_0x1f9c84[_0x5980b5(0x1b8)]())return _0x1f9c84[_0x5980b5(0x1b8)]();const _0x3cac47=resolveLocalAppAliasCode(_0x292829,typeof _0x292829[_0x5980b5(0x1bc)]===_0x5980b5(0x1c5)?_0x292829[_0x5980b5(0x1bc)]:undefined);if(_0x3cac47)return _0x3cac47;const _0x36395c=normalizeEnv(String(_0x292829[_0x5980b5(0x1df)]||_0x5980b5(0x1b2))),_0xb83a00=isDaily(_0x36395c)?_0x5980b5(0x1ba):isDev(_0x36395c)?_0x5980b5(0x1a4):_0x5980b5(0x1b2),_0x479993=resolveCachedAppCode(typeof _0x292829[_0x5980b5(0x1bc)]===_0x5980b5(0x1c5)?_0x292829[_0x5980b5(0x1bc)]:undefined,_0xb83a00,typeof _0x292829['accessKey']===_0x5980b5(0x1c5)?_0x292829[_0x5980b5(0x1b4)]:undefined);if(_0x479993)return _0x479993;const _0x367265=Object[_0x5980b5(0x1a8)](getLocalAppAliases(_0x292829))['find'](_0x4bd8f0=>_0x4bd8f0?.[_0x5980b5(0x1cf)]);return typeof _0x367265?.[_0x5980b5(0x1cf)]===_0x5980b5(0x1c5)&&_0x367265[_0x5980b5(0x1cf)][_0x5980b5(0x1b8)]()?_0x367265[_0x5980b5(0x1cf)]['trim']():undefined;}export function readScopedConfig(_0x5282b5){const _0xda4243=a77_0xa8dd1e,_0x360b12=_0x5282b5[_0xda4243(0x1e4)]?_0xda4243(0x1e4):_0xda4243(0x1d5);return readConfigFile(resolveWriteConfigPath(_0x360b12));}export function writeScopedConfig(_0x1deaf1,_0x114fe9){const _0x41ec4d=a77_0xa8dd1e,_0x25fd92=_0x114fe9[_0x41ec4d(0x1e4)]?_0x41ec4d(0x1e4):'project';writeConfigFile(resolveWriteConfigPath(_0x25fd92),_0x1deaf1);}export async function initGlobalEnvironment(_0x1c8233){const _0x42fb1d=a77_0xa8dd1e,{initEnv:_0x83f69c}=await import('./constant/env.js');_0x83f69c(_0x1c8233[_0x42fb1d(0x1df)]);const {initDomains:_0x266289}=await import(_0x42fb1d(0x1c9));_0x266289({'apiDomain':_0x1c8233[_0x42fb1d(0x1af)][_0x42fb1d(0x1dc)]||_0x1c8233[_0x42fb1d(0x1af)][_0x42fb1d(0x1d0)]||undefined,'userDomain':_0x1c8233[_0x42fb1d(0x1af)][_0x42fb1d(0x1e9)]||undefined,'runtimeDomain':_0x1c8233['raw']['runtimeDomain']||undefined,'skillHubDomain':_0x1c8233[_0x42fb1d(0x1af)]['skillHubDomain']||undefined});}export function getProjectConfigPath(){const _0x1eb633=a77_0xa8dd1e;return resolveConfigPath(process[_0x1eb633(0x1db)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x2cf509){const _0x1ec6ca=a77_0xa8dd1e;if(!existsSync(_0x2cf509))return{'status':_0x1ec6ca(0x1e8)};try{const _0x1d7cb5=readFileSync(_0x2cf509,{'encoding':'utf8'});if(!_0x1d7cb5?.[_0x1ec6ca(0x1b8)]())return{'status':_0x1ec6ca(0x1d2)};const _0x323329=JSON['parse'](_0x1d7cb5);return{'status':'ok','data':_0x323329};}catch(_0x573c00){return{'status':_0x1ec6ca(0x1b9),'message':_0x573c00 instanceof Error?_0x573c00[_0x1ec6ca(0x1c4)]:String(_0x573c00)};}}export function loadRawConfigLayers(_0x2a12ea){const _0x25d5a1=a77_0xa8dd1e;let _0x5e5358={},_0x536ebb={},_0x1a5a57,_0x2b8d74;try{_0x1a5a57=resolveConfigPath(homedir());if(_0x1a5a57){const _0x3fd38a=readFileSync(_0x1a5a57,{'encoding':_0x25d5a1(0x1e5)});if(_0x3fd38a)_0x5e5358=JSON['parse'](_0x3fd38a);}}catch{}try{const _0x178603=_0x2a12ea||process[_0x25d5a1(0x1db)]();_0x2b8d74=resolveConfigPath(_0x178603);if(_0x2b8d74){const _0x5656be=readFileSync(_0x2b8d74,{'encoding':'utf8'});if(_0x5656be)_0x536ebb=JSON['parse'](_0x5656be);}}catch{}return{'globalPath':_0x1a5a57,'projectPath':_0x2b8d74,'globalConfig':_0x5e5358,'projectConfig':_0x536ebb};}function mergeRawConfigLayers(_0x16c686){const _0x290159=a77_0xa8dd1e,{globalConfig:_0x29e080,projectConfig:_0x3a7858}=_0x16c686;if(_0x3a7858['inherit']===![]){const _0x298912={..._0x3a7858};return delete _0x298912[_0x290159(0x1d6)],_0x298912;}const _0x33cec4={..._0x29e080,..._0x3a7858};if(_0x290159(0x1bc)in _0x3a7858)_0x33cec4[_0x290159(0x1bc)]=_0x3a7858[_0x290159(0x1bc)];else _0x29e080[_0x290159(0x1bc)]&&(_0x33cec4[_0x290159(0x1bc)]=_0x29e080[_0x290159(0x1bc)]);return _0x33cec4;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x5a4609){return mergeRawConfigLayers(loadRawConfigLayers(_0x5a4609));}export function readRawConfigWithLayers(_0x1cff28){const _0x5c47fc=loadRawConfigLayers(_0x1cff28);return{'config':mergeRawConfigLayers(_0x5c47fc),'layers':_0x5c47fc};}export function resolveDefaultAppSource(_0x265ad5){const _0x9decd6=a77_0xa8dd1e;if(_0x9decd6(0x1bc)in _0x265ad5[_0x9decd6(0x1ad)])return _0x9decd6(0x1d5);if(_0x265ad5[_0x9decd6(0x1ad)][_0x9decd6(0x1d6)]===![])return null;if(_0x265ad5[_0x9decd6(0x1b5)][_0x9decd6(0x1bc)])return _0x9decd6(0x1e4);return null;}function buildConfig(_0x7e2281,_0x5de7a0){const _0x474a4e=a77_0xa8dd1e,_0x5840ff=_0x7e2281[_0x474a4e(0x1bc)]||undefined,_0x160f3f=_0x5de7a0[_0x474a4e(0x1e6)]||env(_0x474a4e(0x1a0))||undefined,_0x55db6e=_0x160f3f||_0x5840ff||undefined,_0x4e94ff=env(_0x474a4e(0x1a7))||_0x7e2281[_0x474a4e(0x1b4)]||undefined,_0x535da1=_0x5de7a0[_0x474a4e(0x1df)]||env(_0x474a4e(0x1a2))||_0x7e2281[_0x474a4e(0x1df)]||DEFAULT_CONFIG_VALUES[_0x474a4e(0x1df)],_0x48116b=normalizeEnv(String(_0x535da1)),_0x9d0ae4=isDaily(_0x48116b)?_0x474a4e(0x1ba):isDev(_0x48116b)?'development':_0x474a4e(0x1b2),_0x57a2c6=typeof _0x5de7a0[_0x474a4e(0x1cf)]===_0x474a4e(0x1c5)?_0x5de7a0[_0x474a4e(0x1cf)]:undefined,_0x28fc33=env('APPCODE'),_0x796a96=_0x160f3f?undefined:_0x7e2281[_0x474a4e(0x1cf)]||_0x7e2281['app']||undefined,_0x44884e=_0x160f3f||(_0x796a96?undefined:_0x5840ff),_0x140956=resolveLocalAppAliasCode(_0x7e2281,_0x44884e),_0x978195=resolveCachedAppCode(_0x44884e,_0x9d0ae4,_0x4e94ff),_0x55eeb9=_0x57a2c6||_0x28fc33||_0x796a96||_0x140956||_0x978195||undefined,_0x3b924d=_0x57a2c6?_0x474a4e(0x1ae):_0x28fc33?_0x474a4e(0x1df):_0x796a96?_0x474a4e(0x1e0):_0x140956?'local-alias':_0x978195?_0x474a4e(0x1d9):undefined,_0x6c9bad=_0x7e2281[_0x474a4e(0x19f)]||DEFAULT_CONFIG_VALUES['locale'],_0x825ef0=undefined,_0xcd2ac7=_0x5de7a0[_0x474a4e(0x1d4)]||env(_0x474a4e(0x1c1))||_0x7e2281[_0x474a4e(0x1d4)],_0xea8bba=normalizeLegacyOutputFormat(_0xcd2ac7),_0x19b15a=env(_0x474a4e(0x1c0))||_0x7e2281[_0x474a4e(0x1c6)],_0x2c1aed=_0x19b15a?Number(_0x19b15a)||undefined:undefined,_0x4a3175=_0x7e2281[_0x474a4e(0x1e1)]||_0x7e2281['maxRisk'],_0x484f77=_0x4a3175===_0x474a4e(0x1a9)||_0x4a3175===_0x474a4e(0x1b7)||_0x4a3175===_0x474a4e(0x1ac)?_0x4a3175:DEFAULT_CONFIG_VALUES[_0x474a4e(0x1e1)],_0x5dfe70=env(_0x474a4e(0x1de)),_0x1458d5=_0x5dfe70==='1'||_0x5dfe70==='true';return{'appCode':typeof _0x55eeb9===_0x474a4e(0x1c5)&&_0x55eeb9[_0x474a4e(0x1b8)]()?_0x55eeb9[_0x474a4e(0x1b8)]():undefined,'appCodeSource':_0x3b924d,'env':_0x9d0ae4,'locale':_0x6c9bad,'cookie':_0x825ef0,'accessKey':_0x4e94ff,'format':_0xea8bba,'pageSize':_0x2c1aed,'riskLevel':_0x484f77,'verbose':_0x1458d5,'defaultApp':_0x5840ff,'currentApp':typeof _0x55db6e===_0x474a4e(0x1c5)?_0x55db6e:undefined,'raw':_0x7e2281};}function env(_0x49babf){return productEnv(_0x49babf);}async function buildAuth(_0x2e39e3){const _0x1e8972='',_0xd24c4=!!_0x2e39e3['accessKey'];return{'cookie':_0x1e8972,'isLoggedIn':_0xd24c4,async 'getOrLogin'(){const _0x205504=a77_0x2d4a;if(_0xd24c4)return _0x1e8972;throw CliErrors[_0x205504(0x1dd)]();}};}
|
package/lib/core/api-client.d.ts
CHANGED
|
@@ -248,6 +248,51 @@ export interface RuntimeSkillUpsertInput {
|
|
|
248
248
|
sourceSessionId?: string;
|
|
249
249
|
files?: RuntimeSkillFilesManifest;
|
|
250
250
|
packageBase64?: string;
|
|
251
|
+
diagram?: RuntimeSkillDiagramSubmission;
|
|
252
|
+
}
|
|
253
|
+
export interface RuntimeSkillDiagramSubmission {
|
|
254
|
+
schemaVersion: 1;
|
|
255
|
+
mermaid: string;
|
|
256
|
+
}
|
|
257
|
+
export type RuntimeSkillDiagramScope = "personal" | "company";
|
|
258
|
+
export interface RuntimeSkillVersionDiagramWriteInput {
|
|
259
|
+
expectedDiagramRevision: number;
|
|
260
|
+
sourceFingerprint: string;
|
|
261
|
+
diagram: RuntimeSkillDiagramSubmission;
|
|
262
|
+
}
|
|
263
|
+
export interface RuntimeSkillVersionDiagramWriteResult {
|
|
264
|
+
action: "created" | "updated" | "unchanged";
|
|
265
|
+
wouldWrite: boolean;
|
|
266
|
+
namespace: string;
|
|
267
|
+
skillCode: string;
|
|
268
|
+
skillVersion: string;
|
|
269
|
+
sourceFingerprint: string;
|
|
270
|
+
payloadSha256: string;
|
|
271
|
+
currentDiagramRevision: number;
|
|
272
|
+
diagramRevision: number;
|
|
273
|
+
warnings: string[];
|
|
274
|
+
}
|
|
275
|
+
export interface RuntimeSkillVersionDiagramResult {
|
|
276
|
+
found: boolean;
|
|
277
|
+
namespace: string;
|
|
278
|
+
skillCode: string;
|
|
279
|
+
skillVersion: string;
|
|
280
|
+
sourceFingerprint: string;
|
|
281
|
+
schemaVersion?: number;
|
|
282
|
+
kind?: string;
|
|
283
|
+
title?: string;
|
|
284
|
+
summary?: string;
|
|
285
|
+
warnings: string[];
|
|
286
|
+
mermaid?: string;
|
|
287
|
+
provenance?: {
|
|
288
|
+
producer: string;
|
|
289
|
+
generatorRevision: string;
|
|
290
|
+
};
|
|
291
|
+
mermaidContentFingerprint?: string;
|
|
292
|
+
payloadSha256?: string;
|
|
293
|
+
diagramRevision: number | null;
|
|
294
|
+
expectedDiagramRevision: number;
|
|
295
|
+
updatedAt?: string;
|
|
251
296
|
}
|
|
252
297
|
export type RuntimeSkillPublishVisibility = "PRIVATE" | "NAMESPACE_ONLY";
|
|
253
298
|
export interface RuntimeSkillPublishOptions {
|
|
@@ -263,6 +308,7 @@ export interface RuntimeSkillPublishValidationResult {
|
|
|
263
308
|
warnings: string[];
|
|
264
309
|
resolvedSlug?: string;
|
|
265
310
|
resolvedVersion?: string;
|
|
311
|
+
diagramValidated?: boolean;
|
|
266
312
|
}
|
|
267
313
|
/** An app returned by the remote app list API. */
|
|
268
314
|
export interface RemoteAppItem {
|
|
@@ -447,5 +493,11 @@ export declare function publishCompanyRuntimeSkill(appCode: string, input: Runti
|
|
|
447
493
|
}): Promise<RuntimeSkillItem>;
|
|
448
494
|
/** Validates a runtime Skill publish package through SkillHub without creating a version. */
|
|
449
495
|
export declare function validateRuntimeSkillPublish(appCode: string, input: RuntimeSkillUpsertInput, validation: RuntimeSkillPublishValidationInput): Promise<RuntimeSkillPublishValidationResult>;
|
|
496
|
+
/** Validates a replacement diagram for one exact Skill version without writing it. */
|
|
497
|
+
export declare function validateRuntimeSkillVersionDiagram(appCode: string, skillCode: string, version: string, scope: RuntimeSkillDiagramScope, input: RuntimeSkillVersionDiagramWriteInput): Promise<RuntimeSkillVersionDiagramWriteResult>;
|
|
498
|
+
/** Creates or replaces the diagram for one exact Skill version. */
|
|
499
|
+
export declare function putRuntimeSkillVersionDiagram(appCode: string, skillCode: string, version: string, scope: RuntimeSkillDiagramScope, input: RuntimeSkillVersionDiagramWriteInput): Promise<RuntimeSkillVersionDiagramWriteResult>;
|
|
500
|
+
/** Reads the current diagram for one exact Skill version, including an explicit found flag. */
|
|
501
|
+
export declare function getRuntimeSkillVersionDiagram(appCode: string, skillCode: string, version: string, scope: RuntimeSkillDiagramScope): Promise<RuntimeSkillVersionDiagramResult>;
|
|
450
502
|
/** Downloads a runtime Skill package through SkillHub. */
|
|
451
503
|
export declare function downloadRuntimeSkillPackage(scope: "personal" | "company" | "builtin", skillCode: string, appCode: string, version?: string): Promise<Buffer>;
|