@lovrabet/lovrabet-cli 2.1.21-beta.1 → 2.1.21
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/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/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/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 +1 -1
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a66_0x49097b=a66_0x5977;function a66_0x5977(_0x2887c1,_0x544497){_0x2887c1=_0x2887c1-0x97;const _0x594345=a66_0x5943();let _0x59775c=_0x594345[_0x2887c1];return _0x59775c;}(function(_0x2b6acd,_0x632d4a){const _0xd1f545=a66_0x5977,_0xb40fd0=_0x2b6acd();while(!![]){try{const _0x3a336a=-parseInt(_0xd1f545(0x9a))/0x1*(-parseInt(_0xd1f545(0x9d))/0x2)+parseInt(_0xd1f545(0xae))/0x3*(-parseInt(_0xd1f545(0xa8))/0x4)+parseInt(_0xd1f545(0xc6))/0x5*(parseInt(_0xd1f545(0xb2))/0x6)+parseInt(_0xd1f545(0xba))/0x7*(-parseInt(_0xd1f545(0xb3))/0x8)+parseInt(_0xd1f545(0xca))/0x9*(parseInt(_0xd1f545(0xaf))/0xa)+parseInt(_0xd1f545(0xa0))/0xb+parseInt(_0xd1f545(0xa9))/0xc*(-parseInt(_0xd1f545(0xb6))/0xd);if(_0x3a336a===_0x632d4a)break;else _0xb40fd0['push'](_0xb40fd0['shift']());}catch(_0xe68351){_0xb40fd0['push'](_0xb40fd0['shift']());}}}(a66_0x5943,0xa3a0c));import{PRODUCT_CONFIG}from'../constant/product.js';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';export const CLI_BIN_NAME=PRODUCT_CONFIG[a66_0x49097b(0xa5)];export const CLI_DISPLAY_NAME=PRODUCT_CONFIG['cliDisplayName'];export const NPM_PACKAGE_NAME=LOVRABET_NPM_PACKAGE_NAME;function a66_0x5943(){const _0x252a02=['verbose','<name>','3702RzygZv','48568pKGGyJ','name','params','494dckKKw','production\x20|\x20development\x20|\x20daily','boolean','Clear\x20output','1533zAmadW','Alias\x20for\x20--non-interactive','Output\x20format','meowKey','Use\x20global\x20config\x20scope','app','env','map','string','Verbose\x20output','dryRun','Select\x20app\x20profile\x20by\x20name','8150VOnggn','Record\x20ID','nonInteractive','<code>','9QKacjR','Force\x20non-interactive\x20mode\x20(CI)','Name\x20filter','help','sqlcode','SQL\x20query\x20code','2317fYZphg','Show\x20help','type','108HmZaLb','format','Skip\x20confirmation\x20for\x20high-risk\x20writes','4443769WKCzFt','Environment','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20implies\x20--format\x20json\x20when\x20current\x20format\x20is\x20pretty)','yes','appcode','cliBinName','JSON\x20params\x20for\x20execute\x20commands','Override\x20appcode','4bKqfXo','17736TZbMpY','clear','dry-run','non-interactive','global','1673961jYtNlD','10791130kqxODJ'];a66_0x5943=function(){return _0x252a02;};return a66_0x5943();}export const GLOBAL_FLAGS=[{'name':a66_0x49097b(0xa4),'meowKey':a66_0x49097b(0xa4),'type':a66_0x49097b(0xc2),'description':a66_0x49097b(0xa7),'hint':a66_0x49097b(0xc9)},{'name':a66_0x49097b(0xbf),'meowKey':a66_0x49097b(0xbf),'type':a66_0x49097b(0xc2),'description':a66_0x49097b(0xc5),'hint':a66_0x49097b(0xb1)},{'name':a66_0x49097b(0xc0),'meowKey':'env','type':a66_0x49097b(0xc2),'description':a66_0x49097b(0xa1),'hint':a66_0x49097b(0xb7)},{'name':a66_0x49097b(0x9e),'meowKey':a66_0x49097b(0x9e),'type':a66_0x49097b(0xc2),'description':a66_0x49097b(0xbc),'hint':'json\x20|\x20pretty\x20|\x20compress'},{'name':'jq','meowKey':'jq','type':a66_0x49097b(0xc2),'description':a66_0x49097b(0xa2),'hint':'<expr>'},{'name':a66_0x49097b(0xab),'meowKey':a66_0x49097b(0xc4),'type':a66_0x49097b(0xb8),'description':'Preview\x20operation\x20without\x20executing'},{'name':a66_0x49097b(0xa3),'meowKey':a66_0x49097b(0xa3),'type':a66_0x49097b(0xb8),'description':a66_0x49097b(0x9f)},{'name':'non-interactive','meowKey':a66_0x49097b(0xc8),'type':'boolean','description':a66_0x49097b(0xcb)},{'name':a66_0x49097b(0xad),'meowKey':a66_0x49097b(0xad),'type':a66_0x49097b(0xb8),'description':a66_0x49097b(0xbe)},{'name':'ci','meowKey':'ci','type':a66_0x49097b(0xb8),'description':a66_0x49097b(0xbb),'hidden':!![]},{'name':'help','meowKey':a66_0x49097b(0x97),'type':'boolean','description':a66_0x49097b(0x9b)},{'name':'id','meowKey':'id','type':a66_0x49097b(0xc2),'description':a66_0x49097b(0xc7),'hidden':!![]},{'name':a66_0x49097b(0xb4),'meowKey':'name','type':a66_0x49097b(0xc2),'description':a66_0x49097b(0xcc),'hidden':!![]},{'name':a66_0x49097b(0x98),'meowKey':a66_0x49097b(0x98),'type':a66_0x49097b(0xc2),'description':a66_0x49097b(0x99),'hidden':!![]},{'name':'params','meowKey':a66_0x49097b(0xb5),'type':'string','description':a66_0x49097b(0xa6),'hidden':!![]},{'name':a66_0x49097b(0xb0),'meowKey':a66_0x49097b(0xb0),'type':a66_0x49097b(0xb8),'description':a66_0x49097b(0xc3),'hidden':!![]},{'name':a66_0x49097b(0xaa),'meowKey':a66_0x49097b(0xaa),'type':a66_0x49097b(0xb8),'description':a66_0x49097b(0xb9),'hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a66_0x49097b(0xa4),'app',a66_0x49097b(0xc0),a66_0x49097b(0x9e),'jq','dry-run',a66_0x49097b(0xa3),a66_0x49097b(0xac),'ci']);export function buildMeowFlags(){const _0xb459ea=a66_0x49097b;return Object['fromEntries'](GLOBAL_FLAGS[_0xb459ea(0xc1)](_0x420d69=>[_0x420d69[_0xb459ea(0xbd)],{'type':_0x420d69[_0xb459ea(0x9c)]}]));}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a67_0x2e522a=a67_0x326e;(function(_0x484c6a,_0x559105){const _0x45c6ee=a67_0x326e,_0x32804d=_0x484c6a();while(!![]){try{const _0x49c447=parseInt(_0x45c6ee(0x80))/0x1+-parseInt(_0x45c6ee(0x7d))/0x2+parseInt(_0x45c6ee(0x7a))/0x3*(parseInt(_0x45c6ee(0x7c))/0x4)+parseInt(_0x45c6ee(0x84))/0x5*(parseInt(_0x45c6ee(0x7b))/0x6)+parseInt(_0x45c6ee(0x7e))/0x7+-parseInt(_0x45c6ee(0x79))/0x8*(-parseInt(_0x45c6ee(0x82))/0x9)+parseInt(_0x45c6ee(0x7f))/0xa*(-parseInt(_0x45c6ee(0x83))/0xb);if(_0x49c447===_0x559105)break;else _0x32804d['push'](_0x32804d['shift']());}catch(_0x5d94ff){_0x32804d['push'](_0x32804d['shift']());}}}(a67_0x47f3,0xf1bcb));export const DEFAULT_APP_PROFILE_NAME='main';function a67_0x326e(_0x48ac12,_0xec88be){_0x48ac12=_0x48ac12-0x77;const _0x47f35f=a67_0x47f3();let _0x326e1a=_0x47f35f[_0x48ac12];return _0x326e1a;}function a67_0x47f3(){const _0x501bb1=['12986750OfdQDN','2030QmefjT','868989rzMeDM','compress','5298552EkaVer','318175SkbQeM','8626520rJHYKa','write','en-US','16XAuKTT','174fCMdbc','6kHZRng','111824UtMgqu','773034tzntjr'];a67_0x47f3=function(){return _0x501bb1;};return a67_0x47f3();}export const DEFAULT_CONFIG_VALUES={'env':'production','format':a67_0x2e522a(0x81),'locale':a67_0x2e522a(0x78),'riskLevel':a67_0x2e522a(0x77)};export const DEFAULT_COMMAND_OUTPUT_FORMAT='compress';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a68_0x42d6(_0x1a1e7a,_0x5db797){_0x1a1e7a=_0x1a1e7a-0x13e;const _0x599afd=a68_0x599a();let _0x42d68a=_0x599afd[_0x1a1e7a];return _0x42d68a;}const a68_0x41a1bb=a68_0x42d6;function a68_0x599a(){const _0x57b6a3=['3247040kOpoAC','2538942UVXNWv','5GHQUXR','36CzBsxL','2460198jFyEYq','3959802rYYgZS','skillSource','24Nvmanw','38141aoTxdM','9177296AyFoVc','npmRegistryBaseUrl','1806796FuQumQ'];a68_0x599a=function(){return _0x57b6a3;};return a68_0x599a();}(function(_0x5e4df9,_0x5a399c){const _0x206e27=a68_0x42d6,_0x48a523=_0x5e4df9();while(!![]){try{const _0x4da9cf=parseInt(_0x206e27(0x142))/0x1*(parseInt(_0x206e27(0x141))/0x2)+parseInt(_0x206e27(0x13f))/0x3+parseInt(_0x206e27(0x145))/0x4*(-parseInt(_0x206e27(0x148))/0x5)+-parseInt(_0x206e27(0x13e))/0x6+-parseInt(_0x206e27(0x147))/0x7+-parseInt(_0x206e27(0x143))/0x8+-parseInt(_0x206e27(0x149))/0x9*(-parseInt(_0x206e27(0x146))/0xa);if(_0x4da9cf===_0x5a399c)break;else _0x48a523['push'](_0x48a523['shift']());}catch(_0x4ee59c){_0x48a523['push'](_0x48a523['shift']());}}}(a68_0x599a,0xac14a));import{PRODUCT_CONFIG}from'../constant/product.js';export const LOVRABET_NPM_PACKAGE_NAME=PRODUCT_CONFIG['npmPackageName'];export const LOVRABET_SKILL_SOURCE=PRODUCT_CONFIG[a68_0x41a1bb(0x140)];export const NPM_REGISTRY_BASE_URL=PRODUCT_CONFIG[a68_0x41a1bb(0x144)];
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a69_0xf230d0=a69_0x1347;function a69_0x1347(_0x19b078,_0x45f731){_0x19b078=_0x19b078-0x176;const _0xe2d68d=a69_0xe2d6();let _0x1347b7=_0xe2d68d[_0x19b078];return _0x1347b7;}(function(_0x4ed426,_0x2a7af8){const _0x3884c1=a69_0x1347,_0x15a448=_0x4ed426();while(!![]){try{const _0x25edaf=parseInt(_0x3884c1(0x176))/0x1*(parseInt(_0x3884c1(0x187))/0x2)+-parseInt(_0x3884c1(0x184))/0x3*(-parseInt(_0x3884c1(0x181))/0x4)+-parseInt(_0x3884c1(0x17f))/0x5+-parseInt(_0x3884c1(0x17b))/0x6+parseInt(_0x3884c1(0x177))/0x7*(-parseInt(_0x3884c1(0x189))/0x8)+-parseInt(_0x3884c1(0x185))/0x9+-parseInt(_0x3884c1(0x183))/0xa*(-parseInt(_0x3884c1(0x178))/0xb);if(_0x25edaf===_0x2a7af8)break;else _0x15a448['push'](_0x15a448['shift']());}catch(_0x1e5733){_0x15a448['push'](_0x15a448['shift']());}}}(a69_0xe2d6,0x20180));import{getEnv,isProduction}from'../constant/env.js';import{PRODUCT_CONFIG}from'../constant/product.js';let customApiDomain,customUserDomain,customRuntimeDomain,customSkillHubDomain;export function initDomains(_0x236ba6){const _0x3bd634=a69_0x1347;customApiDomain=_0x236ba6?.[_0x3bd634(0x180)],customUserDomain=_0x236ba6?.[_0x3bd634(0x17d)],customRuntimeDomain=_0x236ba6?.[_0x3bd634(0x179)],customSkillHubDomain=_0x236ba6?.['skillHubDomain'];}function a69_0xe2d6(){const _0x21fa7b=['api','586450RGsCBh','apiDomain','20vikyIz','skillhub','14130NuaYug','121575HnITko','1471725HaoUIA','nonProduction','242sdNjKh','production','4136wBVxyI','domains','641AuNwKG','147JUhlpJ','2134uwzMYx','runtimeDomain','runtime','787080mKcyXL','user','userDomain'];a69_0xe2d6=function(){return _0x21fa7b;};return a69_0xe2d6();}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?PRODUCT_CONFIG['domains'][a69_0xf230d0(0x188)][a69_0xf230d0(0x17c)]:PRODUCT_CONFIG[a69_0xf230d0(0x18a)][a69_0xf230d0(0x186)][a69_0xf230d0(0x17c)]);export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a69_0xf230d0(0x18a)][a69_0xf230d0(0x188)][a69_0xf230d0(0x17e)]:PRODUCT_CONFIG[a69_0xf230d0(0x18a)]['nonProduction']['api']);export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?PRODUCT_CONFIG['domains'][a69_0xf230d0(0x188)][a69_0xf230d0(0x17a)]:PRODUCT_CONFIG[a69_0xf230d0(0x18a)][a69_0xf230d0(0x186)][a69_0xf230d0(0x17a)]);export const getSkillHubDomain=()=>customSkillHubDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a69_0xf230d0(0x18a)][a69_0xf230d0(0x188)][a69_0xf230d0(0x182)]:PRODUCT_CONFIG[a69_0xf230d0(0x18a)][a69_0xf230d0(0x186)]['skillhub']);
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a70_0x27a9a9=a70_0x46e0;(function(_0x25d99e,_0x1545cd){const _0x11fdfe=a70_0x46e0,_0x2fed1e=_0x25d99e();while(!![]){try{const _0x38f2fb=-parseInt(_0x11fdfe(0xf7))/0x1+-parseInt(_0x11fdfe(0xf8))/0x2+parseInt(_0x11fdfe(0xf9))/0x3+parseInt(_0x11fdfe(0xf4))/0x4*(-parseInt(_0x11fdfe(0xf5))/0x5)+-parseInt(_0x11fdfe(0xec))/0x6+parseInt(_0x11fdfe(0xee))/0x7+-parseInt(_0x11fdfe(0xf6))/0x8*(-parseInt(_0x11fdfe(0xef))/0x9);if(_0x38f2fb===_0x1545cd)break;else _0x2fed1e['push'](_0x2fed1e['shift']());}catch(_0x5a7168){_0x2fed1e['push'](_0x2fed1e['shift']());}}}(a70_0x3a08,0x5d86f));import{productEnv}from'../constant/product.js';function a70_0x46e0(_0x53898f,_0x58d7cf){_0x53898f=_0x53898f-0xec;const _0x3a08ac=a70_0x3a08();let _0x46e037=_0x3a08ac[_0x53898f];return _0x46e037;}export const RUNTIME_ENV_VALUES=[a70_0x27a9a9(0xf0),'development',a70_0x27a9a9(0xf3)];export function normalizeEnv(_0x347bf7){const _0xd699f1=a70_0x27a9a9;return _0x347bf7===_0xd699f1(0xf2)?_0xd699f1(0xf0):_0x347bf7;}export function isProduction(_0x53a334){const _0x465cd8=a70_0x27a9a9;return normalizeEnv(_0x53a334)===_0x465cd8(0xf0);}export function isDaily(_0x513595){const _0x116a63=a70_0x27a9a9;return normalizeEnv(_0x513595)===_0x116a63(0xf3);}export function isDev(_0x547111){const _0x398f9a=a70_0x27a9a9,_0x9cccb=normalizeEnv(_0x547111);return _0x9cccb===_0x398f9a(0xed)||_0x9cccb===_0x398f9a(0xf1);}let env=normalizeEnv(productEnv('ENV')||'production');export function getEnv(){return env;}export function initEnv(_0xcd78ec){env=normalizeEnv(_0xcd78ec);}function a70_0x3a08(){const _0x15c36d=['daily','20kELYuG','472330RTsEbB','504296qBBZnK','595557CBYqkn','688234JrYnWT','43611QGlYQi','1775814VgfgJf','development','3945445XEihnL','216hVfZRv','production','dev','online'];a70_0x3a08=function(){return _0x15c36d;};return a70_0x3a08();}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a71_0x9505(_0x296085,_0x5de51e){_0x296085=_0x296085-0x143;const _0x526b88=a71_0x526b();let _0x9505db=_0x526b88[_0x296085];return _0x9505db;}const a71_0x3af4d5=a71_0x9505;(function(_0x2c76bb,_0x501f8e){const _0x47ea1a=a71_0x9505,_0x882c7d=_0x2c76bb();while(!![]){try{const _0x24c13e=parseInt(_0x47ea1a(0x143))/0x1+parseInt(_0x47ea1a(0x146))/0x2*(parseInt(_0x47ea1a(0x147))/0x3)+-parseInt(_0x47ea1a(0x144))/0x4*(-parseInt(_0x47ea1a(0x14a))/0x5)+parseInt(_0x47ea1a(0x150))/0x6*(parseInt(_0x47ea1a(0x14b))/0x7)+-parseInt(_0x47ea1a(0x145))/0x8*(parseInt(_0x47ea1a(0x14f))/0x9)+parseInt(_0x47ea1a(0x14e))/0xa+parseInt(_0x47ea1a(0x149))/0xb*(-parseInt(_0x47ea1a(0x148))/0xc);if(_0x24c13e===_0x501f8e)break;else _0x882c7d['push'](_0x882c7d['shift']());}catch(_0x2cc194){_0x882c7d['push'](_0x882c7d['shift']());}}}(a71_0x526b,0xcfa2e));function a71_0x526b(){const _0x1f653a=['3126390LtMLMV','2741301yqcsqI','2550fihCTQ','1253241aymHjH','28316yvNSrs','40AgDLGM','2ZUjKvO','2240484pHdBeJ','1053732rtmeWs','253saEgtd','335MEaZZb','26453njtZNO','json','pretty'];a71_0x526b=function(){return _0x1f653a;};return a71_0x526b();}export const OUTPUT_FORMAT_VALUES=[a71_0x3af4d5(0x14c),a71_0x3af4d5(0x14d),'compress'];
|
package/lib/constant/product.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a72_0x13cfbc=a72_0x5249;(function(_0x6c8266,_0x3c74c9){const _0x3f553d=a72_0x5249,_0x338ae0=_0x6c8266();while(!![]){try{const _0xa48aaf=parseInt(_0x3f553d(0x1a0))/0x1+parseInt(_0x3f553d(0x198))/0x2*(parseInt(_0x3f553d(0x196))/0x3)+-parseInt(_0x3f553d(0x1a2))/0x4+-parseInt(_0x3f553d(0x1a6))/0x5*(-parseInt(_0x3f553d(0x1a8))/0x6)+-parseInt(_0x3f553d(0x19a))/0x7+parseInt(_0x3f553d(0x1a5))/0x8+-parseInt(_0x3f553d(0x19e))/0x9;if(_0xa48aaf===_0x3c74c9)break;else _0x338ae0['push'](_0x338ae0['shift']());}catch(_0x1b03d6){_0x338ae0['push'](_0x338ae0['shift']());}}}(a72_0x25ad,0x96b9e));export const PRODUCT_CONFIG={'cliBinName':a72_0x13cfbc(0x199),'cliDisplayName':a72_0x13cfbc(0x19f),'npmPackageName':a72_0x13cfbc(0x195),'skillSource':a72_0x13cfbc(0x192),'npmRegistryBaseUrl':a72_0x13cfbc(0x18f),'envPrefix':'LOVRABET','legacyEnvPrefixes':[a72_0x13cfbc(0x1a7)],'configFileNames':[a72_0x13cfbc(0x19c),a72_0x13cfbc(0x191)],'newConfigFileName':a72_0x13cfbc(0x19c),'homeDirName':a72_0x13cfbc(0x194),'logFileName':'.lovrabet-runtime.log','invokeSource':a72_0x13cfbc(0x1a9),'userCenterDisplayName':a72_0x13cfbc(0x1ac),'skipNpxSkillsEnvSuffix':a72_0x13cfbc(0x19b),'domains':{'production':{'user':a72_0x13cfbc(0x1a4),'api':a72_0x13cfbc(0x190),'runtime':a72_0x13cfbc(0x19d),'skillhub':a72_0x13cfbc(0x193)},'nonProduction':{'user':a72_0x13cfbc(0x1a3),'api':a72_0x13cfbc(0x1aa),'runtime':a72_0x13cfbc(0x1ab),'skillhub':a72_0x13cfbc(0x197)}},'accessKeyCreatePath':a72_0x13cfbc(0x1a1)};export function productEnvName(_0x52c5fc){return PRODUCT_CONFIG['envPrefix']+'_'+_0x52c5fc;}export function productEnvNames(_0x5d5575){return[productEnvName(_0x5d5575),...PRODUCT_CONFIG['legacyEnvPrefixes']['map'](_0x4ee7cb=>_0x4ee7cb+'_'+_0x5d5575)];}function a72_0x5249(_0x4762a6,_0x24b0a0){_0x4762a6=_0x4762a6-0x18f;const _0x25ad89=a72_0x25ad();let _0x524925=_0x25ad89[_0x4762a6];return _0x524925;}function a72_0x25ad(){const _0x43c33d=['https://skills.lovrabet.com','.lovrabet','@lovrabet/lovrabet-cli','3qwSBkf','https://skills-daily.lovrabet.com','1529036zSkFqm','lovrabet','8398369xXRuap','SKIP_NPX_SKILLS','.lovrabet.json','https://runtime.lovrabet.com','10212741RLpetu','Lovrabet\x20Runtime\x20CLI','870659MIAMZh','/user/ak','2206940taVaro','https://user-daily.lovrabet.com','https://user.lovrabet.com','9711336YQhEWz','172245hiRTXL','RABETBASE','114PVmiDU','cli:lovrabet-runtime','https://daily-api.lovrabet.com','https://daily-runtime.lovrabet.com','Lovrabet\x20User\x20Center','https://registry.npmjs.org','https://api.lovrabet.com','.lovrabetrc','lovrabet/lovrabet-cli'];a72_0x25ad=function(){return _0x43c33d;};return a72_0x25ad();}export function productEnv(_0x2a5380){for(const _0x2a0316 of productEnvNames(_0x2a5380)){const _0x12e164=process.env[_0x2a0316];if(_0x12e164!==undefined)return _0x12e164;}return undefined;}
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a73_0x11b060=a73_0x29e7;function a73_0x29e7(_0x30ae16,_0x5e26a1){_0x30ae16=_0x30ae16-0x175;const _0x384659=a73_0x3846();let _0x29e730=_0x384659[_0x30ae16];return _0x29e730;}(function(_0x202b88,_0x49be85){const _0x1f5658=a73_0x29e7,_0x1bb0a5=_0x202b88();while(!![]){try{const _0x22112d=parseInt(_0x1f5658(0x175))/0x1*(parseInt(_0x1f5658(0x17d))/0x2)+-parseInt(_0x1f5658(0x176))/0x3*(parseInt(_0x1f5658(0x177))/0x4)+-parseInt(_0x1f5658(0x180))/0x5+-parseInt(_0x1f5658(0x17a))/0x6*(-parseInt(_0x1f5658(0x17c))/0x7)+parseInt(_0x1f5658(0x181))/0x8*(-parseInt(_0x1f5658(0x17b))/0x9)+-parseInt(_0x1f5658(0x17f))/0xa+-parseInt(_0x1f5658(0x17e))/0xb*(-parseInt(_0x1f5658(0x179))/0xc);if(_0x22112d===_0x49be85)break;else _0x1bb0a5['push'](_0x1bb0a5['shift']());}catch(_0x113524){_0x1bb0a5['push'](_0x1bb0a5['shift']());}}}(a73_0x3846,0xec741));export const RISK_LEVEL_VALUES=['read','write',a73_0x11b060(0x178)];function a73_0x3846(){const _0x20881a=['223562fqqGOW','11DdYGnZ','9146080XNFFIU','7017870BLFsIQ','15208LLXtMX','4hGhyTk','123BvKtwx','160316WCntDX','high-risk-write','55102668XecZMh','2400iCdFiX','1611xDEIKZ','4046NAeMDs'];a73_0x3846=function(){return _0x20881a;};return a73_0x3846();}
|
package/lib/constant/url.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a74_0x5e0e(_0x14c929,_0x4585b7){_0x14c929=_0x14c929-0x192;const _0x363775=a74_0x3637();let _0x5e0e32=_0x363775[_0x14c929];return _0x5e0e32;}const a74_0x3d257d=a74_0x5e0e;(function(_0x52d266,_0x301cc9){const _0x44e4d8=a74_0x5e0e,_0x3f486d=_0x52d266();while(!![]){try{const _0x4ca33f=-parseInt(_0x44e4d8(0x199))/0x1*(-parseInt(_0x44e4d8(0x192))/0x2)+-parseInt(_0x44e4d8(0x19d))/0x3+parseInt(_0x44e4d8(0x19e))/0x4*(-parseInt(_0x44e4d8(0x19f))/0x5)+parseInt(_0x44e4d8(0x197))/0x6+parseInt(_0x44e4d8(0x193))/0x7*(-parseInt(_0x44e4d8(0x19c))/0x8)+-parseInt(_0x44e4d8(0x19a))/0x9*(parseInt(_0x44e4d8(0x19b))/0xa)+parseInt(_0x44e4d8(0x195))/0xb;if(_0x4ca33f===_0x301cc9)break;else _0x3f486d['push'](_0x3f486d['shift']());}catch(_0x57ca90){_0x3f486d['push'](_0x3f486d['shift']());}}}(a74_0x3637,0x812b8));import{PRODUCT_CONFIG}from'../constant/product.js';export const USER_ACCESS_KEY_CREATE_URL=''+PRODUCT_CONFIG[a74_0x3d257d(0x194)][a74_0x3d257d(0x196)]['user']+PRODUCT_CONFIG[a74_0x3d257d(0x198)];function a74_0x3637(){const _0xfb8a8d=['2NvEmcI','84IxIHvQ','domains','18851415kbFKtJ','production','2698764QHlACx','accessKeyCreatePath','35864eOymWZ','91251AmeZyr','510XpuRkw','76696DxwBOt','938751OHivEm','4fcCyXm','3626465ZYtlQV'];a74_0x3637=function(){return _0xfb8a8d;};return a74_0x3637();}
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a75_0x4fad0d=a75_0x42ee;(function(_0x4d0d2b,_0x3fbbbe){const _0x48bd71=a75_0x42ee,_0x577792=_0x4d0d2b();while(!![]){try{const _0x16f13c=-parseInt(_0x48bd71(0x1ef))/0x1*(parseInt(_0x48bd71(0x1ce))/0x2)+parseInt(_0x48bd71(0x1d9))/0x3*(parseInt(_0x48bd71(0x1e6))/0x4)+-parseInt(_0x48bd71(0x1df))/0x5+parseInt(_0x48bd71(0x1b9))/0x6+-parseInt(_0x48bd71(0x1ab))/0x7*(parseInt(_0x48bd71(0x1d4))/0x8)+-parseInt(_0x48bd71(0x1b5))/0x9*(-parseInt(_0x48bd71(0x1e0))/0xa)+parseInt(_0x48bd71(0x1ba))/0xb;if(_0x16f13c===_0x3fbbbe)break;else _0x577792['push'](_0x577792['shift']());}catch(_0x5c8570){_0x577792['push'](_0x577792['shift']());}}}(a75_0x13e0,0x94b7d));import{readFileSync,existsSync,mkdirSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{homedir}from'node:os';function a75_0x42ee(_0x156c59,_0x10964e){_0x156c59=_0x156c59-0x1a8;const _0x13e087=a75_0x13e0();let _0x42eec5=_0x13e087[_0x156c59];return _0x42eec5;}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[a75_0x4fad0d(0x1ad)];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a75_0x4fad0d(0x1b6)];function resolveConfigPath(_0x4b13b9){for(const _0x2bfae3 of CONFIG_NAMES){const _0x42be4d=resolve(_0x4b13b9,_0x2bfae3);if(existsSync(_0x42be4d))return _0x42be4d;}return undefined;}export function resolveWriteConfigPath(_0x5b3c7e){const _0x3c79f7=a75_0x4fad0d,_0x3b7541=_0x5b3c7e===_0x3c79f7(0x1d7)?process[_0x3c79f7(0x1e7)]():homedir(),_0x18dcf9=resolveConfigPath(_0x3b7541);return _0x18dcf9??resolve(_0x3b7541,NEW_CONFIG_NAME);}export function readConfigFile(_0x185749){const _0x49def5=a75_0x4fad0d;try{if(existsSync(_0x185749)){const _0x279508=readFileSync(_0x185749,{'encoding':'utf8'});if(_0x279508){const _0x136dbc=JSON[_0x49def5(0x1c8)](_0x279508);return migrateOnlineEnv(_0x185749,_0x136dbc),_0x136dbc;}}}catch{}return{};}function migrateOnlineEnv(_0x548e26,_0x21fe45){const _0x4b6fcf=a75_0x4fad0d;let _0x4bd740=![];_0x21fe45[_0x4b6fcf(0x1c3)]===_0x4b6fcf(0x1e9)&&(_0x21fe45[_0x4b6fcf(0x1c3)]='production',_0x4bd740=!![]);if(_0x21fe45[_0x4b6fcf(0x1ee)]&&typeof _0x21fe45[_0x4b6fcf(0x1ee)]==='object')for(const _0x3287d6 of Object[_0x4b6fcf(0x1e8)](_0x21fe45[_0x4b6fcf(0x1ee)])){_0x3287d6&&_0x3287d6[_0x4b6fcf(0x1c3)]===_0x4b6fcf(0x1e9)&&(_0x3287d6[_0x4b6fcf(0x1c3)]=_0x4b6fcf(0x1d3),_0x4bd740=!![]);}if(_0x4bd740)try{writeConfigFile(_0x548e26,_0x21fe45);}catch{}}export function writeConfigFile(_0x4e2541,_0x2f7a33){const _0xf1c14c=a75_0x4fad0d,_0x2c0749=dirname(_0x4e2541);!existsSync(_0x2c0749)&&mkdirSync(_0x2c0749,{'recursive':!![]});const _0xcc1956=_0x4e2541+_0xf1c14c(0x1bd);try{writeFileSync(_0xcc1956,JSON[_0xf1c14c(0x1eb)](_0x2f7a33,null,0x2)+'\x0a',{'encoding':_0xf1c14c(0x1c2),'mode':0x180});try{renameSync(_0xcc1956,_0x4e2541);}catch(_0x54d425){if(_0x54d425[_0xf1c14c(0x1b0)]===_0xf1c14c(0x1d8)||_0x54d425[_0xf1c14c(0x1b0)]===_0xf1c14c(0x1c9)||_0x54d425[_0xf1c14c(0x1b0)]==='EACCES'){writeFileSync(_0x4e2541,JSON[_0xf1c14c(0x1eb)](_0x2f7a33,null,0x2)+'\x0a',{'encoding':'utf8'});try{unlinkSync(_0xcc1956);}catch{}}else throw _0x54d425;}}catch(_0x3f61fa){try{unlinkSync(_0xcc1956);}catch{}throw _0x3f61fa;}}export function isNonInteractiveMode(_0x24b6e1){const _0x198522=a75_0x4fad0d;return!!(_0x24b6e1[_0x198522(0x1c4)]||_0x24b6e1['ci']||productEnvNames('CI')[_0x198522(0x1b2)](_0x2616f1=>process.env[_0x2616f1]===_0x198522(0x1b8))||process.env.CI==='true'||!process[_0x198522(0x1bf)]['isTTY']||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x12c0a0=a75_0x4fad0d;if(!process['stdin'][_0x12c0a0(0x1cc)])return![];try{const _0x3eba89=process[_0x12c0a0(0x1ec)]['isRaw'];return process['stdin'][_0x12c0a0(0x1dd)](!![]),process['stdin']['setRawMode'](_0x3eba89??![]),!![];}catch{return![];}}export async function createContext(_0xf4c9d5){const _0xc99384=a75_0x4fad0d,_0x203115=readRawConfig(),_0x184195=buildConfig(_0x203115,_0xf4c9d5);await initGlobalEnvironment(_0x184195);const {getUserDomain:_0x63e3c5,getApiDomain:_0xb3431a}=await import(_0xc99384(0x1f1)),_0x35538a={'apiDomain':_0xb3431a(),'userDomain':_0x63e3c5()},_0x363e0b=await buildAuth(_0x184195);logger[_0xc99384(0x1e1)](process[_0xc99384(0x1e7)]());const _0x3a6f26=(CLI_BIN_NAME+'\x20'+process[_0xc99384(0x1dc)]['slice'](0x2)[_0xc99384(0x1e5)]('\x20'))['trim']();logger[_0xc99384(0x1be)](_0x3a6f26);const _0x27ee13=isNonInteractiveMode(_0xf4c9d5);return{'config':_0x184195,'auth':_0x363e0b,'logger':logger,'env':_0x35538a,'nonInteractive':_0x27ee13};}function a75_0x13e0(){const _0x6d539e=['accessKey','appcode','isTTY','userDomain','12632MFqIow','global','error','daily','app','production','5064nIqqrc','raw','inherit','project','EPERM','3VrpHaR','find','local-alias','argv','setRawMode','apiDomain','4847005VVOQyG','1150vzGKLl','setLogPath','string','locale','FORMAT','join','1812280OSNQjO','cwd','values','online','APP','stringify','stdin','PAGE_SIZE','apps','160HRqFUV','format','./constant/domain.js','authRequired','APPCODE','globalConfig','11893PDCeGW','write','configFileNames','maxRisk','riskLevel','code','trim','some','missing','top-level','12897HikKZn','newConfigFileName','empty','true','1229904QZAJmA','31259008mcSpQi','VERBOSE','ACCESS_KEY','.tmp','setRawCommand','stdout','projectConfig','runtimeDomain','utf8','env','nonInteractive','development','host','defaultApp','parse','EXDEV'];a75_0x13e0=function(){return _0x6d539e;};return a75_0x13e0();}export function buildConfigFromFlags(_0x1d6a3f){return buildConfig(readRawConfig(),_0x1d6a3f);}export function getLocalAppAliases(_0x301569){const _0x2f9b36=a75_0x4fad0d;return _0x301569[_0x2f9b36(0x1ee)]&&typeof _0x301569[_0x2f9b36(0x1ee)]==='object'?_0x301569[_0x2f9b36(0x1ee)]:{};}export function resolveLocalAppAliasCode(_0xa10c95,_0x50ee96){const _0x4190fb=a75_0x4fad0d;if(!_0x50ee96)return undefined;const _0x3a4931=getLocalAppAliases(_0xa10c95)[_0x50ee96],_0xbaf0e=_0x3a4931?.['appcode'];return typeof _0xbaf0e==='string'&&_0xbaf0e[_0x4190fb(0x1b1)]()?_0xbaf0e[_0x4190fb(0x1b1)]():undefined;}export function readAppCodeFromConfig(){const _0x3a17cf=a75_0x4fad0d,_0x324da2=readRawConfig(),_0x42bc35=_0x324da2[_0x3a17cf(0x1cb)]??_0x324da2[_0x3a17cf(0x1d2)];if(typeof _0x42bc35==='string'&&_0x42bc35[_0x3a17cf(0x1b1)]())return _0x42bc35['trim']();const _0x3b39a3=resolveLocalAppAliasCode(_0x324da2,typeof _0x324da2[_0x3a17cf(0x1c7)]===_0x3a17cf(0x1e2)?_0x324da2[_0x3a17cf(0x1c7)]:undefined);if(_0x3b39a3)return _0x3b39a3;const _0x2fe843=normalizeEnv(String(_0x324da2[_0x3a17cf(0x1c3)]||'production')),_0x499f78=isDaily(_0x2fe843)?_0x3a17cf(0x1d1):isDev(_0x2fe843)?_0x3a17cf(0x1c5):_0x3a17cf(0x1d3),_0x16fb64=resolveCachedAppCode(typeof _0x324da2['defaultApp']===_0x3a17cf(0x1e2)?_0x324da2[_0x3a17cf(0x1c7)]:undefined,_0x499f78,typeof _0x324da2[_0x3a17cf(0x1ca)]===_0x3a17cf(0x1e2)?_0x324da2[_0x3a17cf(0x1ca)]:undefined);if(_0x16fb64)return _0x16fb64;const _0x6204b3=Object[_0x3a17cf(0x1e8)](getLocalAppAliases(_0x324da2))[_0x3a17cf(0x1da)](_0x593bfc=>_0x593bfc?.[_0x3a17cf(0x1cb)]);return typeof _0x6204b3?.['appcode']===_0x3a17cf(0x1e2)&&_0x6204b3[_0x3a17cf(0x1cb)]['trim']()?_0x6204b3[_0x3a17cf(0x1cb)][_0x3a17cf(0x1b1)]():undefined;}export function readScopedConfig(_0x5034a8){const _0x422bb1=a75_0x4fad0d,_0x405e3e=_0x5034a8[_0x422bb1(0x1cf)]?'global':_0x422bb1(0x1d7);return readConfigFile(resolveWriteConfigPath(_0x405e3e));}export function writeScopedConfig(_0x24224b,_0x54960b){const _0x1c4d9d=a75_0x4fad0d,_0x35c2d0=_0x54960b[_0x1c4d9d(0x1cf)]?_0x1c4d9d(0x1cf):_0x1c4d9d(0x1d7);writeConfigFile(resolveWriteConfigPath(_0x35c2d0),_0x24224b);}export async function initGlobalEnvironment(_0x16454e){const _0x130d5c=a75_0x4fad0d,{initEnv:_0x5b5bab}=await import('./constant/env.js');_0x5b5bab(_0x16454e[_0x130d5c(0x1c3)]);const {initDomains:_0xfc4f01}=await import('./constant/domain.js');_0xfc4f01({'apiDomain':_0x16454e[_0x130d5c(0x1d5)][_0x130d5c(0x1de)]||_0x16454e[_0x130d5c(0x1d5)][_0x130d5c(0x1c6)]||undefined,'userDomain':_0x16454e[_0x130d5c(0x1d5)][_0x130d5c(0x1cd)]||undefined,'runtimeDomain':_0x16454e['raw'][_0x130d5c(0x1c1)]||undefined,'skillHubDomain':_0x16454e['raw']['skillHubDomain']||undefined});}export function getProjectConfigPath(){const _0x4cbb2e=a75_0x4fad0d;return resolveConfigPath(process[_0x4cbb2e(0x1e7)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x3ffd4a){const _0x40a31f=a75_0x4fad0d;if(!existsSync(_0x3ffd4a))return{'status':_0x40a31f(0x1b3)};try{const _0x1e623d=readFileSync(_0x3ffd4a,{'encoding':'utf8'});if(!_0x1e623d?.[_0x40a31f(0x1b1)]())return{'status':_0x40a31f(0x1b7)};const _0x5b27ec=JSON[_0x40a31f(0x1c8)](_0x1e623d);return{'status':'ok','data':_0x5b27ec};}catch(_0x4fbd92){return{'status':_0x40a31f(0x1d0),'message':_0x4fbd92 instanceof Error?_0x4fbd92['message']:String(_0x4fbd92)};}}export function loadRawConfigLayers(_0x49a98a){const _0x29e2a8=a75_0x4fad0d;let _0x32820b={},_0x4d43c8={},_0x17232f,_0x30e489;try{_0x17232f=resolveConfigPath(homedir());if(_0x17232f){const _0x37af6f=readFileSync(_0x17232f,{'encoding':_0x29e2a8(0x1c2)});if(_0x37af6f)_0x32820b=JSON['parse'](_0x37af6f);}}catch{}try{const _0x1c14e9=_0x49a98a||process['cwd']();_0x30e489=resolveConfigPath(_0x1c14e9);if(_0x30e489){const _0xcf26b4=readFileSync(_0x30e489,{'encoding':'utf8'});if(_0xcf26b4)_0x4d43c8=JSON[_0x29e2a8(0x1c8)](_0xcf26b4);}}catch{}return{'globalPath':_0x17232f,'projectPath':_0x30e489,'globalConfig':_0x32820b,'projectConfig':_0x4d43c8};}function mergeRawConfigLayers(_0x50c884){const _0x465468=a75_0x4fad0d,{globalConfig:_0x985dab,projectConfig:_0x18b6f9}=_0x50c884;if(_0x18b6f9[_0x465468(0x1d6)]===![]){const _0x16df71={..._0x18b6f9};return delete _0x16df71[_0x465468(0x1d6)],_0x16df71;}const _0x772a2c={..._0x985dab,..._0x18b6f9};if('defaultApp'in _0x18b6f9)_0x772a2c['defaultApp']=_0x18b6f9['defaultApp'];else _0x985dab[_0x465468(0x1c7)]&&(_0x772a2c[_0x465468(0x1c7)]=_0x985dab[_0x465468(0x1c7)]);return _0x772a2c;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x2b963d){return mergeRawConfigLayers(loadRawConfigLayers(_0x2b963d));}export function readRawConfigWithLayers(_0x4e857a){const _0x41c7ea=loadRawConfigLayers(_0x4e857a);return{'config':mergeRawConfigLayers(_0x41c7ea),'layers':_0x41c7ea};}export function resolveDefaultAppSource(_0x5b373b){const _0x377e50=a75_0x4fad0d;if(_0x377e50(0x1c7)in _0x5b373b['projectConfig'])return'project';if(_0x5b373b[_0x377e50(0x1c0)]['inherit']===![])return null;if(_0x5b373b[_0x377e50(0x1aa)][_0x377e50(0x1c7)])return'global';return null;}function buildConfig(_0x2b500e,_0x1baeee){const _0x3e76b6=a75_0x4fad0d,_0x122bd2=_0x2b500e['defaultApp']||undefined,_0x1cdd8e=_0x1baeee[_0x3e76b6(0x1d2)]||env(_0x3e76b6(0x1ea))||undefined,_0x453627=_0x1cdd8e||_0x122bd2||undefined,_0x2e44d1=env(_0x3e76b6(0x1bc))||_0x2b500e[_0x3e76b6(0x1ca)]||undefined,_0x5141d4=_0x1baeee[_0x3e76b6(0x1c3)]||env('ENV')||_0x2b500e[_0x3e76b6(0x1c3)]||DEFAULT_CONFIG_VALUES['env'],_0x2083c7=normalizeEnv(String(_0x5141d4)),_0xbaf4e7=isDaily(_0x2083c7)?'daily':isDev(_0x2083c7)?_0x3e76b6(0x1c5):'production',_0x123487=typeof _0x1baeee['appcode']===_0x3e76b6(0x1e2)?_0x1baeee['appcode']:undefined,_0x4707bb=env(_0x3e76b6(0x1a9)),_0xd540fd=_0x1cdd8e?undefined:_0x2b500e[_0x3e76b6(0x1cb)]||_0x2b500e[_0x3e76b6(0x1d2)]||undefined,_0x3eeb39=_0x1cdd8e||(_0xd540fd?undefined:_0x122bd2),_0xf914dd=resolveLocalAppAliasCode(_0x2b500e,_0x3eeb39),_0x3aab82=resolveCachedAppCode(_0x3eeb39,_0xbaf4e7,_0x2e44d1),_0x122056=_0x123487||_0x4707bb||_0xd540fd||_0xf914dd||_0x3aab82||undefined,_0x21c53e=_0x123487?'explicit':_0x4707bb?_0x3e76b6(0x1c3):_0xd540fd?_0x3e76b6(0x1b4):_0xf914dd?_0x3e76b6(0x1db):_0x3aab82?'cache':undefined,_0x5b2e1a=_0x2b500e[_0x3e76b6(0x1e3)]||DEFAULT_CONFIG_VALUES[_0x3e76b6(0x1e3)],_0xd8bfa6=undefined,_0x2d729e=_0x1baeee[_0x3e76b6(0x1f0)]||env(_0x3e76b6(0x1e4))||_0x2b500e[_0x3e76b6(0x1f0)],_0x2b105c=normalizeLegacyOutputFormat(_0x2d729e),_0xbe075a=env(_0x3e76b6(0x1ed))||_0x2b500e['pageSize'],_0x431252=_0xbe075a?Number(_0xbe075a)||undefined:undefined,_0x142ff8=_0x2b500e[_0x3e76b6(0x1af)]||_0x2b500e[_0x3e76b6(0x1ae)],_0x5a5b4e=_0x142ff8==='read'||_0x142ff8===_0x3e76b6(0x1ac)||_0x142ff8==='high-risk-write'?_0x142ff8:DEFAULT_CONFIG_VALUES[_0x3e76b6(0x1af)],_0x1d568e=env(_0x3e76b6(0x1bb)),_0x1b4d37=_0x1d568e==='1'||_0x1d568e===_0x3e76b6(0x1b8);return{'appCode':typeof _0x122056===_0x3e76b6(0x1e2)&&_0x122056['trim']()?_0x122056['trim']():undefined,'appCodeSource':_0x21c53e,'env':_0xbaf4e7,'locale':_0x5b2e1a,'cookie':_0xd8bfa6,'accessKey':_0x2e44d1,'format':_0x2b105c,'pageSize':_0x431252,'riskLevel':_0x5a5b4e,'verbose':_0x1b4d37,'defaultApp':_0x122bd2,'currentApp':typeof _0x453627==='string'?_0x453627:undefined,'raw':_0x2b500e};}function env(_0x116c3c){return productEnv(_0x116c3c);}async function buildAuth(_0x29854e){const _0x45c21a=a75_0x4fad0d,_0x37d4cd='',_0x1faede=!!_0x29854e[_0x45c21a(0x1ca)];return{'cookie':_0x37d4cd,'isLoggedIn':_0x1faede,async 'getOrLogin'(){const _0x2db681=_0x45c21a;if(_0x1faede)return _0x37d4cd;throw CliErrors[_0x2db681(0x1a8)]();}};}
|
|
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']();}};}
|
package/lib/core/api-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x213d3d,_0x58cb22){const _0x194c33=a76_0x3f21,_0x58d4ca=_0x213d3d();while(!![]){try{const _0x11d12f=parseInt(_0x194c33(0x205))/0x1+parseInt(_0x194c33(0x250))/0x2+parseInt(_0x194c33(0x1e3))/0x3*(-parseInt(_0x194c33(0x204))/0x4)+parseInt(_0x194c33(0x218))/0x5+-parseInt(_0x194c33(0x23c))/0x6+parseInt(_0x194c33(0x22a))/0x7+-parseInt(_0x194c33(0x1ef))/0x8;if(_0x11d12f===_0x58cb22)break;else _0x58d4ca['push'](_0x58d4ca['shift']());}catch(_0x4eeca1){_0x58d4ca['push'](_0x58d4ca['shift']());}}}(a76_0x29d9,0x60ee4));import{readFile}from'node:fs/promises';import{basename}from'node:path';import{getApiDomain,getRuntimeDomain,getSkillHubDomain}from'../constant/domain.js';import{PRODUCT_CONFIG}from'../constant/product.js';import{CliErrors}from'../errors.js';import{createRateLimitError,readRetryAfter,readRetryAfterSeconds}from'../framework/rate-limit.js';import{extractList}from'../framework/response.js';import{parseLosslessJson}from'../utils/lossless-json.js';let _activeAK;export function setActiveAK(_0x11ccce){_activeAK=_0x11ccce||undefined;}export function clearActiveAK(){_activeAK=undefined;}function firstString(..._0x1e360c){const _0x5112da=a76_0x3f21;for(const _0x2022e9 of _0x1e360c){if(typeof _0x2022e9===_0x5112da(0x23b)&&_0x2022e9[_0x5112da(0x1f9)]())return _0x2022e9[_0x5112da(0x1f9)]();}return undefined;}async function decodeResponseBody(_0x8abfb0){const _0x7c0b0b=a76_0x3f21;if(typeof _0x8abfb0[_0x7c0b0b(0x215)]===_0x7c0b0b(0x1fa))try{const _0x5c26db=await _0x8abfb0[_0x7c0b0b(0x215)]();try{return{'isJson':!![],'data':parseLosslessJson(_0x5c26db),'text':_0x5c26db};}catch{return{'isJson':![],'text':_0x5c26db[_0x7c0b0b(0x1f9)]()||undefined};}}catch{}try{return{'isJson':!![],'data':await _0x8abfb0[_0x7c0b0b(0x211)]()};}catch{return{'isJson':![]};}}function throwIfRateLimited(_0x5e82a1,_0x4e87cf,_0x27983e){const _0x41713e=a76_0x3f21,_0x5a30c1=_0x4e87cf&&typeof _0x4e87cf==='object'?_0x4e87cf:{},_0xab5a52=[_0x5a30c1['status'],_0x5a30c1[_0x41713e(0x1f4)]]['find'](_0x1d7c0f=>Number(_0x1d7c0f)===0x1ad),_0x113414=createRateLimitError({'status':_0x5e82a1[_0x41713e(0x21d)]===0x1ad?_0x5e82a1[_0x41713e(0x21d)]:_0xab5a52??_0x5e82a1[_0x41713e(0x21d)],'errorCode':firstString(_0x5a30c1[_0x41713e(0x1e0)],typeof _0x5a30c1[_0x41713e(0x1f4)]===_0x41713e(0x23b)?_0x5a30c1[_0x41713e(0x1f4)]:undefined),'message':firstString(_0x5a30c1['errorMsg'],_0x5a30c1['message'],_0x5a30c1[_0x41713e(0x1f2)],_0x27983e),'retryAfter':readRetryAfter(_0x5e82a1['headers'])??readRetryAfterSeconds(_0x4e87cf)});if(_0x113414)throw _0x113414;}async function apiRequest(_0x1b1725,_0xa9ee69={}){const _0x21a48f=a76_0x3f21,{method:method=_0x21a48f(0x243),body:_0x54006e,headers:headers={},timeout:timeout=0x7530}=_0xa9ee69,_0x3046f0=_activeAK,_0x34eac6=getRuntimeDomain();if(!_0x3046f0)throw CliErrors[_0x21a48f(0x1f8)](_0x21a48f(0x24e)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x1834e2=''+_0x34eac6+_0x1b1725,_0x20129a={'X-User-AK':_0x3046f0},_0x4dfd88=new AbortController(),_0x5e9884=setTimeout(()=>_0x4dfd88[_0x21a48f(0x23a)](),timeout);try{const _0x16f2a9=await fetch(_0x1834e2,{'method':method,'headers':{'Content-Type':_0x21a48f(0x22c),'X-Invoke-Source':PRODUCT_CONFIG[_0x21a48f(0x256)],..._0x20129a,...headers},'body':_0x54006e?JSON[_0x21a48f(0x1e7)](_0x54006e):undefined,'signal':_0x4dfd88[_0x21a48f(0x1eb)]}),_0x4d242b=await decodeResponseBody(_0x16f2a9);if(!_0x4d242b[_0x21a48f(0x271)]){throwIfRateLimited(_0x16f2a9,undefined,_0x4d242b[_0x21a48f(0x215)]);throw CliErrors['apiError'](_0x21a48f(0x1ed)+_0x16f2a9[_0x21a48f(0x21d)]+')',_0x16f2a9[_0x21a48f(0x21d)]>=0x190?'Check\x20your\x20credentials\x20and\x20try\x20again.':undefined);}const _0x40888c=_0x4d242b[_0x21a48f(0x22b)];throwIfRateLimited(_0x16f2a9,_0x40888c);if(!_0x16f2a9['ok']||_0x40888c[_0x21a48f(0x247)]===![])throw CliErrors[_0x21a48f(0x261)](_0x40888c[_0x21a48f(0x229)]||_0x40888c[_0x21a48f(0x216)]||'API\x20error:\x20'+_0x16f2a9['status'],_0x40888c[_0x21a48f(0x1e0)]?_0x21a48f(0x201)+_0x40888c['errorCode']:undefined);return _0x40888c;}catch(_0x2ba60d){if(_0x2ba60d instanceof Error&&_0x2ba60d[_0x21a48f(0x20c)]===_0x21a48f(0x266))throw CliErrors[_0x21a48f(0x261)]('Request\x20timeout:\x20'+_0x1834e2);throw _0x2ba60d;}finally{clearTimeout(_0x5e9884);}}async function apiBinaryRequest(_0x124613,_0x29c78a={}){const _0x2e03b8=a76_0x3f21,{method:method='GET',headers:headers={},timeout:timeout=0x7530}=_0x29c78a,_0x5e5c0c=_activeAK,_0x694f11=getRuntimeDomain();if(!_0x5e5c0c)throw CliErrors[_0x2e03b8(0x1f8)](_0x2e03b8(0x24e)+PRODUCT_CONFIG[_0x2e03b8(0x254)]+'.');const _0x59ef91=''+_0x694f11+_0x124613,_0x21aac1=new AbortController(),_0x2c8889=setTimeout(()=>_0x21aac1[_0x2e03b8(0x23a)](),timeout);try{const _0x179834=await fetch(_0x59ef91,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x2e03b8(0x256)],'X-User-AK':_0x5e5c0c,...headers},'signal':_0x21aac1['signal']});if(!_0x179834['ok']){const _0x5b67f5=await decodeResponseBody(_0x179834),_0x4a7924=_0x5b67f5[_0x2e03b8(0x22b)]&&typeof _0x5b67f5[_0x2e03b8(0x22b)]===_0x2e03b8(0x1db)?_0x5b67f5['data']:{},_0x31b554=firstString(_0x4a7924[_0x2e03b8(0x229)],_0x4a7924['message'],_0x4a7924[_0x2e03b8(0x1e0)],_0x5b67f5[_0x2e03b8(0x215)]);throwIfRateLimited(_0x179834,_0x5b67f5['data'],_0x31b554);throw CliErrors[_0x2e03b8(0x261)](_0x31b554||_0x2e03b8(0x26f)+_0x179834[_0x2e03b8(0x21d)],_0x2e03b8(0x23d)+_0x59ef91);}return Buffer[_0x2e03b8(0x230)](await _0x179834['arrayBuffer']());}catch(_0x25aab5){if(_0x25aab5 instanceof Error&&_0x25aab5[_0x2e03b8(0x20c)]===_0x2e03b8(0x266))throw CliErrors[_0x2e03b8(0x261)](_0x2e03b8(0x23f)+_0x59ef91);throw _0x25aab5;}finally{clearTimeout(_0x2c8889);}}async function apiFormRequest(_0x32b664,_0x305e61,_0x20c9e9={}){const _0x141f7c=a76_0x3f21,{timeout:timeout=0x7530}=_0x20c9e9,_0x9b5ab4=_activeAK,_0x5e0a2b=getRuntimeDomain();if(!_0x9b5ab4)throw CliErrors[_0x141f7c(0x1f8)](_0x141f7c(0x24e)+PRODUCT_CONFIG[_0x141f7c(0x254)]+'.');const _0x100d05=''+_0x5e0a2b+_0x32b664,_0x3f633e=new AbortController(),_0x273fc1=setTimeout(()=>_0x3f633e[_0x141f7c(0x23a)](),timeout);try{const _0x1f6178=await fetch(_0x100d05,{'method':_0x141f7c(0x226),'headers':{'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x9b5ab4},'body':_0x305e61,'signal':_0x3f633e[_0x141f7c(0x1eb)]}),_0x3d594a=await decodeResponseBody(_0x1f6178);if(!_0x3d594a[_0x141f7c(0x271)]){throwIfRateLimited(_0x1f6178,undefined,_0x3d594a[_0x141f7c(0x215)]);throw CliErrors[_0x141f7c(0x261)](_0x141f7c(0x1ed)+_0x1f6178[_0x141f7c(0x21d)]+')',_0x1f6178[_0x141f7c(0x21d)]>=0x190?_0x141f7c(0x23e):undefined);}const _0x2becea=_0x3d594a[_0x141f7c(0x22b)];throwIfRateLimited(_0x1f6178,_0x2becea);if(!_0x1f6178['ok']||_0x2becea[_0x141f7c(0x247)]===![])throw CliErrors['apiError'](_0x2becea[_0x141f7c(0x229)]||_0x2becea['message']||_0x141f7c(0x26f)+_0x1f6178[_0x141f7c(0x21d)],_0x2becea['errorCode']?'API\x20error\x20code:\x20'+_0x2becea[_0x141f7c(0x1e0)]:undefined);return _0x2becea;}catch(_0x56f128){if(_0x56f128 instanceof Error&&_0x56f128[_0x141f7c(0x20c)]===_0x141f7c(0x266))throw CliErrors[_0x141f7c(0x261)](_0x141f7c(0x23f)+_0x100d05);throw _0x56f128;}finally{clearTimeout(_0x273fc1);}}async function toolboxRequest(_0x79f9e2,_0x30bd81,_0x1e57ab={}){const _0x50288f=a76_0x3f21,{method:method=_0x50288f(0x243),headers:headers={},timeout:timeout=0x7530}=_0x1e57ab,_0xba9d8b=_activeAK;if(!_0xba9d8b)throw CliErrors['authRequired'](_0x50288f(0x24e)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x591aeb=getApiDomain()[_0x50288f(0x26d)](/\/$/,''),_0x22d253=new URL(_0x79f9e2,_0x591aeb+_0x50288f(0x21f));if(_0x30bd81)for(const [_0x306318,_0xe64e8]of Object[_0x50288f(0x1fb)](_0x30bd81)){_0xe64e8!==undefined&&_0xe64e8!==null&&_0x22d253[_0x50288f(0x222)][_0x50288f(0x20b)](_0x306318,String(_0xe64e8));}const _0x5d56f3=new AbortController(),_0x51b704=setTimeout(()=>_0x5d56f3[_0x50288f(0x23a)](),timeout);try{const _0x27a244=await fetch(_0x22d253,{'method':method,'headers':{'Content-Type':_0x50288f(0x22c),'X-Invoke-Source':PRODUCT_CONFIG[_0x50288f(0x256)],'X-User-AK':_0xba9d8b,...headers},'signal':_0x5d56f3[_0x50288f(0x1eb)]}),_0x2d196a=await decodeResponseBody(_0x27a244);if(!_0x2d196a[_0x50288f(0x271)]){throwIfRateLimited(_0x27a244,undefined,_0x2d196a['text']);throw CliErrors['apiError'](_0x50288f(0x240)+_0x27a244[_0x50288f(0x21d)]+')',_0x27a244[_0x50288f(0x21d)]>=0x190?'Check\x20your\x20credentials\x20and\x20try\x20again.':undefined);}const _0x170f8f=_0x2d196a['data'];throwIfRateLimited(_0x27a244,_0x170f8f);if(!_0x27a244['ok']){const _0x189dc4=_0x170f8f&&typeof _0x170f8f===_0x50288f(0x1db)?_0x170f8f:{};throw CliErrors[_0x50288f(0x261)](_0x189dc4[_0x50288f(0x229)]||_0x189dc4[_0x50288f(0x216)]||_0x50288f(0x1dd)+_0x27a244[_0x50288f(0x21d)],_0x189dc4[_0x50288f(0x1e0)]?_0x50288f(0x1e4)+_0x189dc4[_0x50288f(0x1e0)]:undefined);}if(_0x170f8f&&typeof _0x170f8f===_0x50288f(0x1db)&&_0x50288f(0x247)in _0x170f8f&&typeof _0x170f8f[_0x50288f(0x247)]===_0x50288f(0x274)){const _0x13b70e=_0x170f8f;if(!_0x13b70e['success'])throw CliErrors[_0x50288f(0x261)](_0x13b70e[_0x50288f(0x229)]||_0x13b70e['message']||_0x50288f(0x1fe),_0x13b70e[_0x50288f(0x1e0)]?'Toolbox\x20error\x20code:\x20'+_0x13b70e[_0x50288f(0x1e0)]:undefined);return _0x13b70e[_0x50288f(0x22b)];}return _0x170f8f;}catch(_0x50066e){if(_0x50066e instanceof Error&&_0x50066e[_0x50288f(0x20c)]==='AbortError')throw CliErrors['apiError'](_0x50288f(0x23f)+_0x22d253[_0x50288f(0x22e)]());throw _0x50066e;}finally{clearTimeout(_0x51b704);}}async function skillHubJsonRequest(_0x3520ea,_0x348b62={}){const _0x1c9fb3=a76_0x3f21,{method:method=_0x1c9fb3(0x243),query:_0x244e61,body:_0x3d5cc7,headers:headers={},timeout:timeout=0x7530,allowNotFound:allowNotFound=![]}=_0x348b62,_0x17ecd0=_activeAK;if(!_0x17ecd0)throw CliErrors['authRequired'](_0x1c9fb3(0x24e)+PRODUCT_CONFIG[_0x1c9fb3(0x254)]+'.');const _0x841b69=getSkillHubDomain()['replace'](/\/$/,''),_0x291457=new URL(_0x3520ea,_0x841b69+'/');if(_0x244e61)for(const [_0x292395,_0x3a3552]of Object[_0x1c9fb3(0x1fb)](_0x244e61)){_0x3a3552!==undefined&&_0x3a3552!==null&&_0x291457['searchParams'][_0x1c9fb3(0x20b)](_0x292395,String(_0x3a3552));}const _0x21a33f=new AbortController(),_0xda7866=setTimeout(()=>_0x21a33f['abort'](),timeout);try{const _0x45c90b=await fetch(_0x291457[_0x1c9fb3(0x22e)](),{'method':method,'headers':{'Accept':'application/json','X-Invoke-Source':PRODUCT_CONFIG[_0x1c9fb3(0x256)],'X-User-AK':_0x17ecd0,...headers},'body':_0x3d5cc7,'signal':_0x21a33f[_0x1c9fb3(0x1eb)]}),_0x2b3063=await decodeResponseBody(_0x45c90b);if(!_0x2b3063[_0x1c9fb3(0x271)]){if(allowNotFound&&_0x45c90b[_0x1c9fb3(0x21d)]===0x194)return undefined;throwIfRateLimited(_0x45c90b,undefined,_0x2b3063[_0x1c9fb3(0x215)]);throw CliErrors[_0x1c9fb3(0x261)](_0x1c9fb3(0x1e5)+_0x45c90b[_0x1c9fb3(0x21d)]+')',_0x45c90b[_0x1c9fb3(0x21d)]>=0x190?_0x1c9fb3(0x23e):undefined);}const _0x33ed7d=_0x2b3063[_0x1c9fb3(0x22b)];throwIfRateLimited(_0x45c90b,_0x33ed7d);if(allowNotFound&&isSkillHubNotFoundResponse(_0x45c90b[_0x1c9fb3(0x21d)],_0x33ed7d))return undefined;const _0xd0ae58=!_0x45c90b['ok']||_0x33ed7d?.[_0x1c9fb3(0x247)]===![]||typeof _0x33ed7d?.['code']===_0x1c9fb3(0x26b)&&_0x33ed7d[_0x1c9fb3(0x1f4)]>=0x190;if(_0xd0ae58)throw CliErrors[_0x1c9fb3(0x261)](_0x33ed7d?.[_0x1c9fb3(0x229)]||_0x33ed7d?.['message']||_0x33ed7d?.['msg']||_0x1c9fb3(0x253)+_0x45c90b[_0x1c9fb3(0x21d)],_0x33ed7d?.[_0x1c9fb3(0x1e0)]?_0x1c9fb3(0x1f6)+_0x33ed7d[_0x1c9fb3(0x1e0)]:undefined);return _0x33ed7d?.['data']??_0x33ed7d;}catch(_0x3d5564){if(_0x3d5564 instanceof Error&&_0x3d5564[_0x1c9fb3(0x20c)]===_0x1c9fb3(0x266))throw CliErrors[_0x1c9fb3(0x261)](_0x1c9fb3(0x23f)+_0x291457[_0x1c9fb3(0x22e)]());throw _0x3d5564;}finally{clearTimeout(_0xda7866);}}function isSkillHubNotFoundResponse(_0x5538d8,_0x21b5c7){const _0x349ca2=a76_0x3f21;if(_0x5538d8===0x194||_0x21b5c7?.[_0x349ca2(0x1f4)]===0x194)return!![];if(_0x5538d8!==0x190&&_0x21b5c7?.[_0x349ca2(0x1f4)]!==0x190)return![];const _0x3cdc57=[_0x21b5c7?.['msg'],_0x21b5c7?.['message'],_0x21b5c7?.[_0x349ca2(0x229)],_0x21b5c7?.['error']]['filter'](_0x37f4e=>typeof _0x37f4e===_0x349ca2(0x23b))[_0x349ca2(0x224)]('\x20');return/skill not found\b/i['test'](_0x3cdc57);}async function skillHubBinaryRequest(_0x354b52,_0x4110c2={}){const _0x6573a4=a76_0x3f21,{query:_0x7c5799,headers:headers={},timeout:timeout=0x7530}=_0x4110c2,_0x7e543f=_activeAK;if(!_0x7e543f)throw CliErrors['authRequired']('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x6573a4(0x254)]+'.');const _0x32048e=getSkillHubDomain()[_0x6573a4(0x26d)](/\/$/,''),_0x981864=new URL(_0x354b52,_0x32048e+'/');if(_0x7c5799)for(const [_0x29cbc0,_0x53f86b]of Object[_0x6573a4(0x1fb)](_0x7c5799)){_0x53f86b!==undefined&&_0x53f86b!==null&&_0x981864[_0x6573a4(0x222)][_0x6573a4(0x20b)](_0x29cbc0,String(_0x53f86b));}const _0x176bea=new AbortController(),_0x410ec0=setTimeout(()=>_0x176bea['abort'](),timeout);try{const _0x185ba5=await fetch(_0x981864[_0x6573a4(0x22e)](),{'method':_0x6573a4(0x243),'headers':{'Accept':_0x6573a4(0x244),'X-Invoke-Source':PRODUCT_CONFIG[_0x6573a4(0x256)],'X-User-AK':_0x7e543f,...headers},'signal':_0x176bea['signal']});if(!_0x185ba5['ok']){const _0xfe8594=await decodeResponseBody(_0x185ba5),_0x4a15b6=_0xfe8594[_0x6573a4(0x22b)]&&typeof _0xfe8594[_0x6573a4(0x22b)]===_0x6573a4(0x1db)?_0xfe8594[_0x6573a4(0x22b)]:{},_0x1c9237=firstString(_0x4a15b6[_0x6573a4(0x229)],_0x4a15b6['message'],_0x4a15b6[_0x6573a4(0x1f2)],_0x4a15b6[_0x6573a4(0x1e0)],_0xfe8594[_0x6573a4(0x215)]);throwIfRateLimited(_0x185ba5,_0xfe8594[_0x6573a4(0x22b)],_0x1c9237);throw CliErrors['apiError'](_0x1c9237||'SkillHub\x20API\x20error:\x20'+_0x185ba5[_0x6573a4(0x21d)],_0x6573a4(0x23d)+_0x981864['toString']());}return Buffer['from'](await _0x185ba5[_0x6573a4(0x25a)]());}catch(_0x3e7764){if(_0x3e7764 instanceof Error&&_0x3e7764[_0x6573a4(0x20c)]===_0x6573a4(0x266))throw CliErrors[_0x6573a4(0x261)](_0x6573a4(0x23f)+_0x981864[_0x6573a4(0x22e)]());throw _0x3e7764;}finally{clearTimeout(_0x410ec0);}}export async function getBffEndpointContract(_0x50a1a9,_0x25155c){const _0x12855c=a76_0x3f21;if(_0x25155c===_0x12855c(0x20a))throw CliErrors[_0x12855c(0x257)](_0x12855c(0x20f)+_0x50a1a9+_0x12855c(0x232)+_0x25155c);const _0x488dbc=await apiRequest(_0x12855c(0x207)+encodeURIComponent(_0x50a1a9)+'/'+encodeURIComponent(_0x25155c)),_0x43f5dc=_0x488dbc['data'];if(!_0x43f5dc||typeof _0x43f5dc!==_0x12855c(0x1db)||Array[_0x12855c(0x252)](_0x43f5dc)||_0x43f5dc['appCode']!==_0x50a1a9||_0x43f5dc[_0x12855c(0x25c)]!==_0x25155c)throw CliErrors[_0x12855c(0x257)](_0x12855c(0x20f)+_0x50a1a9+_0x12855c(0x232)+_0x25155c);return{'appCode':_0x43f5dc[_0x12855c(0x265)],'functionName':_0x43f5dc['functionName'],'description':_0x43f5dc[_0x12855c(0x235)],'version':_0x43f5dc[_0x12855c(0x267)],'gmtModified':_0x43f5dc[_0x12855c(0x1fd)]};}export async function getSqlQueryInfo(_0x362cb0,_0x2a6d6){const _0x3099a2=a76_0x3f21,_0x4a5d6f=await apiRequest(_0x3099a2(0x1e6),{'method':_0x3099a2(0x226),'body':{'appCode':_0x362cb0,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x2a6d6}}),_0x1ece5c=_0x4a5d6f[_0x3099a2(0x22b)],_0x3f9443=_0x1ece5c&&typeof _0x1ece5c===_0x3099a2(0x1db)&&'tableData'in _0x1ece5c?_0x1ece5c[_0x3099a2(0x203)]?.[0x0]:_0x1ece5c&&typeof _0x1ece5c===_0x3099a2(0x1db)&&'sqlCode'in _0x1ece5c?_0x1ece5c:undefined;if(!_0x3f9443)throw CliErrors['validation']('SQL\x20query\x20not\x20found:\x20'+_0x2a6d6);return _0x3f9443;}function isRemoteAppItem(_0x105006){const _0x133993=a76_0x3f21;return!!_0x105006&&typeof _0x105006===_0x133993(0x1db)&&typeof _0x105006[_0x133993(0x265)]===_0x133993(0x23b)&&typeof _0x105006['appName']==='string';}function extractRemoteAppItems(_0x39f8d5){const _0x570bbc=a76_0x3f21;if(Array[_0x570bbc(0x252)](_0x39f8d5))return _0x39f8d5[_0x570bbc(0x1ff)](isRemoteAppItem);if(!_0x39f8d5||typeof _0x39f8d5!==_0x570bbc(0x1db))throw CliErrors[_0x570bbc(0x261)](_0x570bbc(0x259));const _0xc3cfd6=_0x39f8d5;if(Array[_0x570bbc(0x252)](_0xc3cfd6[_0x570bbc(0x203)]))return _0xc3cfd6[_0x570bbc(0x203)][_0x570bbc(0x1ff)](isRemoteAppItem);if(_0xc3cfd6['data']&&typeof _0xc3cfd6[_0x570bbc(0x22b)]===_0x570bbc(0x1db)){const _0x350760=_0xc3cfd6[_0x570bbc(0x22b)];if(Array[_0x570bbc(0x252)](_0x350760['tableData']))return _0x350760[_0x570bbc(0x203)][_0x570bbc(0x1ff)](isRemoteAppItem);}throw CliErrors['apiError'](_0x570bbc(0x21b));}export async function getMyApps(){const _0x5ce0cf=await apiRequest('/client/app/my-apps');return extractRemoteAppItems(_0x5ce0cf['data']);}export async function getLoginUserInfo(){const _0x4d207f=a76_0x3f21,_0x2aba78=await apiRequest(_0x4d207f(0x26c));if(!_0x2aba78[_0x4d207f(0x22b)]||typeof _0x2aba78[_0x4d207f(0x22b)]!==_0x4d207f(0x1db)||Array[_0x4d207f(0x252)](_0x2aba78[_0x4d207f(0x22b)]))throw CliErrors[_0x4d207f(0x261)](_0x4d207f(0x1fc));return _0x2aba78['data'];}function runtimeSchedulePath(_0x53ed3b,_0x57d06a=''){const _0x2fc634=a76_0x3f21;return _0x2fc634(0x1ec)+encodeURIComponent(_0x53ed3b)+_0x2fc634(0x25d)+_0x57d06a;}export async function validateRuntimeSchedule(_0x3a6b20,_0x4184ec){const _0x3fbbd2=await apiRequest(runtimeSchedulePath(_0x3a6b20,'/validate'),{'method':'POST','body':_0x4184ec});return _0x3fbbd2['data'];}export async function createRuntimeSchedule(_0x3f9c9c,_0x150e84){const _0x5bfaae=a76_0x3f21,_0x3a4770=await apiRequest(runtimeSchedulePath(_0x3f9c9c),{'method':_0x5bfaae(0x226),'body':_0x150e84});return _0x3a4770[_0x5bfaae(0x22b)];}export async function listRuntimeSchedules(_0x2c5494,_0x275365={}){const _0x1271f9=a76_0x3f21,_0x5a85c0=new URLSearchParams();if(_0x275365[_0x1271f9(0x20d)]!==undefined)_0x5a85c0['set'](_0x1271f9(0x20d),String(_0x275365[_0x1271f9(0x20d)]));if(_0x275365[_0x1271f9(0x208)])_0x5a85c0[_0x1271f9(0x20b)](_0x1271f9(0x208),_0x275365[_0x1271f9(0x208)]);const _0x380873=_0x5a85c0[_0x1271f9(0x217)]>0x0?'?'+_0x5a85c0[_0x1271f9(0x22e)]():'',_0x459db2=await apiRequest(''+runtimeSchedulePath(_0x2c5494)+_0x380873);return _0x459db2[_0x1271f9(0x22b)];}export async function getRuntimeSchedule(_0x474b07,_0x1b0633){const _0x36bcc3=a76_0x3f21,_0x46f175=await apiRequest(runtimeSchedulePath(_0x474b07,'/'+encodeURIComponent(_0x1b0633)));return _0x46f175[_0x36bcc3(0x22b)];}export async function deleteRuntimeSchedule(_0x2f3747,_0x12d1e2){const _0x3f8038=a76_0x3f21,_0x2e40fd=await apiRequest(runtimeSchedulePath(_0x2f3747,'/'+encodeURIComponent(_0x12d1e2)),{'method':_0x3f8038(0x239)});return _0x2e40fd[_0x3f8038(0x22b)];}export async function runRuntimeSchedule(_0x10756e,_0x11a2fd){const _0x1b3345=a76_0x3f21,_0x362245=await apiRequest(runtimeSchedulePath(_0x10756e,'/'+encodeURIComponent(_0x11a2fd)+_0x1b3345(0x206)),{'method':_0x1b3345(0x226)});return _0x362245[_0x1b3345(0x22b)];}export async function listDatasets(_0x2a7aa2,_0x1dbb8e){const _0x107827=a76_0x3f21,_0x3b2ba1=await apiRequest(_0x107827(0x233),{'method':_0x107827(0x226),'body':{'appCode':_0x2a7aa2,..._0x1dbb8e?.['code']&&{'code':_0x1dbb8e[_0x107827(0x1f4)]},..._0x1dbb8e?.['name']&&{'name':_0x1dbb8e['name']}}});return extractList(_0x3b2ba1[_0x107827(0x22b)]);}function a76_0x3f21(_0xeadf6f,_0x2db356){_0xeadf6f=_0xeadf6f-0x1db;const _0x29d9df=a76_0x29d9();let _0x3f210b=_0x29d9df[_0xeadf6f];return _0x3f210b;}export async function getDatasetDetail(_0x420505){const _0x884b3c=a76_0x3f21,_0x48aa14=await apiRequest(_0x884b3c(0x228)+encodeURIComponent(_0x420505));return _0x48aa14[_0x884b3c(0x22b)];}export async function getDatasetSdkUsageDoc(_0x503927,_0x12fc99){const _0x7c033e=a76_0x3f21,_0x4bf2f7=await toolboxRequest(_0x7c033e(0x22f),{'datasetCode':_0x503927,'appCode':_0x12fc99});return typeof _0x4bf2f7?.[_0x7c033e(0x234)]===_0x7c033e(0x23b)?_0x4bf2f7[_0x7c033e(0x234)]:'';}export async function uploadRuntimeFile(_0x5c5d03,_0x9cf07b){const _0x323245=a76_0x3f21,_0x129a2c=await readFile(_0x9cf07b),_0x51ef5d=new FormData();_0x51ef5d[_0x323245(0x25b)]('appCode',_0x5c5d03),_0x51ef5d['append'](_0x323245(0x24a),new Blob([new Uint8Array(_0x129a2c)]),basename(_0x9cf07b));const _0x210880=await apiFormRequest(_0x323245(0x1e2),_0x51ef5d);return _0x210880[_0x323245(0x22b)];}export async function queryRuntimeFileUrl(_0x3e5b66,_0x41c6eb={}){const _0xf30714=a76_0x3f21,_0x2d7f7d=await apiRequest(_0xf30714(0x24b),{'method':_0xf30714(0x226),'body':{'filePath':_0x3e5b66,'downloadFlag':_0x41c6eb['download']??![],..._0x41c6eb[_0xf30714(0x263)]?{'longTerm':!![]}:{}}});return _0x2d7f7d[_0xf30714(0x22b)];}export async function recognizeRuntimeOcr(_0x59392b,_0x442f89){const _0x44fb9d=a76_0x3f21,_0x3c5579=await apiRequest(_0x44fb9d(0x1ea),{'method':_0x44fb9d(0x226),'body':{'appCode':_0x59392b,'url':_0x442f89[_0x44fb9d(0x231)],'type':_0x442f89[_0x44fb9d(0x1e9)]}});return _0x3c5579['data'];}export async function getRuntimeAppConfigByKey(_0x504556,_0x19c5cf){const _0x2d258b=a76_0x3f21,_0x34d2e1=new URLSearchParams({'appCode':_0x504556,'key':_0x19c5cf}),_0x402de7=await apiRequest(_0x2d258b(0x210)+_0x34d2e1[_0x2d258b(0x22e)]());if(typeof _0x402de7[_0x2d258b(0x22b)]!=='string')throw CliErrors['validation']('Invalid\x20app\x20config\x20value:\x20key='+_0x19c5cf);return _0x402de7['data'];}export async function listRuntimeArtifacts(_0x45d9a3,_0x5a36f6){const _0x141899=a76_0x3f21,_0x5eab61=new URLSearchParams({'appCode':_0x45d9a3});if(_0x5a36f6?.[_0x141899(0x1f0)])_0x5eab61[_0x141899(0x20b)]('artifactType',_0x5a36f6[_0x141899(0x1f0)]);if(_0x5a36f6?.['source'])_0x5eab61[_0x141899(0x20b)](_0x141899(0x202),_0x5a36f6['source']);if(_0x5a36f6?.[_0x141899(0x21a)]!==undefined)_0x5eab61[_0x141899(0x20b)](_0x141899(0x21a),String(_0x5a36f6['favorite']));const _0x52c550=await apiRequest(_0x141899(0x1f1)+_0x5eab61['toString']());return Array[_0x141899(0x252)](_0x52c550['data'])?_0x52c550[_0x141899(0x22b)]:[];}export async function getRuntimeArtifact(_0x32a7c9,_0x22a0b6){const _0x25fb1b=a76_0x3f21,_0x1b3ccc=await apiRequest(_0x25fb1b(0x214)+_0x32a7c9+_0x25fb1b(0x220)+encodeURIComponent(_0x22a0b6));if(!_0x1b3ccc[_0x25fb1b(0x22b)])throw CliErrors['validation'](_0x25fb1b(0x242)+_0x32a7c9);return _0x1b3ccc[_0x25fb1b(0x22b)];}export async function createRuntimeArtifact(_0x3d8403,_0x3db70e){const _0x195997=a76_0x3f21,_0x33b443=await apiRequest(_0x195997(0x238),{'method':'POST','body':{'appCode':_0x3d8403,..._0x3db70e}});return _0x33b443[_0x195997(0x22b)];}export async function updateRuntimeArtifact(_0x140802,_0x37b1ed,_0x3d737a){const _0x3ad514=a76_0x3f21,_0x7b8523=await apiRequest(_0x3ad514(0x214)+_0x140802+_0x3ad514(0x26a),{'method':_0x3ad514(0x226),'body':{'appCode':_0x37b1ed,..._0x3d737a}});return _0x7b8523['data'];}export async function listPersonalBffs(_0x8bdf1f){const _0x1f8cba=a76_0x3f21,_0x208bdd=await apiRequest(_0x1f8cba(0x268)+encodeURIComponent(_0x8bdf1f));return Array['isArray'](_0x208bdd[_0x1f8cba(0x22b)])?_0x208bdd[_0x1f8cba(0x22b)]:[];}export async function getPersonalBff(_0x20fa64,_0x150361){const _0x2f91de=a76_0x3f21,_0x5ba124=await apiRequest(_0x2f91de(0x251)+_0x20fa64+_0x2f91de(0x220)+encodeURIComponent(_0x150361));if(!_0x5ba124[_0x2f91de(0x22b)])throw CliErrors[_0x2f91de(0x257)](_0x2f91de(0x1e1)+_0x20fa64);return _0x5ba124[_0x2f91de(0x22b)];}export async function createPersonalBff(_0x459c31,_0x4ed09b){const _0x2067f0=a76_0x3f21,_0x12f301=await apiRequest(_0x2067f0(0x24c),{'method':_0x2067f0(0x226),'body':{'appCode':_0x459c31,..._0x4ed09b}});return _0x12f301[_0x2067f0(0x22b)];}export async function updatePersonalBff(_0xe55acc,_0x254c60,_0x175e72){const _0x526e44=a76_0x3f21,_0x5e493c=await apiRequest(_0x526e44(0x251)+_0xe55acc+'/update',{'method':_0x526e44(0x226),'body':{'appCode':_0x254c60,..._0x175e72}});return _0x5e493c['data'];}export async function executePersonalBff(_0x365eec,_0x1f5203,_0xeebe18){const _0x317e2e=a76_0x3f21,_0x2f7a30=await apiRequest(_0x317e2e(0x251)+_0x365eec+_0x317e2e(0x248)+encodeURIComponent(_0x1f5203),{'method':_0x317e2e(0x226),'body':_0xeebe18});return _0x2f7a30[_0x317e2e(0x22b)];}export async function listPersonalKnowledgeBaseItems(_0x3b44c5){const _0x328ccc=a76_0x3f21,_0x2b2935=await apiRequest(_0x328ccc(0x21e)+encodeURIComponent(_0x3b44c5));return Array[_0x328ccc(0x252)](_0x2b2935['data'])?_0x2b2935[_0x328ccc(0x22b)]:[];}export async function getPersonalKnowledgeBaseItem(_0x39bda2,_0x46a06c){const _0x599f5d=a76_0x3f21,_0x1143a3=await apiRequest(_0x599f5d(0x264)+_0x39bda2+_0x599f5d(0x220)+encodeURIComponent(_0x46a06c));if(!_0x1143a3[_0x599f5d(0x22b)])throw CliErrors[_0x599f5d(0x257)](_0x599f5d(0x20e)+_0x39bda2);return _0x1143a3[_0x599f5d(0x22b)];}export async function createPersonalKnowledgeBaseItem(_0x281296,_0x5ceaab){const _0x2648ad=a76_0x3f21,_0x54a039=await apiRequest(_0x2648ad(0x262),{'method':_0x2648ad(0x226),'body':{'appCode':_0x281296,..._0x5ceaab}});return _0x54a039['data'];}export async function updatePersonalKnowledgeBaseItem(_0x133880,_0x39a5c7,_0x31b2b7){const _0x342e30=a76_0x3f21,_0x3d220d=await apiRequest('/client/knowledge-base/personal/'+_0x133880+'/update',{'method':_0x342e30(0x226),'body':{'appCode':_0x39a5c7,..._0x31b2b7}});return _0x3d220d[_0x342e30(0x22b)];}export async function searchKnowledgeBase(_0x49139c,_0x46e89e){const _0x14b0fa=a76_0x3f21,_0x3498d7=await apiRequest(_0x14b0fa(0x1f3),{'method':_0x14b0fa(0x226),'body':{'appCode':_0x49139c,'query':_0x46e89e['query'],..._0x46e89e[_0x14b0fa(0x213)]!==undefined?{'topK':_0x46e89e[_0x14b0fa(0x213)]}:{}}});return Array[_0x14b0fa(0x252)](_0x3498d7[_0x14b0fa(0x22b)])?_0x3498d7[_0x14b0fa(0x22b)]:[];}export async function getRuntimeSkillByCode(_0x140c19,_0x3754c7){const _0x5b0933=await skillHubJsonRequest('/api/v1/skills/'+encodeURIComponent(_0x140c19)+'/'+encodeURIComponent(_0x3754c7),{'allowNotFound':!![]});return _0x5b0933?skillHubRuntimeDetailToRuntimeSkill(_0x5b0933):undefined;}export async function listRuntimeSkills(_0x1013cd){const _0x2d31e9=a76_0x3f21,_0x1518c2=await skillHubJsonRequest(_0x2d31e9(0x1dc)+encodeURIComponent(_0x1013cd[_0x2d31e9(0x265)])+_0x2d31e9(0x21c),{'query':{'page':0x0,'size':0xc8}});return normalizeSkillHubRuntimeListResponse(_0x1013cd[_0x2d31e9(0x265)],_0x1518c2,_0x1013cd[_0x2d31e9(0x223)]??'all',_0x1013cd['code']);}function a76_0x29d9(){const _0x4b1054=['SkillHub\x20returned\x20non-JSON\x20response\x20(HTTP\x20','/client/sql/query','stringify','personal','type','/client/ocr','signal','/api/harness/apps/','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','summary','5240168YaSdof','artifactType','/client/artifact/list?','msg','/client/knowledge-base/search','code','slug','SkillHub\x20error\x20code:\x20','warnings','authRequired','trim','function','entries','Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.','gmtModified','Toolbox\x20API\x20error','filter','confirmWarnings','API\x20error\x20code:\x20','source','tableData','414812kWrJvB','409933SDxqMU','/run','/client/bff/endpoint/','cursor','example','functions','set','name','limit','Knowledge-base\x20entry\x20not\x20found:\x20id=','BFF\x20function\x20not\x20found\x20or\x20inaccessible:\x20appCode=','/client/app-config/getByKey?','json','map','topK','/client/artifact/','text','message','size','1862575IjruZj','skillCode','favorite','Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.','/skills','status','/client/knowledge-base/personal/list?appCode=','/api/node-toolbox/','?appCode=','company','searchParams','scope','join','packageBase64','POST','skillName','/client/dataset/get-driven-data?code=','errorMsg','5115880eRHiCe','data','application/json','/api/cli/v1/skills/','toString','api-doc-generator','from','url',',\x20name=','/client/dataset/list','markdown','description','/publish','visibility','/client/artifact/create','DELETE','abort','string','2918664qOInmN','Download\x20failed:\x20','Check\x20your\x20credentials\x20and\x20try\x20again.','Request\x20timeout:\x20','Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20','application/zip','Artifact\x20not\x20found:\x20id=','GET','application/octet-stream','NAMESPACE_ONLY','effective','success','/execute?appCode=','content','file','/client/queryFileUrl','/client/runtime-bff/personal/create','valid','Configure\x20accessKey\x20in\x20','skill','1087440MDNPWK','/client/runtime-bff/personal/','isArray','SkillHub\x20API\x20error:\x20','newConfigFileName','resolvedSlug','invokeSource','validation','PRIVATE','Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.','arrayBuffer','append','functionName','/schedules','/publish/validate','resolvedVersion','namespace','apiError','/client/knowledge-base/personal/create','longTerm','/client/knowledge-base/personal/','appCode','AbortError','version','/client/runtime-bff/personal/list?appCode=','/versions/','/update','number','/client/user/loginUserInfo','replace','items','API\x20error:\x20','/download','isJson','values','toLowerCase','boolean','object','/api/runtime/v1/namespaces/','Toolbox\x20API\x20error:\x20','displayName','errors','errorCode','Personal\x20BFF\x20not\x20found:\x20id=','/client/uploadFile','15PPUnkk','Toolbox\x20error\x20code:\x20'];a76_0x29d9=function(){return _0x4b1054;};return a76_0x29d9();}export async function listPersonalRuntimeSkills(_0x1abc8c){const _0x222623=a76_0x3f21;return(await listRuntimeSkills({'appCode':_0x1abc8c,'scope':_0x222623(0x1e8)}))[_0x222623(0x1e8)];}export async function listCompanyRuntimeSkills(_0x194c75){const _0x50524d=a76_0x3f21;return(await listRuntimeSkills({'appCode':_0x194c75,'scope':_0x50524d(0x221)}))[_0x50524d(0x221)];}export async function listVisibleRuntimeSkills(_0x24d026){const _0xcc5677=a76_0x3f21;return(await listRuntimeSkills({'appCode':_0x24d026,'scope':'all'}))[_0xcc5677(0x246)];}export async function createPersonalRuntimeSkill(_0x232fe8,_0x58077a,_0x316111={}){const _0xd021ac=a76_0x3f21;return publishRuntimeSkill(_0x232fe8,_0x58077a,{'visibility':_0xd021ac(0x258),'confirmWarnings':_0x316111[_0xd021ac(0x200)]});}export async function updatePersonalRuntimeSkill(_0x127bb5,_0x1647c7,_0x4efc9d,_0x2e2a77={}){const _0x43ff07=a76_0x3f21;return publishRuntimeSkill(_0x1647c7,{..._0x4efc9d,'skillCode':_0x4efc9d['skillCode']??_0x127bb5},{'visibility':_0x43ff07(0x258),'confirmWarnings':_0x2e2a77['confirmWarnings']});}export async function publishCompanyRuntimeSkill(_0x2383ac,_0x5b5248,_0x135f24={}){const _0x577abd=a76_0x3f21;return publishRuntimeSkill(_0x2383ac,_0x5b5248,{'visibility':_0x577abd(0x245),'confirmWarnings':_0x135f24[_0x577abd(0x200)]});}export async function validateRuntimeSkillPublish(_0x34cddc,_0x290849,_0x9ef1fc){const _0x17dc09=a76_0x3f21,_0x4cd94e=buildRuntimeSkillPublishForm(_0x290849,_0x9ef1fc[_0x17dc09(0x237)]),_0x21cee2=await skillHubJsonRequest(_0x17dc09(0x22d)+encodeURIComponent(_0x34cddc)+_0x17dc09(0x25e),{'method':_0x17dc09(0x226),'body':_0x4cd94e});return{'valid':_0x21cee2[_0x17dc09(0x24d)]===!![],'errors':Array[_0x17dc09(0x252)](_0x21cee2['errors'])?_0x21cee2[_0x17dc09(0x1df)]:[],'warnings':Array[_0x17dc09(0x252)](_0x21cee2[_0x17dc09(0x1f7)])?_0x21cee2[_0x17dc09(0x1f7)]:[],'resolvedSlug':_0x21cee2[_0x17dc09(0x255)],'resolvedVersion':_0x21cee2[_0x17dc09(0x25f)]};}export async function downloadRuntimeSkillPackage(_0x3dae06,_0x26102a,_0x23c2a5,_0x2ac162){const _0x3084c8=a76_0x3f21;void _0x3dae06;const _0x92659d=_0x2ac162?_0x3084c8(0x22d)+encodeURIComponent(_0x23c2a5)+'/'+encodeURIComponent(_0x26102a)+_0x3084c8(0x269)+encodeURIComponent(_0x2ac162)+_0x3084c8(0x270):'/api/cli/v1/skills/'+encodeURIComponent(_0x23c2a5)+'/'+encodeURIComponent(_0x26102a)+_0x3084c8(0x270);return skillHubBinaryRequest(_0x92659d);}async function publishRuntimeSkill(_0x4b3fbc,_0x408551,_0x69b741){const _0x39b7b6=a76_0x3f21,_0x4212fc=buildRuntimeSkillPublishForm(_0x408551,_0x69b741['visibility']),_0x138844=await skillHubJsonRequest(_0x39b7b6(0x22d)+encodeURIComponent(_0x4b3fbc)+_0x39b7b6(0x236),{'method':'POST','query':{'confirmWarnings':_0x69b741[_0x39b7b6(0x200)]===!![]?!![]:undefined},'body':_0x4212fc});return{'appCode':_0x138844[_0x39b7b6(0x260)]??_0x4b3fbc,'skillCode':_0x138844[_0x39b7b6(0x1f5)]??_0x408551[_0x39b7b6(0x219)]??'','skillName':_0x408551[_0x39b7b6(0x227)]??_0x138844[_0x39b7b6(0x1f5)]??_0x408551['skillCode'],'description':_0x408551['description'],'scope':skillHubVisibilityToScope(_0x138844[_0x39b7b6(0x237)]??_0x69b741[_0x39b7b6(0x237)])??_0x39b7b6(0x1e8),'version':_0x138844[_0x39b7b6(0x267)]??_0x408551['version'],'tags':_0x408551['tags'],'content':_0x408551[_0x39b7b6(0x249)]};}function buildRuntimeSkillPublishForm(_0x26c18c,_0x1a248e){const _0x117da2=a76_0x3f21,_0x40c1bb=new FormData();return _0x40c1bb[_0x117da2(0x20b)]('file',runtimeSkillPackageFile(_0x26c18c)),_0x26c18c[_0x117da2(0x227)]?.[_0x117da2(0x1f9)]()&&_0x40c1bb[_0x117da2(0x20b)](_0x117da2(0x1de),_0x26c18c[_0x117da2(0x227)][_0x117da2(0x1f9)]()),_0x40c1bb[_0x117da2(0x20b)](_0x117da2(0x237),_0x1a248e),_0x40c1bb;}function runtimeSkillPackageFile(_0x1674f9){const _0x586f42=a76_0x3f21;if(!_0x1674f9[_0x586f42(0x225)])throw CliErrors[_0x586f42(0x257)]('Missing\x20Skill\x20package\x20payload.');const _0x3f9df6=Buffer['from'](_0x1674f9[_0x586f42(0x225)],'base64'),_0x129c09=new Blob([_0x3f9df6],{'type':_0x586f42(0x241)}),_0x112d77=(_0x1674f9[_0x586f42(0x219)]||_0x586f42(0x24f))+'.zip';if(typeof File!=='undefined')return new File([_0x129c09],_0x112d77,{'type':_0x586f42(0x241)});return _0x129c09;}function normalizeSkillHubRuntimeListResponse(_0x55293a,_0x4be491,_0x158e09,_0x48a5eb){const _0x18c926=a76_0x3f21,_0x49b601=Array['isArray'](_0x4be491)?_0x4be491:Array['isArray'](_0x4be491?.[_0x18c926(0x26e)])?_0x4be491[_0x18c926(0x26e)]:[],_0x172e56=_0x48a5eb?.['trim'](),_0x59dedf=_0x49b601[_0x18c926(0x1ff)](_0x48dc48=>!_0x172e56||_0x48dc48['slug']===_0x172e56)[_0x18c926(0x212)](skillHubRuntimeItemToRuntimeSkill)[_0x18c926(0x1ff)](_0x16b394=>Boolean(_0x16b394)),_0x1bc5f4=_0x59dedf[_0x18c926(0x1ff)](_0x3b7895=>_0x3b7895[_0x18c926(0x223)]===_0x18c926(0x1e8)),_0x58d898=_0x59dedf[_0x18c926(0x1ff)](_0x1a3aa2=>_0x1a3aa2[_0x18c926(0x223)]===_0x18c926(0x221));return{'appCode':_0x55293a,'personal':_0x158e09===_0x18c926(0x221)?[]:_0x1bc5f4,'company':_0x158e09==='personal'?[]:_0x58d898,'effective':buildEffectiveRuntimeSkills(_0x1bc5f4,_0x58d898,_0x158e09)};}function skillHubRuntimeItemToRuntimeSkill(_0x1e6227){const _0x351074=a76_0x3f21,_0x3a9727=_0x1e6227[_0x351074(0x1f5)]?.['trim'](),_0x4f36df=skillHubVisibilityToScope(_0x1e6227[_0x351074(0x237)]);if(!_0x3a9727||!_0x4f36df)return undefined;return{'id':_0x1e6227['id'],'appCode':_0x1e6227['namespace'],'skillCode':_0x3a9727,'skillName':_0x1e6227[_0x351074(0x1de)]??_0x3a9727,'description':_0x1e6227[_0x351074(0x1ee)],'scope':_0x4f36df,'version':skillHubRuntimeItemVersion(_0x1e6227),'status':_0x1e6227[_0x351074(0x21d)]};}function skillHubRuntimeDetailToRuntimeSkill(_0x36052d){const _0x4e1be1=a76_0x3f21,_0x2a0237=_0x36052d[_0x4e1be1(0x1f5)]?.[_0x4e1be1(0x1f9)]();if(!_0x2a0237)return undefined;return{'id':_0x36052d['id'],'appCode':_0x36052d['namespace'],'skillCode':_0x2a0237,'skillName':_0x36052d[_0x4e1be1(0x1de)]??_0x2a0237,'description':_0x36052d[_0x4e1be1(0x1ee)],'example':_0x36052d[_0x4e1be1(0x209)],'scope':skillHubVisibilityToScope(_0x36052d['visibility'])??_0x36052d[_0x4e1be1(0x237)]?.[_0x4e1be1(0x273)](),'version':skillHubRuntimeItemVersion(_0x36052d),'status':_0x36052d['status']};}function skillHubVisibilityToScope(_0x3c30e1){const _0x516a3e=a76_0x3f21;if(_0x3c30e1===_0x516a3e(0x258))return _0x516a3e(0x1e8);if(_0x3c30e1===_0x516a3e(0x245))return'company';return undefined;}function skillHubRuntimeItemVersion(_0x7be129){const _0x387ad5=a76_0x3f21;return _0x7be129['publishedVersion']?.[_0x387ad5(0x267)]??_0x7be129['headlineVersion']?.[_0x387ad5(0x267)]??_0x7be129['ownerPreviewVersion']?.[_0x387ad5(0x267)];}function buildEffectiveRuntimeSkills(_0x7248d5,_0x57d602,_0x588e49){const _0x2c7e91=a76_0x3f21;if(_0x588e49===_0x2c7e91(0x1e8))return _0x7248d5;if(_0x588e49===_0x2c7e91(0x221))return _0x57d602;const _0xbd7b40=new Map();for(const _0x3999a5 of _0x57d602){_0xbd7b40[_0x2c7e91(0x20b)](_0x3999a5['skillCode'],_0x3999a5);}for(const _0xa70d1a of _0x7248d5){_0xbd7b40['set'](_0xa70d1a[_0x2c7e91(0x219)],_0xa70d1a);}return Array[_0x2c7e91(0x230)](_0xbd7b40[_0x2c7e91(0x272)]());}function normalizeRuntimeSkillListResponse(_0xbfa48b,_0x211c0d){const _0x1a048f=a76_0x3f21;if(Array[_0x1a048f(0x252)](_0x211c0d)){const _0x24a824=_0x211c0d[_0x1a048f(0x1ff)](_0x44a2b1=>_0x44a2b1[_0x1a048f(0x223)]===_0x1a048f(0x1e8)),_0x943794=_0x211c0d[_0x1a048f(0x1ff)](_0x38d515=>_0x38d515['scope']===_0x1a048f(0x221));return{'appCode':_0xbfa48b,'personal':_0x24a824,'company':_0x943794,'effective':[..._0x943794,..._0x24a824]};}return{'appCode':_0x211c0d?.[_0x1a048f(0x265)]??_0xbfa48b,'personal':Array[_0x1a048f(0x252)](_0x211c0d?.[_0x1a048f(0x1e8)])?_0x211c0d['personal']:[],'company':Array['isArray'](_0x211c0d?.['company'])?_0x211c0d['company']:[],'effective':Array[_0x1a048f(0x252)](_0x211c0d?.[_0x1a048f(0x246)])?_0x211c0d[_0x1a048f(0x246)]:[]};}
|
|
1
|
+
(function(_0x547fbb,_0x532d36){const _0x3ca6f9=a76_0x2466,_0x43cc17=_0x547fbb();while(!![]){try{const _0x246764=-parseInt(_0x3ca6f9(0xbf))/0x1*(-parseInt(_0x3ca6f9(0xf2))/0x2)+-parseInt(_0x3ca6f9(0xcc))/0x3*(parseInt(_0x3ca6f9(0x112))/0x4)+parseInt(_0x3ca6f9(0xe3))/0x5*(parseInt(_0x3ca6f9(0xb2))/0x6)+parseInt(_0x3ca6f9(0xfa))/0x7+parseInt(_0x3ca6f9(0x9e))/0x8*(parseInt(_0x3ca6f9(0x110))/0x9)+parseInt(_0x3ca6f9(0x9c))/0xa*(-parseInt(_0x3ca6f9(0xdc))/0xb)+-parseInt(_0x3ca6f9(0x124))/0xc*(parseInt(_0x3ca6f9(0xcb))/0xd);if(_0x246764===_0x532d36)break;else _0x43cc17['push'](_0x43cc17['shift']());}catch(_0x31ae0d){_0x43cc17['push'](_0x43cc17['shift']());}}}(a76_0xd2b1,0xadcbc));import{readFile}from'node:fs/promises';import{basename}from'node:path';import{getApiDomain,getRuntimeDomain,getSkillHubDomain}from'../constant/domain.js';import{PRODUCT_CONFIG}from'../constant/product.js';import{CliErrors}from'../errors.js';import{createRateLimitError,readRetryAfter,readRetryAfterSeconds}from'../framework/rate-limit.js';import{extractList}from'../framework/response.js';import{parseLosslessJson}from'../utils/lossless-json.js';let _activeAK;export function setActiveAK(_0x12e0f3){_activeAK=_0x12e0f3||undefined;}export function clearActiveAK(){_activeAK=undefined;}function firstString(..._0x1dd335){const _0x465deb=a76_0x2466;for(const _0xf7f9bf of _0x1dd335){if(typeof _0xf7f9bf===_0x465deb(0x10a)&&_0xf7f9bf[_0x465deb(0xc5)]())return _0xf7f9bf['trim']();}return undefined;}async function decodeResponseBody(_0x3b1e22){const _0x2db338=a76_0x2466;if(typeof _0x3b1e22[_0x2db338(0xa0)]===_0x2db338(0xf0))try{const _0x50836c=await _0x3b1e22[_0x2db338(0xa0)]();try{return{'isJson':!![],'data':parseLosslessJson(_0x50836c),'text':_0x50836c};}catch{return{'isJson':![],'text':_0x50836c[_0x2db338(0xc5)]()||undefined};}}catch{}try{return{'isJson':!![],'data':await _0x3b1e22[_0x2db338(0xa4)]()};}catch{return{'isJson':![]};}}function throwIfRateLimited(_0x99bd61,_0x181fd5,_0x208b41){const _0x4615f9=a76_0x2466,_0x41458c=_0x181fd5&&typeof _0x181fd5===_0x4615f9(0x111)?_0x181fd5:{},_0x264564=[_0x41458c['status'],_0x41458c[_0x4615f9(0x102)]][_0x4615f9(0xc9)](_0x4d25f5=>Number(_0x4d25f5)===0x1ad),_0x2b7204=createRateLimitError({'status':_0x99bd61[_0x4615f9(0x11d)]===0x1ad?_0x99bd61['status']:_0x264564??_0x99bd61[_0x4615f9(0x11d)],'errorCode':firstString(_0x41458c['errorCode'],typeof _0x41458c['code']===_0x4615f9(0x10a)?_0x41458c['code']:undefined),'message':firstString(_0x41458c[_0x4615f9(0x115)],_0x41458c[_0x4615f9(0xb1)],_0x41458c[_0x4615f9(0xb8)],_0x208b41),'retryAfter':readRetryAfter(_0x99bd61[_0x4615f9(0xde)])??readRetryAfterSeconds(_0x181fd5)});if(_0x2b7204)throw _0x2b7204;}async function apiRequest(_0x1c6798,_0x9ea0ac={}){const _0x193f1f=a76_0x2466,{method:method=_0x193f1f(0x96),body:_0x26d6ad,headers:headers={},timeout:timeout=0x7530}=_0x9ea0ac,_0x1ae2b5=_activeAK,_0x47b049=getRuntimeDomain();if(!_0x1ae2b5)throw CliErrors[_0x193f1f(0x9b)](_0x193f1f(0xe6)+PRODUCT_CONFIG[_0x193f1f(0xae)]+'.');const _0xa822af=''+_0x47b049+_0x1c6798,_0x506020={'X-User-AK':_0x1ae2b5},_0x34c5e9=new AbortController(),_0x5a130f=setTimeout(()=>_0x34c5e9[_0x193f1f(0xfe)](),timeout);try{const _0x9417b1=await fetch(_0xa822af,{'method':method,'headers':{'Content-Type':'application/json','X-Invoke-Source':PRODUCT_CONFIG[_0x193f1f(0x117)],..._0x506020,...headers},'body':_0x26d6ad?JSON['stringify'](_0x26d6ad):undefined,'signal':_0x34c5e9['signal']}),_0x3c2cfb=await decodeResponseBody(_0x9417b1);if(!_0x3c2cfb[_0x193f1f(0xa1)]){throwIfRateLimited(_0x9417b1,undefined,_0x3c2cfb[_0x193f1f(0xa0)]);throw CliErrors[_0x193f1f(0xa5)]('API\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x9417b1['status']+')',_0x9417b1[_0x193f1f(0x11d)]>=0x190?_0x193f1f(0xea):undefined);}const _0x11e306=_0x3c2cfb[_0x193f1f(0xb9)];throwIfRateLimited(_0x9417b1,_0x11e306);if(!_0x9417b1['ok']||_0x11e306[_0x193f1f(0x128)]===![])throw CliErrors[_0x193f1f(0xa5)](_0x11e306['errorMsg']||_0x11e306['message']||_0x193f1f(0xa2)+_0x9417b1[_0x193f1f(0x11d)],_0x11e306[_0x193f1f(0xb7)]?_0x193f1f(0xd5)+_0x11e306[_0x193f1f(0xb7)]:undefined);return _0x11e306;}catch(_0x2b9515){if(_0x2b9515 instanceof Error&&_0x2b9515[_0x193f1f(0xc1)]===_0x193f1f(0xd8))throw CliErrors[_0x193f1f(0xa5)]('Request\x20timeout:\x20'+_0xa822af);throw _0x2b9515;}finally{clearTimeout(_0x5a130f);}}async function apiBinaryRequest(_0x3bab0a,_0x41d06f={}){const _0x14ea95=a76_0x2466,{method:method=_0x14ea95(0x96),headers:headers={},timeout:timeout=0x7530}=_0x41d06f,_0x36f921=_activeAK,_0x42b55a=getRuntimeDomain();if(!_0x36f921)throw CliErrors[_0x14ea95(0x9b)](_0x14ea95(0xe6)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x3d7908=''+_0x42b55a+_0x3bab0a,_0x25f3bc=new AbortController(),_0x2e10ec=setTimeout(()=>_0x25f3bc[_0x14ea95(0xfe)](),timeout);try{const _0x2dfec0=await fetch(_0x3d7908,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x14ea95(0x117)],'X-User-AK':_0x36f921,...headers},'signal':_0x25f3bc['signal']});if(!_0x2dfec0['ok']){const _0x947328=await decodeResponseBody(_0x2dfec0),_0x4b2122=_0x947328[_0x14ea95(0xb9)]&&typeof _0x947328[_0x14ea95(0xb9)]===_0x14ea95(0x111)?_0x947328[_0x14ea95(0xb9)]:{},_0x4c11ba=firstString(_0x4b2122['errorMsg'],_0x4b2122[_0x14ea95(0xb1)],_0x4b2122[_0x14ea95(0xb7)],_0x947328[_0x14ea95(0xa0)]);throwIfRateLimited(_0x2dfec0,_0x947328['data'],_0x4c11ba);throw CliErrors[_0x14ea95(0xa5)](_0x4c11ba||_0x14ea95(0xa2)+_0x2dfec0[_0x14ea95(0x11d)],'Download\x20failed:\x20'+_0x3d7908);}return Buffer[_0x14ea95(0x10d)](await _0x2dfec0[_0x14ea95(0xf1)]());}catch(_0x485733){if(_0x485733 instanceof Error&&_0x485733[_0x14ea95(0xc1)]===_0x14ea95(0xd8))throw CliErrors['apiError'](_0x14ea95(0x11b)+_0x3d7908);throw _0x485733;}finally{clearTimeout(_0x2e10ec);}}async function apiFormRequest(_0x325af1,_0x130881,_0x29539e={}){const _0x1ddd4f=a76_0x2466,{timeout:timeout=0x7530}=_0x29539e,_0x56431c=_activeAK,_0x19e8f9=getRuntimeDomain();if(!_0x56431c)throw CliErrors[_0x1ddd4f(0x9b)](_0x1ddd4f(0xe6)+PRODUCT_CONFIG[_0x1ddd4f(0xae)]+'.');const _0x4b9463=''+_0x19e8f9+_0x325af1,_0x3654df=new AbortController(),_0x1e709a=setTimeout(()=>_0x3654df['abort'](),timeout);try{const _0x1d0d8c=await fetch(_0x4b9463,{'method':_0x1ddd4f(0xa3),'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x1ddd4f(0x117)],'X-User-AK':_0x56431c},'body':_0x130881,'signal':_0x3654df[_0x1ddd4f(0xfb)]}),_0x29abe8=await decodeResponseBody(_0x1d0d8c);if(!_0x29abe8[_0x1ddd4f(0xa1)]){throwIfRateLimited(_0x1d0d8c,undefined,_0x29abe8[_0x1ddd4f(0xa0)]);throw CliErrors[_0x1ddd4f(0xa5)](_0x1ddd4f(0x11f)+_0x1d0d8c['status']+')',_0x1d0d8c[_0x1ddd4f(0x11d)]>=0x190?_0x1ddd4f(0xea):undefined);}const _0x2c5932=_0x29abe8[_0x1ddd4f(0xb9)];throwIfRateLimited(_0x1d0d8c,_0x2c5932);if(!_0x1d0d8c['ok']||_0x2c5932[_0x1ddd4f(0x128)]===![])throw CliErrors[_0x1ddd4f(0xa5)](_0x2c5932[_0x1ddd4f(0x115)]||_0x2c5932['message']||_0x1ddd4f(0xa2)+_0x1d0d8c['status'],_0x2c5932[_0x1ddd4f(0xb7)]?'API\x20error\x20code:\x20'+_0x2c5932[_0x1ddd4f(0xb7)]:undefined);return _0x2c5932;}catch(_0x1741ab){if(_0x1741ab instanceof Error&&_0x1741ab[_0x1ddd4f(0xc1)]===_0x1ddd4f(0xd8))throw CliErrors['apiError']('Request\x20timeout:\x20'+_0x4b9463);throw _0x1741ab;}finally{clearTimeout(_0x1e709a);}}async function toolboxRequest(_0x2f557a,_0x58e6ed,_0x145c49={}){const _0x4c8d25=a76_0x2466,{method:method=_0x4c8d25(0x96),headers:headers={},timeout:timeout=0x7530}=_0x145c49,_0x17dea0=_activeAK;if(!_0x17dea0)throw CliErrors['authRequired'](_0x4c8d25(0xe6)+PRODUCT_CONFIG[_0x4c8d25(0xae)]+'.');const _0xeb6756=getApiDomain()[_0x4c8d25(0xa8)](/\/$/,''),_0x118253=new URL(_0x2f557a,_0xeb6756+_0x4c8d25(0xf5));if(_0x58e6ed)for(const [_0x4557af,_0x2b78eb]of Object['entries'](_0x58e6ed)){_0x2b78eb!==undefined&&_0x2b78eb!==null&&_0x118253[_0x4c8d25(0x95)][_0x4c8d25(0xac)](_0x4557af,String(_0x2b78eb));}const _0x47c9a1=new AbortController(),_0x15adcb=setTimeout(()=>_0x47c9a1[_0x4c8d25(0xfe)](),timeout);try{const _0x2fbc76=await fetch(_0x118253,{'method':method,'headers':{'Content-Type':_0x4c8d25(0xa9),'X-Invoke-Source':PRODUCT_CONFIG[_0x4c8d25(0x117)],'X-User-AK':_0x17dea0,...headers},'signal':_0x47c9a1[_0x4c8d25(0xfb)]}),_0x14c964=await decodeResponseBody(_0x2fbc76);if(!_0x14c964[_0x4c8d25(0xa1)]){throwIfRateLimited(_0x2fbc76,undefined,_0x14c964[_0x4c8d25(0xa0)]);throw CliErrors[_0x4c8d25(0xa5)](_0x4c8d25(0x127)+_0x2fbc76[_0x4c8d25(0x11d)]+')',_0x2fbc76[_0x4c8d25(0x11d)]>=0x190?_0x4c8d25(0xea):undefined);}const _0x3617cb=_0x14c964[_0x4c8d25(0xb9)];throwIfRateLimited(_0x2fbc76,_0x3617cb);if(!_0x2fbc76['ok']){const _0x21bbc3=_0x3617cb&&typeof _0x3617cb==='object'?_0x3617cb:{};throw CliErrors[_0x4c8d25(0xa5)](_0x21bbc3[_0x4c8d25(0x115)]||_0x21bbc3[_0x4c8d25(0xb1)]||_0x4c8d25(0xc7)+_0x2fbc76[_0x4c8d25(0x11d)],_0x21bbc3[_0x4c8d25(0xb7)]?'Toolbox\x20error\x20code:\x20'+_0x21bbc3[_0x4c8d25(0xb7)]:undefined);}if(_0x3617cb&&typeof _0x3617cb===_0x4c8d25(0x111)&&_0x4c8d25(0x128)in _0x3617cb&&typeof _0x3617cb[_0x4c8d25(0x128)]===_0x4c8d25(0xb0)){const _0x446874=_0x3617cb;if(!_0x446874[_0x4c8d25(0x128)])throw CliErrors[_0x4c8d25(0xa5)](_0x446874['errorMsg']||_0x446874[_0x4c8d25(0xb1)]||_0x4c8d25(0x10c),_0x446874[_0x4c8d25(0xb7)]?_0x4c8d25(0x11a)+_0x446874['errorCode']:undefined);return _0x446874[_0x4c8d25(0xb9)];}return _0x3617cb;}catch(_0x57f379){if(_0x57f379 instanceof Error&&_0x57f379['name']===_0x4c8d25(0xd8))throw CliErrors[_0x4c8d25(0xa5)](_0x4c8d25(0x11b)+_0x118253[_0x4c8d25(0x101)]());throw _0x57f379;}finally{clearTimeout(_0x15adcb);}}async function skillHubJsonRequest(_0x453acc,_0x70dd8e={}){const _0xc64a78=a76_0x2466,{method:method=_0xc64a78(0x96),query:_0x4da413,body:_0x42f94d,headers:headers={},timeout:timeout=0x7530,allowNotFound:allowNotFound=![]}=_0x70dd8e,_0x3d8fc7=_activeAK;if(!_0x3d8fc7)throw CliErrors['authRequired'](_0xc64a78(0xe6)+PRODUCT_CONFIG[_0xc64a78(0xae)]+'.');const _0x1d568e=getSkillHubDomain()[_0xc64a78(0xa8)](/\/$/,''),_0x1b4253=new URL(_0x453acc,_0x1d568e+'/');if(_0x4da413)for(const [_0xaa9f5c,_0x40e07c]of Object[_0xc64a78(0xe8)](_0x4da413)){_0x40e07c!==undefined&&_0x40e07c!==null&&_0x1b4253[_0xc64a78(0x95)][_0xc64a78(0xac)](_0xaa9f5c,String(_0x40e07c));}const _0x4c5f63=new AbortController(),_0x450ca0=setTimeout(()=>_0x4c5f63[_0xc64a78(0xfe)](),timeout);try{const _0x25c44c=await fetch(_0x1b4253[_0xc64a78(0x101)](),{'method':method,'headers':{'Accept':_0xc64a78(0xa9),'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x3d8fc7,...headers},'body':_0x42f94d,'signal':_0x4c5f63[_0xc64a78(0xfb)]}),_0x3f6644=await decodeResponseBody(_0x25c44c);if(!_0x3f6644['isJson']){if(allowNotFound&&_0x25c44c['status']===0x194)return undefined;throwIfRateLimited(_0x25c44c,undefined,_0x3f6644['text']);throw CliErrors[_0xc64a78(0xa5)]('SkillHub\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x25c44c[_0xc64a78(0x11d)]+')',_0x25c44c['status']>=0x190?_0xc64a78(0xea):undefined);}const _0x56cbd9=_0x3f6644['data'];throwIfRateLimited(_0x25c44c,_0x56cbd9);if(allowNotFound&&isSkillHubNotFoundResponse(_0x25c44c[_0xc64a78(0x11d)],_0x56cbd9))return undefined;const _0x2def2e=!_0x25c44c['ok']||_0x56cbd9?.[_0xc64a78(0x128)]===![]||typeof _0x56cbd9?.['code']===_0xc64a78(0xf3)&&_0x56cbd9['code']>=0x190;if(_0x2def2e)throw CliErrors[_0xc64a78(0xa5)](_0x56cbd9?.['errorMsg']||_0x56cbd9?.[_0xc64a78(0xb1)]||_0x56cbd9?.[_0xc64a78(0xb8)]||'SkillHub\x20API\x20error:\x20'+_0x25c44c['status'],_0x56cbd9?.[_0xc64a78(0xb7)]?_0xc64a78(0x118)+_0x56cbd9[_0xc64a78(0xb7)]:undefined);return _0x56cbd9?.[_0xc64a78(0xb9)]??_0x56cbd9;}catch(_0x3415b9){if(_0x3415b9 instanceof Error&&_0x3415b9[_0xc64a78(0xc1)]===_0xc64a78(0xd8))throw CliErrors[_0xc64a78(0xa5)](_0xc64a78(0x11b)+_0x1b4253[_0xc64a78(0x101)]());throw _0x3415b9;}finally{clearTimeout(_0x450ca0);}}function isSkillHubNotFoundResponse(_0x8a1e1d,_0x22230e){const _0x8c0687=a76_0x2466;if(_0x8a1e1d===0x194||_0x22230e?.[_0x8c0687(0x102)]===0x194)return!![];if(_0x8a1e1d!==0x190&&_0x22230e?.[_0x8c0687(0x102)]!==0x190)return![];const _0x1fbecb=[_0x22230e?.[_0x8c0687(0xb8)],_0x22230e?.['message'],_0x22230e?.[_0x8c0687(0x115)],_0x22230e?.['error']]['filter'](_0x3c3fe4=>typeof _0x3c3fe4===_0x8c0687(0x10a))[_0x8c0687(0xe5)]('\x20');return/skill not found\b/i['test'](_0x1fbecb);}async function skillHubBinaryRequest(_0x75a65d,_0x432f9e={}){const _0x65353d=a76_0x2466,{query:_0x3332e8,headers:headers={},timeout:timeout=0x7530}=_0x432f9e,_0x3d7a66=_activeAK;if(!_0x3d7a66)throw CliErrors[_0x65353d(0x9b)](_0x65353d(0xe6)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x5ac3e2=getSkillHubDomain()[_0x65353d(0xa8)](/\/$/,''),_0x123a5f=new URL(_0x75a65d,_0x5ac3e2+'/');if(_0x3332e8)for(const [_0x4955d6,_0x4fff64]of Object[_0x65353d(0xe8)](_0x3332e8)){_0x4fff64!==undefined&&_0x4fff64!==null&&_0x123a5f[_0x65353d(0x95)][_0x65353d(0xac)](_0x4955d6,String(_0x4fff64));}const _0x1c7d24=new AbortController(),_0x28ff0b=setTimeout(()=>_0x1c7d24[_0x65353d(0xfe)](),timeout);try{const _0x365e22=await fetch(_0x123a5f[_0x65353d(0x101)](),{'method':'GET','headers':{'Accept':'application/octet-stream','X-Invoke-Source':PRODUCT_CONFIG[_0x65353d(0x117)],'X-User-AK':_0x3d7a66,...headers},'signal':_0x1c7d24[_0x65353d(0xfb)]});if(!_0x365e22['ok']){const _0x2c9e30=await decodeResponseBody(_0x365e22),_0x54b4e7=_0x2c9e30[_0x65353d(0xb9)]&&typeof _0x2c9e30[_0x65353d(0xb9)]==='object'?_0x2c9e30[_0x65353d(0xb9)]:{},_0xd16e65=firstString(_0x54b4e7['errorMsg'],_0x54b4e7[_0x65353d(0xb1)],_0x54b4e7['msg'],_0x54b4e7['errorCode'],_0x2c9e30[_0x65353d(0xa0)]);throwIfRateLimited(_0x365e22,_0x2c9e30[_0x65353d(0xb9)],_0xd16e65);throw CliErrors[_0x65353d(0xa5)](_0xd16e65||'SkillHub\x20API\x20error:\x20'+_0x365e22[_0x65353d(0x11d)],_0x65353d(0xf6)+_0x123a5f['toString']());}return Buffer[_0x65353d(0x10d)](await _0x365e22[_0x65353d(0xf1)]());}catch(_0x619daa){if(_0x619daa instanceof Error&&_0x619daa['name']==='AbortError')throw CliErrors[_0x65353d(0xa5)]('Request\x20timeout:\x20'+_0x123a5f['toString']());throw _0x619daa;}finally{clearTimeout(_0x28ff0b);}}export async function getBffEndpointContract(_0x3bd9fa,_0x4d2daa){const _0x135e9e=a76_0x2466;if(_0x4d2daa===_0x135e9e(0xe2))throw CliErrors['validation']('BFF\x20function\x20not\x20found\x20or\x20inaccessible:\x20appCode='+_0x3bd9fa+_0x135e9e(0xcd)+_0x4d2daa);const _0x2536e9=await apiRequest(_0x135e9e(0x106)+encodeURIComponent(_0x3bd9fa)+'/'+encodeURIComponent(_0x4d2daa)),_0x143ac3=_0x2536e9[_0x135e9e(0xb9)];if(!_0x143ac3||typeof _0x143ac3!==_0x135e9e(0x111)||Array[_0x135e9e(0x119)](_0x143ac3)||_0x143ac3['appCode']!==_0x3bd9fa||_0x143ac3[_0x135e9e(0x12a)]!==_0x4d2daa)throw CliErrors['validation']('BFF\x20function\x20not\x20found\x20or\x20inaccessible:\x20appCode='+_0x3bd9fa+_0x135e9e(0xcd)+_0x4d2daa);return{'appCode':_0x143ac3[_0x135e9e(0xed)],'functionName':_0x143ac3['functionName'],'description':_0x143ac3['description'],'version':_0x143ac3[_0x135e9e(0xef)],'gmtModified':_0x143ac3[_0x135e9e(0xee)]};}export async function getSqlQueryInfo(_0x49caea,_0x394d7f){const _0x3be5d6=a76_0x2466,_0x44d1e5=await apiRequest('/client/sql/query',{'method':_0x3be5d6(0xa3),'body':{'appCode':_0x49caea,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x394d7f}}),_0x2e5fa6=_0x44d1e5[_0x3be5d6(0xb9)],_0x1192a7=_0x2e5fa6&&typeof _0x2e5fa6===_0x3be5d6(0x111)&&_0x3be5d6(0xf9)in _0x2e5fa6?_0x2e5fa6[_0x3be5d6(0xf9)]?.[0x0]:_0x2e5fa6&&typeof _0x2e5fa6===_0x3be5d6(0x111)&&_0x3be5d6(0xaf)in _0x2e5fa6?_0x2e5fa6:undefined;if(!_0x1192a7)throw CliErrors['validation']('SQL\x20query\x20not\x20found:\x20'+_0x394d7f);return _0x1192a7;}function a76_0x2466(_0x899b78,_0x13362d){_0x899b78=_0x899b78-0x94;const _0xd2b182=a76_0xd2b1();let _0x2466aa=_0xd2b182[_0x899b78];return _0x2466aa;}function isRemoteAppItem(_0x154e23){const _0x27638c=a76_0x2466;return!!_0x154e23&&typeof _0x154e23===_0x27638c(0x111)&&typeof _0x154e23['appCode']===_0x27638c(0x10a)&&typeof _0x154e23[_0x27638c(0xbc)]===_0x27638c(0x10a);}function extractRemoteAppItems(_0x231a03){const _0x44065c=a76_0x2466;if(Array[_0x44065c(0x119)](_0x231a03))return _0x231a03['filter'](isRemoteAppItem);if(!_0x231a03||typeof _0x231a03!=='object')throw CliErrors[_0x44065c(0xa5)](_0x44065c(0xdf));const _0x419c0c=_0x231a03;if(Array['isArray'](_0x419c0c[_0x44065c(0xf9)]))return _0x419c0c['tableData'][_0x44065c(0xe1)](isRemoteAppItem);if(_0x419c0c[_0x44065c(0xb9)]&&typeof _0x419c0c['data']==='object'){const _0x59aebf=_0x419c0c['data'];if(Array['isArray'](_0x59aebf[_0x44065c(0xf9)]))return _0x59aebf[_0x44065c(0xf9)][_0x44065c(0xe1)](isRemoteAppItem);}throw CliErrors[_0x44065c(0xa5)](_0x44065c(0xab));}export async function getMyApps(){const _0x12021d=await apiRequest('/client/app/my-apps');return extractRemoteAppItems(_0x12021d['data']);}export async function getLoginUserInfo(){const _0x88e587=a76_0x2466,_0x1b6ed9=await apiRequest(_0x88e587(0x10b));if(!_0x1b6ed9[_0x88e587(0xb9)]||typeof _0x1b6ed9[_0x88e587(0xb9)]!==_0x88e587(0x111)||Array['isArray'](_0x1b6ed9['data']))throw CliErrors[_0x88e587(0xa5)]('Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.');return _0x1b6ed9['data'];}function runtimeSchedulePath(_0x5578a9,_0x3b168a=''){const _0x1d5b52=a76_0x2466;return _0x1d5b52(0x10e)+encodeURIComponent(_0x5578a9)+_0x1d5b52(0xf8)+_0x3b168a;}export async function validateRuntimeSchedule(_0x358e6d,_0x5a62aa){const _0x31970e=a76_0x2466,_0x5c5964=await apiRequest(runtimeSchedulePath(_0x358e6d,_0x31970e(0x98)),{'method':_0x31970e(0xa3),'body':_0x5a62aa});return _0x5c5964[_0x31970e(0xb9)];}export async function createRuntimeSchedule(_0x278ca1,_0x3e5fde){const _0x26a88b=a76_0x2466,_0x1c07fb=await apiRequest(runtimeSchedulePath(_0x278ca1),{'method':_0x26a88b(0xa3),'body':_0x3e5fde});return _0x1c07fb[_0x26a88b(0xb9)];}export async function listRuntimeSchedules(_0x3677ff,_0x204a41={}){const _0x18f0a1=a76_0x2466,_0x56944b=new URLSearchParams();if(_0x204a41['limit']!==undefined)_0x56944b[_0x18f0a1(0xac)](_0x18f0a1(0x109),String(_0x204a41[_0x18f0a1(0x109)]));if(_0x204a41[_0x18f0a1(0x11c)])_0x56944b['set'](_0x18f0a1(0x11c),_0x204a41['cursor']);const _0x1888fc=_0x56944b[_0x18f0a1(0xb4)]>0x0?'?'+_0x56944b['toString']():'',_0x45a0fc=await apiRequest(''+runtimeSchedulePath(_0x3677ff)+_0x1888fc);return _0x45a0fc[_0x18f0a1(0xb9)];}export async function getRuntimeSchedule(_0x5d88f7,_0x5496ae){const _0x3172b0=a76_0x2466,_0x3b53d3=await apiRequest(runtimeSchedulePath(_0x5d88f7,'/'+encodeURIComponent(_0x5496ae)));return _0x3b53d3[_0x3172b0(0xb9)];}export async function deleteRuntimeSchedule(_0x2d52a9,_0x3f212b){const _0x57ef62=a76_0x2466,_0x3eb2fc=await apiRequest(runtimeSchedulePath(_0x2d52a9,'/'+encodeURIComponent(_0x3f212b)),{'method':'DELETE'});return _0x3eb2fc[_0x57ef62(0xb9)];}export async function runRuntimeSchedule(_0x1ea3e4,_0x3229de){const _0x1beeaf=a76_0x2466,_0x407db2=await apiRequest(runtimeSchedulePath(_0x1ea3e4,'/'+encodeURIComponent(_0x3229de)+_0x1beeaf(0xc2)),{'method':_0x1beeaf(0xa3)});return _0x407db2['data'];}export async function listDatasets(_0x256515,_0x5b137c){const _0x26498c=a76_0x2466,_0x352bd2=await apiRequest('/client/dataset/list',{'method':'POST','body':{'appCode':_0x256515,..._0x5b137c?.[_0x26498c(0x102)]&&{'code':_0x5b137c[_0x26498c(0x102)]},..._0x5b137c?.['name']&&{'name':_0x5b137c[_0x26498c(0xc1)]}}});return extractList(_0x352bd2['data']);}export async function getDatasetDetail(_0x4ed013){const _0x5ce75e=a76_0x2466,_0xafc0a5=await apiRequest(_0x5ce75e(0xf7)+encodeURIComponent(_0x4ed013));return _0xafc0a5[_0x5ce75e(0xb9)];}export async function getDatasetSdkUsageDoc(_0x3e144f,_0x3550d8){const _0x5d63ab=a76_0x2466,_0x5551ba=await toolboxRequest(_0x5d63ab(0xfc),{'datasetCode':_0x3e144f,'appCode':_0x3550d8});return typeof _0x5551ba?.[_0x5d63ab(0xd4)]===_0x5d63ab(0x10a)?_0x5551ba[_0x5d63ab(0xd4)]:'';}export async function uploadRuntimeFile(_0x25a347,_0x36b929){const _0x703498=a76_0x2466,_0x9fd480=await readFile(_0x36b929),_0x55f7bf=new FormData();_0x55f7bf[_0x703498(0xd7)](_0x703498(0xed),_0x25a347),_0x55f7bf['append']('file',new Blob([new Uint8Array(_0x9fd480)]),basename(_0x36b929));const _0x180769=await apiFormRequest('/client/uploadFile',_0x55f7bf);return _0x180769[_0x703498(0xb9)];}export async function queryRuntimeFileUrl(_0x1d4a89,_0x26714c={}){const _0x32d763=a76_0x2466,_0x2fadb5=await apiRequest('/client/queryFileUrl',{'method':_0x32d763(0xa3),'body':{'filePath':_0x1d4a89,'downloadFlag':_0x26714c[_0x32d763(0x121)]??![],..._0x26714c['longTerm']?{'longTerm':!![]}:{}}});return _0x2fadb5['data'];}export async function recognizeRuntimeOcr(_0x547f33,_0x2467d6){const _0x59042b=a76_0x2466,_0x4d70a3=await apiRequest(_0x59042b(0x10f),{'method':_0x59042b(0xa3),'body':{'appCode':_0x547f33,'url':_0x2467d6[_0x59042b(0x114)],'type':_0x2467d6['type']}});return _0x4d70a3[_0x59042b(0xb9)];}export async function getRuntimeAppConfigByKey(_0x13c1a3,_0x412038){const _0x2cf23d=a76_0x2466,_0x3dafc9=new URLSearchParams({'appCode':_0x13c1a3,'key':_0x412038}),_0x861ff3=await apiRequest(_0x2cf23d(0xc0)+_0x3dafc9[_0x2cf23d(0x101)]());if(typeof _0x861ff3[_0x2cf23d(0xb9)]!=='string')throw CliErrors[_0x2cf23d(0x123)](_0x2cf23d(0xd9)+_0x412038);return _0x861ff3['data'];}export async function listRuntimeArtifacts(_0x50a189,_0x34ce4f){const _0x5864c9=a76_0x2466,_0x110e66=new URLSearchParams({'appCode':_0x50a189});if(_0x34ce4f?.[_0x5864c9(0xd3)])_0x110e66[_0x5864c9(0xac)]('artifactType',_0x34ce4f[_0x5864c9(0xd3)]);if(_0x34ce4f?.[_0x5864c9(0xb3)])_0x110e66[_0x5864c9(0xac)](_0x5864c9(0xb3),_0x34ce4f[_0x5864c9(0xb3)]);if(_0x34ce4f?.[_0x5864c9(0xe9)]!==undefined)_0x110e66[_0x5864c9(0xac)](_0x5864c9(0xe9),String(_0x34ce4f[_0x5864c9(0xe9)]));const _0x4faa91=await apiRequest(_0x5864c9(0x129)+_0x110e66[_0x5864c9(0x101)]());return Array[_0x5864c9(0x119)](_0x4faa91[_0x5864c9(0xb9)])?_0x4faa91[_0x5864c9(0xb9)]:[];}export async function getRuntimeArtifact(_0x4f2c12,_0xfab5d2){const _0x19d4dc=a76_0x2466,_0x24a533=await apiRequest(_0x19d4dc(0x104)+_0x4f2c12+_0x19d4dc(0x9d)+encodeURIComponent(_0xfab5d2));if(!_0x24a533[_0x19d4dc(0xb9)])throw CliErrors[_0x19d4dc(0x123)](_0x19d4dc(0xce)+_0x4f2c12);return _0x24a533[_0x19d4dc(0xb9)];}export async function createRuntimeArtifact(_0x5acef6,_0x34723f){const _0x5971f4=a76_0x2466,_0x2479d3=await apiRequest(_0x5971f4(0x100),{'method':_0x5971f4(0xa3),'body':{'appCode':_0x5acef6,..._0x34723f}});return _0x2479d3[_0x5971f4(0xb9)];}export async function updateRuntimeArtifact(_0x3c9629,_0x231c48,_0x2046b7){const _0x577ec3=a76_0x2466,_0xe6a4e3=await apiRequest(_0x577ec3(0x104)+_0x3c9629+_0x577ec3(0x11e),{'method':'POST','body':{'appCode':_0x231c48,..._0x2046b7}});return _0xe6a4e3[_0x577ec3(0xb9)];}export async function listPersonalBffs(_0xe7844d){const _0x531801=a76_0x2466,_0x357f39=await apiRequest(_0x531801(0x99)+encodeURIComponent(_0xe7844d));return Array['isArray'](_0x357f39['data'])?_0x357f39[_0x531801(0xb9)]:[];}export async function getPersonalBff(_0x4f75b7,_0xd7779c){const _0x56c2cf=a76_0x2466,_0x4f9a22=await apiRequest(_0x56c2cf(0x103)+_0x4f75b7+_0x56c2cf(0x9d)+encodeURIComponent(_0xd7779c));if(!_0x4f9a22[_0x56c2cf(0xb9)])throw CliErrors[_0x56c2cf(0x123)]('Personal\x20BFF\x20not\x20found:\x20id='+_0x4f75b7);return _0x4f9a22['data'];}export async function createPersonalBff(_0x2d09b5,_0x38be85){const _0x118cb8=a76_0x2466,_0x5f11a1=await apiRequest('/client/runtime-bff/personal/create',{'method':_0x118cb8(0xa3),'body':{'appCode':_0x2d09b5,..._0x38be85}});return _0x5f11a1[_0x118cb8(0xb9)];}export async function updatePersonalBff(_0x7c9747,_0x3ec418,_0x2bc2f7){const _0x146872=a76_0x2466,_0x12ec0c=await apiRequest('/client/runtime-bff/personal/'+_0x7c9747+_0x146872(0x11e),{'method':_0x146872(0xa3),'body':{'appCode':_0x3ec418,..._0x2bc2f7}});return _0x12ec0c[_0x146872(0xb9)];}export async function executePersonalBff(_0x1e4c9f,_0x10c852,_0x4cc3a7){const _0x24e1ef=a76_0x2466,_0x342925=await apiRequest('/client/runtime-bff/personal/'+_0x1e4c9f+_0x24e1ef(0xc3)+encodeURIComponent(_0x10c852),{'method':_0x24e1ef(0xa3),'body':_0x4cc3a7});return _0x342925[_0x24e1ef(0xb9)];}export async function listPersonalKnowledgeBaseItems(_0x1d9973){const _0x4f9b23=a76_0x2466,_0x4190c3=await apiRequest(_0x4f9b23(0xad)+encodeURIComponent(_0x1d9973));return Array[_0x4f9b23(0x119)](_0x4190c3[_0x4f9b23(0xb9)])?_0x4190c3[_0x4f9b23(0xb9)]:[];}export async function getPersonalKnowledgeBaseItem(_0x3691b6,_0x1291e6){const _0x27f660=a76_0x2466,_0x11cfc3=await apiRequest('/client/knowledge-base/personal/'+_0x3691b6+_0x27f660(0x9d)+encodeURIComponent(_0x1291e6));if(!_0x11cfc3[_0x27f660(0xb9)])throw CliErrors[_0x27f660(0x123)](_0x27f660(0xec)+_0x3691b6);return _0x11cfc3['data'];}export async function createPersonalKnowledgeBaseItem(_0x3c9897,_0x27134a){const _0x2cf48e=a76_0x2466,_0x4d9f15=await apiRequest(_0x2cf48e(0xaa),{'method':_0x2cf48e(0xa3),'body':{'appCode':_0x3c9897,..._0x27134a}});return _0x4d9f15[_0x2cf48e(0xb9)];}export async function updatePersonalKnowledgeBaseItem(_0x57d125,_0x538a06,_0x294642){const _0x27ff6c=a76_0x2466,_0x34880d=await apiRequest(_0x27ff6c(0xc4)+_0x57d125+_0x27ff6c(0x11e),{'method':'POST','body':{'appCode':_0x538a06,..._0x294642}});return _0x34880d['data'];}export async function searchKnowledgeBase(_0x491ca8,_0x3ec014){const _0x74b028=a76_0x2466,_0x48eaf9=await apiRequest('/client/knowledge-base/search',{'method':'POST','body':{'appCode':_0x491ca8,'query':_0x3ec014['query'],..._0x3ec014[_0x74b028(0xda)]!==undefined?{'topK':_0x3ec014[_0x74b028(0xda)]}:{}}});return Array['isArray'](_0x48eaf9[_0x74b028(0xb9)])?_0x48eaf9[_0x74b028(0xb9)]:[];}export async function getRuntimeSkillByCode(_0x4e849c,_0x28cd6d){const _0x927a5d=a76_0x2466,_0x455a80=await skillHubJsonRequest(_0x927a5d(0xcf)+encodeURIComponent(_0x4e849c)+'/'+encodeURIComponent(_0x28cd6d),{'allowNotFound':!![]});return _0x455a80?skillHubRuntimeDetailToRuntimeSkill(_0x455a80):undefined;}export async function listRuntimeSkills(_0x217d58){const _0x2ad228=a76_0x2466,_0x7d1f2a=await skillHubJsonRequest(_0x2ad228(0xe4)+encodeURIComponent(_0x217d58[_0x2ad228(0xed)])+_0x2ad228(0x125),{'query':{'page':0x0,'size':0xc8}});return normalizeSkillHubRuntimeListResponse(_0x217d58['appCode'],_0x7d1f2a,_0x217d58[_0x2ad228(0xc6)]??_0x2ad228(0xd1),_0x217d58[_0x2ad228(0x102)]);}export async function listPersonalRuntimeSkills(_0x15635f){return(await listRuntimeSkills({'appCode':_0x15635f,'scope':'personal'}))['personal'];}export async function listCompanyRuntimeSkills(_0x13e16d){const _0x48b713=a76_0x2466;return(await listRuntimeSkills({'appCode':_0x13e16d,'scope':_0x48b713(0xdd)}))[_0x48b713(0xdd)];}export async function listVisibleRuntimeSkills(_0x32dbdb){const _0x231e3b=a76_0x2466;return(await listRuntimeSkills({'appCode':_0x32dbdb,'scope':_0x231e3b(0xd1)}))[_0x231e3b(0xd6)];}export async function createPersonalRuntimeSkill(_0x2b27be,_0x3dfb91,_0x581255={}){const _0x266f93=a76_0x2466;return publishRuntimeSkill(_0x2b27be,_0x3dfb91,{'visibility':_0x266f93(0x107),'confirmWarnings':_0x581255[_0x266f93(0xba)]});}export async function updatePersonalRuntimeSkill(_0xedcce5,_0x40c33f,_0xab6f06,_0x1e160a={}){const _0x552a48=a76_0x2466;return publishRuntimeSkill(_0x40c33f,{..._0xab6f06,'skillCode':_0xab6f06[_0x552a48(0x122)]??_0xedcce5},{'visibility':'PRIVATE','confirmWarnings':_0x1e160a[_0x552a48(0xba)]});}export async function publishCompanyRuntimeSkill(_0x5b2375,_0x1ab848,_0xf51f3d={}){const _0x5f594f=a76_0x2466;return publishRuntimeSkill(_0x5b2375,_0x1ab848,{'visibility':'NAMESPACE_ONLY','confirmWarnings':_0xf51f3d[_0x5f594f(0xba)]});}function a76_0xd2b1(){const _0x312c46=['invokeSource','SkillHub\x20error\x20code:\x20','isArray','Toolbox\x20error\x20code:\x20','Request\x20timeout:\x20','cursor','status','/update','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','slug','download','skillCode','validation','3900EwxOdp','/skills','base64','Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20','success','/client/artifact/list?','functionName','resolvedSlug','searchParams','GET','ownerPreviewVersion','/validate','/client/runtime-bff/personal/list?appCode=','NAMESPACE_ONLY','authRequired','20IBQjsu','?appCode=','5976616JQfDiq','/api/cli/v1/skills/','text','isJson','API\x20error:\x20','POST','json','apiError','map','visibility','replace','application/json','/client/knowledge-base/personal/create','Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.','set','/client/knowledge-base/personal/list?appCode=','newConfigFileName','sqlCode','boolean','message','17622ryqtcI','source','size','headlineVersion','personal','errorCode','msg','data','confirmWarnings','packageBase64','appName','application/zip','/download','119606CiLBsn','/client/app-config/getByKey?','name','/run','/execute?appCode=','/client/knowledge-base/personal/','trim','scope','Toolbox\x20API\x20error:\x20','summary','find','values','79989LpLljZ','96969PVaShZ',',\x20name=','Artifact\x20not\x20found:\x20id=','/api/v1/skills/','description','all','undefined','artifactType','markdown','API\x20error\x20code:\x20','effective','append','AbortError','Invalid\x20app\x20config\x20value:\x20key=','topK','example','1690161hmjcbh','company','headers','Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.','namespace','filter','functions','1515uYriVr','/api/runtime/v1/namespaces/','join','Configure\x20accessKey\x20in\x20','items','entries','favorite','Check\x20your\x20credentials\x20and\x20try\x20again.','skillName','Knowledge-base\x20entry\x20not\x20found:\x20id=','appCode','gmtModified','version','function','arrayBuffer','22SkKJWo','number','warnings','/api/node-toolbox/','Download\x20failed:\x20','/client/dataset/get-driven-data?code=','/schedules','tableData','2047514XxyINc','signal','api-doc-generator','errors','abort','displayName','/client/artifact/create','toString','code','/client/runtime-bff/personal/','/client/artifact/','resolvedVersion','/client/bff/endpoint/','PRIVATE','valid','limit','string','/client/user/loginUserInfo','Toolbox\x20API\x20error','from','/api/harness/apps/','/client/ocr','9snXlYn','object','28TzUeYI','tags','url','errorMsg','toLowerCase'];a76_0xd2b1=function(){return _0x312c46;};return a76_0xd2b1();}export async function validateRuntimeSkillPublish(_0x3fdea2,_0x22e9a1,_0x1017f1){const _0x2a6532=a76_0x2466,_0x255097=buildRuntimeSkillPublishForm(_0x22e9a1,_0x1017f1['visibility']),_0x2ebc38=await skillHubJsonRequest(_0x2a6532(0x9f)+encodeURIComponent(_0x3fdea2)+'/publish/validate',{'method':_0x2a6532(0xa3),'body':_0x255097});return{'valid':_0x2ebc38[_0x2a6532(0x108)]===!![],'errors':Array['isArray'](_0x2ebc38[_0x2a6532(0xfd)])?_0x2ebc38[_0x2a6532(0xfd)]:[],'warnings':Array[_0x2a6532(0x119)](_0x2ebc38[_0x2a6532(0xf4)])?_0x2ebc38[_0x2a6532(0xf4)]:[],'resolvedSlug':_0x2ebc38[_0x2a6532(0x94)],'resolvedVersion':_0x2ebc38[_0x2a6532(0x105)]};}export async function downloadRuntimeSkillPackage(_0x28c04b,_0x41ed6b,_0x4c379f,_0x5e3ab6){const _0x4da2b5=a76_0x2466;void _0x28c04b;const _0x5954fb=_0x5e3ab6?'/api/cli/v1/skills/'+encodeURIComponent(_0x4c379f)+'/'+encodeURIComponent(_0x41ed6b)+'/versions/'+encodeURIComponent(_0x5e3ab6)+_0x4da2b5(0xbe):'/api/cli/v1/skills/'+encodeURIComponent(_0x4c379f)+'/'+encodeURIComponent(_0x41ed6b)+'/download';return skillHubBinaryRequest(_0x5954fb);}async function publishRuntimeSkill(_0x4b09c1,_0x4670b9,_0x16875e){const _0x580b43=a76_0x2466,_0x502f77=buildRuntimeSkillPublishForm(_0x4670b9,_0x16875e[_0x580b43(0xa7)]),_0x97ac09=await skillHubJsonRequest(_0x580b43(0x9f)+encodeURIComponent(_0x4b09c1)+'/publish',{'method':_0x580b43(0xa3),'query':{'confirmWarnings':_0x16875e[_0x580b43(0xba)]===!![]?!![]:undefined},'body':_0x502f77});return{'appCode':_0x97ac09[_0x580b43(0xe0)]??_0x4b09c1,'skillCode':_0x97ac09[_0x580b43(0x120)]??_0x4670b9['skillCode']??'','skillName':_0x4670b9[_0x580b43(0xeb)]??_0x97ac09[_0x580b43(0x120)]??_0x4670b9[_0x580b43(0x122)],'description':_0x4670b9[_0x580b43(0xd0)],'scope':skillHubVisibilityToScope(_0x97ac09[_0x580b43(0xa7)]??_0x16875e[_0x580b43(0xa7)])??_0x580b43(0xb6),'version':_0x97ac09['version']??_0x4670b9[_0x580b43(0xef)],'tags':_0x4670b9[_0x580b43(0x113)],'content':_0x4670b9['content']};}function buildRuntimeSkillPublishForm(_0x59f55d,_0x3bf66b){const _0x3c65b4=a76_0x2466,_0x59ff52=new FormData();return _0x59ff52[_0x3c65b4(0xac)]('file',runtimeSkillPackageFile(_0x59f55d)),_0x59f55d[_0x3c65b4(0xeb)]?.['trim']()&&_0x59ff52[_0x3c65b4(0xac)](_0x3c65b4(0xff),_0x59f55d[_0x3c65b4(0xeb)]['trim']()),_0x59ff52[_0x3c65b4(0xac)](_0x3c65b4(0xa7),_0x3bf66b),_0x59ff52;}function runtimeSkillPackageFile(_0x315797){const _0x13e1fe=a76_0x2466;if(!_0x315797[_0x13e1fe(0xbb)])throw CliErrors[_0x13e1fe(0x123)]('Missing\x20Skill\x20package\x20payload.');const _0xbc3ca1=Buffer['from'](_0x315797['packageBase64'],_0x13e1fe(0x126)),_0x307ec1=new Blob([_0xbc3ca1],{'type':_0x13e1fe(0xbd)}),_0x137259=(_0x315797[_0x13e1fe(0x122)]||'skill')+'.zip';if(typeof File!==_0x13e1fe(0xd2))return new File([_0x307ec1],_0x137259,{'type':_0x13e1fe(0xbd)});return _0x307ec1;}function normalizeSkillHubRuntimeListResponse(_0x4948f2,_0x27a9c8,_0x12fd56,_0x28b1f6){const _0x23f5c5=a76_0x2466,_0x49af16=Array['isArray'](_0x27a9c8)?_0x27a9c8:Array['isArray'](_0x27a9c8?.[_0x23f5c5(0xe7)])?_0x27a9c8['items']:[],_0xf876f7=_0x28b1f6?.[_0x23f5c5(0xc5)](),_0x325425=_0x49af16[_0x23f5c5(0xe1)](_0xd2801d=>!_0xf876f7||_0xd2801d[_0x23f5c5(0x120)]===_0xf876f7)[_0x23f5c5(0xa6)](skillHubRuntimeItemToRuntimeSkill)['filter'](_0x285ab7=>Boolean(_0x285ab7)),_0x72870=_0x325425['filter'](_0x30db2f=>_0x30db2f[_0x23f5c5(0xc6)]===_0x23f5c5(0xb6)),_0x3dc81=_0x325425[_0x23f5c5(0xe1)](_0x4b4d50=>_0x4b4d50[_0x23f5c5(0xc6)]===_0x23f5c5(0xdd));return{'appCode':_0x4948f2,'personal':_0x12fd56===_0x23f5c5(0xdd)?[]:_0x72870,'company':_0x12fd56===_0x23f5c5(0xb6)?[]:_0x3dc81,'effective':buildEffectiveRuntimeSkills(_0x72870,_0x3dc81,_0x12fd56)};}function skillHubRuntimeItemToRuntimeSkill(_0x493e8b){const _0x7dfa90=a76_0x2466,_0x2f74ab=_0x493e8b[_0x7dfa90(0x120)]?.['trim'](),_0x32466a=skillHubVisibilityToScope(_0x493e8b[_0x7dfa90(0xa7)]);if(!_0x2f74ab||!_0x32466a)return undefined;return{'id':_0x493e8b['id'],'appCode':_0x493e8b[_0x7dfa90(0xe0)],'skillCode':_0x2f74ab,'skillName':_0x493e8b[_0x7dfa90(0xff)]??_0x2f74ab,'description':_0x493e8b[_0x7dfa90(0xc8)],'scope':_0x32466a,'version':skillHubRuntimeItemVersion(_0x493e8b),'status':_0x493e8b[_0x7dfa90(0x11d)]};}function skillHubRuntimeDetailToRuntimeSkill(_0x15ce75){const _0x22955a=a76_0x2466,_0x2a581c=_0x15ce75['slug']?.[_0x22955a(0xc5)]();if(!_0x2a581c)return undefined;return{'id':_0x15ce75['id'],'appCode':_0x15ce75[_0x22955a(0xe0)],'skillCode':_0x2a581c,'skillName':_0x15ce75[_0x22955a(0xff)]??_0x2a581c,'description':_0x15ce75[_0x22955a(0xc8)],'example':_0x15ce75[_0x22955a(0xdb)],'scope':skillHubVisibilityToScope(_0x15ce75[_0x22955a(0xa7)])??_0x15ce75[_0x22955a(0xa7)]?.[_0x22955a(0x116)](),'version':skillHubRuntimeItemVersion(_0x15ce75),'status':_0x15ce75['status']};}function skillHubVisibilityToScope(_0x479158){const _0x48bc46=a76_0x2466;if(_0x479158===_0x48bc46(0x107))return _0x48bc46(0xb6);if(_0x479158===_0x48bc46(0x9a))return _0x48bc46(0xdd);return undefined;}function skillHubRuntimeItemVersion(_0x3fcd1b){const _0x436bec=a76_0x2466;return _0x3fcd1b['publishedVersion']?.[_0x436bec(0xef)]??_0x3fcd1b[_0x436bec(0xb5)]?.['version']??_0x3fcd1b[_0x436bec(0x97)]?.[_0x436bec(0xef)];}function buildEffectiveRuntimeSkills(_0xc369e,_0x6e7651,_0x48096a){const _0x31c75b=a76_0x2466;if(_0x48096a===_0x31c75b(0xb6))return _0xc369e;if(_0x48096a===_0x31c75b(0xdd))return _0x6e7651;const _0x2061da=new Map();for(const _0x11b3fd of _0x6e7651){_0x2061da['set'](_0x11b3fd[_0x31c75b(0x122)],_0x11b3fd);}for(const _0x4f5b02 of _0xc369e){_0x2061da[_0x31c75b(0xac)](_0x4f5b02['skillCode'],_0x4f5b02);}return Array[_0x31c75b(0x10d)](_0x2061da[_0x31c75b(0xca)]());}function normalizeRuntimeSkillListResponse(_0x52e9ec,_0x1fb9f2){const _0x547e86=a76_0x2466;if(Array[_0x547e86(0x119)](_0x1fb9f2)){const _0x3cd28a=_0x1fb9f2[_0x547e86(0xe1)](_0x57ccef=>_0x57ccef[_0x547e86(0xc6)]===_0x547e86(0xb6)),_0x451798=_0x1fb9f2[_0x547e86(0xe1)](_0x919688=>_0x919688[_0x547e86(0xc6)]==='company');return{'appCode':_0x52e9ec,'personal':_0x3cd28a,'company':_0x451798,'effective':[..._0x451798,..._0x3cd28a]};}return{'appCode':_0x1fb9f2?.[_0x547e86(0xed)]??_0x52e9ec,'personal':Array[_0x547e86(0x119)](_0x1fb9f2?.[_0x547e86(0xb6)])?_0x1fb9f2[_0x547e86(0xb6)]:[],'company':Array['isArray'](_0x1fb9f2?.[_0x547e86(0xdd)])?_0x1fb9f2['company']:[],'effective':Array[_0x547e86(0x119)](_0x1fb9f2?.[_0x547e86(0xd6)])?_0x1fb9f2[_0x547e86(0xd6)]:[]};}
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a77_0x7ec5(){const _0x31e8ef=['860608ITOXwp','8XbYxtE','712336mBpPZF','get','dbtableConfig','947165jMbbmJ','4609Rpeokq','8270uDrVYk','424293LvanuX','dbId','dbName','3234728TIgzUf','586137phUNIS','set','map','9ahEBRV','6xddgsZ'];a77_0x7ec5=function(){return _0x31e8ef;};return a77_0x7ec5();}(function(_0x16cbb1,_0x5635c9){const _0x2b1528=a77_0x54e7,_0x5d7ea9=_0x16cbb1();while(!![]){try{const _0x5d16b8=parseInt(_0x2b1528(0x110))/0x1+parseInt(_0x2b1528(0x108))/0x2+-parseInt(_0x2b1528(0x103))/0x3*(parseInt(_0x2b1528(0x109))/0x4)+parseInt(_0x2b1528(0x10d))/0x5*(-parseInt(_0x2b1528(0x107))/0x6)+-parseInt(_0x2b1528(0x113))/0x7+-parseInt(_0x2b1528(0x10a))/0x8*(-parseInt(_0x2b1528(0x106))/0x9)+-parseInt(_0x2b1528(0x10f))/0xa*(-parseInt(_0x2b1528(0x10e))/0xb);if(_0x5d16b8===_0x5635c9)break;else _0x5d7ea9['push'](_0x5d7ea9['shift']());}catch(_0x1ef52e){_0x5d7ea9['push'](_0x5d7ea9['shift']());}}}(a77_0x7ec5,0x3c831));import{listDatasets}from'../core/api-client.js';const cache=new Map();function a77_0x54e7(_0x1e44b5,_0x78f100){_0x1e44b5=_0x1e44b5-0x103;const _0x7ec5fc=a77_0x7ec5();let _0x54e7d8=_0x7ec5fc[_0x1e44b5];return _0x54e7d8;}export async function listDatabases(_0x4edaec){const _0x52bb09=a77_0x54e7;if(cache['has'](_0x4edaec))return cache[_0x52bb09(0x10b)](_0x4edaec);const _0x327106=await listDatasets(_0x4edaec),_0x459328=new Map();for(const _0x302856 of _0x327106){const _0x391a8a=_0x302856[_0x52bb09(0x10c)];_0x391a8a?.['dbId']!=null&&_0x459328[_0x52bb09(0x104)](_0x391a8a[_0x52bb09(0x111)],_0x391a8a[_0x52bb09(0x112)]??'db-'+_0x391a8a['dbId']);}const _0x4cb2b5=[..._0x459328['entries']()][_0x52bb09(0x105)](([_0x272cde,_0x13686c])=>({'dbId':_0x272cde,'dbName':_0x13686c}));return cache[_0x52bb09(0x104)](_0x4edaec,_0x4cb2b5),_0x4cb2b5;}export async function getDbName(_0x2aa26b,_0x42c26e){const _0x5381ac=a77_0x54e7;try{const _0x801763=await listDatabases(_0x2aa26b);return _0x801763['find'](_0xc4e335=>_0xc4e335['dbId']===_0x42c26e)?.[_0x5381ac(0x112)];}catch{return undefined;}}
|
package/lib/core/sdk-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
(function(_0x7d880c,_0x15e0da){const _0x3a0e28=a78_0x59b7,_0x4b49c1=_0x7d880c();while(!![]){try{const _0x5ec2ea=parseInt(_0x3a0e28(0xc1))/0x1*(parseInt(_0x3a0e28(0xdd))/0x2)+parseInt(_0x3a0e28(0xbc))/0x3+-parseInt(_0x3a0e28(0xe2))/0x4*(parseInt(_0x3a0e28(0xb9))/0x5)+parseInt(_0x3a0e28(0xcb))/0x6+-parseInt(_0x3a0e28(0xe0))/0x7*(parseInt(_0x3a0e28(0xd8))/0x8)+-parseInt(_0x3a0e28(0xba))/0x9+parseInt(_0x3a0e28(0xc8))/0xa*(-parseInt(_0x3a0e28(0xc6))/0xb);if(_0x5ec2ea===_0x15e0da)break;else _0x4b49c1['push'](_0x4b49c1['shift']());}catch(_0x22ac01){_0x4b49c1['push'](_0x4b49c1['shift']());}}}(a78_0x4277,0x9e6dd));function a78_0x59b7(_0xb401e6,_0x3704c4){_0xb401e6=_0xb401e6-0xb9;const _0x427750=a78_0x4277();let _0x59b7a6=_0x427750[_0xb401e6];return _0x59b7a6;}import{createClient}from'@lovrabet/sdk';import{PRODUCT_CONFIG}from'../constant/product.js';import{CliErrors}from'../errors.js';import{parseBatchCreateItemsFromParams}from'../utils/params.js';import{installLosslessJsonResponseParser}from'../utils/lossless-json.js';function a78_0x4277(){const _0x474236=['data\x20aggregate\x20--params.aggregate[','3565356xRgDEc','SDK\x20model\x20does\x20not\x20support\x20operation\x20\x22','aggregate','sql','update\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123,\x22name\x22:\x22new\x22}\x27\x20or\x20\x27{\x22id\x22:[1,2,3],\x22name\x22:\x22new\x22}\x27','917873ejIQIe','function','bff','column',']\x20must\x20be\x20an\x20object.','708895gMKgDu','trim','110WrQlXD',']\x20requires\x20\x22column\x22;\x20\x22field\x22\x20is\x20accepted\x20only\x20as\x20a\x20deprecated\x20alias.','field','3201156KHTqdh','invokeSource','object','isArray','execute','authMode','appCode','delete\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27','accessKey','data\x20aggregate\x20--params.aggregate\x20must\x20be\x20an\x20array.','string','Available:\x20filter,\x20getOne,\x20create,\x20batchCreate,\x20update,\x20delete,\x20aggregate.','validation','1871224djFcOa','delete','batchCreate','env','\x22.\x20','2pvzOXP','getOne\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27','map','7qppbAG','dataset_','465236NXudLO','getOne','30bwBvqU','3152466jTmKCs'];a78_0x4277=function(){return _0x474236;};return a78_0x4277();}let _client,restoreResponseJsonParser;export function initSdkClient(_0xae90c7){const _0x2b3a71=a78_0x59b7;restoreResponseJsonParser??=installLosslessJsonResponseParser();try{_client=createClient({'appCode':_0xae90c7[_0x2b3a71(0xd1)],'env':_0xae90c7[_0x2b3a71(0xdb)],'authMode':_0xae90c7[_0x2b3a71(0xd0)],..._0xae90c7[_0x2b3a71(0xd3)]?{'accessKey':_0xae90c7['accessKey']}:{},'options':{'timeout':0x7530,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x2b3a71(0xcc)]}}});}catch(_0x489e43){clearSdkClient();throw _0x489e43;}}export function clearSdkClient(){_client=undefined,restoreResponseJsonParser?.(),restoreResponseJsonParser=undefined;}function ensureClient(){if(!_client)throw new Error('SDK\x20client\x20not\x20initialized.\x20Call\x20initSdkClient()\x20first.');return _client;}function normalizeAggregateParams(_0x5d4e7e){const _0x325d7e=a78_0x59b7,_0xc11c57=_0x5d4e7e[_0x325d7e(0xbe)];if(_0xc11c57===undefined)return _0x5d4e7e;if(!Array[_0x325d7e(0xce)](_0xc11c57))throw CliErrors['validation'](_0x325d7e(0xd4));return{..._0x5d4e7e,'aggregate':_0xc11c57[_0x325d7e(0xdf)]((_0x511530,_0x56a80f)=>{const _0x1bf853=_0x325d7e;if(!_0x511530||typeof _0x511530!==_0x1bf853(0xcd)||Array[_0x1bf853(0xce)](_0x511530))throw CliErrors[_0x1bf853(0xd7)](_0x1bf853(0xbb)+_0x56a80f+_0x1bf853(0xc5));const _0x330b9e=_0x511530[_0x1bf853(0xc4)]??_0x511530[_0x1bf853(0xca)];if(typeof _0x330b9e!==_0x1bf853(0xd5)||_0x330b9e[_0x1bf853(0xc7)]()==='')throw CliErrors[_0x1bf853(0xd7)](_0x1bf853(0xbb)+_0x56a80f+_0x1bf853(0xc9));const _0x4a6157={..._0x511530,'column':_0x330b9e};return delete _0x4a6157['field'],_0x4a6157;})};}export async function executeData(_0x4d5858,_0x475cd5,_0x444c65){const _0x21cc21=a78_0x59b7,_0x13f7b8=ensureClient(),_0x5cdc3c=_0x21cc21(0xe1)+_0x4d5858,_0x174569=_0x13f7b8['models'][_0x5cdc3c];if(!_0x174569||typeof _0x174569[_0x475cd5]!==_0x21cc21(0xc2))throw new Error(_0x21cc21(0xbd)+_0x475cd5+_0x21cc21(0xdc)+_0x21cc21(0xd6));if(_0x475cd5===_0x21cc21(0xda))return _0x174569[_0x21cc21(0xda)](parseBatchCreateItemsFromParams(_0x444c65));const _0x5242a6=_0x444c65!==undefined&&_0x444c65!==null&&!Array[_0x21cc21(0xce)](_0x444c65)?_0x444c65:{};switch(_0x475cd5){case _0x21cc21(0xe3):{const _0x4645d0=_0x5242a6['id'];if(_0x4645d0===undefined||_0x4645d0===null)throw new Error(_0x21cc21(0xde));return _0x174569[_0x21cc21(0xe3)](_0x4645d0);}case'update':{const {id:_0x142b55,..._0x178df7}=_0x5242a6;if(_0x142b55===undefined||_0x142b55===null)throw new Error(_0x21cc21(0xc0));return _0x174569['update'](_0x142b55,_0x178df7);}case'delete':{const _0x5e178e=_0x5242a6['id'];if(_0x5e178e===undefined||_0x5e178e===null)throw new Error(_0x21cc21(0xd2));return _0x174569[_0x21cc21(0xd9)](_0x5e178e);}case _0x21cc21(0xbe):return _0x174569[_0x21cc21(0xbe)](normalizeAggregateParams(_0x5242a6));default:return _0x174569[_0x475cd5](_0x5242a6);}}export async function executeSdkSql(_0x1c3f70,_0x5380ad){const _0x1d8598=a78_0x59b7,_0x2ba995=ensureClient();return _0x2ba995[_0x1d8598(0xbf)]['execute']({'sqlCode':_0x1c3f70,'params':_0x5380ad});}export async function executeSdkBff(_0x5d9c4f,_0x21686f){const _0x59b5c3=a78_0x59b7,_0x232193=ensureClient();return _0x232193[_0x59b5c3(0xc3)][_0x59b5c3(0xcf)]({'scriptName':_0x5d9c4f,'params':_0x21686f});}
|
package/lib/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a79_0x5bdf53=a79_0x54b6;function a79_0x54b6(_0x2c1636,_0x50db33){_0x2c1636=_0x2c1636-0x1bc;const _0x3d4b77=a79_0x3d4b();let _0x54b653=_0x3d4b77[_0x2c1636];return _0x54b653;}(function(_0x322bd7,_0x562495){const _0x753159=a79_0x54b6,_0x4e5d76=_0x322bd7();while(!![]){try{const _0x2a4af=-parseInt(_0x753159(0x1c4))/0x1*(parseInt(_0x753159(0x1c0))/0x2)+parseInt(_0x753159(0x1c2))/0x3+parseInt(_0x753159(0x1c6))/0x4*(-parseInt(_0x753159(0x1cb))/0x5)+-parseInt(_0x753159(0x1c5))/0x6*(-parseInt(_0x753159(0x1c9))/0x7)+-parseInt(_0x753159(0x1ca))/0x8*(parseInt(_0x753159(0x1bf))/0x9)+parseInt(_0x753159(0x1c8))/0xa+-parseInt(_0x753159(0x1ce))/0xb*(parseInt(_0x753159(0x1bc))/0xc);if(_0x2a4af===_0x562495)break;else _0x4e5d76['push'](_0x4e5d76['shift']());}catch(_0x2d6f2b){_0x4e5d76['push'](_0x4e5d76['shift']());}}}(a79_0x3d4b,0x7fea5));function a79_0x3d4b(){const _0x1b2ff4=['242gAQawT','25884FxsGXR','Set\x20appcode\x20via\x20--appcode\x20or\x20','\x20auth\x20login`.','9sAhFOa','10SsXdLb','rate_limited','773091PdYmCx','newConfigFileName','111046nICRrb','6zjQSpz','231212MRsdQl','Run\x20this\x20command\x20inside\x20a\x20directory\x20with\x20a\x20','9844140lHvBZy','6632507hCAGsg','7579048RjirOd','10xQXfXE','Configure\x20accessKey\x20in\x20','\x20file.'];a79_0x3d4b=function(){return _0x1b2ff4;};return a79_0x3d4b();}import{CliError,createCliErrors}from'@lovrabet/cli-framework';import{CLI_BIN_NAME}from'./constant/cli.js';import{PRODUCT_CONFIG}from'./constant/product.js';export{CliError};const baseCliErrors=createCliErrors({'cliBinName':CLI_BIN_NAME,'authRequiredHint':a79_0x5bdf53(0x1cc)+PRODUCT_CONFIG[a79_0x5bdf53(0x1c3)]+'\x20or\x20run\x20`'+CLI_BIN_NAME+a79_0x5bdf53(0x1be),'configMissingHint':a79_0x5bdf53(0x1bd)+PRODUCT_CONFIG[a79_0x5bdf53(0x1c3)]+'.','notInProjectHint':a79_0x5bdf53(0x1c7)+PRODUCT_CONFIG[a79_0x5bdf53(0x1c3)]+a79_0x5bdf53(0x1cd)});export const CliErrors={...baseCliErrors,'rateLimited':(_0x146588,_0x3f775e)=>new CliError(a79_0x5bdf53(0x1c1),0x2,_0x146588,_0x3f775e)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xd3cc4d,_0x6e0230){var _0x3948d5=a80_0x49df,_0x3fa15a=_0xd3cc4d();while(!![]){try{var _0x3c9b5d=-parseInt(_0x3948d5(0x143))/0x1+parseInt(_0x3948d5(0x13f))/0x2+-parseInt(_0x3948d5(0x145))/0x3+-parseInt(_0x3948d5(0x142))/0x4*(-parseInt(_0x3948d5(0x147))/0x5)+parseInt(_0x3948d5(0x141))/0x6*(parseInt(_0x3948d5(0x144))/0x7)+-parseInt(_0x3948d5(0x146))/0x8+parseInt(_0x3948d5(0x140))/0x9;if(_0x3c9b5d===_0x6e0230)break;else _0x3fa15a['push'](_0x3fa15a['shift']());}catch(_0x2c2a61){_0x3fa15a['push'](_0x3fa15a['shift']());}}}(a80_0x13ff,0xdfe49));function a80_0x49df(_0x3119f1,_0x25f467){_0x3119f1=_0x3119f1-0x13f;var _0x13ff2c=a80_0x13ff();var _0x49dfeb=_0x13ff2c[_0x3119f1];return _0x49dfeb;}function a80_0x13ff(){var _0x55657b=['12538848EeXUDB','17230AZWWcU','2647198IJcDqZ','12953790wpVjaA','379938yGKRPn','1148KSYxQO','1639053gECGgI','133lLChVk','2494722vadzSU'];a80_0x13ff=function(){return _0x55657b;};return a80_0x13ff();}import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';import{buildAllFlags as a80_0x512b1a}from'@lovrabet/cli-framework';export function buildAllFlags(_0x2c707b){return a80_0x512b1a(_0x2c707b,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});}
|
package/lib/framework/dryrun.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x51e9a8,_0x31a3be){const _0x87d6f0=a81_0x4ce3,_0x53773e=_0x51e9a8();while(!![]){try{const _0x7167de=parseInt(_0x87d6f0(0x13a))/0x1*(parseInt(_0x87d6f0(0x13d))/0x2)+-parseInt(_0x87d6f0(0x140))/0x3+-parseInt(_0x87d6f0(0x13c))/0x4+-parseInt(_0x87d6f0(0x141))/0x5+parseInt(_0x87d6f0(0x13b))/0x6+-parseInt(_0x87d6f0(0x13e))/0x7+parseInt(_0x87d6f0(0x142))/0x8;if(_0x7167de===_0x31a3be)break;else _0x53773e['push'](_0x53773e['shift']());}catch(_0x12bc3e){_0x53773e['push'](_0x53773e['shift']());}}}(a81_0x286d,0xc5321));function a81_0x286d(){const _0x1e8b38=['5565258IjpEkm','3358240RvMSuE','2DjsnIJ','10587983XVxidY','description','3471435xHvsLl','5943435tKysKf','24718000phjRZg','body','1488381QwqYrc'];a81_0x286d=function(){return _0x1e8b38;};return a81_0x286d();}function a81_0x4ce3(_0x1e9094,_0x5906dc){_0x1e9094=_0x1e9094-0x13a;const _0x286d62=a81_0x286d();let _0x4ce3a7=_0x286d62[_0x1e9094];return _0x4ce3a7;}export function dryRun(_0x7766d8,_0x18327c){const _0x3132e3={'method':_0x7766d8,'url':_0x18327c},_0x36fb28={'body'(_0x5b969a){const _0x53f1aa=a81_0x4ce3;return _0x3132e3[_0x53f1aa(0x143)]=_0x5b969a,_0x36fb28;},'description'(_0x3501dc){const _0x43770c=a81_0x4ce3;return _0x3132e3[_0x43770c(0x13f)]=_0x3501dc,_0x36fb28;},'build'(){return{..._0x3132e3};}};return _0x36fb28;}
|
package/lib/framework/flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a82_0x2327b2=a82_0x43f1;(function(_0x399f35,_0x377e5e){const _0x1325d2=a82_0x43f1,_0x19e3e2=_0x399f35();while(!![]){try{const _0x5bc1d0=parseInt(_0x1325d2(0x14b))/0x1*(parseInt(_0x1325d2(0x14e))/0x2)+-parseInt(_0x1325d2(0x145))/0x3+parseInt(_0x1325d2(0x146))/0x4*(parseInt(_0x1325d2(0x14a))/0x5)+-parseInt(_0x1325d2(0x14c))/0x6+parseInt(_0x1325d2(0x14d))/0x7+parseInt(_0x1325d2(0x149))/0x8*(-parseInt(_0x1325d2(0x148))/0x9)+parseInt(_0x1325d2(0x150))/0xa;if(_0x5bc1d0===_0x377e5e)break;else _0x19e3e2['push'](_0x19e3e2['shift']());}catch(_0x1557b1){_0x19e3e2['push'](_0x19e3e2['shift']());}}}(a82_0x1ddb,0x8d63e));import{createFlagHelpers}from'@lovrabet/cli-framework';function a82_0x1ddb(){const _0x49d82a=['170530zRxUoQ','482CLKbwA','4285638zkTDrZ','6443563zzPwZk','926ktexeA','validateFlags','7404320WqVluA','2194806BbgoaJ','52HublXm','parseFlags','36IQlhYx','604952MasELK'];a82_0x1ddb=function(){return _0x49d82a;};return a82_0x1ddb();}import{CliErrors}from'../errors.js';const helpers=createFlagHelpers(CliErrors);function a82_0x43f1(_0x24cf8f,_0x5733e1){_0x24cf8f=_0x24cf8f-0x145;const _0x1ddb89=a82_0x1ddb();let _0x43f195=_0x1ddb89[_0x24cf8f];return _0x43f195;}export const parseFlags=helpers[a82_0x2327b2(0x147)];export const validateFlags=helpers[a82_0x2327b2(0x14f)];
|